details.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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;">致电<text @click="call">020-87085982</text>咨询</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/wd/course?gid='+self.gradeId+'&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. call() {
  110. uni.makePhoneCall({
  111. phoneNumber:'020-87085982'
  112. })
  113. }
  114. },
  115. onReachBottom() {},
  116. computed: { ...mapGetters(['userInfo']) }
  117. };
  118. </script>
  119. <style>
  120. page {
  121. background: #eaeef1;
  122. }
  123. </style>
  124. <style scoped lang="scss">
  125. .detailsWrap {
  126. padding: 8rpx 8rpx 140rpx;
  127. }
  128. .topTitle {
  129. border-radius: 24rpx;
  130. background-color: #ffebea;
  131. padding: 10rpx 24rpx;
  132. color: #ff3b30;
  133. font-size: 24rpx;
  134. margin-bottom: 8rpx;
  135. }
  136. .detailsItem {
  137. background: #ffffff;
  138. border-radius: 16rpx;
  139. margin-bottom: 16rpx;
  140. .head {
  141. padding: 26rpx 24rpx;
  142. display: flex;
  143. font-size: 30rpx;
  144. font-family: PingFang SC;
  145. font-weight: bold;
  146. color: #666666;
  147. .tap {
  148. width: 56rpx;
  149. height: 28rpx;
  150. line-height: 26rpx;
  151. text-align: center;
  152. border: 2rpx solid #666666;
  153. border-radius: 8rpx;
  154. font-size: 20rpx;
  155. font-family: PingFang SC;
  156. font-weight: 400;
  157. color: #666666;
  158. margin-right: 8rpx;
  159. flex-shrink: 0;
  160. position: relative;
  161. top: 6rpx;
  162. }
  163. }
  164. .info {
  165. padding: 17rpx 24rpx;
  166. display: flex;
  167. flex-wrap: wrap;
  168. .item {
  169. width: 160rpx;
  170. font-size: 20rpx;
  171. font-family: PingFang SC;
  172. font-weight: 500;
  173. color: #666666;
  174. margin: 0 8rpx 16rpx 0;
  175. .imgbox {
  176. width: 160rpx;
  177. height: 160rpx;
  178. border-radius: 8px;
  179. overflow: hidden;
  180. margin-bottom: 7rpx;
  181. }
  182. }
  183. }
  184. .reason {
  185. display: flex;
  186. padding: 21rpx 24rpx;
  187. font-size: 30rpx;
  188. font-family: PingFang SC;
  189. font-weight: 500;
  190. color: #333333;
  191. .label {
  192. color: #666666;
  193. }
  194. }
  195. }
  196. .btn {
  197. width: 526rpx;
  198. height: 80rpx;
  199. background: #007aff;
  200. border-radius: 40rpx;
  201. font-size: 30rpx;
  202. font-family: PingFang SC;
  203. font-weight: bold;
  204. color: #ffffff;
  205. display: flex;
  206. justify-content: center;
  207. align-items: center;
  208. position: fixed;
  209. left: 50%;
  210. margin-left: -263rpx;
  211. bottom: 50rpx;
  212. }
  213. </style>