index.vue 33 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217
  1. <template>
  2. <div class="my-message">
  3. <div class="my-message__header">
  4. <el-tabs :value="formData.systemStatusList" @tab-click="tabChange">
  5. <el-tab-pane
  6. :label="item.label"
  7. :name="item.systemStatus"
  8. v-for="(item, index) in tabList"
  9. :key="index"
  10. ></el-tab-pane>
  11. </el-tabs>
  12. </div>
  13. <div class="my-message__body">
  14. <div class="content">
  15. <div class="content__header">
  16. <div class="text">
  17. 未读共
  18. <span class="note">{{ receiptNum }}</span>
  19. </div>
  20. <el-button
  21. type="danger"
  22. @click="clearMsg"
  23. round
  24. plain
  25. class="btn btn--red"
  26. >清空</el-button
  27. >
  28. <el-button
  29. type="primary"
  30. round
  31. plain
  32. class="btn"
  33. @click="uploadMsgStatus"
  34. >全部标为已读</el-button
  35. >
  36. </div>
  37. <div class="content__body">
  38. <div class="no-data" v-if="list.length == 0">暂无消息</div>
  39. <template v-else>
  40. <div class="message-list" v-if="listListStatus">
  41. <div
  42. class="message-list__item"
  43. v-for="(item, index) in list"
  44. :key="index"
  45. >
  46. <div
  47. class="icon"
  48. :class="{ 'icon--blue': item.systemStatus === 1 ? '' : true }"
  49. >
  50. <i
  51. v-if="item.systemStatus === 1"
  52. class="el-icon-message-solid"
  53. ></i>
  54. <i v-else class="el-icon-s-custom"></i>
  55. </div>
  56. <div class="text">
  57. <div class="desc">
  58. {{ $tools.timestampToTime(item.sendTime, false) }}
  59. </div>
  60. <div
  61. class="title"
  62. :style="item.receiptStatus == 1 ? 'color:#999' : ''"
  63. >
  64. {{
  65. item.systemStatus === 2
  66. ? item.informVo.informName
  67. : item.systemStatus === 1
  68. ? item.text
  69. : "接口异常"
  70. }}
  71. </div>
  72. </div>
  73. <el-button type="primary" class="btn" @click="showDetail(item)"
  74. >查看详情</el-button
  75. >
  76. </div>
  77. </div>
  78. <div class="pagination">
  79. <el-pagination
  80. @current-change="currentChange"
  81. background
  82. layout="prev, pager, next"
  83. :total="total"
  84. :pager-count="5"
  85. :page-size="formData.pageSize"
  86. >
  87. </el-pagination>
  88. </div>
  89. </template>
  90. </div>
  91. </div>
  92. </div>
  93. <el-dialog
  94. width="600px"
  95. class="my-message-modal"
  96. :visible.sync="showDetailModal"
  97. :close-on-click-modal="false"
  98. :close-on-press-escape="false"
  99. :show-close="false"
  100. >
  101. <div class="my-message-modal__content">
  102. <div class="my-message-modal__close" @click="showDetailModal = false">
  103. X
  104. </div>
  105. <div class="my-message-modal__header">通知详情</div>
  106. <div class="my-message-modal__body">
  107. <div class="content">
  108. <div class="content__body">
  109. <div class="title">
  110. {{
  111. listData.systemStatus === 2
  112. ? listData.informVo.informName
  113. : listData.systemStatus === 1
  114. ? listData.remind
  115. : ""
  116. }}
  117. </div>
  118. <div class="desc">
  119. {{ $tools.timestampToTime(listData.sendTime, false) }}
  120. </div>
  121. <div
  122. class="content"
  123. v-if="listData.systemStatus === 2"
  124. v-html="listData.informVo.affiche"
  125. ></div>
  126. <div class="content" v-if="listData.systemStatus === 1">
  127. {{ listData.text }}
  128. </div>
  129. <div class="list" v-if="listData.informVo">
  130. <div
  131. class="item"
  132. v-for="(item, index) in listData.informVo.informCourseVo"
  133. :key="'informVo' + index"
  134. >
  135. <div class="item__title">{{ item.goodsName }}</div>
  136. <div class="item__desc">
  137. {{ item.courseName
  138. }}{{ item.moduleName ? "/" + item.moduleName : ""
  139. }}{{ item.chapterName ? "/" + item.chapterName : ""
  140. }}{{ item.sectionName }}
  141. </div>
  142. <div v-if="false" class="item__content" @click="jumpSection(item)">
  143. {{
  144. $tools.secondToTime(item.topicNum, false)
  145. }}(点击可直接跳转)
  146. </div>
  147. </div>
  148. <div
  149. class="item"
  150. v-for="(item, index) in listData.informVo.informExamVo"
  151. :key="'informExamVo' + index"
  152. >
  153. <div class="item__title">{{ item.goodsName }}</div>
  154. <div class="item__desc">
  155. {{ item.moduleName ? "/" + item.moduleName : ""
  156. }}{{ item.chapterName ? "/" + item.chapterName : ""
  157. }}{{ item.examName }}
  158. </div>
  159. <div v-if="false" class="item__content" @click="jumpExam(item)">
  160. 第{{ item.topicNum }}道题(点击可直接跳转)
  161. </div>
  162. </div>
  163. </div>
  164. </div>
  165. </div>
  166. </div>
  167. <div
  168. class="my-message-modal__footer"
  169. v-if="
  170. (statusGO &&
  171. listData.systemStatus === 1 &&
  172. getNames(listData.remindId) !== '') ||
  173. (listData.systemStatus === 2 && listData.receiptStatus === 0)
  174. "
  175. >
  176. <el-button
  177. type="primary"
  178. class="confirm"
  179. @click="isOk"
  180. v-if="listData.systemStatus === 2 && listData.receiptStatus === 0"
  181. >
  182. 我已阅读
  183. </el-button>
  184. <el-button
  185. type="primary"
  186. class="confirm"
  187. @click="jumpFuns(goodsData, listData.remindId)"
  188. v-if="
  189. statusGO &&
  190. listData.systemStatus === 1 &&
  191. getNames(listData.remindId) !== ''
  192. "
  193. >
  194. {{ getNames(listData.remindId) }}
  195. </el-button>
  196. </div>
  197. </div>
  198. </el-dialog>
  199. <RebuildModal
  200. ref="rebuildModal"
  201. @rebuildSubmit="rebuildSubmit($event)"
  202. ></RebuildModal>
  203. </div>
  204. </template>
  205. <script>
  206. import { mapMutations } from "vuex";
  207. import RebuildModal from "@/components/rebuildModal";
  208. export default {
  209. name: "MyMessage",
  210. components: {
  211. RebuildModal
  212. },
  213. data() {
  214. return {
  215. showDetailModal: false,
  216. tabList: [
  217. {
  218. label: "系统消息",
  219. systemStatus: "1"
  220. },
  221. {
  222. label: "教务消息",
  223. systemStatus: "2"
  224. }
  225. ],
  226. formData: {
  227. systemStatusList: "1", //1系统消息2教务消息
  228. pageNum: 1,
  229. pageSize: 10
  230. },
  231. goodsData: {},
  232. list: [],
  233. listData: {},
  234. messageId: 0,
  235. sysTime: 0,
  236. statusGO: true,
  237. total: 0,
  238. rebuildItems: {},
  239. rebuildItem: [],
  240. listListStatus: true,
  241. receiptNum: 0, //未读数量
  242. orderGoodsId: 0
  243. };
  244. },
  245. mounted() {
  246. this.getappinformUserlist();
  247. },
  248. methods: {
  249. ...mapMutations(["getMsgCount"]),
  250. getreceiptStatus() {
  251. this.$request
  252. .getappinformUserlist({
  253. pageNum:1,
  254. pageSize:10,
  255. systemStatusList: this.formData.systemStatusList,
  256. receiptStatus: 0
  257. })
  258. .then(res => {
  259. this.receiptNum = res.total;
  260. });
  261. },
  262. /**
  263. * 全部已读
  264. */
  265. uploadMsgStatus() {
  266. this.$confirm("确定全部标记为已读?")
  267. .then(_ => {
  268. this.$request
  269. .courseappinformUserupdateAllRead({
  270. systemStatus: this.formData.systemStatusList
  271. })
  272. .then(res => {
  273. this.getMsgCount();
  274. this.$message.success("成功");
  275. this.getappinformUserlist();
  276. });
  277. })
  278. .catch(_ => {});
  279. },
  280. currentChange(e) {
  281. this.formData.pageNum = e;
  282. this.getappinformUserlist();
  283. },
  284. tabChange(e) {
  285. if (this.formData.systemStatusList == e.name) return;
  286. this.formData.systemStatusList = e.name;
  287. this.formData.pageNum = 1;
  288. this.getappinformUserlist();
  289. },
  290. getappinformUserlist() {
  291. this.listListStatus = false;
  292. this.$request
  293. .getappinformUserlist(this.formData)
  294. .then(res => {
  295. this.list = res.rows;
  296. this.total = res.total;
  297. this.getreceiptStatus();
  298. this.getMsgCount();
  299. })
  300. .finally(() => {
  301. this.listListStatus = true;
  302. });
  303. },
  304. /**
  305. * 清空消息
  306. */
  307. clearMsg() {
  308. this.$confirm("清空消息吗?")
  309. .then(_ => {
  310. this.$request.appInformUserRemoveAll().then(res => {
  311. this.getMsgCount();
  312. this.formData.pageNum = 1;
  313. this.getappinformUserlist();
  314. });
  315. })
  316. .catch(_ => {});
  317. },
  318. getNames(int) {
  319. var arsty = "";
  320. switch (int) {
  321. case 1:
  322. case 3:
  323. case 5:
  324. case 6:
  325. case 7:
  326. case 19:
  327. case 21:
  328. case 22:
  329. case 23:
  330. case 28:
  331. case 29:
  332. case 31:
  333. case 32:
  334. arsty = "立刻学习";
  335. break;
  336. case 2:
  337. case 4:
  338. case 24:
  339. arsty = "马上填写";
  340. break;
  341. case 10:
  342. case 12:
  343. case 18:
  344. arsty = "立即重学";
  345. break;
  346. case 11:
  347. arsty = "立即预约";
  348. break;
  349. case 13:
  350. arsty = "预约考试";
  351. break;
  352. case 20:
  353. arsty = "重新购买";
  354. break;
  355. default:
  356. break;
  357. }
  358. return arsty;
  359. },
  360. //跳转页面
  361. async jumpFuns(item, remindId) {
  362. switch (remindId) {
  363. case 1:
  364. case 3:
  365. case 5:
  366. case 6:
  367. case 7:
  368. case 19:
  369. case 21:
  370. case 22:
  371. case 23:
  372. case 10:
  373. case 12:
  374. case 18:
  375. case 28:
  376. case 29:
  377. case 31:
  378. case 32:
  379. //课程
  380. if (item.goodsType == 1 || item.goodsType == 6) {
  381. item.orderGoodsId = this.orderGoodsId;
  382. this.canJump(item).then(res => {
  383. this.$router.push({
  384. path: `/my-course-detail/${item.goodsId}`,
  385. query: {
  386. gradeId: item.gradeId,
  387. orderGoodsId: item.orderGoodsId,
  388. courseId: res.rows[0].courseId || ""
  389. }
  390. });
  391. });
  392. // arsty = '立刻学习';
  393. //题库
  394. } else if (item.goodsType == 2) {
  395. this.$router.push({
  396. path: "/person-center/my-bank/bank-detail/" + item.goodsId,
  397. query: {
  398. orderGoodsId: item.orderGoodsId
  399. }
  400. });
  401. }
  402. break;
  403. case 2:
  404. case 4:
  405. case 24:
  406. console.log(item, "item");
  407. item.orderGoodsId = this.orderGoodsId;
  408. this.canJump(item).then(res => {
  409. this.$router.push({
  410. path: `/my-course-detail/${item.goodsId}`,
  411. query: {
  412. gradeId: item.gradeId,
  413. orderGoodsId: item.orderGoodsId,
  414. courseId: res.rows[0].courseId || ""
  415. }
  416. });
  417. });
  418. break;
  419. case 11:
  420. case 13:
  421. var data = {
  422. goodsId: item.goodsId,
  423. gradeId: item.gradeId
  424. };
  425. this.$request
  426. .getApplysubscribe(data)
  427. .then(res => {
  428. this.$router.push({
  429. path: "/person-center/my-examination/appointment",
  430. query: {
  431. goodsId: item.goodsId,
  432. gradeId: item.gradeId
  433. }
  434. });
  435. })
  436. .catch(err => {
  437. this.$message({
  438. type: "warning",
  439. message: err.msg
  440. });
  441. });
  442. break;
  443. case 20:
  444. item.orderGoodsId = this.orderGoodsId;
  445. this.canJump(item).then(res => {
  446. this.$router.push({
  447. path: `/my-course-detail/${item.goodsId}`,
  448. query: {
  449. gradeId: item.gradeId,
  450. orderGoodsId: item.orderGoodsId,
  451. courseId: res.rows[0].courseId || ""
  452. }
  453. });
  454. });
  455. break;
  456. default:
  457. break;
  458. }
  459. },
  460. /**
  461. * @param {Object} goodsId 商品id
  462. * 查询商品重修状态
  463. */
  464. courseGoodsRebuildStatus(goodsId, gradeId) {
  465. return new Promise(resolve => {
  466. this.$request
  467. .courseGoodsRebuildStatus({
  468. goodsId: goodsId,
  469. gradeId: gradeId
  470. })
  471. .then(res => {
  472. resolve(res.data);
  473. });
  474. });
  475. },
  476. rebuildSubmit(item) {
  477. this.$router.push({
  478. path: `/my-course-detail/${item.goodsId}`,
  479. query: {
  480. gradeId: item.gradeId,
  481. orderGoodsId: item.orderGoodsId,
  482. rebuild: 1
  483. }
  484. });
  485. },
  486. showDetail(item) {
  487. this.sysTime = this.$tools.timest();
  488. this.messageId = item.id;
  489. this.orderGoodsId = item.orderGoodsId;
  490. this.getMessage();
  491. },
  492. isOk() {
  493. this.$request
  494. .courseappinformUser({ id: this.listData.id, receiptStatus: 1 })
  495. .then(res => {
  496. this.getappinformUserlist();
  497. });
  498. this.showDetailModal = false;
  499. },
  500. getMessage() {
  501. this.$request.getappinformUserId(this.messageId).then(res => {
  502. if (
  503. res.data.receiptStatus === 1 &&
  504. (res.data.remindId === 2 ||
  505. res.data.remindId === 4 ||
  506. res.data.remindId === 24)
  507. ) {
  508. this.$request
  509. .getbaseprofiletpgetInfo({ goodsId: res.data.goodsId })
  510. .then(k => {
  511. if (
  512. (k.data.status === 3 && k.data.changeStatus === 2) ||
  513. k.data.status === 2 ||
  514. k.data.status === 1
  515. ) {
  516. this.statusGO = false;
  517. } else {
  518. this.statusGO = true;
  519. }
  520. });
  521. }
  522. if (!res.data.receiptStatus) {
  523. this.$request
  524. .courseappinformUser({ id: res.data.id, receiptStatus: 1 })
  525. .then(res => {});
  526. }
  527. if (res.data.informVo && res.data.informVo.affiche) {
  528. res.data.informVo.affiche = res.data.informVo.affiche.replace(
  529. /<img/gi,
  530. '<img style="max-width:100%;"'
  531. );
  532. }
  533. this.listData = res.data;
  534. console.log(this.listData, "listData");
  535. if (res.data.goodsId) {
  536. if (res.data.gradeId) {
  537. this.$request.goodsDetail(res.data.goodsId).then(rs => {
  538. this.goodsData = rs.data;
  539. this.showDetailModal = true;
  540. if (
  541. rs.data.goodsType === 3 &&
  542. (res.data.remindId === 1 ||
  543. res.data.remindId === 3 ||
  544. res.data.remindId === 5 ||
  545. res.data.remindId === 6 ||
  546. res.data.remindId === 7 ||
  547. res.data.remindId === 19 ||
  548. res.data.remindId === 21 ||
  549. res.data.remindId === 22)
  550. ) {
  551. this.statusGO = false;
  552. } else {
  553. this.statusGO = true;
  554. }
  555. });
  556. } else {
  557. this.$request.commonGoodsDetail(res.data.goodsId).then(rs => {
  558. this.goodsData = rs.data;
  559. this.showDetailModal = true;
  560. if (
  561. rs.data.goodsType === 3 &&
  562. (res.data.remindId === 1 ||
  563. res.data.remindId === 3 ||
  564. res.data.remindId === 5 ||
  565. res.data.remindId === 6 ||
  566. res.data.remindId === 7 ||
  567. res.data.remindId === 19 ||
  568. res.data.remindId === 21 ||
  569. res.data.remindId === 22)
  570. ) {
  571. this.statusGO = false;
  572. } else {
  573. this.statusGO = true;
  574. }
  575. });
  576. }
  577. } else {
  578. this.showDetailModal = true;
  579. }
  580. this.getappinformUserlist();
  581. });
  582. },
  583. canJump(item) {
  584. return new Promise(resolve => {
  585. this.$request
  586. .orderInfo({
  587. orderGoodsId: item.orderGoodsId
  588. })
  589. .then(async res => {
  590. let items = res.data;
  591. let currentTime = this.$tools.timest();
  592. console.log(currentTime);
  593. console.log(items);
  594. console.log(items.serviceStartTime);
  595. console.log(items.serviceEndTime);
  596. console.log(
  597. currentTime < items.serviceStartTime ||
  598. currentTime > items.serviceEndTime
  599. );
  600. if (items.interfaceAccountId > 0) {
  601. //学习账号已开通
  602. if (items.learnStatus == 1) {
  603. //跳转第三方h5
  604. const confirmText = [
  605. "您的学习账号已经开通,请按照步骤操作,进行学习。",
  606. "1.点击【跳转学习网址】按钮",
  607. "2.打开学习网址后,选择【个人用户】进行登录",
  608. "(1)账号:您个人的身份证号码",
  609. "(2)密码:身份证号码,再加111111"
  610. ];
  611. const newDatas = [];
  612. const h = this.$createElement;
  613. for (const i in confirmText) {
  614. newDatas.push(h("p", null, confirmText[i]));
  615. }
  616. this.$confirm(h("div", null, newDatas), "温馨提示", {
  617. confirmButtonText: "跳转学习网址",
  618. cancelButtonText: "关闭",
  619. closeOnClickModal: false,
  620. closeOnPressEscape: false,
  621. distinguishCancelAndClose: false,
  622. showClose: false
  623. })
  624. .then(_ => {
  625. window.open("http://admin.zhujianpeixun.com/", "_blank");
  626. })
  627. .catch(_ => {});
  628. return;
  629. } else {
  630. this.$message({
  631. type: "warning",
  632. message:
  633. "您的学习账号未开通,请稍后再尝试,有疑问,请联系020-87085982!"
  634. });
  635. return;
  636. }
  637. }
  638. // //内部系统
  639. // if (items.interfacePushId > 0 && items.officialStatus != 1) {
  640. // this.$message({
  641. // type: "warning",
  642. // message:
  643. // "机构正在为您报名中,请耐心等待,有疑问请联系020-87085982!",
  644. // });
  645. // return;
  646. // }
  647. if (items.goodsType !== 6) {
  648. if (
  649. this.sysTime <= items.serviceStartTime ||
  650. this.sysTime >= items.serviceEndTime
  651. ) {
  652. this.$message({
  653. type: "warning",
  654. message: "不在学习服务期,不能进入学习"
  655. });
  656. return;
  657. }
  658. if (
  659. (items.classStartTime &&
  660. this.sysTime <= items.classStartTime) ||
  661. (items.classEndTime && this.sysTime >= items.classEndTime)
  662. ) {
  663. this.$message({
  664. type: "warning",
  665. message: "不在班级有效期,不能进入学习"
  666. });
  667. return;
  668. }
  669. if (items.learningStatus == 2) {
  670. this.$message({
  671. type: "warning",
  672. message: "开放学习时间待定,不能进入学习"
  673. });
  674. return;
  675. }
  676. if (items.classStatus == 0) {
  677. this.$message({
  678. type: "warning",
  679. message: "尚未开班,不能进入学习"
  680. });
  681. return;
  682. }
  683. if (
  684. items.learningStatus == 3 &&
  685. this.sysTime < items.learningTimeStart
  686. ) {
  687. this.$message({
  688. type: "warning",
  689. message: "不在开放学习时间,不能进入学习"
  690. });
  691. return;
  692. }
  693. let rebuildStatus = await this.courseGoodsRebuildStatus(
  694. items.goodsId,
  695. items.gradeId
  696. );
  697. if (rebuildStatus == 0) {
  698. this.$refs.rebuildModal.showModal(items);
  699. return;
  700. }
  701. }
  702. // if (item.educationName == "继续教育") {
  703. this.$request
  704. .lockLockStatus({
  705. action: "jxjy"
  706. })
  707. .then(res => {
  708. //有其他端在操作,不能学习
  709. this.$confirm("有其他端在操作,是否将该用户踢下线?", "提示", {
  710. confirmButtonText: "确定",
  711. cancelButtonText: "取消",
  712. type: "warning"
  713. })
  714. .then(() => {
  715. this.$request.appuseroffline().then(r => {
  716. //可以学习
  717. this.$request
  718. .courseCourseList({
  719. pageNum: 1,
  720. pageSize: 1,
  721. goodsId: items.goodsId,
  722. gradeId: items.gradeId
  723. })
  724. .then(res => {
  725. if (res.rows.length) {
  726. resolve(res);
  727. } else {
  728. this.$message({
  729. type: "warning",
  730. message: "课程内暂无可以学习的科目"
  731. });
  732. }
  733. });
  734. });
  735. })
  736. .catch(() => {});
  737. })
  738. .catch(err => {
  739. //可以学习
  740. this.$request
  741. .courseCourseList({
  742. pageNum: 1,
  743. pageSize: 1,
  744. goodsId: items.goodsId,
  745. gradeId: items.gradeId
  746. })
  747. .then(res => {
  748. if (res.rows.length) {
  749. resolve(res);
  750. } else {
  751. this.$message({
  752. type: "warning",
  753. message: "课程内暂无可以学习的科目"
  754. });
  755. }
  756. });
  757. });
  758. // } else {
  759. // this.$request
  760. // .courseCourseList({
  761. // pageNum: 1,
  762. // pageSize: 1,
  763. // goodsId: items.goodsId,
  764. // gradeId: items.gradeId,
  765. // })
  766. // .then((res) => {
  767. // if (res.rows.length) {
  768. // resolve(res);
  769. // } else {
  770. // this.$message({
  771. // type: "warning",
  772. // message: "课程内暂无可以学习的科目",
  773. // });
  774. // }
  775. // });
  776. // }
  777. });
  778. });
  779. },
  780. //跳转节视频
  781. async jumpSection(item) {
  782. // item.orderGoodsId = this.orderGoodsId;
  783. // this.canJump(item).then((res) => {
  784. item.noteSecond = Number(item.topicNum) * 60; //转秒数\
  785. this.$router.push({
  786. path: "/my-course-detail/" + item.goodsId,
  787. query: {
  788. courseId: item.courseId,
  789. sectionId: item.sectionId,
  790. moduleId: item.moduleId || 0,
  791. chapterId: item.chapterId || 0,
  792. recordingUrl: item.recordingUrl,
  793. noteSecond: item.noteSecond
  794. }
  795. });
  796. // });
  797. },
  798. //跳转题库题目
  799. jumpExam(item) {
  800. this.$router.push({
  801. path: "/bank-exam/" + item.goodsId,
  802. query: {
  803. current: item.topicNum - 1,
  804. examId: item.examId,
  805. moduleId: item.moduleId || 0,
  806. chapterId: item.chapterId || 0
  807. }
  808. });
  809. console.log(item);
  810. }
  811. }
  812. };
  813. </script>
  814. <!-- Add "scoped" attribute to limit CSS to this component only -->
  815. <style scoped lang="scss">
  816. .my-message {
  817. &__header {
  818. /deep/ .el-tabs__header {
  819. margin-bottom: 0;
  820. }
  821. }
  822. &__body {
  823. .content {
  824. &__header {
  825. height: 64px;
  826. display: flex;
  827. align-items: center;
  828. .text {
  829. flex: 1;
  830. padding-left: 28px;
  831. font-size: 14px;
  832. font-family: Microsoft YaHei;
  833. font-weight: 400;
  834. color: #999999;
  835. .note {
  836. font-size: 14px;
  837. font-family: Microsoft YaHei;
  838. font-weight: 400;
  839. color: #3f8dfd;
  840. }
  841. }
  842. .btn {
  843. cursor: pointer;
  844. margin: 0 14px;
  845. width: 122px;
  846. height: 32px;
  847. border-radius: 16px;
  848. padding: 0;
  849. text-align: center;
  850. line-height: 30px;
  851. font-size: 16px;
  852. &--red {
  853. border-color: #ff3b30;
  854. }
  855. }
  856. }
  857. &__body {
  858. .message-list {
  859. &__item {
  860. margin-bottom: 24px;
  861. display: flex;
  862. border: 1px solid #eee;
  863. padding: 30px 24px;
  864. align-items: center;
  865. border-radius: 8px;
  866. .icon {
  867. width: 40px;
  868. height: 40px;
  869. background: rgba(255, 209, 0, 1);
  870. border-radius: 50%;
  871. display: flex;
  872. align-items: center;
  873. justify-content: center;
  874. center &--blue {
  875. background: rgba(0, 122, 255, 1);
  876. }
  877. i {
  878. font-size: 24px;
  879. color: #fff;
  880. }
  881. }
  882. .text {
  883. flex: 1;
  884. padding-left: 16px;
  885. .title {
  886. font-size: 16px;
  887. font-family: Microsoft YaHei;
  888. font-weight: 400;
  889. color: #333333;
  890. margin-top: 10px;
  891. }
  892. .desc {
  893. font-size: 12px;
  894. font-family: Microsoft YaHei;
  895. font-weight: 400;
  896. color: #999999;
  897. }
  898. .content {
  899. font-size: 14px;
  900. font-family: Microsoft YaHei;
  901. font-weight: 400;
  902. color: #666;
  903. }
  904. }
  905. .btn {
  906. cursor: pointer;
  907. width: 122px;
  908. height: 32px;
  909. padding: 0;
  910. border-radius: 16px;
  911. text-align: center;
  912. line-height: 32px;
  913. font-size: 16px;
  914. }
  915. }
  916. }
  917. .no-data {
  918. text-align: center;
  919. padding: 50px 0;
  920. color: #666;
  921. font-size: 16px;
  922. }
  923. .pagination {
  924. padding: 30px 0;
  925. text-align: center;
  926. }
  927. }
  928. }
  929. }
  930. .rebuild {
  931. /deep/ .el-dialog__header {
  932. display: none;
  933. }
  934. /deep/ .el-dialog__body {
  935. padding: 0;
  936. overflow: unset;
  937. }
  938. &__close {
  939. cursor: pointer;
  940. position: absolute;
  941. right: 0;
  942. top: -28px;
  943. width: 24px;
  944. height: 24px;
  945. line-height: 24px;
  946. text-align: center;
  947. color: #eee;
  948. border: 1px solid #eee;
  949. border-radius: 50%;
  950. }
  951. &__header {
  952. height: 40px;
  953. border-bottom: 1px solid #eee;
  954. line-height: 40px;
  955. font-size: 16px;
  956. font-family: Microsoft YaHei;
  957. font-weight: bold;
  958. color: #333333;
  959. padding-left: 24px;
  960. }
  961. &__body {
  962. height: 400px;
  963. padding: 0 24px;
  964. .content {
  965. height: 100%;
  966. overflow-y: auto;
  967. &__header {
  968. padding: 16px 0;
  969. border-bottom: 1px solid #eee;
  970. .title {
  971. font-size: 16px;
  972. font-family: Microsoft YaHei;
  973. font-weight: bold;
  974. color: #ff3b30;
  975. line-height: 24px;
  976. }
  977. .desc {
  978. margin-top: 10px;
  979. font-size: 16px;
  980. font-family: Microsoft YaHei;
  981. font-weight: 400;
  982. color: #ff3b30;
  983. line-height: 24px;
  984. }
  985. }
  986. &__body {
  987. .list {
  988. &__item {
  989. padding: 16px 0;
  990. border-bottom: 1px solid #eee;
  991. .title {
  992. font-size: 14px;
  993. font-family: Microsoft YaHei;
  994. font-weight: 400;
  995. color: #333333;
  996. .note {
  997. width: 32px;
  998. height: 20px;
  999. border: 1px solid #3f8dfd;
  1000. border-radius: 4px;
  1001. color: #3f8dfd;
  1002. font-size: 12px;
  1003. &--yellow {
  1004. border: 1px solid #ff9500;
  1005. color: #ff9500;
  1006. }
  1007. }
  1008. }
  1009. .desc {
  1010. margin-top: 10px;
  1011. font-size: 14px;
  1012. font-family: Microsoft YaHei;
  1013. font-weight: 400;
  1014. color: #333333;
  1015. .note {
  1016. color: #ff3b30;
  1017. line-height: 20px;
  1018. }
  1019. .img {
  1020. width: 100px;
  1021. height: 100px;
  1022. display: inline-block;
  1023. text-align: center;
  1024. img {
  1025. max-width: 100%;
  1026. max-height: 100%;
  1027. }
  1028. }
  1029. }
  1030. }
  1031. }
  1032. }
  1033. }
  1034. }
  1035. &__footer {
  1036. height: 90px;
  1037. border-top: 1px solid #eee;
  1038. text-align: center;
  1039. .confirm {
  1040. width: 200px;
  1041. height: 40px;
  1042. padding: 0;
  1043. border-radius: 20px;
  1044. text-align: center;
  1045. line-height: 40px;
  1046. color: #fff;
  1047. margin: 24px auto;
  1048. }
  1049. }
  1050. }
  1051. .my-message-modal {
  1052. /deep/ .el-dialog__header {
  1053. display: none;
  1054. }
  1055. /deep/ .el-dialog__body {
  1056. padding: 0;
  1057. overflow: unset;
  1058. }
  1059. &__close {
  1060. cursor: pointer;
  1061. position: absolute;
  1062. right: 0;
  1063. top: -24px;
  1064. width: 24px;
  1065. height: 24px;
  1066. line-height: 24px;
  1067. text-align: center;
  1068. color: #fff;
  1069. border: 1px solid #eee;
  1070. border-radius: 50%;
  1071. }
  1072. &__header {
  1073. height: 40px;
  1074. line-height: 40px;
  1075. font-size: 16px;
  1076. font-family: Microsoft YaHei;
  1077. font-weight: bold;
  1078. color: #333333;
  1079. padding-left: 24px;
  1080. border-bottom: 1px solid #eee;
  1081. }
  1082. &__body {
  1083. height: auto;
  1084. padding: 0 24px 24px;
  1085. .content {
  1086. &__body {
  1087. .title {
  1088. margin-top: 10px;
  1089. font-size: 16px;
  1090. font-family: Microsoft YaHei;
  1091. font-weight: 400;
  1092. color: #333333;
  1093. line-height: 24px;
  1094. }
  1095. .desc {
  1096. margin-top: 8px;
  1097. font-size: 12px;
  1098. font-family: Microsoft YaHei;
  1099. font-weight: 400;
  1100. color: #999999;
  1101. line-height: 24px;
  1102. }
  1103. .list {
  1104. .item {
  1105. margin-top: 18px;
  1106. font-size: 14px;
  1107. font-family: Microsoft YaHei;
  1108. font-weight: 400;
  1109. line-height: 28px;
  1110. &__title {
  1111. color: #333;
  1112. font-size: 16px;
  1113. }
  1114. &__desc {
  1115. color: #666;
  1116. font-size: 16px;
  1117. }
  1118. &__content {
  1119. font-size: 14px;
  1120. cursor: pointer;
  1121. color: #3f8dfd;
  1122. }
  1123. }
  1124. }
  1125. }
  1126. }
  1127. }
  1128. &__footer {
  1129. height: 90px;
  1130. overflow: hidden;
  1131. border-top: 1px solid #eee;
  1132. .confirm {
  1133. display: block;
  1134. margin: 25px auto 0;
  1135. width: 200px;
  1136. height: 40px;
  1137. padding: 0;
  1138. border-radius: 20px;
  1139. text-align: center;
  1140. line-height: 40px;
  1141. }
  1142. }
  1143. }
  1144. }
  1145. </style>