detail.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  1. <template>
  2. <view style="padding: 20rpx;">
  3. <view class="item">
  4. <view class="title">{{ listData.systemStatus === 2 ? listData.informVo.informName : listData.systemStatus === 1 ? listData.remind : '' }}</view>
  5. <view class="time">{{ $method.timestampToTime(listData.sendTime, false) }}</view>
  6. <view v-if="listData.systemStatus === 2" class="content" v-html="listData.informVo.affiche" style="width: 100%;"></view>
  7. <view v-if="listData.systemStatus === 1" class="content" style="width: 100%;">{{ listData.text }}</view>
  8. <view class="boxstistyle">
  9. <view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informCourseVo" :key="index">
  10. <view class="h4">{{ item.goodsName }}</view>
  11. <view class="h33">
  12. {{ item.courseName }}{{ item.moduleName ? '/' + item.moduleName : '' }}{{ item.chapterName ? '/' + item.chapterName : '' }}{{ item.sectionName }}
  13. </view>
  14. <view style="display: flex;align-items: center;margin:28rpx 0rpx;" @click="jumpSection(item)">
  15. <image style="width: 35rpx;height: 35rpx;" src="@/static/courseIcon.png" mode=""></image>
  16. <text class="timeStys">第{{ item.topicNum }}分钟</text>
  17. <text class="aSty">点击可直接跳转</text>
  18. </view>
  19. </view>
  20. <view class="lsow" style="border-bottom: 1rpx solid #eee;margin-top: 10rpx;" v-for="(item, index) in listData.informVo.informExamVo" :key="index">
  21. <view class="h4">{{ item.goodsName }}</view>
  22. <view class="h33">{{ item.moduleName ? '/' + item.moduleName : '' }}{{ item.chapterName ? '/' + item.chapterName : '' }}{{ item.examName }}</view>
  23. <view style="display: flex;align-items: center;margin:28rpx 0rpx;" @click="jumpExam(item)">
  24. <image style="width: 35rpx;height: 35rpx;" src="@/static/examIcon.png" mode=""></image>
  25. <text class="timeStys">第{{ item.topicNum }}道题</text>
  26. <text class="aSty">点击可直接跳转</text>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="btn1" @click="isOk" v-if="listData.systemStatus === 2 && listData.receiptStatus === 0">我已阅读</view>
  32. <view class="btn1" v-if="statusGO && listData.systemStatus === 1 && getNames(listData.remindId) !== ''" @click="jumpFuns(listData)">{{ getNames(listData.remindId) }}</view>
  33. </view>
  34. </template>
  35. <script>
  36. import { mapGetters } from 'vuex';
  37. export default {
  38. components: {},
  39. data() {
  40. return {
  41. listData: {},
  42. id: null,
  43. img1: '/static/icon/msg_icon1.png',
  44. img2: '/static/icon/msg_icon2.png',
  45. statusGO: true
  46. };
  47. },
  48. onPullDownRefresh() {},
  49. onLoad(option) {
  50. this.id = Number(option.id);
  51. },
  52. onShow() {
  53. this.getInfo();
  54. /* if(this.current === 2 && this.$method.isLogin()){
  55. this.$refs.refMy.init();
  56. } */
  57. },
  58. onShareAppMessage(res) {
  59. var self = this;
  60. return {
  61. title: '中正',
  62. path: `/pages/index/index?inviteCode=` + userInfo == null ? '' : userInfo.userAccount
  63. };
  64. },
  65. methods: {
  66. //跳转页面
  67. jumpFuns(item) {
  68. switch (item.remindId) {
  69. case 1:
  70. case 3:
  71. case 5:
  72. case 6:
  73. case 7:
  74. case 19:
  75. case 21:
  76. case 22:
  77. this.$navTo.togo('/pages2/wd/course', {
  78. id: item.goodsId,
  79. gid: item.gradeId
  80. });
  81. // arsty = '立刻学习';
  82. break;
  83. case 2:
  84. case 4:
  85. this.$navTo.togo('/pages2/verify/input', {
  86. id: item.goodsId
  87. });
  88. break;
  89. case 24:
  90. this.$navTo.togo('/pages2/verify/input2', {
  91. id: item.goodsId
  92. });
  93. break;
  94. case 10:
  95. case 12:
  96. case 18:
  97. // arsty = '立即重学';
  98. break;
  99. case 11:
  100. case 13:
  101. var data = {
  102. goodsId: item.goodsId,
  103. gradeId: item.gradeId
  104. };
  105. this.$api.getApplysubscribe(data).then(res => {
  106. if (res.data.code === 500) {
  107. uni.showModal({
  108. showCancel: false,
  109. content: res.data.msg
  110. });
  111. }
  112. if (res.data.code === 200) {
  113. this.$navTo.togo('/pages2/appointment/index', {
  114. goodsId: item.goodsId,
  115. gradeId: item.gradeId
  116. });
  117. }
  118. });
  119. break;
  120. case 20:
  121. // arsty = '重新购买';
  122. break;
  123. default:
  124. break;
  125. }
  126. },
  127. //跳转节视频
  128. jumpSection(item) {
  129. item.noteSecond = Number(item.topicNum) * 60; //转秒数
  130. this.$navTo.togo('/pages2/class/detail', {
  131. id: item.courseId,
  132. goodsId: item.goodsId,
  133. noteSecond: item.noteSecond,
  134. sectionId: item.sectionId,
  135. recordingUrl: item.recordingUrl
  136. });
  137. },
  138. //跳转题库题目
  139. jumpExam(item) {
  140. console.log(item);
  141. uni.navigateTo({
  142. url:
  143. '/pages2/bank/questionBank?current=' +
  144. (item.topicNum - 1) +
  145. '&id=' +
  146. item.examId +
  147. '&goodsid=' +
  148. item.goodsId +
  149. '&chapterId=' +
  150. item.moduleId +
  151. '&moduleId=' +
  152. item.moduleId
  153. });
  154. },
  155. isOk() {
  156. this.$api.courseappinformUser({ id: this.listData.id, receiptStatus: 1 }).then(res => {
  157. if (res.data.code === 200) {
  158. uni.navigateBack({
  159. delta: 1
  160. });
  161. }
  162. });
  163. },
  164. backPage() {
  165. uni.navigateBack({
  166. delta: 1
  167. });
  168. },
  169. getInfo() {
  170. this.$api.getappinformUserId(this.id).then(res => {
  171. if (res.data.code === 200) {
  172. if (res.data.data.receiptStatus === 1 && (res.data.data.remindId === 2 || res.data.data.remindId === 4 ||res.data.data.remindId === 24 || res.data.data.remindId === 23)) {
  173. this.$api.getbaseprofiletpgetInfo({ goodsId: res.data.data.goodsId }).then(k => {
  174. if ((k.data.data.status === 3 && k.data.data.changeStatus === 2) || k.data.data.status === 2 || k.data.data.status === 1) {
  175. this.statusGO = false;
  176. }
  177. });
  178. }
  179. if (!res.data.data.receiptStatus) {
  180. this.$api.courseappinformUser({ id: res.data.data.id, receiptStatus: 1 }).then(res => {
  181. if (res.data.code === 200) {
  182. }
  183. });
  184. }
  185. if (res.data.data.informVo && res.data.data.informVo.affiche) {
  186. res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
  187. }
  188. this.listData = res.data.data;
  189. }
  190. });
  191. },
  192. change(index) {
  193. this.current = index;
  194. },
  195. getNames(int) {
  196. var arsty = '';
  197. switch (int) {
  198. case 1:
  199. case 3:
  200. case 5:
  201. case 6:
  202. case 7:
  203. case 19:
  204. case 21:
  205. case 22:
  206. arsty = '立刻学习';
  207. break;
  208. case 2:
  209. case 4:
  210. case 24:
  211. arsty = '马上填写';
  212. break;
  213. case 10:
  214. case 12:
  215. case 18:
  216. arsty = '立即重学';
  217. break;
  218. case 11:
  219. arsty = '立即预约';
  220. break;
  221. case 13:
  222. arsty = '预约考试';
  223. break;
  224. case 20:
  225. arsty = '重新购买';
  226. break;
  227. default:
  228. break;
  229. }
  230. return arsty;
  231. }
  232. },
  233. onReachBottom() {},
  234. computed: { ...mapGetters(['userInfo']) }
  235. };
  236. </script>
  237. <style>
  238. page {
  239. background: #eaeef1;
  240. }
  241. </style>
  242. <style scoped>
  243. .lsow:last-child {
  244. border-bottom: none !important;
  245. }
  246. .timeStys {
  247. margin: 0rpx 6rpx;
  248. color: #007aff;
  249. font-size: 28rpx;
  250. font-weight: bold;
  251. border-bottom: 1rpx solid #007aff;
  252. }
  253. .h4 {
  254. color: #333;
  255. font-size: 28rpx;
  256. font-weight: bold;
  257. }
  258. .aSty {
  259. color: #999;
  260. font-size: 24rpx;
  261. margin-left: 8rpx;
  262. }
  263. .h33 {
  264. font-size: 28rpx;
  265. color: #666;
  266. }
  267. .content {
  268. font-size: 28rpx;
  269. color: #666666;
  270. line-height: 36rpx;
  271. }
  272. .time {
  273. font-size: 24rpx;
  274. color: #999999;
  275. margin: 15rpx 0;
  276. }
  277. .btn1 {
  278. width: 526rpx;
  279. height: 80rpx;
  280. background: #007aff;
  281. border-radius: 40rpx;
  282. color: #ffffff;
  283. font-size: 30rpx;
  284. font-weight: bold;
  285. text-align: center;
  286. line-height: 80rpx;
  287. margin: 30rpx auto;
  288. }
  289. .item {
  290. width: 100%;
  291. background: #ffffff;
  292. border-radius: 16rpx;
  293. padding: 15rpx;
  294. }
  295. .title {
  296. font-size: 30rpx;
  297. font-weight: bold;
  298. color: #333333;
  299. }
  300. </style>