sunlupeng 2 anos atrás
pai
commit
9093a0f7dc

+ 1 - 1
src/api/allApi.js

@@ -249,7 +249,7 @@ export function welfareType(data) {
 //用户福利、兑换券列表
 export function welfareList(query) {
   return request({
-    url: '/mall-welfare/welfare/user/list',
+    url: '/coupon/user/centre/list',
     method: 'get',
     params:query
   })

+ 7 - 5
src/views/HomeView/GoodsDetail.vue

@@ -86,9 +86,11 @@
             <tr>
               <th width="35%">兑换物品</th>
               <!-- <th>数量</th> -->
-              <th style="text-align: center;">消耗福利券</th>
               <th style="text-align: center;">物品属性</th>
+              <th style="text-align: center;">兑换卷</th>
               <th style="text-align: center;">兑换方式</th>
+              <th v-if="data.deliveryType == '1' && data.freightType=='0'" style="text-align: center;">快递费</th>
+              <th v-if="data.deliveryType == '0'" style="text-align: center;">领取地点</th>
             </tr>
           </thead>
           <tbody>
@@ -108,11 +110,11 @@
                 </div>
               </td>
               <!-- <td>{{ skuCount }}</td> -->
-              <td style="text-align: center;">{{ data.title }}</td>
               <td style="text-align: center;">{{ data.productAttributeName }}</td>
-              <td style="text-align: center;" class="finlly-price">
-                {{ data.deliveryTypeName }}
-              </td>
+              <td style="text-align: center;">{{ data.couponName }}</td>
+              <td style="text-align: center;">{{ data.deliveryTypeName }}</td>
+              <td v-if="data.deliveryType == '1' && data.freightType=='0'" style="text-align: center;">180 积分</td>
+              <td v-if="data.deliveryType == '0'" style="text-align: center;">{{ data.reclaimAddrName }}</td>
             </tr>
           </tbody>
         </table>

+ 7 - 9
src/views/HomeView/MyCenter.vue

@@ -99,14 +99,14 @@
                                     <div v-for="(item,index) in thirdList" :key="index" class="item isVirtual">
                                         <div class="img-wapper">
                                             <el-image
-                                                :src="item.imgUrl"
+                                                :src="item.couponImg"
                                                 class="item-icon"></el-image>
                                         </div>
                                         <div class="main">
-                                            <p class="goods_name">{{ item.title }}</p>
+                                            <p class="goods_name">{{ item.couponName }}</p>
                                             <p class="date">
                                                 兑换截止时间:
-                                                {{ item.endTime }}
+                                                {{ item.enableEndTime }}
                                             </p>
                                             
                                         </div>
@@ -234,14 +234,12 @@ export default {
             })
         },
         getThirdList(){
-            welfareList({status:'1'}).then(response=>{
+            welfareList().then(response=>{
                 const dataList = response.data.data;
                 dataList.forEach(element => {
-                    element.imgUrl = element.relationWelfareVo.imgUrl;
-                    element.title = element.relationWelfareVo.title;
-                    element.startTime = element.relationWelfareVo.startTime;
-                    element.endTime = element.relationWelfareVo.endTime;
-                    element.welfareId = element.relationWelfareVo.welfareId;
+                    element.couponImg = element.couponVo.couponImg;
+                    element.couponName = element.couponVo.couponName;
+                    element.enableEndTime = element.couponVo.enableEndTime;
                 });
                 this.thirdList = dataList;
             })

+ 6 - 6
src/views/HomeView/RedeemView.vue

@@ -496,14 +496,14 @@ export default {
         const skuId = this.$route.query.id;
         this.dataForm.skuId = skuId;
         this.getInfo(skuId);
-        this.getCouponList();
+        this.getCouponList(skuId);
     },
     methods: {
         changeCouponList(val){
             this.couponName = this.couponList.find(item => item.voucher == val).couponName;
         },
-        getCouponList(){
-            couponList({ actId: this.activeType })
+        getCouponList(id){
+            couponList({ actId: this.activeType,skuId:id })
                     .then((response) => {
                         this.couponList = response.data.data;
                     });
@@ -698,7 +698,7 @@ export default {
             this.dialogVisible = false;
             if (this.deliveryType == "1") {
                 var params = {
-                    voucher:this.data.voucher,
+                    voucher:this.voucher,
                     skuId: this.data.skuId,
                     skuCount: this.skuCount,
                     price: this.data.price,
@@ -715,7 +715,7 @@ export default {
                 };
             } else if (this.deliveryType == "4") {
                 var params = {
-                    voucher:this.data.voucher,
+                    voucher:this.voucher,
                     skuId: this.data.skuId,
                     skuCount: this.skuCount,
                     price: this.data.price,
@@ -727,7 +727,7 @@ export default {
                 };
             } else {
                 var params = {
-                    voucher:this.data.voucher,
+                    voucher:this.voucher,
                     skuId: this.data.skuId,
                     skuCount: this.skuCount,
                     price: this.data.price,