Browse Source

添加兑换确认框

sunlupeng 1 year ago
parent
commit
b6eb08f4c1
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/views/HomeView/RedeemView.vue

+ 2 - 3
src/views/HomeView/RedeemView.vue

@@ -314,7 +314,7 @@
             </div>
         </el-dialog>
         <el-dialog title="兑换确认" :visible.sync="dialogVisible" width="30%">
-            <span>这是一段信息</span>
+            <span>是否确认兑换该物品?</span>
             <span slot="footer" class="dialog-footer">
                 <el-button @click="dialogVisible = false">取 消</el-button>
                 <el-button type="primary" @click="handleClickExchange">确 定</el-button>
@@ -579,6 +579,7 @@ export default {
             });
         },
         submit() {
+            this.dialogVisible = false;
             if (this.deliveryType == "1") {
                 var params = {
                     skuId: this.data.skuId,
@@ -624,7 +625,6 @@ export default {
                     .then((response) => {
                         console.log(response.data.data);
                         this.$store.dispatch("GetUserInfo");
-                        this.dialogVisible = false;
                         this.dialogMsgVisible = true;
                     })
                     .catch(() => { });
@@ -633,7 +633,6 @@ export default {
                     .then((response) => {
                         console.log(response.data.data);
                         this.$store.dispatch("GetUserInfo");
-                        this.dialogVisible = false;
                         this.dialogMsgVisible = true;
                     })
                     .catch(() => { });