Explorar o código

跳转小程序

xhj %!s(int64=2) %!d(string=hai) anos
pai
achega
5e48c735d4

+ 13 - 1
pages/index/index.vue

@@ -1141,7 +1141,19 @@
 					url = "topic/content/content?id=" + dt.content;
 				}else if (dt.type * 1 == 27 && dt.content != "") {
 					url = "match/activityDetail/activityDetail?id=" + dt.content;
-				} else {
+				}else if (dt.type * 1 == 1 && dt.content != "") {
+					console.log('dt.content',dt.content)
+					uni.navigateToMiniProgram({
+						appId: dt.content, // 目标小程序appid
+						path: '', // 目标路径,例如‘pages/billManage/index’
+						extraData: {}, // 跳转传参,例如'orderNo': 'xxx......'
+						success(res) {
+							uni.showToast({
+								title: '跳转成功'
+							})
+						}
+					})
+				}  else {
 					url = "";
 				}
 			

+ 12 - 0
template/banner/banner.vue

@@ -322,6 +322,18 @@
 					url = "pages/topic/topic?id=" + dt.content;
 				} else if (dt.type * 1 == 27 && dt.content != "") {
 					url = "match/activityDetail/activityDetail?id=" + dt.content;
+				} else if (dt.type * 1 == 1 && dt.content != "") {
+					console.log('dt.content',dt.content)
+					uni.navigateToMiniProgram({
+						appId: dt.content, // 目标小程序appid
+						path: '', // 目标路径,例如‘pages/billManage/index’
+						extraData: {}, // 跳转传参,例如'orderNo': 'xxx......'
+						success(res) {
+							uni.showToast({
+								title: '跳转成功'
+							})
+						}
+					})
 				} else{
 					url = "";
 				}

+ 12 - 0
template/king_kong_district/king_kong_district.vue

@@ -219,6 +219,18 @@
 					url = "pages/topic/topic?id=" + dt.content;
 				} else if (dt.type * 1 == 27 && dt.content != "") {
 					url = "match/activityDetail/activityDetail?id=" + dt.content;
+				} else if (dt.type * 1 == 1 && dt.content != "") {
+					console.log('dt.content',dt.content)
+					uni.navigateToMiniProgram({
+						appId: dt.content, // 目标小程序appid
+						path: '', // 目标路径,例如‘pages/billManage/index’
+						extraData: {}, // 跳转传参,例如'orderNo': 'xxx......'
+						success(res) {
+							uni.showToast({
+								title: '跳转成功'
+							})
+						}
+					})
 				} else{
 					url = "";
 				}

+ 13 - 1
template/popAd/popAd.vue

@@ -140,7 +140,19 @@
 					url = "pages/topic/topic?id=" + dt.content;
 				} else if (dt.type * 1 == 27 && dt.content != "") {
 					url = "match/activityDetail/activityDetail?id=" + dt.content;
-				} else{
+				} else if (dt.type * 1 == 1 && dt.content != "") {
+					console.log('dt.content',dt.content)
+					uni.navigateToMiniProgram({
+						appId: dt.content, // 目标小程序appid
+						path: '', // 目标路径,例如‘pages/billManage/index’
+						extraData: {}, // 跳转传参,例如'orderNo': 'xxx......'
+						success(res) {
+							uni.showToast({
+								title: '跳转成功'
+							})
+						}
+					})
+				}  else{
 					url = "";
 				}