提交
This commit is contained in:
28
main.js
28
main.js
@@ -1,6 +1,31 @@
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import qs from 'qs'
|
||||
Vue.prototype.$baseFontSize = function () {
|
||||
console.log('这是一个全局方法')
|
||||
return uni.getStorageSync("fontSize")
|
||||
}
|
||||
Vue.prototype.$getbaseFontSizeInfo = function () {
|
||||
console.log('这是一个全局方法')
|
||||
var fontSize = uni.getStorageSync("fontSize")
|
||||
var fontSizeInfo = ''
|
||||
if (!uni.getStorageSync("fontSize")) {
|
||||
|
||||
}
|
||||
//改变字体大小
|
||||
switch (fontSize) {
|
||||
case 2.5:
|
||||
fontSizeInfo = '最小'
|
||||
break;
|
||||
case 3.5:
|
||||
fontSizeInfo = '标准'
|
||||
break;
|
||||
case 5:
|
||||
fontSizeInfo = '最大'
|
||||
break;
|
||||
}
|
||||
return fontSizeInfo
|
||||
}
|
||||
// main.js
|
||||
// 全局添加uWeb
|
||||
// #ifdef H5
|
||||
@@ -42,7 +67,7 @@ Vue.prototype.$apkUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=com.cn.zmzm"
|
||||
// 判断手机型号
|
||||
|
||||
uni.getSystemInfo({
|
||||
success: function(res) {
|
||||
success: function (res) {
|
||||
console.log('这是初始化判断手机型号', res)
|
||||
|
||||
Vue.prototype.$platform = res.platform;
|
||||
@@ -94,6 +119,7 @@ import {
|
||||
} from '@/config/login';
|
||||
Vue.prototype.judgeLogin = judgeLogin;
|
||||
Vue.prototype.isShowHtml = store.state.loadingShow;
|
||||
Vue.prototype.vuex_fontsize = uni.getStorageSync('fontSize');
|
||||
Vue.config.productionTip = false;
|
||||
// #ifdef H5
|
||||
//微信SDK
|
||||
|
||||
Reference in New Issue
Block a user