Browse Source

修改一下redirect数据缓存

littleblue55 11 hours ago
parent
commit
3f32b0ea95
3 changed files with 9 additions and 7 deletions
  1. 4 4
      pages/login/login.vue
  2. 2 1
      pages/reportDetail/reportDetail.vue
  3. 3 2
      utils/baseurl.js

+ 4 - 4
pages/login/login.vue

@@ -508,10 +508,10 @@
 				// console.log(1)
 				that.canIUseGetUserProfile = true
 			}
-			if(option.redirect){
-				// console.log("重定向", JSON.parse(option.redirect))
-				uni.setStorageSync("redirect", JSON.parse(option.redirect))
-			}
+			// if(option.redirect){
+			// 	const decodedRedirect = decodeURIComponent(option.redirect);
+			// 	uni.setStorageSync("redirect", JSON.parse(decodedRedirect))
+			// }
 			if(uni.getStorageSync("redirect")){
 				this.redirect = uni.getStorageSync("redirect")
 			}

+ 2 - 1
pages/reportDetail/reportDetail.vue

@@ -235,8 +235,9 @@
 			id: id.value,
 			title: title.value
 		}
+		uni.setStorageSync("redirect", JSON.parse(decodedRedirect))
 		uni.navigateTo({
-			url:`/pages/login/login?redirect=${JSON.stringify(url)}`
+			url:`/pages/login/login`
 		})
 	}
 	

+ 3 - 2
utils/baseurl.js

@@ -2,10 +2,11 @@ let BASE_URL = ''
 let FILE_URL = ''
 // baseurl  联调时改url
 if (process.env.NODE_ENV == 'development') {
-	BASE_URL = 'https://www.gzrea.org.cn:8443/wxmp/api';
+	BASE_URL = 'https://www.gzrea.cn:8443/wxmp/api';
+	// BASE_URL = 'https://www.gzrea.org.cn:8443/wxmp/api';
 	FILE_URL = 'http://www.gzrea.org.cn:8543/icon/wxmp';
 }else{
-	BASE_URL = 'https://www.gzrea.org.cn:8443/wxmp/api';
+	BASE_URL = 'https://www.gzrea.cn:8443/wxmp/api';
 	FILE_URL = 'http://www.gzrea.org.cn:8543/icon/wxmp';
 }