index.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678
  1. <template>
  2. <view>
  3. <swiper :circular="true" @change="onChangeTab" :duration="currentDuration" :current="current"
  4. class="ezy-study-swiper" :class="'ezy-study-swiper'+ currentProduct">
  5. <swiper-item v-for="(item,index) in zhangList" :key="index">
  6. <!-- 旧的数学 -->
  7. <shuxueZhangjie v-if="currentProduct ==1&&typeId==2" @clickGradeTerm="clickGradeTerm"
  8. @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
  9. :options="item" :youkeImage="youkeImage">
  10. </shuxueZhangjie>
  11. <!-- 旧的英语 -->
  12. <yingyuZhangjie v-if="currentProduct ==2&&typeId==2" @clickGradeTerm="clickGradeTerm"
  13. @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
  14. :options="item" :youkeImage="youkeImage">
  15. </yingyuZhangjie>
  16. <!-- 新的数学 -->
  17. <shuxueNewZhangjie v-if="currentProduct ==1&&typeId==1" @clickGradeTerm="clickGradeTerm"
  18. @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
  19. :options="item" :youkeImage="youkeImage">
  20. </shuxueNewZhangjie>
  21. <!-- 新的英语(人教版等等) -->
  22. <yingyuNewZhangjie v-if="currentProduct ==2&&typeId==1" @clickGradeTerm="clickGradeTerm"
  23. @handleCheckCatalogue="handleCheckCatalogue(item)" @listClick="listClick" :gradeTerm='gradeTerm'
  24. :options="item" :zhangName="zhangName" :youkeImage="youkeImage" :youkeImageBook="youkeImageBook">
  25. </yingyuNewZhangjie>
  26. </swiper-item>
  27. </swiper>
  28. <!-- 蛋 -->
  29. <egg-dialog ref="eggDialogRef" @eggBtn="eggBtn"></egg-dialog>
  30. <catalogue ref="catalogueRef" :list=zhangList @change-zhang="handleChangeZhang"
  31. @listSelectJieClick="listSelectJieClick"></catalogue>
  32. <CustomTabBar :levelId="levelId" :currentTabNumber="0" :subjectId="subjectId" :typeId="typeId"
  33. :tipFlag="tipFlag">
  34. </CustomTabBar>
  35. <tip-small-dialog ref="goPayDialogRef" @confirm-btn="goPayPage" :content="tipContent"></tip-small-dialog>
  36. <tip-big-dialog ref="youkeDialogRef" @confirm-btn="ykConfirm" :imgShow="true"></tip-big-dialog>
  37. <dao-tip-dialog ref="daoTipDialogRef" v-if="showDaoTip" :productTip="productTipImg"
  38. @dao-tip-close="daoTipClose"></dao-tip-dialog>
  39. <tipMiddleDialog ref="tipDialogRef" :closeFlag='false' @confirm-btn="BanbenConfirmBtn" :title="tipTitle"
  40. :content="tipContentVersion"></tipMiddleDialog>
  41. </view>
  42. </template>
  43. <script setup>
  44. import daoTipDialog from './daoTipDialog.vue';
  45. import {
  46. userZhangInfo,
  47. userLocate,
  48. userZhangForntInfo,
  49. userZhangNextInfo,
  50. getCommonZhangInfo
  51. } from "@/api/learnPlan.js"
  52. import {
  53. getVersion
  54. } from "@/api/login.js"
  55. import {
  56. reactive,
  57. ref,
  58. nextTick,
  59. getCurrentInstance,
  60. onMounted
  61. } from "vue";
  62. import {
  63. onLoad
  64. } from '@dcloudio/uni-app';
  65. import catalogue from "@/components/catalogue/catalogue.vue";
  66. import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
  67. import tipSmallDialog from '@/components/dialog/tipSmallDialog.vue'
  68. import tipBigDialog from '@/components/dialog/tipBigDialog.vue';
  69. import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
  70. import dSwiper from '@/components/wSwiper/DSwiper.vue';
  71. import shuxueZhangjie from './product/shuxue.vue';
  72. import shuxueNewZhangjie from './product/shuxueNew.vue';
  73. import yingyuZhangjie from './product/yingyu.vue';
  74. import yingyuNewZhangjie from './product/yingyuNew.vue';
  75. import {
  76. useTabBarHistory
  77. } from '@/utils/emitEvents.js';
  78. import eggDialog from './eggDialog.vue'
  79. import tipDialog from '@/components/dialog/tipDialog.vue';
  80. import config from '../../config.js'
  81. import {
  82. toast,
  83. getUserIdentity
  84. } from "@/utils/common";
  85. import cacheManager from "@/utils/cacheManager.js";
  86. const tipContent = '是否前往开通付费?'; //当前产品
  87. const goPayDialogRef = ref(null);
  88. const youkeDialogRef = ref(null);
  89. const dSwiperRef = ref(null);
  90. const eggDialogRef = ref(null);
  91. const current = ref(0);
  92. const currentDuration = ref(500)
  93. const YouKeContent = '您当前的身份是游客,想要体验完整内容需注册成用户!';
  94. const tipFlag = ref(null) //游客使用
  95. const catalogueRef = ref(null);
  96. const youkeImage = ref(null);
  97. const youkeImageBook = ref(null);
  98. const currentProduct = ref(null);
  99. const localAuth = ref(null);
  100. const levelId = ref(null); //游客使用
  101. const subjectId = ref(null); //游客使用
  102. const youkeZhangId = ref(null); //游客使用
  103. const zhangName = ref(null);
  104. const typeId = ref(null);
  105. const zhangList = ref(null);
  106. const gradeTerm = ref(null);
  107. let infoData = reactive({
  108. jieList: [],
  109. haveFlag: '',
  110. number: '',
  111. zhangId: '',
  112. zhangName: '',
  113. numberStr: '',
  114. });
  115. const termMapping = {
  116. 1: ' 数学',
  117. 2: ' 英语'
  118. };
  119. const daoTipDialogRef = ref(null);
  120. const showDaoTip = ref(true);
  121. const productTipImg = ref('');
  122. const version = config.appInfo.version;
  123. const tipDialogRef = ref(null);
  124. const tipTitle = '升级提醒';
  125. const tipContentVersion = '您的APP不是最新版本,部分功能不能使用,请升级至最新版本!';
  126. onLoad((options) => {
  127. init(options);
  128. getLoginInit()
  129. })
  130. function listSelectJieClick(item, data, index) {
  131. if (cacheManager.get('auth')) {
  132. cacheManager.updateObject('auth', {
  133. currentZhang: zhangList.value.findIndex(citem => citem.zhangId == item.zhangId),
  134. zhangId: item.zhangId
  135. })
  136. }
  137. listClick(data, item, index);
  138. }
  139. function BanbenConfirmBtn() {
  140. const systemInfo = uni.getSystemInfoSync();
  141. if (systemInfo.platform == 'ios') {
  142. const appStoreUrl = 'itms-apps://itunes.apple.com/app/6741551741'
  143. plus.runtime.openURL(appStoreUrl)
  144. } else {
  145. }
  146. }
  147. function getLoginInit() {
  148. getVersion({}).then(res => {
  149. if (version != res.data.version) {
  150. tipDialogRef.value.handleShow();
  151. }
  152. })
  153. }
  154. function getProjectImg() {
  155. if (currentProduct.value == 1 && typeId.value == 2) {
  156. // 数学
  157. productTipImg.value = 'static/images/study/shuxue/shuxue-tip.gif';
  158. getBj('shuxue')
  159. } else if (currentProduct.value == 2 && typeId.value == 2) {
  160. // 英语
  161. productTipImg.value = 'static/images/study/yingyu/yingyu-tip.gif'
  162. getBj('yingyu');
  163. } else if (currentProduct.value == 1 && typeId.value == 1) {
  164. // 数学新(计算特训)
  165. productTipImg.value = 'static/images/study/jstx/jstx-tip.gif'
  166. getBj('shuxueNew');
  167. } else if (currentProduct.value == 2 && typeId.value == 1) {
  168. // 英语新(超级单词)
  169. productTipImg.value = 'static/images/study/jstx/yingyu-tip.gif'
  170. getBj('yingyuNew');
  171. }
  172. }
  173. function getBj(data) {
  174. let bjType = cacheManager.get('dao-tip')[data];
  175. if (cacheManager.get('auth')) {
  176. // 非游客
  177. if (bjType !== 'has') {
  178. nextTick(() => {
  179. daoTipDialogRef.value.handleShow();
  180. })
  181. }
  182. } else {
  183. // 游客
  184. if (tipFlag.value === '0') {
  185. nextTick(() => {
  186. daoTipDialogRef.value.handleShow();
  187. })
  188. }
  189. }
  190. }
  191. function daoTipClose() {
  192. if (cacheManager.get('auth')) {
  193. // 非游客 记缓存
  194. if (currentProduct.value == 1 && typeId.value == 2) {
  195. // 数学
  196. cacheManager.updateObject('dao-tip', {
  197. shuxue: 'has'
  198. })
  199. } else if (currentProduct.value == 2 && typeId.value == 2) {
  200. // 英语
  201. cacheManager.updateObject('dao-tip', {
  202. yingyu: 'has'
  203. })
  204. } else if (currentProduct.value == 1 && typeId.value == 1) {
  205. // 数学新(计算特训)
  206. cacheManager.updateObject('dao-tip', {
  207. shuxueNew: 'has'
  208. })
  209. } else if (currentProduct.value == 2 && typeId.value == 1) {
  210. // 英语新(超级单词)
  211. cacheManager.updateObject('dao-tip', {
  212. yingyuNew: 'has'
  213. })
  214. }
  215. } else {
  216. //游客
  217. tipFlag.value = '1';
  218. }
  219. }
  220. function onChangeTab(e) {
  221. console.log('e', e);
  222. console.log(e.detail.current);
  223. if (cacheManager.get('auth')) {
  224. // 新的英语人教版
  225. if (currentProduct.value == 2 && typeId.value == 1) {
  226. infoData.zhangId = cacheManager.get('zhangInfo').zhangList[0].zhangId
  227. cacheManager.updateObject('auth', {
  228. currentZhang: e.detail.current,
  229. zhangId: infoData.zhangId
  230. })
  231. } else {
  232. // 旧的数学 英语 新的数学
  233. infoData.zhangId = cacheManager.get('zhangInfo').zhangList[e.detail.current].zhangId
  234. cacheManager.updateObject('auth', {
  235. currentZhang: e.detail.current,
  236. zhangId: infoData.zhangId
  237. })
  238. }
  239. }
  240. }
  241. function init(options) {
  242. if (cacheManager.get('auth')) {
  243. localAuth.value = cacheManager.get('auth');
  244. currentProduct.value = localAuth.value.subjectId;
  245. typeId.value = localAuth.value.typeId;
  246. console.log(localAuth.value);
  247. // 已登录
  248. if (localAuth.value.firstLogin) {
  249. nextTick(() => {
  250. eggDialogRef.value.eggShow();
  251. })
  252. }
  253. if (!cacheManager.get('daoPageCache').isCache) {
  254. console.log('不实用换葱');
  255. chooseMethodNoCache()
  256. } else {
  257. console.log('shiyonghuancun');
  258. chooseMethodUseCache()
  259. }
  260. // 已登录付费未支付选择返回 -> 恢复弹窗
  261. if (options.studyWithCatalgue) {
  262. // 展开弹窗
  263. nextTick(() => {
  264. catalogueRef.value.showPopup({
  265. zhangId: infoData.zhangId
  266. });
  267. })
  268. }
  269. } else {
  270. chooseMethodYouke(options)
  271. }
  272. }
  273. function chooseMethodNoCache() {
  274. // 新的英语 (人教版 之类的 新结构)
  275. if (currentProduct.value == 2 && typeId.value == 1) {
  276. getZhangInfoNewYingyu()
  277. } else {
  278. // 之前 旧的岛 数学英语 和新的数学
  279. getZhangInfo()
  280. }
  281. }
  282. function chooseMethodUseCache() {
  283. // 新的英语 (人教版 之类的 新结构)
  284. if (currentProduct.value == 2 && typeId.value == 1) {
  285. translateData(cacheManager.get('zhangInfo'))
  286. zhangList.value = cacheManager.get('zhangInfo').zhangList[0].zList
  287. zhangName.value = cacheManager.get('zhangInfo').zhangList[0].zhangName
  288. current.value = cacheManager.get('auth').currentZhang
  289. infoData.zhangId = cacheManager.get('zhangInfo').zhangList[0].zhangId
  290. recordZhangJie()
  291. } else {
  292. // 之前 旧的岛 数学英语 和新的数学
  293. translateData(cacheManager.get('zhangInfo'))
  294. zhangList.value = cacheManager.get('zhangInfo').zhangList
  295. current.value = cacheManager.get('auth').currentZhang
  296. infoData.zhangId = cacheManager.get('zhangInfo').zhangList[current.value].zhangId
  297. recordZhangJie()
  298. }
  299. }
  300. function chooseMethodYouke(options) {
  301. subjectId.value = options.subjectId
  302. typeId.value = options.typeId
  303. levelId.value = options.levelId
  304. tipFlag.value = options.tipFlag;
  305. currentProduct.value = options.subjectId
  306. youkeZhangId.value = options.youkeZhangId
  307. if (subjectId.value == 2 && typeId.value == 1) {
  308. // 新英语
  309. getCommonZhangNewYingyu(options)
  310. } else {
  311. // 未登录 游客 旧的数学 英语 新数学
  312. getCommonZhang(options)
  313. }
  314. getProjectImg()
  315. }
  316. // 新的英语 (人教版 之类的 新结构)
  317. function getZhangInfoNewYingyu(data) {
  318. let req = {
  319. levelId: localAuth.value.levelId,
  320. // levelId: 31,
  321. zhangId: localAuth.value.zhangId
  322. // zhangId: 195
  323. }
  324. userZhangInfo(req).then(res => {
  325. cacheManager.set('zhangInfo', res.data)
  326. let zhang = cacheManager.get('zhangInfo').zhangList[0].zList.findIndex(zhang => zhang.zid == localAuth
  327. .value.zhangId);
  328. console.log('zhang', zhang);
  329. if (zhang != -1) {
  330. cacheManager.updateObject('auth', {
  331. currentZhang: zhang
  332. })
  333. } else {
  334. cacheManager.updateObject('auth', {
  335. currentZhang: 0
  336. })
  337. }
  338. cacheManager.set('daoPageCache', {
  339. isCache: true
  340. })
  341. nextTick(() => {
  342. translateData(res.data)
  343. zhangList.value = res.data.zhangList[0].zList
  344. zhangName.value = res.data.zhangList[0].zhangName
  345. current.value = cacheManager.get('auth').currentZhang
  346. infoData.zhangId = res.data.zhangList[0].zhangId
  347. recordZhangJie()
  348. })
  349. }).catch((err) => {
  350. toast('数据异常,请重新登录!')
  351. cacheManager.clearAll();
  352. uni.reLaunch({
  353. url: '/pages/login/index'
  354. });
  355. })
  356. }
  357. //旧的岛 数学英语 和新的数学
  358. function getZhangInfo(data) {
  359. let req = {
  360. levelId: localAuth.value.levelId
  361. }
  362. userZhangInfo(req).then(res => {
  363. cacheManager.set('zhangInfo', res.data)
  364. let zhang = cacheManager.get('zhangInfo').zhangList.findIndex(zhang => zhang.zhangId == localAuth
  365. .value.zhangId);
  366. console.log('zhang', zhang);
  367. if (zhang != -1) {
  368. cacheManager.updateObject('auth', {
  369. currentZhang: zhang
  370. })
  371. } else {
  372. cacheManager.updateObject('auth', {
  373. currentZhang: 0
  374. })
  375. }
  376. cacheManager.set('daoPageCache', {
  377. isCache: true
  378. })
  379. nextTick(() => {
  380. translateData(res.data)
  381. zhangList.value = res.data.zhangList
  382. current.value = cacheManager.get('auth').currentZhang
  383. infoData.zhangId = res.data.zhangList[current.value].zhangId
  384. recordZhangJie()
  385. })
  386. }).catch((err) => {
  387. toast('数据异常,请重新登录!')
  388. cacheManager.clearAll();
  389. uni.reLaunch({
  390. url: '/pages/login/index'
  391. });
  392. })
  393. }
  394. function getCommonZhangNewYingyu(data) {
  395. let req = {
  396. levelId: data.levelId,
  397. zhangId: data.youkeZhangId
  398. }
  399. getCommonZhangInfo(req).then(res => {
  400. translateData(res.data)
  401. youkeImage.value = res.data.icon
  402. youkeImageBook.value = res.data.zhangIcon
  403. zhangList.value = res.data.zhangList[0].zList
  404. zhangName.value = res.data.zhangList[0].zhangName
  405. current.value = 0
  406. }).catch((err) => {
  407. toast('数据异常,请重新登录!')
  408. cacheManager.clearAll();
  409. uni.reLaunch({
  410. url: '/pages/login/index'
  411. });
  412. })
  413. }
  414. function getCommonZhang(data) {
  415. let req = {
  416. levelId: data.levelId,
  417. }
  418. getCommonZhangInfo(req).then(res => {
  419. translateData(res.data)
  420. youkeImage.value = res.data.icon
  421. zhangList.value = res.data.zhangList
  422. current.value = 0
  423. }).catch((err) => {
  424. toast('数据异常,请重新登录!')
  425. cacheManager.clearAll();
  426. uni.reLaunch({
  427. url: '/pages/login/index'
  428. });
  429. })
  430. }
  431. function recordZhangJie() {
  432. let req = {
  433. levelId: localAuth.value.levelId,
  434. userId: localAuth.value.userId,
  435. zhangId: infoData.zhangId,
  436. subjectId: currentProduct.value
  437. }
  438. userLocate(req).then(res => {
  439. })
  440. }
  441. function goPayPage() {
  442. let zhangInfoLocal = cacheManager.get('zhangInfo')
  443. if (!zhangInfoLocal.cardId) {
  444. toast("cardId 丢失请重新选择学科LevelId");
  445. return false
  446. }
  447. uni.redirectTo({
  448. url: '/pages/mall/mallPage?cardId=' + zhangInfoLocal.cardId + '&from=daoPage' + '&subjectId=' +
  449. zhangInfoLocal.subjectId
  450. })
  451. }
  452. function handleChangeZhang(data) {
  453. console.log(data);
  454. const authCode = getUserIdentity();
  455. if (authCode !== 'Visitor') {
  456. cacheManager.updateObject('auth', {
  457. zhangId: data.zhangId,
  458. currentZhang: zhangList.value.findIndex(citem => citem.zhangId == data.zhangId),
  459. })
  460. }
  461. currentDuration.value = 0
  462. setTimeout(() => {
  463. current.value = data.number - 1
  464. nextTick(() => {
  465. currentDuration.value = 500
  466. })
  467. }, 100)
  468. // init()
  469. }
  470. function goKaoshi(data) {
  471. uni.redirectTo({
  472. // url: `/pages/unitTest/index?jieNumber=` + data.number
  473. url: `/pages/unitTest/index?jieId=` + data.jieId
  474. })
  475. }
  476. function goDanciList(data, index) {
  477. if (!cacheManager.get('auth')) {
  478. let youkeData = {
  479. subjectId: subjectId.value,
  480. typeId: typeId.value,
  481. levelId: levelId.value,
  482. tipFlag: tipFlag.value,
  483. youkeZhangId: youkeZhangId.value,
  484. jieId: data.jieId
  485. }
  486. uni.redirectTo({
  487. url: '/pages/wordList/wordList?youkePageData=' + JSON.stringify(youkeData)
  488. })
  489. } else {
  490. // uni.redirectTo({
  491. // url: '/pages/wordList/wordList?jieId=666'
  492. // })
  493. uni.redirectTo({
  494. url: '/pages/wordList/wordList?jieId=' + data.jieId
  495. })
  496. }
  497. }
  498. function goLookShipin(data, index) {
  499. if (!cacheManager.get('auth')) {
  500. console.log('zhangList.value[0].jieList', zhangList.value[0].jieList);
  501. console.log('zhangList.value[0].jieList.index', zhangList.value[0].jieList[index]);
  502. let youkeData = {
  503. levelId: levelId.value,
  504. typeId: typeId.value,
  505. subjectId: subjectId.value,
  506. tipFlag: tipFlag.value,
  507. jieList: zhangList.value[0].jieList[index],
  508. jieName: zhangList.value[0].jieList[index].jieName
  509. }
  510. if (youkeData.typeId == 1) {
  511. if (!data.videoId) {
  512. toast("videoId 丢失!");
  513. return false
  514. }
  515. uni.redirectTo({
  516. url: '/pages/study/lookShipinNew?youkePageData=' + JSON.stringify(youkeData)
  517. })
  518. } else {
  519. if (!data.videoId) {
  520. toast("videoId 丢失!");
  521. return false
  522. }
  523. uni.redirectTo({
  524. url: '/pages/study/lookShipin?youkePageData=' + JSON.stringify(youkeData)
  525. })
  526. }
  527. } else {
  528. if (typeId.value == 1) {
  529. // 1新 2旧
  530. if (!data.videoId) {
  531. toast("videoId 丢失!");
  532. return false
  533. }
  534. uni.redirectTo({
  535. url: '/pages/study/lookShipinNew?jieId=' + data.jieId
  536. })
  537. } else {
  538. if (!data.videoId) {
  539. toast("videoId 丢失!");
  540. return false
  541. }
  542. uni.redirectTo({
  543. url: '/pages/study/lookShipin?jieId=' + data.jieId
  544. })
  545. }
  546. }
  547. }
  548. function translateData(data) {
  549. // gradeTerm.value = termMapping[data.subjectId] +' · '+ data.levelName
  550. gradeTerm.value = data.levelName
  551. }
  552. function listClick(data, data2, index) {
  553. //console.log('data', data); // 节内容
  554. // console.log('data2', data2); //章内容
  555. chooseMethodListClick(data, data2, index)
  556. }
  557. function chooseMethodListClick(data, data2, index) {
  558. // console.log('data', data); // 节内容
  559. // console.log('data2', data2); //章内容
  560. const authCode = getUserIdentity();
  561. if (currentProduct.value == 2 && typeId.value == 1) {
  562. const isFirst = data.jieName == data2.jieList[0].jieName
  563. if (!cacheManager.get('auth') && !isFirst) {
  564. youkeDialogRef.value.handleShow();
  565. return false;
  566. }
  567. // console.log('authCode', authCode);
  568. if (!(authCode == 'VIP' || isFirst)) {
  569. goPayDialogRef.value.handleShow();
  570. return false
  571. }
  572. goDanciList(data, index)
  573. } else {
  574. if (!cacheManager.get('auth') && data.firstFlag != 1) {
  575. youkeDialogRef.value.handleShow();
  576. return;
  577. }
  578. console.log('authCode', authCode);
  579. if (!(authCode == 'VIP' || data.firstFlag == 1)) {
  580. // debugger
  581. goPayDialogRef.value.handleShow();
  582. return false
  583. }
  584. if (data.type == 2) {
  585. // 最后一项
  586. goKaoshi(data, index)
  587. } else {
  588. goLookShipin(data, index)
  589. }
  590. }
  591. }
  592. function handleCheckCatalogue(item) {
  593. catalogueRef.value.showPopup(item);
  594. }
  595. function clickGradeTerm() {
  596. // if(cacheManager.get('auth')){
  597. // cacheManager.updateObject('auth', {
  598. // currentZhang: 0
  599. // })
  600. // }
  601. uni.navigateTo({
  602. url: `/pages/selectGradesTerms/index?tipFlag=${tipFlag.value}&from=daoPage&productId=${levelId.value}&xuekeId=${subjectId.value}`
  603. })
  604. }
  605. // 游客弹窗---确定
  606. function ykConfirm() {
  607. uni.redirectTo({
  608. url: '/pages/login/index'
  609. });
  610. }
  611. function eggBtn() {
  612. console.log('点击:开启提分之旅');
  613. getProjectImg();
  614. cacheManager.updateObject('auth', {
  615. firstLogin: false
  616. })
  617. }
  618. </script>
  619. <style>
  620. </style>