|
@@ -2,26 +2,25 @@
|
|
<view>
|
|
<view>
|
|
<swiper :circular="true" @change="onChangeTab" :duration="currentDuration" :current="current"
|
|
<swiper :circular="true" @change="onChangeTab" :duration="currentDuration" :current="current"
|
|
class="ezy-study-swiper" :class="'ezy-study-swiper'+ currentProduct">
|
|
class="ezy-study-swiper" :class="'ezy-study-swiper'+ currentProduct">
|
|
- <swiper-item v-for="(item,index) in zhangList" :key="index">
|
|
|
|
- <!-- 旧的数学 -->
|
|
|
|
- <shuxueZhangjie v-if="currentProduct ==1&&typeId==2" @clickGradeTerm="clickGradeTerm"
|
|
|
|
|
|
+ <swiper-item v-for="(item,index) in zhangList" :key="index">
|
|
|
|
+ <!-- 旧的数学 -->
|
|
|
|
+ <shuxueZhangjie v-if="currentProduct ==1&&typeId==2" @clickGradeTerm="clickGradeTerm"
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
:options="item" :youkeImage="youkeImage">
|
|
:options="item" :youkeImage="youkeImage">
|
|
- </shuxueZhangjie>
|
|
|
|
|
|
+ </shuxueZhangjie>
|
|
<!-- 旧的英语 -->
|
|
<!-- 旧的英语 -->
|
|
- <yingyuZhangjie v-if="currentProduct ==2&&typeId==2" @clickGradeTerm="clickGradeTerm"
|
|
|
|
|
|
+ <yingyuZhangjie v-if="currentProduct ==2&&typeId==2" @clickGradeTerm="clickGradeTerm"
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
:options="item" :youkeImage="youkeImage">
|
|
:options="item" :youkeImage="youkeImage">
|
|
- </yingyuZhangjie>
|
|
|
|
|
|
+ </yingyuZhangjie>
|
|
<!-- 新的数学 -->
|
|
<!-- 新的数学 -->
|
|
- <shuxueNewZhangjie v-if="currentProduct ==1&&typeId==1" @clickGradeTerm="clickGradeTerm"
|
|
|
|
|
|
+ <shuxueNewZhangjie v-if="currentProduct ==1&&typeId==1" @clickGradeTerm="clickGradeTerm"
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
@handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
:options="item" :youkeImage="youkeImage">
|
|
:options="item" :youkeImage="youkeImage">
|
|
- </shuxueNewZhangjie>
|
|
|
|
- <!-- 新的英语(人教版等等) -->
|
|
|
|
- <yingyuNewZhangjie v-if="currentProduct ==2&&typeId==1" @clickGradeTerm="clickGradeTerm"
|
|
|
|
- @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
|
|
- :options="item" :youkeImage="youkeImage">
|
|
|
|
|
|
+ </shuxueNewZhangjie>
|
|
|
|
+ <!-- 新的英语(人教版等等) -->
|
|
|
|
+ <yingyuNewZhangjie @clickGradeTerm="clickGradeTerm" @handleCheckCatalogue="handleCheckCatalogue(item)"
|
|
|
|
+ @listClick="listClick" :gradeTerm='gradeTerm' :options="item" :youkeImage="youkeImage">
|
|
</yingyuNewZhangjie>
|
|
</yingyuNewZhangjie>
|
|
</swiper-item>
|
|
</swiper-item>
|
|
</swiper>
|
|
</swiper>
|
|
@@ -70,7 +69,7 @@
|
|
|
|
|
|
import shuxueZhangjie from './product/shuxue.vue';
|
|
import shuxueZhangjie from './product/shuxue.vue';
|
|
import shuxueNewZhangjie from './product/shuxueNew.vue';
|
|
import shuxueNewZhangjie from './product/shuxueNew.vue';
|
|
- import yingyuZhangjie from './product/yingyu.vue';
|
|
|
|
|
|
+ import yingyuZhangjie from './product/yingyu.vue';
|
|
import yingyuNewZhangjie from './product/yingyuNew.vue';
|
|
import yingyuNewZhangjie from './product/yingyuNew.vue';
|
|
|
|
|
|
import {
|
|
import {
|
|
@@ -216,11 +215,21 @@
|
|
console.log('e', e);
|
|
console.log('e', e);
|
|
console.log(e.detail.current);
|
|
console.log(e.detail.current);
|
|
if (cacheManager.get('auth')) {
|
|
if (cacheManager.get('auth')) {
|
|
- infoData.zhangId = cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
|
|
|
|
- cacheManager.updateObject('auth', {
|
|
|
|
- currentZhang: e.detail.current,
|
|
|
|
- zhangId: infoData.zhangId
|
|
|
|
- })
|
|
|
|
|
|
+ // 新的英语人教版
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
+ infoData.zhangId = cacheManager.get('zhangInfo').zhangList[0].zhangId
|
|
|
|
+ cacheManager.updateObject('auth', {
|
|
|
|
+ currentZhang: e.detail.current,
|
|
|
|
+ zhangId: infoData.zhangId
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ // 旧的数学 英语 新的数学
|
|
|
|
+ infoData.zhangId = cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
|
|
|
|
+ cacheManager.updateObject('auth', {
|
|
|
|
+ currentZhang: e.detail.current,
|
|
|
|
+ zhangId: infoData.zhangId
|
|
|
|
+ })
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -238,9 +247,10 @@
|
|
}
|
|
}
|
|
if (!cacheManager.get('daoPageCache').isCache) {
|
|
if (!cacheManager.get('daoPageCache').isCache) {
|
|
console.log('不实用换葱');
|
|
console.log('不实用换葱');
|
|
- getZhangInfo()
|
|
|
|
|
|
+ chooseMethodNoCache()
|
|
} else {
|
|
} else {
|
|
console.log('shiyonghuancun');
|
|
console.log('shiyonghuancun');
|
|
|
|
+ chooseMethodUseCache()
|
|
translateData(cacheManager.get('zhangInfo'))
|
|
translateData(cacheManager.get('zhangInfo'))
|
|
zhangList.value = cacheManager.get('zhangInfo').zhangList
|
|
zhangList.value = cacheManager.get('zhangInfo').zhangList
|
|
current.value = cacheManager.get('auth').currentZhang
|
|
current.value = cacheManager.get('auth').currentZhang
|
|
@@ -269,6 +279,64 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function chooseMethodNoCache() {
|
|
|
|
+ // 新的英语 (人教版 之类的 新结构)
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
+ getZhangInfoNewYingyu()
|
|
|
|
+ } else {
|
|
|
|
+ // 之前 旧的岛 数学英语 和新的数学
|
|
|
|
+ getZhangInfoNewYingyu()
|
|
|
|
+ // getZhangInfo()
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ function chooseMethodUseCache() {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ // 新的英语 (人教版 之类的 新结构)
|
|
|
|
+ function getZhangInfoNewYingyu(data) {
|
|
|
|
+ let req = {
|
|
|
|
+ levelId: localAuth.value.levelId,
|
|
|
|
+ // levelId: 31,
|
|
|
|
+ zhangId:localAuth.value.zhangId
|
|
|
|
+ // zhangId: 195
|
|
|
|
+ }
|
|
|
|
+ userZhangInfo(req).then(res => {
|
|
|
|
+ cacheManager.set('zhangInfo', res.data)
|
|
|
|
+ let zhang = cacheManager.get('zhangInfo').zhangList[0].zList.findIndex(zhang => zhang.zid == localAuth
|
|
|
|
+ .value.zhangId);
|
|
|
|
+ console.log('zhang', zhang);
|
|
|
|
+ if (zhang != -1) {
|
|
|
|
+ cacheManager.updateObject('auth', {
|
|
|
|
+ currentZhang: zhang
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ cacheManager.updateObject('auth', {
|
|
|
|
+ currentZhang: 0
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ cacheManager.set('daoPageCache', {
|
|
|
|
+ isCache: true
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ nextTick(() => {
|
|
|
|
+ translateData(res.data)
|
|
|
|
+ zhangList.value = res.data.zhangList[0].zList
|
|
|
|
+ current.value = cacheManager.get('auth').currentZhang
|
|
|
|
+ infoData.zhangId = res.data.zhangList[0].zhangId
|
|
|
|
+ recordZhangJie()
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ }).catch((err) => {
|
|
|
|
+ toast('数据异常,请重新登录!')
|
|
|
|
+ cacheManager.clearAll();
|
|
|
|
+ uni.reLaunch({
|
|
|
|
+ url: '/pages/login/index'
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //旧的岛 数学英语 和新的数学
|
|
function getZhangInfo(data) {
|
|
function getZhangInfo(data) {
|
|
let req = {
|
|
let req = {
|
|
levelId: localAuth.value.levelId
|
|
levelId: localAuth.value.levelId
|
|
@@ -377,6 +445,23 @@
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ function goDanciList(data, index) {
|
|
|
|
+ if (!cacheManager.get('auth')) {
|
|
|
|
+
|
|
|
|
+ let youkeData = {
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: '/pages/study/lookShipinNew?youkePageData=' + JSON.stringify(youkeData)
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ uni.redirectTo({
|
|
|
|
+ url: '/pages/wordList/wordList?jieId=' + data.jieId
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
function goLookShipin(data, index) {
|
|
function goLookShipin(data, index) {
|
|
|
|
|
|
if (!cacheManager.get('auth')) {
|
|
if (!cacheManager.get('auth')) {
|
|
@@ -456,7 +541,12 @@
|
|
// 最后一项
|
|
// 最后一项
|
|
goKaoshi(data, index)
|
|
goKaoshi(data, index)
|
|
} else {
|
|
} else {
|
|
- goLookShipin(data, index)
|
|
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
+ goDanciList(data, index)
|
|
|
|
+ } else {
|
|
|
|
+ goLookShipin(data, index)
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|