index.vue 32 KB

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