shish 1 год назад
Родитель
Сommit
b5147a2b54
2 измененных файлов с 32 добавлено и 33 удалено
  1. 2 2
      mallApp/src/pages/balance/changeList.vue
  2. 30 31
      mallApp/src/pages/member/recharge.vue

+ 2 - 2
mallApp/src/pages/balance/changeList.vue

@@ -69,8 +69,8 @@
                 this.$util.pageTo({ url: '/pages/order/detail?id='+item.refundOrderId})
             },
             async init(){
-                let id = this.option.id ? this.option.id : 0
-                const res = await getBalanceChangeList({ page:this.list.page,customId:id })
+                let hdId = this.option.hdId ? this.option.hdId : 0
+                const res = await getBalanceChangeList({ page:this.list.page,hdId:hdId })
                 if (this.$util.isEmpty(res.data.list)){
                     this.completes(res)
                     return

+ 30 - 31
mallApp/src/pages/member/recharge.vue

@@ -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()