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

130 lines
3.1 KiB

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