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

404 lines
10 KiB

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