|
@@ -83,9 +83,11 @@
|
|
|
danyuanInfo: {},
|
|
danyuanInfo: {},
|
|
|
banbenId: '',
|
|
banbenId: '',
|
|
|
danyuanId: '',
|
|
danyuanId: '',
|
|
|
|
|
+ chanpinTypeId: '',
|
|
|
chanpinId: '',
|
|
chanpinId: '',
|
|
|
fontDanyuanId: '',
|
|
fontDanyuanId: '',
|
|
|
nextDanyuanId: '',
|
|
nextDanyuanId: '',
|
|
|
|
|
+ dengjiId: '',
|
|
|
customType: '',
|
|
customType: '',
|
|
|
cacheManagerLocal: null
|
|
cacheManagerLocal: null
|
|
|
|
|
|
|
@@ -113,6 +115,8 @@
|
|
|
this.chanpinId = options.chanpinId
|
|
this.chanpinId = options.chanpinId
|
|
|
this.danyuanId = options.danyuanId
|
|
this.danyuanId = options.danyuanId
|
|
|
this.banbenId = options.banbenId
|
|
this.banbenId = options.banbenId
|
|
|
|
|
+ this.dengjiId = options.dengjiId
|
|
|
|
|
+ this.chanpinTypeId = options.chanpinTypeId
|
|
|
this.loadDataFromApi()
|
|
this.loadDataFromApi()
|
|
|
} else {
|
|
} else {
|
|
|
console.log('使用缓存');
|
|
console.log('使用缓存');
|
|
@@ -120,6 +124,9 @@
|
|
|
this.chanpinId = cacheManager.get('auth').chanpinId
|
|
this.chanpinId = cacheManager.get('auth').chanpinId
|
|
|
this.danyuanId = cacheManager.get('auth').danyuanId
|
|
this.danyuanId = cacheManager.get('auth').danyuanId
|
|
|
this.banbenId = cacheManager.get('auth').banbenId
|
|
this.banbenId = cacheManager.get('auth').banbenId
|
|
|
|
|
+ this.chanpinTypeId = cacheManager.get('auth').chanpinTypeId
|
|
|
|
|
+ //用于返回
|
|
|
|
|
+ this.dengjiId = cacheManager.get('auth').dengjiId
|
|
|
this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
|
|
this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
|
|
|
// 使用缓存
|
|
// 使用缓存
|
|
|
this.danyuanInfo = this.cacheManagerLocal
|
|
this.danyuanInfo = this.cacheManagerLocal
|
|
@@ -137,7 +144,9 @@
|
|
|
this.$refs.dyMlRef.showPopup(this.banbenId)
|
|
this.$refs.dyMlRef.showPopup(this.banbenId)
|
|
|
},
|
|
},
|
|
|
handleBack() {
|
|
handleBack() {
|
|
|
-
|
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: `/pages/chanpinXuanze/banben?dengjiId=`+this.dengjiId
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
loadDataFromApi() {
|
|
loadDataFromApi() {
|
|
|
const req = {
|
|
const req = {
|
|
@@ -152,9 +161,10 @@
|
|
|
cacheManager.set('xuexi-' + this.chanpinId, res.data)
|
|
cacheManager.set('xuexi-' + this.chanpinId, res.data)
|
|
|
cacheManager.updateObject('auth', {
|
|
cacheManager.updateObject('auth', {
|
|
|
chanpinId: this.chanpinId,
|
|
chanpinId: this.chanpinId,
|
|
|
|
|
+ chanpinTypeId: this.chanpinTypeId,
|
|
|
banbenId: this.banbenId,
|
|
banbenId: this.banbenId,
|
|
|
- danyuanId: this.danyuanId
|
|
|
|
|
-
|
|
|
|
|
|
|
+ danyuanId: this.danyuanId,
|
|
|
|
|
+ dengjiId: this.dengjiId
|
|
|
})
|
|
})
|
|
|
// 初始化当前单元
|
|
// 初始化当前单元
|
|
|
// if (this.danyuanList.length > 0) {
|
|
// if (this.danyuanList.length > 0) {
|
|
@@ -183,14 +193,14 @@
|
|
|
console.log('da', da)
|
|
console.log('da', da)
|
|
|
let jieId = null;
|
|
let jieId = null;
|
|
|
if (code == 'jixu') {
|
|
if (code == 'jixu') {
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
// 判断学习状态
|
|
// 判断学习状态
|
|
|
/* if (已学完) {
|
|
/* if (已学完) {
|
|
|
|
|
|
|
|
return;
|
|
return;
|
|
|
} */
|
|
} */
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
jieId = da.curJieId;
|
|
jieId = da.curJieId;
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
|
|
url: `/pages/xinshuxue/lookShipin?jieId=${jieId}`
|