index.vue 50 KB

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