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

469 lines
12 KiB

10 months ago
10 months ago
8 months ago
8 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
10 months ago
10 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
10 months ago
10 months ago
10 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
9 months ago
10 months ago
9 months ago
9 months ago
9 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
9 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
8 months ago
10 months ago
9 months ago
10 months ago
8 months ago
10 months ago
7 months ago
8 months ago
7 months ago
8 months ago
9 months ago
7 months ago
9 months ago
10 months ago
9 months ago
9 months ago
7 months ago
10 months ago
9 months ago
9 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" :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="recommendSchool.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" v-if="coachList.length">
  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. },
  138. {
  139. text: '找驾校',
  140. icon: require('../../../static/images/indexIcon/entryIcon (4).png'),
  141. url: '/pages/indexEntry/findShcool/findShcool',
  142. },
  143. {
  144. text: '找教练',
  145. icon: require('../../../static/images/indexIcon/entryIcon (1).png'),
  146. url: '/pages/indexEntry/findCoach/findCoach',
  147. },
  148. {
  149. text: '签到签退',
  150. icon: require('../../../static/images/indexIcon/entryIcon (5).png'),
  151. url: '/pages/indexEntry/signIn/signIn',
  152. },
  153. {
  154. text: '理论学习',
  155. icon: require('../../../static/images/indexIcon/entryIcon (2).png'),
  156. url: '/pages/indexEntry/theory/theory',
  157. },
  158. ],
  159. swiperDotIndex: 0,
  160. current: 1,
  161. mode: 'default',
  162. swiperInfo: [],
  163. dotsStyles: {
  164. backgroundColor: '#E8E9EC',
  165. border: '1px #E8E9EC solid',
  166. color: '#fff',
  167. selectedBackgroundColor: '#1989FA',
  168. selectedBorder: '1px #1989FA solid'
  169. },
  170. bgColor: 'transparent',
  171. informList: [],
  172. informa: 1,
  173. coachList: [],//推荐教练
  174. recommendSchool: [],//推荐驾校
  175. }
  176. },
  177. async onLoad() {
  178. },
  179. onPullDownRefresh() {
  180. this.initApi()
  181. },
  182. onShow() {
  183. if(!this.vuex_cityInfo.lat) {
  184. this.$store.dispatch('getCity')
  185. }
  186. let token = this.$store.state.user.vuex_loginInfo.accessToken
  187. if(token) {
  188. this.$store.dispatch('getUserInfo')
  189. }
  190. if(!this.swiperInfo.length) {
  191. this.getBannerListFn()
  192. // this.getarticleListFn()
  193. }
  194. this.initApi()
  195. },
  196. computed: {
  197. },
  198. methods: {
  199. // 点击海报图
  200. bannerClick(item) {
  201. let link = item.jumpPath
  202. console.log(link)
  203. if(!link) return false
  204. this.$store.commit('updateWebVeiwUrl', link)
  205. this.$goPage('/pages/indexEntry/webView/webView')
  206. },
  207. initApi() {
  208. this.getarticleListFn()
  209. this.getRecommendList()
  210. this.recommendSchoolList()
  211. },
  212. goCoachDetail(item) {
  213. let objStr = encodeURIComponent(JSON.stringify(item))
  214. this.$goPage('/pages/indexEntry/findShcool/coachComment/coachComment?item='+ objStr)
  215. },
  216. // 推荐教练
  217. async getRecommendList() {
  218. const {data: res} = await getRecommendList({pageNo:1,pageSize: 20, })
  219. this.coachList = res
  220. console.log(res)
  221. },
  222. // 推荐驾校
  223. async recommendSchoolList() {
  224. if(!this.vuex_cityInfo.lat) {
  225. await this.$store.dispatch('getCity')
  226. }
  227. const {data: res} = await recommendSchoolList({pageNo:1,pageSize: 3, lat: this.vuex_cityInfo.lat||'', lng: this.vuex_cityInfo.lng||''})
  228. this.recommendSchool = res
  229. console.log(res)
  230. },
  231. async getBannerListFn() {
  232. const {data: res} = await getBannerList()
  233. this.swiperInfo = res.list
  234. console.log(this.swiperInfo)
  235. },
  236. async entrySectionClick(item) {
  237. if(item.text=='学车报名') {
  238. this.$store.commit('upDateSchoolCoach', {})
  239. this.$store.commit('upDateSchoolClass', {})
  240. this.$store.commit('updateSchool', {})
  241. return this.$u.utils.clickSignUp()
  242. }else if(item.text=='签到签退') {
  243. if(this.vuex_userInfo.applyStep<6) return this.$u.toast('请先报名学员')
  244. }
  245. this.$goPage(item.url)
  246. },
  247. changeInforma(val) {
  248. if(this.informa == val) return
  249. this.informa = val
  250. this.getarticleListFn()
  251. },
  252. // 行业资讯
  253. async getarticleListFn() {
  254. const {data: res} = await getarticlezcList({pageSize: 3, type: this.informa})
  255. this.informList = res.list
  256. },
  257. async refereshFn() {
  258. const res = await this.$store.dispatch('refreshToken')
  259. console.log(res)
  260. uni.$u.http.setConfig((config) => {
  261. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  262. console.log(111)
  263. return config
  264. })
  265. console.log(222)
  266. // this.$store.dispatch('getUserInfo')
  267. },
  268. close() {
  269. },
  270. goPageSection(item) {
  271. uni.navigateTo({
  272. url:item.url
  273. })
  274. },
  275. // 扫码
  276. scanCodeClick() {
  277. scanCodeFn(this)
  278. },
  279. clickItem(e) {
  280. this.swiperDotIndex = e
  281. },
  282. change(e) {
  283. this.current = e.detail.current
  284. },
  285. goPage() {
  286. uni.navigateTo({
  287. url: '/pages/userCenter/login/loginByPhone'
  288. })
  289. },
  290. initFn() {
  291. uni.requestSubscribeMessage({
  292. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  293. success(res) {
  294. console.log('消息是否有权限呢')
  295. console.log(res)
  296. }
  297. })
  298. }
  299. }
  300. }
  301. </script>
  302. <style lang="scss" scoped>
  303. .h1_row {
  304. display: flex;
  305. align-items: center;
  306. justify-content: space-between;
  307. }
  308. .h1 {
  309. padding: 20rpx 0 20rpx 0;
  310. }
  311. .main {
  312. width: 100%;
  313. background: url('https://jiangxijiakao-1.oss-cn-hangzhou.aliyuncs.com/complain/2024-02-27/1709013363812-0') #F6F7FA no-repeat;
  314. background-size: 100% 600rpx;
  315. .TopCon {
  316. width: 100%;
  317. // height: 120rpx;
  318. .flex-b {
  319. display: flex;
  320. height: 100%;
  321. height: 72rpx;
  322. margin-bottom: 20rpx;
  323. }
  324. .adrsCon {
  325. display: flex;
  326. align-items: center;
  327. width: 180rpx;
  328. height: 88rpx;
  329. .adrsIcon {
  330. width: 17rpx;
  331. height: 17rpx;
  332. margin-top: 4rpx;
  333. }
  334. .adr {
  335. padding-right: 14rpx;
  336. font-size: 28rpx;
  337. color: #fff;
  338. }
  339. }
  340. .searchCon {
  341. flex:1;
  342. }
  343. .scan {
  344. width: 100rpx;
  345. height: 100%;
  346. display: flex;
  347. justify-content: flex-end;
  348. align-items: center;
  349. image {
  350. width: 52rpx;
  351. height: 52rpx;
  352. }
  353. }
  354. }
  355. .bannerCon {
  356. border-radius: 20rpx;
  357. margin-bottom: 20rpx;
  358. overflow: hidden;
  359. }
  360. .card {
  361. background: #FFFFFF;
  362. border-radius: 16rpx;
  363. margin-bottom: 20rpx;
  364. padding: 0 20rpx;
  365. .ul {
  366. height: 164rpx;
  367. display: flex;
  368. justify-content: space-between;
  369. align-items: center;
  370. .li {
  371. flex: 1;
  372. display: flex;
  373. align-items: center;
  374. flex-direction: column;
  375. .icon {
  376. width: 72rpx;
  377. height: 72rpx;
  378. }
  379. .name {
  380. font-size: 26rpx;
  381. color: #333;
  382. padding-top: 20rpx;
  383. text-align: center;
  384. }
  385. }
  386. }
  387. }
  388. }
  389. .tabs {
  390. display: flex;
  391. }
  392. .severCon {
  393. display: flex;
  394. align-items: center;
  395. justify-content: space-between;
  396. padding: 20rpx 0rpx 20rpx 0rpx;
  397. }
  398. .severItem {
  399. width: 320rpx;
  400. height: 186rpx;
  401. background: url('../../../static/images/indexIcon/xccard.png') no-repeat;
  402. background-size: 100% 100%;
  403. padding: 30rpx 20rpx;
  404. font-size: 24rpx;
  405. color: #fff;
  406. &.tow {
  407. background: url('../../../static/images/indexIcon/zxcard.png') no-repeat;
  408. background-size: 100% 100%;
  409. .go {
  410. background: #2AB188;
  411. }
  412. }
  413. .tit {
  414. font-size: 32rpx;
  415. }
  416. .tps {
  417. opacity: 0.8;
  418. margin: 12rpx 0;
  419. }
  420. .go {
  421. width: 70rpx;
  422. height: 38rpx;
  423. background: #1A61FB;
  424. border-radius: 10rpx;
  425. display: flex;
  426. align-items: center;
  427. .goTxt {
  428. padding-left: 4rpx;
  429. }
  430. }
  431. }
  432. .ul3 {
  433. display: flex;
  434. margin: 20rpx 0;
  435. }
  436. </style>