|
|
@@ -76,20 +76,22 @@ export default {
|
|
|
info: {},
|
|
|
message: '',
|
|
|
password: '',
|
|
|
- // payType: inWeixin ? 'WEIXIN' : 'ALIPAY',
|
|
|
- payType: 'ALIPAY',
|
|
|
+ enable_wx_lite: false,
|
|
|
+ enable_wx_pub: false,
|
|
|
+ payType: inWeixin ? 'WEIXIN' : 'ALIPAY',
|
|
|
+ // payType: 'ALIPAY',
|
|
|
payInfos: [
|
|
|
{
|
|
|
icon: require('@assets/svgs/zhifubao.svg'),
|
|
|
name: '支付宝',
|
|
|
type: 'ALIPAY'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ icon: require('@assets/svgs/wechat.svg'),
|
|
|
+ name: '微信',
|
|
|
+ type: 'WEIXIN'
|
|
|
}
|
|
|
// {
|
|
|
- // icon: require('@assets/svgs/wechat.svg'),
|
|
|
- // name: '微信',
|
|
|
- // type: 'WEIXIN'
|
|
|
- // }
|
|
|
- // {
|
|
|
// icon: require("@assets/svgs/png-decp.svg"),
|
|
|
// name: "DCEP",
|
|
|
// },
|
|
|
@@ -116,9 +118,6 @@ export default {
|
|
|
},
|
|
|
mounted() {
|
|
|
this.passFn();
|
|
|
- this.$http.get('/sysConfig/get/gas_fee').then(res => {
|
|
|
- this.gas = res.value;
|
|
|
- });
|
|
|
this.$toast.loading({
|
|
|
message: '加载中...',
|
|
|
forbidClick: true
|
|
|
@@ -130,6 +129,32 @@ export default {
|
|
|
console.log(this.info);
|
|
|
});
|
|
|
}
|
|
|
+
|
|
|
+ Promise.all([
|
|
|
+ this.$http.get('/sysConfig/get/gas_fee').then(res => {
|
|
|
+ this.gas = res.value;
|
|
|
+ return Promise.resolve();
|
|
|
+ }),
|
|
|
+ inWeixin
|
|
|
+ ? this.$http.get('/sysConfig/get/enable_wx_pub').then(res => {
|
|
|
+ this.enable_wx_pub = res.value === '1';
|
|
|
+ return Promise.resolve();
|
|
|
+ })
|
|
|
+ : Promise.resolve(),
|
|
|
+ this.$http.get('/sysConfig/get/enable_wx_lite').then(res => {
|
|
|
+ this.enable_wx_lite = res.value === '1';
|
|
|
+ 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';
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
passFn() {
|