zhengkaixin 2 سال پیش
والد
کامیت
8d1b499e85
1فایلهای تغییر یافته به همراه34 افزوده شده و 3 حذف شده
  1. 34 3
      components/u-navbar/u-navbar.vue

+ 34 - 3
components/u-navbar/u-navbar.vue

@@ -31,13 +31,23 @@
 		<!-- 解决fixed定位后导航栏塌陷的问题 -->
 		<view    class="u-navbar-placeholder" v-if="show&&isFixed && !immersive" :style="{ width: '100%', height: Number(navbarHeight) + statusBarHeight + 'px' }"></view>
 		
-		<u-alert-tips type="warning" v-if="descriptionModel=='top'&&descriptionShow"  :show-icon="true"  :description="description"></u-alert-tips>
+		<u-alert-tips type="warning" v-if="descriptionModel=='top'&&descriptionShow" 
+		 :descStyle="{
+			     fontSize: '14px',
+			     color: '#ef7a30',
+		 }" @click="alerttipsCk"
+		 :show-icon="true"  :description="description"></u-alert-tips>
 		<u-modal  v-if="descriptionModel=='modal'&&descriptionShow"  v-model="descriptionShow"
 		 confirm-text="知道了"
 		 :title="descriptionTitle" >
 			<view v-html="description" style="padding: 10px;font-size: 14px;"></view>
 		</u-modal>
-
+		
+		<u-modal   v-model="descriptionShow2"
+		 confirm-text="知道了"
+		 :title="descriptionTitle" >
+			<view v-html="descriptionHtml" style="padding: 10px;font-size: 14px;"></view>
+		</u-modal>
 	
 	</view>
 </template>
@@ -180,7 +190,9 @@
 		data() {
 			return {
 				description:'',
+				descriptionHtml:'',
 				descriptionShow:false,
+				descriptionShow2:false,
 				descriptionTitle:"",
 				descriptionModel:"top",
 				menuButtonInfo: menuButtonInfo,
@@ -245,16 +257,24 @@
 			let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
 			let curRoute = routes[routes.length - 1].route
 			var nowtime=new Date().getTime();
-			
+			this.descriptionHtml="";
 			var message =this.carhelp.getConfig().message
 			if(message){
 				var list=JSON.parse(message);
+				console.log(list)
 				for(var i in list){
 					// if(list[i].name=='*'){
 					// 	this.descriptionShow=true;
 					// 	this.description=list[i].value;
 					// }
+					if(false){
+						console.log(list[i].name)
+						console.log(curRoute)
+						debugger
+					}
+					
 					if(list[i].name==curRoute){
+						
 						this.descriptionShow=true;
 						this.description=list[i].value;
 					}
@@ -280,6 +300,12 @@
 						if(this.descriptionShow&&list[i].model){
 							this.descriptionModel=list[i].model;
 							this.descriptionTitle=list[i].title;
+							
+						}else{
+							if(list[i].content){
+								this.descriptionTitle=list[i].title;
+								this.descriptionHtml=list[i].content;
+							}
 						}
 						
 						if(this.descriptionShow){
@@ -290,6 +316,11 @@
 			}
 		},
 		methods: {
+			alerttipsCk(){
+				if(this.descriptionHtml){
+					this.descriptionShow2=true;
+				}
+			},
 			goBack() {
 					//console.log("修复bug, 刷新后不能返回问题")