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

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