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

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