panhui 4 ani în urmă
părinte
comite
d1759a9f45

+ 1 - 0
src/main/nine-space/src/components/CouponInfo.vue

@@ -76,6 +76,7 @@ export default {
     margin: 8px;
     display: inline-block;
     width: calc(100% - 36px);
+    overflow: hidden;
     // width: 100%;
     &::after {
         content: '';

+ 6 - 2
src/main/nine-space/src/views/Submit.vue

@@ -65,11 +65,12 @@
 <script>
 const path = require('path');
 import product from '../mixins/product';
+import coupon from '../mixins/coupon';
 import { mapState } from 'vuex';
 let inWeixin = /micromessenger/i.test(navigator.userAgent);
 export default {
     name: 'Submit',
-    mixins: [product],
+    mixins: [product, coupon],
     data() {
         return {
             info: {},
@@ -96,7 +97,8 @@ export default {
             orderId: 0,
             gas: 1,
             inWeixin,
-            couponList: []
+            couponList: [],
+            collectionId: 0
         };
     },
     computed: {
@@ -129,6 +131,7 @@ export default {
             forbidClick: true
         });
         if (this.$route.query.id) {
+            this.collectionId = Number(this.$route.query.id);
             this.$http.get('/collection/get/' + this.$route.query.id).then(res => {
                 this.info = res;
                 setTimeout(() => {
@@ -137,6 +140,7 @@ export default {
 
                 // this.$http('/sysConfig/get/gas_fee')
             });
+            this.getCouponList();
         } else {
             this.$http.get('/order/get/' + this.$route.query.orderId).then(res => {
                 this.info = res;

+ 10 - 1
src/main/nine-space/src/views/order/CouponList.vue

@@ -2,7 +2,13 @@
     <div class="page">
         <van-list class="list" v-model:loading="loading" :finished="finished" finished-text="" @load="getData">
             <template v-for="(item, index) in useList" :key="index">
-                <coupon-info needChoose :collectionId="collectionId" :info="item" @choose="choose"></coupon-info>
+                <coupon-info
+                    needChoose
+                    :chooseId="chooseId"
+                    :collectionId="collectionId"
+                    :info="item"
+                    @choose="choose"
+                ></coupon-info>
             </template>
 
             <van-divider v-if="notUseList.length > 0">不可用兑换券</van-divider>
@@ -56,6 +62,9 @@ export default {
         if (this.$route.query.collectionId) {
             this.collectionId = Number(this.$route.query.collectionId);
         }
+        if (this.couponInfo) {
+            this.chooseId = this.couponInfo.id;
+        }
     },
     methods: {
         choose(info) {