|
|
@@ -343,20 +343,21 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
listenScanItem(){
|
|
|
- // #ifdef APP-PLUS
|
|
|
//避免重复,每次进来先移除全局自定义事件监听器
|
|
|
uni.$off('listenGetScanCode')
|
|
|
let that = this
|
|
|
uni.$on('listenGetScanCode',function(data){
|
|
|
that.takeItem(data.code)
|
|
|
})
|
|
|
- allProduct().then(res=>{
|
|
|
- if(res.code == 1){
|
|
|
- that.globalAllProduct = res.data.list
|
|
|
- console.log('载入最新花材...')
|
|
|
- }
|
|
|
- })
|
|
|
- // #endif
|
|
|
+ this.getAllProduct()
|
|
|
+ //console.log('000000')
|
|
|
},
|
|
|
+ async getAllProduct(){
|
|
|
+ const { data,code } = await allProduct()
|
|
|
+ if(code == 1){
|
|
|
+ this.globalAllProduct = data.list
|
|
|
+ //console.log('异步载入最新花材...')
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|