Browse Source

H5-商品购买:商品详情

panyong 3 years ago
parent
commit
b40a7b9193

+ 10 - 2
htmldev/dashboard/src/views/sell/aflogo/index.vue

@@ -5,7 +5,7 @@
       <p class="title">AF HOUSE音乐现场</p>
       <p class="outlet-name">
         <img alt="" src="./image/ic_music@2x.png">
-        <span>星桥店</span>
+        <span>{{ objCurrentBarInfo.bar_name }}</span>
       </p>
     </div>
   </div>
@@ -13,7 +13,15 @@
 
 <script>
 export default {
-  name: 'index'
+  name: 'index',
+  props: {
+    objCurrentBarInfo: {
+      type: Object,
+      default: function () {
+        return {}
+      }
+    }
+  }
 }
 </script>
 

+ 2 - 0
htmldev/dashboard/src/views/sell/food/food.vue

@@ -174,6 +174,7 @@ export default {
 
   .food-content {
     min-height: 90%;
+    padding-bottom: 100px;
     border-radius: 16px 16px 0 0;
     background: #fff;
   }
@@ -292,6 +293,7 @@ export default {
   left: 0;
   bottom: 0;
   right: 0;
+  z-index: 1;
   display: flex;
   justify-content: space-between;
   align-items: center;

+ 16 - 6
htmldev/dashboard/src/views/sell/goods/index.vue

@@ -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)