|
|
@@ -19,13 +19,20 @@
|
|
|
<div class="input">
|
|
|
<div class="text1">请输入交易密码,验证信息</div>
|
|
|
<div v-if="sets">
|
|
|
- <van-password-input :value="password" :focused="showKeyboard" @focus="showKeyboard = true" />
|
|
|
+ <van-password-input
|
|
|
+ :gutter="10"
|
|
|
+ :value="password"
|
|
|
+ :focused="showKeyboard"
|
|
|
+ @focus="showKeyboard = true"
|
|
|
+ />
|
|
|
<!-- 数字键盘 -->
|
|
|
<van-number-keyboard
|
|
|
v-model="password"
|
|
|
:show="showKeyboard"
|
|
|
@blur="showKeyboard = false"
|
|
|
maxlength="6"
|
|
|
+ theme="custom"
|
|
|
+ random-key-order
|
|
|
/>
|
|
|
<div class="text2" @click="$router.push('/tradingPassword')">忘记密码?</div>
|
|
|
</div>
|
|
|
@@ -104,7 +111,8 @@ export default {
|
|
|
hrefUrl: '',
|
|
|
inWeixin,
|
|
|
inApp,
|
|
|
- timer: null
|
|
|
+ timer: null,
|
|
|
+ sets: false
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -118,7 +126,6 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
mounted() {
|
|
|
- this.passFn();
|
|
|
this.$toast.loading({
|
|
|
message: '加载中...',
|
|
|
forbidClick: true
|
|
|
@@ -155,6 +162,8 @@ export default {
|
|
|
} else {
|
|
|
this.payChannel = 'wx_lite';
|
|
|
}
|
|
|
+
|
|
|
+ this.passFn();
|
|
|
});
|
|
|
},
|
|
|
methods: {
|
|
|
@@ -174,6 +183,7 @@ export default {
|
|
|
clearTimeout(this.timer);
|
|
|
}
|
|
|
if (res.status === 'PROCESSING' || res.status === 'FINISH' || res.status === 'CANCELLED') {
|
|
|
+ this.$toast.clear();
|
|
|
this.$dialog
|
|
|
.alert({
|
|
|
title: '提示',
|
|
|
@@ -220,29 +230,38 @@ export default {
|
|
|
// document.location.replace(
|
|
|
// resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
|
|
|
// );
|
|
|
- this.$http
|
|
|
- .get(`/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
|
|
|
- .then(res => {
|
|
|
- this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
|
|
|
- // window.open(
|
|
|
- // 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
|
|
|
- // '_blank'
|
|
|
- // );
|
|
|
- this.$nextTick(() => {
|
|
|
- document.getElementById('pay').click();
|
|
|
- });
|
|
|
+ if (this.inWeixin) {
|
|
|
+ document.location.replace(
|
|
|
+ resolveUrl(this.$baseUrl, '/payOrder/gift/alipay_wx?id=' + res.id)
|
|
|
+ );
|
|
|
+ } else {
|
|
|
+ this.$http
|
|
|
+ .get(
|
|
|
+ `/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.hrefUrl =
|
|
|
+ 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
|
|
|
+ // window.open(
|
|
|
+ // 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res,
|
|
|
+ // '_blank'
|
|
|
+ // );
|
|
|
+ this.$nextTick(() => {
|
|
|
+ document.getElementById('pay').click();
|
|
|
+ });
|
|
|
|
|
|
- this.$toast.loading({
|
|
|
- message: '加载中...',
|
|
|
- forbidClick: true
|
|
|
+ this.$toast.loading({
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true
|
|
|
+ });
|
|
|
+ this.getOrder(true);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e.error) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
});
|
|
|
- this.getOrder(true);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
} else if (this.payType === 'WEIXIN') {
|
|
|
if (this.inWeixin) {
|
|
|
this.$toast.loading('加载中');
|