Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
activities
/
web-job
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
dbe48e82
authored
Aug 08, 2022
by
Lays-lzq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 修复vx更改字体导致页面布局错位的问题
parent
13459d68
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
15 deletions
+39
-15
assets/styles/main.less
+3
-0
nuxt.config.js
+16
-15
plugins/font.js
+20
-0
No files found.
assets/styles/main.less
View file @
dbe48e82
...
@@ -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;
}
}
// 页面进入与离开
// 页面进入与离开
...
...
nuxt.config.js
View file @
dbe48e82
...
@@ -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
...
...
plugins/font.js
0 → 100644
View file @
dbe48e82
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
});
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment