洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

124 lines
2.9 KiB

10 months ago
10 months ago
  1. <template>
  2. <view class="pageBgImg ">
  3. <topNavbar title="我的预报名"></topNavbar>
  4. <view class="bg" v-if="list.length">
  5. <view class="ul">
  6. <view class="card" v-for="(item,index) in list" :key="index" @click="itemClickFn(item)">
  7. <!-- 状态0-预报名1-已报名待支付2-已支付,3-已学完 -->
  8. <view class="tps">{{ item.applyStep==3?'点击进入签约合同':'预报名成功,待支付'}}</view>
  9. <view class="name">{{item.schoolName}}</view>
  10. <view class="className">班型{{item.className}}</view>
  11. <view class="flexB">
  12. <view class="date">
  13. {{$u.timeFormat(item.applyDate, 'yyyy-mm-dd hh:MM:ss')}}
  14. </view>
  15. <view class="deleteBtn" @click.stop="deleteFn(item.trainingApplyId)">
  16. 删除
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. <nodata v-else></nodata>
  23. <u-loadmore :status="status" style="margin-top: 32rpx;" v-if="list.length>5" icon-type="circle" />
  24. </view>
  25. </template>
  26. <script>
  27. import { trainingApplyList, trainingApplyDelete } from "@/config/api.js"
  28. export default {
  29. data() {
  30. return {
  31. list: [],
  32. status: 'loadmore',
  33. }
  34. },
  35. onLoad() {
  36. this.trainingApplyListFn()
  37. },
  38. onPullDownRefresh() {
  39. this.trainingApplyListFn()
  40. },
  41. methods: {
  42. async trainingApplyListFn() {
  43. const {data: res} = await trainingApplyList({studentId: this.studentId})
  44. this.list = res
  45. },
  46. async deleteFn(id) {
  47. const res = await trainingApplyDelete({id})
  48. if(res.code==0) {
  49. this.$u.toast('删除成功')
  50. }
  51. this.trainingApplyListFn()
  52. console.log(res)
  53. },
  54. itemClickFn(item) {
  55. if(item.applyStep==3) {
  56. this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+item.trainingSchoolId+'&trainingApplyId='+ item.trainingApplyId)
  57. }else if(item.applyStep==4) {
  58. return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
  59. }
  60. }
  61. }
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .pageBgImg {
  66. width: 100%;
  67. .tps {
  68. width: 100%;
  69. // height: 56rpx;
  70. // line-height: 56rpx;
  71. color: $themC;
  72. padding: 0 20rpx;
  73. text-align: right;
  74. // background-color: #f7f7fb;
  75. font-size: 26rpx;
  76. }
  77. .ul {
  78. width: 100%;
  79. padding: 0 30rpx;
  80. .card{
  81. width: 100%;
  82. padding: 20rpx;
  83. border-bottom: 1px solid #ededed;
  84. margin-bottom: 24rpx;
  85. &:last-child {
  86. border: none;
  87. }
  88. .name {
  89. font-size: 32rpx;
  90. font-weight: 700;
  91. padding-top: 20rpx;
  92. }
  93. .className {
  94. font-size: 28rpx;
  95. color: #666;
  96. padding: 10rpx 0;
  97. }
  98. .flexB {
  99. display: flex;
  100. justify-content: space-between;
  101. .date {
  102. font-size: 24rpx;
  103. color: #999;
  104. }
  105. .deleteBtn {
  106. color: $themC;
  107. border-radius: 8rpx;
  108. width: 120rpx;
  109. height: 50rpx;
  110. line-height: 50rpx;
  111. text-align: center;
  112. border: 1px solid $themC
  113. }
  114. }
  115. }
  116. }
  117. }
  118. </style>