|
@@ -54,7 +54,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
</view>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
<!-- <scroll-view scroll-y class="scroll-view" :scroll-top="scrollTop" @scroll="onScroll"> </scroll-view> -->
|
|
<!-- <scroll-view scroll-y class="scroll-view" :scroll-top="scrollTop" @scroll="onScroll"> </scroll-view> -->
|
|
|
|
|
|
|
@@ -84,7 +84,9 @@
|
|
|
danyuanId: '',
|
|
danyuanId: '',
|
|
|
typeId: '',
|
|
typeId: '',
|
|
|
fontDanyuanId: '',
|
|
fontDanyuanId: '',
|
|
|
- nextDanyuanId: ''
|
|
|
|
|
|
|
+ nextDanyuanId: '',
|
|
|
|
|
+ customType: '',
|
|
|
|
|
+ cacheManagerLocal:null
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -104,10 +106,21 @@
|
|
|
|
|
|
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
|
console.log('options', options);
|
|
console.log('options', options);
|
|
|
- this.typeId = options.typeId
|
|
|
|
|
- this.danyuanId = options.danyuanId
|
|
|
|
|
- this.banbenId = options.banbenId
|
|
|
|
|
- this.loadDataFromApi()
|
|
|
|
|
|
|
+ this.customType = options.customType
|
|
|
|
|
+ if (this.customType) {
|
|
|
|
|
+ this.typeId = options.typeId
|
|
|
|
|
+ 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.danyuanInfo = this.cacheManagerLocal.data
|
|
|
|
|
+ this.fontDanyuanId = this.cacheManagerLocal.data.fontDanyuanId
|
|
|
|
|
+ this.nextDanyuanId = this.cacheManagerLocal.data.nextDanyuanId
|
|
|
|
|
+ this.dagangList = this.cacheManagerLocal.data.dagangList || []
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -126,9 +139,9 @@
|
|
|
cacheManager.set('xuexi-' + this.typeId, res.data)
|
|
cacheManager.set('xuexi-' + this.typeId, res.data)
|
|
|
cacheManager.updateObject('auth', {
|
|
cacheManager.updateObject('auth', {
|
|
|
typeId: this.typeId,
|
|
typeId: this.typeId,
|
|
|
- banbenId:this.banbenId,
|
|
|
|
|
- danyuanId:this.danyuanId
|
|
|
|
|
-
|
|
|
|
|
|
|
+ banbenId: this.banbenId,
|
|
|
|
|
+ danyuanId: this.danyuanId
|
|
|
|
|
+
|
|
|
})
|
|
})
|
|
|
// 初始化当前单元
|
|
// 初始化当前单元
|
|
|
// if (this.danyuanList.length > 0) {
|
|
// if (this.danyuanList.length > 0) {
|