details.vue 4.4 KB

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