jwyu 3 years ago
parent
commit
5d2018a34f
2 changed files with 10 additions and 10 deletions
  1. 9 9
      App.vue
  2. 1 1
      pages/pc.vue

+ 9 - 9
App.vue

@@ -13,25 +13,25 @@
 					if (res.windowWidth > 700) {
 						
 						const params=options.query
-						let paramsStr=`xcxPath=${options.path}`
+						let paramsStr=`xcxPath=${decodeURIComponent(options.path)}`
 						for(const key in params){
 							paramsStr=`${paramsStr}&${key}=${params[key]}`
 						}
 						console.log('进入pc');
-						uni.showToast({
-							title:'进入pc',
-							icon:'none'
-						})
+						// uni.showToast({
+						// 	title:'进入pc',
+						// 	icon:'none'
+						// })
 						uni.reLaunch({
 							url: `/pages/pc?${paramsStr}`,
 						});
 					}
 				},
 				fail:function(res){
-					uni.showToast({
-						title: '判断进入pc失败',
-						icon: 'none'
-					})
+					// uni.showToast({
+					// 	title: '判断进入pc失败',
+					// 	icon: 'none'
+					// })
 				}
 			})
 		},

+ 1 - 1
pages/pc.vue

@@ -35,7 +35,7 @@ export default {
             }
         }
         console.log('拼接字符串:',paramsObjStr);
-        this.url=`${pcBaseUrl}${mapObj.get(options.xcxPath)||'/'}?${paramsObjStr}`      
+        this.url=`${pcBaseUrl}${mapObj.get(decodeURIComponent(options.xcxPath))||'/'}?${paramsObjStr}`      
     },
     onShow() {
         uni.hideHomeButton({