wangxy преди 2 месеца
родител
ревизия
1c8c909103
променени са 3 файла, в които са добавени 15 реда и са изтрити 1 реда
  1. 4 0
      components/custom-tabbar/custom-tabbar-admin.vue
  2. 4 0
      components/custom-tabbar/custom-tabbar-client.vue
  3. 7 1
      components/listCard/kechengCard.vue

+ 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>