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

674 lines
17 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 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 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 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 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 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 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
12 months 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 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="main pageBg">
  3. <!-- <button @click="$goPage('/pages/userCenter/login/face')">进入人脸识别</button> -->
  4. <view style="background-color: #2170FD; width: 100%;height: 20rpx;"></view>
  5. <!-- <u-navbar title=" " :bgColor="bgColor" :autoBack="false">
  6. <view class="" slot="left">
  7. <view class="flex">
  8. <view class="adrsIcon">
  9. <image src="@/static/images/index/dingwei.png" mode=""></image>
  10. </view>
  11. <view class="adr">{{ vuex_cityInfo.city }} </view>
  12. </view>
  13. </view>
  14. <view class="rightScan" slot="right">
  15. <view class="scan" @click="scanCodeFn">
  16. <image src="@/static/images/index/scan.png" mode=""></image>
  17. </view>
  18. </view>
  19. </u-navbar> -->
  20. <!-- <button @click="refereshFn">刷新token</button> -->
  21. <view class="TopCon" :style="{ backgroundImage: `url(${imgUrl})`, backgroundSize: backgroundSize }">
  22. <view class="status_bar"></view>
  23. <!-- 地址扫一扫 -->
  24. <!-- #ifdef MP-WEIXIN -->
  25. <view class="flex-b">
  26. <view class="flex">
  27. <view class="adrsIcon">
  28. <image src="@/static/images/index/dingwei.png" mode=""></image>
  29. </view>
  30. <view class="adr">{{ vuex_cityInfo.city || '杭州' }} </view>
  31. </view>
  32. <view class="scan" @click="scanCodeFn">
  33. <image src="@/static/images/index/scan.png" mode=""></image>
  34. </view>
  35. </view>
  36. <!-- #endif -->
  37. <!-- 搜索 -->
  38. <view class="searchCon" @click.capture="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')">
  39. <searchRow placeholder="搜索驾校、教练…" :disable="true"></searchRow>
  40. </view>
  41. </view>
  42. <view class="pad">
  43. <!-- 精钢区 -->
  44. <view class="card traTop">
  45. <view class="ul">
  46. <view class="li" v-for="(item,index) in entrySection" :key="index" @tap="entrySectionClick(item)">
  47. <view class="icon">
  48. <image :src="item.icon" mode=""></image>
  49. </view>
  50. <view class="name">{{ item.text }}</view>
  51. </view>
  52. </view>
  53. </view>
  54. <!-- 更多入口 -->
  55. <view class="card">
  56. <view class="ul3">
  57. <view class="li3" v-for="(item,index) in moreSection" :key="index" @click="goPageSection(item)">
  58. <view class="icon">
  59. <image :src="item.icon" mode=""></image>
  60. </view>
  61. <view class="name">{{ item.text }}</view>
  62. </view>
  63. </view>
  64. </view>
  65. <!-- 行业资讯 -->
  66. <view class="card">
  67. <view class="information">
  68. <view class="flex-b border">
  69. <view class="h1">行业资讯</view>
  70. <view class="more" @click="$goPage('/pages/indexEntry/iIndustryInfo/iIndustryInfo')">
  71. <view class="text">更多</view>
  72. <view class="icon">
  73. <u-icon name="arrow-right"></u-icon>
  74. </view>
  75. </view>
  76. </view>
  77. <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="swiperInfo" v-if="swiperInfo.length"
  78. :current="current" :mode="mode" style="height: 230rpx;" :dots-styles="dotsStyles"
  79. field="content">
  80. <swiper class="swiper-box" @change="change" :current="swiperDotIndex" style="height: 230rpx;">
  81. <swiper-item v-for="(item, index) in swiperInfo" :key="index" @click="$goPage('/pages/indexEntry/iIndustryInfo/detail/detail?id='+ item.id)">
  82. <view class="swiper-item" :class="'swiper-item' + index">
  83. <view class="flex-b">
  84. <view class="imgBox">
  85. <image :src="item.picture" mode="aspectFill"></image>
  86. </view>
  87. <view class="rightText">
  88. <view class="text towRowText">{{ item.title }}</view>
  89. <view class="date">{{ $u.timeFormat(item.createTime, 'yyyy/mm/dd') }}</view>
  90. </view>
  91. </view>
  92. </view>
  93. </swiper-item>
  94. </swiper>
  95. </uni-swiper-dot>
  96. </view>
  97. </view>
  98. <!-- 服务专区 -->
  99. <view class="card serviceCon">
  100. <view class="h1">服务专区</view>
  101. <view class="ul2">
  102. <view class="li2" v-for="(item,index) in serviceSector" :key="index" :class="'li2Bg' + index" @click="goServiceSector(item)">
  103. <view class="icon">
  104. <image :src="item.icon" mode=""></image>
  105. </view>
  106. <view class="textCon">
  107. <view class="text">{{ item.text }}</view>
  108. <view class="tps">{{ item.tps}}</view>
  109. </view>
  110. </view>
  111. </view>
  112. </view>
  113. <view style="height: 20rpx;width: 100%;"></view>
  114. </view>
  115. <u-popup :show="showPrivacy" mode="center" :round="20" >
  116. <privacyPopup @disagree="showPrivacy=false" @agree="showPrivacy=false"></privacyPopup>
  117. </u-popup>
  118. </view>
  119. </template>
  120. <script>
  121. import { imgUrl } from '@/config/site.config'
  122. import { getarticleList } from '@/config/api.js'
  123. export default {
  124. data() {
  125. return {
  126. showPrivacy: false,
  127. imgUrl: imgUrl+'banner.png',
  128. backgroundSize: '100% 100%',
  129. keywords: '',
  130. entrySection: [{
  131. text: '我要报名',
  132. icon: require('../../../static/images/index/ic_baoming.png'),
  133. url: '/pages/indexEntry/enroll/enroll',
  134. goPage: function (){
  135. console.log(666)
  136. // this.$goPage(item.url)
  137. }
  138. },
  139. {
  140. text: '找驾校',
  141. icon: require('../../../static/images/index/ic_jiaxiao.png'),
  142. url: '/pages/indexEntry/findShcool/findShcool',
  143. goPage: (item)=>{
  144. this.$goPage(item.url)
  145. }
  146. },
  147. {
  148. text: '找考场',
  149. icon: require('../../../static/images/index/ic_kaochang.png'),
  150. url: '/pages/indexEntry/examines/examines',
  151. goPage: ((item)=>{
  152. this.$goPage(item.url)
  153. })
  154. },
  155. {
  156. text: '找驾驶馆',
  157. icon: require('../../../static/images/index/ic_jsg.png'),
  158. url: '/pages/carEntry/simulateAppointment/simulateAppointment',
  159. goPage: ((item)=>{
  160. this.$goPage(item.url)
  161. })
  162. },
  163. {
  164. text: '找陪练',
  165. icon: require('../../../static/images/index/ic_peilian.png'),
  166. goPage: ((item)=>{
  167. this.$u.toast('正在开发中,敬请期待...')
  168. })
  169. },
  170. {
  171. text: '理论学习',
  172. icon: require('../../../static/images/index/ic_lilun.png'),
  173. url: '/pages/indexEntry/theory/theory',
  174. goPage: ((item)=>{
  175. this.$goPage(item.url)
  176. })
  177. },
  178. ],
  179. moreSection: [{
  180. text: '摩托车业务',
  181. icon: require('../../../static/images/index/btn_motuoche.png'),
  182. url: '/pages/indexEntry/enroll/enroll'
  183. },
  184. {
  185. text: '考试预约',
  186. icon: require('../../../static/images/index/btn_yuyue.png'),
  187. url: '/pages/indexEntry/findShcool/findShcool'
  188. },
  189. {
  190. text: '交通求助',
  191. icon: require('../../../static/images/index/btn_jiuzhu.png'),
  192. url: '/pages/indexEntry/examines/examines'
  193. },
  194. {
  195. text: '学驾保险',
  196. icon: require('../../../static/images/index/btn_baoxian.png'),
  197. },
  198. {
  199. text: '更多',
  200. icon: require('../../../static/images/index/btn_gengduo.png'),
  201. url: '/pages/indexEntry/theory/theory'
  202. },
  203. ],
  204. serviceSector: [{
  205. text: '学车指南',
  206. tps: '政府平台 一站服务',
  207. icon: require('../../../static/images/index/img_1@2x.png'),
  208. url: '/pages/indexEntry/parse/parse'
  209. },
  210. {
  211. text: '公益视频',
  212. tps: '立体呈现 学驾无忧',
  213. icon: require('../../../static/images/index/img_2@2x.png'),
  214. url: '/pages/indexEntry/publicVideo/publicVideo'
  215. },
  216. {
  217. text: '合格率排行',
  218. tps: '官方数据 阳光透明',
  219. icon: require('../../../static/images/index/img_3@2x.png'),
  220. url: '/pages/indexEntry/credit/credit?type=1'
  221. },
  222. {
  223. text: '行业政策',
  224. tps: '权威发布 精准解读',
  225. icon: require('../../../static/images/index/img_4@2x.png'),
  226. url: '/pages/indexEntry/industryPolicy/industryPolicy'
  227. },
  228. {
  229. text: '质量信誉排行',
  230. tps: '官方数据 阳光透明',
  231. icon: require('../../../static/images/index/img_5@2x.png'),
  232. url: '/pages/indexEntry/credit/credit'
  233. },
  234. {
  235. text: '咨询投诉',
  236. tps: '畅达沟通 听取民声',
  237. icon: require('../../../static/images/index/img_6@2x.png'),
  238. url: '/pages/indexEntry/consult/consult'
  239. },
  240. {
  241. text: '满分学习考试',
  242. tps: '网络教育 数据联网',
  243. icon: require('../../../static/images/index/img_7@2x.png'),
  244. url: ''
  245. },
  246. {
  247. text: '送考卷下乡',
  248. tps: '便民利民 就近考试',
  249. icon: require('../../../static/images/index/img_8@2x.png'),
  250. url: ''
  251. },
  252. ],
  253. swiperDotIndex: 0,
  254. current: 1,
  255. mode: 'default',
  256. swiperInfo: [],
  257. dotsStyles: {
  258. backgroundColor: '#E8E9EC',
  259. border: '1px #E8E9EC solid',
  260. color: '#fff',
  261. selectedBackgroundColor: '#1989FA',
  262. selectedBorder: '1px #1989FA solid'
  263. },
  264. bgColor: 'transparent'
  265. }
  266. },
  267. async onLoad() {
  268. // this.getarticleListFn()
  269. // uni.getLocation({
  270. // type: 'wgs84',
  271. // success: function (res) {
  272. // console.log('当前位置的经度:' + res.longitude);
  273. // console.log('当前位置的纬度:' + res.latitude);
  274. // },
  275. // fail(err) {
  276. // console.log(err)
  277. // }
  278. // });
  279. if(!this.$store.state.user.vuex_cityInfo.lat) {
  280. await this.$store.dispatch('getCity')
  281. }
  282. // console.log(this.$store.state.user.vuex_cityInfo)
  283. },
  284. onPullDownRefresh() {
  285. this.getarticleListFn()
  286. },
  287. onShow() {
  288. this.$store.dispatch('getUserInfo')
  289. if(!this.swiperInfo.length) {
  290. this.getarticleListFn()
  291. }
  292. },
  293. computed: {
  294. },
  295. methods: {
  296. async entrySectionClick(item) {
  297. if(item.text=='我要报名') {
  298. let token = this.$store.state.user.vuex_loginInfo.accessToken
  299. if(!token) {
  300. this.$store.commit('goLogin')
  301. return
  302. }
  303. // this.$goPage(item.url)
  304. this.$store.commit('updateNonPlatformStudent', false)
  305. if(this.vuex_userInfo.applyStep==3) {
  306. return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  307. }
  308. // 去填表
  309. if(this.vuex_userInfo.applyStep==2) {
  310. return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  311. }
  312. // 去支付
  313. if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) {
  314. return this.$goPage('/pages/indexEntry/enroll/payment/payment')
  315. }
  316. }
  317. if(item.text=='找驾驶馆') {
  318. const res = await this.$store.dispatch('checkLogin')
  319. if(!res) return
  320. }
  321. this.$goPage(item.url)
  322. },
  323. async goServiceSector(item) {
  324. if(item.text=='咨询投诉') {
  325. const res = this.$store.dispatch('checkLogin')
  326. if(!res) return
  327. }
  328. this.$goPage(item.url)
  329. },
  330. async getarticleListFn() {
  331. const {data: res} = await getarticleList(this.params)
  332. this.swiperInfo = res.list[0].articleManagementDO
  333. },
  334. async refereshFn() {
  335. const res = await this.$store.dispatch('refreshToken')
  336. console.log(res)
  337. uni.$u.http.setConfig((config) => {
  338. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  339. console.log(111)
  340. return config
  341. })
  342. console.log(222)
  343. // this.$store.dispatch('getUserInfo')
  344. },
  345. close() {
  346. },
  347. goPageSection(item) {
  348. uni.navigateTo({
  349. url:item.url
  350. })
  351. },
  352. // 扫码
  353. scanCodeFn() {
  354. let _this = this
  355. uni.scanCode({
  356. success: function(res) {
  357. console.log('条码类型:' + res.scanType);
  358. console.log('条码内容6:' + res.result);
  359. let obj = JSON.parse(res.result)
  360. // 扫教练码去报名的
  361. if(obj.coachId) {
  362. obj.nickname = decodeURIComponent(obj.nickname)
  363. obj.schoolName = decodeURIComponent(obj.schoolName)
  364. let item = {
  365. schoolName: obj.schoolName,
  366. schoolId: obj.schoolId,
  367. name: obj.nickname,
  368. id: obj.coachId
  369. }
  370. console.log('***********')
  371. console.log(item)
  372. _this.$store.commit('upDateSchoolClass', {})
  373. _this.$store.commit('upDateSchoolCoach', item)
  374. _this.$goPage('/pages/indexEntry/enroll/enroll')
  375. }
  376. // _this.$store.commit('updateWebVeiwUrl', res.result)
  377. // uni.navigateTo({
  378. // url: '/pages/other/webView/webView'
  379. // })
  380. }
  381. });
  382. },
  383. clickItem(e) {
  384. this.swiperDotIndex = e
  385. },
  386. change(e) {
  387. this.current = e.detail.current
  388. },
  389. goPage() {
  390. uni.navigateTo({
  391. url: '/pages/userCenter/login/loginByPhone'
  392. })
  393. },
  394. initFn() {
  395. uni.requestSubscribeMessage({
  396. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  397. success(res) {
  398. console.log('消息是否有权限呢')
  399. console.log(res)
  400. }
  401. })
  402. }
  403. }
  404. }
  405. </script>
  406. <style lang="scss" scoped>
  407. .main {
  408. width: 100%;
  409. .flex {
  410. .adrsIcon {
  411. width: 26rpx;
  412. height: 38rpx;
  413. margin-top: 4rpx;
  414. }
  415. .adr {
  416. padding-left: 14rpx;
  417. font-size: 28rpx;
  418. color: #fff;
  419. }
  420. }
  421. .rightScan {
  422. padding-right: 190rpx;
  423. }
  424. .scan {
  425. width: 64rpx;
  426. height: 64rpx;
  427. }
  428. .TopCon {
  429. width: 100%;
  430. height: 476rpx;
  431. // background: url('../../../static/images/bigImg/index_banner.png') no-repeat;
  432. // background: url('http://192.168.1.20:81/zhili/image/20230809/e7086ccf82ed4aa09d156f2590a50fba.png') no-repeat;
  433. position: relative;
  434. .flex-b {
  435. padding: 10rpx 212rpx 0 50rpx;
  436. }
  437. .searchCon {
  438. position: absolute;
  439. left: 0;
  440. bottom: 68rpx;
  441. padding: 0 28rpx;
  442. width: 100%;
  443. }
  444. }
  445. .card {
  446. background: #FFFFFF;
  447. border-radius: 16rpx;
  448. margin-bottom: 20rpx;
  449. &.traTop {
  450. // transform: translateY(-40rpx);
  451. margin-top: -40rpx;
  452. position: relative;
  453. z-index: 9;
  454. }
  455. .ul {
  456. height: 236rpx;
  457. display: flex;
  458. justify-content: space-between;
  459. align-items: center;
  460. padding: 0 20rpx;
  461. .li {
  462. flex: 1;
  463. display: flex;
  464. align-items: center;
  465. flex-direction: column;
  466. .icon {
  467. width: 92rpx;
  468. height: 92rpx;
  469. }
  470. .name {
  471. font-size: 26rpx;
  472. color: #333;
  473. padding-top: 20rpx;
  474. text-align: center;
  475. }
  476. }
  477. }
  478. .ul3 {
  479. height: 128rpx;
  480. display: flex;
  481. justify-content: space-between;
  482. align-items: center;
  483. padding: 0 30rpx;
  484. border: 2rpx solid #E8E9EC;
  485. border-radius: 16rpx;
  486. .li3 {
  487. // flex: 1;
  488. display: flex;
  489. align-items: center;
  490. flex-direction: column;
  491. .icon {
  492. width: 52rpx;
  493. height: 52rpx;
  494. }
  495. .name {
  496. font-size: 22rpx;
  497. color: #686B73;
  498. padding-top: 2rpx;
  499. text-align: center;
  500. }
  501. }
  502. }
  503. }
  504. .information {
  505. padding: 0 20rpx;
  506. height: 320rpx;
  507. .border {
  508. height: 86rpx;
  509. border-bottom: 2px dashed #E8E9EC;
  510. .h1 {
  511. font-size: 28rpx;
  512. color: #333;
  513. }
  514. .more {
  515. font-size: 24rpx;
  516. display: flex;
  517. .text {
  518. // margin-right: 8rpx;
  519. color: #686B73;
  520. }
  521. }
  522. }
  523. .swiper-item {
  524. height: 148rpx;
  525. .flex-b {
  526. padding: 30rpx 0 28rpx 0;
  527. .imgBox {
  528. width: 184rpx;
  529. height: 148rpx;
  530. background: linear-gradient(180deg, rgba(0, 122, 255, 0.5) 0%, #007AFF 100%);
  531. border-radius: 6rpx;
  532. overflow: hidden;
  533. }
  534. .rightText {
  535. flex: 1;
  536. padding: 0 0 0 30rpx;
  537. height: 148rpx;
  538. display: flex;
  539. flex-direction: column;
  540. justify-content: space-between;
  541. .text {
  542. font-size: 24rpx;
  543. color: #333;
  544. }
  545. .date {
  546. text-align: right;
  547. font-size: 20rpx;
  548. color: #686B73;
  549. }
  550. }
  551. }
  552. }
  553. }
  554. .serviceCon {
  555. width: 100%;
  556. padding: 0 20rpx 20rpx 20rpx;
  557. .h1 {
  558. font-size: 28rpx;
  559. color: #333;
  560. padding: 0 0 0 20rpx;
  561. font-weight: 500;
  562. line-height: 90rpx;
  563. }
  564. .ul2 {
  565. display: flex;
  566. flex-wrap: wrap;
  567. justify-content: space-between;
  568. .li2 {
  569. width: 48.8%;
  570. display: flex;
  571. align-items: center;
  572. padding: 14rpx 0 14rpx 14rpx;
  573. margin-bottom: 20rpx;
  574. border-radius: 16rpx;
  575. height: 160rpx;
  576. &.li2Bg0 {
  577. background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
  578. }
  579. &.li2Bg1 {
  580. background: linear-gradient(180deg, #FFFAF3 0%, #FFF4EA 100%);
  581. }
  582. &.li2Bg2 {
  583. background: linear-gradient(180deg, #F4FFF5 0%, #F3FFED 100%);
  584. }
  585. &.li2Bg3 {
  586. background: linear-gradient(180deg, #EFFFF9 0%, #E3FFF5 100%);
  587. }
  588. &.li2Bg4 {
  589. background: linear-gradient(180deg, #FAF9FF 0%, #F9F5FF 100%);
  590. }
  591. &.li2Bg5 {
  592. background: linear-gradient(180deg, #FCF9FB 0%, #FFF5F8 100%);
  593. }
  594. &.li2Bg6 {
  595. background: linear-gradient(180deg, #FDFFF3 0%, #F5FFE1 100%);
  596. }
  597. &.li2Bg7 {
  598. background: linear-gradient(180deg, #EDF7FF 0%, #F3F1FF 100%);
  599. }
  600. .icon {
  601. width: 80rpx;
  602. height: 80rpx;
  603. }
  604. .textCon {
  605. // flex: 1;
  606. padding-left: 10rpx;
  607. .text {
  608. font-size: 32rpx;
  609. color: #333;
  610. font-weight: 500;
  611. }
  612. .tps {
  613. margin-top: 6rpx;
  614. font-size: 20rpx;
  615. color: #949494;
  616. }
  617. }
  618. }
  619. }
  620. }
  621. }
  622. </style>