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

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