Bläddra i källkod

邀请朋友长者模式

zhupeng 3 år sedan
förälder
incheckning
8dbb345b11
1 ändrade filer med 97 tillägg och 16 borttagningar
  1. 97 16
      pages/user/InviteFriends.vue

+ 97 - 16
pages/user/InviteFriends.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view class="all">
 		<u-mask :show="show" @click="show = false">
 				<u-image width="100%" height="500px"  :mode="'widthFix'"  src="/static/img/guide_point.png"></u-image>
 				
@@ -90,6 +90,7 @@
 	export default {
 		data() {
 			return {
+				elderMode:false,
 				id:"",
 				code:"",
 				show:false,
@@ -105,6 +106,13 @@
 				this.get_wx_config();
 				
 		},
+		onReady(){
+			this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
+			if(this.elderMode)
+				this.theme('elder')
+			else
+				this.theme('standard')
+		},
 		onShow() {
 			
 			//pages/user/InviteFriends?id=2&icode=FX&uid=731b9765-3565-4b3c-918b-5d3ec3b505fb
@@ -121,6 +129,25 @@
 				
 		},
 		methods: {
+			theme(type) {
+				
+			  if(type == 'elder')	
+			  {
+				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+				 let data = {
+				 	"font-size":'32rpx', 
+				 	};
+				 this.placeholderStyle = data;
+			  }
+			  else
+			  {
+				document.getElementsByTagName('body')[0].setAttribute('data-theme',type);
+				 let data = {
+				 	"font-size":'28rpx'
+				 	};
+				 this.placeholderStyle = data;
+			  } 
+			},
 			substrMbName(name){
 				return substrMb(name,0,4)+'***'
 			},
@@ -220,6 +247,13 @@
 	}
 </style>
 <style lang="scss" scoped>
+	@import "@/_theme.scss";
+	.all{
+		@include themeify{
+			font-size: themed('font-size1');
+		}
+	}
+	
 	.InviteFriends{
 		background-image: linear-gradient(0deg, #a2e9c9 , #01b963);
 
@@ -241,7 +275,10 @@
 		border-radius: 20px;
 		padding: 20px;
 		h4{
-			font-size: 15px;
+			@include themeify{
+				font-size: themed('font-size3');
+			}
+/*			font-size: 15px;*/
 			font-weight: normal;
 			text-align: center;
 		}
@@ -251,12 +288,20 @@
 			align-items: flex-end;
 			margin: 16px 0;
 			h2{
+				@include themeify{
+					font-size: themed('font-size17');
+					line-height:themed('font-size17')
+				}
+/*				
 				font-size: 44px;
-				line-height: 44px;
+				line-height: 44px;*/
 				color:#FF9600;
 			}
 			span{
-				font-size: 18px;
+				@include themeify{
+					font-size: themed('font-size4');
+ 				}
+/*				font-size: 18px;*/
 				margin-left: 2px;
 			}
 		}
@@ -292,7 +337,11 @@
 			text-align: center;
 			line-height: 50px;
 			border-radius: 25px;
-			font-size: 20px;
+			@include themeify{
+				font-size: themed('font-size5');
+			}
+
+/*			font-size: 20px;*/
 			color:#fff;
 			span{
 				margin-left: 8px;
@@ -302,7 +351,10 @@
 	.InviteFriends-title{
 		color:#fff;
 		margin: 40px 0 24px;
-		font-size: 18px;
+		@include themeify{
+			font-size: themed('font-size4');
+		}
+/*		font-size: 18px;*/
 	}
 	.InviteFriends-info{
 		background-color: #fff;
@@ -317,7 +369,10 @@
 			}
 			p{
 				margin-left: 12px;
-				font-size: 16px;
+				@include themeify{
+					font-size: themed('font-size3');
+				}
+/*				font-size: 16px;*/
 			}
 		}
 	}
@@ -343,15 +398,23 @@
 		margin: 0 4px;
 		p{
 			color:#fff;
-			font-size: 17px;
+/*			font-size: 17px;*/
+			@include themeify{
+				font-size: themed('font-size4');
+			}
 		}
 		.reward-head-price{
 			color:#fff;
 			display: flex;
 			align-items: flex-end;
 			h2{
-				font-size: 36px;
-				line-height: 36px;
+				@include themeify{
+					font-size: themed('font-size13');
+					line-height: themed('font-size13');
+					
+				}
+/*				font-size: 36px;
+				line-height: 36px;*/
 				margin-right: 2px;
 			}
 		}
@@ -375,7 +438,10 @@
 				border-radius: 12px;
 			}
 			p{
-				font-size: 16px;
+				@include themeify{
+					font-size: themed('font-size3');
+ 				}
+/*				font-size: 16px;*/
 				color:#666;
 				margin-bottom: 10px;
 			}
@@ -383,8 +449,13 @@
 				display: flex;
 				align-items: flex-end;
 				h2{
+					@include themeify{
+						font-size: themed('font-size17');
+						line-height: themed('font-size17');
+					}
+/*	
 					font-size: 44px;
-					line-height: 44px;
+					line-height: 44px;*/
 					margin-right: 2px;
 					color:#00B962;
 				}	
@@ -402,10 +473,14 @@
 			width: 120px;
 			border-radius: 20px;
 			background-color: #00B962 ;
-			line-height: 40px;
+/*			line-height: 40px;*/
 			color:#fff;
 			text-align: center;
-			font-size: 18px;
+			@include themeify{
+				font-size: themed('font-size4');
+				line-height: themed('font-size15');
+ 			}
+/*			font-size: 18px;*/
 			margin: 20px auto;
 		}
 	}
@@ -413,7 +488,10 @@
 		//border-top: 1px dashed #cacaca;
 		padding-top: 20px;
 		.reward-list-title{
-			font-size: 18px;
+			@include themeify{
+				font-size: themed('font-size4');
+ 			}
+/*			font-size: 18px;*/
 			margin-bottom: 20px;
 		}
 		.rewardList-item{
@@ -423,7 +501,10 @@
 			margin-top: 12px;
 			span{
 				margin-left: 12px;
-				font-size: 16px;
+/*				font-size: 16px;*/
+				@include themeify{
+					font-size: themed('font-size3');
+ 				}
 			}
 			p{
 				color:#999;