|
|
@@ -41,7 +41,7 @@
|
|
|
<el-button type="info" @click="copy" size="mini" plain>复制</el-button>
|
|
|
</div>
|
|
|
</div> -->
|
|
|
- <el-form :model="form" ref="rules" label-width="85px" class="demo-ruleForm">
|
|
|
+ <el-form :model="form" :rules="rules" ref="rules" label-width="85px" class="demo-ruleForm">
|
|
|
<div class="title">请输入交易密码,验证信息</div>
|
|
|
<el-form-item prop="password">
|
|
|
<el-input
|
|
|
@@ -72,10 +72,13 @@
|
|
|
<div class="price">
|
|
|
应付金额<span class="span">{{ gas }}</span>
|
|
|
</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>
|
|
|
- <div class="qrcode-text">二维码有效时常为5分钟,请尽快支付</div>
|
|
|
+
|
|
|
<!-- <div class="tips">
|
|
|
<div class="text1">购买须知</div>
|
|
|
<div class="text2">
|
|
|
@@ -87,43 +90,45 @@
|
|
|
</div> -->
|
|
|
</div>
|
|
|
|
|
|
- <!-- <span slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" class="pay" @click="submit">立即支付</el-button>
|
|
|
- </span> -->
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button :disabled="btn" type="primary" class="pay" @click="submit">立即支付</el-button>
|
|
|
+ </span>
|
|
|
</el-dialog>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import vueQrcode from '@chenfengyuan/vue-qrcode';
|
|
|
import resolveUrl from 'resolve-url';
|
|
|
+import phone from '../mixins/phone';
|
|
|
export default {
|
|
|
components: {
|
|
|
vueQrcode
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
- payMethods: 'ALIPAY',
|
|
|
+ payMethods: 'WEIXIN',
|
|
|
show: false,
|
|
|
info: [],
|
|
|
checked: true,
|
|
|
id: 103,
|
|
|
form: { password: '' },
|
|
|
+ status: '',
|
|
|
gas: 0,
|
|
|
rules: {
|
|
|
password: { min: 6, max: 6, message: '密码长度在 6 到 6 个数字', trigger: 'blur' }
|
|
|
},
|
|
|
payList: [
|
|
|
- // {
|
|
|
- // icon: require('../assets/alipay.png'),
|
|
|
- // name: '支付宝',
|
|
|
- // type: 'ALIPAY'
|
|
|
- // },
|
|
|
{
|
|
|
icon: require('../assets/weixin.png'),
|
|
|
name: '微信',
|
|
|
type: 'WEIXIN'
|
|
|
}
|
|
|
// {
|
|
|
+ // icon: require('../assets/alipay.png'),
|
|
|
+ // name: '支付宝',
|
|
|
+ // type: 'ALIPAY'
|
|
|
+ // },
|
|
|
+ // {
|
|
|
// icon: require('../assets/dcep.png'),
|
|
|
// name: 'DCEP支付',
|
|
|
// type: 'DCEP'
|
|
|
@@ -140,12 +145,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
computed: {
|
|
|
+ btn() {
|
|
|
+ if (this.phone && this.form.password) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
payUrl() {
|
|
|
return resolveUrl(this.$baseUrl, '9th/payOrder/weixin_pc?id=' + this.info.id);
|
|
|
}
|
|
|
// payUrl() {
|
|
|
// return resolveUrl(
|
|
|
- // this.$baseUrl,
|
|
|
// 'https://nfttest.9space.vip/wx/redirect?redirectUrl=https://nfttest.9space.vip/payOrder/weixin_pc?id=2006'
|
|
|
// );
|
|
|
// }
|
|
|
@@ -166,7 +177,8 @@ export default {
|
|
|
toUserId: this.id
|
|
|
})
|
|
|
.then(res => {
|
|
|
- console.log(res);
|
|
|
+ this.status = res.status;
|
|
|
+ // console.log(res);
|
|
|
})
|
|
|
.catch(e => {
|
|
|
if (e) {
|
|
|
@@ -176,29 +188,10 @@ export default {
|
|
|
})
|
|
|
.catch(e => {
|
|
|
if (e) {
|
|
|
- this.$message('失败点击忘记密码进行修改');
|
|
|
+ this.$message('交易密码错误');
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
- // init(info) {
|
|
|
- // this.checkLogin()
|
|
|
- // .then(() => {
|
|
|
- // this.show = true;
|
|
|
- // this.loading = true;
|
|
|
- // console.log(this.$route.query.id);
|
|
|
- // // return this.$http.get('/order/get/' + this.$route.query.id);
|
|
|
- // // return this.$http.post('/order/create?collectionId=' + info.id + '&qty=1');
|
|
|
- // })
|
|
|
- // .then(res => {
|
|
|
- // this.orderInfo = res;
|
|
|
- // this.loading = false;
|
|
|
- // })
|
|
|
- // .catch(e => {
|
|
|
- // if (e) {
|
|
|
- // this.$message.warning(e.error);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // },
|
|
|
copy() {
|
|
|
this.$copyText(this.orderInfo.id).then(
|
|
|
e => {
|
|
|
@@ -241,6 +234,9 @@ export default {
|
|
|
/deep/ .el-checkbox__label {
|
|
|
margin-right: 20px;
|
|
|
}
|
|
|
+/deep/ .el-form-item__error {
|
|
|
+ padding-left: 100px;
|
|
|
+}
|
|
|
.qrcode {
|
|
|
text-align: center;
|
|
|
margin-top: 20px;
|