|
|
@@ -280,12 +280,12 @@ export default {
|
|
|
// 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);
|
|
|
+ // 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',
|
|
|
@@ -297,20 +297,19 @@ export default {
|
|
|
// 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)
|
|
|
- );
|
|
|
- }
|
|
|
+ // })
|
|
|
+ // .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=${
|
|
|
@@ -368,42 +367,43 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
}
|
|
|
- } 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)
|
|
|
- );
|
|
|
- }
|
|
|
+ // } 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)
|
|
|
+ // );
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
});
|
|
|
})
|