|
|
@@ -21,7 +21,7 @@
|
|
|
<view class="action-buttons">
|
|
|
<view class="action-btn bill-btn" @click="viewHasBill">
|
|
|
<view class="btn-icon bill-icon"></view>
|
|
|
- <text class="btn-text">查看已结</text>
|
|
|
+ <text class="btn-text">已结账单</text>
|
|
|
</view>
|
|
|
<view class="action-btn detail-btn" @click="viewChange">
|
|
|
<view class="btn-icon chart-icon"></view>
|
|
|
@@ -185,34 +185,33 @@ export default {
|
|
|
this.beginInit()
|
|
|
},
|
|
|
beginInit() {
|
|
|
- if(this.option.hdId){
|
|
|
- this.hdId = this.option.hdId?this.option.hdId:0
|
|
|
- this.account = this.option.account?this.option.account:0
|
|
|
- }else{
|
|
|
- //这个获取小程序码扫码后的参数
|
|
|
- if(this.option.scene){
|
|
|
- const scene = decodeURIComponent(this.option.scene);
|
|
|
- var sceneItem = scene.split("&");
|
|
|
- var arr, name, value;
|
|
|
- var sceneArray = new Array();
|
|
|
- for (var i = 0, l = sceneItem.length; i < l; i++) {
|
|
|
- arr = sceneItem[i].split("=");
|
|
|
- name = arr[0];
|
|
|
- value = arr[1];
|
|
|
- sceneArray[name] = value;
|
|
|
- }
|
|
|
- if(sceneArray.s){
|
|
|
- this.account = sceneArray.s
|
|
|
- //将account保存到storage,下面的getHdInfo需要使用,因为是扫码进来的要加这一层
|
|
|
- uni.setStorageSync('account', this.account)
|
|
|
- this.hdId = 0
|
|
|
- }
|
|
|
- if(sceneArray.a){
|
|
|
- //预留参数,后面使用
|
|
|
- let staffId = sceneArray.a
|
|
|
- }
|
|
|
+ //如果有就获取这二个参数
|
|
|
+ this.account = this.option.account?this.option.account:0
|
|
|
+ this.hdId = this.option.hdId?this.option.hdId:0
|
|
|
+ //这个获取小程序码扫码后的参数
|
|
|
+ if(this.option.scene){
|
|
|
+ const scene = decodeURIComponent(this.option.scene);
|
|
|
+ var sceneItem = scene.split("&");
|
|
|
+ var arr, name, value;
|
|
|
+ var sceneArray = new Array();
|
|
|
+ for (var i = 0, l = sceneItem.length; i < l; i++) {
|
|
|
+ arr = sceneItem[i].split("=");
|
|
|
+ name = arr[0];
|
|
|
+ value = arr[1];
|
|
|
+ sceneArray[name] = value;
|
|
|
+ }
|
|
|
+ if(sceneArray.s){
|
|
|
+ this.account = sceneArray.s
|
|
|
+ //将account保存到storage,下面的getHdInfo需要使用,因为是扫码进来的要加这一层
|
|
|
+ uni.setStorageSync('account', this.account)
|
|
|
+ this.hdId = 0
|
|
|
+ }
|
|
|
+ if(sceneArray.a){
|
|
|
+ //预留参数,后面使用
|
|
|
+ let staffId = sceneArray.a
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
getHdInfo({id:this.hdId}).then(res=>{
|
|
|
let that = this
|
|
|
if(res.code == 1){
|
|
|
@@ -314,18 +313,18 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
paySuccess() {
|
|
|
- this.$util.pageTo({url: '/pages/member/rechargeResult?id='+this.hdId+'&salt='+this.salt,type: 2})
|
|
|
+ this.$util.pageTo({url: '/pages/member/rechargeResult?id='+this.hdId+'&salt='+this.salt+'&hdId='+this.hdId,type: 2})
|
|
|
},
|
|
|
payFail() {
|
|
|
},
|
|
|
viewHasBill(){
|
|
|
- this.pageTo({ url:'/pages/settle/list?id='+this.hdId+'&account='+this.account})
|
|
|
+ this.pageTo({ url:'/pages/settle/list?id='+this.hdId+'&account='+this.account+'&hdId='+this.hdId})
|
|
|
},
|
|
|
viewBill() {
|
|
|
- this.pageTo({ url: '/pages/settle/debt?id='+this.hdId+'&account='+this.account})
|
|
|
+ this.pageTo({ url: '/pages/settle/debt?id='+this.hdId+'&account='+this.account+'&hdId='+this.hdId})
|
|
|
},
|
|
|
viewChange() {
|
|
|
- this.pageTo({ url:'/pages/balance/changeList?id='+this.hdId+'&account='+this.account})
|
|
|
+ this.pageTo({ url:'/pages/balance/changeList?id='+this.hdId+'&account='+this.account+'&hdId='+this.hdId})
|
|
|
},
|
|
|
handleConfirmRecharge() {
|
|
|
this.wexinPayFn()
|