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

676 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
11 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 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
11 months 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">
  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. // return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  299. let token = this.$store.state.user.vuex_loginInfo.accessToken
  300. if(!token) {
  301. this.$store.commit('goLogin')
  302. return
  303. }
  304. // this.$goPage(item.url)
  305. this.$store.commit('updateNonPlatformStudent', false)
  306. if(this.vuex_userInfo.applyStep==3) {
  307. return this.$goPage('/pages/indexEntry/enroll/signContract/signContract')
  308. }
  309. // 去填表
  310. if(this.vuex_userInfo.applyStep==2) {
  311. return this.$goPage('/pages/indexEntry/enroll/registInfo/registInfo')
  312. }
  313. // 去支付
  314. if(this.vuex_userInfo.applyStep==4||this.vuex_userInfo.applyStep==5) {
  315. return this.$goPage('/pages/indexEntry/enroll/payment/payment')
  316. }
  317. }
  318. if(item.text=='找驾驶馆') {
  319. const res = await this.$store.dispatch('checkLogin')
  320. if(!res) return
  321. if(!this.vuex_userInfo.schoolId) return this.$u.toast('您不是平台学员')
  322. }
  323. this.$goPage(item.url)
  324. },
  325. async goServiceSector(item) {
  326. if(item.text=='咨询投诉') {
  327. const res = this.$store.dispatch('checkLogin')
  328. if(!res) return
  329. }
  330. this.$goPage(item.url)
  331. },
  332. async getarticleListFn() {
  333. const {data: res} = await getarticleList(this.params)
  334. this.swiperInfo = res.list[0].articleManagementDO
  335. },
  336. async refereshFn() {
  337. const res = await this.$store.dispatch('refreshToken')
  338. console.log(res)
  339. uni.$u.http.setConfig((config) => {
  340. config.header.Authorization = 'Bearer ' + this.$store.state.user.vuex_loginInfo.accessToken
  341. console.log(111)
  342. return config
  343. })
  344. console.log(222)
  345. // this.$store.dispatch('getUserInfo')
  346. },
  347. close() {
  348. },
  349. goPageSection(item) {
  350. uni.navigateTo({
  351. url:item.url
  352. })
  353. },
  354. // 扫码
  355. scanCodeFn() {
  356. let _this = this
  357. uni.scanCode({
  358. success: function(res) {
  359. console.log('条码类型:' + res.scanType);
  360. console.log('条码内容6:' + res.result);
  361. let obj = JSON.parse(res.result)
  362. // 扫教练码去报名的
  363. if(obj.coachId) {
  364. obj.nickname = decodeURIComponent(obj.nickname)
  365. obj.schoolName = decodeURIComponent(obj.schoolName)
  366. let item = {
  367. schoolName: obj.schoolName,
  368. schoolId: obj.schoolId,
  369. name: obj.nickname,
  370. id: obj.coachId
  371. }
  372. console.log('***********')
  373. console.log(item)
  374. _this.$store.commit('upDateSchoolClass', {})
  375. _this.$store.commit('upDateSchoolCoach', item)
  376. _this.$goPage('/pages/indexEntry/enroll/enroll')
  377. }
  378. // _this.$store.commit('updateWebVeiwUrl', res.result)
  379. // uni.navigateTo({
  380. // url: '/pages/other/webView/webView'
  381. // })
  382. }
  383. });
  384. },
  385. clickItem(e) {
  386. this.swiperDotIndex = e
  387. },
  388. change(e) {
  389. this.current = e.detail.current
  390. },
  391. goPage() {
  392. uni.navigateTo({
  393. url: '/pages/userCenter/login/loginByPhone'
  394. })
  395. },
  396. initFn() {
  397. uni.requestSubscribeMessage({
  398. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  399. success(res) {
  400. console.log('消息是否有权限呢')
  401. console.log(res)
  402. }
  403. })
  404. }
  405. }
  406. }
  407. </script>
  408. <style lang="scss" scoped>
  409. .main {
  410. width: 100%;
  411. .flex {
  412. .adrsIcon {
  413. width: 26rpx;
  414. height: 38rpx;
  415. margin-top: 4rpx;
  416. }
  417. .adr {
  418. padding-left: 14rpx;
  419. font-size: 28rpx;
  420. color: #fff;
  421. }
  422. }
  423. .rightScan {
  424. padding-right: 190rpx;
  425. }
  426. .scan {
  427. width: 64rpx;
  428. height: 64rpx;
  429. }
  430. .TopCon {
  431. width: 100%;
  432. height: 476rpx;
  433. // background: url('../../../static/images/bigImg/index_banner.png') no-repeat;
  434. // background: url('http://192.168.1.20:81/zhili/image/20230809/e7086ccf82ed4aa09d156f2590a50fba.png') no-repeat;
  435. position: relative;
  436. .flex-b {
  437. padding: 10rpx 212rpx 0 50rpx;
  438. }
  439. .searchCon {
  440. position: absolute;
  441. left: 0;
  442. bottom: 68rpx;
  443. padding: 0 28rpx;
  444. width: 100%;
  445. }
  446. }
  447. .card {
  448. background: #FFFFFF;
  449. border-radius: 16rpx;
  450. margin-bottom: 20rpx;
  451. &.traTop {
  452. // transform: translateY(-40rpx);
  453. margin-top: -40rpx;
  454. position: relative;
  455. z-index: 9;
  456. }
  457. .ul {
  458. height: 236rpx;
  459. display: flex;
  460. justify-content: space-between;
  461. align-items: center;
  462. padding: 0 20rpx;
  463. .li {
  464. flex: 1;
  465. display: flex;
  466. align-items: center;
  467. flex-direction: column;
  468. .icon {
  469. width: 92rpx;
  470. height: 92rpx;
  471. }
  472. .name {
  473. font-size: 26rpx;
  474. color: #333;
  475. padding-top: 20rpx;
  476. text-align: center;
  477. }
  478. }
  479. }
  480. .ul3 {
  481. height: 128rpx;
  482. display: flex;
  483. justify-content: space-between;
  484. align-items: center;
  485. padding: 0 30rpx;
  486. border: 2rpx solid #E8E9EC;
  487. border-radius: 16rpx;
  488. .li3 {
  489. // flex: 1;
  490. display: flex;
  491. align-items: center;
  492. flex-direction: column;
  493. .icon {
  494. width: 52rpx;
  495. height: 52rpx;
  496. }
  497. .name {
  498. font-size: 22rpx;
  499. color: #686B73;
  500. padding-top: 2rpx;
  501. text-align: center;
  502. }
  503. }
  504. }
  505. }
  506. .information {
  507. padding: 0 20rpx;
  508. height: 320rpx;
  509. .border {
  510. height: 86rpx;
  511. border-bottom: 2px dashed #E8E9EC;
  512. .h1 {
  513. font-size: 28rpx;
  514. color: #333;
  515. }
  516. .more {
  517. font-size: 24rpx;
  518. display: flex;
  519. .text {
  520. // margin-right: 8rpx;
  521. color: #686B73;
  522. }
  523. }
  524. }
  525. .swiper-item {
  526. height: 148rpx;
  527. .flex-b {
  528. padding: 30rpx 0 28rpx 0;
  529. .imgBox {
  530. width: 184rpx;
  531. height: 148rpx;
  532. background: linear-gradient(180deg, rgba(0, 122, 255, 0.5) 0%, #007AFF 100%);
  533. border-radius: 6rpx;
  534. overflow: hidden;
  535. }
  536. .rightText {
  537. flex: 1;
  538. padding: 0 0 0 30rpx;
  539. height: 148rpx;
  540. display: flex;
  541. flex-direction: column;
  542. justify-content: space-between;
  543. .text {
  544. font-size: 24rpx;
  545. color: #333;
  546. }
  547. .date {
  548. text-align: right;
  549. font-size: 20rpx;
  550. color: #686B73;
  551. }
  552. }
  553. }
  554. }
  555. }
  556. .serviceCon {
  557. width: 100%;
  558. padding: 0 20rpx 20rpx 20rpx;
  559. .h1 {
  560. font-size: 28rpx;
  561. color: #333;
  562. padding: 0 0 0 20rpx;
  563. font-weight: 500;
  564. line-height: 90rpx;
  565. }
  566. .ul2 {
  567. display: flex;
  568. flex-wrap: wrap;
  569. justify-content: space-between;
  570. .li2 {
  571. width: 48.8%;
  572. display: flex;
  573. align-items: center;
  574. padding: 14rpx 0 14rpx 14rpx;
  575. margin-bottom: 20rpx;
  576. border-radius: 16rpx;
  577. height: 160rpx;
  578. &.li2Bg0 {
  579. background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
  580. }
  581. &.li2Bg1 {
  582. background: linear-gradient(180deg, #FFFAF3 0%, #FFF4EA 100%);
  583. }
  584. &.li2Bg2 {
  585. background: linear-gradient(180deg, #F4FFF5 0%, #F3FFED 100%);
  586. }
  587. &.li2Bg3 {
  588. background: linear-gradient(180deg, #EFFFF9 0%, #E3FFF5 100%);
  589. }
  590. &.li2Bg4 {
  591. background: linear-gradient(180deg, #FAF9FF 0%, #F9F5FF 100%);
  592. }
  593. &.li2Bg5 {
  594. background: linear-gradient(180deg, #FCF9FB 0%, #FFF5F8 100%);
  595. }
  596. &.li2Bg6 {
  597. background: linear-gradient(180deg, #FDFFF3 0%, #F5FFE1 100%);
  598. }
  599. &.li2Bg7 {
  600. background: linear-gradient(180deg, #EDF7FF 0%, #F3F1FF 100%);
  601. }
  602. .icon {
  603. width: 80rpx;
  604. height: 80rpx;
  605. }
  606. .textCon {
  607. // flex: 1;
  608. padding-left: 10rpx;
  609. .text {
  610. font-size: 32rpx;
  611. color: #333;
  612. font-weight: 500;
  613. }
  614. .tps {
  615. margin-top: 6rpx;
  616. font-size: 20rpx;
  617. color: #949494;
  618. }
  619. }
  620. }
  621. }
  622. }
  623. }
  624. </style>