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

203 lines
4.7 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. <template>
  2. <!-- 考场详情 -->
  3. <view class="pageBg">
  4. <view class="swiper-box" :style="{ backgroundImage: `url(${detailInfo.images})`, backgroundSize: '100% 100%' }">
  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="aspectFill"></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" @click="goExamine">我要模拟</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. async goExamine() {
  93. // uni.navigateTo({
  94. // url: '/pages/indexEntry/enroll/enroll?tit=学员信息'
  95. // })
  96. // return
  97. if(this.vuex_userInfo.schoolId) {
  98. uni.navigateTo({
  99. url: '/pages/carEntry/simulateAppointment/simulateAppointment'
  100. })
  101. }
  102. await this.$store.dispatch('getUserInfo')
  103. if(this.vuex_userInfo.schoolId) {
  104. uni.navigateTo({
  105. url: '/pages/carEntry/simulateAppointment/simulateAppointment'
  106. })
  107. }else {
  108. // 非平台学员
  109. this.$store.commit('updateNonPlatformStudent', 'NonPlatformStudent')
  110. uni.navigateTo({
  111. url: '/pages/indexEntry/enroll/enroll?tit=学员信息'
  112. })
  113. }
  114. }
  115. }
  116. }
  117. </script>
  118. <style lang="scss" scoped>
  119. .swiper-box {
  120. position: relative;
  121. height: 500rpx;
  122. .navPoz {
  123. position: absolute;
  124. top: 0;
  125. z-index: 9;
  126. left: 0;
  127. }
  128. .radian {
  129. position: absolute;
  130. width: 100%;
  131. height: 84rpx;
  132. bottom: 0;
  133. left: 0;
  134. z-index: 9;
  135. }
  136. }
  137. .h1 {
  138. line-height: 96rpx;
  139. }
  140. .traTop {
  141. position: relative;
  142. top: -120rpx;
  143. z-index: 99;
  144. }
  145. .info {
  146. height: 208rpx;
  147. align-items: center;
  148. display: flex;
  149. justify-content: space-between;
  150. padding: 24rpx;
  151. position: relative;
  152. .cover {
  153. width: 204rpx;
  154. height: 140rpx;
  155. border-radius: 8rpx;
  156. overflow: hidden;
  157. }
  158. .textCon {
  159. flex: 1;
  160. padding: 0 0 0 36rpx;
  161. .name {
  162. font-size: 32rpx;
  163. font-weight: 600;
  164. margin-bottom: 20rpx;
  165. }
  166. .starBox {
  167. padding: 10rpx 0 20rpx 0;
  168. }
  169. .modeCar {
  170. font-size: 24rpx;
  171. color: #686B73;
  172. }
  173. }
  174. .pozPhone {
  175. position: absolute;
  176. top: 50%;
  177. right: 40rpx;
  178. width: 72rpx;
  179. height: 72rpx;
  180. transform: translateY(-50%);
  181. }
  182. }
  183. .btn {
  184. width: 396rpx;
  185. height: 72rpx;
  186. background: #1989FA;
  187. border-radius: 8rpx;
  188. font-size: 28rpx;
  189. color: #fff;
  190. text-align: center;
  191. line-height: 72rpx;
  192. margin: 30rpx auto;
  193. }
  194. </style>