|
@@ -59,9 +59,24 @@
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- <div v-if="status == 'NOT_PAID'">
|
|
|
|
|
|
|
+ <!-- <div v-if="status === 'NOT_PAID'">
|
|
|
|
|
+ <vue-qrcode :value="payUrl2" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
|
|
|
+ </div> -->
|
|
|
|
|
+
|
|
|
|
|
+ <div v-if="status === 'NOT_PAID'">
|
|
|
<div class="qrcode">
|
|
<div class="qrcode">
|
|
|
- <vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
|
|
|
|
|
+ <vue-qrcode
|
|
|
|
|
+ v-if="payMethods === 'WEIXIN'"
|
|
|
|
|
+ :value="payUrl"
|
|
|
|
|
+ :options="{ width: 140, margin: 1 }"
|
|
|
|
|
+ class="code"
|
|
|
|
|
+ ></vue-qrcode>
|
|
|
|
|
+ <vue-qrcode
|
|
|
|
|
+ v-if="payMethods === 'ALIPAY'"
|
|
|
|
|
+ :value="payUrl2"
|
|
|
|
|
+ :options="{ width: 140, margin: 1 }"
|
|
|
|
|
+ class="code"
|
|
|
|
|
+ ></vue-qrcode>
|
|
|
</div>
|
|
</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
|
|
@@ -69,7 +84,6 @@
|
|
|
>0</span
|
|
>0</span
|
|
|
>{{ seconds }} 请尽快支付
|
|
>{{ seconds }} 请尽快支付
|
|
|
</h3>
|
|
</h3>
|
|
|
- <!-- <div class="qrcode-text">手机微信扫描二维码下单</div> -->
|
|
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
@@ -151,12 +165,12 @@ export default {
|
|
|
icon: require('../assets/weixin.png'),
|
|
icon: require('../assets/weixin.png'),
|
|
|
name: '微信',
|
|
name: '微信',
|
|
|
type: 'WEIXIN'
|
|
type: 'WEIXIN'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ icon: require('../assets/alipay.png'),
|
|
|
|
|
+ name: '支付宝',
|
|
|
|
|
+ type: 'ALIPAY'
|
|
|
}
|
|
}
|
|
|
- // {
|
|
|
|
|
- // icon: require('../assets/alipay.png'),
|
|
|
|
|
- // name: '支付宝',
|
|
|
|
|
- // type: 'ALIPAY'
|
|
|
|
|
- // },
|
|
|
|
|
|
|
|
|
|
// {
|
|
// {
|
|
|
// icon: require('../assets/dcep.png'),
|
|
// icon: require('../assets/dcep.png'),
|
|
@@ -168,10 +182,12 @@ export default {
|
|
|
info: {},
|
|
info: {},
|
|
|
gas: 0,
|
|
gas: 0,
|
|
|
id: 0,
|
|
id: 0,
|
|
|
- status: ''
|
|
|
|
|
|
|
+ status: '',
|
|
|
|
|
+ payUrl2: ''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
|
|
+ // 微信
|
|
|
payUrl() {
|
|
payUrl() {
|
|
|
return resolveUrl(
|
|
return resolveUrl(
|
|
|
this.$baseUrl,
|
|
this.$baseUrl,
|
|
@@ -327,19 +343,37 @@ export default {
|
|
|
this.$http
|
|
this.$http
|
|
|
.post(url)
|
|
.post(url)
|
|
|
.then(res => {
|
|
.then(res => {
|
|
|
- if (this.money) {
|
|
|
|
|
- // 没有代金券
|
|
|
|
|
- this.initTime(res.id, res.createdAt);
|
|
|
|
|
- this.status = res.status;
|
|
|
|
|
- this.id = res.id;
|
|
|
|
|
- this.payWatch();
|
|
|
|
|
- } else {
|
|
|
|
|
- // 有代金券
|
|
|
|
|
|
|
+ // 代金券
|
|
|
|
|
+ if (!this.money) {
|
|
|
this.$message.success('支付成功');
|
|
this.$message.success('支付成功');
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.$router.replace('/collectionorder');
|
|
this.$router.replace('/collectionorder');
|
|
|
}, 1000);
|
|
}, 1000);
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this.payMethods === 'WEIXIN') {
|
|
|
|
|
+ if (this.money) {
|
|
|
|
|
+ // 没有代金券
|
|
|
|
|
+ this.initTime(res.id, res.createdAt);
|
|
|
|
|
+ this.status = res.status;
|
|
|
|
|
+ this.id = res.id;
|
|
|
|
|
+ this.payWatch();
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (this.money) {
|
|
|
|
|
+ // 没有代金券
|
|
|
|
|
+ this.initTime(res.id, res.createdAt);
|
|
|
|
|
+ this.status = res.status;
|
|
|
|
|
+ this.id = res.id;
|
|
|
|
|
+ this.payWatch();
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$http
|
|
|
|
|
+ .get('/payOrder/alipay_qr', {
|
|
|
|
|
+ id: res.id
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(res => {
|
|
|
|
|
+ this.payUrl2 = res;
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
.catch(e => {
|
|
.catch(e => {
|
|
|
if (e) {
|
|
if (e) {
|