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

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