detail.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281
  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;">
  24. <image style="width: 35rpx;height: 35rpx;" src="@/static/examIcon.png" mode=""></image>
  25. <text class="timeStys">第{{ item.topicNum }}道题</text>
  26. <text class="aSty" @click="jumpExam(item)">点击可直接跳转</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. });
  80. // arsty = '立刻学习';
  81. break;
  82. case 2:
  83. case 4:
  84. this.$navTo.togo('/pages2/verify/input', {
  85. id: item.goodsId
  86. });
  87. break;
  88. case 10:
  89. case 12:
  90. case 18:
  91. // arsty = '立即重学';
  92. break;
  93. case 11:
  94. case 13:
  95. var data = {
  96. goodsId: item.goodsId,
  97. gradeId: item.gradeId
  98. };
  99. this.$api.getApplysubscribe(data).then(res => {
  100. if (res.data.code === 500) {
  101. uni.showModal({
  102. showCancel: false,
  103. content: res.data.msg
  104. });
  105. }
  106. if (res.data.code === 200) {
  107. this.$navTo.togo('/pages2/appointment/index', {
  108. goodsId: item.goodsId,
  109. gradeId: item.gradeId
  110. });
  111. }
  112. });
  113. break;
  114. case 20:
  115. // arsty = '重新购买';
  116. break;
  117. default:
  118. break;
  119. }
  120. },
  121. //跳转节视频
  122. jumpSection(item) {
  123. item.noteSecond = Number(item.topicNum)*60 //转秒数
  124. this.$navTo.togo('/pages2/class/detail', {
  125. id: item.courseId,
  126. goodsId: item.goodsId,
  127. noteSecond:item.noteSecond,
  128. sectionId:item.sectionId,
  129. recordingUrl:item.recordingUrl
  130. });
  131. },
  132. //跳转题库题目
  133. jumpExam(item) {
  134. console.log(item);
  135. },
  136. isOk() {
  137. this.$api.courseappinformUser({ id: this.listData.id, receiptStatus: 1 }).then(res => {
  138. if (res.data.code === 200) {
  139. uni.navigateBack({
  140. delta: 1
  141. });
  142. }
  143. });
  144. },
  145. backPage() {
  146. uni.navigateBack({
  147. delta: 1
  148. });
  149. },
  150. getInfo() {
  151. this.$api.getappinformUserId(this.id).then(res => {
  152. if (res.data.code === 200) {
  153. if (res.data.data.receiptStatus === 1 && (res.data.data.remindId === 2 || res.data.data.remindId === 4)) {
  154. this.$api.getbaseprofiletpgetInfo({ goodsId: res.data.data.goodsId }).then(k => {
  155. if ((k.data.data.status === 3 && k.data.data.changeStatus === 2) || k.data.data.status === 2 || k.data.data.status === 1) {
  156. this.statusGO = false;
  157. }
  158. });
  159. }
  160. if (!res.data.data.receiptStatus) {
  161. this.$api.courseappinformUser({ id: res.data.data.id, receiptStatus: 1 }).then(res => {
  162. if (res.data.code === 200) {
  163. }
  164. });
  165. }
  166. if (res.data.data.informVo && res.data.data.informVo.affiche) {
  167. res.data.data.informVo.affiche = res.data.data.informVo.affiche.replace(/<img/gi, '<img style="max-width:100%;"');
  168. }
  169. this.listData = res.data.data;
  170. }
  171. });
  172. },
  173. change(index) {
  174. this.current = index;
  175. },
  176. getNames(int) {
  177. var arsty = '';
  178. switch (int) {
  179. case 1:
  180. case 3:
  181. case 5:
  182. case 6:
  183. case 7:
  184. case 19:
  185. case 21:
  186. case 22:
  187. arsty = '立刻学习';
  188. break;
  189. case 2:
  190. case 4:
  191. arsty = '马上填写';
  192. break;
  193. case 10:
  194. case 12:
  195. case 18:
  196. arsty = '立即重学';
  197. break;
  198. case 11:
  199. arsty = '立即预约';
  200. break;
  201. case 13:
  202. arsty = '预约考试';
  203. break;
  204. case 20:
  205. arsty = '重新购买';
  206. break;
  207. default:
  208. break;
  209. }
  210. return arsty;
  211. }
  212. },
  213. onReachBottom() {},
  214. computed: { ...mapGetters(['userInfo']) }
  215. };
  216. </script>
  217. <style>
  218. page {
  219. background: #eaeef1;
  220. }
  221. </style>
  222. <style scoped>
  223. .lsow:last-child {
  224. border-bottom: none !important;
  225. }
  226. .timeStys {
  227. margin: 0rpx 6rpx;
  228. color: #007aff;
  229. font-size: 28rpx;
  230. font-weight: bold;
  231. border-bottom: 1rpx solid #007aff;
  232. }
  233. .h4 {
  234. color: #333;
  235. font-size: 28rpx;
  236. font-weight: bold;
  237. }
  238. .aSty {
  239. color: #999;
  240. font-size: 24rpx;
  241. margin-left: 8rpx;
  242. }
  243. .h33 {
  244. font-size: 28rpx;
  245. color: #666;
  246. }
  247. .content {
  248. font-size: 28rpx;
  249. color: #666666;
  250. line-height: 36rpx;
  251. }
  252. .time {
  253. font-size: 24rpx;
  254. color: #999999;
  255. margin: 15rpx 0;
  256. }
  257. .btn1 {
  258. width: 526rpx;
  259. height: 80rpx;
  260. background: #007aff;
  261. border-radius: 40rpx;
  262. color: #ffffff;
  263. font-size: 30rpx;
  264. font-weight: bold;
  265. text-align: center;
  266. line-height: 80rpx;
  267. margin: 30rpx auto;
  268. }
  269. .item {
  270. width: 100%;
  271. background: #ffffff;
  272. border-radius: 16rpx;
  273. padding: 15rpx;
  274. }
  275. .title {
  276. font-size: 30rpx;
  277. font-weight: bold;
  278. color: #333333;
  279. }
  280. </style>