my_learn.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309
  1. <template>
  2. <view class="safeArea">
  3. <view style="width: 100%;text-align: center;position: fixed;height: 96rpx;z-index: 999;">
  4. <u-tabs :list="list" sticky :current="current" @change="change" active-color="#333" inactive-color="#999"></u-tabs>
  5. </view>
  6. <view class="learnWrap">
  7. <template v-if="current === 0">
  8. <!-- <view class="noData">您暂无相关学时审核记录哦~</view> -->
  9. <view class="learnItem" v-for="(item, index) in listData" :key="index">
  10. <view class="title">{{ item.goodsName }}</view>
  11. <view class="status">
  12. <view class="label">审核状态:</view>
  13. <view
  14. class="val"
  15. :class="item.periodStatus === -1 || item.periodStatus === 3 ? 'red' : item.periodStatus === 1 ? 'green' : item.periodStatus === 2 ? 'blue' : ''"
  16. >
  17. <text>
  18. {{
  19. item.periodStatus === -1
  20. ? '不可审核'
  21. : item.periodStatus === 1
  22. ? '机构审核通过'
  23. : item.periodStatus === 2
  24. ? '等待审核'
  25. : item.periodStatus === 3
  26. ? '机构审核不通过'
  27. : ''
  28. }}
  29. </text>
  30. \n
  31. <view v-if="item.periodStatus === 3" style="font-size: 24rpx;color:#666;">
  32. <text style="color:#FF3B30;">{{ item.rebuild }}节</text>
  33. 需要重修
  34. </view>
  35. </view>
  36. </view>
  37. <view class="tip" v-if="item.periodStatus === 1">
  38. <view class="label">审核提示:</view>
  39. <view>
  40. 机构已审核通过,需等待注册中心复审后即可获得继续教育学时。审核时间约15个工作日,届时请前往官网申请证书延期。
  41. <view class="copySty" @tap="copyText">复制官网链接</view>
  42. </view>
  43. </view>
  44. <view class="tip" v-else>
  45. <view class="label">审核提示:</view>
  46. <view class="val color666" v-if="item.periodStatus === -1">您的学时还未修完,请尽快完成课程学习</view>
  47. <view class="val color666" v-if="item.periodStatus === 2">学习完成后7-15个工作日完成学时审核。</view>
  48. <view class="val color666" v-if="item.periodStatus === 3">请查看需重学记录,并及时重学对应课程,以免延误学时审核进度。</view>
  49. </view>
  50. <view v-if="item.periodStatus !== 2">
  51. <u-line color="#EEEEEE" />
  52. <view v-if="item.periodStatus === -1">
  53. <view class="btnBox"><view class="btn" @click="jumpPage(item, 1)">课程学习</view></view>
  54. </view>
  55. <view>
  56. <view v-if="item.periodStatus === 1 && item.applyStatus === 1">
  57. <view class="subTitle">{{ item.applyName }}</view>
  58. <view class="btnBox"><view class="btn" @click="jumpPage(item, 2)">预约考试</view></view>
  59. </view>
  60. <u-line color="#EEEEEE" v-if="item.periodStatus === 1 && item.applyStatus === 1" />
  61. <view v-if="item.periodStatus === 1 && item.beforeStatus === 1">
  62. <view class="subTitle">{{ item.beforeName }}</view>
  63. <view class="btnBox"><view class="btn" @click="jumpPage(item, 3)">进入刷题</view></view>
  64. </view>
  65. </view>
  66. <view v-if="item.periodStatus === 3 && item.rebuildStatus === 0">
  67. <view class="btnBox"><view class="btn" @click="jumpPage(item, 4)">查看详情</view></view>
  68. </view>
  69. <view v-if="item.periodStatus === 3 && item.rebuildStatus === 1">
  70. <view class="btnBox"><view class="btn" @click="jumpPage(item, 5)">重修目录</view></view>
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. <template v-if="current === 1">
  76. <view class="noData">您暂无相关学习凭证记录哦~</view>
  77. <!-- <view class="learnItem">
  78. <view class="title">2020年二建建筑工程管理与实补这是商品名称</view>
  79. <view class="number">
  80. <text class="label">编号:</text>
  81. GZXY123456789
  82. </view>
  83. <view class="btnBox">
  84. <view class="btn">电子照片</view>
  85. <view class="btn">下载凭证</view>
  86. </view>
  87. </view> -->
  88. </template>
  89. </view>
  90. </view>
  91. </template>
  92. <script>
  93. import { mapGetters } from 'vuex';
  94. export default {
  95. components: {},
  96. data() {
  97. return {
  98. current: 0,
  99. list: [
  100. {
  101. name: '学时审核'
  102. },
  103. {
  104. name: '学习凭证'
  105. }
  106. ],
  107. listData: []
  108. };
  109. },
  110. onLoad(option) {},
  111. onShow() {
  112. this.getInfos();
  113. },
  114. methods: {
  115. copyText() {
  116. uni.setClipboardData({
  117. data: 'http://gdzczx.gdcic.net/',
  118. success: () => {
  119. //复制成功的回调函数
  120. uni.showToast({
  121. //提示
  122. title: '复制成功'
  123. });
  124. }
  125. });
  126. },
  127. jumpPage(v, int) {
  128. //int 1.课程学习 2.预约考试 3.进入刷题 4.查看详情 5.重修目录
  129. if (int === 1) {
  130. this.$navTo.togo(`/pages2/wd/course?id=${v.goodsId}&gid=${v.gradeId}`);
  131. }
  132. if (int === 2) {
  133. this.$navTo.togo(`/pages2/appointment/index?goodsId=${v.goodsId}&gradeId=${v.gradeId}`);
  134. }
  135. if (int === 3) {
  136. this.appBeforeAddress(v.goodsId)
  137. }
  138. if (int === 4) {
  139. this.$navTo.togo(`/pages2/learn/details?goodsId=${v.goodsId}&gradeId=${v.gradeId}`);
  140. }
  141. if (int === 5) {
  142. this.$navTo.togo('/pages2/course/detail?id=' + v.goodsId);
  143. }
  144. },
  145. getInfos() {
  146. this.$api.getcourseperiodlistGoods().then(res => {
  147. if (res.data.code === 200) {
  148. this.listData = res.data.rows;
  149. }
  150. });
  151. },
  152. appBeforeAddress(goodsId) {
  153. this.$api.appBeforeAddress({
  154. goodsId
  155. }).then(res => {
  156. if(res.data.code == 200) {
  157. uni.navigateToMiniProgram({
  158. appId: res.data.data.url,
  159. success(res) {
  160. // 打开成功
  161. }
  162. })
  163. } else {
  164. uni.showToast({
  165. title: res.data.msg,
  166. icon: 'none',
  167. })
  168. }
  169. })
  170. },
  171. change(index) {
  172. this.current = index;
  173. }
  174. },
  175. onReachBottom() {},
  176. computed: { ...mapGetters(['userInfo']) }
  177. };
  178. </script>
  179. <style>
  180. page {
  181. background: #eaeef1;
  182. }
  183. </style>
  184. <style scoped lang="scss">
  185. .copySty {
  186. color: #007aff;
  187. text-decoration: underline;
  188. }
  189. .color666 {
  190. color: #666;
  191. }
  192. .learnWrap {
  193. padding: 98rpx 8rpx 8rpx;
  194. }
  195. .noData {
  196. font-size: 32rpx;
  197. font-family: PingFang SC;
  198. font-weight: 500;
  199. color: #999999;
  200. margin: 160rpx auto;
  201. text-align: center;
  202. }
  203. .learnItem {
  204. background: #ffffff;
  205. border-radius: 16rpx;
  206. padding: 32rpx 32rpx 0;
  207. font-family: PingFang SC;
  208. margin-bottom: 16rpx;
  209. overflow: hidden;
  210. .red {
  211. color: #ff3b30 !important;
  212. }
  213. .blue {
  214. color: #007aff !important;
  215. }
  216. .green {
  217. color: #34c759 !important;
  218. }
  219. .title {
  220. font-size: 30rpx;
  221. font-weight: bold;
  222. color: #333333;
  223. margin-bottom: 68rpx;
  224. }
  225. .status {
  226. font-size: 24rpx;
  227. font-weight: 500;
  228. color: #666666;
  229. margin-bottom: 26rpx;
  230. display: flex;
  231. }
  232. .number {
  233. font-size: 24rpx;
  234. font-weight: 500;
  235. color: #666666;
  236. margin-bottom: 26rpx;
  237. font-size: 30rpx;
  238. font-weight: bold;
  239. font-family: PingFang SC;
  240. color: #333;
  241. .label {
  242. font-size: 24rpx;
  243. font-weight: 500;
  244. color: #666666;
  245. }
  246. }
  247. .val {
  248. font-size: 30rpx;
  249. font-weight: bold;
  250. color: #333;
  251. .remark {
  252. font-size: 24rpx;
  253. font-family: PingFang SC;
  254. font-weight: 500;
  255. color: #666666;
  256. }
  257. .link {
  258. font-size: 30rpx;
  259. font-family: PingFang SC;
  260. font-weight: 500;
  261. text-decoration: underline;
  262. color: #007aff;
  263. margin-top: 36rpx;
  264. text-decoration: underline;
  265. }
  266. }
  267. .tip {
  268. font-size: 24rpx;
  269. font-weight: 500;
  270. color: #666666;
  271. margin: 30rpx 0 27rpx;
  272. display: flex;
  273. }
  274. .label {
  275. width: 120rpx;
  276. flex-shrink: 0;
  277. margin-top: 5rpx;
  278. }
  279. .subTitle {
  280. font-size: 30rpx;
  281. font-weight: bold;
  282. color: #333333;
  283. margin: 15rpx 0 40rpx;
  284. }
  285. .btnBox {
  286. height: 88rpx;
  287. display: flex;
  288. align-items: center;
  289. justify-content: flex-end;
  290. .btn {
  291. width: 224rpx;
  292. height: 56rpx;
  293. line-height: 56rpx;
  294. text-align: center;
  295. background: #007aff;
  296. border-radius: 16rpx;
  297. font-size: 30rpx;
  298. font-family: PingFang SC;
  299. font-weight: 500;
  300. color: #ffffff;
  301. margin-left: 16rpx;
  302. }
  303. }
  304. }
  305. </style>