Browse Source

分销调整

gcz 1 year ago
parent
commit
169462703a
4 changed files with 60 additions and 35 deletions
  1. 29 0
      App.vue
  2. 19 27
      pages/bookticket.vue
  3. 5 4
      pages/login/login.vue
  4. 7 4
      pages/ticketlist.vue

+ 29 - 0
App.vue

@@ -32,6 +32,35 @@
 		},
 		onHide: function() {
 			// console.log('App Hide')
+			
+			// 删除分销信息
+			//  const sceneData = uni.getStorageSync('scene');
+			// if (sceneData && sceneData.timestamp) {
+			//      const currentTime = new Date().getTime();
+			//      if (currentTime - sceneData.timestamp > 5 * 60 * 1000) { // 超过5分钟
+					
+			//      }
+			// }
+			uni.removeStorage({
+				key:'retailId',
+				success: (e) => {
+					console.log('App Hide removeStorage retailId success',e);
+				},
+				fail: (e) => {
+					console.log('App Hide removeStorage retailId fail',e);
+				}
+			});
+			uni.removeStorage({
+				key:'scene',
+				success: (e) => {
+					console.log('App Hide removeStorage scene success',e);
+				},
+				fail: (e) => {
+					console.log('App Hide removeStorage scene fail',e);
+				}
+			});
+			// 删除分销信息
+			
 		}
 	}
 </script>

+ 19 - 27
pages/bookticket.vue

@@ -401,34 +401,26 @@
 					this.orderId = res.data.orderId;
 					// this.templateEven()
 					this.gotoPay();
+					// 删除分销信息
 					// this.setTemplate();
-					uni.removeStorage({
-						key:'retailId',
-						success: (e) => {
-							console.log('removeStorage retailId success',e);
-							uni.getStorage({
-							    key: 'retailId',
-							    success: function (res) {
-							        console.log('删除后再获取 success retailId====', res.data);
-							    },
-							    fail: function (error) {
-									 console.log('删除后再获取 error retailId====',error);
-							    }
-							});
-						},
-						fail: (e) => {
-							console.log('removeStorage retailId fail',e);
-						}
-					});
-					uni.removeStorage({
-						key:'scene',
-						success: (e) => {
-							console.log('removeStorage scene success',e);
-						},
-						fail: (e) => {
-							console.log('removeStorage scene fail',e);
-						}
-					});
+					// uni.removeStorage({
+					// 	key:'retailId',
+					// 	success: (e) => {
+					// 		console.log('removeStorage retailId success',e);
+					// 	},
+					// 	fail: (e) => {
+					// 		console.log('removeStorage retailId fail',e);
+					// 	}
+					// });
+					// uni.removeStorage({
+					// 	key:'scene',
+					// 	success: (e) => {
+					// 		console.log('removeStorage scene success',e);
+					// 	},
+					// 	fail: (e) => {
+					// 		console.log('removeStorage scene fail',e);
+					// 	}
+					// });
 
 				}).catch(err => {
 					this.cansubmit = true;

+ 5 - 4
pages/login/login.vue

@@ -137,15 +137,16 @@
 			};
 		},
 		onLoad(e) {
-			console.log("onLoad e=======",e)
+			// console.log("onLoad e=======",e)
 			if(e&&e.scene){
 				this.scene = e.scene;
-				console.log('login e.scene',e.scene);
+				// console.log('login e.scene',e.scene);
 				this.scene&&uni.setStorage({
 					key:'scene',
 					data:e.scene,
+					// timestamp: new Date().getTime(), // 添加时间戳
 					success: function (res) {
-						console.log('onLoad success scene====',res);
+						// console.log('onLoad success scene====',res);
 					}
 				});
 			}
@@ -220,7 +221,7 @@
 						// console.log('getUserProfile success',res);
 						if (res.errMsg == "getUserProfile:ok" && res.userInfo != undefined) {
 							//我用store来存储一些数据,你可以放到你要放的地方
-							console.log(' res.userInfo', res.userInfo);
+							// console.log(' res.userInfo', res.userInfo);
 							// that.$u.vuex('wx_user_info.nickName', res.userInfo.nickName);
 							// that.$u.vuex('wx_user_info.avatarUrl', res.userInfo.avatarUrl);
 							// that.getChatCode()

+ 7 - 4
pages/ticketlist.vue

@@ -321,6 +321,9 @@
 			}
 		},
 		onShow() {
+			if(this.auditoriumList.length>=1){
+				this.getPositionData();
+			}
 		},
 		onLoad(page) {
 			// console.log('ticketlist page',page);
@@ -561,7 +564,7 @@
 				this.sessionIndex = index;
 				let session = this.sessionList[this.sessionIndex];
 				this.getPositionData();
-				console.log('sessionClick',this.sessionList[this.sessionIndex]);
+				// console.log('sessionClick',this.sessionList[this.sessionIndex]);
 			},
 			async getPositionData(){
 				let _this = this;
@@ -571,7 +574,7 @@
 				            uni.getStorage({
 				                key: 'retailId',
 				                success: function (res) {
-				                    console.log('getPositionData retailId====', res.data);
+				                    // console.log('getPositionData retailId====', res.data);
 				                    resolve(res.data);
 				                },
 				                fail: function (error) {
@@ -585,7 +588,7 @@
 				        // 在这里可以添加处理失败的逻辑
 				    }
 					this.retailId = retailId;
-				console.log('getPositionData this.retailId',this.retailId);
+				// console.log('getPositionData this.retailId',this.retailId);
 				// if(this.scene&&this.scene!='undefined'){
 				// 	await this.$u.api.uncompress({scene:this.scene}).then(res=>{
 				// 		// data.performId = res.data.performId;
@@ -606,7 +609,7 @@
 					label:this.label,
 					retailId:this.retailId
 				}
-				console.log('getPositionData params',params);
+				// console.log('getPositionData params',params);
 				this.$u.api.selectRegion(params).then(res=>{
 					// console.log('getPositionData',res.data);
 					this.positionData =  res.data;