details.vue 5.7 KB

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