|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<view class="ezy-xuexi-page">
|
|
|
<view class="icon-title-navBar-box">
|
|
|
- <!-- <view @click="handleBack" class="nav-bar-icon"></view> -->
|
|
|
+ <view @click="handleBack" class="nav-bar-icon"></view>
|
|
|
<text class="nav-bar-title">学习</text>
|
|
|
</view>
|
|
|
<view class="ezy-page-body xuexi-page-body">
|
|
|
@@ -82,11 +82,11 @@
|
|
|
danyuanInfo: {},
|
|
|
banbenId: '',
|
|
|
danyuanId: '',
|
|
|
- typeId: '',
|
|
|
+ chanpinId: '',
|
|
|
fontDanyuanId: '',
|
|
|
nextDanyuanId: '',
|
|
|
customType: '',
|
|
|
- cacheManagerLocal:null
|
|
|
+ cacheManagerLocal: null
|
|
|
|
|
|
|
|
|
|
|
|
@@ -108,13 +108,13 @@
|
|
|
console.log('options', options);
|
|
|
this.customType = options.customType
|
|
|
if (this.customType) {
|
|
|
- this.typeId = options.typeId
|
|
|
+ this.chanpinId = options.chanpinId
|
|
|
this.danyuanId = options.danyuanId
|
|
|
this.banbenId = options.banbenId
|
|
|
this.loadDataFromApi()
|
|
|
} else {
|
|
|
- this.typeId = cacheManager.get('auth').typeId
|
|
|
- this.cacheManagerLocal = cacheManager.get('xuexi-'+this.typeId)
|
|
|
+ this.chanpinId = cacheManager.get('auth').chanpinId
|
|
|
+ this.cacheManagerLocal = cacheManager.get('xuexi-' + this.chanpinId)
|
|
|
// 使用缓存
|
|
|
this.danyuanInfo = this.cacheManagerLocal.data
|
|
|
this.fontDanyuanId = this.cacheManagerLocal.data.fontDanyuanId
|
|
|
@@ -125,7 +125,9 @@
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
+ handleBack() {
|
|
|
|
|
|
+ },
|
|
|
loadDataFromApi() {
|
|
|
const req = {
|
|
|
banbenId: this.banbenId,
|
|
|
@@ -136,9 +138,9 @@
|
|
|
this.fontDanyuanId = res.data.fontDanyuanId
|
|
|
this.nextDanyuanId = res.data.nextDanyuanId
|
|
|
this.dagangList = res.data.dagangList || []
|
|
|
- cacheManager.set('xuexi-' + this.typeId, res.data)
|
|
|
+ cacheManager.set('xuexi-' + this.chanpinId, res.data)
|
|
|
cacheManager.updateObject('auth', {
|
|
|
- typeId: this.typeId,
|
|
|
+ chanpinId: this.chanpinId,
|
|
|
banbenId: this.banbenId,
|
|
|
danyuanId: this.danyuanId
|
|
|
|