Explorar o código

改变字体大小尝试

xieyunhui %!s(int64=3) %!d(string=hai) anos
pai
achega
4b663072c4

+ 1 - 19
App.vue

@@ -2,25 +2,7 @@
 	import {loginAfterHandle} from './utils/loginHandle.js'
 	export default {
 		onLaunch: function(e) {
-			//当url存在loginData时直接种上数据
-			// const data = {
-			// 	  code: "admin",
-			// 	  headUrl: null,
-			// 	  hiId: 9,
-			// 	  hospName: "东阳市横店医院",
-			// 	  id: 1,
-			// 	  name: "超级管理员",
-			// 	  nowPermission: 1,
-			// 	  permissions: [1, 2, 3, 4, 5],
-			// 	  token: "mMC/agxymKc6Zrxbe2Rye0avfX9GMRFfHV7/YqifA90="
-			// }
-			// console.log({e});
-			// console.log(JSON.stringify(data));
-			
-			
-			
-			
-			
+			//当url存在loginData时直接种上数据
 			/* 条件编译,仅在H5平台生效 */
 			// #ifdef H5
 			

+ 17 - 1
manifest.json

@@ -83,7 +83,23 @@
                 }
             }
         },
-        "modules" : {}
+        "modules" : {},
+        "nativePlugins" : {
+            "Wlake-PictureView" : {
+                "__plugin_info__" : {
+                    "name" : "图片查看器",
+                    "description" : "图片查看器,支持多张图片,手势放大缩小,保存图片",
+                    "platforms" : "Android,iOS",
+                    "url" : "https://ext.dcloud.net.cn/plugin?id=3832",
+                    "android_package_name" : "uni.UNIE410614",
+                    "ios_bundle_id" : "",
+                    "isCloud" : true,
+                    "bought" : 1,
+                    "pid" : "3832",
+                    "parameters" : {}
+                }
+            }
+        }
     },
     /* SDK配置 */
     "quickapp" : {},

+ 9 - 0
pages.json

@@ -222,6 +222,15 @@
             }
             
         }
