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

97 lines
2.4 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. <template>
  2. <view class="pageBgImg">
  3. <topNavbar title="找考场"></topNavbar>
  4. <view class="pad">
  5. <view class="card">
  6. <view class="navBox">
  7. <view class="nav" v-for="(item,index) in navList" :key="index" @click="$goPage(item.url)">
  8. <view class="icon">
  9. <image :src="item.icon" mode=""></image>
  10. </view>
  11. <view class="text">{{ item.text }}</view>
  12. </view>
  13. </view>
  14. </view>
  15. <view class="h1_row">
  16. <view class="h1">附近考场</view>
  17. <moreRight text="查看全部考场" @click.native="$goPage('/pages/indexEntry/examines/allExamines/allExamines')"></moreRight>
  18. </view>
  19. <view class="card" v-for="(item,index) in list" :key="index">
  20. <examineItem :item="item"></examineItem>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import examineItem from './comp/examineItem.vue'
  27. import { getexamSite } from '@/config/api.js'
  28. export default {
  29. components: { examineItem },
  30. data() {
  31. return {
  32. navList: [
  33. {text: '我要模拟', icon: require('../../../static/images/index/btn_moni.png'), id: 1 },
  34. {text: '考场取号', icon: require('../../../static/images/index/btn_quhao.png'), id: 2 },
  35. {text: '领证宣誓', icon: require('../../../static/images/index/btn_xuanshi.png'), id: 3 },
  36. {text: '警示教育', icon: require('../../../static/images/index/btn_jiaoyu.png'), id: 4 , url: '/pages/indexEntry/examines/warningEducation/warningEducation'},
  37. {text: '驾照邮寄', icon: require('../../../static/images/index/btn_youjix.png'), id: 5 },
  38. ],
  39. list: [],
  40. params: {
  41. pageNo: 1,
  42. pageSize: 10,
  43. }
  44. }
  45. },
  46. onLoad() {
  47. let vuex_cityInfo = this.$store.state.user.vuex_cityInfo
  48. if(!vuex_cityInfo.lat) {
  49. this.$store.dispatch('getCity')
  50. }else {
  51. this.params.lat = vuex_cityInfo.lat
  52. this.params.lng = vuex_cityInfo.lng
  53. }
  54. this.getexamSiteFn()
  55. },
  56. methods: {
  57. async getexamSiteFn() {
  58. const {data: res} = await getexamSite(this.params)
  59. this.list = res.list
  60. console.log(res)
  61. }
  62. }
  63. }
  64. </script>
  65. <style lang="scss" scoped>
  66. .navBox {
  67. display: flex;
  68. .nav {
  69. flex: 2;
  70. .icon {
  71. width: 92rpx;
  72. height: 92rpx;
  73. margin: 0 auto;
  74. }
  75. .text {
  76. font-size: 26rpx;
  77. margin-top: 22rpx;
  78. text-align: center;
  79. }
  80. }
  81. }
  82. .h1_row {
  83. height: 104rpx;
  84. display: flex;
  85. align-items: center;
  86. justify-content: space-between;
  87. }
  88. .card {
  89. padding: 32rpx 24rpx 28rpx 24rpx;
  90. margin-bottom: 20rpx;
  91. }
  92. .redBox {
  93. }
  94. </style>