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

484 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
8 months ago
10 months ago
8 months ago
10 months ago
8 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
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
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
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
8 months ago
8 months ago
10 months ago
8 months ago
10 months ago
10 months ago
9 months ago
9 months ago
8 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
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
10 months ago
10 months ago
10 months ago
10 months ago
10 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" :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" @click="bannerClick(item)" >
  30. <view class="swiper-item" :class="'swiper-item' + index">
  31. <view class="imgBox">
  32. <image :src="item.imgUrl" 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. // 点击海报图
  216. bannerClick(item) {
  217. let link = item.jumpPath
  218. console.log(link)
  219. if(!link) return false
  220. this.$store.commit('updateWebVeiwUrl', link)
  221. this.$goPage('/pages/indexEntry/webView/webView')
  222. },
  223. initApi() {
  224. this.getarticleListFn()
  225. this.getRecommendList()
  226. this.recommendSchoolList()
  227. },
  228. goCoachDetail(item) {
  229. let objStr = encodeURIComponent(JSON.stringify(item))
  230. this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
  231. },
  232. // 推荐教练
  233. async getRecommendList() {
  234. const {data: res} = await getRecommendList({pageNo:1,pageSize: 20, })
  235. this.coachList = res
  236. console.log(res)
  237. },
  238. // 推荐驾校
  239. async recommendSchoolList() {
  240. if(!this.vuex_cityInfo.lat) {
  241. await this.$store.dispatch('getCity')
  242. }
  243. const {data: res} = await recommendSchoolList({pageNo:1,pageSize: 3, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''})
  244. this.recommendSchool = res
  245. console.log(res)
  246. },
  247. async getBannerListFn() {
  248. const {data: res} = await getBannerList()
  249. this.swiperInfo = res.list
  250. console.log(this.swiperInfo)
  251. },
  252. async entrySectionClick(item) {
  253. if(item.text=='学车报名') {
  254. this.$store.commit('upDateSchoolCoach', {})
  255. this.$store.commit('upDateSchoolClass', {})
  256. this.$store.commit('updateSchool', {})
  257. return this.$u.utils.clickSignUp()
  258. }else if(item.text=='签到签退') {
  259. if(this.vuex_userInfo.applyStep<6) return this.$u.toast('请先报名学员')
  260. }
  261. this.$goPage(item.url)
  262. },
  263. changeInforma(val) {
  264. if(this.informa == val) return
  265. this.informa = val
  266. this.getarticleListFn()
  267. },
  268. // 行业资讯
  269. async getarticleListFn() {
  270. const {data: res} = await getarticlezcList({pageSize: 3, type: this.informa})
  271. this.informList = res.list
  272. },
  273. async refereshFn() {
  274. const res = await this.$store.dispatch('refreshToken')
  275. console.log(res)
  276. uni.$u.http.setConfig((config) => {
  277. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  278. console.log(111)
  279. return config
  280. })
  281. console.log(222)
  282. // this.$store.dispatch('getUserInfo')
  283. },
  284. close() {
  285. },
  286. goPageSection(item) {
  287. uni.navigateTo({
  288. url:item.url
  289. })
  290. },
  291. // 扫码
  292. scanCodeClick() {
  293. scanCodeFn(this)
  294. },
  295. clickItem(e) {
  296. this.swiperDotIndex = e
  297. },
  298. change(e) {
  299. this.current = e.detail.current
  300. },
  301. goPage() {
  302. uni.navigateTo({
  303. url: '/pages/userCenter/login/loginByPhone'
  304. })
  305. },
  306. initFn() {
  307. uni.requestSubscribeMessage({
  308. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  309. success(res) {
  310. console.log('消息是否有权限呢')
  311. console.log(res)
  312. }
  313. })
  314. }
  315. }
  316. }
  317. </script>
  318. <style lang="scss" scoped>
  319. .h1_row {
  320. display: flex;
  321. align-items: center;
  322. justify-content: space-between;
  323. }
  324. .h1 {
  325. padding: 20rpx 0 20rpx 0;
  326. }
  327. .main {
  328. width: 100%;
  329. background: url('https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/complain/2024-02-27/1709013363812-0') #F6F7FA no-repeat;
  330. background-size: 100% 600rpx;
  331. .TopCon {
  332. width: 100%;
  333. // height: 120rpx;
  334. .flex-b {
  335. display: flex;
  336. height: 100%;
  337. height: 72rpx;
  338. margin-bottom: 20rpx;
  339. }
  340. .adrsCon {
  341. display: flex;
  342. align-items: center;
  343. width: 180rpx;
  344. height: 88rpx;
  345. .adrsIcon {
  346. width: 17rpx;
  347. height: 17rpx;
  348. margin-top: 4rpx;
  349. }
  350. .adr {
  351. padding-right: 14rpx;
  352. font-size: 28rpx;
  353. color: #fff;
  354. }
  355. }
  356. .searchCon {
  357. flex:1;
  358. }
  359. .scan {
  360. width: 100rpx;
  361. height: 100%;
  362. display: flex;
  363. justify-content: flex-end;
  364. align-items: center;
  365. image {
  366. width: 52rpx;
  367. height: 52rpx;
  368. }
  369. }
  370. }
  371. .bannerCon {
  372. border-radius: 20rpx;
  373. margin-bottom: 20rpx;
  374. overflow: hidden;
  375. }
  376. .card {
  377. background: #FFFFFF;
  378. border-radius: 16rpx;
  379. margin-bottom: 20rpx;
  380. padding: 0 20rpx;
  381. .ul {
  382. height: 164rpx;
  383. display: flex;
  384. justify-content: space-between;
  385. align-items: center;
  386. .li {
  387. flex: 1;
  388. display: flex;
  389. align-items: center;
  390. flex-direction: column;
  391. .icon {
  392. width: 72rpx;
  393. height: 72rpx;
  394. }
  395. .name {
  396. font-size: 26rpx;
  397. color: #333;
  398. padding-top: 20rpx;
  399. text-align: center;
  400. }
  401. }
  402. }
  403. }
  404. }
  405. .tabs {
  406. display: flex;
  407. }
  408. .severCon {
  409. display: flex;
  410. align-items: center;
  411. justify-content: space-between;
  412. padding: 20rpx 0rpx 20rpx 0rpx;
  413. }
  414. .severItem {
  415. width: 320rpx;
  416. height: 186rpx;
  417. background: url('../../../static/images/indexIcon/xccard.png') no-repeat;
  418. background-size: 100% 100%;
  419. padding: 30rpx 20rpx;
  420. font-size: 24rpx;
  421. color: #fff;
  422. &.tow {
  423. background: url('../../../static/images/indexIcon/zxcard.png') no-repeat;
  424. background-size: 100% 100%;
  425. .go {
  426. background: #2AB188;
  427. }
  428. }
  429. .tit {
  430. font-size: 32rpx;
  431. }
  432. .tps {
  433. opacity: 0.8;
  434. margin: 12rpx 0;
  435. }
  436. .go {
  437. width: 70rpx;
  438. height: 38rpx;
  439. background: #1A61FB;
  440. border-radius: 10rpx;
  441. display: flex;
  442. align-items: center;
  443. .goTxt {
  444. padding-left: 4rpx;
  445. }
  446. }
  447. }
  448. .ul3 {
  449. display: flex;
  450. margin: 20rpx 0;
  451. }
  452. </style>