details.vue 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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">拍照异常/时间异常</view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="btn" @click="getBtn">确认重学</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. };
  44. },
  45. onLoad(option) {
  46. this.goodsId = Number(option.goodsId);
  47. this.gradeId = Number(option.gradeId);
  48. this.getInfo();
  49. },
  50. onShow() {},
  51. methods: {
  52. seePhoto(option, index) {
  53. var arrays = option.map((item, indexs) => {
  54. return this.$method.splitImgHost(item.photo) + `?${indexs}`;
  55. });
  56. uni.previewImage({
  57. current: index,
  58. urls: arrays
  59. });
  60. },
  61. getInfo() {
  62. this.$api
  63. .getcourseperiodcheat({
  64. goodsId: this.goodsId,
  65. gradeId: this.gradeId
  66. })
  67. .then(res => {
  68. if (res.data.code === 200) {
  69. this.listData = res.data.rows;
  70. }
  71. });
  72. },
  73. //重学
  74. getBtn() {
  75. var self = this
  76. uni.showModal({
  77. title:"注意",
  78. content:`如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询`,
  79. confirmText:"确认重学",
  80. success:function(res){
  81. if(res.confirm){
  82. self.$api.courseperiodrebuild({
  83. goodsId: self.goodsId,
  84. gradeId: self.gradeId
  85. }).then(res => {
  86. if(res.data.code === 200){
  87. uni.redirectTo({
  88. url: '/pages2/wd/course?gid='+self.gradeId+'&id=' + self.goodsId
  89. })
  90. }
  91. })
  92. }
  93. }
  94. })
  95. },
  96. getTypeName(int) {
  97. if (int === 0) {
  98. return '测试';
  99. }
  100. if (int === 1) {
  101. return '录播';
  102. }
  103. if (int === 2) {
  104. return '直播';
  105. }
  106. if (int === 3) {
  107. return '回放';
  108. }
  109. },
  110. call() {
  111. uni.makePhoneCall({
  112. phoneNumber:'020-87085982'
  113. })
  114. }
  115. },
  116. onReachBottom() {},
  117. computed: { ...mapGetters(['userInfo']) }
  118. };
  119. </script>
  120. <style>
  121. page {
  122. background: #eaeef1;
  123. }
  124. </style>
  125. <style scoped lang="scss">
  126. .detailsWrap {
  127. padding: 8rpx 8rpx 140rpx;
  128. }
  129. .topTitle {
  130. border-radius: 24rpx;
  131. background-color: #ffebea;
  132. padding: 10rpx 24rpx;
  133. color: #ff3b30;
  134. font-size: 24rpx;
  135. margin-bottom: 8rpx;
  136. }
  137. .detailsItem {
  138. background: #ffffff;
  139. border-radius: 16rpx;
  140. margin-bottom: 16rpx;
  141. .head {
  142. padding: 26rpx 24rpx;
  143. display: flex;
  144. font-size: 30rpx;
  145. font-family: PingFang SC;
  146. font-weight: bold;
  147. color: #666666;
  148. .tap {
  149. width: 56rpx;
  150. height: 28rpx;
  151. line-height: 26rpx;
  152. text-align: center;
  153. border: 2rpx solid #666666;
  154. border-radius: 8rpx;
  155. font-size: 20rpx;
  156. font-family: PingFang SC;
  157. font-weight: 400;
  158. color: #666666;
  159. margin-right: 8rpx;
  160. flex-shrink: 0;
  161. position: relative;
  162. top: 6rpx;
  163. }
  164. }
  165. .info {
  166. padding: 17rpx 24rpx;
  167. display: flex;
  168. flex-wrap: wrap;
  169. .item {
  170. width: 160rpx;
  171. font-size: 20rpx;
  172. font-family: PingFang SC;
  173. font-weight: 500;
  174. color: #666666;
  175. margin: 0 8rpx 16rpx 0;
  176. .imgbox {
  177. width: 160rpx;
  178. height: 160rpx;
  179. border-radius: 8px;
  180. overflow: hidden;
  181. margin-bottom: 7rpx;
  182. }
  183. }
  184. }
  185. .reason {
  186. display: flex;
  187. padding: 21rpx 24rpx;
  188. font-size: 30rpx;
  189. font-family: PingFang SC;
  190. font-weight: 500;
  191. color: #333333;
  192. .label {
  193. color: #666666;
  194. }
  195. }
  196. }
  197. .btn {
  198. width: 526rpx;
  199. height: 80rpx;
  200. background: #007aff;
  201. border-radius: 40rpx;
  202. font-size: 30rpx;
  203. font-family: PingFang SC;
  204. font-weight: bold;
  205. color: #ffffff;
  206. display: flex;
  207. justify-content: center;
  208. align-items: center;
  209. position: fixed;
  210. left: 50%;
  211. margin-left: -263rpx;
  212. bottom: 50rpx;
  213. }
  214. </style>