学员端小程序
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.

64 lines
1.3 KiB

1 year ago
12 months ago
1 year ago
12 months ago
1 year ago
1 year ago
  1. <template>
  2. <view class="tabCon">
  3. <view class="tab1">
  4. <view class="card" v-for="(item, index) in classList" :key="index">
  5. <view class="name">{{ item.name }}</view>
  6. <view class="flex-b">
  7. <view class="price">{{ $u.utils.priceTo(item.totalAmount) }}</view>
  8. <view class="btn" @click="goSign(item)">报名</view>
  9. </view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. props: ['classList'],
  17. methods: {
  18. async goSign(item) {
  19. const res = await this.$store.dispatch('checkLogin')
  20. if(!res) return
  21. this.$store.commit('upDateSchoolCoach', {})
  22. this.$store.commit('upDateSchoolClass', item)
  23. this.$goPage('/pages/indexEntry/enroll/enroll')
  24. // console.log(this.$store.state.school.schoolCoach)
  25. }
  26. }
  27. }
  28. </script>
  29. <style lang="scss" scoped>
  30. .tabCon {
  31. width: 100%;
  32. .tab1 {
  33. width: 100%;
  34. .card {
  35. margin-top: 24rpx;
  36. padding: 28rpx 28rpx 28rpx 36rpx;
  37. .name {
  38. font-size: 32rpx;
  39. color: #333;
  40. margin-bottom: 36rpx;
  41. }
  42. .flex-b {
  43. .price {
  44. font-size: 44rpx;
  45. color: #ED733E;
  46. }
  47. .btn {
  48. width: 130rpx;
  49. height: 60rpx;
  50. background: #1989FA;
  51. border-radius: 8rpx;
  52. font-size: 28rpx;
  53. color: #fff;
  54. text-align: center;
  55. line-height: 60rpx;
  56. }
  57. }
  58. }
  59. }
  60. }
  61. </style>