index.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446
  1. <template>
  2. <view class="learnings">
  3. <nav-logo title="学习中心"></nav-logo>
  4. <u-line color="#D6D6DB" />
  5. <view class="contents">
  6. <!-- <view class="diatance">
  7. <image class="clock" src="/static/learn/clock.png" mode=""></image>
  8. <text>
  9. 一级建造师,距离考试还有
  10. </text>
  11. <u-count-down :timestamp="leftDays" :show-days="true" separator="zh"
  12. :show-hours="false" :show-minutes="false" :show-seconds="false" font-size="28"
  13. bg-color="#007AFF" separator-color="#fff" color="#fff" separator-size="28">
  14. </u-count-down>
  15. </view> -->
  16. <!-- 有学习的课程 -->
  17. <view v-if="allCourse" class="had_courses">
  18. <!-- 直播 -->
  19. <view v-if="livingLists.length" class="lives">
  20. <view
  21. v-for="(live, l_index) in livingLists"
  22. :key="l_index"
  23. class="live_item"
  24. @click="toLiveLook(live)"
  25. >
  26. <view class="live_con">
  27. <view class="live_status">
  28. <image
  29. v-if="bgShow(live.liveStartTime, live.watchStatus)"
  30. src="/static/learn/living.png"
  31. class="liv_icon"
  32. ></image>
  33. <image
  34. v-else
  35. src="/static/learn/wlive.png"
  36. class="liv_icon"
  37. ></image>
  38. <text class="status_s">{{
  39. live.liveStartTime | liveStatus(live.watchStatus)
  40. }}</text>
  41. <view
  42. class="look_bt"
  43. :class="{
  44. living:
  45. lookTimeStatus(live.liveStartTime, live.watchStatus) == 1,
  46. futuring:
  47. lookTimeStatus(live.liveStartTime, live.watchStatus) == 4,
  48. curring: [2, 3].includes(
  49. lookTimeStatus(live.liveStartTime, live.watchStatus)
  50. ),
  51. }"
  52. >
  53. <text
  54. v-if="
  55. lookTimeStatus(live.liveStartTime, live.watchStatus) == 1
  56. "
  57. >点击观看</text
  58. >
  59. <text
  60. v-if="
  61. lookTimeStatus(live.liveStartTime, live.watchStatus) == 2
  62. "
  63. >即将开播</text
  64. >
  65. <template
  66. v-if="
  67. lookTimeStatus(live.liveStartTime, live.watchStatus) == 3
  68. "
  69. >
  70. 剩余:
  71. <u-count-down
  72. :timestamp="curTimeTamp(live.liveStartTime)"
  73. :show-days="false"
  74. color="#fff"
  75. separator-color="#fff"
  76. font-size="24"
  77. separator-size="24"
  78. bg-color="#FFB102"
  79. >
  80. </u-count-down>
  81. </template>
  82. <template
  83. v-if="
  84. lookTimeStatus(live.liveStartTime, live.watchStatus) == 4
  85. "
  86. >
  87. 剩余:
  88. <u-count-down
  89. :timestamp="curTimeTamp(live.liveStartTime)"
  90. :show-days="true"
  91. separator="zh"
  92. color="#fff"
  93. separator-color="#fff"
  94. bg-color="#007AFF"
  95. :show-hours="false"
  96. :show-minutes="false"
  97. :show-seconds="false"
  98. font-size="24"
  99. separator-size="24"
  100. >
  101. </u-count-down>
  102. <u-count-down
  103. :timestamp="curTimeTamp(live.liveStartTime)"
  104. :show-days="false"
  105. color="#fff"
  106. separator-color="#fff"
  107. bg-color="#007AFF"
  108. font-size="24"
  109. separator-size="24"
  110. >
  111. </u-count-down>
  112. </template>
  113. </view>
  114. </view>
  115. <view class="liv_time">
  116. <text class="timeR">{{
  117. live.liveStartTime | formate("mm月dd日")
  118. }}</text>
  119. <text>{{ live.liveStartTime | formate("hh:mm") }}</text>
  120. </view>
  121. <view class="liv_title">{{ live.name }}</view>
  122. </view>
  123. <image
  124. v-if="bgShow(live.liveStartTime, live.watchStatus)"
  125. src="/static/learn/living_bg.png"
  126. class="my_bg"
  127. >
  128. </image>
  129. <image
  130. v-else
  131. src="/static/learn/wlive_bg.png"
  132. class="my_bg"
  133. ></image>
  134. </view>
  135. </view>
  136. <!-- 我的课程 -->
  137. <view v-if="courseLists.length" class="my_courses">
  138. <text class="titles">我的课程</text>
  139. <view
  140. v-for="(item, index) in courseLists"
  141. :key="index"
  142. class="course_item"
  143. >
  144. <view
  145. class="c_downs"
  146. @click="studyIn(item.goodsId, item.gradeId, item, index)"
  147. >
  148. <view class="lefts">
  149. <image
  150. class="lefet_img"
  151. :src="$method.splitImgHost(item.coverUrl, true)"
  152. mode=""
  153. ></image>
  154. <view v-if="item.goodsType == 6" class="live_icon">直播</view>
  155. </view>
  156. <view class="rights">
  157. <view class="learn_progress">
  158. <view class="progress_up">
  159. <view class="cou_titles line2">{{ item.goodsName }}</view>
  160. <view class="classHour">
  161. <text
  162. >{{
  163. item.courseNum || item.courseNum == 0
  164. ? item.courseNum
  165. : "-"
  166. }}课程/</text
  167. >
  168. <text
  169. >{{
  170. item.classHours || item.classHours == 0
  171. ? item.classHours
  172. : "-"
  173. }}学时/</text
  174. >
  175. <text>{{ item.secAllNum + item.examNum || "-" }}节</text>
  176. </view>
  177. </view>
  178. </view>
  179. </view>
  180. </view>
  181. <view class="course_item_info" v-if="item.goodsType !== 6">
  182. <view>
  183. <text>学习状态:</text>
  184. <view
  185. style="display: inline-block; font-size: 24rpx"
  186. v-html="backLearStatusText(item)"
  187. ></view>
  188. </view>
  189. <view>
  190. <text>学习进度:</text>
  191. <text>
  192. {{ item.stuAllNum + item.recordNum }}/{{
  193. item.secAllNum + item.examNum
  194. }}
  195. </text>
  196. </view>
  197. <view>
  198. <text>学习服务:</text>
  199. <text>
  200. {{
  201. $method.formDate(item.serviceStartTime, "yyyy/mm/dd")
  202. }}至{{
  203. $method.formDate(item.serviceEndTime, "yyyy/mm/dd")
  204. }}</text
  205. >
  206. </view>
  207. <view>
  208. <text>班级状态:</text>
  209. <text>
  210. {{ classStatusCompt(item, sysTime) }}
  211. </text>
  212. </view>
  213. <view>
  214. <text>班级有效:</text>
  215. <template v-if="item.classEndTime">
  216. <text>
  217. {{ $method.formDate(item.classEndTime, "yyyy/mm/dd") }}
  218. </text>
  219. <text class="eb"
  220. >(剩余{{
  221. $method.GetRTime(item.classEndTime) > 0
  222. ? $method.GetRTime(item.classEndTime)
  223. : 0
  224. }}天)</text
  225. >
  226. </template>
  227. <text v-else>——</text>
  228. </view>
  229. <view
  230. class="class-warm"
  231. v-if="item.subscribeId != null && item.periodStatus == 1"
  232. >
  233. <view class="class-warm__text">
  234. <view class="date">
  235. <view v-if="item.subExamStatus === null">待预约考试</view>
  236. <view
  237. v-else-if="
  238. item.subExamStatus === 0 &&
  239. sysTime <
  240. $method.TimeTotimestamp(
  241. $method.timestampToTime(
  242. item.subApplySiteExamTime,
  243. true
  244. ) +
  245. ' ' +
  246. item.subApplySiteStartTime
  247. )
  248. "
  249. >
  250. 待考试,考试时间:
  251. {{
  252. $method.timestampToTime(
  253. item.subApplySiteExamTime,
  254. true
  255. ) +
  256. " " +
  257. item.subApplySiteStartTime
  258. }}
  259. -
  260. {{
  261. $method.timestampToTime(
  262. item.subApplySiteExamTime,
  263. true
  264. ) +
  265. " " +
  266. item.subApplySiteEndTime
  267. }}
  268. </view>
  269. <view v-else-if="item.subExamStatus === 0"
  270. >待出考试结果</view
  271. >
  272. <view v-else-if="item.subExamStatus === 1">
  273. <text v-if="item.subResult === null">待出考试结果</text>
  274. <text v-if="item.subResult === 0"
  275. >考试结果:不通过,需补考</text
  276. >
  277. <text v-else-if="item.subResult === 1"
  278. >考试结果:通过,考试成绩为{{
  279. item.subPerformance
  280. }}</text
  281. >
  282. </view>
  283. <view v-else-if="item.subExamStatus === 2"
  284. >缺考,无成绩,需补考</view
  285. >
  286. <view v-else-if="item.subExamStatus === 3"
  287. >作弊,无成绩,需补考</view
  288. >
  289. <view v-else-if="item.subExamStatus === 4"
  290. >替考,无成绩,需补考</view
  291. >
  292. </view>
  293. </view>
  294. </view>
  295. </view>
  296. <view class="study_tips">
  297. <div
  298. v-if="
  299. item.erJianErZao && !item.classEndTime && !item.classStartTime
  300. "
  301. >
  302. 温馨提示:当前班级正在申请中,正式开班后方可进行学习,请耐心等待
  303. </div>
  304. <div
  305. v-if="
  306. $method.GetRTime(item.serviceEndTime) <= 20 &&
  307. $method.GetRTime(item.serviceEndTime) >= 0 &&
  308. (item.periodStatus == 0 || item.periodStatus == -1)
  309. "
  310. >
  311. 温馨提示:当前学习服务期至{{
  312. $method.timestampToTime(item.serviceEndTime)
  313. }},超期学时无效,为防审核异常请于{{
  314. $method.timestampToTime(item.serviceEndTime - 864000, false)
  315. }}
  316. 前完成学习,当前剩余有效学习时间为{{
  317. $method.GetRTime(item.serviceEndTime) < 0
  318. ? 0
  319. : $method.GetRTime(item.serviceEndTime)
  320. }}天。
  321. </div>
  322. <div
  323. v-if="
  324. item.gradeStatus == 1 &&
  325. item.status == 1 &&
  326. item.serviceEndTime > sysTime &&
  327. item.serviceStartTime < sysTime &&
  328. item.classEndTime &&
  329. item.classEndTime < sysTime &&
  330. (item.periodStatus == 0 || item.periodStatus == -1)
  331. "
  332. >
  333. <span v-if="item.studyCount > 0"
  334. >温馨提示:班级已过期,如需重新学习,请点击右侧“选班重学”按钮。</span
  335. >
  336. <span v-else
  337. >温馨提示:班级已过期,您的重学次数已用完,如有疑问请联系{{
  338. eduPhone
  339. }}</span
  340. >
  341. </div>
  342. <div v-if="item.serviceEndTime && item.serviceEndTime < sysTime">
  343. 温馨提示:学习服务期已截至,如有疑问请联系:{{ eduPhone }}
  344. </div>
  345. <div v-if="item.periodStatus === 2">
  346. 温馨提示:您已完成本课程所有学时学习,我校将对学时进行审核,审核及推送时长预估15个工作日,如有疑问请联系:{{
  347. eduPhone
  348. }},学时查询网址:http://gdzczx.gdcic.net
  349. </div>
  350. <div v-if="item.periodStatus === 1">
  351. 温馨提示:您的班级学习初审已通过,待广东省建设信息中心归集学时,归集完成即为完成本次继续教育学习。归集学时需约10-15个工作日,具体以广东省建设执业资格注册服务平台的“继续教育学时查询”公布学时记录为准,学时查询网址:http://gdzczx.gdcic.net
  352. </div>
  353. </view>
  354. <!-- 按钮 -->
  355. <view class="study_btns">
  356. <template
  357. v-if="
  358. item.gradeStatus == 1 &&
  359. item.status == 1 &&
  360. item.serviceEndTime > sysTime &&
  361. item.serviceStartTime < sysTime &&
  362. item.classEndTime &&
  363. item.classEndTime < sysTime &&
  364. (item.periodStatus == 0 || item.periodStatus == -1) &&
  365. item.userStudyCount > 0
  366. "
  367. >
  368. <view
  369. class="exam_word ones"
  370. @click.stop="selectClass(item, index)"
  371. >
  372. 选班重学
  373. </view>
  374. </template>
  375. <!-- examApplyGoodsList.length -是判断是否关联指定学员 -->
  376. <!-- item.applyStatus === 1 &&
  377. !(
  378. sysTime <= item.serviceStartTime ||
  379. sysTime >= item.serviceEndTime ||
  380. (item.classStartTime && sysTime <= item.classStartTime) ||
  381. (item.classEndTime && sysTime >= item.classEndTime) ||
  382. item.learningStatus == 2 ||
  383. item.classStatus == 0 ||
  384. (item.learningStatus == 3 &&
  385. sysTime < item.learningTimeStart) ||
  386. !item.examApplyGoodsList.length
  387. ) -->
  388. <view v-else class="exam_btns">
  389. <view
  390. class="box_appoint"
  391. v-if="item.examApplyGoodsList"
  392. @click="appointment(item)"
  393. >
  394. <view class="exam_word ones">预约考试</view>
  395. </view>
  396. <view
  397. class="box_appoint"
  398. v-if="
  399. item.beforeStatus === 1 &&
  400. !(
  401. sysTime <= item.serviceStartTime ||
  402. sysTime >= item.serviceEndTime ||
  403. (item.classStartTime && sysTime <= item.classStartTime) ||
  404. (item.classEndTime && sysTime >= item.classEndTime) ||
  405. item.learningStatus == 2 ||
  406. item.classStatus == 0 ||
  407. (item.learningStatus == 3 &&
  408. sysTime < item.learningTimeStart)
  409. )
  410. "
  411. @click="appBeforeAddress(item.goodsId, item)"
  412. >
  413. <view class="exam_word ones">进入刷题</view>
  414. </view>
  415. </view>
  416. <view
  417. class="box_appoint"
  418. @click="studyIn(item.goodsId, item.gradeId, item, index)"
  419. >
  420. <view class="exam_word intos">进入学习</view>
  421. </view>
  422. </view>
  423. </view>
  424. </view>
  425. </view>
  426. <!-- 没有学习的课程 -->
  427. <view v-if="!allLoading && !allCourse" class="no_datas">
  428. <image
  429. class="courses"
  430. src="/static/learn/no_course.png"
  431. mode=""
  432. ></image>
  433. <view class="no_learns">您目前没有可学习的课程</view>
  434. <view class="choose" @click="toChoose()">立即去选购</view>
  435. </view>
  436. </view>
  437. <!-- 弹窗 -->
  438. <u-popup
  439. v-model="selectClassModal"
  440. @close="gradeValue = -1"
  441. mode="bottom"
  442. border-radius="40"
  443. >
  444. <view class="popup_box">
  445. <view style="margin-bottom: 20rpx">
  446. <view class="line1"></view>
  447. <view class="grade">选择班级</view>
  448. </view>
  449. <u-line color="#D6D6DB" />
  450. <view>
  451. <scroll-view scroll-y="true" style="height: 500rpx">
  452. <view>
  453. <u-radio-group v-model="gradeValue" @change="radioGroupChange">
  454. <view v-for="(item, index) in gradeList" :key="index">
  455. <view
  456. style="display: flex; align-items: center; padding: 20rpx"
  457. >
  458. <view>
  459. <u-radio
  460. shape="circle"
  461. :name="index"
  462. :disabled="
  463. item.studentNum > 0 &&
  464. item.studentNum == item.studentUpper
  465. "
  466. >
  467. <view
  468. :class="
  469. item.checked ? 'white-box blue-box' : 'white-box'
  470. "
  471. >
  472. <view>
  473. <view class="blackTxt">{{ item.className }}</view>
  474. <view class="redTxt" v-if="item.classEndTime">
  475. 有效期至:{{
  476. $method.timestampToTime(
  477. item.classEndTime,
  478. true,
  479. true
  480. )
  481. }}
  482. </view>
  483. <view class="redTxt" v-if="item.classEndTime">
  484. 本班还剩{{
  485. $method.GetRTime(item.classEndTime)
  486. }}天将结束学习</view
  487. >
  488. </view>
  489. </view>
  490. </u-radio>
  491. </view>
  492. </view>
  493. </view>
  494. </u-radio-group>
  495. </view>
  496. </scroll-view>
  497. </view>
  498. <view class="confrim-btn">
  499. <view class="okBtn" @click="okPopup()">确定</view>
  500. </view>
  501. </view>
  502. </u-popup>
  503. <u-modal
  504. v-model="showUserConfirmInfo"
  505. @confirm="confirmUserConfirm"
  506. ref="uModal"
  507. :async-close="true"
  508. @cancel="cancelUserConfirm"
  509. :confirm-text="
  510. '确认' + (confirmCount > 0 ? '(' + confirmCount + ')' : '')
  511. "
  512. :confirm-color="confirmCount > 0 ? '#999' : '#2979ff'"
  513. class="confirm-modal"
  514. title="实名验证确认"
  515. cancel="取消"
  516. :show-cancel-button="true"
  517. >
  518. <view class="slot-content">
  519. <view class="content">
  520. <!-- ,立刻联系020-38946666 -->
  521. 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作。
  522. <view class="msg-list" v-if="userInfo">
  523. <view class="item">
  524. <text class="item__left">姓名:</text>
  525. <text class="item__right">{{ userInfo.realname }}</text>
  526. </view>
  527. <view class="item">
  528. <text class="item__left">手机号:</text>
  529. <text class="item__right">{{ userInfo.telphone }}</text>
  530. </view>
  531. <view class="item">
  532. <text class="item__left">身份号:</text>
  533. <text class="item__right">{{ userInfo.idCard }}</text>
  534. </view>
  535. <view class="item">
  536. <u-checkbox v-model="confirmChecked" :label-disabled="false"
  537. >确认个人信息无误</u-checkbox
  538. >
  539. </view>
  540. </view>
  541. </view>
  542. </view>
  543. </u-modal>
  544. <!-- 多个预约考试时的弹窗 -->
  545. <u-popup v-model="appointTestShow" mode="bottom" border-radius="40">
  546. <view class="popuptest_box">
  547. <view class="check_head">
  548. <view class="headers">
  549. <view class="grade">预约考试</view>
  550. <u-icon
  551. name="close"
  552. color="#9C9C9C"
  553. size="40"
  554. @click="closePop()"
  555. ></u-icon>
  556. </view>
  557. </view>
  558. <view class="check_con">
  559. <scroll-view scroll-y="true" style="height: 700rpx">
  560. <view
  561. class="course_items"
  562. v-for="(appoint, index) in appointTestList"
  563. :key="index"
  564. >
  565. <view class="course_lefts">
  566. <view class="course_title">{{ appoint.applyName }}</view>
  567. </view>
  568. <view class="course_rights" @click="jumpTest(appoint)">
  569. <view
  570. class="intoStudy"
  571. v-if="appointItemIndex.subscribeSign !== 2"
  572. >预约</view
  573. >
  574. </view>
  575. </view>
  576. </scroll-view>
  577. </view>
  578. </view>
  579. </u-popup>
  580. <!-- 考前须知 -->
  581. <u-modal
  582. v-model="showTip"
  583. title="考前须知"
  584. :show-cancel-button="true"
  585. @confirm="confirmTip"
  586. >
  587. <view class="slot-content ql-editor" style="white-space: pre-wrap">
  588. <rich-text :nodes="nodesCcontent | formatRichText"></rich-text>
  589. </view>
  590. </u-modal>
  591. </view>
  592. </template>
  593. <script>
  594. var curTime = new Date().getTime(); // 当前时间的时间戳
  595. import { mapGetters, mapActions } from "vuex";
  596. import filters from "../../filters/index";
  597. export default {
  598. data() {
  599. return {
  600. leftDays: 0,
  601. paramC: {
  602. pageNum: 1,
  603. pageSize: 10,
  604. },
  605. activeItem: {},
  606. itemIndex: "",
  607. confirmTimer: null,
  608. confirmCount: 10,
  609. confirmChecked: false,
  610. showUserConfirmInfo: false,
  611. selectItem: {},
  612. selectClassModal: false,
  613. gradeList: [],
  614. gradeValue: -1,
  615. sysTime: 0,
  616. courseLists: [], // 课程列表
  617. total: 0,
  618. livingLists: [], // 直播列表
  619. allLoading: false, // 加载样式
  620. current: 2,
  621. appointTestShow: false, //预约考试弹窗
  622. appointTestList: [],
  623. appointItemIndex: {}, // 点击了哪项课程
  624. appoint: {},
  625. imgwidth: 0,
  626. imgheight: 0,
  627. showTip: false,
  628. nodesCcontent: "",
  629. };
  630. },
  631. filters: {
  632. liveStatus(liveTime, watchStatus) {
  633. let value = liveTime * 1000;
  634. if (curTime < value) {
  635. // 判断当前时间和直播开始时间
  636. return " 未开播";
  637. } else {
  638. return watchStatus == "live" ? "正在直播中" : "即将开播";
  639. }
  640. },
  641. formatRichText: filters.formatRichText,
  642. },
  643. computed: {
  644. ...mapGetters(["userInfo", "config"]),
  645. allCourse() {
  646. return this.courseLists.length || this.livingLists.length ? true : false;
  647. },
  648. eduPhone() {
  649. return this.userInfo.eduPhone;
  650. },
  651. backLearStatusText() {
  652. return ({
  653. periodStatus,
  654. stuAllNum,
  655. recordNum,
  656. secAllNum,
  657. examNum,
  658. periodPlush,
  659. }) => {
  660. let text = "";
  661. let color = "";
  662. if (periodStatus === -1) {
  663. const stuAll = stuAllNum + recordNum;
  664. const secAll = secAllNum + examNum;
  665. let index = 0;
  666. if (stuAll == 0) {
  667. index = 0;
  668. } else if (stuAll > 0 && stuAll < secAll) {
  669. index = 1;
  670. } else if (stuAll >= secAll) {
  671. index = 2;
  672. }
  673. text = ["未开始", "学习中", "已学完"][index];
  674. color = ["#EB5757", "#498AFE", "#498AFE"][index];
  675. } else {
  676. text = [
  677. "审核不通过",
  678. periodPlush > 0 ? "学时已上报信息中心" : "学时审核通过",
  679. "待审核",
  680. "初审完成",
  681. ][periodStatus];
  682. color = ["#EB5757", "#F67205", "#F67205", "#F67205"][periodStatus];
  683. }
  684. return `<span style='color: ${color}'>${text}</span>`;
  685. };
  686. },
  687. classStatusCompt: function () {
  688. return function (item, sysTime) {
  689. var str = "未开班";
  690. if (item.classEndTime && item.classEndTime < sysTime) {
  691. str = "已过期";
  692. } else if (item.classStartTime && item.classStartTime > sysTime) {
  693. str = "未开始";
  694. } else if (
  695. item.gradeId &&
  696. item.gradeStatus == 1 &&
  697. item.classStatus === 1
  698. ) {
  699. str = "已开班";
  700. } else if (
  701. item.gradeId &&
  702. item.gradeStatus == 1 &&
  703. item.classStatus === 0
  704. ) {
  705. str = "未开班";
  706. }
  707. return str;
  708. };
  709. },
  710. },
  711. onLoad() {
  712. // 1668873600 ,2022.11.20的时间戳
  713. this.leftDays = 1668873600 - parseInt(curTime / 1000);
  714. this.sysTime = +this.$method.timest();
  715. if (this.$method.isLogin()) {
  716. !this.userInfo && this.$api.refreshUserInfo();
  717. }
  718. },
  719. async onShow() {
  720. uni.pageScrollTo({
  721. duration: 0,
  722. scrollTop: 0, // number number number!
  723. });
  724. this.getCourseLiveQues();
  725. // await this.commonSystemTime()
  726. },
  727. onPullDownRefresh() {
  728. this.getCourseLiveQues();
  729. },
  730. onReachBottom() {
  731. if (this.courseLists.length < this.total) {
  732. this.paramC.pageNum++;
  733. this.getCourseList();
  734. }
  735. },
  736. methods: {
  737. ...mapActions(["getUserInfo"]),
  738. bgShow(liveTime, watchStatus) {
  739. let value = liveTime * 1000;
  740. if (curTime > value) {
  741. // 判断当前时间和直播开始时间
  742. return watchStatus == "live" ? true : false;
  743. }
  744. },
  745. lookTimeStatus(liveTime, watchStatus) {
  746. if (liveTime) {
  747. let value = new Date(liveTime * 1000);
  748. var Y = value.getFullYear();
  749. var M =
  750. value.getMonth() + 1 < 10
  751. ? "0" + (value.getMonth() + 1)
  752. : value.getMonth() + 1;
  753. var D = value.getDate() < 10 ? "0" + value.getDate() : value.getDate();
  754. var valZ = Y + "/" + M + "/" + D;
  755. let curZeroTime = new Date(valZ).getTime(); // 获取开始直播时间当天的零点时间戳
  756. if (curTime > value) {
  757. // 判断当前时间和直播开始时间
  758. if (watchStatus == "live") {
  759. //
  760. return 1;
  761. } else {
  762. return 2;
  763. }
  764. } else {
  765. if (curZeroTime <= curTime && curTime <= value) {
  766. //当天
  767. return 3;
  768. } else {
  769. return 4;
  770. }
  771. }
  772. }
  773. },
  774. curTimeTamp(liveTime) {
  775. let min = liveTime - parseInt(curTime / 1000);
  776. return min;
  777. },
  778. toChoose() {
  779. uni.switchTab({
  780. url: "/pages/course/index",
  781. });
  782. },
  783. // 查询直播课
  784. getCourseLiveQues() {
  785. if (!this.$method.isLogin()) {
  786. return;
  787. }
  788. this.allLoading = true;
  789. this.paramC.pageNum = 1;
  790. let arrs = [
  791. this.$api.listUserVideoLive(this.paramC), // 查询用户拥有视频+直播商品 /goods/listUserVideoLive
  792. this.$api.getgoodsLiveList({
  793. pageNum: 1,
  794. pageSize: 3, // 默认3条
  795. }),
  796. ];
  797. wx.stopPullDownRefresh();
  798. Promise.all(arrs)
  799. .then((res) => {
  800. // if (res.data.code == 200) {
  801. const [{ data: res1 }, { data: res2 }] = res;
  802. if (res1.code == 200) {
  803. this.total = res1.total;
  804. this.courseLists = res1.rows || [];
  805. const goods = this.courseLists.find(
  806. (e) => e.subscribeSign == 1 || e.subscribeSign == 3
  807. );
  808. if (goods) {
  809. let { goodsName, subscribeSign } = goods;
  810. let text =
  811. `您七大员新考【${goodsName}】课程` +
  812. (subscribeSign == 1
  813. ? "已学完,可以预约考试了!"
  814. : "课程考试未通过,请重新预约考试!");
  815. uni.showModal({
  816. title: "提示",
  817. content: text,
  818. success: (res) => {
  819. if (res.confirm) {
  820. this.appointment(goods);
  821. }
  822. },
  823. });
  824. }
  825. }
  826. if (res2.code == 200) {
  827. this.livingLists = res2.rows || [];
  828. } else {
  829. this.$u.toast(res2.msg);
  830. }
  831. this.allLoading = false;
  832. this.sysTime = +this.$method.timest();
  833. // }
  834. uni.hideLoading();
  835. })
  836. .catch((err) => {
  837. uni.hideLoading();
  838. this.allLoading = false;
  839. });
  840. },
  841. getCourseList() {
  842. this.$api
  843. .listUserVideoLive(this.paramC)
  844. .then((res) => {
  845. this.courseLists.push(...res.data.rows);
  846. })
  847. .finally((e) => {
  848. uni.hideLoading();
  849. });
  850. },
  851. // 看直播
  852. toLiveLook(item) {
  853. let moduleId = item.moduleId || 0;
  854. let chapterId = item.chapterId || 0;
  855. let sectionId = item.sectionId || item.menuId;
  856. let uuid = new Date().valueOf() + "";
  857. // buyCourse 是否购买课程:1是 0否
  858. let encode = encodeURIComponent(
  859. this.config.hostLive +
  860. "/pages/live/index?token=" +
  861. uni.getStorageSync("token") +
  862. "&userInfo=" +
  863. (JSON.stringify(this.userInfo) || "") +
  864. "&channelId=" +
  865. item.liveUrl +
  866. "&gradeId=" +
  867. 0 +
  868. "&courseId=" +
  869. item.courseId +
  870. "&goodsId=" +
  871. item.goodsId +
  872. "&orderGoodsId=" +
  873. item.orderGoodsId +
  874. "&sectionId=" +
  875. sectionId +
  876. "&chapterId=" +
  877. chapterId +
  878. "&moduleId=" +
  879. moduleId +
  880. "&buyCourse=1" +
  881. "&ident=" +
  882. uuid +
  883. "&sectionType=2"
  884. );
  885. uni.navigateTo({
  886. url: `../../pages/webview/index?url=` + encode,
  887. });
  888. },
  889. toLive(item) {
  890. this.$api
  891. .courseCourseList({
  892. pageNum: 1,
  893. pageSize: 1,
  894. goodsId: item.goodsId,
  895. gradeId: 0,
  896. orderGoodsId: item.orderGoodsId,
  897. })
  898. .then((res) => {
  899. if (res.data.code == 200) {
  900. if (res.data.total > 1) {
  901. // uni.navigateTo({
  902. // url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
  903. // })
  904. uni.navigateTo({
  905. url:
  906. "/pages3/live/detail?orderGoodsId=" +
  907. item.orderGoodsId +
  908. "&goodsId=" +
  909. item.goodsId +
  910. '&gradeId=0&courseId=""',
  911. });
  912. } else if (res.data.total == 1) {
  913. uni.navigateTo({
  914. url:
  915. "/pages3/live/detail?orderGoodsId=" +
  916. item.orderGoodsId +
  917. "&goodsId=" +
  918. item.goodsId +
  919. "&gradeId=0&courseId=" +
  920. res.data.rows[0].courseId,
  921. });
  922. } else {
  923. uni.showToast({
  924. icon: "none",
  925. title: "暂无可观看的直播课程",
  926. });
  927. }
  928. }
  929. });
  930. },
  931. async studyIn(v, i, item, index) {
  932. if (item.externalLinkStatus) {
  933. this.$method.toLink(item.externalLink);
  934. return;
  935. }
  936. if (item.goodsType == 6) {
  937. // 进入直播课
  938. this.toLive(item);
  939. return;
  940. }
  941. // 进入视频课
  942. this.activeItem = item;
  943. if (item.interfaceAccountId > 0) {
  944. //学习账号已开通
  945. if (item.learnStatus > 0) {
  946. //跳转第三方h5
  947. uni.navigateTo({
  948. url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}&isOther=1`,
  949. });
  950. return;
  951. } else {
  952. const text = this.eduPhone ? ",有疑问,请联系" + this.eduPhone : "";
  953. uni.showModal({
  954. showCancel: false,
  955. content: "您的学习账号未开通,请稍后再尝试" + text,
  956. });
  957. return;
  958. }
  959. return;
  960. }
  961. if (
  962. item.serviceStartTime &&
  963. (this.sysTime <= item.serviceStartTime ||
  964. this.sysTime >= item.serviceEndTime)
  965. ) {
  966. uni.showToast({
  967. icon: "none",
  968. title: "不在学习服务期,不能进入学习",
  969. });
  970. return;
  971. }
  972. if (
  973. (item.classStartTime && this.sysTime <= item.classStartTime) ||
  974. (item.classEndTime && this.sysTime >= item.classEndTime)
  975. ) {
  976. uni.showToast({
  977. icon: "none",
  978. title: "不在班级有效期,不能进入学习",
  979. });
  980. return;
  981. }
  982. // learningStatus: 1即刻,2待定,3不在日期内
  983. if (item.learningStatus == 2) {
  984. uni.showToast({
  985. icon: "none",
  986. title: "开放学习时间待定,不能进入学习",
  987. });
  988. return;
  989. }
  990. if (item.classStatus == 0) {
  991. uni.showToast({
  992. icon: "none",
  993. title: "尚未开班,不能进入学习",
  994. });
  995. return;
  996. }
  997. if (item.learningStatus == 3 && this.sysTime < item.learningTimeStart) {
  998. uni.showToast({
  999. icon: "none",
  1000. title: "不在开放学习时间,不能进入学习",
  1001. });
  1002. return;
  1003. }
  1004. uni.showLoading({
  1005. title: "拼命加载中...",
  1006. mask: true,
  1007. });
  1008. // var confirmDetail = true;
  1009. // if (item.educationName == "继续教育") {
  1010. // if (
  1011. // item.officialName &&
  1012. // item.businessName == "二级" &&
  1013. // item.projectName == "建造师"
  1014. // ) {
  1015. // confirmDetail = await this.userConfirmInfoDetail();
  1016. // }
  1017. // }
  1018. // if (!confirmDetail) {
  1019. // return;
  1020. // }
  1021. this.itemIndex = index;
  1022. if (
  1023. item.gradeStatus == 1 &&
  1024. item.status == 1 &&
  1025. item.serviceEndTime > this.sysTime &&
  1026. item.classEndTime &&
  1027. item.classEndTime < this.sysTime &&
  1028. (item.periodStatus == 0 || item.periodStatus == -1) &&
  1029. item.studyCount > 0
  1030. ) {
  1031. this.selectClass(item, index, "loading");
  1032. return;
  1033. }
  1034. // /course/goodsRebuildStatus查询用户商品重修状态
  1035. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1036. item.goodsId,
  1037. item.gradeId
  1038. );
  1039. if (rebuildStatus == 0) {
  1040. uni.hideLoading();
  1041. this.$navTo.togo("/pages2/learn/details", {
  1042. gradeId: item.gradeId,
  1043. goodsId: item.goodsId,
  1044. orderGoodsId: item.orderGoodsId,
  1045. });
  1046. return;
  1047. }
  1048. this.$method.checkLock().then(() => {
  1049. this.$http({
  1050. url: "/course/courseList",
  1051. method: "get",
  1052. data: {
  1053. pageNum: 1,
  1054. pageSize: 100,
  1055. goodsId: item.goodsId,
  1056. gradeId: item.gradeId,
  1057. orderGoodsId: item.orderGoodsId,
  1058. },
  1059. noLoading: true,
  1060. }).then((res) => {
  1061. if (res.data.code == 200) {
  1062. if (res.data.total > 1) {
  1063. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1064. uni.navigateTo({
  1065. url: `/pages3/polyv/detail?id=''&goodsId=${
  1066. item.goodsId
  1067. }&orderGoodsId=${item.orderGoodsId}&gradeId=${
  1068. item.gradeId
  1069. }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
  1070. });
  1071. } else if (res.data.total == 1) {
  1072. uni.navigateTo({
  1073. url: `/pages3/polyv/detail?id=${
  1074. res.data.rows[0].courseId
  1075. }&goodsId=${item.goodsId}&orderGoodsId=${
  1076. item.orderGoodsId
  1077. }&gradeId=${item.gradeId}&periodWaitTime=${
  1078. item.periodWaitTime ? "" : 1
  1079. }`,
  1080. });
  1081. } else {
  1082. uni.showToast({
  1083. icon: "none",
  1084. title: "暂无可观看的视频课程",
  1085. });
  1086. }
  1087. }
  1088. });
  1089. });
  1090. },
  1091. toDetail() {
  1092. this.$http({
  1093. url: "/course/courseList",
  1094. method: "get",
  1095. data: {
  1096. pageNum: 1,
  1097. pageSize: 100,
  1098. goodsId: item.goodsId,
  1099. gradeId: item.gradeId,
  1100. orderGoodsId: item.orderGoodsId,
  1101. },
  1102. noLoading: true,
  1103. }).then((res) => {
  1104. if (res.data.code == 200) {
  1105. if (res.data.total > 1) {
  1106. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1107. uni.navigateTo({
  1108. url: `/pages3/polyv/detail?id=''&goodsId=${
  1109. item.goodsId
  1110. }&orderGoodsId=${item.orderGoodsId}&gradeId=${
  1111. item.gradeId
  1112. }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
  1113. });
  1114. } else if (res.data.total == 1) {
  1115. uni.navigateTo({
  1116. url: `/pages3/polyv/detail?id=${
  1117. res.data.rows[0].courseId
  1118. }&goodsId=${item.goodsId}&orderGoodsId=${
  1119. item.orderGoodsId
  1120. }&gradeId=${item.gradeId}&periodWaitTime=${
  1121. item.periodWaitTime ? "" : 1
  1122. }`,
  1123. });
  1124. } else {
  1125. uni.showToast({
  1126. icon: "none",
  1127. title: "暂无可观看的视频课程",
  1128. });
  1129. }
  1130. }
  1131. });
  1132. },
  1133. /**
  1134. * @param {Object} goodsId 商品id
  1135. * 查询商品重修状态
  1136. */
  1137. courseGoodsRebuildStatus(goodsId, gradeId) {
  1138. return new Promise((resolve) => {
  1139. this.$http({
  1140. url: "/course/goodsRebuildStatus",
  1141. method: "get",
  1142. data: {
  1143. goodsId: goodsId,
  1144. gradeId: gradeId,
  1145. },
  1146. noLoading: true,
  1147. compleLoading: true, // 请求成功是否还要继续显示加载中
  1148. }).then((res) => {
  1149. resolve(res.data.data);
  1150. });
  1151. });
  1152. },
  1153. userConfirmInfoDetail() {
  1154. return new Promise((resolve) => {
  1155. this.$http({
  1156. url: "/user/confirm/info/detail",
  1157. method: "get",
  1158. data: { orderGoodsId: this.activeItem.orderGoodsId },
  1159. noLoading: true,
  1160. }).then((res) => {
  1161. if (!res.data.data) {
  1162. clearInterval(this.confirmTimer);
  1163. this.confirmCount = 10;
  1164. this.showUserConfirmInfo = true;
  1165. this.confirmTimer = setInterval(() => {
  1166. if (this.confirmCount > 0) {
  1167. this.confirmCount--;
  1168. } else {
  1169. clearInterval(this.confirmTimer);
  1170. }
  1171. }, 1000);
  1172. } else {
  1173. if (res.data.data.pushInfo) {
  1174. resolve(true);
  1175. } else {
  1176. const text = this.eduPhone
  1177. ? ",有疑问,请联系" + this.eduPhone
  1178. : "";
  1179. uni.showModal({
  1180. showCancel: false,
  1181. title: "提示",
  1182. content: "开通信息推送不成功,无法进入学习" + text,
  1183. });
  1184. resolve(false);
  1185. }
  1186. }
  1187. });
  1188. });
  1189. },
  1190. selectClass(item, index, load) {
  1191. this.itemIndex = index;
  1192. this.selectItem = item;
  1193. this.selectClassModal = true;
  1194. this.goodsGradeList(item.goodsId, load);
  1195. },
  1196. goodsGradeList(id, load) {
  1197. this.$http({
  1198. url: "/grade/grade/list",
  1199. method: "get",
  1200. data: { goodsId: id },
  1201. noLoading: load ? true : false,
  1202. }).then((res) => {
  1203. if (res.data.code == 200) {
  1204. this.gradeList = res.data.rows;
  1205. if (this.gradeList.length == 0) {
  1206. let item = {
  1207. className: "系统分班",
  1208. gradeId: 0,
  1209. };
  1210. this.gradeList.push(item);
  1211. } else {
  1212. let isGradeFull = this.gradeList.every(
  1213. (item) =>
  1214. item.studentNum > 0 && item.studentNum == item.studentUpper
  1215. );
  1216. //所有班级都满了
  1217. if (isGradeFull) {
  1218. let item = {
  1219. className: "系统分班",
  1220. gradeId: 0,
  1221. };
  1222. this.gradeList.unshift(item);
  1223. }
  1224. }
  1225. }
  1226. });
  1227. },
  1228. radioGroupChange(e) {
  1229. // console.log(e)
  1230. },
  1231. okPopup() {
  1232. if (this.gradeValue == -1) {
  1233. uni.showToast({
  1234. icon: "none",
  1235. title: "请选择班级",
  1236. });
  1237. return;
  1238. }
  1239. this.$api
  1240. .changeGrade({
  1241. goodsId: this.selectItem.goodsId,
  1242. gradeId: this.gradeValue,
  1243. oldGradeId: this.selectItem.gradeId,
  1244. orderGoodsId: this.selectItem.orderGoodsId,
  1245. userId: this.selectItem.userId,
  1246. })
  1247. .then((res) => {
  1248. if (res.data.code == 200) {
  1249. if (this.itemIndex !== "") {
  1250. this.refreshByIndex();
  1251. }
  1252. this.selectClassModal = false;
  1253. uni.showToast({
  1254. title: "选班成功",
  1255. });
  1256. } else {
  1257. uni.showToast({
  1258. icon: "none",
  1259. title: res.data.msg,
  1260. });
  1261. }
  1262. });
  1263. },
  1264. /**
  1265. * 返回刷新之前进入的课程数据
  1266. */
  1267. refreshByIndex() {
  1268. this.$api
  1269. .listUserVideoLive({
  1270. pageNum: this.itemIndex + 1,
  1271. pageSize: 1,
  1272. })
  1273. .then((res) => {
  1274. if (res.data.code == 200) {
  1275. this.$set(this.courseLists, this.itemIndex, res.data.rows[0]);
  1276. }
  1277. });
  1278. },
  1279. confirmUserConfirm() {
  1280. this.$refs.uModal.clearLoading();
  1281. if (this.confirmCount <= 0) {
  1282. if (this.confirmChecked) {
  1283. let infoJson = {
  1284. realname: this.userInfo.realname,
  1285. idCard: this.userInfo.idCard,
  1286. telphone: this.userInfo.telphone,
  1287. };
  1288. this.$api
  1289. .userConfirminfo({
  1290. orderGoodsId: this.activeItem.orderGoodsId,
  1291. infoJson: JSON.stringify(infoJson),
  1292. })
  1293. .then((res) => {
  1294. if (res.data.code != 200) {
  1295. this.showUserConfirmInfo = false;
  1296. uni.showToast({
  1297. icon: "none",
  1298. title: res.data.msg,
  1299. });
  1300. return;
  1301. }
  1302. if (res.data.data.pushInfo) {
  1303. uni.showToast({
  1304. icon: "none",
  1305. title: "提交成功",
  1306. });
  1307. } else {
  1308. const text = this.eduPhone
  1309. ? ",有疑问,请联系" + this.eduPhone
  1310. : "";
  1311. uni.showModal({
  1312. showCancel: false,
  1313. title: "提示",
  1314. content: "开通信息推送不成功,无法进入学!" + text,
  1315. });
  1316. }
  1317. this.showUserConfirmInfo = false;
  1318. });
  1319. } else {
  1320. uni.showToast({
  1321. icon: "none",
  1322. title: "请勾选确认个人信息无误",
  1323. });
  1324. }
  1325. } else {
  1326. return;
  1327. }
  1328. },
  1329. cancelUserConfirm() {
  1330. clearInterval(this.confirmTimer);
  1331. },
  1332. call() {
  1333. // #ifdef MP-WEIXIN
  1334. uni.makePhoneCall({
  1335. phoneNumber: "020-87085982", //仅为示例
  1336. });
  1337. // #endif
  1338. },
  1339. closePop() {
  1340. this.appointTestShow = false;
  1341. },
  1342. jumpTest(appoint) {
  1343. this.$api
  1344. .getExamTip()
  1345. .then((res) => {
  1346. this.nodesCcontent = res.data.data.value;
  1347. this.appoint = appoint;
  1348. this.showTip = true;
  1349. })
  1350. .catch(() => {
  1351. this.appoint_an(appoint);
  1352. this.appointTestShow = false;
  1353. });
  1354. },
  1355. confirmTip() {
  1356. this.showTip = false;
  1357. this.appointTestShow = false;
  1358. this.appoint_an(this.appoint);
  1359. },
  1360. appointment(item) {
  1361. this.appointItemIndex = item;
  1362. this.appointTestList = item.examApplyGoodsList;
  1363. this.appointTestShow = true;
  1364. // if (item.examApplyGoodsList.length > 1) {
  1365. // // 多个考试预约
  1366. // this.appointTestList = item.examApplyGoodsList;
  1367. // this.appointTestShow = true;
  1368. // return;
  1369. // }
  1370. // let appoint_item = item.examApplyGoodsList[0];
  1371. // this.appoint_an(item, appoint_item);
  1372. },
  1373. appoint_an(appoint) {
  1374. const { goodsId, gradeId, orderGoodsId } = this.appointItemIndex;
  1375. var data = {
  1376. goodsId,
  1377. gradeId,
  1378. applyId: appoint.applyId,
  1379. orderGoodsId,
  1380. };
  1381. this.$api.getApplysubscribe(data).then((res) => {
  1382. if (res.data.code === 500) {
  1383. uni.showModal({
  1384. showCancel: false,
  1385. content: res.data.msg,
  1386. });
  1387. }
  1388. if (res.data.code === 200) {
  1389. this.$navTo.togo("/pages2/appointment/index", {
  1390. goodsId,
  1391. gradeId,
  1392. orderGoodsId,
  1393. applyId: appoint.applyId,
  1394. });
  1395. }
  1396. });
  1397. },
  1398. // 进入刷题,调整小程序
  1399. appBeforeAddress(goodsId, item) {
  1400. this.$api
  1401. .appBeforeAddress({
  1402. orderGoodsId: item.orderGoodsId,
  1403. })
  1404. .then((res) => {
  1405. if (res.data.code == 200) {
  1406. uni.navigateToMiniProgram({
  1407. appId: res.data.data.url,
  1408. success(res) {
  1409. // 打开成功
  1410. },
  1411. });
  1412. } else {
  1413. uni.showModal({
  1414. title: "提示",
  1415. content: res.data.msg,
  1416. showCancel: false,
  1417. });
  1418. }
  1419. });
  1420. },
  1421. },
  1422. };
  1423. </script>
  1424. <style>
  1425. page {
  1426. background: #eaeef1;
  1427. }
  1428. </style>
  1429. <style lang="scss" scoped>
  1430. @import "./index.scss";
  1431. @import "./quill.core";
  1432. </style>