panhui 4 lat temu
rodzic
commit
d8bebe7854

+ 1 - 1
src/components/order/OrderInfoAct.vue

@@ -29,7 +29,7 @@
                 <img src="../../assets/icon_inter1.png" alt="" />
             </div>
         </div>
-        <div class="tips">订单时间: {{ info.cancelTime }}</div>
+        <div class="tips">订单时间: {{ info.createdAt }}</div>
         <!-- <div class="total-price">
             <span class="time flex1">{{ info.payTime }}</span>
             <span>实际支付</span>

+ 20 - 33
src/views/activity/ChooseProduct.vue

@@ -79,7 +79,8 @@ export default {
             chooseIds: [],
             needChoose: 3,
             search: '',
-            activityId: 0
+            activityId: 0,
+            info: {}
         };
     },
     computed: {
@@ -104,6 +105,7 @@ export default {
             this.$http.get('/mintActivity/get/' + this.$route.query.activityId).then(res => {
                 this.needChoose = res.num;
                 this.search = res.collectionName;
+                this.info = res;
                 this.getList();
             });
         } else {
@@ -136,7 +138,7 @@ export default {
             if (chooseIds.includes(id)) {
                 let index = chooseIds.indexOf(id);
                 chooseIds.splice(index, 1);
-            } else if (this.chooseIds.length < this.needChoose) {
+            } else if (this.chooseIds.length < this.needChoose || this.needChoose === 0) {
                 chooseIds.push(id);
             } else if (this.chooseIds.length == this.needChoose) {
                 this.$toast(`只能选择${this.needChoose}个藏品`);
@@ -157,42 +159,27 @@ export default {
         goHome() {
             this.$router.push('/home');
         },
-        submit() {
-            this.$dialog
-                .confirm({
+        checkTips() {
+            if (this.info.consume) {
+                return this.$dialog.confirm({
                     title: '提示',
                     message: `兑换后选择的藏品将被销毁,确认将选择的藏品进行兑换吗?`,
                     allowHtml: true
-                })
-                .then(() => {
-                    if (this.activityId) {
-                        this.$router.push({
-                            path: '/activitySubmit',
-                            query: {
-                                assets: this.chooseIds.join(','),
-                                activityId: this.activityId
-                            }
-                        });
-                    } else {
-                        this.$toast.loading({
-                            message: '加载中...',
-                            forbidClick: true
-                        });
-                        this.$http
-                            .post('/mintOrder/create', {
-                                assets: this.chooseIds.join(',')
-                            })
-                            .then(res => {
-                                this.$toast.clear();
-                                this.submitSuc();
-                            })
-                            .catch(e => {
-                                if (e && e.error) {
-                                    this.$toast(e.error);
-                                }
-                            });
+                });
+            } else {
+                return Promise.resolve();
+            }
+        },
+        submit() {
+            this.checkTips().then(() => {
+                this.$router.push({
+                    path: '/activitySubmit',
+                    query: {
+                        assets: this.chooseIds.join(','),
+                        activityId: this.activityId
                     }
                 });
+            });
         }
     }
 };

+ 2 - 2
src/views/activity/List1.vue

@@ -80,7 +80,7 @@ export default {
         background-position: top;
         background-size: 100% 500px;
         background-repeat: no-repeat;
-        // top: 50px;
+        top: 50px;
     }
 }
 .activity {
@@ -133,6 +133,6 @@ export default {
     padding: 13px 0;
     text-align: center;
     position: relative;
-    background-color: #18181833;
+    background-color: #181818;
 }
 </style>

+ 2 - 2
src/views/activity/Submit.vue

@@ -18,8 +18,8 @@
         </div>
         <div class="assets">
             <div class="assets-title">
-                <div class="text1">藏品权益使用—铸造</div>
-                <div class="text2">商品的铸造将会销毁对应藏品,请谨慎选择</div>
+                <div class="text1">{{ info.name }}</div>
+                <div class="text2" v-if="info.airDrop">商品的铸造将会销毁对应藏品,请谨慎选择</div>
             </div>
 
             <div class="assets-product" v-for="item in list" :key="item.id">