学员端小程序
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. <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="搜索驾校、教练…"></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">
  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. },
  115. {
  116. text: '找驾校',
  117. icon: require('../../../static/images/index/ic_jiaxiao.png'),
  118. url: '/pages/indexEntry/findShcool/findShcool'
  119. },
  120. {
  121. text: '找考场',
  122. icon: require('../../../static/images/index/ic_kaochang.png'),
  123. url: '/pages/indexEntry/examines/examines'
  124. },
  125. {
  126. text: '找陪练',
  127. icon: require('../../../static/images/index/ic_peilian.png'),
  128. },
  129. {
  130. text: '理论学习',
  131. icon: require('../../../static/images/index/ic_lilun.png'),
  132. url: '/pages/indexEntry/theory/theory'
  133. },
  134. ],
  135. serviceSector: [{
  136. text: '学车指南',
  137. tps: '政府平台 一站服务',
  138. icon: require('../../../static/images/index/img_1@2x.png'),
  139. url: ''
  140. },
  141. {
  142. text: '公益视频',
  143. tps: '立体呈现 学驾无忧',
  144. icon: require('../../../static/images/index/img_2@2x.png'),
  145. url: ''
  146. },
  147. {
  148. text: '合格率排行',
  149. tps: '官方数据 阳光透明',
  150. icon: require('../../../static/images/index/img_3@2x.png'),
  151. url: ''
  152. },
  153. {
  154. text: '行业政策',
  155. tps: '权威发布 精准解读',
  156. icon: require('../../../static/images/index/img_4@2x.png'),
  157. url: ''
  158. },
  159. {
  160. text: '质量信誉排行',
  161. tps: '官方数据 阳光透明',
  162. icon: require('../../../static/images/index/img_5@2x.png'),
  163. url: ''
  164. },
  165. {
  166. text: '咨询投诉',
  167. tps: '畅达沟通 听取民声',
  168. icon: require('../../../static/images/index/img_6@2x.png'),
  169. url: ''
  170. },
  171. ],
  172. swiperDotIndex: 1,
  173. current: 1,
  174. mode: 'default',
  175. swiperInfo: [{
  176. img: require('../../../static/images/index/ic_lilun.png'),
  177. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  178. date: '2023/08/09'
  179. },
  180. {
  181. img: require('../../../static/images/index/ic_lilun.png'),
  182. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  183. date: '2023/08/10'
  184. },
  185. {
  186. img: require('../../../static/images/index/ic_lilun.png'),
  187. text: '2023年6月份江西省机动车驾驶培训机构考试合格率的通报',
  188. date: '2023/08/11'
  189. },
  190. ],
  191. dotsStyles: {
  192. backgroundColor: '#E8E9EC',
  193. border: '1px #E8E9EC solid',
  194. color: '#fff',
  195. selectedBackgroundColor: '#1989FA',
  196. selectedBorder: '1px #1989FA solid'
  197. },
  198. bgColor: 'transparent'
  199. }
  200. },
  201. async onLoad() {
  202. // await this.$store.dispatch('getCity')
  203. // console.log('有 啦')
  204. // console.log(this.$store.state.user.vuex_cityInfo.city)
  205. },
  206. onShow() {
  207. },
  208. computed: {
  209. // joe() {
  210. // return '我的名字'
  211. // }
  212. },
  213. methods: {
  214. close() {
  215. },
  216. goPageSection(item) {
  217. uni.navigateTo({
  218. url:item.url
  219. })
  220. },
  221. // 扫码
  222. scanCodeFn() {
  223. let _this = this
  224. uni.scanCode({
  225. success: function(res) {
  226. console.log('条码类型:' + res.scanType);
  227. console.log('条码内容:' + res.result);
  228. _this.$store.commit('updateWebVeiwUrl', res.result)
  229. uni.navigateTo({
  230. url: '/pages/other/webView/webView'
  231. })
  232. }
  233. });
  234. },
  235. clickItem(e) {
  236. this.swiperDotIndex = e
  237. },
  238. change(e) {
  239. this.current = e.detail.current
  240. },
  241. goPage() {
  242. uni.navigateTo({
  243. url: '/pages/userCenter/login/loginByPhone'
  244. })
  245. },
  246. initFn() {
  247. uni.requestSubscribeMessage({
  248. tmplIds: ['0yaIdyI9NlHvGYwb3IIaIQq6uBhulYGN-rGVnJk4hZ4'],
  249. success(res) {
  250. console.log('消息是否有权限呢')
  251. console.log(res)
  252. }
  253. })
  254. }
  255. }
  256. }
  257. </script>
  258. <style lang="scss" scoped>
  259. .main {
  260. width: 100%;
  261. .flex {
  262. .adrsIcon {
  263. width: 26rpx;
  264. height: 38rpx;
  265. margin-top: 4rpx;
  266. }
  267. .adr {
  268. padding-left: 14rpx;
  269. font-size: 28rpx;
  270. color: #fff;
  271. }
  272. }
  273. .rightScan {
  274. padding-right: 190rpx;
  275. }
  276. .scan {
  277. width: 64rpx;
  278. height: 64rpx;
  279. }
  280. .TopCon {
  281. width: 100%;
  282. height: 476rpx;
  283. background: url('../../../static/images/bigImg/index_banner.png') no-repeat;
  284. background: url('http://192.168.1.20:81/zhili/image/20230809/e7086ccf82ed4aa09d156f2590a50fba.png') no-repeat;
  285. background-size: 100% 100%;
  286. position: relative;
  287. .flex-b {
  288. padding: 10rpx 212rpx 0 50rpx;
  289. }
  290. .searchCon {
  291. position: absolute;
  292. left: 0;
  293. bottom: 68rpx;
  294. padding: 0 28rpx;
  295. width: 100%;
  296. }
  297. }
  298. .card {
  299. background: #FFFFFF;
  300. border-radius: 16rpx;
  301. margin-bottom: 20rpx;
  302. &.traTop {
  303. // transform: translateY(-40rpx);
  304. margin-top: -40rpx;
  305. position: relative;
  306. z-index: 9;
  307. }
  308. .ul {
  309. height: 236rpx;
  310. display: flex;
  311. justify-content: space-between;
  312. align-items: center;
  313. padding: 0 20rpx;
  314. .li {
  315. flex: 1;
  316. display: flex;
  317. align-items: center;
  318. flex-direction: column;
  319. .icon {
  320. width: 92rpx;
  321. height: 92rpx;
  322. }
  323. .name {
  324. font-size: 26rpx;
  325. color: #333;
  326. padding-top: 20rpx;
  327. text-align: center;
  328. }
  329. }
  330. }
  331. }
  332. .information {
  333. padding: 0 20rpx;
  334. height: 320rpx;
  335. .border {
  336. height: 86rpx;
  337. border-bottom: 2px dashed #E8E9EC;
  338. .h1 {
  339. font-size: 28rpx;
  340. color: #333;
  341. }
  342. .more {
  343. font-size: 24rpx;
  344. display: flex;
  345. .text {
  346. // margin-right: 8rpx;
  347. color: #686B73;
  348. }
  349. }
  350. }
  351. .swiper-item {
  352. height: 148rpx;
  353. .flex-b {
  354. padding: 30rpx 0 28rpx 0;
  355. .imgBox {
  356. width: 184rpx;
  357. height: 148rpx;
  358. background: linear-gradient(180deg, rgba(0, 122, 255, 0.5) 0%, #007AFF 100%);
  359. border-radius: 6rpx;
  360. overflow: hidden;
  361. }
  362. .rightText {
  363. flex: 1;
  364. padding: 0 0 0 30rpx;
  365. height: 148rpx;
  366. display: flex;
  367. flex-direction: column;
  368. justify-content: space-between;
  369. .text {
  370. font-size: 24rpx;
  371. color: #333;
  372. }
  373. .date {
  374. text-align: right;
  375. font-size: 20rpx;
  376. color: #686B73;
  377. }
  378. }
  379. }
  380. }
  381. }
  382. .serviceCon {
  383. width: 100%;
  384. padding-bottom: 20rpx;
  385. .h1 {
  386. font-size: 28rpx;
  387. color: #333;
  388. padding: 0 0 0 20rpx;
  389. font-weight: 500;
  390. line-height: 90rpx;
  391. }
  392. .ul2 {
  393. padding: 0 20rpx;
  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: 16rpx;
  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>