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

620 lines
15 KiB

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