|
@@ -19,16 +19,16 @@
|
|
|
:options="item" :youkeImage="youkeImage">
|
|
:options="item" :youkeImage="youkeImage">
|
|
|
</shuxueNewZhangjie>
|
|
</shuxueNewZhangjie>
|
|
|
<!-- 新的英语(人教版等等) -->
|
|
<!-- 新的英语(人教版等等) -->
|
|
|
- <yingyuNewZhangjie v-if="currentProduct ==2&&typeId==1" @clickGradeTerm="clickGradeTerm" :currentSwiperIndex="currentSwiperIndex"
|
|
|
|
|
- @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
|
|
|
|
|
- :options="item" :zhangName="zhangName" :youkeImage="youkeImage" :youkeImageBook="youkeImageBook">
|
|
|
|
|
|
|
+ <yingyuNewZhangjie v-if="currentProduct ==2&&typeId==1" @clickGradeTerm="clickGradeTerm"
|
|
|
|
|
+ :currentSwiperIndex="currentSwiperIndex" @handleCheckCatalogue="handleCheckCatalogue(item)"
|
|
|
|
|
+ @listClick="listClick" :gradeTerm='gradeTerm' :options="item" :zhangName="zhangName"
|
|
|
|
|
+ :youkeImage="youkeImage" :youkeImageBook="youkeImageBook">
|
|
|
</yingyuNewZhangjie>
|
|
</yingyuNewZhangjie>
|
|
|
</swiper-item>
|
|
</swiper-item>
|
|
|
</swiper>
|
|
</swiper>
|
|
|
<!-- 蛋 -->
|
|
<!-- 蛋 -->
|
|
|
<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
|
|
<egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
|
|
|
- <catalogue ref="catalogueRef" :list=zhangList @change-zhang="handleChangeZhang"
|
|
|
|
|
- ></catalogue>
|
|
|
|
|
|
|
+ <catalogue ref="catalogueRef" :list=zhangList @change-zhang="handleChangeZhang"></catalogue>
|
|
|
<CustomTabBar :levelId="levelId" :currentTabNumber="0" :subjectId="subjectId" :typeId="typeId"
|
|
<CustomTabBar :levelId="levelId" :currentTabNumber="0" :subjectId="subjectId" :typeId="typeId"
|
|
|
:tipFlag="tipFlag">
|
|
:tipFlag="tipFlag">
|
|
|
</CustomTabBar>
|
|
</CustomTabBar>
|
|
@@ -36,10 +36,10 @@
|
|
|
<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
|
|
<tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
|
|
|
<dao-tip-dialog ref="daoTipDialogRef" v-if="showDaoTip" :productTip="productTipImg"
|
|
<dao-tip-dialog ref="daoTipDialogRef" v-if="showDaoTip" :productTip="productTipImg"
|
|
|
@dao-tip-close="daoTipClose"></dao-tip-dialog>
|
|
@dao-tip-close="daoTipClose"></dao-tip-dialog>
|
|
|
- <tipMiddleDialog ref="tipDialogRef" :closeFlag='false' @confirm-btn="BanbenConfirmBtn" :title="tipTitle" :notClose="true"
|
|
|
|
|
- :content="tipContentVersion"></tipMiddleDialog>
|
|
|
|
|
- <tipMiddleDialog ref="tipDialogRef2" :closeFlag='false' :title="tipTitle" @confirm-btn="BanbenConfirmBtn" :notClose="true" :showTip="true"
|
|
|
|
|
- :content="tipContentVersionAndroid"></tipMiddleDialog>
|
|
|
|
|
|
|
+ <tipMiddleDialog ref="tipDialogRef" :closeFlag='false' @confirm-btn="BanbenConfirmBtn" :title="tipTitle"
|
|
|
|
|
+ :notClose="true" :content="tipContentVersion"></tipMiddleDialog>
|
|
|
|
|
+ <tipMiddleDialog ref="tipDialogRef2" :closeFlag='false' :title="tipTitle" @confirm-btn="BanbenConfirmBtn"
|
|
|
|
|
+ :notClose="true" :showTip="true" :content="tipContentVersionAndroid"></tipMiddleDialog>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup>
|
|
<script setup>
|
|
@@ -81,7 +81,9 @@
|
|
|
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 {useVersionUpdate} from "@/utils/versionUpdate.js";
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ useVersionUpdate
|
|
|
|
|
+ } from "@/utils/versionUpdate.js";
|
|
|
|
|
|
|
|
import {
|
|
import {
|
|
|
useTabBarHistory
|
|
useTabBarHistory
|
|
@@ -95,12 +97,14 @@
|
|
|
} from "@/utils/common";
|
|
} from "@/utils/common";
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
import TipDialog from "../../components/dialog/tipDialog";
|
|
import TipDialog from "../../components/dialog/tipDialog";
|
|
|
- import {getDataFromStr} from "../../utils/common";
|
|
|
|
|
|
|
+ import {
|
|
|
|
|
+ getDataFromStr
|
|
|
|
|
+ } from "../../utils/common";
|
|
|
const tipContent = '是否前往开通付费?'; //当前产品
|
|
const tipContent = '是否前往开通付费?'; //当前产品
|
|
|
const goPayDialogRef = ref(null);
|
|
const goPayDialogRef = ref(null);
|
|
|
const youkeDialogRef = ref(null);
|
|
const youkeDialogRef = ref(null);
|
|
|
const dSwiperRef = ref(null);
|
|
const dSwiperRef = ref(null);
|
|
|
- const eggDialogRef = ref(null);
|
|
|
|
|
|
|
+ const eggDialogRef = ref(null);
|
|
|
const yingyuNewZhangjieRef = ref(null);
|
|
const yingyuNewZhangjieRef = ref(null);
|
|
|
const current = ref(0);
|
|
const current = ref(0);
|
|
|
const zid = ref(0);
|
|
const zid = ref(0);
|
|
@@ -114,12 +118,12 @@
|
|
|
const localAuth = ref(null);
|
|
const localAuth = ref(null);
|
|
|
const levelId = ref(null); //游客使用
|
|
const levelId = ref(null); //游客使用
|
|
|
const subjectId = ref(null); //游客使用
|
|
const subjectId = ref(null); //游客使用
|
|
|
- const youkeZhangId = ref(null); //游客使用
|
|
|
|
|
|
|
+ const youkeZhangId = ref(null); //游客使用
|
|
|
const currentSwiperIndex = ref(0)
|
|
const currentSwiperIndex = ref(0)
|
|
|
const zhangName = ref(null);
|
|
const zhangName = ref(null);
|
|
|
const typeId = ref(null);
|
|
const typeId = ref(null);
|
|
|
const zhangList = ref(null);
|
|
const zhangList = ref(null);
|
|
|
- const gradeTerm = ref(null);
|
|
|
|
|
|
|
+ const gradeTerm = ref(null);
|
|
|
const weizhiIndex = ref(null);
|
|
const weizhiIndex = ref(null);
|
|
|
const updateUrl = ref(null);
|
|
const updateUrl = ref(null);
|
|
|
let infoData = reactive({
|
|
let infoData = reactive({
|
|
@@ -148,11 +152,12 @@
|
|
|
const tipContentVersion = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
|
|
const tipContentVersion = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
|
|
|
const tipContentVersionAndroid = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!'
|
|
const tipContentVersionAndroid = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!'
|
|
|
|
|
|
|
|
- const { initDownload } = useVersionUpdate()
|
|
|
|
|
|
|
+ const {
|
|
|
|
|
+ initDownload
|
|
|
|
|
+ } = useVersionUpdate()
|
|
|
|
|
|
|
|
onLoad((options) => {
|
|
onLoad((options) => {
|
|
|
- init(options);
|
|
|
|
|
- getLoginInit()
|
|
|
|
|
|
|
+ getLoginInit(options)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
@@ -162,7 +167,7 @@
|
|
|
const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
|
|
const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
|
|
|
plus.runtime.openURL(appStoreUrl)
|
|
plus.runtime.openURL(appStoreUrl)
|
|
|
} else {
|
|
} else {
|
|
|
- initDownload(updateUrl.value)
|
|
|
|
|
|
|
+ initDownload(updateUrl.value)
|
|
|
// 处理 Android/HarmonyOS 设备
|
|
// 处理 Android/HarmonyOS 设备
|
|
|
/*const {
|
|
/*const {
|
|
|
brand
|
|
brand
|
|
@@ -211,7 +216,7 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function getLoginInit() {
|
|
|
|
|
|
|
+ function getLoginInit(options) {
|
|
|
getVersion({}).then(res => {
|
|
getVersion({}).then(res => {
|
|
|
updateUrl.value = res.data.updateUrl;
|
|
updateUrl.value = res.data.updateUrl;
|
|
|
if (version != res.data.version) {
|
|
if (version != res.data.version) {
|
|
@@ -222,6 +227,15 @@
|
|
|
tipDialogRef2.value.handleShow();
|
|
tipDialogRef2.value.handleShow();
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
+ } else {
|
|
|
|
|
+ // 游客模式 新增 tishen字段 用于苹果审核
|
|
|
|
|
+ if(cacheManager.get("youkeTishen")){
|
|
|
|
|
+ cacheManager.remove('youkeTishen')
|
|
|
|
|
+ }
|
|
|
|
|
+ if (res.data.tishen.toString() == 'true') {
|
|
|
|
|
+ cacheManager.set('youkeTishen', res.data.tishen)
|
|
|
|
|
+ }
|
|
|
|
|
+ init(options)
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
@@ -296,14 +310,16 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
function onChangeTab(e) {
|
|
function onChangeTab(e) {
|
|
|
- console.log(e.detail.current);
|
|
|
|
|
-
|
|
|
|
|
- if (cacheManager.get('auth')) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ console.log(e.detail.current);
|
|
|
|
|
+
|
|
|
|
|
+ if (cacheManager.get('auth')) {
|
|
|
|
|
+
|
|
|
// 新的英语人教版
|
|
// 新的英语人教版
|
|
|
- if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
|
- currentSwiperIndex.value = e.detail.current
|
|
|
|
|
- cacheManager.updateObject('zhangInfo', { weizhiIndex: 0 })
|
|
|
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
|
+ currentSwiperIndex.value = e.detail.current
|
|
|
|
|
+ cacheManager.updateObject('zhangInfo', {
|
|
|
|
|
+ weizhiIndex: 0
|
|
|
|
|
+ })
|
|
|
cacheManager.updateObject('zhangInfo', {
|
|
cacheManager.updateObject('zhangInfo', {
|
|
|
curZid: cacheManager.get('zhangInfo').zhangList[0].zList[e.detail.current].zid
|
|
curZid: cacheManager.get('zhangInfo').zhangList[0].zList[e.detail.current].zid
|
|
|
})
|
|
})
|
|
@@ -312,7 +328,7 @@
|
|
|
cacheManager.updateObject('zhangInfo', {
|
|
cacheManager.updateObject('zhangInfo', {
|
|
|
curZhangId: cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
|
|
curZhangId: cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
|
|
|
})
|
|
})
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -350,32 +366,32 @@
|
|
|
getZhangInfo()
|
|
getZhangInfo()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- function jinggao(data){
|
|
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: data,
|
|
|
|
|
- showCancel:false,
|
|
|
|
|
- success: function (res) {
|
|
|
|
|
- if (res.confirm) {
|
|
|
|
|
- console.log('用户点击确定');
|
|
|
|
|
- } else if (res.cancel) {
|
|
|
|
|
- console.log('用户点击取消');
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- function chooseMethodUseCache() {
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+ function jinggao(data) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: data,
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ success: function(res) {
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ console.log('用户点击确定');
|
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
|
+ console.log('用户点击取消');
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function chooseMethodUseCache() {
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
// 新的英语 (人教版 之类的 新结构)
|
|
// 新的英语 (人教版 之类的 新结构)
|
|
|
if (currentProduct.value == 2 && typeId.value == 1) {
|
|
if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
- translateData(cacheManager.get('zhangInfo'))
|
|
|
|
|
- if(!cacheManager.get('zhangInfo').zhangList[0]){
|
|
|
|
|
- jinggao("cacheManager.get('zhangInfo').zhangList[0].zList")
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ translateData(cacheManager.get('zhangInfo'))
|
|
|
|
|
+ if (!cacheManager.get('zhangInfo').zhangList[0]) {
|
|
|
|
|
+ jinggao("cacheManager.get('zhangInfo').zhangList[0].zList")
|
|
|
|
|
+ }
|
|
|
zhangList.value = cacheManager.get('zhangInfo').zhangList[0].zList
|
|
zhangList.value = cacheManager.get('zhangInfo').zhangList[0].zList
|
|
|
zhangName.value = cacheManager.get('zhangInfo').zhangList[0].zhangName
|
|
zhangName.value = cacheManager.get('zhangInfo').zhangList[0].zhangName
|
|
|
const curZid = cacheManager.get('zhangInfo').curZid;
|
|
const curZid = cacheManager.get('zhangInfo').curZid;
|
|
@@ -385,10 +401,10 @@
|
|
|
} else {
|
|
} else {
|
|
|
// 之前 旧的岛 数学英语 和新的数学
|
|
// 之前 旧的岛 数学英语 和新的数学
|
|
|
const curZhangId = cacheManager.get('zhangInfo').curZhangId;
|
|
const curZhangId = cacheManager.get('zhangInfo').curZhangId;
|
|
|
- const resZhangList = cacheManager.get('zhangInfo').zhangList;
|
|
|
|
|
- if(!cacheManager.get('zhangInfo').zhangList){
|
|
|
|
|
- jinggao("resZhangList")
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ const resZhangList = cacheManager.get('zhangInfo').zhangList;
|
|
|
|
|
+ if (!cacheManager.get('zhangInfo').zhangList) {
|
|
|
|
|
+ jinggao("resZhangList")
|
|
|
|
|
+ }
|
|
|
const index = resZhangList.findIndex(item => item.zhangId == curZhangId)
|
|
const index = resZhangList.findIndex(item => item.zhangId == curZhangId)
|
|
|
console.log('index', index);
|
|
console.log('index', index);
|
|
|
translateData(cacheManager.get('zhangInfo'))
|
|
translateData(cacheManager.get('zhangInfo'))
|
|
@@ -459,7 +475,7 @@
|
|
|
translateData(res.data)
|
|
translateData(res.data)
|
|
|
zhangList.value = res.data.zhangList
|
|
zhangList.value = res.data.zhangList
|
|
|
current.value = index
|
|
current.value = index
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
recordZhangJie()
|
|
recordZhangJie()
|
|
|
})
|
|
})
|
|
|
|
|
|
|
@@ -538,14 +554,18 @@
|
|
|
function handleChangeZhang(data) {
|
|
function handleChangeZhang(data) {
|
|
|
const authCode = getUserIdentity();
|
|
const authCode = getUserIdentity();
|
|
|
if (authCode !== 'Visitor') {
|
|
if (authCode !== 'Visitor') {
|
|
|
- if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
|
- // 专属与新英语切换版本时需要修改levelId 值,重组版本zhangId
|
|
|
|
|
- const authData = cacheManager.get('auth');
|
|
|
|
|
- const levelIdData = getDataFromStr(authData.levelId)[0];
|
|
|
|
|
- cacheManager.updateObject('auth', {levelId: levelIdData+','+data.zhangId})
|
|
|
|
|
- } else {
|
|
|
|
|
- cacheManager.updateObject('zhangInfo', { curZhangId: data.zhangId })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
|
+ // 专属与新英语切换版本时需要修改levelId 值,重组版本zhangId
|
|
|
|
|
+ const authData = cacheManager.get('auth');
|
|
|
|
|
+ const levelIdData = getDataFromStr(authData.levelId)[0];
|
|
|
|
|
+ cacheManager.updateObject('auth', {
|
|
|
|
|
+ levelId: levelIdData + ',' + data.zhangId
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ cacheManager.updateObject('zhangInfo', {
|
|
|
|
|
+ curZhangId: data.zhangId
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
currentDuration.value = 0
|
|
currentDuration.value = 0
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -707,11 +727,31 @@
|
|
|
|
|
|
|
|
function listClick(data, data2, index) {
|
|
function listClick(data, data2, index) {
|
|
|
//console.log('data', data); // 节内容
|
|
//console.log('data', data); // 节内容
|
|
|
- // console.log('data2', data2); //章内容
|
|
|
|
|
- chooseMethodListClick(data, data2, index)
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // console.log('data2', data2); //章内容
|
|
|
|
|
+ if(cacheManager.get("youkeTishen").toString() =='true'){
|
|
|
|
|
+ chooseMethodListClickForTishen(data, data2, index)
|
|
|
|
|
+ }else{
|
|
|
|
|
+ chooseMethodListClick(data, data2, index)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ function chooseMethodListClickForTishen(data, data2, index) {
|
|
|
|
|
+
|
|
|
|
|
+ console.log('data', data); // 节内容
|
|
|
|
|
+ console.log('data2', data2); //章内容
|
|
|
|
|
+ const authCode = getUserIdentity();
|
|
|
|
|
+
|
|
|
|
|
+ if (currentProduct.value == 2 && typeId.value == 1) {
|
|
|
|
|
+ goDanciList(data, index)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (data.type == 2) {
|
|
|
|
|
+ // 最后一项
|
|
|
|
|
+ goKaoshi(data, index)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ goLookShipin(data, index)
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
function chooseMethodListClick(data, data2, index) {
|
|
function chooseMethodListClick(data, data2, index) {
|
|
|
|
|
|
|
|
console.log('data', data); // 节内容
|
|
console.log('data', data); // 节内容
|