|
@@ -29,8 +29,7 @@
|
|
|
|
|
|
|
|
<view class="xx-item-list">
|
|
<view class="xx-item-list">
|
|
|
<view class="xx-item-title">— 以下为当前等级课程目录 —</view>
|
|
<view class="xx-item-title">— 以下为当前等级课程目录 —</view>
|
|
|
-
|
|
|
|
|
- <view v-for="(item, index) in danyuanList" :key="item.jieId">
|
|
|
|
|
|
|
+ <view v-for="(item, index) in danyuanList" :key="item.danyuanId">
|
|
|
<!-- 节列表 -->
|
|
<!-- 节列表 -->
|
|
|
<ezyActiveVue class="ezy-list-item-active xx-item-box" :class="item.lock?'xx-disabled-item-box':''" @aclick="handlePlay(item,'play')">
|
|
<ezyActiveVue class="ezy-list-item-active xx-item-box" :class="item.lock?'xx-disabled-item-box':''" @aclick="handlePlay(item,'play')">
|
|
|
<view class="xx-item-status"
|
|
<view class="xx-item-status"
|
|
@@ -72,7 +71,7 @@
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
import {
|
|
import {
|
|
|
yingyuDanciInfo,
|
|
yingyuDanciInfo,
|
|
|
- shuxueSave2
|
|
|
|
|
|
|
+ yingyuSave2
|
|
|
} from "@/api/chanpinneirong.js"
|
|
} from "@/api/chanpinneirong.js"
|
|
|
import {
|
|
import {
|
|
|
onLoad,
|
|
onLoad,
|
|
@@ -97,7 +96,7 @@
|
|
|
danyuanList: [],
|
|
danyuanList: [],
|
|
|
neirongInfo: {},
|
|
neirongInfo: {},
|
|
|
banbenId: '',
|
|
banbenId: '',
|
|
|
- jieId: '',
|
|
|
|
|
|
|
+ danyuanId: '',
|
|
|
chanpinId: '',
|
|
chanpinId: '',
|
|
|
dengjiId: '',
|
|
dengjiId: '',
|
|
|
curProcess: '',
|
|
curProcess: '',
|
|
@@ -177,7 +176,8 @@
|
|
|
};
|
|
};
|
|
|
this.curProcess = cacheData.curProcess;
|
|
this.curProcess = cacheData.curProcess;
|
|
|
this.danyuanList = [...(cacheData.danyuanList || [])];
|
|
this.danyuanList = [...(cacheData.danyuanList || [])];
|
|
|
- this.banbenId = cacheData.banbenId
|
|
|
|
|
|
|
+ this.banbenId = cacheData.banbenId;
|
|
|
|
|
+ this.dengjiId = cacheData.dengjiId;
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.danyuanList.length == 0) {
|
|
if (this.danyuanList.length == 0) {
|
|
@@ -208,7 +208,7 @@
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
|
|
|
|
|
this.neirongInfo = res.data;
|
|
this.neirongInfo = res.data;
|
|
|
- this.neirongInfo.jieId = res.data.curJieId;
|
|
|
|
|
|
|
+ this.neirongInfo.danyuanId = res.data.curDanyuanId;
|
|
|
this.curProcess = res.data.curProcess * 100;
|
|
this.curProcess = res.data.curProcess * 100;
|
|
|
this.danyuanList = res.data.danyuanList || [];
|
|
this.danyuanList = res.data.danyuanList || [];
|
|
|
if (this.danyuanList.length == 0) {
|
|
if (this.danyuanList.length == 0) {
|
|
@@ -237,11 +237,11 @@
|
|
|
this.showGoTop = scrollTop > this.scrollThreshold;
|
|
this.showGoTop = scrollTop > this.scrollThreshold;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- getJieAndDanyuan(data, jieId) {
|
|
|
|
|
- for (let jie of data.jieList) {
|
|
|
|
|
- if (jie.jieId == jieId) {
|
|
|
|
|
|
|
+ getJieAndDanyuan(data, danyuanId) {
|
|
|
|
|
+ for (let danyuan of data.danyuanList) {
|
|
|
|
|
+ if (danyuan.danyuanId == danyuanId) {
|
|
|
return {
|
|
return {
|
|
|
- jie
|
|
|
|
|
|
|
+ danyuan
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -249,23 +249,23 @@
|
|
|
return null;
|
|
return null;
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- async saveAndNavigate(jieId, da, code) {
|
|
|
|
|
|
|
+ async saveAndNavigate(danyuanId, da, code) {
|
|
|
|
|
|
|
|
if (code == 'jixu') {
|
|
if (code == 'jixu') {
|
|
|
- if (!da.jieId) {
|
|
|
|
|
- toast("jieId 丢失")
|
|
|
|
|
|
|
+ if (!da.danyuanId) {
|
|
|
|
|
+ toast("danyuanId 丢失")
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
let req = {
|
|
let req = {
|
|
|
- "dengjiId": da.dengjiId,
|
|
|
|
|
- "jieId": da.jieId
|
|
|
|
|
|
|
+ "banbenId": this.banbenId,
|
|
|
|
|
+ "danyuanId": da.danyuanId
|
|
|
}
|
|
}
|
|
|
console.log('req', req);
|
|
console.log('req', req);
|
|
|
- const res = await shuxueSave2(req);
|
|
|
|
|
|
|
+ const res = await yingyuSave2(req);
|
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
|
- let curJieAndDanyuan = this.getJieAndDanyuan(this.neirongInfo, jieId);
|
|
|
|
|
|
|
+ let curJieAndDanyuan = this.getJieAndDanyuan(this.neirongInfo, danyuanId);
|
|
|
console.log('curJieAndDanyuan',curJieAndDanyuan);
|
|
console.log('curJieAndDanyuan',curJieAndDanyuan);
|
|
|
|
|
|
|
|
if (!curJieAndDanyuan) {
|
|
if (!curJieAndDanyuan) {
|
|
@@ -274,14 +274,14 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const cacheData = cacheManager.get('contentInfo') || {};
|
|
const cacheData = cacheManager.get('contentInfo') || {};
|
|
|
- cacheData.curKechengName = curJieAndDanyuan.jie.jieIntro;
|
|
|
|
|
- cacheData.jieId = curJieAndDanyuan.jie.jieId;
|
|
|
|
|
- cacheData.curJieId = jieId;
|
|
|
|
|
- cacheData.type = curJieAndDanyuan.jie.type;
|
|
|
|
|
|
|
+ cacheData.curKechengName = curJieAndDanyuan.danyuan.danyuanIntro;
|
|
|
|
|
+ cacheData.danyuanId = curJieAndDanyuan.danyuan.danyuanId;
|
|
|
|
|
+ cacheData.curDanyuanId = danyuanId;
|
|
|
|
|
+ cacheData.type = curJieAndDanyuan.danyuan.type;
|
|
|
cacheManager.set('contentInfo', cacheData);
|
|
cacheManager.set('contentInfo', cacheData);
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: `/pages/jisuantexun/lookShipin?jieId=${jieId}`
|
|
|
|
|
|
|
+ url: `/pages/chaojidanci/wordList/wordList?danyuanId=${danyuanId}&banbenId=${this.banbenId}`
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
return false;
|
|
return false;
|
|
@@ -299,30 +299,25 @@
|
|
|
// })
|
|
// })
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- let jieId = code === 'jixu' ? da.curJieId : da.jieId;
|
|
|
|
|
- if (!jieId) {
|
|
|
|
|
|
|
+ let danyuanId = code === 'jixu' ? da.curDanyuanId : da.danyuanId;
|
|
|
|
|
+ if (!danyuanId) {
|
|
|
toast("无课程ID");
|
|
toast("无课程ID");
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.saveAndNavigate(jieId, da, code);
|
|
|
|
|
|
|
+ this.saveAndNavigate(danyuanId, da, code);
|
|
|
},
|
|
},
|
|
|
- handleClickDanyuan(jieId) {
|
|
|
|
|
|
|
+ handleClickDanyuan(danyuanId) {
|
|
|
|
|
|
|
|
- if (!jieId) {
|
|
|
|
|
- toast("jieId丢失")
|
|
|
|
|
|
|
+ if (!danyuanId) {
|
|
|
|
|
+ toast("danyuanId丢失")
|
|
|
return false
|
|
return false
|
|
|
}
|
|
}
|
|
|
this.isShow = true;
|
|
this.isShow = true;
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
// 更新为点击的动态单元Id [临时]
|
|
// 更新为点击的动态单元Id [临时]
|
|
|
- this.$refs.dyRef.handleShow(jieId)
|
|
|
|
|
|
|
+ this.$refs.dyRef.handleShow(danyuanId)
|
|
|
}, 100)
|
|
}, 100)
|
|
|
- },
|
|
|
|
|
- handleBack() {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: `/pages/chanpinXuanze/banben?dengjiId=` + this.dengjiId
|
|
|
|
|
- })
|
|
|
|
|
- },
|
|
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
// 计算吸顶栏下方的偏移(确保内容不被遮挡)
|
|
// 计算吸顶栏下方的偏移(确保内容不被遮挡)
|