Commit dbe48e82 by Lays-lzq

feat: 修复vx更改字体导致页面布局错位的问题

parent 13459d68
...@@ -7,6 +7,9 @@ body { ...@@ -7,6 +7,9 @@ body {
// background: #f7f7f7; // background: #f7f7f7;
-webkit-overflow-scrolling: touch; -webkit-overflow-scrolling: touch;
// overflow: hidden; // overflow: hidden;
-webkit-text-size-adjust: 100% !important;
text-size-adjust: 100% !important;
-moz-text-size-adjust: 100% !important;
} }
// 页面进入与离开 // 页面进入与离开
......
...@@ -17,21 +17,21 @@ const PROJECT_NAME = 'job' ...@@ -17,21 +17,21 @@ const PROJECT_NAME = 'job'
const IS_USE_OSS = process.env.NODE_ENV === 'production' && !env.private const IS_USE_OSS = process.env.NODE_ENV === 'production' && !env.private
const plugins = IS_USE_OSS const plugins = IS_USE_OSS
? [ ? [
// 优化打包速度 // 优化打包速度
new WebpackAliOSSPlugin({ new WebpackAliOSSPlugin({
accessKeyId: 'LTAI5tDdsn3rPhNSkED4jDDz', accessKeyId: 'LTAI5tDdsn3rPhNSkED4jDDz',
accessKeySecret: 'rsWsmunIglT1NqYUNe8fvbjl02UqTk', accessKeySecret: 'rsWsmunIglT1NqYUNe8fvbjl02UqTk',
region: 'oss-cn-hangzhou', region: 'oss-cn-hangzhou',
bucket: `guangdianyun-static-${env.run_server}`, bucket: `guangdianyun-static-${env.run_server}`,
prefix: PROJECT_NAME, prefix: PROJECT_NAME,
limit: 10, // 备份最近 10 个版本的 oss 文件 limit: 10, // 备份最近 10 个版本的 oss 文件
format: version, format: version,
exclude: [/.*\.html$/], // 或者 /.*\.html$/,排除.html文件的上传 exclude: [/.*\.html$/], // 或者 /.*\.html$/,排除.html文件的上传
deleteAll: false, // 优先匹配 format 配置项 deleteAll: false, // 优先匹配 format 配置项
output: path.resolve(__dirname, './nuxt-dist/dist/client'), output: path.resolve(__dirname, './nuxt-dist/dist/client'),
local: true, // 上传打包输出目录里的文件 local: true, // 上传打包输出目录里的文件
}), }),
] ]
: [] : []
const REMOTE_OSS_DOMAIN = `//static-${env.run_server}.guangdianyun.tv` const REMOTE_OSS_DOMAIN = `//static-${env.run_server}.guangdianyun.tv`
...@@ -99,6 +99,7 @@ export default { ...@@ -99,6 +99,7 @@ export default {
{ src: '@/plugins/dmsService', ssr: false }, { src: '@/plugins/dmsService', ssr: false },
{ src: '@/plugins/deviceId', ssr: false }, { src: '@/plugins/deviceId', ssr: false },
{ src: '@/plugins/pvStatisticalService', ssr: false }, { src: '@/plugins/pvStatisticalService', ssr: false },
{ src: '@/plugins/font', ssr: false }
], ],
// Auto import components: https://go.nuxtjs.dev/config-components // Auto import components: https://go.nuxtjs.dev/config-components
......
export default function () {
// eslint-disable-next-line no-undef
if (typeof WeixinJSBridge === "object" && typeof WeixinJSBridge.invoke === "function") {
handleFontSize();
} else if (document.addEventListener) {
document.addEventListener("WeixinJSBridgeReady", handleFontSize, false);
} else if (document.attachEvent) {
document.attachEvent("WeixinJSBridgeReady", handleFontSize);
document.attachEvent("onWeixinJSBridgeReady", handleFontSize);
}
function handleFontSize() {
// eslint-disable-next-line no-undef
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
// eslint-disable-next-line no-undef
WeixinJSBridge.on('menu:setfont', function () {
// eslint-disable-next-line no-undef
WeixinJSBridge.invoke('setFontSizeCallback', { 'fontSize': 0 });
});
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment