Bläddra i källkod

首页添加信息滚动,暂时屏蔽扫描图标,车辆管理添加导航栏

gcz 4 år sedan
förälder
incheckning
c84c95e1d4
3 ändrade filer med 34 tillägg och 2 borttagningar
  1. 7 0
      pages/index/index.scss
  2. 15 2
      pages/index/index.vue
  3. 12 0
      pages/myCars/myCars.vue

+ 7 - 0
pages/index/index.scss

@@ -196,4 +196,11 @@ page{background-color: $my-page-bg-color;}
 			line-height: 34rpx;
 		}
 	}
+}
+.notice-bar-wrap{
+	margin: 20rpx 40rpx;
+	background-color: #fff;
+	padding: 32rpx 0 25rpx 30rpx;
+	border-radius: 15rpx;
+	overflow: hidden;
 }

+ 15 - 2
pages/index/index.vue

@@ -7,13 +7,24 @@
 				<u-icon name="arrow-down" color="#fff" size="32"></u-icon>
 			</view>
 			<u-search placeholder="搜索停车点" :show-action="false" @search="handleSearch" v-model="keyword"></u-search>
-			<u-icon class="scan" name="scan" color="#fff" size="48" @click="$refs.uToast.show({title: '建设中'})"></u-icon>
+			<!-- <u-icon class="scan" name="scan" color="#fff" size="48" @click="$refs.uToast.show({title: '建设中'})"></u-icon> -->
 		</view>
 		
 		<u-swiper :list="bannerList" border-radius="0"></u-swiper>
 		
 		<u-city-select v-model="cityOpen" @city-change="cityChange" :areaCode='["52", "5201"]' ></u-city-select>
 		
+		<view class="notice-bar-wrap u-flex" v-if="noticeList.length>=1" @click="openPage('pages/message/message')">
+			<u-icon custom-prefix="custom-icon" size="50" name="xiaoxi" color="#008CFF"></u-icon>
+			<u-notice-bar
+			 class="u-flex-1"
+			mode="vertical"
+			 :list="noticeList" 
+			 :volume-icon="false" 
+			 bg-color="#fff" 
+			 color="#727272"
+			 :more-icon="true"></u-notice-bar>
+		</view>
 		<u-card :show-head="false" :show-foot="false" border-radius="16" margin="20rpx 40rpx" padding="30">
 			<view class="content-nav" slot="body">
 				<view class="content-nav-item" @click="openPage('pages/payLists/payLists')">
@@ -146,7 +157,8 @@
 				orderNav:0,//手动,无感
 				bindCarShow:false,//绑定车询问弹窗
 				showOrderDetails:false,//是否线上订单细节
-				popupOrderDetails:[]
+				popupOrderDetails:[],
+				noticeList:[]
 				
 			}
 		},
@@ -201,6 +213,7 @@
 						this.bindCarShow = true;
 					}
 					this.orderList = res.data.orderList;
+					this.noticeList = res.data.news;
 				}).catch(err=>{
 					// alert(err.msg);
 					console.log('getIndexData err',err)

+ 12 - 0
pages/myCars/myCars.vue

@@ -1,5 +1,11 @@
 <template>
 	<view>
+		<u-navbar
+		 title-color="#fff" 
+		 :custom-back="customBack" 
+		 :border-bottom="false" 
+		 back-icon-color="#CCE8FF" 
+		 :background="{background: '#008CFF' }" title="车辆管理"></u-navbar>
 		<view class="header">
 			<view class="header-title">我的车辆</view>
 		</view>
@@ -53,6 +59,12 @@
 			
 		},
 		methods:{
+			customBack(){
+				this.$u.route({
+					type:'switchTab',
+					url: 'pages/index/index'
+				});
+			},
 			handlegetMycars(){
 				this.$u.api.getMycars()
 				.then(res=>{