wangxy 1 month ago
parent
commit
a868ecb1a0
1 changed files with 9 additions and 8 deletions
  1. 9 8
      pages/chanpinneirong/index.vue

+ 9 - 8
pages/chanpinneirong/index.vue

@@ -31,7 +31,7 @@
 						<view class="xx-item-title">— 以下为当前等级课程目录 —</view>
 						<view v-for="(danyuanItem,index) in danyuanList" :key="danyuanItem.danyuanId">
 							<!-- 第一单元 v-if="index ==0"-->
-								<ezyActiveVue class="ezy-list-item-active item-dy-box" @aclick="handleClickDanyuan" :id="`unit-title-${danyuanItem.danyuanId}`">
+								<ezyActiveVue class="ezy-list-item-active item-dy-box" @aclick="handleClickDanyuan(danyuanItem)" :id="`unit-title-${danyuanItem.danyuanId}`">
 									<view class="dy-left-box">L{{banbenInfo.dengjiId}}</view>
 									<view class="dy-right-box">
 										<view class="right-content">
@@ -316,8 +316,7 @@
 			},
 			// 统一保存和跳转方法
 			async saveAndNavigate(jieId, type,da, code) {
-				
-				if (code == 'jixu') { // 追加参数判断 非继续
+				if (code == 'jixu') { // 追加参数判断 非继续 [临时]
 					if (!this.banbenId || !this.danyuanId) {
 						toast("banbenId或者danyuanId 丢失")
 						return false
@@ -326,7 +325,7 @@
 			
 				let req = {
 					"banbenId": this.banbenId,
-					"danyuanId": da.danyuanId, // 修改当时版本ID为数据内版本Id
+					"danyuanId": da.danyuanId, // 修改当时版本ID为数据内版本Id [临时]
 					"jieId": jieId
 				}
 
@@ -382,17 +381,19 @@
 				} else {
 					jieId = da.jieId;
 				}
-
+				// [临时]
 				this.saveAndNavigate(jieId, da.type, da, code);
 			},
-			handleClickDanyuan() {
-				if (!this.danyuanId) {
+			handleClickDanyuan(item) {
+				// 更新为点击的动态单元Id [临时]
+				if (!item.danyuanId) {
 					toast("this.danyuanId丢失")
 					return false
 				}
 				this.isShow = true;
 				setTimeout(() => {
-					this.$refs.dyRef.handleShow(this.danyuanId)
+					// 更新为点击的动态单元Id [临时]
+					this.$refs.dyRef.handleShow(item.danyuanId)
 				}, 100)
 			},
 			handleBack() {