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

575 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. <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. <view class="TopCon">
  20. <view class="status_bar"></view>
  21. <!-- 地址扫一扫 -->
  22. <view class="flex-b">
  23. <view class="flex">
  24. <view class="adrsIcon">
  25. <image src="@/static/images/index/dingwei.png" mode=""></image>
  26. </view>
  27. <view class="adr">{{ vuex_cityInfo.city }} </view>
  28. </view>
  29. <view class="scan" @click="scanCodeFn">
  30. <image src="@/static/images/index/scan.png" mode=""></image>
  31. </view>
  32. </view>
  33. <!-- 搜索 -->
  34. <view class="searchCon">
  35. <searchRow placeholder="搜索驾校、教练…" @click.native="$goPage('/pages/indexEntry/findShcool/searchShcool/searchShcool')"></searchRow>
  36. </view>
  37. </view>
  38. <view class="pad">
  39. <!-- 精钢区 -->
  40. <view class="card traTop">
  41. <view class="ul">
  42. <view class="li" v-for="(item,index) in entrySection" :key="index" @click="goPageSection(item)">
  43. <view class="icon">
  44. <image :src="item.icon" mode=""></image>
  45. </view>
  46. <view class="name">{{ item.text }}</view>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 更多入口 -->
  51. <view class="card">
  52. <view class="ul3">
  53. <view class="li3" v-for="(item,index) in moreSection" :key="index" @click="goPageSection(item)">
  54. <view class="icon">
  55. <image :src="item.icon" mode=""></image>
  56. </view>
  57. <view class="name">{{ item.text }}</view>
  58. </view>
  59. </view>
  60. </view>
  61. <!-- 行业资讯 -->
  62. <view class="card">
  63. <view class="information">
  64. <view class="flex-b border">
  65. <view class="h1">行业资讯</view>
  66. <view class="more" @click="$goPage('/pages/indexEntry/iIndustryInfo/iIndustryInfo')">
  67. <view class="text">更多</view>
  68. <view class="icon">
  69. <u-icon name="arrow-right"></u-icon>
  70. </view>
  71. </view>
  72. </view>
  73. <uni-swiper-dot class="uni-swiper-dot-box" @clickItem=clickItem :info="swiperInfo"
  74. :current="current" :mode="mode" style="height: 230rpx;" :dots-styles="dotsStyles"
  75. field="content">
  76. <swiper class="swiper-box" @change="change" :current="swiperDotIndex" style="height: 230rpx;">
  77. <swiper-item v-for="(item, index) in swiperInfo" :key="index" @click="$goPage('/pages/indexEntry/examines/newsDetail/newsDetail')">
  78. <view class="swiper-item" :class="'swiper-item' + index">
  79. <view class="flex-b">
  80. <view class="imgBox">
  81. <image src="../../../static/images/logo.png" mode=""></image>
  82. </view>
  83. <view class="rightText">
  84. <view class="text towRowText">{{ item.text }}</view>
  85. <view class="date">{{ item.date}}</view>
  86. </view>
  87. </view>
  88. </view>
  89. </swiper-item>
  90. </swiper>
  91. </uni-swiper-dot>
  92. </view>
  93. </view>
  94. <!-- 服务专区 -->
  95. <view class="card serviceCon">
  96. <view class="h1">服务专区</view>
  97. <view class="ul2">
  98. <view class="li2" v-for="(item,index) in serviceSector" :key="index" :class="'li2Bg' + index" @click="$goPage(item.url)">
  99. <view class="icon">
  100. <image :src="item.icon" mode=""></image>
  101. </view>
  102. <view class="textCon">
  103. <view class="text">{{ item.text }}</view>
  104. <view class="tps">{{ item.tps}}</view>
  105. </view>
  106. </view>
  107. </view>
  108. </view>
  109. <view style="height: 20rpx;width: 100%;"></view>
  110. </view>
  111. <u-popup :show="showPrivacy" mode="center" :round="20" >
  112. <privacyPopup @disagree="showPrivacy=false" @agree="showPrivacy=false"></privacyPopup>
  113. </u-popup>
  114. </view>
  115. </template>
  116. <script>
  117. export default {
  118. data() {
  119. return {
  120. showPrivacy: false,
  121. keywords: '',
  122. entrySection: [{
  123. text: '我要报名',
  124. icon: require('../../../static/images/index/ic_baoming.png'),
  125. url: '/pages/indexEntry/enroll/enroll'
  126. },
  127. {
  128. text: '找驾校',
  129. icon: require('../../../static/images/index/ic_jiaxiao.png'),
  130. url: '/pages/indexEntry/findShcool/findShcool'
  131. },
  132. {
  133. text: '找考场',
  134. icon: require('../../../static/images/index/ic_kaochang.png'),
  135. url: '/pages/indexEntry/examines/examines'
  136. },
  137. {
  138. text: '找陪练',
  139. icon: require('../../../static/images/index/ic_peilian.png'),
  140. },
  141. {
  142. text: '理论学习',
  143. icon: require('../../../static/images/index/ic_lilun.png'),
  144. url: '/pages/indexEntry/theory/theory'
  145. },
  146. ],
  147. moreSection: [{
  148. text: '摩托车业务',
  149. icon: require('../../../static/images/index/btn_motuoche.png'),
  150. url: '/pages/indexEntry/enroll/enroll'
  151. },
  152. {
  153. text: '考试预约',
  154. icon: require('../../../static/images/index/btn_yuyue.png'),
  155. url: '/pages/indexEntry/findShcool/findShcool'
  156. },
  157. {
  158. text: '交通求助',
  159. icon: require('../../../static/images/index/btn_jiuzhu.png'),
  160. url: '/pages/indexEntry/examines/examines'
  161. },
  162. {
  163. text: '学驾保险',
  164. icon: require('../../../static/images/index/btn_baoxian.png'),
  165. },
  166. {
  167. text: '更多',
  168. icon: require('../../../static/images/index/btn_gengduo.png'),
  169. url: '/pages/indexEntry/theory/theory'
  170. },
  171. ],
  172. serviceSector: [{
  173. text: '学车指南',
  174. tps: '政府平台 一站服务',
  175. icon: require('../../../static/images/index/img_1@2x.png'),
  176. url: ''
  177. },
  178. {
  179. text: '公益视频',
  180. tps: '立体呈现 学驾无忧',
  181. icon: require('../../../static/images/index/img_2@2x.png'),
  182. url: '/pages/indexEntry/publicVideo/publicVideo'
  183. },
  184. {
  185. text: '合格率排行',
  186. tps: '官方数据 阳光透明',
  187. icon: require('../../../static/images/index/img_3@2x.png'),
  188. url: '/pages/indexEntry/credit/credit?type=1'
  189. },
  190. {
  191. text: '行业政策',
  192. tps: '权威发布 精准解读',
  193. icon: require('../../../static/images/index/img_4@2x.png'),
  194. url: '/pages/indexEntry/industryPolicy/industryPolicy'
  195. },
  196. {
  197. text: '质量信誉排行',
  198. tps: '官方数据 阳光透明',
  199. icon: require('../../../static/images/index/img_5@2x.png'),
  200. url: '/pages/indexEntry/credit/credit'
  201. },
  202. {
  203. text: '咨询投诉',
  204. tps: '畅达沟通 听取民声',
  205. icon: require('../../../static/images/index/img_6@2x.png'),
  206. url: '/pages/indexEntry/consult/consult'
  207. },
  208. {
  209. text: '满分学习考试',
  210. tps: '网络教育 数据联网',
  211. icon: require('../../../static/images/index/img_7@2x.png'),
  212. url: ''
  213. },
  214. {
  215. text: '送考卷下乡',
  216. tps: '便民利民 就近考试',
  217. icon: require('../../../static/images/index/img_8@2x.png'),
  218. url: ''
  219. },
  220. ],
  221. swiperDotIndex: 1,
  222. current: 1,
  223. mode: 'default',
  224. swiperInfo: [{
  225. img: require('../../../static/images/index/ic_lilun.png'),
  226. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  227. date: '2023/08/09'
  228. },
  229. {
  230. img: require('../../../static/images/index/ic_lilun.png'),
  231. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  232. date: '2023/08/10'
  233. },
  234. {
  235. img: require('../../../static/images/index/ic_lilun.png'),
  236. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  237. date: '2023/08/11'
  238. },
  239. ],
  240. dotsStyles: {
  241. backgroundColor: '#E8E9EC',
  242. border: '1px #E8E9EC solid',
  243. color: '#fff',
  244. selectedBackgroundColor: '#1989FA',
  245. selectedBorder: '1px #1989FA solid'
  246. },
  247. bgColor: 'transparent'
  248. }
  249. },
  250. async onLoad() {
  251. // await this.$store.dispatch('getCity')
  252. // console.log('有 啦')
  253. // console.log(this.$store.state.user.vuex_cityInfo.city)
  254. },
  255. onShow() {
  256. },
  257. computed: {
  258. // joe() {
  259. // return '我的名字'
  260. // }
  261. },
  262. methods: {
  263. close() {
  264. },
  265. goPageSection(item) {
  266. uni.navigateTo({
  267. url:item.url
  268. })
  269. },
  270. // 扫码
  271. scanCodeFn() {
  272. let _this = this
  273. uni.scanCode({
  274. success: function(res) {
  275. console.log('条码类型:' + res.scanType);
  276. console.log('条码内容:' + res.result);
  277. _this.$store.commit('updateWebVeiwUrl', res.result)
  278. uni.navigateTo({
  279. url: '/pages/other/webView/webView'
  280. })
  281. }
  282. });
  283. },
  284. clickItem(e) {
  285. this.swiperDotIndex = e
  286. },
  287. change(e) {
  288. this.current = e.detail.current
  289. },
  290. goPage() {
  291. uni.navigateTo({
  292. url: '/pages/userCenter/login/loginByPhone'
  293. })
  294. },
  295. initFn() {
  296. uni.requestSubscribeMessage({
  297. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  298. success(res) {
  299. console.log('消息是否有权限呢')
  300. console.log(res)
  301. }
  302. })
  303. }
  304. }
  305. }
  306. </script>
  307. <style lang="scss" scoped>
  308. .main {
  309. width: 100%;
  310. .flex {
  311. .adrsIcon {
  312. width: 26rpx;
  313. height: 38rpx;
  314. margin-top: 4rpx;
  315. }
  316. .adr {
  317. padding-left: 14rpx;
  318. font-size: 28rpx;
  319. color: #fff;
  320. }
  321. }
  322. .rightScan {
  323. padding-right: 190rpx;
  324. }
  325. .scan {
  326. width: 64rpx;
  327. height: 64rpx;
  328. }
  329. .TopCon {
  330. width: 100%;
  331. height: 476rpx;
  332. // background: url('../../../static/images/bigImg/index_banner.png') no-repeat;
  333. background: url('http://192.168.1.20:81/zhili/image/20230809/e7086ccf82ed4aa09d156f2590a50fba.png') no-repeat;
  334. background-size: 100% 100%;
  335. position: relative;
  336. .flex-b {
  337. padding: 10rpx 212rpx 0 50rpx;
  338. }
  339. .searchCon {
  340. position: absolute;
  341. left: 0;
  342. bottom: 68rpx;
  343. padding: 0 28rpx;
  344. width: 100%;
  345. }
  346. }
  347. .card {
  348. background: #FFFFFF;
  349. border-radius: 16rpx;
  350. margin-bottom: 20rpx;
  351. &.traTop {
  352. // transform: translateY(-40rpx);
  353. margin-top: -40rpx;
  354. position: relative;
  355. z-index: 9;
  356. }
  357. .ul {
  358. height: 236rpx;
  359. display: flex;
  360. justify-content: space-between;
  361. align-items: center;
  362. padding: 0 20rpx;
  363. .li {
  364. flex: 1;
  365. display: flex;
  366. align-items: center;
  367. flex-direction: column;
  368. .icon {
  369. width: 92rpx;
  370. height: 92rpx;
  371. }
  372. .name {
  373. font-size: 26rpx;
  374. color: #333;
  375. padding-top: 20rpx;
  376. text-align: center;
  377. }
  378. }
  379. }
  380. .ul3 {
  381. height: 128rpx;
  382. display: flex;
  383. justify-content: space-between;
  384. align-items: center;
  385. padding: 0 30rpx;
  386. border: 2rpx solid #E8E9EC;
  387. border-radius: 16rpx;
  388. .li3 {
  389. // flex: 1;
  390. display: flex;
  391. align-items: center;
  392. flex-direction: column;
  393. .icon {
  394. width: 52rpx;
  395. height: 52rpx;
  396. }
  397. .name {
  398. font-size: 22rpx;
  399. color: #686B73;
  400. padding-top: 2rpx;
  401. text-align: center;
  402. }
  403. }
  404. }
  405. }
  406. .information {
  407. padding: 0 20rpx;
  408. height: 320rpx;
  409. .border {
  410. height: 86rpx;
  411. border-bottom: 2px dashed #E8E9EC;
  412. .h1 {
  413. font-size: 28rpx;
  414. color: #333;
  415. }
  416. .more {
  417. font-size: 24rpx;
  418. display: flex;
  419. .text {
  420. // margin-right: 8rpx;
  421. color: #686B73;
  422. }
  423. }
  424. }
  425. .swiper-item {
  426. height: 148rpx;
  427. .flex-b {
  428. padding: 30rpx 0 28rpx 0;
  429. .imgBox {
  430. width: 184rpx;
  431. height: 148rpx;
  432. background: linear-gradient(180deg, rgba(0, 122, 255, 0.5) 0%, #007AFF 100%);
  433. border-radius: 6rpx;
  434. overflow: hidden;
  435. }
  436. .rightText {
  437. flex: 1;
  438. padding: 0 0 0 30rpx;
  439. height: 148rpx;
  440. display: flex;
  441. flex-direction: column;
  442. justify-content: space-between;
  443. .text {
  444. font-size: 24rpx;
  445. color: #333;
  446. }
  447. .date {
  448. text-align: right;
  449. font-size: 20rpx;
  450. color: #686B73;
  451. }
  452. }
  453. }
  454. }
  455. }
  456. .serviceCon {
  457. width: 100%;
  458. padding: 0 20rpx 20rpx 20rpx;
  459. .h1 {
  460. font-size: 28rpx;
  461. color: #333;
  462. padding: 0 0 0 20rpx;
  463. font-weight: 500;
  464. line-height: 90rpx;
  465. }
  466. .ul2 {
  467. display: flex;
  468. flex-wrap: wrap;
  469. justify-content: space-between;
  470. .li2 {
  471. width: 48.8%;
  472. display: flex;
  473. align-items: center;
  474. padding: 14rpx 0 14rpx 14rpx;
  475. margin-bottom: 20rpx;
  476. border-radius: 16rpx;
  477. height: 160rpx;
  478. &.li2Bg0 {
  479. background: linear-gradient(180deg, #F7FBFF 0%, #EFF6FF 100%);
  480. }
  481. &.li2Bg1 {
  482. background: linear-gradient(180deg, #FFFAF3 0%, #FFF4EA 100%);
  483. }
  484. &.li2Bg2 {
  485. background: linear-gradient(180deg, #F4FFF5 0%, #F3FFED 100%);
  486. }
  487. &.li2Bg3 {
  488. background: linear-gradient(180deg, #EFFFF9 0%, #E3FFF5 100%);
  489. }
  490. &.li2Bg4 {
  491. background: linear-gradient(180deg, #FAF9FF 0%, #F9F5FF 100%);
  492. }
  493. &.li2Bg5 {
  494. background: linear-gradient(180deg, #FCF9FB 0%, #FFF5F8 100%);
  495. }
  496. &.li2Bg6 {
  497. background: linear-gradient(180deg, #FDFFF3 0%, #F5FFE1 100%);
  498. }
  499. &.li2Bg7 {
  500. background: linear-gradient(180deg, #EDF7FF 0%, #F3F1FF 100%);
  501. }
  502. .icon {
  503. width: 80rpx;
  504. height: 80rpx;
  505. }
  506. .textCon {
  507. // flex: 1;
  508. padding-left: 10rpx;
  509. .text {
  510. font-size: 32rpx;
  511. color: #333;
  512. font-weight: 500;
  513. }
  514. .tps {
  515. margin-top: 6rpx;
  516. font-size: 20rpx;
  517. color: #949494;
  518. }
  519. }
  520. }
  521. }
  522. }
  523. }
  524. </style>