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