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

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