|
@@ -3,7 +3,7 @@
|
|
|
<el-dialog center title="支付订单" :visible.sync="show" width="680px" :before-close="handleClose">
|
|
<el-dialog center title="支付订单" :visible.sync="show" width="680px" :before-close="handleClose">
|
|
|
<div class="page" v-loading="loading">
|
|
<div class="page" v-loading="loading">
|
|
|
<div v-if="list2">
|
|
<div v-if="list2">
|
|
|
- <div>选择兑换券</div>
|
|
|
|
|
|
|
+ <div class="title">选择兑换券</div>
|
|
|
<div class="coupon" @click="choose(list2)">
|
|
<div class="coupon" @click="choose(list2)">
|
|
|
<div class="coupon-top">
|
|
<div class="coupon-top">
|
|
|
<div class="text1">{{ list2.name }}</div>
|
|
<div class="text1">{{ list2.name }}</div>
|
|
@@ -21,7 +21,7 @@
|
|
|
<img v-else class="icon" src="../assets/icon_gouxuan_huise.png" alt="" />
|
|
<img v-else class="icon" src="../assets/icon_gouxuan_huise.png" alt="" />
|
|
|
<el-empty v-if="empty" description="暂无兑换券哦~" />
|
|
<el-empty v-if="empty" description="暂无兑换券哦~" />
|
|
|
</div>
|
|
</div>
|
|
|
- <div @click="all">查看更多</div>
|
|
|
|
|
|
|
+ <div class="all" @click="all">查看更多</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="info">
|
|
<div class="info">
|
|
@@ -55,7 +55,6 @@
|
|
|
<div class="qrcode">
|
|
<div class="qrcode">
|
|
|
<vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
<vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
|
</div>
|
|
</div>
|
|
|
- <!-- <div class="qrcode-text">二维码有效时常为5分钟,请尽快支付</div> -->
|
|
|
|
|
<h3 class="qrcode-text">
|
|
<h3 class="qrcode-text">
|
|
|
二维码有效时常为5分钟,<span v-if="minters < 10">0</span>{{ minters }}分<span
|
|
二维码有效时常为5分钟,<span v-if="minters < 10">0</span>{{ minters }}分<span
|
|
|
v-if="seconds < 10"
|
|
v-if="seconds < 10"
|
|
@@ -96,9 +95,6 @@
|
|
|
<span>有效期至:{{ item.expiration }}</span>
|
|
<span>有效期至:{{ item.expiration }}</span>
|
|
|
<span v-if="!item.limited">规定商品可用</span>
|
|
<span v-if="!item.limited">规定商品可用</span>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
- <!-- <img v-if="chooseId === item.id" class="icon" src="../assets/icon_gouxuan_pre.png" alt="" />
|
|
|
|
|
- <img v-else class="icon" src="../assets/icon_gouxuan_huise.png" alt="" /> -->
|
|
|
|
|
<el-empty v-if="empty" description="暂无兑换券哦~" />
|
|
<el-empty v-if="empty" description="暂无兑换券哦~" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -251,8 +247,8 @@ export default {
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- this.list2 = res[0];
|
|
|
|
|
- this.list3 = res;
|
|
|
|
|
|
|
+ this.list2 = res.content[0];
|
|
|
|
|
+ this.list3 = res.content;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
IdFn(e) {
|
|
IdFn(e) {
|
|
@@ -264,6 +260,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
choose(info) {
|
|
choose(info) {
|
|
|
// console.log(info);
|
|
// console.log(info);
|
|
|
|
|
+
|
|
|
this.chooseId = info.id;
|
|
this.chooseId = info.id;
|
|
|
this.$store.commit('setCouponInfo', info);
|
|
this.$store.commit('setCouponInfo', info);
|
|
|
},
|
|
},
|
|
@@ -277,42 +274,14 @@ export default {
|
|
|
//监控支付状态
|
|
//监控支付状态
|
|
|
if (this.status != 'PROCESSING') {
|
|
if (this.status != 'PROCESSING') {
|
|
|
this.payTimeout = setInterval(() => {
|
|
this.payTimeout = setInterval(() => {
|
|
|
- this.$http
|
|
|
|
|
- .get('/collection/get/' + this.$route.query.id)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res.status === 'PROCESSING') {
|
|
|
|
|
- clearInterval(this.payTimeout);
|
|
|
|
|
- // this.status = res.status;
|
|
|
|
|
- this.show = false;
|
|
|
|
|
- }
|
|
|
|
|
- if (res.type === 'BLIND_BOX') {
|
|
|
|
|
- return this.$http.post(
|
|
|
|
|
- '/blindBoxItem/all',
|
|
|
|
|
- {
|
|
|
|
|
- query: {
|
|
|
|
|
- blindBoxId: res.id
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
- { body: 'json' }
|
|
|
|
|
- );
|
|
|
|
|
- } else {
|
|
|
|
|
- return Promise.resolve();
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- if (res) {
|
|
|
|
|
- this.blindBoxItems = res.content;
|
|
|
|
|
- } else {
|
|
|
|
|
- this.blindBoxItems = [];
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- // this.$http.post(url).then(res => {
|
|
|
|
|
- // if (res.status === 'PROCESSING') {
|
|
|
|
|
- // clearInterval(this.payTimeout);
|
|
|
|
|
- // // this.status = res.status;
|
|
|
|
|
- // this.show = false;
|
|
|
|
|
- // }
|
|
|
|
|
- // });
|
|
|
|
|
|
|
+ this.$http.get('/order/get/' + this.id).then(res => {
|
|
|
|
|
+ console.log(res);
|
|
|
|
|
+ if (res.status === 'PROCESSING') {
|
|
|
|
|
+ clearInterval(this.payTimeout);
|
|
|
|
|
+ // this.status = res.status;
|
|
|
|
|
+ this.show = false;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -320,34 +289,34 @@ export default {
|
|
|
// console.log(this.$baseUrl);
|
|
// console.log(this.$baseUrl);
|
|
|
// if (this.payMethods === 'DCEP') {
|
|
// if (this.payMethods === 'DCEP') {
|
|
|
// this.wait();
|
|
// this.wait();
|
|
|
- // }搞
|
|
|
|
|
|
|
+ // }
|
|
|
let url = '/order/create?collectionId=' + this.$route.query.id + '&qty=1';
|
|
let url = '/order/create?collectionId=' + this.$route.query.id + '&qty=1';
|
|
|
if (this.couponInfo) {
|
|
if (this.couponInfo) {
|
|
|
url += '&couponId=' + this.couponInfo.id;
|
|
url += '&couponId=' + this.couponInfo.id;
|
|
|
}
|
|
}
|
|
|
- this.$http
|
|
|
|
|
- .post(url)
|
|
|
|
|
- .then(res => {
|
|
|
|
|
- // console.log(res)
|
|
|
|
|
- if (this.money) {
|
|
|
|
|
- // 没有代金券
|
|
|
|
|
- this.initTime(res.id, res.createdAt);
|
|
|
|
|
- this.status = res.status;
|
|
|
|
|
- this.id = res.id;
|
|
|
|
|
- this.payWatch();
|
|
|
|
|
- } else {
|
|
|
|
|
- // 有代金券
|
|
|
|
|
- this.$message.success('支付成功');
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- this.$router.replace('/collectionorder');
|
|
|
|
|
- }, 1000);
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- .catch(e => {
|
|
|
|
|
- if (e) {
|
|
|
|
|
- this.$message.error(e.error);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ // this.$http
|
|
|
|
|
+ // .post(url)
|
|
|
|
|
+ // .then(res => {
|
|
|
|
|
+ // // console.log(res)
|
|
|
|
|
+ // if (this.money) {
|
|
|
|
|
+ // // 没有代金券
|
|
|
|
|
+ // this.initTime(res.id, res.createdAt);
|
|
|
|
|
+ // this.status = res.status;
|
|
|
|
|
+ // this.id = res.id;
|
|
|
|
|
+ // this.payWatch();
|
|
|
|
|
+ // } else {
|
|
|
|
|
+ // // 有代金券
|
|
|
|
|
+ // this.$message.success('支付成功');
|
|
|
|
|
+ // setTimeout(() => {
|
|
|
|
|
+ // this.$router.replace('/collectionorder');
|
|
|
|
|
+ // }, 1000);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // })
|
|
|
|
|
+ // .catch(e => {
|
|
|
|
|
+ // if (e) {
|
|
|
|
|
+ // this.$message.error(e.error);
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
},
|
|
},
|
|
|
init(info) {
|
|
init(info) {
|
|
|
this.status = 'Unpaid';
|
|
this.status = 'Unpaid';
|
|
@@ -439,6 +408,9 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.all {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+}
|
|
|
/deep/.el-loading-mask {
|
|
/deep/.el-loading-mask {
|
|
|
background-color: #ffffffee;
|
|
background-color: #ffffffee;
|
|
|
}
|
|
}
|
|
@@ -450,7 +422,7 @@ export default {
|
|
|
background: linear-gradient(135deg, rgba(253, 251, 96, 1), rgba(255, 143, 62, 1));
|
|
background: linear-gradient(135deg, rgba(253, 251, 96, 1), rgba(255, 143, 62, 1));
|
|
|
position: relative;
|
|
position: relative;
|
|
|
padding: 0 10px;
|
|
padding: 0 10px;
|
|
|
- margin: 0 16px 16px;
|
|
|
|
|
|
|
+ margin: 0 0px 16px;
|
|
|
&::after {
|
|
&::after {
|
|
|
content: '';
|
|
content: '';
|
|
|
position: absolute;
|
|
position: absolute;
|
|
@@ -593,14 +565,14 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+.title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #000000;
|
|
|
|
|
+ line-height: 24px;
|
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
|
+}
|
|
|
.payMethods {
|
|
.payMethods {
|
|
|
padding: 30px 0;
|
|
padding: 30px 0;
|
|
|
- .title {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- color: #000000;
|
|
|
|
|
- line-height: 24px;
|
|
|
|
|
- padding-bottom: 20px;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
/deep/.el-radio.is-bordered + .el-radio.is-bordered {
|
|
/deep/.el-radio.is-bordered + .el-radio.is-bordered {
|
|
|
margin-left: 0;
|
|
margin-left: 0;
|