index.vue 33 KB

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