|
|
@@ -262,36 +262,93 @@ export default {
|
|
|
// 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)
|
|
|
- );
|
|
|
+ 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 {
|
|
|
- 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.gas === '0') {
|
|
|
+ console.log('3333333');
|
|
|
+ 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);
|
|
|
+ }
|
|
|
});
|
|
|
- this.getOrder(true);
|
|
|
- })
|
|
|
- .catch(e => {
|
|
|
- if (e.error) {
|
|
|
- this.$toast(e.error);
|
|
|
- }
|
|
|
- });
|
|
|
+ }
|
|
|
}
|
|
|
} else if (this.payType === 'WEIXIN') {
|
|
|
if (this.inWeixin) {
|
|
|
@@ -489,7 +546,7 @@ export default {
|
|
|
font-family: PingFangSC-Medium, PingFang SC;
|
|
|
font-weight: 500;
|
|
|
color: #ffffff;
|
|
|
- border-bottom: 1px solid rgba(94, 99, 110 ,.2);
|
|
|
+ border-bottom: 1px solid rgba(94, 99, 110, 0.2);
|
|
|
padding-bottom: 10px;
|
|
|
margin-bottom: 10px;
|
|
|
box-sizing: border-box;
|