Browse Source

feat-修改茶宝问题

hejie 3 years ago
parent
commit
0e957437f7
2 changed files with 19 additions and 5 deletions
  1. 18 4
      src/pages/product/p_details.vue
  2. 1 1
      src/pages/product/productTeaBaby.vue

+ 18 - 4
src/pages/product/p_details.vue

@@ -70,7 +70,7 @@
       <uni-goods-nav
         :fill="true"
         :options="options"
-        :buttonGroup="buttonGroup"
+        :buttonGroup="type == 5 ? buttonGroupTea : buttonGroup"
         @click="onClick"
         @buttonClick="buttonClick"
       />
@@ -129,7 +129,8 @@
               color="#2DB389"
               style="transform: scale(0.7)"
             />
-            我已阅读同意<text @tap.stop="getProPage">《购买协议》</text>
+            我已阅读同意<text @tap.stop="getProPage" v-if="type != 5">《购买协议》</text>
+            <text @tap.stop="getProPage" v-else>《兑换协议》</text>
           </label>
         </checkbox-group>
         <view class="confim flex_r flex_ac flex_jc" @tap="ToPayPage">确定</view>
@@ -185,7 +186,20 @@ export default {
         // 	color: '#fff'
         // },
         {
-          text: "立即购买",
+          text:  "立即购买",
+          backgroundColor: "#ffa200",
+          color: "#fff",
+        },
+      ],
+      buttonGroupTea: [
+        // 底部操作按钮
+        // {
+        // 	text: '加入购物车',
+        // 	backgroundColor: '#ff0000',
+        // 	color: '#fff'
+        // },
+        {
+          text:  "立即兑换",
           backgroundColor: "#ffa200",
           color: "#fff",
         },
@@ -220,7 +234,7 @@ export default {
   methods: {
     // 商品详情信息
     loadData(da) {
-      post("goodsDetail", da).then((res) => {
+      post("goods/goodsDetail", da).then((res) => {
         if (res.code === 0) {
           this.detail = res.data.data;
           let imgs = [];

+ 1 - 1
src/pages/product/productTeaBaby.vue

@@ -17,7 +17,7 @@
           <span v-if="Number(item.cha_bao_price) != 0">{{ item.cha_bao_price }}茶宝</span>
         </view>
         <view class="info_btn_con flex_r flex_je">
-          <view class="info_btn flex_r flex_ac flex_jc">购买</view>
+          <view class="info_btn flex_r flex_ac flex_jc">兑换</view>
         </view>
       </view>
     </view>