|
|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
<view class="ezy-page-body xuexi-page-body">
|
|
|
<!-- 滚动区域 -->
|
|
|
- <scroll-view v-if="existData" :scroll-with-animation="true" scroll-y
|
|
|
- :scroll-top="scrollTop" @scroll="handleScroll">
|
|
|
+ <scroll-view v-if="existData" :scroll-with-animation="true" scroll-y :scroll-top="scrollTop"
|
|
|
+ @scroll="handleScroll">
|
|
|
<view class="xxjl-card-box-padding">
|
|
|
<view class="xxjl-card-box">
|
|
|
<!-- 显示内容 -->
|
|
|
@@ -190,8 +190,8 @@
|
|
|
// this.$nextTick(() => {
|
|
|
// this.updateTitlePositions();
|
|
|
// });
|
|
|
- }else{
|
|
|
- this.existData = false;
|
|
|
+ } else {
|
|
|
+ this.existData = false;
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -269,40 +269,36 @@
|
|
|
"jieId": jieId
|
|
|
}
|
|
|
console.log('req', req);
|
|
|
- try {
|
|
|
- const res = await shuxueSave(req);
|
|
|
- if (res.code == 0 && res.data) {
|
|
|
- let curJieAndDanyuan = this.getJieAndDanyuan(this.banbenInfo, jieId);
|
|
|
- if (!curJieAndDanyuan) {
|
|
|
- toast("未找到课程信息");
|
|
|
- return false;
|
|
|
- }
|
|
|
+ const res = await shuxueSave(req);
|
|
|
+ if (res.code == 0 && res.data) {
|
|
|
+ let curJieAndDanyuan = this.getJieAndDanyuan(this.banbenInfo, jieId);
|
|
|
+ if (!curJieAndDanyuan) {
|
|
|
+ toast("未找到课程信息");
|
|
|
+ return false;
|
|
|
+ }
|
|
|
|
|
|
- const cacheData = cacheManager.get('contentInfo') || {};
|
|
|
- cacheData.curDanyuanName = curJieAndDanyuan.danyuan.danyuanName;
|
|
|
- cacheData.curKechengName = curJieAndDanyuan.jie.jieIntro;
|
|
|
- cacheData.danyuanId = curJieAndDanyuan.jie.danyuanId;
|
|
|
- cacheData.curJieId = jieId;
|
|
|
- cacheData.type = curJieAndDanyuan.jie.type;
|
|
|
- cacheManager.set('contentInfo', cacheData);
|
|
|
+ const cacheData = cacheManager.get('contentInfo') || {};
|
|
|
+ cacheData.curDanyuanName = curJieAndDanyuan.danyuan.danyuanName;
|
|
|
+ cacheData.curKechengName = curJieAndDanyuan.jie.jieIntro;
|
|
|
+ cacheData.danyuanId = curJieAndDanyuan.jie.danyuanId;
|
|
|
+ cacheData.curJieId = jieId;
|
|
|
+ cacheData.type = curJieAndDanyuan.jie.type;
|
|
|
+ cacheManager.set('contentInfo', cacheData);
|
|
|
|
|
|
- if (type == 1) {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pages/xinshuxue/unitTest?jieId=${jieId}`
|
|
|
- })
|
|
|
- }
|
|
|
+ if (type == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
|
|
|
+ })
|
|
|
} else {
|
|
|
- toast("保存位置出错");
|
|
|
- return false;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pages/xinshuxue/unitTest?jieId=${jieId}`
|
|
|
+ })
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- toast("保存失败");
|
|
|
+ } else {
|
|
|
+ toast("保存位置出错");
|
|
|
return false;
|
|
|
}
|
|
|
+
|
|
|
},
|
|
|
handlePlay(da, code) {
|
|
|
|
|
|
@@ -345,4 +341,4 @@
|
|
|
|
|
|
}
|
|
|
}
|
|
|
-</script>
|
|
|
+</script>
|