Browse Source

大字页面增加

zhengkaixin 3 năm trước cách đây
mục cha
commit
26cfac723c
2 tập tin đã thay đổi với 80 bổ sung178 xóa
  1. 55 64
      main.js
  2. 25 114
      pages/searchPile/stationAndPile/stationDetails.vue

+ 55 - 64
main.js

@@ -54,77 +54,68 @@ Vue.mixin({
 				g = true;
 			} else {
 				g = false;
-			}
-		
+			}
+			var style1="";
+			var style2="";
 				//  仅在整个视图都被重新渲染之后才会运行的代码
 				var list = document.getElementsByClassName("oldTextjp")
 				var list2 = document.getElementsByClassName("oldTextjp2")
-
-				for (var i = 0; i < list.length; i++) {
-						var edit = list[i].getAttribute("oldstyle-edit");
-						if(!edit){
-											list[i].setAttribute("oldstyle-edit",list[i].style.cssText);			
-						}else{
-							edit=""
-						}
-						if (g) {
-							var str = list[i].getAttribute("oldstyle");
-							if(str){
-								list[i].style = str+";font-weight:bold !important;"
-							}
-						}else{
-								list[i].style=edit
-						}
+				styleold(g,list,true)
+				styleold(g,list2,false)
+				function styleold(g,list,jp){
 					
-				}
-				
-				for (var j = 0; j < list2.length; j++) {
-						var edit = list2[j].getAttribute("oldstyle-edit");
-						if(!edit){
-											list2[j].setAttribute("oldstyle-edit",list2[j].style.cssText);			
-						}else{
-							edit=""
-						}
-						if (g) {
-							var str = list2[j].getAttribute("oldstyle");
-							if(str){
-								list2[j].style = str+";"
-							}
-						}else{
-							if(edit){
-								list2[j].style=edit
-							}
-								
-						}
-					
+					for (var i = 0; i < list.length; i++) {
+						
+							var edit = list[i].getAttribute("oldstyle-edit");
+							if(!edit){
+												list[i].setAttribute("oldstyle-edit",list[i].style.cssText);			
+							}else{
+								edit=""
+							}
+							if (g) {
+								var str = list[i].getAttribute("oldstyle");
+								if(str&&jp){
+									list[i].style = str+";font-weight:bold !important;"
+								}
+								
+							}else{
+									list[i].style=edit
+							}
+						
+					}
 				}
+				
+				
 	
-				// for (var i = 0; i < list.length; i++) {
-				// 	var str = ""
-
-				// 	for (var j in relist) {
-
-				// 		var num = list[i].getAttribute(j);
-
-				// 		if (num) {
-				// 			var k = relist[j]
-				// 			k = k.replaceAll("[num]", num)
-				// 			str += k + ";";
-				// 		}
-				// 	}
-
-				// 	list[i].style = str
-
-				// }
-				var list_u_title = document.getElementsByClassName("u-title")
-				for (var i = 0; i < list_u_title.length; i++) {
+				 
+				var list_u_title = document.getElementsByClassName("u-title")
+				var  u_cell_title = document.getElementsByClassName("u-cell_title")
+				
+				style1 ="line-height: 26px;color: rgb(96, 98, 102);  font-size: 20px;    overflow: unset;"
+			
+				style2 ="color: rgb(96, 98, 102); font-size: 13px; font-weight: normal;"
+				styleg(g,style1,style2,list_u_title)
+				styleg(g,style1,style2,u_cell_title)
+							
+				
+				
+				var list_u_value = document.getElementsByClassName("u-cell__value")
+				style1 ="line-height: 20px;color: rgb(96, 98, 102);  font-size: 16px;    overflow: unset;"
+				style2 ="color: rgb(96, 98, 102); font-size: 13px; font-weight: normal;"
+				
+				styleg(g,style1,style2,list_u_value)
+				
+				
+				function styleg(bl,style1,style2,suzhu){
+					for (var i = 0; i < suzhu.length; i++) {
+							
+							if (g) {
+								suzhu[i].style =style1;
+							}else{
+								suzhu[i].style =style2;
+							}
 						
-						if (g) {
-							list_u_title[i].style ="line-height: 26px;color: rgb(96, 98, 102);  font-size: 20px;    overflow: unset;"
-						}else{
-							list_u_title[i].style ="color: rgb(96, 98, 102); font-size: 13px; font-weight: normal;"
-						}
-					
+					}
 				}
 
 

+ 25 - 114
pages/searchPile/stationAndPile/stationDetails.vue

@@ -75,7 +75,7 @@
 						{{getItem(item,device)}}
 					</view>
 					<view class="info">
-						<view class="name">
+						<view class="name oldTextjp"  oldstyle="font-size: 20px;line-height: 23px;">
 						{{item.channelNo}}号/{{device.name}}
 						</view>
 						<view class="details">
@@ -104,10 +104,18 @@
 			
 		</view>
 		
-		<view class="price-explain" v-if="current==1">
+		<view class="price-explain" 
+		:class="{
+			'elderMode':elderMode
+		}"
+		v-show="current==1" >
 			<u-cell-group>
-				<u-cell-item @click="priceDetail(1)" v-if="stationDetail.fastPrice != null" title="快充" :value="'当前时段:'+stationDetail.fastPrice.startTime+'~'+stationDetail.fastPrice.endTime+'  '+stationDetail.fastPrice.costPrice+'元/度(含电费'+stationDetail.fastPrice.electricityPrice+'元/度+服务费'+stationDetail.fastPrice.servicePrice+'元/度'"></u-cell-item>
-				<u-cell-item @click="priceDetail(2)" v-if="stationDetail.slowPrice != null" title="慢充" :value="'当前时段:'+stationDetail.slowPrice.startTime+'~'+stationDetail.slowPrice.endTime+'  '+stationDetail.slowPrice.costPrice+'元/度(含电费'+stationDetail.slowPrice.electricityPrice+'元/度+服务费'+stationDetail.slowPrice.servicePrice+'元/度'"></u-cell-item>
+				<u-cell-item
+				 
+				 @click="priceDetail(1)" v-if="stationDetail.fastPrice != null" title="快充" :value="'当前时段:'+stationDetail.fastPrice.startTime+'~'+stationDetail.fastPrice.endTime+'  '+stationDetail.fastPrice.costPrice+'元/度(含电费'+stationDetail.fastPrice.electricityPrice+'元/度+服务费'+stationDetail.fastPrice.servicePrice+'元/度'"></u-cell-item>
+				<u-cell-item 
+				
+				@click="priceDetail(2)" v-if="stationDetail.slowPrice != null" title="慢充" :value="'当前时段:'+stationDetail.slowPrice.startTime+'~'+stationDetail.slowPrice.endTime+'  '+stationDetail.slowPrice.costPrice+'元/度(含电费'+stationDetail.slowPrice.electricityPrice+'元/度+服务费'+stationDetail.slowPrice.servicePrice+'元/度'"></u-cell-item>
 				
  					<u-cell-item :arrow="false" v-if="false" title="停车费用" value="充电免停2小时停车费(临牌车不享受免停)"></u-cell-item>
 				</u-cell-group>
@@ -126,116 +134,10 @@
 			
 		</view>
 		
-		 <view v-if="false&&stationDetail.station!=null" class="price-details">
-			<view class="detail-title">
-				<view class="title-left font-weight5">当前价格</view>
-				<view class="title-right" @click="priceDetail">
-					<view class="right-text">价格详情 </view>
-					<view class="iconfont right-font">&#xe600;</view>
-				</view>
-			</view>
-			<view class="price-item" v-if="stationDetail.slowPrice != null" style="justify-content: space-between;" >
-				<view style="display:flex;flex-direction:row">
-					<view class="text1">慢充</view>
-					<view class="text2">{{stationDetail.slowPrice.costPrice}}</view>
-					<view class="text3">元/度  </view>
-				</view>
-				<view class="text4">{{stationDetail.slowPrice.startTime}}-{{stationDetail.slowPrice.endTime}}</view>
-			</view>
-			<view class="price-item"  v-if="stationDetail.fastPrice != null"  style="justify-content: space-between;" >
-				<view style="display:flex;flex-direction:row">
-					<view class="text5">快充</view>
-					<view class="text2">{{stationDetail.fastPrice.costPrice}}</view>
-					<view class="text3">元/度  </view>					
-				</view>				
-				<view class="text4">{{stationDetail.fastPrice.startTime}}-{{stationDetail.fastPrice.endTime}}</view>
-			</view> 
-			<view class="park-item">
-				<view class="text-box">
-					<view class="text1">
-						停车
-					</view>
-					<view class="text2">
-						{{info.park.price}}
-					</view>
-				</view>
-				<!-- <view class="text3">
-					仅供参考,以停车场实际价格为准
-				</view> --> 
-			</view>
-		</view> 
+		  
 		
-		 <view v-if="false&&stationDetail.station!=null" class="equipment-details">
-			<view class="title">
-				<view class="title-left ">
-					设备详情
-				</view>
-				<view class="title-right">
-					<text class="free">空闲{{stationDetail.station.availableNum}}/</text>
-					<text>总数{{stationDetail.station.totalNum}}</text>
-				
-				</view>
-			</view>
-			
-			<view class="equipment-item" v-for="(item,index) in stationDetail.devices" :key="index">
-				<view class="left-font iconfont" v-if="item.workStatus==0">
-					&#xe60a;
-				</view>
-				<view class="left-font iconfont" style="color:#ff6200" v-else>
-					&#xe60a;
-				</view>
-				<view class="name">
-					<view class="name-text">
-						{{item.name}}
-					</view>
-					<view :class="item.online ? 'tag-free':'tag-recharge'">
-						{{item.online ? '在线' : '不在线'}}
-					</view>
-				</view>
-				<view class="type" style="display: flex;flex-direction: row;">
-					<view>
-						{{item.interfaceType}}
-					</view>
-					<view v-show="item.interfaceType!= null && item.chargingType != null" style="margin-left: 5rpx;margin-right: 5rpx;">
-						|
-					</view>
-					<view :style="item.chargingType=='快充' ? 'color:#CA9DFF':'color:#00B962'">
-						{{item.chargingType}}
-					</view>
-					<view v-show="item.chargingPower!= null && item.chargingType != null" style="margin-left: 5rpx;margin-right: 5rpx;">
-						|
-					</view>
-					<view>
-						{{item.chargingPower!=null?item.chargingPower+'kW':''}}
-					</view> 		
-				</view>
-				<view class="charging-gun" v-for="(item1,index1) in item.gunList" :key="index1" >
-					<view style="display: flex; flex-direction: row;">
-						
-						<view class="iconfont">
-							&#xe618;
-						</view>
-						<view class="gun-num">
-							充电枪{{item1.channelNo<10?'0'+item1.channelNo.toString():item1.channelNo.toString()}}
-						</view>
-						<view :class="item1.workStatus==0?'free-state':'recharge-state'">
-						
-							{{item1.workStatus != 2 ?item1.workStatusText: (item1.soc!=null? (item1.workStatusText + ' SOC ' + item1.soc.toFixed(1)+'%'):item1.workStatusText)}}
-						</view>
-					</view>
-					<view v-if="item1.isAppointment">
-					
-						<u-button class="buttonAppointment" shape="circle" size="small" @click="book(item1)">预约</u-button>
-					</view>
-				</view>			
-			</view> 
-			
-		</view>
-		
-	<!-- 	<view class="bottom">
-			<u-button class="button1" shape="circle" size="medium" @click="getScanCode()">扫码充电</u-button>
-			<u-button class="button2" shape="circle" size="medium" @click="navigate">导航</u-button>
-		</view> -->
+		 
+	 
 	</view>
 </template>
 
@@ -1136,6 +1038,13 @@
 	 display: flex;
 	 
  }
+	}
+	
+	.elderMode .u-cell_title{
+		font-size: 22px;
+		font-weight: bold !important;
+		 
+		
 	}
 	.charging-gun{
 		background-color: #fff;
@@ -1171,9 +1080,11 @@
 				margin-left: 8px;
 				.name{
 					
+				 
+					font-size: 18px;
 					line-height: 20px;
 					color: rgba(16, 16, 16, 100);
-					font-size: 18px;
+					
 					white-space: nowrap;
 					overflow: hidden;
 					text-overflow: ellipsis;