工行这里学车报名流程h5
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.

199 lines
4.2 KiB

1 year ago
1 year ago
  1. <template>
  2. <view class="tabCon">
  3. <view class="tab1" v-if="current==1">
  4. <view class="item" v-for="(item,index) in TrainingClass" :key="index">
  5. <view class="carType">{{item.className}}</view>
  6. <view class="price_row">
  7. <view class="oldPrice">
  8. <view class="price">
  9. {{item.totalPrice.toString().slice(0,-2)}}
  10. </view>
  11. <view class="lab">原价</view>
  12. </view>
  13. <view class="subtract">
  14. <view class="preferential">
  15. <image src="../../../static/images/second_img_huiyuan.png" mode=""></image>
  16. </view>
  17. <view class="text">
  18. 立减 <text>270</text>
  19. </view>
  20. </view>
  21. <view class="signUp" @click="goSign(item)">报名</view>
  22. </view>
  23. <readMore show-height="0" text-indent="0" :toggle="true" v-if="item.introduce">
  24. <rich-text :nodes="item.introduce"></rich-text>
  25. </readMore>
  26. </view>
  27. </view>
  28. <view class="tab2" v-else>
  29. <view class="ul">
  30. <view class="li" v-for="(item, index) in siteList" :key="index" @click="openMap(item)">
  31. <view class="cover">
  32. <image src="@/static/images/second_img_field@3x.png" mode=""></image>
  33. </view>
  34. <view class="textCon">
  35. <view class="name oneRowText">{{item.siteName}}</view>
  36. <view class="address towRowText">{{item.address}}</view>
  37. </view>
  38. <view class="lookBtn bgLinear">查看</view>
  39. </view>
  40. </view>
  41. </view>
  42. </view>
  43. </template>
  44. <script>
  45. import readMore from '@/components/readMore/readMore.vue'
  46. import indexApi from '@/api/index.js'
  47. export default {
  48. components: {readMore},
  49. props: ['TrainingClass', 'siteList', 'current'],
  50. data() {
  51. return {
  52. }
  53. },
  54. methods: {
  55. // 去报名
  56. goSign(item) {
  57. this.$store.commit('ForecastClassType', item)
  58. this.$goPage('/pages/application/entry')
  59. },
  60. // 打开地图
  61. openMap(item) {
  62. uni.openLocation({
  63. latitude: item.lat,
  64. longitude: item.lng
  65. })
  66. console.log(item)
  67. },
  68. }
  69. }
  70. </script>
  71. <style lang="scss" scoped>
  72. .tabCon {
  73. width: 100%;
  74. .tab1 {
  75. width: 100%;
  76. .item {
  77. width: 100%;
  78. margin-bottom: 48rpx;
  79. .carType {
  80. font-weight: 600;
  81. color: #333333;
  82. font-size: 32rpx;
  83. }
  84. .price_row {
  85. width: 100%;
  86. display: flex;
  87. justify-content: space-between;
  88. height: 108rpx;
  89. align-items: center;
  90. margin: 16rpx 0 30rpx 0;
  91. .oldPrice {
  92. display: flex;
  93. flex-direction: column;
  94. align-items: center;
  95. color: #686B73;
  96. .price {
  97. font-size: 40rpx;
  98. text-decoration: line-through;
  99. }
  100. .lab {
  101. font-size: 28rpx;
  102. }
  103. }
  104. .subtract {
  105. flex: 1;
  106. background: url('../../../static/images/second_img_huiyuanbg@3x.png') no-repeat;
  107. background-size: 248rpx 108rpx;
  108. background-position: 40rpx 0;
  109. display: flex;
  110. align-items: center;
  111. padding: 0 0 0 10rpx;
  112. height: 108rpx;
  113. .preferential {
  114. width: 118rpx;
  115. height: 68rpx;
  116. background-color: #fff;
  117. }
  118. .text {
  119. font-size: 24rpx;
  120. color: #FE6547;
  121. margin-left: 24rpx;
  122. text {
  123. font-size: 42rpx;
  124. margin: 0 10rpx;
  125. }
  126. }
  127. }
  128. .signUp {
  129. width: 98rpx;
  130. height: 104rpx;
  131. background: linear-gradient(180deg, #FF3731 0%, #FA7B3C 100%);
  132. border-radius: 8rpx;
  133. font-size: 28rpx;
  134. color: #fff;
  135. text-align: center;
  136. line-height: 104rpx;
  137. }
  138. }
  139. }
  140. }
  141. }
  142. .tab2 {
  143. width: 100%;
  144. .ul {
  145. width: 100%;
  146. .li {
  147. width: 100%;
  148. padding: 24rpx 0;
  149. display: flex;
  150. align-items: center;
  151. .cover {
  152. width: 204rpx;
  153. height: 140rpx;
  154. }
  155. .textCon {
  156. flex: 1;
  157. padding: 0 24rpx;
  158. width: 0;
  159. height: 100%;
  160. min-height: 140rpx;
  161. .name {
  162. font-size: 32rpx;
  163. color: #333;
  164. }
  165. .address {
  166. font-size: 28rpx;
  167. color: #686B73;
  168. }
  169. }
  170. .lookBtn {
  171. width: 104rpx;
  172. height: 56rpx;
  173. // background: linear-gradient(180deg, #3593FB 0%, #53D3E5 100%);
  174. border-radius: 36rpx;
  175. font-size: 28rpx;
  176. color: #fff;
  177. line-height: 56rpx;
  178. text-align: center;
  179. }
  180. }
  181. }
  182. }
  183. </style>