Browse Source

Merge remote-tracking branch 'origin/2025鹅状元数学' into 2025鹅状元数学

wangxy 1 month ago
parent
commit
cb5a979c82
2 changed files with 4 additions and 6 deletions
  1. 3 5
      pages/chanpinneirong/index.vue
  2. 1 1
      pages/xinshuxue/components/danyuanMulu.vue

+ 3 - 5
pages/chanpinneirong/index.vue

@@ -135,6 +135,8 @@
 		methods: {
 			handleSelectDanyuan(item) {
 				console.log('切换单元', item)
+				this.danyuanId =item.danyuanId
+				this.loadDataFromApi()
 			},
 			handleClickMulu() {
 				this.$refs.dyMlRef.showPopup(this.banbenId)
@@ -160,11 +162,7 @@
 						banbenId: this.banbenId,
 						danyuanId: this.danyuanId,
 						dengjiId: this.dengjiId
-					})
-					// 初始化当前单元
-					// if (this.danyuanList.length > 0) {
-					// 	this.currentUnitName = this.danyuanList[0].danyuanName
-					// }
+					})	
 				})
 			},
 

+ 1 - 1
pages/xinshuxue/components/danyuanMulu.vue

@@ -10,7 +10,7 @@
 				</view>
 				<!-- 目录 -->
 				<view class="xuexi-dyml-body">
-					<view class="dyml-item-box" v-for="item in list" @click="handleSelect" :key="item.danyuanId">
+					<view class="dyml-item-box" v-for="item in list" @click="handleSelect(item)" :key="item.danyuanId">
 						<text class="dy-num">{{item.danyuanName}}</text>
 						<text class="dy-title">{{item.intro}}</text>
 						<icon></icon>