|
|
@@ -29,7 +29,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- <div class="transaction_password">
|
|
|
+ <div class="transaction_password">
|
|
|
<div class="transaction_password_one">
|
|
|
<div class="transaction_password_one_title">请输入交易密码</div>
|
|
|
<div class="transaction_password_forget" @click="$router.push('/tradingPassword')">
|
|
|
@@ -37,16 +37,15 @@
|
|
|
<van-divider />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <van-divider />
|
|
|
<div>
|
|
|
- 密码输入框
|
|
|
+ <!-- 密码输入框 -->
|
|
|
<van-password-input
|
|
|
:value="password"
|
|
|
:gutter="10"
|
|
|
:focused="showKeyboard"
|
|
|
@focus="showKeyboard = true"
|
|
|
/>
|
|
|
- 数字键盘
|
|
|
+ <!-- 数字键盘 -->
|
|
|
<van-number-keyboard
|
|
|
v-model="password"
|
|
|
:show="showKeyboard"
|
|
|
@@ -54,11 +53,10 @@
|
|
|
maxlength="6"
|
|
|
theme="custom"
|
|
|
close-button-text="完成"
|
|
|
- random-key-order
|
|
|
/>
|
|
|
</div>
|
|
|
- <div v-else class="text3" @click="$router.push('/tradingPassword')">您当前没有交易密码,点击去设置</div>
|
|
|
- </div> -->
|
|
|
+ <!-- <div class="text3" @click="$router.push('/tradingPassword')">您当前没有交易密码,点击去设置</div> -->
|
|
|
+ </div>
|
|
|
<!-- <div class="additional_costs">
|
|
|
<div class="additional_costs_left">GAS费用</div>
|
|
|
<div class="additional_costs_right">¥{{ gas }}</div>
|
|
|
@@ -265,153 +263,161 @@ export default {
|
|
|
forbidClick: true
|
|
|
});
|
|
|
this.$http
|
|
|
- .post('/asset/gift', {
|
|
|
- assetId: this.$route.query.id,
|
|
|
- toUserId: this.$route.query.toUserId
|
|
|
+ .post('/user/verifyTradeCode', {
|
|
|
+ tradeCode: this.password
|
|
|
})
|
|
|
- .then(res => {
|
|
|
- this.orderId = res.id;
|
|
|
- this.$nextTick(() => {
|
|
|
- if (this.payType === 'ALIPAY') {
|
|
|
- // document.location.replace(
|
|
|
- // resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
|
|
|
- // );
|
|
|
- if (this.inWeixin) {
|
|
|
- if (this.gas === '0') {
|
|
|
- this.$http
|
|
|
- .get('/payOrder/gift/alipay_wx?id=' + res.id)
|
|
|
- .then(res => {
|
|
|
- this.$toast.success('转赠成功');
|
|
|
- this.getOrder(true);
|
|
|
- // setTimeout(() => {
|
|
|
- // this.$router.push({
|
|
|
- // path: '/orderDetail',
|
|
|
- // query: {
|
|
|
- // id: res.id,
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.$router.replace('/orders');
|
|
|
- // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
|
|
|
- // this.$router.replace('/giftOrder/' + order.getId());
|
|
|
- // }, 1000);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
- } else {
|
|
|
- document.location.replace(
|
|
|
- resolveUrl(this.$baseUrl, '/payOrder/gift/alipay_wx?id=' + res.id)
|
|
|
- );
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (this.gas === '0') {
|
|
|
- console.log("131313")
|
|
|
- this.$http
|
|
|
- .get(`/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${res.id}`)
|
|
|
- .then(res => {
|
|
|
- this.$toast.success('转赠成功');
|
|
|
- this.getOrder(true);
|
|
|
- // setTimeout(() => {
|
|
|
- // this.$router.push({
|
|
|
- // path: '/orderDetail',
|
|
|
- // query: {
|
|
|
- // id: res.id,
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.$router.replace('/giftOrder/' + order.getId());
|
|
|
- // this.$router.replace('/orders');
|
|
|
- // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
|
|
|
- // }, 1000);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
- } 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();
|
|
|
- });
|
|
|
+ .then(() => {
|
|
|
+ this.$http
|
|
|
+ .post('/asset/gift', {
|
|
|
+ assetId: this.$route.query.id,
|
|
|
+ toUserId: this.$route.query.toUserId
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ this.orderId = res.id;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ if (this.payType === 'ALIPAY') {
|
|
|
+ // document.location.replace(
|
|
|
+ // resolveUrl(this.$baseUrl, 'payOrder/gift/alipay?id=' + res.id)
|
|
|
+ // );
|
|
|
+ if (this.inWeixin) {
|
|
|
+ if (this.gas === '0') {
|
|
|
+ this.$http
|
|
|
+ .get('/payOrder/gift/alipay_wx?id=' + res.id)
|
|
|
+ .then(res => {
|
|
|
+ this.$toast.success('转赠成功');
|
|
|
+ this.getOrder(true);
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/orderDetail',
|
|
|
+ // query: {
|
|
|
+ // id: res.id,
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // this.$router.replace('/orders');
|
|
|
+ // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
|
|
|
+ // this.$router.replace('/giftOrder/' + order.getId());
|
|
|
+ // }, 1000);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e.error) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ document.location.replace(
|
|
|
+ resolveUrl(this.$baseUrl, '/payOrder/gift/alipay_wx?id=' + res.id)
|
|
|
+ );
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (this.gas === '0') {
|
|
|
+ console.log('131313');
|
|
|
+ this.$http
|
|
|
+ .get(
|
|
|
+ `/payOrder/gift/${this.inApp ? 'alipay_app' : 'alipay_h5'}?id=${
|
|
|
+ res.id
|
|
|
+ }`
|
|
|
+ )
|
|
|
+ .then(res => {
|
|
|
+ this.$toast.success('转赠成功');
|
|
|
+ this.getOrder(true);
|
|
|
+ // setTimeout(() => {
|
|
|
+ // this.$router.push({
|
|
|
+ // path: '/orderDetail',
|
|
|
+ // query: {
|
|
|
+ // id: res.id,
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // this.$router.replace('/giftOrder/' + order.getId());
|
|
|
+ // this.$router.replace('/orders');
|
|
|
+ // document.location.replace("https://www.adcs.vip/9th/giftOrder/223639");
|
|
|
+ // }, 1000);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e.error) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ } 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);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.payType === 'WEIXIN') {
|
|
|
+ if (this.inWeixin) {
|
|
|
+ this.$toast.loading('加载中');
|
|
|
+ this.$http
|
|
|
+ .post('/payOrder/gift/weixin', {
|
|
|
+ id: res.id,
|
|
|
+ openId: localStorage.getItem('openId')
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ console.log({
|
|
|
+ ...res,
|
|
|
+ package: res.package || res.packageValue,
|
|
|
+ timestamp: res.timestamp || res.timeStamp
|
|
|
+ });
|
|
|
+ let _this = this;
|
|
|
+ wx.chooseWXPay({
|
|
|
+ ...res,
|
|
|
+ package: res.package || res.packageValue,
|
|
|
+ timestamp: res.timeStamp,
|
|
|
+ success(res) {
|
|
|
+ _this.$toast.success('支付成功');
|
|
|
+ setTimeout(() => {
|
|
|
+ _this.$router.replace('/orders');
|
|
|
+ }, 1000);
|
|
|
+ },
|
|
|
+ fail(e) {
|
|
|
+ console.log(e);
|
|
|
+ _this.$toast('支付失败,请稍后再试');
|
|
|
+ }
|
|
|
+ });
|
|
|
});
|
|
|
- this.getOrder(true);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
+ } else {
|
|
|
+ document.location.replace(
|
|
|
+ resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
+ });
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e) {
|
|
|
+ this.$toast(e.error);
|
|
|
}
|
|
|
- } else if (this.payType === 'WEIXIN') {
|
|
|
- if (this.inWeixin) {
|
|
|
- this.$toast.loading('加载中');
|
|
|
- this.$http
|
|
|
- .post('/payOrder/gift/weixin', {
|
|
|
- id: res.id,
|
|
|
- openId: localStorage.getItem('openId')
|
|
|
- })
|
|
|
- .then(res => {
|
|
|
- console.log({
|
|
|
- ...res,
|
|
|
- package: res.package || res.packageValue,
|
|
|
- timestamp: res.timestamp || res.timeStamp
|
|
|
- });
|
|
|
- let _this = this;
|
|
|
- wx.chooseWXPay({
|
|
|
- ...res,
|
|
|
- package: res.package || res.packageValue,
|
|
|
- timestamp: res.timeStamp,
|
|
|
- success(res) {
|
|
|
- _this.$toast.success('支付成功');
|
|
|
- setTimeout(() => {
|
|
|
- _this.$router.replace('/orders');
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
- fail(e) {
|
|
|
- console.log(e);
|
|
|
- _this.$toast('支付失败,请稍后再试');
|
|
|
- }
|
|
|
- });
|
|
|
- });
|
|
|
- } else {
|
|
|
- document.location.replace(
|
|
|
- resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
|
|
|
- );
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ });
|
|
|
})
|
|
|
.catch(e => {
|
|
|
if (e) {
|
|
|
- this.$toast(e.error);
|
|
|
+ this.$toast('失败点击忘记密码进行修改');
|
|
|
}
|
|
|
});
|
|
|
- // this.$http
|
|
|
- // .post('/user/verifyTradeCode', {
|
|
|
- // tradeCode: this.password
|
|
|
- // })
|
|
|
- // .then(() => {
|
|
|
-
|
|
|
- // })
|
|
|
- // .catch(e => {
|
|
|
- // if (e) {
|
|
|
- // this.$toast('失败点击忘记密码进行修改');
|
|
|
- // }
|
|
|
- // });
|
|
|
}
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
@@ -549,18 +555,20 @@ export default {
|
|
|
}
|
|
|
.transaction_password {
|
|
|
width: 100%;
|
|
|
- height: 103px;
|
|
|
- background: #29293f;
|
|
|
- border-radius: 8px;
|
|
|
- padding: 10px;
|
|
|
+ // height: 103px;
|
|
|
+ background: #1e222c;
|
|
|
+ border-radius: 4px;
|
|
|
+ padding: 15px;
|
|
|
box-sizing: border-box;
|
|
|
margin-top: 10px;
|
|
|
.transaction_password_one {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- margin-bottom: 4px;
|
|
|
+ padding-bottom: 4px;
|
|
|
+ border-bottom: 1px solid rgba(151, 151, 151, 0.1);
|
|
|
+ opacity: 0.6;
|
|
|
.transaction_password_one_title {
|
|
|
- font-size: 14px;
|
|
|
+ font-size: 12px;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
color: #ffffff;
|
|
|
@@ -570,7 +578,7 @@ export default {
|
|
|
font-size: 12px;
|
|
|
font-family: PingFangSC-Regular, PingFang SC;
|
|
|
font-weight: 400;
|
|
|
- color: #939599;
|
|
|
+ color: #ffffff;
|
|
|
}
|
|
|
}
|
|
|
/deep/ .van-password-input {
|
|
|
@@ -686,6 +694,9 @@ export default {
|
|
|
margin: 10px 0;
|
|
|
}
|
|
|
}
|
|
|
+/deep/ .van-key {
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
.gift_button {
|
|
|
position: fixed;
|
|
|
bottom: 64px;
|