|
@@ -574,7 +574,13 @@
|
|
collage_id: 0,
|
|
collage_id: 0,
|
|
goodsList: [],
|
|
goodsList: [],
|
|
tableId: 0,
|
|
tableId: 0,
|
|
- codeData: {}
|
|
|
|
|
|
+ codeData: {},
|
|
|
|
+ // #ifdef APP
|
|
|
|
+ showAppHistary: false,
|
|
|
|
+ // #endif
|
|
|
|
+ // #ifndef APP
|
|
|
|
+ showAppHistary: true,
|
|
|
|
+ // #endif
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: mapGetters(['isLogin']),
|
|
computed: mapGetters(['isLogin']),
|
|
@@ -670,6 +676,11 @@
|
|
})
|
|
})
|
|
this.timeranges = arrayNew;
|
|
this.timeranges = arrayNew;
|
|
},
|
|
},
|
|
|
|
+ // #ifdef APP
|
|
|
|
+ onReady() {
|
|
|
|
+ this.showAppHistary = uni.getStorageSync('showAppHistary')||false
|
|
|
|
+ },
|
|
|
|
+ // #endif
|
|
methods: {
|
|
methods: {
|
|
// #ifdef MP
|
|
// #ifdef MP
|
|
// 桌码信息
|
|
// 桌码信息
|
|
@@ -1254,11 +1265,15 @@
|
|
.product_type == 4) ? 0 : 1);
|
|
.product_type == 4) ? 0 : 1);
|
|
//微信支付是否开启
|
|
//微信支付是否开启
|
|
that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
|
|
that.cartArr[0].payStatus = res.data.pay_weixin_open || 0
|
|
|
|
+ // #ifdef APP
|
|
|
|
+ that.cartArr[0].payStatus = this.showAppHistary ? 1 : 0;
|
|
|
|
+ // #endif
|
|
//支付宝是否开启
|
|
//支付宝是否开启
|
|
that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
|
|
that.cartArr[1].payStatus = res.data.ali_pay_status || 0;
|
|
//#ifdef MP
|
|
//#ifdef MP
|
|
that.cartArr[1].payStatus = 0;
|
|
that.cartArr[1].payStatus = 0;
|
|
//#endif
|
|
//#endif
|
|
|
|
+
|
|
//余额支付是否开启
|
|
//余额支付是否开启
|
|
// that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
|
|
// that.cartArr[2].title = '可用余额:' + res.data.userInfo.now_money;
|
|
that.cartArr[2].number = res.data.userInfo.now_money;
|
|
that.cartArr[2].number = res.data.userInfo.now_money;
|
|
@@ -1411,59 +1426,6 @@
|
|
switch (status) {
|
|
switch (status) {
|
|
case 'ORDER_EXIST':
|
|
case 'ORDER_EXIST':
|
|
case 'EXTEND_ORDER':
|
|
case 'EXTEND_ORDER':
|
|
- case "LAKALA_PAY":
|
|
|
|
- // #ifdef MP
|
|
|
|
- wx.navigateToMiniProgram({
|
|
|
|
- appId: 'wx889424d565967811',
|
|
|
|
- path: `payment-cashier/pages/checkout/index?source=WECHATMINI&counterUrl=${
|
|
|
|
- encodeURIComponent(res.data.result.counter_url)
|
|
|
|
- }`,
|
|
|
|
- envVersion: 'release',
|
|
|
|
- // release: 正式版 trial: 体验版
|
|
|
|
- success(res) {
|
|
|
|
- // 打开成功
|
|
|
|
- // return that.$util.Tips({
|
|
|
|
- // title: '支付成功',
|
|
|
|
- // icon: 'success'
|
|
|
|
- // }, {
|
|
|
|
- // tab: 4,
|
|
|
|
- // url: goPages
|
|
|
|
- // });
|
|
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/goods/order_details/index?order_id=' +
|
|
|
|
- orderId
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- complete() {
|
|
|
|
- uni.hideLoading();
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- // #endif
|
|
|
|
- // #ifdef H5
|
|
|
|
- window.location.href = res.data.result.counter_url;
|
|
|
|
- // #endif
|
|
|
|
- // #ifdef APP
|
|
|
|
-
|
|
|
|
- plus.share.getServices((res)=>{
|
|
|
|
- console.log(JSON.stringify(res));
|
|
|
|
- let sweixin = res.find(i=>i.id==='weixin');
|
|
|
|
- if(sweixin){
|
|
|
|
- sweixin.launchMiniProgram({
|
|
|
|
- id: res.data.result.id,
|
|
|
|
- userName:'',
|
|
|
|
- path:res.data.result.counter_url,
|
|
|
|
- type:0,//0正式1测试2体验
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- // plus.runtime.openURL(
|
|
|
|
- // res.data.result.counter_url
|
|
|
|
- // );
|
|
|
|
- // #endif
|
|
|
|
- break;
|
|
|
|
case 'PAY_ERROR':
|
|
case 'PAY_ERROR':
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
return that.$util.Tips({
|
|
return that.$util.Tips({
|
|
@@ -1696,6 +1658,59 @@
|
|
});
|
|
});
|
|
// #endif
|
|
// #endif
|
|
break;
|
|
break;
|
|
|
|
+ case "LAKALA_PAY":
|
|
|
|
+ // #ifdef MP
|
|
|
|
+ wx.navigateToMiniProgram({
|
|
|
|
+ appId: 'wx889424d565967811',
|
|
|
|
+ path: `payment-cashier/pages/checkout/index?source=WECHATMINI&counterUrl=${
|
|
|
|
+ encodeURIComponent(res.data.result.counter_url)
|
|
|
|
+ }`,
|
|
|
|
+ envVersion: 'release',
|
|
|
|
+ // release: 正式版 trial: 体验版
|
|
|
|
+ success(res) {
|
|
|
|
+ // 打开成功
|
|
|
|
+ // return that.$util.Tips({
|
|
|
|
+ // title: '支付成功',
|
|
|
|
+ // icon: 'success'
|
|
|
|
+ // }, {
|
|
|
|
+ // tab: 4,
|
|
|
|
+ // url: goPages
|
|
|
|
+ // });
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/goods/order_details/index?order_id=' +
|
|
|
|
+ orderId
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ complete() {
|
|
|
|
+ uni.hideLoading();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ // #endif
|
|
|
|
+ // #ifdef H5
|
|
|
|
+ window.location.href = res.data.result.counter_url;
|
|
|
|
+ // #endif
|
|
|
|
+ // #ifdef APP
|
|
|
|
+
|
|
|
|
+ plus.share.getServices((res) => {
|
|
|
|
+ console.log(JSON.stringify(res));
|
|
|
|
+ let sweixin = res.find(i => i.id === 'weixin');
|
|
|
|
+ if (sweixin) {
|
|
|
|
+ sweixin.launchMiniProgram({
|
|
|
|
+ id: res.data.result.id,
|
|
|
|
+ userName: '',
|
|
|
|
+ path: res.data.result.counter_url,
|
|
|
|
+ type: 0, //0正式1测试2体验
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // plus.runtime.openURL(
|
|
|
|
+ // res.data.result.counter_url
|
|
|
|
+ // );
|
|
|
|
+ // #endif
|
|
|
|
+ break;
|
|
}
|
|
}
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|