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

605 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. <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.city)
  281. },
  282. onShow() {
  283. },
  284. computed: {
  285. // joe() {
  286. // return '我的名字'
  287. // }
  288. },
  289. methods: {
  290. refereshFn() {
  291. this.$store.dispatch('refreshToken')
  292. // this.$store.dispatch('getUserInfo')
  293. },
  294. close() {
  295. },
  296. goPageSection(item) {
  297. uni.navigateTo({
  298. url:item.url
  299. })
  300. },
  301. // 扫码
  302. scanCodeFn() {
  303. let _this = this
  304. uni.scanCode({
  305. success: function(res) {
  306. console.log('条码类型:' + res.scanType);
  307. console.log('条码内容:' + res.result);
  308. _this.$store.commit('updateWebVeiwUrl', res.result)
  309. uni.navigateTo({
  310. url: '/pages/other/webView/webView'
  311. })
  312. }
  313. });
  314. },
  315. clickItem(e) {
  316. this.swiperDotIndex = e
  317. },
  318. change(e) {
  319. this.current = e.detail.current
  320. },
  321. goPage() {
  322. uni.navigateTo({
  323. url: '/pages/userCenter/login/loginByPhone'
  324. })
  325. },
  326. initFn() {
  327. uni.requestSubscribeMessage({
  328. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  329. success(res) {
  330. console.log('消息是否有权限呢')
  331. console.log(res)
  332. }
  333. })
  334. }
  335. }
  336. }
  337. </script>
  338. <style lang="scss" scoped>
  339. .main {
  340. width: 100%;
  341. .flex {
  342. .adrsIcon {
  343. width: 26rpx;
  344. height: 38rpx;
  345. margin-top: 4rpx;
  346. }
  347. .adr {
  348. padding-left: 14rpx;
  349. font-size: 28rpx;
  350. color: #fff;
  351. }
  352. }
  353. .rightScan {
  354. padding-right: 190rpx;
  355. }
  356. .scan {
  357. width: 64rpx;
  358. height: 64rpx;
  359. }
  360. .TopCon {
  361. width: 100%;
  362. height: 476rpx;
  363. // background: url('../../../static/images/bigImg/index_banner.png') no-repeat;
  364. // background: url('http://192.168.1.20:81/zhili/image/20230809/e7086ccf82ed4aa09d156f2590a50fba.png') no-repeat;
  365. position: relative;
  366. .flex-b {
  367. padding: 10rpx 212rpx 0 50rpx;
  368. }
  369. .searchCon {
  370. position: absolute;
  371. left: 0;
  372. bottom: 68rpx;
  373. padding: 0 28rpx;
  374. width: 100%;
  375. }
  376. }
  377. .card {
  378. background: #FFFFFF;
  379. border-radius: 16rpx;
  380. margin-bottom: 20rpx;
  381. &.traTop {
  382. // transform: translateY(-40rpx);
  383. margin-top: -40rpx;
  384. position: relative;
  385. z-index: 9;
  386. }
  387. .ul {
  388. height: 236rpx;
  389. display: flex;
  390. justify-content: space-between;
  391. align-items: center;
  392. padding: 0 20rpx;
  393. .li {
  394. flex: 1;
  395. display: flex;
  396. align-items: center;
  397. flex-direction: column;
  398. .icon {
  399. width: 92rpx;
  400. height: 92rpx;
  401. }
  402. .name {
  403. font-size: 26rpx;
  404. color: #333;
  405. padding-top: 20rpx;
  406. text-align: center;
  407. }
  408. }
  409. }
  410. .ul3 {
  411. height: 128rpx;
  412. display: flex;
  413. justify-content: space-between;
  414. align-items: center;
  415. padding: 0 30rpx;
  416. border: 2rpx solid #E8E9EC;
  417. border-radius: 16rpx;
  418. .li3 {
  419. // flex: 1;
  420. display: flex;
  421. align-items: center;
  422. flex-direction: column;
  423. .icon {
  424. width: 52rpx;
  425. height: 52rpx;
  426. }
  427. .name {
  428. font-size: 22rpx;
  429. color: #686B73;
  430. padding-top: 2rpx;
  431. text-align: center;
  432. }
  433. }
  434. }
  435. }
  436. .information {
  437. padding: 0 20rpx;
  438. height: 320rpx;
  439. .border {
  440. height: 86rpx;
  441. border-bottom: 2px dashed #E8E9EC;
  442. .h1 {
  443. font-size: 28rpx;
  444. color: #333;
  445. }
  446. .more {
  447. font-size: 24rpx;
  448. display: flex;
  449. .text {
  450. // margin-right: 8rpx;
  451. color: #686B73;
  452. }
  453. }
  454. }
  455. .swiper-item {
  456. height: 148rpx;
  457. .flex-b {
  458. padding: 30rpx 0 28rpx 0;
  459. .imgBox {
  460. width: 184rpx;
  461. height: 148rpx;
  462. background: linear-gradient(180deg, rgba(0, 122, 255, 0.5) 0%, #007AFF 100%);
  463. border-radius: 6rpx;
  464. overflow: hidden;
  465. }
  466. .rightText {
  467. flex: 1;
  468. padding: 0 0 0 30rpx;
  469. height: 148rpx;
  470. display: flex;
  471. flex-direction: column;
  472. justify-content: space-between;
  473. .text {
  474. font-size: 24rpx;
  475. color: #333;
  476. }
  477. .date {
  478. text-align: right;
  479. font-size: 20rpx;
  480. color: #686B73;
  481. }
  482. }
  483. }
  484. }
  485. }
  486. .serviceCon {
  487. width: 100%;
  488. padding: 0 20rpx 20rpx 20rpx;
  489. .h1 {
  490. font-size: 28rpx;
  491. color: #333;
  492. padding: 0 0 0 20rpx;
  493. font-weight: 500;
  494. line-height: 90rpx;
  495. }
  496. .ul2 {
  497. display: flex;
  498. flex-wrap: wrap;
  499. justify-content: space-between;
  500. .li2 {
  501. width: 48.8%;
  502. display: flex;
  503. align-items: center;
  504. padding: 14rpx 0 14rpx 14rpx;
  505. margin-bottom: 20rpx;
  506. border-radius: 16rpx;
  507. height: 160rpx;
  508. &.li2Bg0 {
  509. background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
  510. }
  511. &.li2Bg1 {
  512. background: linear-gradient(180deg, #FFFAF3 0%, #FFF4EA 100%);
  513. }
  514. &.li2Bg2 {
  515. background: linear-gradient(180deg, #F4FFF5 0%, #F3FFED 100%);
  516. }
  517. &.li2Bg3 {
  518. background: linear-gradient(180deg, #EFFFF9 0%, #E3FFF5 100%);
  519. }
  520. &.li2Bg4 {
  521. background: linear-gradient(180deg, #FAF9FF 0%, #F9F5FF 100%);
  522. }
  523. &.li2Bg5 {
  524. background: linear-gradient(180deg, #FCF9FB 0%, #FFF5F8 100%);
  525. }
  526. &.li2Bg6 {
  527. background: linear-gradient(180deg, #FDFFF3 0%, #F5FFE1 100%);
  528. }
  529. &.li2Bg7 {
  530. background: linear-gradient(180deg, #EDF7FF 0%, #F3F1FF 100%);
  531. }
  532. .icon {
  533. width: 80rpx;
  534. height: 80rpx;
  535. }
  536. .textCon {
  537. // flex: 1;
  538. padding-left: 10rpx;
  539. .text {
  540. font-size: 32rpx;
  541. color: #333;
  542. font-weight: 500;
  543. }
  544. .tps {
  545. margin-top: 6rpx;
  546. font-size: 20rpx;
  547. color: #949494;
  548. }
  549. }
  550. }
  551. }
  552. }
  553. }
  554. </style>