|
|
@@ -233,10 +233,16 @@ export default {
|
|
|
})
|
|
|
.then(() => {
|
|
|
if (res.status === 'CANCELLED') {
|
|
|
- this.$router.push({ path: '/assetDetail', query: { id: this.info.id, collectionStatus: res.status} })
|
|
|
+ this.$router.push({
|
|
|
+ path: '/assetDetail',
|
|
|
+ query: { id: this.info.id, collectionStatus: res.status }
|
|
|
+ });
|
|
|
this.$router.go(-2);
|
|
|
} else {
|
|
|
- this.$router.push({ path: '/assetDetail', query: { id: this.info.id, collectionStatus: res.status} })
|
|
|
+ this.$router.push({
|
|
|
+ path: '/assetDetail',
|
|
|
+ query: { id: this.info.id, collectionStatus: res.status }
|
|
|
+ });
|
|
|
this.$router.go(-2);
|
|
|
}
|
|
|
// on close
|
|
|
@@ -259,104 +265,153 @@ export default {
|
|
|
forbidClick: true
|
|
|
});
|
|
|
this.$http
|
|
|
- .post('/user/verifyTradeCode', {
|
|
|
- tradeCode: this.password
|
|
|
+ .post('/asset/gift', {
|
|
|
+ assetId: this.$route.query.id,
|
|
|
+ toUserId: this.$route.query.toUserId
|
|
|
})
|
|
|
- .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) {
|
|
|
- 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.getOrder(true);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
+ .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();
|
|
|
});
|
|
|
- }
|
|
|
- } 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.$toast.loading({
|
|
|
+ message: '加载中...',
|
|
|
+ forbidClick: true
|
|
|
});
|
|
|
- } else {
|
|
|
- document.location.replace(
|
|
|
- resolveUrl(this.$baseUrl, 'payOrder/gift/weixin_h5?id=' + res.id)
|
|
|
- );
|
|
|
- }
|
|
|
+ this.getOrder(true);
|
|
|
+ })
|
|
|
+ .catch(e => {
|
|
|
+ if (e.error) {
|
|
|
+ this.$toast(e.error);
|
|
|
+ }
|
|
|
+ });
|
|
|
}
|
|
|
- });
|
|
|
- })
|
|
|
- .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('失败点击忘记密码进行修改');
|
|
|
+ this.$toast(e.error);
|
|
|
}
|
|
|
});
|
|
|
+ // this.$http
|
|
|
+ // .post('/user/verifyTradeCode', {
|
|
|
+ // tradeCode: this.password
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+
|
|
|
+ // })
|
|
|
+ // .catch(e => {
|
|
|
+ // if (e) {
|
|
|
+ // this.$toast('失败点击忘记密码进行修改');
|
|
|
+ // }
|
|
|
+ // });
|
|
|
}
|
|
|
},
|
|
|
beforeUnmount() {
|
|
|
@@ -425,7 +480,7 @@ export default {
|
|
|
.gift_confirmation_top_three_text2 {
|
|
|
margin-right: 5px;
|
|
|
}
|
|
|
- .gift_confirmation_top_three_img{
|
|
|
+ .gift_confirmation_top_three_img {
|
|
|
width: 16px;
|
|
|
height: 16px;
|
|
|
margin-top: 2px;
|
|
|
@@ -572,23 +627,23 @@ export default {
|
|
|
color: #ffffff;
|
|
|
line-height: 24px;
|
|
|
}
|
|
|
- .add_bank_card_img_one{
|
|
|
+ .add_bank_card_img_one {
|
|
|
width: 24px;
|
|
|
height: 24px;
|
|
|
margin-right: 10px;
|
|
|
}
|
|
|
}
|
|
|
- .add_bank_card_img_two{
|
|
|
- width: 22px;
|
|
|
- height: 22px;
|
|
|
- }
|
|
|
+ .add_bank_card_img_two {
|
|
|
+ width: 22px;
|
|
|
+ height: 22px;
|
|
|
+ }
|
|
|
}
|
|
|
.payment_method_con {
|
|
|
font-size: 14px;
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
font-weight: 500;
|
|
|
color: #ffffff;
|
|
|
- .choose-icon{
|
|
|
+ .choose-icon {
|
|
|
width: 22px;
|
|
|
height: 22px;
|
|
|
}
|