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

135 lines
3.2 KiB

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