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

180 lines
4.1 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <!-- 考场详情 -->
  3. <view class="pageBg">
  4. <view class="swiper-box" :style="{ backgroundImage: `url(${detailInfo.images})`, backgroundSize: backgroundSize }">
  5. <view class="navPoz">
  6. <topNavbar title=" "></topNavbar>
  7. </view>
  8. <!-- <u-swiper :list="list1" :height="261"></u-swiper> -->
  9. <view class="radian">
  10. <image :src="radianImg" mode=""></image>
  11. </view>
  12. </view>
  13. <view <view class="pad traTop">
  14. <view class="card info">
  15. <view class="cover">
  16. <image :src="detailInfo.images" mode="widthFix"></image>
  17. </view>
  18. <view class="textCon">
  19. <view class="name">{{detailInfo.name}}</view>
  20. <view class="modeCar">准考车型{{detailInfo.carType}}</view>
  21. </view>
  22. <callPhone :servicePhone="[{name: detailInfo.phone}]">
  23. <view class="pozPhone">
  24. <image src="@/static/images/index/telephone.png" mode=""></image>
  25. </view>
  26. </callPhone>
  27. </view>
  28. <!-- 考场位置 -->
  29. <view class="location">
  30. <view class="h1">考场位置</view>
  31. <view class="pozLi">
  32. <pozCard :info="{address: detailInfo.address, lat:detailInfo.lat,lng: detailInfo.lng, distance: distance}"></pozCard>
  33. </view>
  34. </view>
  35. <!-- 信息资讯 -->
  36. <view class="news">
  37. <view class="flex-b">
  38. <view class="h1">信息资讯</view>
  39. <moreRight text='查看全部' @click.native="$goPage('/pages/indexEntry/examines/allNews/allNews?id='+ id)"></moreRight>
  40. </view>
  41. <view class="card" v-for="(item,index) in infoList" :key="index" style="margin-bottom: 20rpx;">
  42. <newItem :item="item"></newItem>
  43. </view>
  44. </view>
  45. <view class="btn">我要模拟</view>
  46. </view>
  47. </view>
  48. </template>
  49. <script>
  50. import newItem from '../comp/newItem'
  51. import { imgUrl } from '@/config/site.config.js'
  52. import { getExamSiteDatil, getExamSiteInfo } from '@/config/api.js'
  53. export default {
  54. components: { newItem },
  55. data() {
  56. return {
  57. radianImg: imgUrl+'radian.png',
  58. list1: [
  59. 'https://cdn.uviewui.com/uview/swiper/swiper1.png',
  60. 'https://cdn.uviewui.com/uview/swiper/swiper2.png',
  61. 'https://cdn.uviewui.com/uview/swiper/swiper3.png',
  62. ],
  63. detailInfo: {},
  64. infoList: [],
  65. id: '',
  66. params: {},
  67. distance: ''
  68. }
  69. },
  70. onLoad(options) {
  71. this.id = options.id
  72. let vuex_cityInfo = this.$store.state.user.vuex_cityInfo
  73. if(!vuex_cityInfo.lat) {
  74. this.$store.dispatch('getCity')
  75. }else {
  76. this.params.lat = vuex_cityInfo.lat
  77. this.params.lng = vuex_cityInfo.lng
  78. }
  79. this.getExamSiteDatilFn()
  80. this.getExamSiteInfoFn()
  81. },
  82. methods: {
  83. async getExamSiteDatilFn() {
  84. const {data: res} = await getExamSiteDatil( Object.assign({id: this.id, },this.params))
  85. this.distance = res.distance
  86. this.detailInfo = res.siteDO
  87. },
  88. async getExamSiteInfoFn() {
  89. const {data: res} = await getExamSiteInfo({id: this.id,pageNo: 1,pageSize: 2, })
  90. this.infoList = res.list
  91. }
  92. }
  93. }
  94. </script>
  95. <style lang="scss" scoped>
  96. .swiper-box {
  97. position: relative;
  98. height: 500rpx;
  99. .navPoz {
  100. position: absolute;
  101. top: 0;
  102. z-index: 9;
  103. left: 0;
  104. }
  105. .radian {
  106. position: absolute;
  107. width: 100%;
  108. height: 84rpx;
  109. bottom: 0;
  110. left: 0;
  111. z-index: 9;
  112. }
  113. }
  114. .h1 {
  115. line-height: 96rpx;
  116. }
  117. .traTop {
  118. position: relative;
  119. top: -120rpx;
  120. z-index: 99;
  121. }
  122. .info {
  123. height: 208rpx;
  124. align-items: center;
  125. display: flex;
  126. justify-content: space-between;
  127. padding: 24rpx;
  128. position: relative;
  129. .cover {
  130. width: 204rpx;
  131. height: 140rpx;
  132. border-radius: 8rpx;
  133. overflow: hidden;
  134. }
  135. .textCon {
  136. flex: 1;
  137. padding: 0 0 0 36rpx;
  138. .name {
  139. font-size: 32rpx;
  140. font-weight: 600;
  141. margin-bottom: 20rpx;
  142. }
  143. .starBox {
  144. padding: 10rpx 0 20rpx 0;
  145. }
  146. .modeCar {
  147. font-size: 24rpx;
  148. color: #686B73;
  149. }
  150. }
  151. .pozPhone {
  152. position: absolute;
  153. top: 50%;
  154. right: 40rpx;
  155. width: 72rpx;
  156. height: 72rpx;
  157. transform: translateY(-50%);
  158. }
  159. }
  160. .btn {
  161. width: 396rpx;
  162. height: 72rpx;
  163. background: #1989FA;
  164. border-radius: 8rpx;
  165. font-size: 28rpx;
  166. color: #fff;
  167. text-align: center;
  168. line-height: 72rpx;
  169. margin: 30rpx auto;
  170. }
  171. </style>