details.vue 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. <template>
  2. <view class="safeArea">
  3. <nav-bar title="详情"></nav-bar>
  4. <view class="detailsWrap">
  5. <view class="topTitle">
  6. <u-icon
  7. name="info-circle-fill"
  8. style="color: #ff3b30; margin-right: 8rpx"
  9. ></u-icon>
  10. <text
  11. >您的学时审核不通过,不通过原因如下,请查阅,并重学不通过的课程内容。</text
  12. >
  13. <!-- <view style="margin-left:34rpx;">致电<text @click="call">020-87085982</text>咨询</view> -->
  14. </view>
  15. <view class="detailsItem" v-for="(item, index) in listData" :key="index">
  16. <view class="head">
  17. <view class="tap">{{ getTypeName(item.type) }}</view>
  18. <view class="title">{{ item.name }}</view>
  19. </view>
  20. <!-- <u-line color="#EEEEEE" />
  21. <view class="info">
  22. <view class="item" v-for="(items, indexs) in item.userStudyRecordPhoto" :key="indexs">
  23. <view class="imgbox">
  24. <image :src="$method.splitImgHost(items.photo)" style="width:100%" mode="widthFix" @click="seePhoto(item.userStudyRecordPhoto, indexs)"></image>
  25. </view>
  26. <view class="time">{{ $method.timestampToTime(items.createTime, false) }}</view>
  27. </view>
  28. </view> -->
  29. <u-line color="#EEEEEE" />
  30. <view class="reason">
  31. <view class="label">原因:</view>
  32. <view class="val">{{ item.auditReason }}</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="btn" @click="getBtn" v-if="rebuildShow">确认已阅读</view>
  37. </view>
  38. </template>
  39. <script>
  40. import { mapGetters } from "vuex";
  41. export default {
  42. components: {},
  43. data() {
  44. return {
  45. goodsId: null,
  46. gradeId: null,
  47. listData: [],
  48. orderGoodsId: "",
  49. rebuildShow: false,
  50. };
  51. },
  52. onLoad(option) {
  53. this.orderGoodsId = option.orderGoodsId || "";
  54. this.goodsId = Number(option.goodsId);
  55. this.gradeId = Number(option.gradeId);
  56. this.getInfo();
  57. this.orderInfo();
  58. },
  59. onShow() {},
  60. methods: {
  61. orderInfo() {
  62. this.$api
  63. .orderInfo({
  64. orderGoodsId: this.orderGoodsId,
  65. })
  66. .then((res) => {
  67. console.log(res);
  68. if (res.data.code == 200) {
  69. let sysTime = this.$method.timest();
  70. console.log(res.data.data.serviceEndTime);
  71. console.log(sysTime);
  72. if (
  73. res.data.data.serviceEndTime &&
  74. res.data.data.serviceEndTime > +sysTime
  75. ) {
  76. //学习有效期范围内
  77. this.rebuildShow = true;
  78. } else {
  79. //不在学校有效期范围内隐藏
  80. this.rebuildShow = false;
  81. return;
  82. }
  83. if (res.data.data.classEndTime) {
  84. //配了班级有效期
  85. if (res.data.data.classEndTime > +sysTime) {
  86. //班级有效期没过期
  87. this.rebuildShow = true;
  88. } else {
  89. //过期
  90. this.rebuildShow = false;
  91. return;
  92. }
  93. } else {
  94. //没配按学习有效期
  95. }
  96. }
  97. });
  98. },
  99. seePhoto(option, index) {
  100. var arrays = option.map((item, indexs) => {
  101. return this.$method.splitImgHost(item.photo) + `?${indexs}`;
  102. });
  103. uni.previewImage({
  104. current: index,
  105. urls: arrays,
  106. });
  107. },
  108. getInfo() {
  109. this.$api
  110. .getcourseperiodcheat({
  111. goodsId: this.goodsId,
  112. gradeId: this.gradeId,
  113. orderGoodsId: this.orderGoodsId,
  114. })
  115. .then((res) => {
  116. if (res.data.code === 200) {
  117. this.listData = res.data.rows;
  118. }
  119. });
  120. },
  121. //重学
  122. getBtn() {
  123. var self = this;
  124. self.$api
  125. .courseperiodrebuild({
  126. goodsId: self.goodsId,
  127. gradeId: self.gradeId,
  128. orderGoodsId: self.orderGoodsId,
  129. })
  130. .then((res) => {
  131. if (res.data.code === 200) {
  132. uni.redirectTo({
  133. url:
  134. "/pages2/wd/course?gid=" +
  135. self.gradeId +
  136. "&id=" +
  137. self.goodsId +
  138. "&orderGoodsId=" +
  139. self.orderGoodsId,
  140. });
  141. }
  142. });
  143. // uni.showModal({
  144. // title:"注意",
  145. // content:`如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询`,
  146. // confirmText:"确认重学",
  147. // success:function(res){
  148. // if(res.confirm){
  149. // self.$api.courseperiodrebuild({
  150. // goodsId: self.goodsId,
  151. // gradeId: self.gradeId,
  152. // orderGoodsId:self.orderGoodsId
  153. // }).then(res => {
  154. // if(res.data.code === 200){
  155. // uni.redirectTo({
  156. // url: '/pages2/wd/course?gid='+self.gradeId+'&id=' + self.goodsId+'&orderGoodsId='+ self.orderGoodsId
  157. // })
  158. // }
  159. // })
  160. // }
  161. // }
  162. // })
  163. },
  164. getTypeName(int) {
  165. if (int === 0) {
  166. return "测试";
  167. }
  168. if (int === 1) {
  169. return "录播";
  170. }
  171. if (int === 2) {
  172. return "直播";
  173. }
  174. if (int === 3) {
  175. return "回放";
  176. }
  177. },
  178. call() {
  179. uni.makePhoneCall({
  180. phoneNumber: "020-87085982",
  181. });
  182. },
  183. },
  184. onReachBottom() {},
  185. computed: { ...mapGetters(["userInfo"]) },
  186. };
  187. </script>
  188. <style>
  189. page {
  190. background: #eaeef1;
  191. }
  192. </style>
  193. <style scoped lang="scss">
  194. .detailsWrap {
  195. padding: 8rpx 8rpx 140rpx;
  196. }
  197. .topTitle {
  198. border-radius: 24rpx;
  199. background-color: #ffebea;
  200. padding: 10rpx 24rpx;
  201. color: #ff3b30;
  202. font-size: 24rpx;
  203. margin-bottom: 8rpx;
  204. }
  205. .detailsItem {
  206. background: #ffffff;
  207. border-radius: 16rpx;
  208. margin-bottom: 16rpx;
  209. .head {
  210. padding: 26rpx 24rpx;
  211. display: flex;
  212. font-size: 30rpx;
  213. font-family: PingFang SC;
  214. font-weight: bold;
  215. color: #666666;
  216. .tap {
  217. width: 56rpx;
  218. height: 28rpx;
  219. line-height: 26rpx;
  220. text-align: center;
  221. border: 2rpx solid #666666;
  222. border-radius: 8rpx;
  223. font-size: 20rpx;
  224. font-family: PingFang SC;
  225. font-weight: 400;
  226. color: #666666;
  227. margin-right: 8rpx;
  228. flex-shrink: 0;
  229. position: relative;
  230. top: 6rpx;
  231. }
  232. }
  233. .info {
  234. padding: 17rpx 24rpx;
  235. display: flex;
  236. flex-wrap: wrap;
  237. .item {
  238. width: 160rpx;
  239. font-size: 20rpx;
  240. font-family: PingFang SC;
  241. font-weight: 500;
  242. color: #666666;
  243. margin: 0 8rpx 16rpx 0;
  244. .imgbox {
  245. width: 160rpx;
  246. height: 160rpx;
  247. border-radius: 8px;
  248. overflow: hidden;
  249. margin-bottom: 7rpx;
  250. }
  251. }
  252. }
  253. .reason {
  254. display: flex;
  255. padding: 21rpx 24rpx;
  256. font-size: 30rpx;
  257. font-family: PingFang SC;
  258. font-weight: 500;
  259. color: #333333;
  260. .label {
  261. color: #666666;
  262. }
  263. .val {
  264. flex: 1;
  265. }
  266. }
  267. }
  268. .btn {
  269. width: 526rpx;
  270. height: 80rpx;
  271. background: #007aff;
  272. border-radius: 40rpx;
  273. font-size: 30rpx;
  274. font-family: PingFang SC;
  275. font-weight: bold;
  276. color: #ffffff;
  277. display: flex;
  278. justify-content: center;
  279. align-items: center;
  280. position: fixed;
  281. left: 50%;
  282. margin-left: -263rpx;
  283. bottom: 50rpx;
  284. }
  285. </style>