|
|
@@ -162,19 +162,24 @@ export default {
|
|
|
return Promise.resolve();
|
|
|
}),
|
|
|
this.$http.get('/sysConfig/get/enable_H5').then(res => {
|
|
|
- if (res.name === 'enable_H5') {
|
|
|
+ if (!res.value) {
|
|
|
+ this.payType = 'H5PAY';
|
|
|
this.payInfos = [
|
|
|
- {
|
|
|
- icon: require('@assets/svgs/zhifubao.svg'),
|
|
|
- name: '支付宝',
|
|
|
- type: 'ALIPAY'
|
|
|
- },
|
|
|
{
|
|
|
icon: require('@assets/icon_yinlian.png'),
|
|
|
name: '银联快捷付',
|
|
|
type: 'H5PAY'
|
|
|
}
|
|
|
- ];
|
|
|
+ ]
|
|
|
+ } else {
|
|
|
+ this.payType = 'ALIPAY';
|
|
|
+ this.payInfos = [
|
|
|
+ {
|
|
|
+ icon: require('@assets/svgs/zhifubao.svg'),
|
|
|
+ name: '支付宝',
|
|
|
+ type: 'ALIPAY'
|
|
|
+ }
|
|
|
+ ]
|
|
|
}
|
|
|
}),
|
|
|
inWeixin
|
|
|
@@ -190,14 +195,14 @@ export default {
|
|
|
return Promise.resolve();
|
|
|
})
|
|
|
]).then(() => {
|
|
|
- if (!(this.enable_wx_lite || this.enable_wx_pub)) {
|
|
|
- // this.payInfos.splice(1, 1);
|
|
|
- this.payType = 'ALIPAY';
|
|
|
- } else if (this.enable_wx_pub) {
|
|
|
- this.payChannel = 'wx_pub';
|
|
|
- } else {
|
|
|
- this.payChannel = 'wx_lite';
|
|
|
- }
|
|
|
+ // if (!(this.enable_wx_lite || this.enable_wx_pub)) {
|
|
|
+ // this.payInfos.splice(1, 1);
|
|
|
+ // this.payType = 'ALIPAY';
|
|
|
+ // } else if (this.enable_wx_pub) {
|
|
|
+ // this.payChannel = 'wx_pub';
|
|
|
+ // } else {
|
|
|
+ // this.payChannel = 'wx_lite';
|
|
|
+ // }
|
|
|
});
|
|
|
this.$toast.loading({
|
|
|
message: '加载中...',
|
|
|
@@ -332,7 +337,6 @@ export default {
|
|
|
.get('/order/createResult', { id: res.id })
|
|
|
.then(res => {
|
|
|
if (res) {
|
|
|
- console.log('1212212是个顺丰到付', res);
|
|
|
clearInterval(this.createOrderTimer);
|
|
|
this.createOrderTimer = null;
|
|
|
if (res.success) {
|
|
|
@@ -389,7 +393,6 @@ export default {
|
|
|
pay(saveOrder = true) {
|
|
|
this.paySubmit(saveOrder).then(() => {
|
|
|
if (this.money) {
|
|
|
- console.log("1321221",this.payType)
|
|
|
this.$nextTick(() => {
|
|
|
if (this.$store.state.review) {
|
|
|
window.store.order('358');
|
|
|
@@ -439,10 +442,29 @@ export default {
|
|
|
this.getOrder(true);
|
|
|
}
|
|
|
} else if (this.payType === 'H5PAY') {
|
|
|
- console.log('12sssgsgfa');
|
|
|
+ // this.$http
|
|
|
+ // .get(`/payOrder/v2/sandQuick?id=${this.orderId}`)
|
|
|
+ // .then(res => {
|
|
|
+ // this.$toast.clear();
|
|
|
+ // this.hrefUrl = 'alipays://platformapi/startapp?saId=10000007&qrcode=' + res;
|
|
|
+ // resolve();
|
|
|
+ // })
|
|
|
+ // .catch(e => {
|
|
|
+ // if (e && e.error) {
|
|
|
+ // this.$toast.clear();
|
|
|
+ // this.$dialog
|
|
|
+ // .alert({
|
|
|
+ // title: '提示',
|
|
|
+ // message: this.backReson(e.error)
|
|
|
+ // })
|
|
|
+ // .then(res => {
|
|
|
+ // this.$router.back();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // });
|
|
|
document.location.href = resolveUrl(
|
|
|
this.$baseUrl,
|
|
|
- '/payOrder/v2/sandQuick?id=' + this.orderId
|
|
|
+ '/payOrder/sandQuick?id=' + this.orderId
|
|
|
);
|
|
|
}
|
|
|
});
|
|
|
@@ -457,7 +479,6 @@ export default {
|
|
|
paySubmit(saveOrder = true) {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
if (this.money && saveOrder) {
|
|
|
- console.log("778888888",this.payType)
|
|
|
this.$toast.clear();
|
|
|
this.$router.replace({ query: { ...this.$route.query, orderId: this.orderId } });
|
|
|
this.$nextTick(() => {
|