+        ,{
+            "path" : "pages/changeSize/changeSize",
+            "style" :                                                                                    
+            {
+                "navigationBarTitleText": "设置",
+                "enablePullDownRefresh": false
+            }
+            
+        }
     ],
 	"easycom": {
 			"^u-(.*)": "@/uview-ui/components/u-$1/u-$1.vue"

+ 65 - 0
pages/changeSize/changeSize.vue

@@ -0,0 +1,65 @@
+<template>
+	<page-meta :root-font-size="getRootFontSize()"></page-meta>
+	<view>
+		<view class="uni-padding-wrap uni-common-mt" style="margin-top: 50upx;">
+			<view class="titleBox">
+				<view style="font-size:25upx">A</view>
+				<view style="font-size:30upx">标准</view>
+				<view style="font-size:35upx">A</view>
+				<view style="font-size:40upx">A</view>
+			</view>
+			
+			<view>
+				<slider min="10" max="16" :value="fontValue" @change="sliderChange" show-value step="2"/>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import base from '../../utils/base.js';
+	export default {
+		extends: base,
+		data() {
+			return {
+				fontValue:12,
+				rootFontSize:'12upx',
+				fontStart:uni.getStorageSync('root_font_size') + '',
+				fontEnd:uni.getStorageSync('root_font_size') + ''
+			}
+		},
+		onLoad() {
+			const self = this;
+			//当前字体大小
+			self.fontValue = parseInt(self.getRootFontSize().split('px')[0]);
+			console.log(self.fontValue )
+		},
+		methods: {
+			sliderChange(e) {
+				console.log('value 发生变化:' + e.detail.value)
+				const self = this;
+				let nowFontSize = e.detail.value + 'px';
+				console.log(nowFontSize)
+				self.fontEnd = nowFontSize;
+				console.log(nowFontSize)
+				self.setRootFontSize(nowFontSize);
+			},
+            //这里设置一个事件,使用uni.reLaunch跳转到某个页面,并关闭所有页面
+			/*onNavigationBarButtonTap() {
+				uni.reLaunch({
+					url:"../tabbar-4"
+				})
+			}*/
+		}
+	}
+</script>
+<style>
+	.titleBox{
+		width: 80%;
+		display: flex;
+		align-items: center;
+		justify-content: space-between;
+		margin: 30upx 0;
+		margin-left: 5%;
+    }
+	
+</style>

+ 11 - 1
pages/home/home.vue

@@ -52,7 +52,11 @@
 				<view class="resetPsd-btn" @click="resetCallbackFunc">
 					<text class="func-text">修改密码</text>
 					<image class="icon-more" src="/static/images/icon-more.png"></image>
-				</view>
+				</view>
+				<!-- <view class="resetPsd-btn" @click="resetFontSizeFunc">
+					<text class="func-text">修改字体大小</text>
+					<image class="icon-more" src="/static/images/icon-more.png"></image>
+				</view> -->
 				
 			</view>
 		</view>
@@ -263,6 +267,12 @@
 				uni.navigateTo({
 					url: '/pages/resetInfo/resetInfo'
 				});
+			},
+			resetFontSizeFunc(){
+				console.log('changeSize')
+				uni.navigateTo({
+					url: '/pages/changeSize/changeSize'
+				});
 			},
 			journalOk() {
 				this.showJournal = false;

+ 1 - 1
pages/login/login.vue

@@ -34,7 +34,7 @@
 		data() {
 			return {
 				index:0,
-				appHospSign:'IGlcn5nc4xBWc08C',//app端更新hospSign
+				appHospSign:'8CJYqxlGIdLEIwaG',//app端更新hospSign
 				showInputModal:false,
 				hospSign: '', // 医院标识
 				username: '', // 用户名

+ 1 - 3
pages/mission-action/components/assign-mission.vue

@@ -4,7 +4,7 @@
 			<tm-radio-group :list="desicionList" label="改善工具" :defaultValue='desicion' @change="changeDesicion" />
 			<view class="switch-box">
 				<text class="label">需要审核改善方案</text>
-				<switch :checked="needApproveFlag" style="transform:scale(0.8)" @change="switchChange" />
+				<switch :checked="needApproveFlag" style="transform:scale(0.6)" @change="switchChange" />
 			</view>
 			<tm-radio-group :list="empDeptList" :setting="{value: 'empId',name: 'empName'}"
 				:defaultValue='desPersopn.empId' @change="changeDesPersopn" />
@@ -85,7 +85,6 @@
 						success: function(res) {
 							if (res.confirm) {
 								this.needApproveFlag = false;
-								console.log('用户点击确定');
 							}
 						}
 					});
@@ -185,7 +184,6 @@
 
 		.scroll-y {
 			height: calc(100% - 87.5rpx);
-
 			.switch-box {
 				display: flex;
 				justify-content:space-between;

+ 35 - 0
utils/base.js

@@ -0,0 +1,35 @@
+
+
+export default {
+    created() {
+        const self = this;
+ 
+    },
+    mounted() {
+        const self = this;
+    },
+    methods: {
+        //设置字体
+        getRootFontSize(){
+            const self = this;
+            var fontSize = getApp().globalData.rootFontSize;
+            if(fontSize){
+                return fontSize;
+            }else{
+                fontSize = uni.getStorageSync('root_font_size');
+                if(fontSize){
+                    getApp().globalData.rootFontSize=fontSize;
+                }else{
+                    fontSize='12px';//默认字体大小
+                    self.setRootFontSize(fontSize);
+                }
+                return fontSize;
+            }
+        },
+        setRootFontSize(fontSize){
+            uni.setStorageSync('root_font_size',fontSize);
+            getApp().globalData.rootFontSize=fontSize;
+        },
+ 
+    }
+}

+ 4 - 4
utils/requestUrl.js

@@ -9,10 +9,10 @@
 // const base = '192.168.51.80:8801/imed/pfm/';
 
 // export const URL = '192.168.51.80:8801/imed/pfm/'; // 本地
-//export const URL = '112.124.59.133:8802/imed/pfm/'; //线上测试
-//export const URL = '118.31.245.65:8802/imed/pfm/';
-export const URL = '118.31.245.65:8111/imed/pfm/'; //横店
-// export const URL = '192.168.38.174:8088/imed/pfm/';
+export const URL = '112.124.59.133:8802/imed/pfm/'; //线上测试
+// export const URL = '118.31.245.65:8802/imed/pfm/';
+//export const URL = '118.31.245.65:8111/imed/pfm/'; //横店
+// export const URL = '192.168.1.253:8111/imed/pfm/';
 // export const URL = '192.168.1.45:8088/imed/pfm/'; //内网
 // export const URL = 's1.nsloop.com:5137/imed/pfm/';  // 外网
 // export const URL = '121.43.139.179:8801/imed/pfm/';  // 云端服务1