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

306 lines
6.3 KiB

1 year ago
  1. <template>
  2. <view class="main pageBg">
  3. <view class="swiperBox">
  4. <u-swiper :list="list" :show-bar="false" :mode="'none'" @change="changeSwiper" :height="468"></u-swiper>
  5. <view class="tag">
  6. {{swiperIndex+1}} / {{list.length}}
  7. </view>
  8. <view class="pozArc">
  9. <image src="@/static/images/acr.png" mode=""></image>
  10. </view>
  11. </view>
  12. <view class="schooInfo">
  13. <view class="info">
  14. <view class="callPhone">
  15. <a :href="'tel:'+ 18674054687"></a>
  16. <image src="../../static/images/home_icon_telephone@3x.png" mode=""></image>
  17. </view>
  18. <view class="name">{{info.schoolName}}</view>
  19. <view class="star">
  20. <u-rate :count="5" v-model="info.starLevel" active-color="#F5682D" disabled></u-rate>
  21. <view class="starText">
  22. {{ $u.utils.priceTo(info.starLevel) }}
  23. </view>
  24. </view>
  25. <view class="row">
  26. <view class="text">行业信用{{info.creditrating}}</view>
  27. <view class="text "
  28. @click="$goPage('/pages/schoolDetails/schoolPublicity/schoolPublicity?trainingSchoolId='+trainingSchoolId)">
  29. <view class="icon">
  30. <image src="../../static/images/second_icon_information@3x.png" mode=""></image>
  31. </view>
  32. <view class="blueTxt">公示信息</view>
  33. </view>
  34. </view>
  35. </view>
  36. <view class="" style="padding: 16rpx 0">
  37. <view class="addressCon">
  38. <view class="address">{{info.address}}</view>
  39. <view class="rightCon" @click="openMap">
  40. <view class="icon">
  41. <image src="../../static/images/second_icon_navigation@3x.png" mode=""></image>
  42. </view>
  43. <view class="txt">地图导航</view>
  44. </view>
  45. </view>
  46. </view>
  47. </view>
  48. <view class="card">
  49. <view class="h1">驾校简介</view>
  50. <view class="desc">{{info.introduce || '暂无信息'}}</view>
  51. </view>
  52. <view class="card">
  53. <view class="tabs">
  54. <view class="tab" :class="{active: currentTab==1}" @click="changeTab(1)">班型</view>
  55. <view class="tab" :class="{active: currentTab==2}" @click="changeTab(2)">场地</view>
  56. </view>
  57. <tabCon :siteList="siteList" :TrainingClass="TrainingClass" :current="currentTab"/>
  58. </view>
  59. </view>
  60. </template>
  61. <script>
  62. import indexApi from '@/api/index.js'
  63. import tabCon from './comp/tabCon.vue'
  64. export default {
  65. components: {
  66. tabCon
  67. },
  68. data() {
  69. return {
  70. trainingSchoolId: '',
  71. list: [],
  72. swiperIndex: 0,
  73. info: {},
  74. TrainingClass: [],
  75. sitePageIndex: 1,
  76. siteList: [],
  77. currentTab: 1
  78. }
  79. },
  80. onLoad(options) {
  81. this.trainingSchoolId = this.$store.state.currentSchool.trainingSchoolId
  82. this.getTrainingSchoolAppDetailsFn()
  83. this.queryTrainingClasssFn()
  84. this.queryTrainingSiteAppListFn()
  85. },
  86. methods: {
  87. // 打开地图
  88. openMap() {
  89. uni.openLocation({
  90. latitude: this.info.lat,
  91. longitude: this.info.lng
  92. })
  93. },
  94. changeTab(num) {
  95. this.currentTab = num
  96. },
  97. changeSwiper(index) {
  98. this.swiperIndex = index
  99. },
  100. // 获取详情数据
  101. async getTrainingSchoolAppDetailsFn() {
  102. const [nulls, res] = await indexApi.getTrainingSchoolAppDetails({
  103. trainingSchoolId: this.trainingSchoolId
  104. })
  105. this.info = res.data
  106. let imgArr = JSON.parse(res.data.images)
  107. this.list = imgArr.map(item => item.u1)
  108. },
  109. // 获取班型数据
  110. async queryTrainingClasssFn() {
  111. const [nulls,res] = await indexApi.queryTrainingClasss({trainingSchoolId: this.trainingSchoolId})
  112. this.TrainingClass = res.data
  113. console.log(res)
  114. },
  115. // 获取场地数据
  116. async queryTrainingSiteAppListFn() {
  117. const [nulls, res] = await indexApi.queryTrainingSiteAppList({trainingSchoolId: this.trainingSchoolId, pageIndex: this.sitePageIndex, pageSize: 40})
  118. this.sitePageIndex ++
  119. this.siteList.push(...res.data)
  120. },
  121. }
  122. }
  123. </script>
  124. <style lang="scss" scoped>
  125. .swiperBox {
  126. position: relative;
  127. .tag {
  128. position: absolute;
  129. right: 48rpx;
  130. bottom: 64rpx;
  131. width: 76rpx;
  132. height: 32rpx;
  133. line-height: 32rpx;
  134. border-radius: 16rpx;
  135. white-space: nowrap;
  136. background: rgba(0, 0, 0, 0.4);
  137. font-size: 24rpx;
  138. color: #fff;
  139. text-align: center;
  140. }
  141. .pozArc {
  142. position: absolute;
  143. bottom: 0;
  144. left: 0;
  145. width: 100%;
  146. height: 96rpx;
  147. }
  148. }
  149. .schooInfo {
  150. width: 100%;
  151. background: #fff;
  152. padding: 0 32rpx;
  153. .info {
  154. width: 100%;
  155. position: relative;
  156. .callPhone {
  157. width: 80rpx;
  158. height: 80rpx;
  159. top: 8rpx;
  160. right: 32rpx;
  161. position: absolute;
  162. a {
  163. position: absolute;
  164. opacity: 0;
  165. top: 0;
  166. left: 0;
  167. z-index: 9;
  168. width: 100%;
  169. height: 100%;
  170. display: block;
  171. background-color: red;
  172. }
  173. }
  174. .name {
  175. font-size: 40rpx;
  176. color: #333;
  177. font-weight: 600;
  178. }
  179. .row {
  180. display: flex;
  181. align-items: center;
  182. padding: 28rpx 0 14rpx 0;
  183. border-bottom: 1px solid #E8E9EC;
  184. .text {
  185. font-size: 24rpx;
  186. color: #686B73;
  187. margin-right: 50rpx;
  188. }
  189. .text {
  190. display: flex;
  191. .icon {
  192. width: 32rpx;
  193. height: 32rpx;
  194. }
  195. .blueTxt {
  196. color: #1989FA;
  197. font-size: 24rpx;
  198. text-decoration: underline;
  199. margin-left: 14rpx;
  200. }
  201. }
  202. }
  203. }
  204. .addressCon {
  205. margin: 24rpx 0;
  206. display: flex;
  207. align-items: center;
  208. width: 100%;
  209. background: url('../../static/images/second_img_map@3x.png');
  210. height: 116rpx;
  211. background-size: 100% 100%;
  212. .address {
  213. font-size: 28rpx;
  214. color: #333333;
  215. flex: 1;
  216. width: 0;
  217. }
  218. .rightCon {
  219. min-width: 96rpx;
  220. text-align: center;
  221. margin-right: 32rpx;
  222. .icon {
  223. width: 32rpx;
  224. height: 30rpx;
  225. margin: 0 auto;
  226. }
  227. .txt {
  228. font-size: 24rpx;
  229. color: #1989FA;
  230. margin-top: 10rpx;
  231. }
  232. }
  233. }
  234. }
  235. .card {
  236. width: 100%;
  237. padding: 32rpx;
  238. background: #fff;
  239. margin-top: 16rpx;
  240. .h1 {
  241. font-size: 32rpx;
  242. color: #333;
  243. margin-bottom: 36rpx;
  244. font-weight: 600;
  245. }
  246. .desc {
  247. font-size: 28rpx;
  248. color: #333;
  249. }
  250. }
  251. .tabs {
  252. display: flex;
  253. align-items: center;
  254. padding-bottom: 30rpx;
  255. .tab {
  256. flex: 1;
  257. text-align: center;
  258. font-size: 32rpx;
  259. color: #B3B5B9;
  260. &.active {
  261. color: #1989FA;
  262. font-weight: 600;
  263. position: relative;
  264. &::before {
  265. width: 48rpx;
  266. height: 4rpx;
  267. background: #1989FA;
  268. // border-radius: 200rpx 200rpx 0px 0px;
  269. content: '';
  270. position: absolute;
  271. left: 50%;
  272. transform: translateX(-50%);
  273. bottom: -12rpx;
  274. }
  275. }
  276. }
  277. }
  278. </style>