details.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  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. },
  57. onShow() {
  58. if (this.$method.isGoLogin()) { // 从公众号消息进来的没登录需要跳到登录页,登录后返回
  59. return;
  60. }
  61. this.getInfo();
  62. this.orderInfo();
  63. },
  64. methods: {
  65. orderInfo() {
  66. this.$api
  67. .orderInfo({
  68. orderGoodsId: this.orderGoodsId,
  69. })
  70. .then((res) => {
  71. console.log(res);
  72. if (res.data.code == 200) {
  73. let sysTime = this.$method.timest();
  74. console.log(res.data.data.serviceEndTime);
  75. console.log(sysTime);
  76. if (
  77. res.data.data.serviceEndTime &&
  78. res.data.data.serviceEndTime > +sysTime
  79. ) {
  80. //学习有效期范围内
  81. this.rebuildShow = true;
  82. } else {
  83. //不在学校有效期范围内隐藏
  84. this.rebuildShow = false;
  85. return;
  86. }
  87. if (res.data.data.classEndTime) {
  88. //配了班级有效期
  89. if (res.data.data.classEndTime > +sysTime) {
  90. //班级有效期没过期
  91. this.rebuildShow = true;
  92. } else {
  93. //过期
  94. this.rebuildShow = false;
  95. return;
  96. }
  97. } else {
  98. //没配按学习有效期
  99. }
  100. }
  101. });
  102. },
  103. seePhoto(option, index) {
  104. var arrays = option.map((item, indexs) => {
  105. return this.$method.splitImgHost(item.photo) + `?${indexs}`;
  106. });
  107. uni.previewImage({
  108. current: index,
  109. urls: arrays,
  110. });
  111. },
  112. getInfo() {
  113. this.$api
  114. .getcourseperiodcheat({
  115. goodsId: this.goodsId,
  116. gradeId: this.gradeId,
  117. orderGoodsId: this.orderGoodsId,
  118. })
  119. .then((res) => {
  120. if (res.data.code === 200) {
  121. this.listData = res.data.rows;
  122. }
  123. });
  124. },
  125. //重学
  126. getBtn() {
  127. var self = this;
  128. self.$api
  129. .courseperiodrebuild({
  130. goodsId: self.goodsId,
  131. gradeId: self.gradeId,
  132. orderGoodsId: self.orderGoodsId,
  133. })
  134. .then((res) => {
  135. if (res.data.code === 200) {
  136. // uni.redirectTo({
  137. // url:
  138. // "/pages2/wd/course?gid=" +
  139. // self.gradeId +
  140. // "&id=" +
  141. // self.goodsId +
  142. // "&orderGoodsId=" +
  143. // self.orderGoodsId,
  144. // });
  145. uni.navigateTo({
  146. url: `/pages3/polyv/detail?id=''&goodsId=${this.goodsId}&orderGoodsId=${this.orderGoodsId}&gradeId=${this.gradeId}`
  147. })
  148. }
  149. });
  150. // uni.showModal({
  151. // title:"注意",
  152. // content:`如对审核结果有异议,请勿点击确认重学。致电020-87085982咨询`,
  153. // confirmText:"确认重学",
  154. // success:function(res){
  155. // if(res.confirm){
  156. // self.$api.courseperiodrebuild({
  157. // goodsId: self.goodsId,
  158. // gradeId: self.gradeId,
  159. // orderGoodsId:self.orderGoodsId
  160. // }).then(res => {
  161. // if(res.data.code === 200){
  162. // uni.redirectTo({
  163. // url: '/pages2/wd/course?gid='+self.gradeId+'&id=' + self.goodsId+'&orderGoodsId='+ self.orderGoodsId
  164. // })
  165. // }
  166. // })
  167. // }
  168. // }
  169. // })
  170. },
  171. getTypeName(int) {
  172. if (int === 0) {
  173. return "测试";
  174. }
  175. if (int === 1) {
  176. return "录播";
  177. }
  178. if (int === 2) {
  179. return "直播";
  180. }
  181. if (int === 3) {
  182. return "回放";
  183. }
  184. },
  185. call() {
  186. uni.makePhoneCall({
  187. phoneNumber: "020-87085982",
  188. });
  189. },
  190. },
  191. onReachBottom() {},
  192. computed: { ...mapGetters(["userInfo"]) },
  193. };
  194. </script>
  195. <style>
  196. page {
  197. background: #eaeef1;
  198. }
  199. </style>
  200. <style scoped lang="scss">
  201. .detailsWrap {
  202. padding: 8rpx 8rpx 140rpx;
  203. }
  204. .topTitle {
  205. border-radius: 24rpx;
  206. background-color: #ffebea;
  207. padding: 10rpx 24rpx;
  208. color: #ff3b30;
  209. font-size: 24rpx;
  210. margin-bottom: 8rpx;
  211. }
  212. .detailsItem {
  213. background: #ffffff;
  214. border-radius: 16rpx;
  215. margin-bottom: 16rpx;
  216. .head {
  217. padding: 26rpx 24rpx;
  218. display: flex;
  219. font-size: 30rpx;
  220. font-family: PingFang SC;
  221. font-weight: bold;
  222. color: #666666;
  223. .tap {
  224. width: 56rpx;
  225. height: 28rpx;
  226. line-height: 26rpx;
  227. text-align: center;
  228. border: 2rpx solid #666666;
  229. border-radius: 8rpx;
  230. font-size: 20rpx;
  231. font-family: PingFang SC;
  232. font-weight: 400;
  233. color: #666666;
  234. margin-right: 8rpx;
  235. flex-shrink: 0;
  236. position: relative;
  237. top: 6rpx;
  238. }
  239. }
  240. .info {
  241. padding: 17rpx 24rpx;
  242. display: flex;
  243. flex-wrap: wrap;
  244. .item {
  245. width: 160rpx;
  246. font-size: 20rpx;
  247. font-family: PingFang SC;
  248. font-weight: 500;
  249. color: #666666;
  250. margin: 0 8rpx 16rpx 0;
  251. .imgbox {
  252. width: 160rpx;
  253. height: 160rpx;
  254. border-radius: 8px;
  255. overflow: hidden;
  256. margin-bottom: 7rpx;
  257. }
  258. }
  259. }
  260. .reason {
  261. display: flex;
  262. padding: 21rpx 24rpx;
  263. font-size: 30rpx;
  264. font-family: PingFang SC;
  265. font-weight: 500;
  266. color: #333333;
  267. .label {
  268. color: #666666;
  269. }
  270. .val {
  271. flex: 1;
  272. }
  273. }
  274. }
  275. .btn {
  276. width: 526rpx;
  277. height: 80rpx;
  278. background: #007aff;
  279. border-radius: 40rpx;
  280. font-size: 30rpx;
  281. font-family: PingFang SC;
  282. font-weight: bold;
  283. color: #ffffff;
  284. display: flex;
  285. justify-content: center;
  286. align-items: center;
  287. position: fixed;
  288. left: 50%;
  289. margin-left: -263rpx;
  290. bottom: 50rpx;
  291. }
  292. </style>