洛阳学员端
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.

126 lines
3.0 KiB

10 months ago
8 months ago
10 months ago
8 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. console.log(item)
  56. // return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
  57. if(item.applyStep==3) {
  58. this.$goPage('/pages/indexEntry/enroll/signContract/signContract?schoolId='+item.trainingSchoolId+'&trainingApplyId='+ item.trainingApplyId)
  59. }else if(item.applyStep==4||item.applyStep==5) {
  60. return this.$goPage('/pages/indexEntry/enroll/payment/payment?trainingApplyId='+ item.trainingApplyId)
  61. }
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="scss" scoped>
  67. .pageBgImg {
  68. width: 100%;
  69. .tps {
  70. width: 100%;
  71. // height: 56rpx;
  72. // line-height: 56rpx;
  73. color: $themC;
  74. padding: 0 20rpx;
  75. text-align: right;
  76. // background-color: #f7f7fb;
  77. font-size: 26rpx;
  78. }
  79. .ul {
  80. width: 100%;
  81. padding: 0 30rpx;
  82. .card{
  83. width: 100%;
  84. padding: 20rpx;
  85. border-bottom: 1px solid #ededed;
  86. margin-bottom: 24rpx;
  87. &:last-child {
  88. border: none;
  89. }
  90. .name {
  91. font-size: 32rpx;
  92. font-weight: 700;
  93. padding-top: 20rpx;
  94. }
  95. .className {
  96. font-size: 28rpx;
  97. color: #666;
  98. padding: 10rpx 0;
  99. }
  100. .flexB {
  101. display: flex;
  102. justify-content: space-between;
  103. .date {
  104. font-size: 24rpx;
  105. color: #999;
  106. }
  107. .deleteBtn {
  108. color: $themC;
  109. border-radius: 8rpx;
  110. width: 120rpx;
  111. height: 50rpx;
  112. line-height: 50rpx;
  113. text-align: center;
  114. border: 1px solid $themC
  115. }
  116. }
  117. }
  118. }
  119. }
  120. </style>