Slide 23
Slide 23 text
Vue.js͔Βचͭͳ͗ʢྫʣ
import axios from 'axios'
const HTTP_HEADER = {headers: {'Content-Type': 'application/json'}}
export default {
name: "player-search",
data() {
return {
// লུ
}
},
methods: {
search: async function (url) {
const response = await axios.get(url, HTTP_HEADER)
if (response.status !== 200) {
console.error('Τϥʔ࣌ͷॲཧ')
process.exit()
}
const body = response.data
this.getBatterSumallyMonth(body.url_batter_summary_month)
},
getBatterSumallyMonth: async function (url) {
const response = await axios.get(url, HTTP_HEADER)
if (response.status !== 200) {
console.error('Τϥʔ࣌ͷॲཧ')
process.exit()
}
const body = response.data
// TODO σʔλΛຒΊࠐΉ
},
// TODO ଓ͘
}