洛阳学员端
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.

476 lines
12 KiB

10 months ago
10 months ago
8 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
9 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
8 months ago
8 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
8 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
  1. <template>
  2. <view class="main">
  3. <view class="status_bar"></view>
  4. <view class="TopCon pad" >
  5. <!-- 地址 -->
  6. <view class="adrsCon">
  7. <view class="adr">{{ vuex_cityInfo.city }} </view>
  8. <!-- <view class="adrsIcon">
  9. <image src="@/static/images/icon/down.png" mode=""></image>
  10. </view> -->
  11. </view>
  12. <view class="flex-b">
  13. <!-- 搜索 -->
  14. <view class="searchCon" >
  15. <searchRow placeholder="搜索驾校名称" :disable="true" bg="#fff" @searchFn="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')"></searchRow>
  16. </view>
  17. <!-- 扫一扫 -->
  18. <view class="scan" @click="scanCodeClick">
  19. <image src="@/static/images/indexIcon/sancode.png" mode="aspectFill"></image>
  20. </view>
  21. </view>
  22. </view>
  23. <!-- 海报 -->
  24. <view class="pad">
  25. <uni-swiper-dot class="uni-swiper-dot-box bannerCon" @clickItem=clickItem :info="swiperInfo" v-if="swiperInfo.length"
  26. :current="current" :mode="mode" :dots-styles="dotsStyles"
  27. field="content">
  28. <swiper class="swiper-box" @change="change" :current="swiperDotIndex" >
  29. <swiper-item v-for="(item, index) in swiperInfo" :key="index" >
  30. <view class="swiper-item" :class="'swiper-item' + index">
  31. <view class="imgBox">
  32. <image :src="item" mode="widthFix"></image>
  33. </view>
  34. </view>
  35. </swiper-item>
  36. </swiper>
  37. </uni-swiper-dot>
  38. </view>
  39. <view class="pad">
  40. <!-- 精钢区 -->
  41. <view class="card">
  42. <view class="ul">
  43. <view class="li" v-for="(item,index) in entrySection" :key="index" @tap="entrySectionClick(item)">
  44. <view class="icon">
  45. <image :src="item.icon" mode=""></image>
  46. </view>
  47. <view class="name">{{ item.text }}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <!-- 优质驾校 -->
  52. <view class="schoolCon card" v-if="coachList.length">
  53. <view class="h1_row">
  54. <view class="h1" ><text class="active">优质驾校</text></view>
  55. <moreRight text="查看全部" @click.native="$goPage('/pages/indexEntry/findShcool/findShcool')"/>
  56. </view>
  57. <view class="li" v-for="(item,index) in recommendSchool" :key="index" @click="$goPage('/pages/indexEntry/findShcool/shcoolDetail/shcoolDetail?schoolId='+ item.id)">
  58. <schoolItem :item="item"/>
  59. </view>
  60. </view>
  61. <!-- 推荐教练 -->
  62. <view class="coachCon">
  63. <view class="h1_row">
  64. <view class="h1" ><text class="active">推荐教练</text></view>
  65. <moreRight text="查看全部" @click.native="$goPage('/pages/indexEntry/findCoach/findCoach')"/>
  66. </view>
  67. <scroll-view style="width: 100%;" scroll-x="true" scroll-with-animation >
  68. <view class="ul3">
  69. <view class="li3" v-for="item in coachList" :key="item.id" @click="goCoachDetail(item)">
  70. <coachItem :item="item"/>
  71. </view>
  72. </view>
  73. </scroll-view>
  74. </view>
  75. <!-- 行业资讯政策法规 -->
  76. <view class="card">
  77. <view class="h1_row">
  78. <view class="tabs">
  79. <view class="h1" @click="changeInforma(1)"><text :class="{active: informa==1}">行业资讯</text></view>
  80. <view class="h1" @click="changeInforma(2)"><text :class="{active: informa==2}" style="margin-left: 30rpx;">政策法规</text></view>
  81. </view>
  82. <moreRight text="查看全部" @click.native="$goPage('/pages/indexEntry/industryPolicy/industryPolicy?type='+ informa)"/>
  83. </view>
  84. <view class="ul2">
  85. <view class="li2" v-for="(item,index) in informList" :key="index">
  86. <informaItem :item="item"/>
  87. </view>
  88. </view>
  89. </view>
  90. <!-- 服务专区 -->
  91. <view class="card">
  92. <view class="h1" style="margin-top: 20rpx;"><text class="active">服务专区</text></view>
  93. <view class="severCon">
  94. <view class="severItem" @click="$goPage('/pages/indexEntry/parse/parse')">
  95. <view class="tit">学车指南</view>
  96. <view class="tps">政府平台 一站服务</view>
  97. <view class="go">
  98. <view class="goTxt">GO</view>
  99. <u-icon name="arrow-right" color="#fff" size="14"></u-icon>
  100. </view>
  101. </view>
  102. <view class="severItem tow" @click="$goPage('/pages/indexEntry/consult/consult')">
  103. <view class="tit">咨询投诉</view>
  104. <view class="tps">畅达沟通 听取民声</view>
  105. <view class="go">
  106. <view class="goTxt">GO</view>
  107. <u-icon name="arrow-right" color="#fff" size="14"></u-icon>
  108. </view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <u-popup :show="showPrivacy" mode="center" :round="20" >
  114. <privacyPopup @disagree="showPrivacy=false" @agree="showPrivacy=false"></privacyPopup>
  115. </u-popup>
  116. </view>
  117. </template>
  118. <script>
  119. import { imgUrl } from '@/config/site.config'
  120. import { getarticleList, getBannerList, getarticlezcList,getRecommendList, recommendSchoolList } from '@/config/api.js'
  121. import schoolItem from './comp/schoolItem'
  122. import informaItem from './comp/informaItem'
  123. import coachItem from './comp/coachItem'
  124. import { scanCodeFn } from '@/config/utils.js'
  125. export default {
  126. components: { schoolItem, informaItem, coachItem },
  127. data() {
  128. return {
  129. showPrivacy: false,
  130. imgUrl: imgUrl+'banner.png',
  131. backgroundSize: '100% 100%',
  132. keywords: '',
  133. entrySection: [{
  134. text: '学车报名',
  135. icon: require('../../../static/images/indexIcon/entryIcon (3).png'),
  136. url: '/pages/indexEntry/enroll/enroll',
  137. goPage: function (){
  138. console.log(666)
  139. // this.$goPage(item.url)
  140. }
  141. },
  142. {
  143. text: '找驾校',
  144. icon: require('../../../static/images/indexIcon/entryIcon (4).png'),
  145. url: '/pages/indexEntry/findShcool/findShcool',
  146. goPage: (item)=>{
  147. this.$goPage(item.url)
  148. }
  149. },
  150. {
  151. text: '找教练',
  152. icon: require('../../../static/images/indexIcon/entryIcon (1).png'),
  153. url: '/pages/indexEntry/findCoach/findCoach',
  154. goPage: ((item)=>{
  155. this.$goPage(item.url)
  156. })
  157. },
  158. {
  159. text: '签到签退',
  160. icon: require('../../../static/images/indexIcon/entryIcon (5).png'),
  161. url: '/pages/indexEntry/signIn/signIn',
  162. goPage: ((item)=>{
  163. this.$u.toast('正在开发中,敬请期待...')
  164. })
  165. },
  166. {
  167. text: '理论学习',
  168. icon: require('../../../static/images/indexIcon/entryIcon (2).png'),
  169. url: '/pages/indexEntry/theory/theory',
  170. goPage: ((item)=>{
  171. this.$goPage(item.url)
  172. })
  173. },
  174. ],
  175. swiperDotIndex: 0,
  176. current: 1,
  177. mode: 'default',
  178. swiperInfo: [],
  179. dotsStyles: {
  180. backgroundColor: '#E8E9EC',
  181. border: '1px #E8E9EC solid',
  182. color: '#fff',
  183. selectedBackgroundColor: '#1989FA',
  184. selectedBorder: '1px #1989FA solid'
  185. },
  186. bgColor: 'transparent',
  187. informList: [],
  188. informa: 1,
  189. coachList: [],//推荐教练
  190. recommendSchool: [],//推荐驾校
  191. }
  192. },
  193. async onLoad() {
  194. },
  195. onPullDownRefresh() {
  196. this.initApi()
  197. },
  198. onShow() {
  199. // if(!this.vuex_cityInfo.lat) {
  200. // this.$store.dispatch('getCity')
  201. // }
  202. let token = this.$store.state.user.vuex_loginInfo.accessToken
  203. if(token) {
  204. this.$store.dispatch('getUserInfo')
  205. }
  206. if(!this.swiperInfo.length) {
  207. this.getBannerListFn()
  208. // this.getarticleListFn()
  209. }
  210. this.initApi()
  211. },
  212. computed: {
  213. },
  214. methods: {
  215. initApi() {
  216. this.getarticleListFn()
  217. this.getRecommendList()
  218. this.recommendSchoolList()
  219. },
  220. goCoachDetail(item) {
  221. let objStr = encodeURIComponent(JSON.stringify(item))
  222. this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
  223. },
  224. // 推荐教练
  225. async getRecommendList() {
  226. const {data: res} = await getRecommendList({pageNo:1,pageSize: 20, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''})
  227. this.coachList = res
  228. console.log(res)
  229. },
  230. // 推荐驾校
  231. async recommendSchoolList() {
  232. if(!this.vuex_cityInfo.lat) {
  233. await this.$store.dispatch('getCity')
  234. }
  235. const {data: res} = await recommendSchoolList({pageNo:1,pageSize: 3, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''})
  236. this.recommendSchool = res
  237. console.log(res)
  238. },
  239. async getBannerListFn() {
  240. const {data: res} = await getBannerList()
  241. this.swiperInfo = res.list.map(item=>{
  242. return item.imgUrl
  243. })
  244. console.log(this.swiperInfo)
  245. },
  246. async entrySectionClick(item) {
  247. if(item.text=='学车报名') {
  248. this.$store.commit('upDateSchoolCoach', {})
  249. this.$store.commit('upDateSchoolClass', {})
  250. this.$store.commit('updateSchool', {})
  251. return this.$u.utils.clickSignUp()
  252. }
  253. this.$goPage(item.url)
  254. },
  255. changeInforma(val) {
  256. if(this.informa == val) return
  257. this.informa = val
  258. this.getarticleListFn()
  259. },
  260. // 行业资讯
  261. async getarticleListFn() {
  262. const {data: res} = await getarticlezcList({pageSize: 3, type: this.informa})
  263. this.informList = res.list
  264. },
  265. async refereshFn() {
  266. const res = await this.$store.dispatch('refreshToken')
  267. console.log(res)
  268. uni.$u.http.setConfig((config) => {
  269. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  270. console.log(111)
  271. return config
  272. })
  273. console.log(222)
  274. // this.$store.dispatch('getUserInfo')
  275. },
  276. close() {
  277. },
  278. goPageSection(item) {
  279. uni.navigateTo({
  280. url:item.url
  281. })
  282. },
  283. // 扫码
  284. scanCodeClick() {
  285. scanCodeFn(this)
  286. },
  287. clickItem(e) {
  288. this.swiperDotIndex = e
  289. },
  290. change(e) {
  291. this.current = e.detail.current
  292. },
  293. goPage() {
  294. uni.navigateTo({
  295. url: '/pages/userCenter/login/loginByPhone'
  296. })
  297. },
  298. initFn() {
  299. uni.requestSubscribeMessage({
  300. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  301. success(res) {
  302. console.log('消息是否有权限呢')
  303. console.log(res)
  304. }
  305. })
  306. }
  307. }
  308. }
  309. </script>
  310. <style lang="scss" scoped>
  311. .h1_row {
  312. display: flex;
  313. align-items: center;
  314. justify-content: space-between;
  315. }
  316. .h1 {
  317. padding: 20rpx 0 20rpx 0;
  318. }
  319. .main {
  320. width: 100%;
  321. background: url('https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/complain/2024-02-27/1709013363812-0') #F6F7FA no-repeat;
  322. background-size: 100% 600rpx;
  323. .TopCon {
  324. width: 100%;
  325. // height: 120rpx;
  326. .flex-b {
  327. display: flex;
  328. height: 100%;
  329. height: 72rpx;
  330. margin-bottom: 20rpx;
  331. }
  332. .adrsCon {
  333. display: flex;
  334. align-items: center;
  335. width: 180rpx;
  336. height: 88rpx;
  337. .adrsIcon {
  338. width: 17rpx;
  339. height: 17rpx;
  340. margin-top: 4rpx;
  341. }
  342. .adr {
  343. padding-right: 14rpx;
  344. font-size: 28rpx;
  345. color: #fff;
  346. }
  347. }
  348. .searchCon {
  349. flex:1;
  350. }
  351. .scan {
  352. width: 100rpx;
  353. height: 100%;
  354. display: flex;
  355. justify-content: flex-end;
  356. align-items: center;
  357. image {
  358. width: 52rpx;
  359. height: 52rpx;
  360. }
  361. }
  362. }
  363. .bannerCon {
  364. border-radius: 20rpx;
  365. margin-bottom: 20rpx;
  366. overflow: hidden;
  367. }
  368. .card {
  369. background: #FFFFFF;
  370. border-radius: 16rpx;
  371. margin-bottom: 20rpx;
  372. padding: 0 20rpx;
  373. .ul {
  374. height: 164rpx;
  375. display: flex;
  376. justify-content: space-between;
  377. align-items: center;
  378. .li {
  379. flex: 1;
  380. display: flex;
  381. align-items: center;
  382. flex-direction: column;
  383. .icon {
  384. width: 72rpx;
  385. height: 72rpx;
  386. }
  387. .name {
  388. font-size: 26rpx;
  389. color: #333;
  390. padding-top: 20rpx;
  391. text-align: center;
  392. }
  393. }
  394. }
  395. }
  396. }
  397. .tabs {
  398. display: flex;
  399. }
  400. .severCon {
  401. display: flex;
  402. align-items: center;
  403. justify-content: space-between;
  404. padding: 20rpx 0rpx 20rpx 0rpx;
  405. }
  406. .severItem {
  407. width: 320rpx;
  408. height: 186rpx;
  409. background: url('../../../static/images/indexIcon/xccard.png') no-repeat;
  410. background-size: 100% 100%;
  411. padding: 30rpx 20rpx;
  412. font-size: 24rpx;
  413. color: #fff;
  414. &.tow {
  415. background: url('../../../static/images/indexIcon/zxcard.png') no-repeat;
  416. background-size: 100% 100%;
  417. .go {
  418. background: #2AB188;
  419. }
  420. }
  421. .tit {
  422. font-size: 32rpx;
  423. }
  424. .tps {
  425. opacity: 0.8;
  426. margin: 12rpx 0;
  427. }
  428. .go {
  429. width: 70rpx;
  430. height: 38rpx;
  431. background: #1A61FB;
  432. border-radius: 10rpx;
  433. display: flex;
  434. align-items: center;
  435. .goTxt {
  436. padding-left: 4rpx;
  437. }
  438. }
  439. }
  440. .ul3 {
  441. display: flex;
  442. margin: 20rpx 0;
  443. }
  444. </style>