onload(){
let that = this
jewel.get('xxxx/xxxx', {}, false, function(res){
that.data = res.data.data;
})
console.log(JSON.stringify(that.data))
}
onload(){
let that = this
jewel.get('xxxx/xxxx', {}, false, function(res){
that.data = res.data.data;
})
console.log(JSON.stringify(that.data))
}
全盘崩坏 - 此颜差矣!
撸代码不先了解点基础知识么, js语言虽然是单线程, 但XMLRequest却是异步的, js处理异步使用的是回调函数, 也就是说你发出了请求后, 你以为会等请求结束后才会执行请求外的方法,实际并不是,发起请求后并不影响写在请求之后的代码执行,要实现在请求返回结果后在继续执行请求后面的代码,请使用async申明函数为异步函数,在配合await实现
9***@qq.com (作者)
打印了,报错----------
[Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
13:57:29.152 (found in <Root>)
13:57:29.172 [Vue warn]: Property or method "toJSON" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.
13:57:29.214 (found in <Root>)
13:57:29.234 [object object], wwww
2020-04-02 13:58