Jelajahi Sumber

注销长者模式

zhupeng 3 tahun lalu
induk
melakukan
bc6e86fcc4
1 mengubah file dengan 50 tambahan dan 2 penghapusan
  1. 50 2
      pages/user/logout.vue

+ 50 - 2
pages/user/logout.vue

@@ -1,5 +1,5 @@
 <template>
-	<view>
+	<view class="all">
 		<u-navbar title="注销账号"></u-navbar>
 		<view class="logout-head">
 			<img src="../../static/img/logout.png" alt="">
@@ -28,10 +28,37 @@
 	export default {
 		data() {
 			return {
+				elderMode:false,
 				jpcode: 'toLogin',
 			}
+		}, 
+		onReady(){
+			this.elderMode = this.carhelp.get('getElderModeClass')  == '长辈模式';
+			if(this.elderMode)
+				this.theme('elder')
+			else
+				this.theme('standard')
 		},
 		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;
+			  } 
+			},
 			toSetting() {
 				uni.navigateBack({
 					
@@ -65,6 +92,12 @@
 </style>
 
 <style lang="scss" scoped>
+	@import "@/_theme.scss";
+	.all{
+		@include themeify{
+			font-size: themed('font-size2');
+		}
+	}
 	.collapse{
 		background-color: #fff;
 		padding:0 10px;
@@ -83,17 +116,24 @@
 			color:#fff;
 			margin-top: 4px;
 		}
+		@include themeify{
+			font-size: themed('font-size2');
+		}
 	}
 	.logout-text{
 		padding: 24px;
 		p{
-			line-height: 28px;
+/*			line-height: 28px;*/
+			@include themeify{
+				line-height: themed('font-size9'); 
+			}
 		}
 	}
 	.logout-btn{
 		display: flex;
 		justify-content: space-between;
 		padding: 0 24px;
+		
 	}
 	.logout-btn1{
 		color:#BBBBBB!important;
@@ -102,11 +142,19 @@
 		span{
 			color:#333;
 		}
+		@include themeify{
+			font-size: themed('font-size3'); 
+			line-height: themed('font-size3'); 
+		}
 	}
 	.logout-btn2{
 		background-color:#00B962!important;
 		flex: 0.4;
 		border-color: #00B962!important;
 		color:#fff!important;
+		@include themeify{
+			font-size: themed('font-size3'); 
+			line-height: themed('font-size3'); 
+		}
 	}
 </style>