parent
							
								
									f440bdd3ec
								
							
						
					
					
						commit
						ddcafab605
					
				
				 3 changed files with 74 additions and 28 deletions
			
			
		@ -1,36 +1,56 @@ | 
				
			||||
<template> | 
				
			||||
  <div id="root"> | 
				
			||||
    <button @click="getStudents">获取学生信息</button><br/> | 
				
			||||
    <button @click="getCars">获取汽车信息</button> | 
				
			||||
  <div id="app"> | 
				
			||||
    <div> | 
				
			||||
      <section> | 
				
			||||
        <h3>Search Github Users</h3> | 
				
			||||
        <div> | 
				
			||||
          <input type="text" placeholder="enter the name you search"> <button>Search</button> | 
				
			||||
        </div> | 
				
			||||
      </section> | 
				
			||||
    </div> | 
				
			||||
    <div class="row"> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
      <div class="card"> | 
				
			||||
        <a href="https://github.com/xxxxxx" target="_blank"> | 
				
			||||
          <img src="https://v2.cn.vuejs.org/images/logo.svg" style="width: 100px" alt=""/> | 
				
			||||
        </a> | 
				
			||||
        <p class="card-text">xxxxx</p> | 
				
			||||
      </div> | 
				
			||||
    </div> | 
				
			||||
  </div> | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
import axios from "axios"; | 
				
			||||
 | 
				
			||||
export default { | 
				
			||||
  name: "App", | 
				
			||||
  methods: { | 
				
			||||
    getStudents() { | 
				
			||||
      axios.get('http://localhost:8080/stu/students').then( | 
				
			||||
          response => { | 
				
			||||
            console.log('请求成功了', response.data) | 
				
			||||
          }, | 
				
			||||
          error => { | 
				
			||||
            console.log('请求失败了', error.message) | 
				
			||||
          } | 
				
			||||
      ) | 
				
			||||
    }, | 
				
			||||
    getCars() { | 
				
			||||
      axios.get('http://localhost:8080/car/cars').then( | 
				
			||||
          response => { | 
				
			||||
            console.log('请求成功了', response.data) | 
				
			||||
          }, | 
				
			||||
          error => { | 
				
			||||
            console.log('请求失败了', error.message) | 
				
			||||
          } | 
				
			||||
      ) | 
				
			||||
    } | 
				
			||||
  } | 
				
			||||
  name: "App" | 
				
			||||
} | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
@ -0,0 +1,13 @@ | 
				
			||||
<template> | 
				
			||||
 | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
export default { | 
				
			||||
  name: "List" | 
				
			||||
} | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
 | 
				
			||||
</style> | 
				
			||||
@ -0,0 +1,13 @@ | 
				
			||||
<template> | 
				
			||||
 | 
				
			||||
</template> | 
				
			||||
 | 
				
			||||
<script> | 
				
			||||
export default { | 
				
			||||
  name: "Search" | 
				
			||||
} | 
				
			||||
</script> | 
				
			||||
 | 
				
			||||
<style scoped> | 
				
			||||
 | 
				
			||||
</style> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue