Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
GaoQuYingJiH5-ASD
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xinzhedeai
GaoQuYingJiH5-ASD
Commits
2e70546b
Commit
2e70546b
authored
Jul 09, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add :权限变量值公共提取,逻辑判断代码修改。工具js加载时序问题优化处理。去除无用js引用。
parent
3a47b3f6
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
295 additions
and
290 deletions
+295
-290
home.css
home.css
+3
-2
home.html
home.html
+14
-17
home.js
home.js
+259
-271
util.js
sdk/util.js
+19
-0
No files found.
home.css
View file @
2e70546b
body
{
letter-spacing
:
0.02rem
;
[
v-cloak
]
{
display
:
none
;
}
.page_wrapper
{
...
...
@@ -16,6 +16,7 @@ body {
}
body
{
letter-spacing
:
0.02rem
;
font-family
:
-apple-system
,
BlinkMacSystemFont
,
'Segoe UI'
,
Roboto
,
Oxygen
,
Ubuntu
,
Cantarell
,
'Open Sans'
,
'Helvetica Neue'
,
sans-serif
;
background-color
:
#f5f5f5
;
}
...
...
home.html
View file @
2e70546b
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
<title>
商户检查页面
</title>
<meta
charset=
"UTF-8"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
/>
<title>
高区安全“码”上查监管平台-首页
</title>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0, viewprot-fit:cover"
/>
<title>
高区安全“码”上查监管平台-首页
</title>
<link
rel=
"stylesheet"
href=
"home.css"
/>
<style>
[
v-cloak
]
{
display
:
none
;
}
</style>
<!-- 在 includeHead.js 之后添加环境判断 -->
<script
src=
"./sdk/includeHead.js"
></script>
</head>
<body>
<!-- 获取授权用户信息 本地token等操作 -->
<script>
if
(
window
.
env
===
'
pro
'
)
{
document
.
write
(
'
<script type="text/javascript" src="sdk/jssdk2/index.js"><
\
/script>
'
)
}
// 监听 includeHead.js 加载完成事件
document
.
querySelector
(
'
script[src="./sdk/includeHead.js"]
'
).
onload
=
function
()
{
// includeHead.js 加载完成后,动态加载 home.js
const
homeScript
=
document
.
createElement
(
'
script
'
);
homeScript
.
type
=
'
text/javascript
'
;
homeScript
.
src
=
'
./home.js
'
;
document
.
body
.
appendChild
(
homeScript
);
};
</script>
<script
type=
"text/javascript"
src=
"./home.js"
></script>
</head>
<body>
<div
id=
"app"
class=
"page_wrapper"
v-cloak
>
<!-- 原有内容(数据加载完成后显示) -->
<div
v-show=
"!isLoading"
>
...
...
home.js
View file @
2e70546b
This diff is collapsed.
Click to expand it.
sdk/util.js
View file @
2e70546b
// ['admin', 'common', 'industry', 'street', 'wgy']
var
AUTH
=
{
WGY
:
'
wgy
'
,
// 网格员
SHOP
:
'
shop
'
,
// 商户
CONSUMERS
:
'
consumers
'
,
// 消费者
}
var
gemhoUtil
=
window
.
gemhoUtil
||
{}
gemhoUtil
.
isWgy
=
function
()
{
return
gemhoUtil
.
getCookie
(
'
userType
'
)
==
AUTH
.
WGY
}
gemhoUtil
.
isShop
=
function
()
{
return
gemhoUtil
.
getCookie
(
'
userType
'
)
===
AUTH
.
SHOP
}
gemhoUtil
.
isConsumers
=
function
()
{
return
gemhoUtil
.
getCookie
(
'
userType
'
)
==
AUTH
.
CONSUMERS
}
gemhoUtil
.
formatDate
=
function
(
date
,
type
)
{
var
ymd
=
`
${
date
.
getFullYear
()}
-
${
(
date
.
getMonth
()
+
1
>
9
?
''
:
'
0
'
)
+
(
date
.
getMonth
()
+
1
)
...
...
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