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

200 lines
4.7 KiB

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