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