|
|
@@ -28,12 +28,13 @@
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <div class="qrcode">
|
|
|
- <vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
|
+ <div v-if="status == 'NOT_PAID'">
|
|
|
+ <div class="qrcode">
|
|
|
+ <vue-qrcode :value="payUrl" :options="{ width: 140, margin: 1 }" class="code"></vue-qrcode>
|
|
|
+ </div>
|
|
|
+ <div class="qrcode-text">二维码有效时常为5分钟,请尽快支付</div>
|
|
|
+ <!-- <div class="qrcode-text">手机微信扫描二维码下单</div> -->
|
|
|
</div>
|
|
|
- <!-- <div class="qrcode-text">二维码有效时常为5分钟,请尽快支付</div> -->
|
|
|
- <div class="qrcode-text">手机微信扫描二维码下单</div>
|
|
|
</div>
|
|
|
|
|
|
<div class="tips">
|
|
|
@@ -47,9 +48,9 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <!-- <span slot="footer" class="dialog-footer">
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" class="pay" @click="submit">确认</el-button>
|
|
|
- </span> -->
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
@@ -82,16 +83,19 @@ export default {
|
|
|
],
|
|
|
loading: true,
|
|
|
info: {},
|
|
|
- gas: 0
|
|
|
+ gas: 0,
|
|
|
+ id: 0,
|
|
|
+ status: ''
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
- payUrl() {
|
|
|
- return resolveUrl('https://nfttest.9space.vip/wx/payOrder/weixin_pc?id=' + this.info.id);
|
|
|
- },
|
|
|
// payUrl() {
|
|
|
- // return resolveUrl(this.$baseUrl, '9th/payOrder/weixin_pc?id=' + this.info.id);
|
|
|
+ // return resolveUrl('https://nfttest.9space.vip/wx/payOrder/weixin_pc?id=' + this.info.id);
|
|
|
// },
|
|
|
+ payUrl() {
|
|
|
+ return resolveUrl(this.$baseUrl, 'https://nfttest.9space.vip/payOrder/weixin_pc?id=' + this.id);
|
|
|
+ },
|
|
|
+ // https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=2006
|
|
|
money() {
|
|
|
if (this.info.price) {
|
|
|
return add(this.info.price, this.gas);
|
|
|
@@ -102,12 +106,24 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
submit() {
|
|
|
- console.log(this.payUrl);
|
|
|
- console.log(this.info.id);
|
|
|
- console.log(this.$baseUrl);
|
|
|
- if (this.payMethods === 'DCEP') {
|
|
|
- this.wait();
|
|
|
- }
|
|
|
+ // console.log(this.payUrl);
|
|
|
+ // console.log(this.info.id);
|
|
|
+ // console.log(this.$baseUrl);
|
|
|
+ // if (this.payMethods === 'DCEP') {
|
|
|
+ // this.wait();
|
|
|
+ // }
|
|
|
+ this.$http
|
|
|
+ .post('/order/create?collectionId=' + this.$route.query.id + '&qty=1')
|
|
|
+ .then(res => {
|
|
|
+ // console.log(res);
|
|
|
+ this.id = res.id;
|
|
|
+ this.status = res.status;
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
init(info) {
|
|
|
this.checkLogin()
|