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
c62c7b1f
Commit
c62c7b1f
authored
Apr 15, 2025
by
lei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add:设置index.html为登录页,home为主页
parent
129f3d64
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
214 additions
and
140 deletions
+214
-140
home.css
home.css
+0
-0
home.html
home.html
+175
-0
home.js
home.js
+0
-0
index.html
index.html
+36
-138
includeHead.js
sdk/includeHead.js
+1
-1
index.js
sdk/jssdk2/index.js
+2
-1
No files found.
index
.css
→
home
.css
View file @
c62c7b1f
File moved
home.html
0 → 100644
View file @
c62c7b1f
<!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"
/>
<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"
/>
<!-- 在 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>
'
)
}
</script>
<script
type=
"text/javascript"
src=
"./home.js"
></script>
<div
id=
"app"
class=
"page_wrapper"
>
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer second-layer-zf"
v-if=
"userInfo.userType!=='shop'"
v-cloak
>
<img
class=
"merchant-icon"
src=
"image/code/zhengfu_logo.png"
alt=
""
/>
<div
class=
"merchant-info welcome"
>
<p>
欢迎您,{{userInfo.deptName}}
<br
/>
进入安全“码”上查
</p>
<div
class=
"user_tag"
>
<img
src=
"image/code/user.png"
alt=
""
/>
<span>
{{userInfo.roleName}}
</span>
</div>
</div>
</div>
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer-sj"
v-if=
"userInfo.userType=='shop'"
v-cloak
>
<div
class=
"header"
>
<span>
商家信息
</span>
<div
class=
"user_tag"
>
<img
src=
"image/code/user.png"
alt=
""
/>
<span>
商家
</span>
</div>
</div>
<div
class=
"bottom"
>
<div
class=
"left"
>
<img
class=
"merchant-icon"
src=
"image/code/sj.png"
alt=
"商户图标"
/>
</div>
<div
class=
"right"
>
<div
class=
"merchant-info"
>
<div
class=
"name-rank"
>
<span
class=
"merchant-name"
>
{{userInfo.unitName}}
</span>
<span
class=
"user-rank"
>
安全等级:绿
</span>
</div>
<div
class=
"divider"
></div>
<div
class=
"type-address"
>
<p>
场所类型:{{userInfo.smallPlaceTypeName}}
</p>
<p>
{{userInfo.businessAddress}}
</p>
</div>
</div>
</div>
</div>
</div>
<!-- 第三层:统计信息 -->
<div
class=
"third-layer"
v-cloak
>
<div
class=
"stats-header"
>
<div
class=
"stats-title"
>
数据统计
</div>
<!-- <van-cell-group> -->
<div
@
click=
"showPopup('showPopup4completionDate')"
style=
"position: absolute; top: -0.08rem; right: 0.4rem"
>
<span
class=
"formValue"
>
{{showDate|formatterData}}
</span><van-icon
name=
"arrow-down"
/>
</div>
<van-popup
v-model=
"showPopup4completionDate"
position=
"bottom"
>
<van-datetime-picker
v-model=
"selectedDate"
:min-date=
"minDate"
type=
"year-month"
title=
"选择年月"
@
confirm=
"confirm4completionDate"
@
cancel=
"showPopup4completionDate=false"
:formatter=
"needData"
/>
</van-popup>
<!-- </van-cell-group> -->
</div>
<div
class=
"stats-content"
>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.checkCount}}次
</div>
<div
class=
"stat-label"
>
检查数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.checkSelfCount}}次
</div>
<div
class=
"stat-label"
>
自查数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.hiddenCount}}处
</div>
<div
class=
"stat-label"
>
隐患数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.hiddenNoReCount}}处
</div>
<div
class=
"stat-label"
>
未整改
</div>
</div>
</div>
</div>
<!-- 第四层:检查专区 -->
<div
class=
"fourth-layer"
v-cloak
>
<h2>
检查专区
</h2>
<div
class=
"check-modules"
>
<div
class=
"check-module"
v-for=
"(item,index) in menuList"
:key=
"index"
:class=
"item.className"
@
click=
"scanCode(item.navTo)"
>
<p>
{{item.title}}
<van-icon
name=
"arrow"
/></p>
<p
class=
"module-intro"
>
{{item.remark}}
</p>
</div>
</div>
</div>
</div>
</body>
</html>
index
.js
→
home
.js
View file @
c62c7b1f
File moved
index.html
View file @
c62c7b1f
...
...
@@ -17,159 +17,57 @@
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=
"index.css"
/>
<!-- 在 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>
'
)
}
</script>
<script
type=
"text/javascript"
src=
"./index.js"
></script>
<div
id=
"app"
class=
"page_wrapper"
>
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer second-layer-zf"
v-if=
"userInfo.userType!=='shop'"
v-cloak
<van-button
type=
"primary"
@
click=
"goHome"
>
进入主页
</van-button
>
<img
class=
"merchant-icon"
src=
"image/code/zhengfu_logo.png"
alt=
""
/>
<div
class=
"merchant-info welcome"
>
<p>
欢迎您,{{userInfo.deptName}}
<br
/>
进入安全“码”上查
</p>
<div
class=
"user_tag"
>
<img
src=
"image/code/user.png"
alt=
""
/>
<span>
{{userInfo.roleName}}
</span>
</div>
</div>
</div>
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer-sj"
v-if=
"userInfo.userType=='shop'"
v-cloak
<div>
{{token}}
</div>
<div>
欢迎您:{{userName}}
</div>
<van-button
type=
"primary"
@
click=
"getuserinfo"
>
获取用户信息
</van-button
>
<div
class=
"header"
>
<span>
商家信息
</span>
<div
class=
"user_tag"
>
<img
src=
"image/code/user.png"
alt=
""
/>
<span>
商家
</span>
</div>
</div>
<div
class=
"bottom"
>
<div
class=
"left"
>
<img
class=
"merchant-icon"
src=
"image/code/sj.png"
alt=
"商户图标"
/>
</div>
<div
class=
"right"
>
<div
class=
"merchant-info"
>
<div
class=
"name-rank"
>
<span
class=
"merchant-name"
>
{{userInfo.unitName}}
</span>
<span
class=
"user-rank"
>
安全等级:绿
</span>
</div>
<div
class=
"divider"
></div>
<div
class=
"type-address"
>
<p>
场所类型:{{userInfo.smallPlaceTypeName}}
</p>
<p>
{{userInfo.businessAddress}}
</p>
</div>
</div>
</div>
</div>
</div>
<!-- 第三层:统计信息 -->
<div
class=
"third-layer"
v-cloak
>
<div
class=
"stats-header"
>
<div
class=
"stats-title"
>
数据统计
</div>
<!-- <van-cell-group> -->
<div
@
click=
"showPopup('showPopup4completionDate')"
style=
"position: absolute; top: -0.08rem; right: 0.4rem"
>
<span
class=
"formValue"
>
{{showDate|formatterData}}
</span><van-icon
name=
"arrow-down"
/>
</div>
<van-popup
v-model=
"showPopup4completionDate"
position=
"bottom"
>
<van-datetime-picker
v-model=
"selectedDate"
:min-date=
"minDate"
type=
"year-month"
title=
"选择年月"
@
confirm=
"confirm4completionDate"
@
cancel=
"showPopup4completionDate=false"
:formatter=
"needData"
/>
</van-popup>
<!-- </van-cell-group> -->
</div>
<div
class=
"stats-content"
>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.checkCount}}次
</div>
<div
class=
"stat-label"
>
检查数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.checkSelfCount}}次
</div>
<div
class=
"stat-label"
>
自查数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.hiddenCount}}处
</div>
<div
class=
"stat-label"
>
隐患数
</div>
</div>
<div
class=
"stat-item"
>
<div
class=
"stat-value"
>
{{userData.hiddenNoReCount}}处
</div>
<div
class=
"stat-label"
>
未整改
</div>
</div>
</div>
</div>
<!-- 第四层:检查专区 -->
<div
class=
"fourth-layer"
v-cloak
>
<h2>
检查专区
</h2>
<div
class=
"check-modules"
>
<div
class=
"check-module"
v-for=
"(item,index) in menuList"
:key=
"index"
:class=
"item.className"
@
click=
"scanCode(item.navTo)"
>
<p>
{{item.title}}
<van-icon
name=
"arrow"
/></p>
<p
class=
"module-intro"
>
{{item.remark}}
</p>
</div>
</div>
</div>
</div>
</body>
<script>
new
Vue
({
el
:
'
#app
'
,
data
()
{
return
{
token
:
''
,
// 存储token
userName
:
''
,
}
},
mounted
()
{
// 获取token
this
.
token
=
gemhoUtil
.
getCookie
(
'
token
'
)
this
.
userName
=
gemhoUtil
.
getCookie
(
'
username
'
)
},
methods
:
{
goHome
()
{
// 跳转到主页
gemhoUtil
.
navigatePage
(
'
home.html
'
,
'
跳转中...
'
)
},
getuserinfo
()
{
this
.
token
=
gemhoUtil
.
getCookie
(
'
token
'
)
this
.
userName
=
gemhoUtil
.
getCookie
(
'
username
'
)
},
},
})
</script>
</html>
sdk/includeHead.js
View file @
c62c7b1f
var
jsVersion
=
+
new
Date
()
// '?v=202106091751';
var
contextPath
=
'
.
'
if
(
getPageN
()
===
'
index
'
)
{
if
(
getPageN
()
===
'
index
'
||
getPageN
()
===
'
home
'
)
{
contextPath
=
'
.
'
}
else
{
contextPath
=
'
..
'
...
...
sdk/jssdk2/index.js
View file @
c62c7b1f
...
...
@@ -26,6 +26,7 @@ function getUserInfo() {
else
{
// 2025-1-14 新增逻辑:获取用户票据,用于后续接口传参使用
const
ticketInfo
=
await
getTicket
()
if
(
ticketInfo
.
ticket
)
{
gemhoUtil
.
setCookie
(
'
ticket
'
,
ticketInfo
.
ticket
)
}
else
{
...
...
@@ -71,6 +72,7 @@ function getUserInfo() {
// loginname: 'zjb'// aes_decrypt_result.loginname
}
// 请求获取高区应急后台真是token,传参,授权获取的用户信息
gemhoUtil
.
setCookie
(
'
username
'
,
reqParammm
.
name
,
1
)
// 存储1天后过期
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
login
'
][
'
id
'
],
...
...
@@ -87,7 +89,6 @@ function getUserInfo() {
// localStorage.setItem('token', result.token)
if
(
result
.
code
==
200
)
{
gemhoUtil
.
setCookie
(
'
token
'
,
result
.
token
,
1
)
// 存储1天后过期
// gemhoUtil.navigatePage('index.html', '跳转中...')
}
else
{
vant
.
Dialog
.
alert
({
title
:
'
信息提示
'
,
...
...
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