Ver código fonte

我要加盟长者模式

zhupeng 3 anos atrás
pai
commit
05fcd5c85d
1 arquivos alterados com 65 adições e 12 exclusões
  1. 65 12
      pages/user/toJoin.vue

+ 65 - 12
pages/user/toJoin.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view class="all">
 		<u-navbar title="我要加盟"></u-navbar>
 	
 		<view class="main">
@@ -79,6 +79,7 @@
 	export default{
 		data() {
 				return {
+					elderMode:false,
 					typeList: [
 									{
 										name: '电动汽车充电桩(快充)',
@@ -117,6 +118,35 @@
 				};
 				
 			},
+			methods:{
+				theme(type) {
+					
+				  if(type == 'elder')	
+				  {
+					document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+					 let data = {
+					 	"font-size":'32rpx',
+						"font-weight":'bold!important'
+					 	};
+					 this.titleStyle = data;
+				  }
+				  else
+				  {
+					document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+					 let data = {
+					 	"font-size":'28rpx'
+					 	};
+					 this.titleStyle = data;
+				  } 
+				}
+			},
+			onReady(){
+				this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
+				if(this.elderMode)
+					this.theme('elder')
+				else
+					this.theme('standard')
+			}
 	}
 </script>
 
@@ -130,11 +160,19 @@
 </style>
 
 <style lang="scss" scoped>
-	
+	@import "@/_theme.scss";
+	.all{
+		@include themeify{
+			font-size: themed('font-size1');
+		}
+	}
 	.main {
 		width: 100%;
 	    margin-top: 131px;
-		line-height: 20px;
+		@include themeify{
+ 			line-height: themed('font-size5');
+		}
+/*		line-height: 20px;*/
 		border-radius: 16px;
 	
 		padding: 0 28px 85px;
@@ -144,9 +182,13 @@
 			background-color: #fff;
             border-radius: 16px;
 			.title{
-				height: 18px;
+/*				height: 18px;*/
 				color: rgba(16, 16, 16, 100);
-				font-size: 18px;
+				@include themeify{
+					font-size: themed('font-size4');
+					height: themed('font-size4');
+				}
+/*				font-size: 18px;*/
 				font-weight: 600;
 				
 			}
@@ -158,7 +200,10 @@
 				margin-top: 12px;
 				p{
 					margin-top: 10px;
-					line-height: 24px;
+					@include themeify{
+						line-height: themed('font-size7');
+					}
+/*					line-height: 24px;*/
 					text-align: justify;
 				}
 			}
@@ -178,10 +223,15 @@
 				  margin-left: 10px;
 			  }
 			  p{
-			  				  height: 18px;
-							  line-height: 18px;
+				  @include themeify{
+				  	font-size: themed('font-size4');
+				  	line-height: themed('font-size4');
+				  	height: themed('font-size4');
+				  }
+/*			  				  height: 18px;
+							  line-height: 18px;*/
 			  				  color: rgba(16, 16, 16, 100);
-			  				  font-size: 18px;
+/*			  				  font-size: 18px;*/
 			  }
 			  
 			  .tel,.place,.type,.want{
@@ -222,9 +272,12 @@
 			  }
 			  .hint{
 			  	margin-top: 12px;
-			  	
-			  	font-size: 14px;
-			  	line-height: 20px;
+			  	@include themeify{
+			  		font-size: themed('font-size2');
+			  		line-height: themed('font-size5'); 
+			  	}
+/*			  	font-size: 14px;
+			  	line-height: 20px;*/
 			  	text-align: justify;
 			  	.tel-num{
 			  		color: #9FC7FF;