Jelajahi Sumber

调整页面

wangxy 2 bulan lalu
induk
melakukan
1c8c909103

+ 4 - 0
components/custom-tabbar/custom-tabbar-admin.vue

@@ -44,6 +44,10 @@
 		},
 		methods: {
 			switchTab(path, index) {
+				if (index == this.currentTab) {
+					// 同页面不刷新
+					return;
+				}
 				uni.reLaunch({
 					url: path
 				});

+ 4 - 0
components/custom-tabbar/custom-tabbar-client.vue

@@ -38,6 +38,10 @@
 		},
 		methods: {
 			switchTab(path, index) {
+				if (index == this.currentTab) {
+					// 同页面不刷新
+					return;
+				}
 				uni.reLaunch({url: path});
 			},
 		},

+ 7 - 1
components/listCard/kechengCard.vue

@@ -22,7 +22,7 @@
 		</view>
 		<!-- 底部 -->
 		<view class="card-bottom-box">
-			<button type="default" class="index-card-btn">课程学习</button>
+			<button type="default" class="index-card-btn" @click="handleStudy(data)">课程学习</button>
 		</view>
 	</view>
 </template>
@@ -40,6 +40,12 @@
 			url:"/pages/client/Kecheng/list?from=shouye"
 		})
 	}
+	
+	function handleStudy(item) {
+		uni.redirectTo({
+			url: `/pages/client/Kecheng/study?kcId=${item.kcId}&from=shouye`
+		})
+	}
 </script>
 
 <style>