|
@@ -1,6 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <aflogo/>
|
|
|
+ <aflogo
|
|
|
+ :objCurrentBarInfo="objCurrentBarInfo"/>
|
|
|
<div class="goods">
|
|
|
<div
|
|
|
ref="menuWrapper"
|
|
@@ -165,18 +166,27 @@ export default {
|
|
|
},
|
|
|
async selectFood (food, event) {
|
|
|
// better-scroll 默认会阻止浏览器的原生 click 事件。当设置为 true,better-scroll 会派发一个 click 事件,我们会给派发的 event 参数加一个私有属性 _constructed,值为 true
|
|
|
- if (!event._constructed) {
|
|
|
- return
|
|
|
- }
|
|
|
+ // todo 这里暂时用不到
|
|
|
+ // if (!event._constructed) {
|
|
|
+ // return
|
|
|
+ // }
|
|
|
+ const myToast = Toast.loading({
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true,
|
|
|
+ duration: 0
|
|
|
+ })
|
|
|
try {
|
|
|
const { data, status, msg } = await apiProductDetail(food.id)
|
|
|
+ myToast.clear()
|
|
|
if (status) {
|
|
|
this.selectedFood = data
|
|
|
} else {
|
|
|
Toast(msg)
|
|
|
}
|
|
|
- } catch (err) {}
|
|
|
- this.$refs.food.show()
|
|
|
+ this.$refs.food.show()
|
|
|
+ } catch (err) {
|
|
|
+ myToast.clear()
|
|
|
+ }
|
|
|
},
|
|
|
addFood (target) {
|
|
|
this._drop(target)
|