index.vue 43 KB

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