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

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