index.vue 47 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461
  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. <view
  357. v-if="item.userProfile == 1"
  358. class="box_appoint"
  359. @click="toInput(item)"
  360. >
  361. <view class="exam_word intos">学习资料</view>
  362. </view>
  363. <template
  364. v-if="
  365. item.gradeStatus == 1 &&
  366. item.status == 1 &&
  367. item.serviceEndTime > sysTime &&
  368. item.serviceStartTime < sysTime &&
  369. item.classEndTime &&
  370. item.classEndTime < sysTime &&
  371. (item.periodStatus == 0 || item.periodStatus == -1) &&
  372. item.userStudyCount > 0
  373. "
  374. >
  375. <view
  376. class="exam_word ones"
  377. @click.stop="selectClass(item, index)"
  378. >
  379. 选班重学
  380. </view>
  381. </template>
  382. <!-- examApplyGoodsList.length -是判断是否关联指定学员 -->
  383. <!-- item.applyStatus === 1 &&
  384. !(
  385. sysTime <= item.serviceStartTime ||
  386. sysTime >= item.serviceEndTime ||
  387. (item.classStartTime && sysTime <= item.classStartTime) ||
  388. (item.classEndTime && sysTime >= item.classEndTime) ||
  389. item.learningStatus == 2 ||
  390. item.classStatus == 0 ||
  391. (item.learningStatus == 3 &&
  392. sysTime < item.learningTimeStart) ||
  393. !item.examApplyGoodsList.length
  394. ) -->
  395. <view v-else class="exam_btns">
  396. <view
  397. class="box_appoint"
  398. v-if="item.examApplyGoodsList"
  399. @click="appointment(item)"
  400. >
  401. <view class="exam_word ones">预约考试</view>
  402. </view>
  403. <view
  404. class="box_appoint"
  405. v-if="
  406. item.beforeStatus === 1 &&
  407. !(
  408. sysTime <= item.serviceStartTime ||
  409. sysTime >= item.serviceEndTime ||
  410. (item.classStartTime && sysTime <= item.classStartTime) ||
  411. (item.classEndTime && sysTime >= item.classEndTime) ||
  412. item.learningStatus == 2 ||
  413. item.classStatus == 0 ||
  414. (item.learningStatus == 3 &&
  415. sysTime < item.learningTimeStart)
  416. )
  417. "
  418. @click="appBeforeAddress(item.goodsId, item)"
  419. >
  420. <view class="exam_word ones">进入刷题</view>
  421. </view>
  422. </view>
  423. <view
  424. class="box_appoint"
  425. @click="studyIn(item.goodsId, item.gradeId, item, index)"
  426. >
  427. <view class="exam_word intos">进入学习</view>
  428. </view>
  429. </view>
  430. </view>
  431. </view>
  432. </view>
  433. <!-- 没有学习的课程 -->
  434. <view v-if="!allLoading && !allCourse" class="no_datas">
  435. <image
  436. class="courses"
  437. src="/static/learn/no_course.png"
  438. mode=""
  439. ></image>
  440. <view class="no_learns">您目前没有可学习的课程</view>
  441. <view class="choose" @click="toChoose()">立即去选购</view>
  442. </view>
  443. </view>
  444. <!-- 弹窗 -->
  445. <u-popup
  446. v-model="selectClassModal"
  447. @close="gradeValue = -1"
  448. mode="bottom"
  449. border-radius="40"
  450. >
  451. <view class="popup_box">
  452. <view style="margin-bottom: 20rpx">
  453. <view class="line1"></view>
  454. <view class="grade">选择班级</view>
  455. </view>
  456. <u-line color="#D6D6DB" />
  457. <view>
  458. <scroll-view scroll-y="true" style="height: 500rpx">
  459. <view>
  460. <u-radio-group v-model="gradeValue" @change="radioGroupChange">
  461. <view v-for="(item, index) in gradeList" :key="index">
  462. <view
  463. style="display: flex; align-items: center; padding: 20rpx"
  464. >
  465. <view>
  466. <u-radio
  467. shape="circle"
  468. :name="index"
  469. :disabled="
  470. item.studentNum > 0 &&
  471. item.studentNum == item.studentUpper
  472. "
  473. >
  474. <view
  475. :class="
  476. item.checked ? 'white-box blue-box' : 'white-box'
  477. "
  478. >
  479. <view>
  480. <view class="blackTxt">{{ item.className }}</view>
  481. <view class="redTxt" v-if="item.classEndTime">
  482. 有效期至:{{
  483. $method.timestampToTime(
  484. item.classEndTime,
  485. true,
  486. true
  487. )
  488. }}
  489. </view>
  490. <view class="redTxt" v-if="item.classEndTime">
  491. 本班还剩{{
  492. $method.GetRTime(item.classEndTime)
  493. }}天将结束学习</view
  494. >
  495. </view>
  496. </view>
  497. </u-radio>
  498. </view>
  499. </view>
  500. </view>
  501. </u-radio-group>
  502. </view>
  503. </scroll-view>
  504. </view>
  505. <view class="confrim-btn">
  506. <view class="okBtn" @click="okPopup()">确定</view>
  507. </view>
  508. </view>
  509. </u-popup>
  510. <u-modal
  511. v-model="showUserConfirmInfo"
  512. @confirm="confirmUserConfirm"
  513. ref="uModal"
  514. :async-close="true"
  515. @cancel="cancelUserConfirm"
  516. :confirm-text="
  517. '确认' + (confirmCount > 0 ? '(' + confirmCount + ')' : '')
  518. "
  519. :confirm-color="confirmCount > 0 ? '#999' : '#2979ff'"
  520. class="confirm-modal"
  521. title="实名验证确认"
  522. cancel="取消"
  523. :show-cancel-button="true"
  524. >
  525. <view class="slot-content">
  526. <view class="content">
  527. <!-- ,立刻联系020-38946666 -->
  528. 为避免个人信息不正确导致您的学习时长无效,请认真核对以下信息是否正确,如信息有误请取消当前操作。
  529. <view class="msg-list" v-if="userInfo">
  530. <view class="item">
  531. <text class="item__left">姓名:</text>
  532. <text class="item__right">{{ userInfo.realname }}</text>
  533. </view>
  534. <view class="item">
  535. <text class="item__left">手机号:</text>
  536. <text class="item__right">{{ userInfo.telphone }}</text>
  537. </view>
  538. <view class="item">
  539. <text class="item__left">身份号:</text>
  540. <text class="item__right">{{ userInfo.idCard }}</text>
  541. </view>
  542. <view class="item">
  543. <u-checkbox v-model="confirmChecked" :label-disabled="false"
  544. >确认个人信息无误</u-checkbox
  545. >
  546. </view>
  547. </view>
  548. </view>
  549. </view>
  550. </u-modal>
  551. <!-- 多个预约考试时的弹窗 -->
  552. <u-popup v-model="appointTestShow" mode="bottom" border-radius="40">
  553. <view class="popuptest_box">
  554. <view class="check_head">
  555. <view class="headers">
  556. <view class="grade">预约考试</view>
  557. <u-icon
  558. name="close"
  559. color="#9C9C9C"
  560. size="40"
  561. @click="closePop()"
  562. ></u-icon>
  563. </view>
  564. </view>
  565. <view class="check_con">
  566. <scroll-view scroll-y="true" style="height: 700rpx">
  567. <view
  568. class="course_items"
  569. v-for="(appoint, index) in appointTestList"
  570. :key="index"
  571. >
  572. <view class="course_lefts">
  573. <view class="course_title">{{ appoint.applyName }}</view>
  574. </view>
  575. <view class="course_rights" @click="jumpTest(appoint)">
  576. <view
  577. class="intoStudy"
  578. v-if="appointItemIndex.subscribeSign !== 2"
  579. >预约</view
  580. >
  581. </view>
  582. </view>
  583. </scroll-view>
  584. </view>
  585. </view>
  586. </u-popup>
  587. <!-- 考前须知 -->
  588. <u-modal
  589. v-model="showTip"
  590. title="考前须知"
  591. :show-cancel-button="true"
  592. @confirm="confirmTip"
  593. >
  594. <view class="slot-content ql-editor" style="white-space: pre-wrap">
  595. <rich-text :nodes="nodesCcontent | formatRichText"></rich-text>
  596. </view>
  597. </u-modal>
  598. </view>
  599. </template>
  600. <script>
  601. var curTime = new Date().getTime(); // 当前时间的时间戳
  602. import { mapGetters, mapActions } from "vuex";
  603. import filters from "../../filters/index";
  604. export default {
  605. data() {
  606. return {
  607. leftDays: 0,
  608. paramC: {
  609. pageNum: 1,
  610. pageSize: 10,
  611. },
  612. activeItem: {},
  613. itemIndex: "",
  614. confirmTimer: null,
  615. confirmCount: 10,
  616. confirmChecked: false,
  617. showUserConfirmInfo: false,
  618. selectItem: {},
  619. selectClassModal: false,
  620. gradeList: [],
  621. gradeValue: -1,
  622. sysTime: 0,
  623. courseLists: [], // 课程列表
  624. total: 0,
  625. livingLists: [], // 直播列表
  626. allLoading: false, // 加载样式
  627. current: 2,
  628. appointTestShow: false, //预约考试弹窗
  629. appointTestList: [],
  630. appointItemIndex: {}, // 点击了哪项课程
  631. appoint: {},
  632. imgwidth: 0,
  633. imgheight: 0,
  634. showTip: false,
  635. nodesCcontent: "",
  636. };
  637. },
  638. filters: {
  639. liveStatus(liveTime, watchStatus) {
  640. let value = liveTime * 1000;
  641. if (curTime < value) {
  642. // 判断当前时间和直播开始时间
  643. return " 未开播";
  644. } else {
  645. return watchStatus == "live" ? "正在直播中" : "即将开播";
  646. }
  647. },
  648. formatRichText: filters.formatRichText,
  649. },
  650. computed: {
  651. ...mapGetters(["userInfo", "config"]),
  652. allCourse() {
  653. return this.courseLists.length || this.livingLists.length ? true : false;
  654. },
  655. eduPhone() {
  656. return this.userInfo.eduPhone;
  657. },
  658. backLearStatusText() {
  659. return ({
  660. periodStatus,
  661. stuAllNum,
  662. recordNum,
  663. secAllNum,
  664. examNum,
  665. periodPlush,
  666. studyStatus,
  667. }) => {
  668. let text = "";
  669. let color = "";
  670. if (periodStatus === -1) {
  671. let index = 0;
  672. if (studyStatus == 1) {
  673. index = 0;
  674. } else if (stuAllNum + recordNum < secAllNum + examNum) {
  675. index = 1;
  676. } else {
  677. index = 2;
  678. }
  679. text = ["未开始", "学习中", "已学完"][index];
  680. color = ["#EB5757", "#498AFE", "#498AFE"][index];
  681. } else {
  682. text = [
  683. "审核不通过",
  684. periodPlush > 0 ? "学时已上报信息中心" : "学时审核通过",
  685. "待审核",
  686. "初审完成",
  687. ][periodStatus];
  688. color = ["#EB5757", "#F67205", "#F67205", "#F67205"][periodStatus];
  689. }
  690. return `<span style='color: ${color}'>${text}</span>`;
  691. };
  692. },
  693. classStatusCompt: function () {
  694. return function (item, sysTime) {
  695. var str = "未开班";
  696. if (item.classEndTime && item.classEndTime < sysTime) {
  697. str = "已过期";
  698. } else if (item.classStartTime && item.classStartTime > sysTime) {
  699. str = "未开始";
  700. } else if (
  701. item.gradeId &&
  702. item.gradeStatus == 1 &&
  703. item.classStatus === 1
  704. ) {
  705. str = "已开班";
  706. } else if (
  707. item.gradeId &&
  708. item.gradeStatus == 1 &&
  709. item.classStatus === 0
  710. ) {
  711. str = "未开班";
  712. }
  713. return str;
  714. };
  715. },
  716. },
  717. onLoad() {
  718. uni.hideTabBar();
  719. // 1668873600 ,2022.11.20的时间戳
  720. this.leftDays = 1668873600 - parseInt(curTime / 1000);
  721. this.sysTime = +this.$method.timest();
  722. if (this.$method.isLogin()) {
  723. !this.userInfo && this.$api.refreshUserInfo();
  724. }
  725. },
  726. async onShow() {
  727. uni.pageScrollTo({
  728. duration: 0,
  729. scrollTop: 0, // number number number!
  730. });
  731. this.getCourseLiveQues();
  732. // await this.commonSystemTime()
  733. },
  734. onPullDownRefresh() {
  735. this.getCourseLiveQues();
  736. },
  737. onReachBottom() {
  738. if (this.courseLists.length < this.total) {
  739. this.paramC.pageNum++;
  740. this.getCourseList();
  741. }
  742. },
  743. methods: {
  744. ...mapActions(["getUserInfo"]),
  745. bgShow(liveTime, watchStatus) {
  746. let value = liveTime * 1000;
  747. if (curTime > value) {
  748. // 判断当前时间和直播开始时间
  749. return watchStatus == "live" ? true : false;
  750. }
  751. },
  752. lookTimeStatus(liveTime, watchStatus) {
  753. if (liveTime) {
  754. let value = new Date(liveTime * 1000);
  755. var Y = value.getFullYear();
  756. var M =
  757. value.getMonth() + 1 < 10
  758. ? "0" + (value.getMonth() + 1)
  759. : value.getMonth() + 1;
  760. var D = value.getDate() < 10 ? "0" + value.getDate() : value.getDate();
  761. var valZ = Y + "/" + M + "/" + D;
  762. let curZeroTime = new Date(valZ).getTime(); // 获取开始直播时间当天的零点时间戳
  763. if (curTime > value) {
  764. // 判断当前时间和直播开始时间
  765. if (watchStatus == "live") {
  766. //
  767. return 1;
  768. } else {
  769. return 2;
  770. }
  771. } else {
  772. if (curZeroTime <= curTime && curTime <= value) {
  773. //当天
  774. return 3;
  775. } else {
  776. return 4;
  777. }
  778. }
  779. }
  780. },
  781. curTimeTamp(liveTime) {
  782. let min = liveTime - parseInt(curTime / 1000);
  783. return min;
  784. },
  785. toChoose() {
  786. uni.switchTab({
  787. url: "/pages/course/index",
  788. });
  789. },
  790. // 查询直播课
  791. getCourseLiveQues() {
  792. if (!this.$method.isLogin()) {
  793. return;
  794. }
  795. this.allLoading = true;
  796. this.paramC.pageNum = 1;
  797. let arrs = [
  798. this.$api.listUserVideoLive(this.paramC), // 查询用户拥有视频+直播商品 /goods/listUserVideoLive
  799. this.$api.getgoodsLiveList({
  800. pageNum: 1,
  801. pageSize: 3, // 默认3条
  802. }),
  803. ];
  804. wx.stopPullDownRefresh();
  805. Promise.all(arrs)
  806. .then((res) => {
  807. // if (res.data.code == 200) {
  808. const [{ data: res1 }, { data: res2 }] = res;
  809. if (res1.code == 200) {
  810. this.total = res1.total;
  811. this.courseLists = res1.rows || [];
  812. const goods = this.courseLists.find(
  813. (e) => e.subscribeSign == 1 || e.subscribeSign == 3
  814. );
  815. if (goods) {
  816. let { goodsName, subscribeSign } = goods;
  817. let text =
  818. `您七大员新考【${goodsName}】课程` +
  819. (subscribeSign == 1
  820. ? "已学完,可以预约考试了!"
  821. : "课程考试未通过,请重新预约考试!");
  822. uni.showModal({
  823. title: "提示",
  824. content: text,
  825. success: (res) => {
  826. if (res.confirm) {
  827. this.appointment(goods);
  828. }
  829. },
  830. });
  831. }
  832. }
  833. if (res2.code == 200) {
  834. this.livingLists = res2.rows || [];
  835. } else {
  836. this.$u.toast(res2.msg);
  837. }
  838. this.allLoading = false;
  839. this.sysTime = +this.$method.timest();
  840. // }
  841. uni.hideLoading();
  842. })
  843. .catch((err) => {
  844. uni.hideLoading();
  845. this.allLoading = false;
  846. });
  847. },
  848. getCourseList() {
  849. this.$api
  850. .listUserVideoLive(this.paramC)
  851. .then((res) => {
  852. this.courseLists.push(...res.data.rows);
  853. })
  854. .finally((e) => {
  855. uni.hideLoading();
  856. });
  857. },
  858. // 看直播
  859. toLiveLook(item) {
  860. let moduleId = item.moduleId || 0;
  861. let chapterId = item.chapterId || 0;
  862. let sectionId = item.sectionId || item.menuId;
  863. let uuid = new Date().valueOf() + "";
  864. // buyCourse 是否购买课程:1是 0否
  865. let encode = encodeURIComponent(
  866. this.config.hostLive +
  867. "/pages/live/index?token=" +
  868. uni.getStorageSync("token") +
  869. "&userInfo=" +
  870. (JSON.stringify(this.userInfo) || "") +
  871. "&channelId=" +
  872. item.liveUrl +
  873. "&gradeId=" +
  874. 0 +
  875. "&courseId=" +
  876. item.courseId +
  877. "&goodsId=" +
  878. item.goodsId +
  879. "&orderGoodsId=" +
  880. item.orderGoodsId +
  881. "&sectionId=" +
  882. sectionId +
  883. "&chapterId=" +
  884. chapterId +
  885. "&moduleId=" +
  886. moduleId +
  887. "&buyCourse=1" +
  888. "&ident=" +
  889. uuid +
  890. "&sectionType=2"
  891. );
  892. uni.navigateTo({
  893. url: `../../pages/webview/index?url=` + encode,
  894. });
  895. },
  896. toLive(item) {
  897. this.$api
  898. .courseCourseList({
  899. pageNum: 1,
  900. pageSize: 1,
  901. goodsId: item.goodsId,
  902. gradeId: 0,
  903. orderGoodsId: item.orderGoodsId,
  904. })
  905. .then((res) => {
  906. if (res.data.code == 200) {
  907. if (res.data.total > 1) {
  908. // uni.navigateTo({
  909. // url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
  910. // })
  911. uni.navigateTo({
  912. url:
  913. "/pages3/live/detail?orderGoodsId=" +
  914. item.orderGoodsId +
  915. "&goodsId=" +
  916. item.goodsId +
  917. '&gradeId=0&courseId=""',
  918. });
  919. } else if (res.data.total == 1) {
  920. uni.navigateTo({
  921. url:
  922. "/pages3/live/detail?orderGoodsId=" +
  923. item.orderGoodsId +
  924. "&goodsId=" +
  925. item.goodsId +
  926. "&gradeId=0&courseId=" +
  927. res.data.rows[0].courseId,
  928. });
  929. } else {
  930. uni.showToast({
  931. icon: "none",
  932. title: "暂无可观看的直播课程",
  933. });
  934. }
  935. }
  936. });
  937. },
  938. async studyIn(v, i, item, index) {
  939. if (item.externalLinkStatus) {
  940. this.$method.toLink(item.externalLink);
  941. return;
  942. }
  943. if (item.goodsType == 6) {
  944. // 进入直播课
  945. this.toLive(item);
  946. return;
  947. }
  948. // 进入视频课
  949. this.activeItem = item;
  950. if (item.interfaceAccountId > 0) {
  951. //学习账号已开通
  952. if (item.learnStatus > 0) {
  953. //跳转第三方h5
  954. uni.navigateTo({
  955. url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}&isOther=1`,
  956. });
  957. return;
  958. } else {
  959. const text = this.eduPhone ? ",有疑问,请联系" + this.eduPhone : "";
  960. uni.showModal({
  961. showCancel: false,
  962. content: "您的学习账号未开通,请稍后再尝试" + text,
  963. });
  964. return;
  965. }
  966. return;
  967. }
  968. if (
  969. item.serviceStartTime &&
  970. (this.sysTime <= item.serviceStartTime ||
  971. this.sysTime >= item.serviceEndTime)
  972. ) {
  973. uni.showToast({
  974. icon: "none",
  975. title: "不在学习服务期,不能进入学习",
  976. });
  977. return;
  978. }
  979. if (
  980. (item.classStartTime && this.sysTime <= item.classStartTime) ||
  981. (item.classEndTime && this.sysTime >= item.classEndTime)
  982. ) {
  983. uni.showToast({
  984. icon: "none",
  985. title: "不在班级有效期,不能进入学习",
  986. });
  987. return;
  988. }
  989. // learningStatus: 1即刻,2待定,3不在日期内
  990. if (item.learningStatus == 2) {
  991. uni.showToast({
  992. icon: "none",
  993. title: "开放学习时间待定,不能进入学习",
  994. });
  995. return;
  996. }
  997. if (item.classStatus == 0) {
  998. uni.showToast({
  999. icon: "none",
  1000. title: "尚未开班,不能进入学习",
  1001. });
  1002. return;
  1003. }
  1004. if (item.learningStatus == 3 && this.sysTime < item.learningTimeStart) {
  1005. uni.showToast({
  1006. icon: "none",
  1007. title: "不在开放学习时间,不能进入学习",
  1008. });
  1009. return;
  1010. }
  1011. uni.showLoading({
  1012. title: "拼命加载中...",
  1013. mask: true,
  1014. });
  1015. // var confirmDetail = true;
  1016. // if (item.educationName == "继续教育") {
  1017. // if (
  1018. // item.officialName &&
  1019. // item.businessName == "二级" &&
  1020. // item.projectName == "建造师"
  1021. // ) {
  1022. // confirmDetail = await this.userConfirmInfoDetail();
  1023. // }
  1024. // }
  1025. // if (!confirmDetail) {
  1026. // return;
  1027. // }
  1028. this.itemIndex = index;
  1029. if (
  1030. item.gradeStatus == 1 &&
  1031. item.status == 1 &&
  1032. item.serviceEndTime > this.sysTime &&
  1033. item.classEndTime &&
  1034. item.classEndTime < this.sysTime &&
  1035. (item.periodStatus == 0 || item.periodStatus == -1) &&
  1036. item.studyCount > 0
  1037. ) {
  1038. this.selectClass(item, index, "loading");
  1039. return;
  1040. }
  1041. // /course/goodsRebuildStatus查询用户商品重修状态
  1042. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1043. item.goodsId,
  1044. item.gradeId
  1045. );
  1046. if (rebuildStatus == 0) {
  1047. uni.hideLoading();
  1048. this.$navTo.togo("/pages2/learn/details", {
  1049. gradeId: item.gradeId,
  1050. goodsId: item.goodsId,
  1051. orderGoodsId: item.orderGoodsId,
  1052. });
  1053. return;
  1054. }
  1055. this.$method.checkLock().then(() => {
  1056. this.$http({
  1057. url: "/course/courseList",
  1058. method: "get",
  1059. data: {
  1060. pageNum: 1,
  1061. pageSize: 100,
  1062. goodsId: item.goodsId,
  1063. gradeId: item.gradeId,
  1064. orderGoodsId: item.orderGoodsId,
  1065. },
  1066. noLoading: true,
  1067. }).then((res) => {
  1068. if (res.data.code == 200) {
  1069. if (res.data.total > 1) {
  1070. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1071. uni.navigateTo({
  1072. url: `/pages3/polyv/detail?id=''&goodsId=${
  1073. item.goodsId
  1074. }&orderGoodsId=${item.orderGoodsId}&gradeId=${
  1075. item.gradeId
  1076. }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
  1077. });
  1078. } else if (res.data.total == 1) {
  1079. uni.navigateTo({
  1080. url: `/pages3/polyv/detail?id=${
  1081. res.data.rows[0].courseId
  1082. }&goodsId=${item.goodsId}&orderGoodsId=${
  1083. item.orderGoodsId
  1084. }&gradeId=${item.gradeId}&periodWaitTime=${
  1085. item.periodWaitTime ? "" : 1
  1086. }`,
  1087. });
  1088. } else {
  1089. uni.showToast({
  1090. icon: "none",
  1091. title: "暂无可观看的视频课程",
  1092. });
  1093. }
  1094. }
  1095. });
  1096. });
  1097. },
  1098. toDetail() {
  1099. this.$http({
  1100. url: "/course/courseList",
  1101. method: "get",
  1102. data: {
  1103. pageNum: 1,
  1104. pageSize: 100,
  1105. goodsId: item.goodsId,
  1106. gradeId: item.gradeId,
  1107. orderGoodsId: item.orderGoodsId,
  1108. },
  1109. noLoading: true,
  1110. }).then((res) => {
  1111. if (res.data.code == 200) {
  1112. if (res.data.total > 1) {
  1113. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1114. uni.navigateTo({
  1115. url: `/pages3/polyv/detail?id=''&goodsId=${
  1116. item.goodsId
  1117. }&orderGoodsId=${item.orderGoodsId}&gradeId=${
  1118. item.gradeId
  1119. }&periodWaitTime=${item.periodWaitTime ? 1 : ""}`,
  1120. });
  1121. } else if (res.data.total == 1) {
  1122. uni.navigateTo({
  1123. url: `/pages3/polyv/detail?id=${
  1124. res.data.rows[0].courseId
  1125. }&goodsId=${item.goodsId}&orderGoodsId=${
  1126. item.orderGoodsId
  1127. }&gradeId=${item.gradeId}&periodWaitTime=${
  1128. item.periodWaitTime ? "" : 1
  1129. }`,
  1130. });
  1131. } else {
  1132. uni.showToast({
  1133. icon: "none",
  1134. title: "暂无可观看的视频课程",
  1135. });
  1136. }
  1137. }
  1138. });
  1139. },
  1140. toInput(item) {
  1141. this.$navTo.togo("/pages2/verify/input", {
  1142. id: item.goodsId,
  1143. orderGoodsId: item.orderGoodsId,
  1144. gradeId: item.gradeId,
  1145. type: 1,
  1146. });
  1147. },
  1148. /**
  1149. * @param {Object} goodsId 商品id
  1150. * 查询商品重修状态
  1151. */
  1152. courseGoodsRebuildStatus(goodsId, gradeId) {
  1153. return new Promise((resolve) => {
  1154. this.$http({
  1155. url: "/course/goodsRebuildStatus",
  1156. method: "get",
  1157. data: {
  1158. goodsId: goodsId,
  1159. gradeId: gradeId,
  1160. },
  1161. noLoading: true,
  1162. compleLoading: true, // 请求成功是否还要继续显示加载中
  1163. }).then((res) => {
  1164. resolve(res.data.data);
  1165. });
  1166. });
  1167. },
  1168. userConfirmInfoDetail() {
  1169. return new Promise((resolve) => {
  1170. this.$http({
  1171. url: "/user/confirm/info/detail",
  1172. method: "get",
  1173. data: { orderGoodsId: this.activeItem.orderGoodsId },
  1174. noLoading: true,
  1175. }).then((res) => {
  1176. if (!res.data.data) {
  1177. clearInterval(this.confirmTimer);
  1178. this.confirmCount = 10;
  1179. this.showUserConfirmInfo = true;
  1180. this.confirmTimer = setInterval(() => {
  1181. if (this.confirmCount > 0) {
  1182. this.confirmCount--;
  1183. } else {
  1184. clearInterval(this.confirmTimer);
  1185. }
  1186. }, 1000);
  1187. } else {
  1188. if (res.data.data.pushInfo) {
  1189. resolve(true);
  1190. } else {
  1191. const text = this.eduPhone
  1192. ? ",有疑问,请联系" + this.eduPhone
  1193. : "";
  1194. uni.showModal({
  1195. showCancel: false,
  1196. title: "提示",
  1197. content: "开通信息推送不成功,无法进入学习" + text,
  1198. });
  1199. resolve(false);
  1200. }
  1201. }
  1202. });
  1203. });
  1204. },
  1205. selectClass(item, index, load) {
  1206. this.itemIndex = index;
  1207. this.selectItem = item;
  1208. this.selectClassModal = true;
  1209. this.goodsGradeList(item.goodsId, load);
  1210. },
  1211. goodsGradeList(id, load) {
  1212. this.$http({
  1213. url: "/grade/grade/list",
  1214. method: "get",
  1215. data: { goodsId: id },
  1216. noLoading: load ? true : false,
  1217. }).then((res) => {
  1218. if (res.data.code == 200) {
  1219. this.gradeList = res.data.rows;
  1220. if (this.gradeList.length == 0) {
  1221. let item = {
  1222. className: "系统分班",
  1223. gradeId: 0,
  1224. };
  1225. this.gradeList.push(item);
  1226. } else {
  1227. let isGradeFull = this.gradeList.every(
  1228. (item) =>
  1229. item.studentNum > 0 && item.studentNum == item.studentUpper
  1230. );
  1231. //所有班级都满了
  1232. if (isGradeFull) {
  1233. let item = {
  1234. className: "系统分班",
  1235. gradeId: 0,
  1236. };
  1237. this.gradeList.unshift(item);
  1238. }
  1239. }
  1240. }
  1241. });
  1242. },
  1243. radioGroupChange(e) {
  1244. // console.log(e)
  1245. },
  1246. okPopup() {
  1247. if (this.gradeValue == -1) {
  1248. uni.showToast({
  1249. icon: "none",
  1250. title: "请选择班级",
  1251. });
  1252. return;
  1253. }
  1254. this.$api
  1255. .changeGrade({
  1256. goodsId: this.selectItem.goodsId,
  1257. gradeId: this.gradeValue,
  1258. oldGradeId: this.selectItem.gradeId,
  1259. orderGoodsId: this.selectItem.orderGoodsId,
  1260. userId: this.selectItem.userId,
  1261. })
  1262. .then((res) => {
  1263. if (res.data.code == 200) {
  1264. if (this.itemIndex !== "") {
  1265. this.refreshByIndex();
  1266. }
  1267. this.selectClassModal = false;
  1268. uni.showToast({
  1269. title: "选班成功",
  1270. });
  1271. } else {
  1272. uni.showToast({
  1273. icon: "none",
  1274. title: res.data.msg,
  1275. });
  1276. }
  1277. });
  1278. },
  1279. /**
  1280. * 返回刷新之前进入的课程数据
  1281. */
  1282. refreshByIndex() {
  1283. this.$api
  1284. .listUserVideoLive({
  1285. pageNum: this.itemIndex + 1,
  1286. pageSize: 1,
  1287. })
  1288. .then((res) => {
  1289. if (res.data.code == 200) {
  1290. this.$set(this.courseLists, this.itemIndex, res.data.rows[0]);
  1291. }
  1292. });
  1293. },
  1294. confirmUserConfirm() {
  1295. this.$refs.uModal.clearLoading();
  1296. if (this.confirmCount <= 0) {
  1297. if (this.confirmChecked) {
  1298. let infoJson = {
  1299. realname: this.userInfo.realname,
  1300. idCard: this.userInfo.idCard,
  1301. telphone: this.userInfo.telphone,
  1302. };
  1303. this.$api
  1304. .userConfirminfo({
  1305. orderGoodsId: this.activeItem.orderGoodsId,
  1306. infoJson: JSON.stringify(infoJson),
  1307. })
  1308. .then((res) => {
  1309. if (res.data.code != 200) {
  1310. this.showUserConfirmInfo = false;
  1311. uni.showToast({
  1312. icon: "none",
  1313. title: res.data.msg,
  1314. });
  1315. return;
  1316. }
  1317. if (res.data.data.pushInfo) {
  1318. uni.showToast({
  1319. icon: "none",
  1320. title: "提交成功",
  1321. });
  1322. } else {
  1323. const text = this.eduPhone
  1324. ? ",有疑问,请联系" + this.eduPhone
  1325. : "";
  1326. uni.showModal({
  1327. showCancel: false,
  1328. title: "提示",
  1329. content: "开通信息推送不成功,无法进入学!" + text,
  1330. });
  1331. }
  1332. this.showUserConfirmInfo = false;
  1333. });
  1334. } else {
  1335. uni.showToast({
  1336. icon: "none",
  1337. title: "请勾选确认个人信息无误",
  1338. });
  1339. }
  1340. } else {
  1341. return;
  1342. }
  1343. },
  1344. cancelUserConfirm() {
  1345. clearInterval(this.confirmTimer);
  1346. },
  1347. call() {
  1348. // #ifdef MP-WEIXIN
  1349. uni.makePhoneCall({
  1350. phoneNumber: "020-87085982", //仅为示例
  1351. });
  1352. // #endif
  1353. },
  1354. closePop() {
  1355. this.appointTestShow = false;
  1356. },
  1357. jumpTest(appoint) {
  1358. this.$api
  1359. .getExamTip()
  1360. .then((res) => {
  1361. this.nodesCcontent = res.data.data.value;
  1362. this.appoint = appoint;
  1363. this.showTip = true;
  1364. })
  1365. .catch(() => {
  1366. this.appoint_an(appoint);
  1367. this.appointTestShow = false;
  1368. });
  1369. },
  1370. confirmTip() {
  1371. this.showTip = false;
  1372. this.appointTestShow = false;
  1373. this.appoint_an(this.appoint);
  1374. },
  1375. appointment(item) {
  1376. this.appointItemIndex = item;
  1377. this.appointTestList = item.examApplyGoodsList;
  1378. this.appointTestShow = true;
  1379. // if (item.examApplyGoodsList.length > 1) {
  1380. // // 多个考试预约
  1381. // this.appointTestList = item.examApplyGoodsList;
  1382. // this.appointTestShow = true;
  1383. // return;
  1384. // }
  1385. // let appoint_item = item.examApplyGoodsList[0];
  1386. // this.appoint_an(item, appoint_item);
  1387. },
  1388. appoint_an(appoint) {
  1389. const { goodsId, gradeId, orderGoodsId } = this.appointItemIndex;
  1390. var data = {
  1391. goodsId,
  1392. gradeId,
  1393. applyId: appoint.applyId,
  1394. orderGoodsId,
  1395. };
  1396. this.$api.getApplysubscribe(data).then((res) => {
  1397. if (res.data.code === 500) {
  1398. uni.showModal({
  1399. showCancel: false,
  1400. content: res.data.msg,
  1401. });
  1402. }
  1403. if (res.data.code === 200) {
  1404. this.$navTo.togo("/pages2/appointment/index", {
  1405. goodsId,
  1406. gradeId,
  1407. orderGoodsId,
  1408. applyId: appoint.applyId,
  1409. });
  1410. }
  1411. });
  1412. },
  1413. // 进入刷题,调整小程序
  1414. appBeforeAddress(goodsId, item) {
  1415. this.$api
  1416. .appBeforeAddress({
  1417. orderGoodsId: item.orderGoodsId,
  1418. })
  1419. .then((res) => {
  1420. if (res.data.code == 200) {
  1421. uni.navigateToMiniProgram({
  1422. appId: res.data.data.url,
  1423. success(res) {
  1424. // 打开成功
  1425. },
  1426. });
  1427. } else {
  1428. uni.showModal({
  1429. title: "提示",
  1430. content: res.data.msg,
  1431. showCancel: false,
  1432. });
  1433. }
  1434. });
  1435. },
  1436. },
  1437. };
  1438. </script>
  1439. <style>
  1440. page {
  1441. background: #eaeef1;
  1442. }
  1443. </style>
  1444. <style lang="scss" scoped>
  1445. @import "./index.scss";
  1446. @import "./quill.core";
  1447. </style>