Parcourir la source

门店充值,购卡

zhanghui il y a 2 ans
Parent
commit
931b7d5c12
2 fichiers modifiés avec 22 ajouts et 4 suppressions
  1. 13 4
      myPages/recharge/index.vue
  2. 9 0
      storePages/rights/index.vue

+ 13 - 4
myPages/recharge/index.vue

@@ -165,7 +165,8 @@
 					orderType: 3, // 订单类型;1-服务订单 2-产品订单 3-充值订单
 					rechargeAmount: null, // 充值金额
 					strategyId: null, // 优惠策略的ID  测试id 1694514233806888962
-					remark: null
+					remark: null,
+					storeId:''
 				},
 				reqPayParm: {
 					auth: true,
@@ -176,7 +177,13 @@
 				rechargeList: [],
 			};
 		},
-		onLoad() {
+		onLoad(option) {
+			if(option.q){
+				const q = decodeURIComponent(option.q)
+				let rechargeStoreId = q.replace('https://jje.admin.xinyuekj.com.cn/recharge/recharge?rechargeStoreId=', '');
+				uni.setStorageSync('rechargeStoreId',rechargeStoreId)
+
+			}
 			this.AboutByType()
 		},
 		onShow() {
@@ -196,9 +203,11 @@
 
 			// 获取充值面额
 			getRechargeList(){
-				console.log('+++++++++666666666666666666+++++++++++++++++++')
+				let storeId = uni.getStorageSync('rechargeStoreId')
+				if (storeId){
+					this.reqOrderParm.storeId = uni.getStorageSync('rechargeStoreId')
+				}
 				this.$api.getRechargeList(this.reqOrderParm).then((res)=>{
-					console.log('++++++++++++++getRechargeList+++++++++++++++++',res)
 					this.rechargeList = res.data.data;
 				})
 			},

+ 9 - 0
storePages/rights/index.vue

@@ -130,6 +130,13 @@
 			};
 		},
 		onLoad(option) {
+
+			if(option.q){
+				const q = decodeURIComponent(option.q)
+				let cardStoreId = q.replace('https://jje.admin.xinyuekj.com.cn/card/card?cardStoreId=', '');
+				uni.setStorageSync('cardStoreId',cardStoreId)
+			}
+
 			this.userInfo = uni.getStorageSync('userInfo')
 			let sysInfo = uni.getSystemInfoSync()
 			this.windowHeight =sysInfo.windowHeight -50  +'px'//除标题栏栏外的屏幕可用高度
@@ -151,8 +158,10 @@
 			},
 
 			commonGeneralOrder(){
+				let storeId = uni.getStorageSync('cardStoreId')
 				this.$refs.popup.close()
 				this.$api.commonGeneralOrder({
+					storeId:storeId || '',
 					orderType: 5,
 					serviceObjectId: this.serviceObject.id,
 					equityCardId:this.orderRights.id