cmy 2 years ago
parent
commit
41e5d5d953
1 changed files with 15 additions and 14 deletions
  1. 15 14
      pages/redirect/redirect.vue

+ 15 - 14
pages/redirect/redirect.vue

@@ -108,22 +108,23 @@
 					if (ur == 'pages/product/product') {
 					if (ur == 'pages/product/product') {
 						ur = '/pages/index/index'
 						ur = '/pages/index/index'
 					}
 					}
-					window.loaction.href = obj.baseURL + obj.urlFile + '/#' + ur;
 					console.log(obj.baseURL + obj.urlFile + '/#' + ur);
 					console.log(obj.baseURL + obj.urlFile + '/#' + ur);
-					// uni.switchTab({
-					// 	url: ur,
-					// 	fail(e) {
-					// 		uni.navigateTo({
-					// 			url: ur,
-					// 			fail(e) {
-					// 				uni.navigateTo({
-					// 					url: '/pages/index/index',
-					// 				});
-					// 			}
-					// 		});
-					// 	}
-					// });
+					location.href = obj.baseURL + obj.urlFile + '/#' + ur;
+					uni.switchTab({
+						url: ur,
+						fail(e) {
+							uni.navigateTo({
+								url: ur,
+								fail(e) {
+									uni.navigateTo({
+										url: '/pages/index/index',
+									});
+								}
+							});
+						}
+					});
 				}).catch((e) => {
 				}).catch((e) => {
+					console.log(e.message,'cuowu');
 					uni.showModal({
 					uni.showModal({
 						title: '错误',
 						title: '错误',
 						content: JSON.stringify(e),
 						content: JSON.stringify(e),