index.vue 50 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494
  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="$method.splitImgHost(config.h5Logo)"
  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. export default {
  772. data() {
  773. return {
  774. leftDays: 0,
  775. paramC: {
  776. pageNum: 1,
  777. pageSize: 10,
  778. },
  779. activeItem: {},
  780. itemIndex: "",
  781. confirmTimer: null,
  782. confirmCount: 10,
  783. confirmChecked: false,
  784. showUserConfirmInfo: false,
  785. selectItem: {},
  786. selectClassModal: false,
  787. gradeList: [],
  788. gradeValue: -1,
  789. sysTime: 0,
  790. courseLists: [], // 课程列表
  791. total: 0,
  792. livingLists: [], // 直播列表
  793. allLoading: false, // 加载样式
  794. current: 2,
  795. appointTestShow: false, //预约考试弹窗
  796. appointTestList: [],
  797. appointItemIndex: {}, // 点击了哪项课程
  798. };
  799. },
  800. filters: {
  801. liveStatus(liveTime, watchStatus) {
  802. let value = liveTime * 1000;
  803. if (curTime < value) {
  804. // 判断当前时间和直播开始时间
  805. return " 未开播";
  806. } else {
  807. return watchStatus == "live" ? "正在直播中" : "即将开播";
  808. }
  809. },
  810. },
  811. computed: {
  812. ...mapGetters(["userInfo", "config"]),
  813. allCourse() {
  814. return this.courseLists.length || this.livingLists.length ? true : false;
  815. },
  816. },
  817. onLoad() {
  818. // 1668873600 ,2022.11.20的时间戳
  819. this.leftDays = 1668873600 - parseInt(curTime / 1000);
  820. this.sysTime = +this.$method.timest();
  821. },
  822. async onShow() {
  823. uni.pageScrollTo({
  824. duration: 0,
  825. scrollTop: 0, // number number number!
  826. });
  827. this.getCourseLiveQues();
  828. // await this.commonSystemTime()
  829. },
  830. onPullDownRefresh() {
  831. this.getCourseLiveQues();
  832. },
  833. onReachBottom() {
  834. if (this.courseLists.length <= this.total) {
  835. this.paramC.pageNum++;
  836. this.getCourseList();
  837. }
  838. },
  839. methods: {
  840. ...mapActions(["getUserInfo"]),
  841. bgShow(liveTime, watchStatus) {
  842. let value = liveTime * 1000;
  843. if (curTime > value) {
  844. // 判断当前时间和直播开始时间
  845. return watchStatus == "live" ? true : false;
  846. }
  847. },
  848. lookTimeStatus(liveTime, watchStatus) {
  849. if (liveTime) {
  850. let value = new Date(liveTime * 1000);
  851. var Y = value.getFullYear();
  852. var M =
  853. value.getMonth() + 1 < 10
  854. ? "0" + (value.getMonth() + 1)
  855. : value.getMonth() + 1;
  856. var D = value.getDate() < 10 ? "0" + value.getDate() : value.getDate();
  857. var valZ = Y + "/" + M + "/" + D;
  858. let curZeroTime = new Date(valZ).getTime(); // 获取开始直播时间当天的零点时间戳
  859. if (curTime > value) {
  860. // 判断当前时间和直播开始时间
  861. if (watchStatus == "live") {
  862. //
  863. return 1;
  864. } else {
  865. return 2;
  866. }
  867. } else {
  868. if (curZeroTime <= curTime && curTime <= value) {
  869. //当天
  870. return 3;
  871. } else {
  872. return 4;
  873. }
  874. }
  875. }
  876. },
  877. curTimeTamp(liveTime) {
  878. let min = liveTime - parseInt(curTime / 1000);
  879. return min;
  880. },
  881. toChoose() {
  882. uni.switchTab({
  883. url: "/pages/course/index",
  884. });
  885. },
  886. // 查询直播课
  887. getCourseLiveQues() {
  888. if (!this.$method.isLogin()) {
  889. return;
  890. }
  891. this.allLoading = true;
  892. this.paramC.pageNum = 1;
  893. let arrs = [
  894. this.$api.listUserVideoLive(this.paramC), // 查询用户拥有视频+直播商品 /goods/listUserVideoLive
  895. this.$api.getgoodsLiveList({
  896. pageNum: 1,
  897. pageSize: 3, // 默认3条
  898. }),
  899. ];
  900. wx.stopPullDownRefresh();
  901. Promise.all(arrs)
  902. .then((res) => {
  903. // if (res.data.code == 200) {
  904. const [{ data: res1 }, { data: res2 }] = res;
  905. if (res1.code == 200) {
  906. this.total = res1.total;
  907. this.courseLists = res1.rows || [];
  908. }
  909. // if (res2.code == 200) {
  910. // this.questionLists = res2.rows || []
  911. // }
  912. if (res2.code == 200) {
  913. this.livingLists = res2.rows || [];
  914. } else {
  915. this.$u.toast(res2.msg);
  916. }
  917. this.allLoading = false;
  918. this.sysTime = +this.$method.timest();
  919. // }
  920. uni.hideLoading();
  921. })
  922. .catch((err) => {
  923. uni.hideLoading();
  924. this.allLoading = false;
  925. });
  926. },
  927. getCourseList() {
  928. this.$api
  929. .listUserVideoLive(this.paramC)
  930. .then((res) => {
  931. this.courseLists.push(...res.data.rows);
  932. })
  933. .finally((e) => {
  934. uni.hideLoading();
  935. });
  936. },
  937. // 看直播
  938. toLiveLook(item) {
  939. let moduleId = item.moduleId || 0;
  940. let chapterId = item.chapterId || 0;
  941. let sectionId = item.sectionId || item.menuId;
  942. let uuid = new Date().valueOf() + "";
  943. // buyCourse 是否购买课程:1是 0否
  944. let encode = encodeURIComponent(
  945. this.config.hostLive +
  946. "pages/live/index?token=" +
  947. uni.getStorageSync("token") +
  948. "&userInfo=" +
  949. JSON.stringify(this.userInfo) +
  950. "&channelId=" +
  951. item.liveUrl +
  952. "&gradeId=" +
  953. 0 +
  954. "&courseId=" +
  955. item.courseId +
  956. "&goodsId=" +
  957. item.goodsId +
  958. "&orderGoodsId=" +
  959. item.orderGoodsId +
  960. "&sectionId=" +
  961. sectionId +
  962. "&chapterId=" +
  963. chapterId +
  964. "&moduleId=" +
  965. moduleId +
  966. "&buyCourse=1" +
  967. "&ident=" +
  968. uuid +
  969. "&sectionType=2"
  970. );
  971. uni.navigateTo({
  972. url: `../../pages/webview/index?url=` + encode,
  973. });
  974. },
  975. toLive(item) {
  976. this.$api
  977. .courseCourseList({
  978. pageNum: 1,
  979. pageSize: 1,
  980. goodsId: item.goodsId,
  981. gradeId: 0,
  982. orderGoodsId: item.orderGoodsId,
  983. })
  984. .then((res) => {
  985. if (res.data.code == 200) {
  986. if (res.data.total > 1) {
  987. // uni.navigateTo({
  988. // url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
  989. // })
  990. uni.navigateTo({
  991. url:
  992. "/pages3/live/detail?orderGoodsId=" +
  993. item.orderGoodsId +
  994. "&goodsId=" +
  995. item.goodsId +
  996. '&gradeId=0&courseId=""',
  997. });
  998. } else if (res.data.total == 1) {
  999. uni.navigateTo({
  1000. url:
  1001. "/pages3/live/detail?orderGoodsId=" +
  1002. item.orderGoodsId +
  1003. "&goodsId=" +
  1004. item.goodsId +
  1005. "&gradeId=0&courseId=" +
  1006. res.data.rows[0].courseId,
  1007. });
  1008. } else {
  1009. uni.showToast({
  1010. icon: "none",
  1011. title: "暂无可观看的直播课程",
  1012. });
  1013. }
  1014. }
  1015. });
  1016. },
  1017. toLink(externalLink) {
  1018. if (!externalLink) {
  1019. uni.showModal({
  1020. showCancel: false,
  1021. content: "链接不存在",
  1022. });
  1023. return;
  1024. }
  1025. // #ifdef MP-WEIXIN
  1026. uni.navigateTo({
  1027. url: `/pages/webview/sdlink?url=` + externalLink,
  1028. });
  1029. // #endif
  1030. // #ifdef H5
  1031. window.location.href = externalLink;
  1032. // #endif
  1033. },
  1034. async studyIn(v, i, item, index) {
  1035. if (item.externalLinkStatus) {
  1036. this.toLink(item.externalLink);
  1037. return;
  1038. }
  1039. if (item.goodsType == 6) {
  1040. // 进入直播课
  1041. this.toLive(item);
  1042. return;
  1043. }
  1044. // 进入视频课
  1045. this.activeItem = item;
  1046. if (item.interfaceAccountId > 0) {
  1047. //学习账号已开通
  1048. if (item.learnStatus > 0) {
  1049. //跳转第三方h5
  1050. uni.navigateTo({
  1051. url: `/pages3/polyv/detail?goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}&isOther=1`,
  1052. });
  1053. return;
  1054. } else {
  1055. uni.showModal({
  1056. showCancel: false,
  1057. content:
  1058. "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!",
  1059. });
  1060. return;
  1061. }
  1062. return;
  1063. }
  1064. if (
  1065. item.serviceStartTime &&
  1066. (this.sysTime <= item.serviceStartTime ||
  1067. this.sysTime >= item.serviceEndTime)
  1068. ) {
  1069. uni.showToast({
  1070. icon: "none",
  1071. title: "不在学习服务期,不能进入学习",
  1072. });
  1073. return;
  1074. }
  1075. if (
  1076. (item.classStartTime && this.sysTime <= item.classStartTime) ||
  1077. (item.classEndTime && this.sysTime >= item.classEndTime)
  1078. ) {
  1079. uni.showToast({
  1080. icon: "none",
  1081. title: "不在班级有效期,不能进入学习",
  1082. });
  1083. return;
  1084. }
  1085. // learningStatus: 1即刻,2待定,3不在日期内
  1086. if (item.learningStatus == 2) {
  1087. uni.showToast({
  1088. icon: "none",
  1089. title: "开放学习时间待定,不能进入学习",
  1090. });
  1091. return;
  1092. }
  1093. if (item.classStatus == 0) {
  1094. uni.showToast({
  1095. icon: "none",
  1096. title: "尚未开班,不能进入学习",
  1097. });
  1098. return;
  1099. }
  1100. if (item.learningStatus == 3 && this.sysTime < item.learningTimeStart) {
  1101. uni.showToast({
  1102. icon: "none",
  1103. title: "不在开放学习时间,不能进入学习",
  1104. });
  1105. return;
  1106. }
  1107. uni.showLoading({
  1108. title: "拼命加载中...",
  1109. mask: true,
  1110. });
  1111. var confirmDetail = true;
  1112. if (item.educationName == "继续教育") {
  1113. if (
  1114. item.officialName &&
  1115. item.businessName == "二级" &&
  1116. item.projectName == "建造师"
  1117. ) {
  1118. confirmDetail = await this.userConfirmInfoDetail();
  1119. }
  1120. }
  1121. if (!confirmDetail) {
  1122. return;
  1123. }
  1124. this.itemIndex = index;
  1125. if (
  1126. item.gradeStatus == 1 &&
  1127. item.status == 1 &&
  1128. item.serviceEndTime > this.sysTime &&
  1129. item.classEndTime &&
  1130. item.classEndTime < this.sysTime &&
  1131. (item.periodStatus == 0 || item.periodStatus == -1) &&
  1132. item.studyCount > 0
  1133. ) {
  1134. this.selectClass(item, index, "loading");
  1135. return;
  1136. }
  1137. // /course/goodsRebuildStatus查询用户商品重修状态
  1138. let rebuildStatus = await this.courseGoodsRebuildStatus(
  1139. item.goodsId,
  1140. item.gradeId
  1141. );
  1142. if (rebuildStatus == 0) {
  1143. uni.hideLoading();
  1144. this.$navTo.togo("/pages2/learn/details", {
  1145. gradeId: item.gradeId,
  1146. goodsId: item.goodsId,
  1147. orderGoodsId: item.orderGoodsId,
  1148. });
  1149. return;
  1150. }
  1151. // /lock/lockStatus
  1152. this.$api
  1153. .lockLockStatus({
  1154. action: "jxjy",
  1155. uuid: this.$method.getUuid(),
  1156. })
  1157. .then((res) => {
  1158. if (res.data.code == 200) {
  1159. //有其他端在操作,不能学习
  1160. uni.showToast({
  1161. icon: "none",
  1162. title: res.data.msg,
  1163. mask: true,
  1164. duration: 3000,
  1165. });
  1166. } else if (res.data.code == 500) {
  1167. //可以学习
  1168. this.$http({
  1169. url: "/course/courseList",
  1170. method: "get",
  1171. data: {
  1172. pageNum: 1,
  1173. pageSize: 100,
  1174. goodsId: item.goodsId,
  1175. gradeId: item.gradeId,
  1176. orderGoodsId: item.orderGoodsId,
  1177. },
  1178. noLoading: true,
  1179. }).then((res) => {
  1180. if (res.data.code == 200) {
  1181. if (res.data.total > 1) {
  1182. // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
  1183. uni.navigateTo({
  1184. url: `/pages3/polyv/detail?id=''&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1185. });
  1186. } else if (res.data.total == 1) {
  1187. uni.navigateTo({
  1188. url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}&gradeId=${item.gradeId}`,
  1189. });
  1190. } else {
  1191. uni.showToast({
  1192. icon: "none",
  1193. title: "暂无可观看的视频课程",
  1194. });
  1195. }
  1196. }
  1197. });
  1198. return;
  1199. }
  1200. });
  1201. },
  1202. /**
  1203. * @param {Object} goodsId 商品id
  1204. * 查询商品重修状态
  1205. */
  1206. courseGoodsRebuildStatus(goodsId, gradeId) {
  1207. return new Promise((resolve) => {
  1208. this.$http({
  1209. url: "/course/goodsRebuildStatus",
  1210. method: "get",
  1211. data: {
  1212. goodsId: goodsId,
  1213. gradeId: gradeId,
  1214. },
  1215. noLoading: true,
  1216. compleLoading: true, // 请求成功是否还要继续显示加载中
  1217. }).then((res) => {
  1218. resolve(res.data.data);
  1219. });
  1220. });
  1221. },
  1222. userConfirmInfoDetail() {
  1223. return new Promise((resolve) => {
  1224. this.$http({
  1225. url: "/user/confirm/info/detail",
  1226. method: "get",
  1227. data: { orderGoodsId: this.activeItem.orderGoodsId },
  1228. noLoading: true,
  1229. }).then((res) => {
  1230. if (!res.data.data) {
  1231. clearInterval(this.confirmTimer);
  1232. this.confirmCount = 10;
  1233. this.showUserConfirmInfo = true;
  1234. this.confirmTimer = setInterval(() => {
  1235. if (this.confirmCount > 0) {
  1236. this.confirmCount--;
  1237. } else {
  1238. clearInterval(this.confirmTimer);
  1239. }
  1240. }, 1000);
  1241. } else {
  1242. if (res.data.data.pushInfo) {
  1243. resolve(true);
  1244. } else {
  1245. uni.showModal({
  1246. showCancel: false,
  1247. title: "提示",
  1248. content:
  1249. "开通信息推送不成功,无法进入学习,请联系020-87085982!",
  1250. });
  1251. resolve(false);
  1252. }
  1253. }
  1254. });
  1255. });
  1256. },
  1257. selectClass(item, index, load) {
  1258. this.itemIndex = index;
  1259. this.selectItem = item;
  1260. this.selectClassModal = true;
  1261. this.goodsGradeList(item.goodsId, load);
  1262. },
  1263. goodsGradeList(id, load) {
  1264. this.$http({
  1265. url: "/grade/grade/list",
  1266. method: "get",
  1267. data: { goodsId: id },
  1268. noLoading: load ? true : false,
  1269. }).then((res) => {
  1270. if (res.data.code == 200) {
  1271. this.gradeList = res.data.rows;
  1272. if (this.gradeList.length == 0) {
  1273. let item = {
  1274. className: "系统分班",
  1275. gradeId: 0,
  1276. };
  1277. this.gradeList.push(item);
  1278. } else {
  1279. let isGradeFull = this.gradeList.every(
  1280. (item) =>
  1281. item.studentNum > 0 && item.studentNum == item.studentUpper
  1282. );
  1283. //所有班级都满了
  1284. if (isGradeFull) {
  1285. let item = {
  1286. className: "系统分班",
  1287. gradeId: 0,
  1288. };
  1289. this.gradeList.unshift(item);
  1290. }
  1291. }
  1292. }
  1293. });
  1294. },
  1295. radioGroupChange(e) {
  1296. // console.log(e)
  1297. },
  1298. okPopup() {
  1299. if (this.gradeValue == -1) {
  1300. uni.showToast({
  1301. icon: "none",
  1302. title: "请选择班级",
  1303. });
  1304. return;
  1305. }
  1306. this.$api
  1307. .changeGrade({
  1308. goodsId: this.selectItem.goodsId,
  1309. gradeId: this.gradeValue,
  1310. oldGradeId: this.selectItem.gradeId,
  1311. orderGoodsId: this.selectItem.orderGoodsId,
  1312. userId: this.selectItem.userId,
  1313. })
  1314. .then((res) => {
  1315. if (res.data.code == 200) {
  1316. if (this.itemIndex !== "") {
  1317. this.refreshByIndex();
  1318. }
  1319. this.selectClassModal = false;
  1320. uni.showToast({
  1321. title: "选班成功",
  1322. });
  1323. } else {
  1324. uni.showToast({
  1325. icon: "none",
  1326. title: res.data.msg,
  1327. });
  1328. }
  1329. });
  1330. },
  1331. /**
  1332. * 返回刷新之前进入的课程数据
  1333. */
  1334. refreshByIndex() {
  1335. this.$api
  1336. .listUserVideoLive({
  1337. pageNum: this.itemIndex + 1,
  1338. pageSize: 1,
  1339. })
  1340. .then((res) => {
  1341. if (res.data.code == 200) {
  1342. this.$set(this.courseLists, this.itemIndex, res.data.rows[0]);
  1343. }
  1344. });
  1345. },
  1346. confirmUserConfirm() {
  1347. this.$refs.uModal.clearLoading();
  1348. if (this.confirmCount <= 0) {
  1349. if (this.confirmChecked) {
  1350. let infoJson = {
  1351. realname: this.userInfo.realname,
  1352. idCard: this.userInfo.idCard,
  1353. telphone: this.userInfo.telphone,
  1354. };
  1355. this.$api
  1356. .userConfirminfo({
  1357. orderGoodsId: this.activeItem.orderGoodsId,
  1358. infoJson: JSON.stringify(infoJson),
  1359. })
  1360. .then((res) => {
  1361. if (res.data.data.pushInfo) {
  1362. uni.showToast({
  1363. icon: "none",
  1364. title: "提交成功",
  1365. });
  1366. } else {
  1367. uni.showModal({
  1368. showCancel: false,
  1369. title: "提示",
  1370. content:
  1371. "开通信息推送不成功,无法进入学习,请联系020-87085982!",
  1372. });
  1373. }
  1374. this.showUserConfirmInfo = false;
  1375. });
  1376. } else {
  1377. uni.showToast({
  1378. icon: "none",
  1379. title: "请勾选确认个人信息无误",
  1380. });
  1381. }
  1382. } else {
  1383. return;
  1384. }
  1385. },
  1386. cancelUserConfirm() {
  1387. clearInterval(this.confirmTimer);
  1388. },
  1389. call() {
  1390. uni.makePhoneCall({
  1391. phoneNumber: "020-87085982", //仅为示例
  1392. });
  1393. },
  1394. closePop() {
  1395. this.appointTestShow = false;
  1396. },
  1397. jumpTest(item, appoint) {
  1398. this.appoint_an(item, appoint);
  1399. this.appointTestShow = false;
  1400. },
  1401. appointment(item, appoint) {
  1402. this.appointItemIndex = item;
  1403. if (item.examApplyGoodsList.length > 1) {
  1404. // 多个考试预约
  1405. this.appointTestList = item.examApplyGoodsList;
  1406. this.appointTestShow = true;
  1407. return;
  1408. }
  1409. let appoint_item = item.examApplyGoodsList[0];
  1410. this.appoint_an(item, appoint_item);
  1411. },
  1412. appoint_an(item, appoint) {
  1413. var data = {
  1414. goodsId: item.goodsId,
  1415. gradeId: item.gradeId,
  1416. applyId: appoint.applyId,
  1417. orderGoodsId: item.orderGoodsId,
  1418. };
  1419. this.$api.getApplysubscribe(data).then((res) => {
  1420. if (res.data.code === 500) {
  1421. uni.showModal({
  1422. showCancel: false,
  1423. content: res.data.msg,
  1424. });
  1425. }
  1426. if (res.data.code === 200) {
  1427. this.$navTo.togo("/pages2/appointment/index", {
  1428. goodsId: item.goodsId,
  1429. gradeId: item.gradeId,
  1430. orderGoodsId: item.orderGoodsId,
  1431. applyId: appoint.applyId,
  1432. });
  1433. }
  1434. });
  1435. },
  1436. // 进入刷题,调整小程序
  1437. appBeforeAddress(goodsId, item) {
  1438. this.$api
  1439. .appBeforeAddress({
  1440. orderGoodsId: item.orderGoodsId,
  1441. })
  1442. .then((res) => {
  1443. if (res.data.code == 200) {
  1444. uni.navigateToMiniProgram({
  1445. appId: res.data.data.url,
  1446. success(res) {
  1447. // 打开成功
  1448. },
  1449. });
  1450. } else {
  1451. uni.showModal({
  1452. title: "提示",
  1453. content: res.data.msg,
  1454. showCancel: false,
  1455. });
  1456. }
  1457. });
  1458. },
  1459. },
  1460. };
  1461. </script>
  1462. <style>
  1463. page {
  1464. background: #eaeef1;
  1465. }
  1466. </style>
  1467. <style lang="scss" scoped>
  1468. @import "./index.scss";
  1469. </style>