created () {
this.getGoodsData()
console.log(this.goodsData) //到这一步展示的就不一样了
},
data() {
const module = '/goods'
return {
url: {
list: module + '/list'
},
goodsData: {},
}
},
methods: {
getGoodsData () {
get(this.url.list, {}, response => {
console.log(response) //这一步显示的还是对的
this.goodsData = response
})
}
}
