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

530 lines
13 KiB

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
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
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="scanCodeFn">
  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" @click="$goPage('/pages/indexEntry/iIndustryInfo/detail/detail?id='+ item.id)">
  30. <view class="swiper-item" :class="'swiper-item' + index">
  31. <view class="imgBox">
  32. <image :src="item.picture" 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">
  53. <view class="h1_row">
  54. <view class="h1" style="margin: 28rpx 0;"><text class="active">优质驾校</text></view>
  55. <moreRight text="查看全部"/>
  56. </view>
  57. <view class="li" v-for="(item,index) in 3" :key="index">
  58. <schoolItem :item="{}"/>
  59. </view>
  60. </view>
  61. <!-- 推荐教练 -->
  62. <view class="coachCon">
  63. <view class="h1_row">
  64. <view class="h1" style="margin: 28rpx 0;"><text class="active">推荐教练</text></view>
  65. <moreRight text="查看全部"/>
  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 6" :key="item">
  70. <coachItem/>
  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 "><text class="active">行业资讯</text></view>
  80. <view class="h1"><text>政策法规</text></view>
  81. </view>
  82. <moreRight text="查看全部"/>
  83. </view>
  84. <view class="ul2">
  85. <view class="li2" v-for="(item,index) in 3" :key="index">
  86. <informaItem/>
  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 } from '@/config/api.js'
  121. import schoolItem from './comp/schoolItem'
  122. import informaItem from './comp/informaItem'
  123. import coachItem from './comp/coachItem'
  124. export default {
  125. components: { schoolItem, informaItem, coachItem },
  126. data() {
  127. return {
  128. showPrivacy: false,
  129. imgUrl: imgUrl+'banner.png',
  130. backgroundSize: '100% 100%',
  131. keywords: '',
  132. entrySection: [{
  133. text: '学车报名',
  134. icon: require('../../../static/images/indexIcon/entryIcon (3).png'),
  135. url: '/pages/indexEntry/enroll/enroll',
  136. goPage: function (){
  137. console.log(666)
  138. // this.$goPage(item.url)
  139. }
  140. },
  141. {
  142. text: '找驾校',
  143. icon: require('../../../static/images/indexIcon/entryIcon (4).png'),
  144. url: '/pages/indexEntry/findShcool/findShcool',
  145. goPage: (item)=>{
  146. this.$goPage(item.url)
  147. }
  148. },
  149. {
  150. text: '找教练',
  151. icon: require('../../../static/images/indexIcon/entryIcon (1).png'),
  152. url: '/pages/indexEntry/examines/examines',
  153. goPage: ((item)=>{
  154. this.$goPage(item.url)
  155. })
  156. },
  157. {
  158. text: '签到签退',
  159. icon: require('../../../static/images/indexIcon/entryIcon (5).png'),
  160. goPage: ((item)=>{
  161. this.$u.toast('正在开发中,敬请期待...')
  162. })
  163. },
  164. {
  165. text: '理论学习',
  166. icon: require('../../../static/images/indexIcon/entryIcon (2).png'),
  167. url: '/pages/carEntry/simulateAppointment/simulateAppointment',
  168. goPage: ((item)=>{
  169. this.$goPage(item.url)
  170. })
  171. },
  172. ],
  173. serviceSector: [{
  174. text: '学车指南',
  175. tps: '政府平台 一站服务',
  176. icon: require('../../../static/images/index/img_1@2x.png'),
  177. url: '/pages/indexEntry/parse/parse'
  178. },
  179. {
  180. text: '公益视频',
  181. tps: '立体呈现 学驾无忧',
  182. icon: require('../../../static/images/index/img_2@2x.png'),
  183. url: '/pages/indexEntry/publicVideo/publicVideo'
  184. },
  185. {
  186. text: '合格率排行',
  187. tps: '官方数据 阳光透明',
  188. icon: require('../../../static/images/index/img_3@2x.png'),
  189. url: '/pages/indexEntry/credit/credit?type=1'
  190. },
  191. {
  192. text: '行业政策',
  193. tps: '权威发布 精准解读',
  194. icon: require('../../../static/images/index/img_4@2x.png'),
  195. url: '/pages/indexEntry/industryPolicy/industryPolicy'
  196. },
  197. {
  198. text: '质量信誉排行',
  199. tps: '官方数据 阳光透明',
  200. icon: require('../../../static/images/index/img_5@2x.png'),
  201. url: '/pages/indexEntry/credit/credit'
  202. },
  203. {
  204. text: '咨询投诉',
  205. tps: '畅达沟通 听取民声',
  206. icon: require('../../../static/images/index/img_6@2x.png'),
  207. url: '/pages/indexEntry/consult/consult'
  208. },
  209. {
  210. text: '满分学习考试',
  211. tps: '网络教育 数据联网',
  212. icon: require('../../../static/images/index/img_7@2x.png'),
  213. url: ''
  214. },
  215. {
  216. text: '送考卷下乡',
  217. tps: '便民利民 就近考试',
  218. icon: require('../../../static/images/index/img_8@2x.png'),
  219. url: ''
  220. },
  221. ],
  222. swiperDotIndex: 0,
  223. current: 1,
  224. mode: 'default',
  225. swiperInfo: [
  226. {picture: require('../../../static/images/bigImg/banner.jpg')},
  227. {picture: require('../../../static/images/bigImg/banner2.jpg')}
  228. ],
  229. dotsStyles: {
  230. backgroundColor: '#E8E9EC',
  231. border: '1px #E8E9EC solid',
  232. color: '#fff',
  233. selectedBackgroundColor: '#1989FA',
  234. selectedBorder: '1px #1989FA solid'
  235. },
  236. bgColor: 'transparent'
  237. }
  238. },
  239. async onLoad() {
  240. // this.getarticleListFn()
  241. // uni.getLocation({
  242. // type: 'wgs84',
  243. // success: function (res) {
  244. // console.log('当前位置的经度:' + res.longitude);
  245. // console.log('当前位置的纬度:' + res.latitude);
  246. // },
  247. // fail(err) {
  248. // console.log(err)
  249. // }
  250. // });
  251. if(!this.$store.state.user.vuex_cityInfo.lat) {
  252. await this.$store.dispatch('getCity')
  253. }
  254. // console.log(this.$store.state.user.vuex_cityInfo)
  255. },
  256. onPullDownRefresh() {
  257. },
  258. onShow() {
  259. this.$store.dispatch('getUserInfo')
  260. if(!this.swiperInfo.length) {
  261. // this.getarticleListFn()
  262. }
  263. this.getarticleListFn()
  264. },
  265. computed: {
  266. },
  267. methods: {
  268. async entrySectionClick(item) {
  269. if(item.text=='我要报名') {
  270. return this.$u.utils.clickSignUp()
  271. }
  272. if(item.text=='找驾驶馆') {
  273. const res = await this.$store.dispatch('checkLogin')
  274. if(!res) return
  275. if(!this.vuex_userInfo.schoolId) return this.$u.toast('您不是平台学员')
  276. }
  277. this.$goPage(item.url)
  278. },
  279. async getarticleListFn() {
  280. const {data: res} = await getarticleList(this.params)
  281. // this.swiperInfo = res.list[0].articleManagementDO
  282. },
  283. async refereshFn() {
  284. const res = await this.$store.dispatch('refreshToken')
  285. console.log(res)
  286. uni.$u.http.setConfig((config) => {
  287. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  288. console.log(111)
  289. return config
  290. })
  291. console.log(222)
  292. // this.$store.dispatch('getUserInfo')
  293. },
  294. close() {
  295. },
  296. goPageSection(item) {
  297. uni.navigateTo({
  298. url:item.url
  299. })
  300. },
  301. // 扫码
  302. scanCodeFn() {
  303. let _this = this
  304. uni.scanCode({
  305. success: function(res) {
  306. console.log('条码类型:' + res.scanType);
  307. console.log('条码内容6:' + res.result);
  308. let obj = JSON.parse(res.result)
  309. // 扫教练码去报名的
  310. if(obj.coachId) {
  311. obj.nickname = decodeURIComponent(obj.nickname)
  312. obj.schoolName = decodeURIComponent(obj.schoolName)
  313. let item = {
  314. schoolName: obj.schoolName,
  315. schoolId: obj.schoolId,
  316. name: obj.nickname,
  317. id: obj.coachId
  318. }
  319. console.log('***********')
  320. console.log(item)
  321. _this.$store.commit('upDateSchoolClass', {})
  322. _this.$store.commit('upDateSchoolCoach', item)
  323. _this.$goPage('/pages/indexEntry/enroll/enroll')
  324. }
  325. // _this.$store.commit('updateWebVeiwUrl', res.result)
  326. // uni.navigateTo({
  327. // url: '/pages/other/webView/webView'
  328. // })
  329. }
  330. });
  331. },
  332. clickItem(e) {
  333. this.swiperDotIndex = e
  334. },
  335. change(e) {
  336. this.current = e.detail.current
  337. },
  338. goPage() {
  339. uni.navigateTo({
  340. url: '/pages/userCenter/login/loginByPhone'
  341. })
  342. },
  343. initFn() {
  344. uni.requestSubscribeMessage({
  345. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  346. success(res) {
  347. console.log('消息是否有权限呢')
  348. console.log(res)
  349. }
  350. })
  351. }
  352. }
  353. }
  354. </script>
  355. <style lang="scss" scoped>
  356. .h1_row {
  357. display: flex;
  358. align-items: center;
  359. justify-content: space-between;
  360. padding-right: 20rpx;
  361. }
  362. .h1 {
  363. padding-top: 10rpx;
  364. .active {
  365. &::before {
  366. background: url('../../../static/images/icon/h1Active.png') #F6F7FA no-repeat;
  367. background-size: 52rpx 12rpx;
  368. }
  369. }
  370. }
  371. .ul2 {
  372. padding: 10rpx 20rpx 0 20rpx;
  373. }
  374. .main {
  375. width: 100%;
  376. background: url('../../../static/images/bigImg/homeBg.png') #F6F7FA no-repeat;
  377. background-size: 100% 600rpx;
  378. .TopCon {
  379. width: 100%;
  380. // height: 120rpx;
  381. .flex-b {
  382. display: flex;
  383. height: 100%;
  384. height: 72rpx;
  385. margin-bottom: 20rpx;
  386. }
  387. .adrsCon {
  388. display: flex;
  389. align-items: center;
  390. width: 180rpx;
  391. height: 88rpx;
  392. .adrsIcon {
  393. width: 17rpx;
  394. height: 17rpx;
  395. margin-top: 4rpx;
  396. }
  397. .adr {
  398. padding-right: 14rpx;
  399. font-size: 28rpx;
  400. color: #fff;
  401. }
  402. }
  403. .searchCon {
  404. flex:1;
  405. }
  406. .scan {
  407. width: 100rpx;
  408. height: 100%;
  409. display: flex;
  410. justify-content: flex-end;
  411. align-items: center;
  412. image {
  413. width: 52rpx;
  414. height: 52rpx;
  415. }
  416. }
  417. }
  418. .bannerCon {
  419. border-radius: 20rpx;
  420. margin-bottom: 20rpx;
  421. overflow: hidden;
  422. }
  423. .card {
  424. background: #FFFFFF;
  425. border-radius: 16rpx;
  426. margin-bottom: 20rpx;
  427. .ul {
  428. height: 164rpx;
  429. display: flex;
  430. justify-content: space-between;
  431. align-items: center;
  432. padding: 0 20rpx;
  433. .li {
  434. flex: 1;
  435. display: flex;
  436. align-items: center;
  437. flex-direction: column;
  438. .icon {
  439. width: 72rpx;
  440. height: 72rpx;
  441. }
  442. .name {
  443. font-size: 26rpx;
  444. color: #333;
  445. padding-top: 20rpx;
  446. text-align: center;
  447. }
  448. }
  449. }
  450. }
  451. }
  452. .tabs {
  453. display: flex;
  454. padding: 20rpx 0 10rpx 0;
  455. }
  456. .severCon {
  457. display: flex;
  458. align-items: center;
  459. justify-content: space-between;
  460. padding: 40rpx 20rpx 20rpx 20rpx;
  461. }
  462. .severItem {
  463. width: 320rpx;
  464. height: 186rpx;
  465. background: url('../../../static/images/indexIcon/xccard.png') no-repeat;
  466. background-size: 100% 100%;
  467. padding: 30rpx 20rpx;
  468. font-size: 24rpx;
  469. color: #fff;
  470. &.tow {
  471. background: url('../../../static/images/indexIcon/zxcard.png') no-repeat;
  472. background-size: 100% 100%;
  473. .go {
  474. background: #2AB188;
  475. }
  476. }
  477. .tit {
  478. font-size: 32rpx;
  479. }
  480. .tps {
  481. opacity: 0.8;
  482. margin: 12rpx 0;
  483. }
  484. .go {
  485. width: 70rpx;
  486. height: 38rpx;
  487. background: #1A61FB;
  488. border-radius: 10rpx;
  489. display: flex;
  490. align-items: center;
  491. .goTxt {
  492. padding-left: 4rpx;
  493. }
  494. }
  495. }
  496. .ul3 {
  497. display: flex;
  498. margin-bottom: 20rpx;
  499. }
  500. </style>