|
@@ -38,7 +38,7 @@ export default class UserIndex extends Vue {
|
|
|
}else{
|
|
|
this.data.model = false;
|
|
|
}
|
|
|
- let isWeiXin = () => { return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1 }
|
|
|
+ let isWeiXin = () => { return navigator.userAgent.toLowerCase().indexOf('micromessenger') !== -1 }
|
|
|
if (isWeiXin()) {
|
|
|
this.data.zhifupay = false
|
|
|
}
|
|
@@ -114,12 +114,29 @@ export default class UserIndex extends Vue {
|
|
|
// platform: 'weixin',
|
|
|
// pay:'wappay'
|
|
|
// });
|
|
|
- let res = await Http.getInstance().getWeixin({
|
|
|
- order_sn: this.data.orderSn,
|
|
|
- platform: 'weixin',
|
|
|
- pay:'wappay'
|
|
|
- });
|
|
|
- console.log(res)
|
|
|
+ // 社保支付
|
|
|
+ // let res = await Http.getInstance().getWeixin({
|
|
|
+ // order_sn: this.data.orderSn,
|
|
|
+ // platform: 'weixin',
|
|
|
+ // pay:'wappay'
|
|
|
+ // });
|
|
|
+ // 合并
|
|
|
+ let res
|
|
|
+ if (this.data.recharfe) {
|
|
|
+ res = await Http.getInstance().getWeixin({
|
|
|
+ order_sn: this.data.orderSn,
|
|
|
+ platform: 'weixin',
|
|
|
+ pay:'wappay'
|
|
|
+ });
|
|
|
+ // console.log('社保支付',res)
|
|
|
+ } else {
|
|
|
+ res = await Http.getInstance().RechargeOrderPay({
|
|
|
+ order_sn: this.data.orderSn,
|
|
|
+ platform: 'weixin',
|
|
|
+ pay:'wappay'
|
|
|
+ });
|
|
|
+ // console.log('卡支付',res)
|
|
|
+ }
|
|
|
|
|
|
window.location.replace(
|
|
|
res.data.mweb_url+'&redirect_url='+encodeURIComponent(window.location.href+'?tip=yes'))
|
|
@@ -141,12 +158,27 @@ export default class UserIndex extends Vue {
|
|
|
// }
|
|
|
}
|
|
|
async alipayment() {
|
|
|
-
|
|
|
- let res = await Http.getInstance().getAlipay({
|
|
|
- order_sn: this.data.orderSn,
|
|
|
- platform: 'alipay',
|
|
|
- pay:'wappay'
|
|
|
- });
|
|
|
+ // 社保
|
|
|
+ // let res = await Http.getInstance().getAlipay({
|
|
|
+ // order_sn: this.data.orderSn,
|
|
|
+ // platform: 'alipay',
|
|
|
+ // pay:'wappay'
|
|
|
+ // });
|
|
|
+ // 合并后
|
|
|
+ let res
|
|
|
+ if (this.data.recharfe) {
|
|
|
+ res = await Http.getInstance().getAlipay({
|
|
|
+ order_sn: this.data.orderSn,
|
|
|
+ platform: 'alipay',
|
|
|
+ pay:'wappay'
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ res = await Http.getInstance().RechargeOrderPay({
|
|
|
+ order_sn: this.data.orderSn,
|
|
|
+ platform: 'alipay',
|
|
|
+ pay:'wappay'
|
|
|
+ });
|
|
|
+ }
|
|
|
console.log(res.data)
|
|
|
this.data.model = true;
|
|
|
this.data.html = res.data
|
|
@@ -161,12 +193,16 @@ export default class UserIndex extends Vue {
|
|
|
let openid = localStorage.getItem('openid');
|
|
|
let res
|
|
|
if (this.data.recharfe) {
|
|
|
+ console.log(123);
|
|
|
+
|
|
|
res = await Http.getInstance().getWeixin({
|
|
|
order_sn: this.data.orderSn, platform: 'weixin', pay: 'wxpay', openid: openid
|
|
|
});
|
|
|
} else {
|
|
|
+ console.log(111);
|
|
|
+
|
|
|
res = await Http.getInstance().RechargeOrderPay({
|
|
|
- order_sn: this.data.orderSn, openid: openid
|
|
|
+ order_sn: this.data.orderSn, platform: 'weixin', pay: 'wxpay', openid: openid
|
|
|
});
|
|
|
}
|
|
|
res.data.jsApiList = ['chooseWXPay'];
|