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
f85104ed
Commit
f85104ed
authored
May 16, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消费者模块原需求已开发75%-备份
parent
c9a7c41d
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
333 additions
and
28 deletions
+333
-28
home.html
home.html
+13
-1
home.js
home.js
+71
-21
axios_http.js
sdk/axios_http.js
+5
-1
axios_http3.js
sdk/axios_http3.js
+6
-5
_anquanjiandu_list.html
src/_anquanjiandu_list.html
+78
-0
_anquanjiandu_list.js
src/_anquanjiandu_list.js
+151
-0
_shanghu_detail.html
src/_shanghu_detail.html
+6
-0
_shanghu_detail.js
src/_shanghu_detail.js
+3
-0
No files found.
home.html
View file @
f85104ed
...
...
@@ -74,7 +74,7 @@
<!-- 第二层:商户图标、名称、等级、场所类型和地址 -->
<div
class=
"second-layer-sj"
v-if=
"
userInfo.userType=='shop'
"
v-if=
"
['shop','consumers'].includes(userInfo.userType)
"
v-cloak
>
<div
class=
"header"
>
...
...
@@ -166,6 +166,7 @@
<!-- 第四层:检查专区 -->
<div
class=
"fourth-layer"
v-if=
"!['consumers'].includes(userInfo.userType)"
v-cloak
>
<h2>
检查专区
</h2>
...
...
@@ -182,6 +183,17 @@
</div>
</div>
</div>
<!-- 消费者功能按钮 -->
<div
style=
"width:100vw;text-align:center;"
>
<van-button
type=
"info"
size=
"small"
style=
"width: 92vw;height: .8rem;margin: 0 auto;border-radius: .1rem;"
@
click=
"scanCode('check_info')"
>
安全监督
</van-button>
</div>
</div>
</body>
</html>
home.js
View file @
f85104ed
...
...
@@ -38,7 +38,7 @@ window.onload = function () {
},
],
userInfo
:
{
userType
:
'
sj1
'
,
// 登录用户type
userType
:
'
consumers
'
,
// 登录用户type
userId
:
'
1
'
,
// 登录用户id
userName
:
'
张三
'
,
// 登录用户name
deptId
:
'
1
'
,
// 登录用户部门id
...
...
@@ -107,6 +107,7 @@ window.onload = function () {
computed
:
{},
methods
:
{
scanCode
(
toData
)
{
location
.
href
=
""
if
(
toData
===
false
)
{
lightAppJssdk
.
device
.
scan
({
success
:
function
(
data
)
{
...
...
@@ -158,6 +159,13 @@ window.onload = function () {
}
}
}
if
(
this
.
userInfo
.
userType
===
'
consumers
'
)
{
param
=
{
flag
:
'
ADD
'
,
merId
:
gemhoUtil
.
getParameter
(
'
merId
'
),
pageName
:
'
../home
'
,
}
}
let
url
=
gemhoUtil
.
setParameter
(
`src/_
${
toData
}
.html`
,
param
)
gemhoUtil
.
navigatePage
(
url
,
'
跳转中...
'
)
// gemhoUtil.navigatePage(`src/_${toData}.html`)
...
...
@@ -230,6 +238,8 @@ window.onload = function () {
if
(
result
.
code
!==
200
&&
result
.
data
==
null
)
{
return
}
this
.
userInfo
=
{
userType
:
result
.
data
.
roleDeptNameVo
.
userType
,
// 登录用户type
userId
:
'
1
'
,
// 登录用户id
...
...
@@ -246,7 +256,25 @@ window.onload = function () {
merId
:
result
.
data
.
merchantInfoNumVo
?.
id
,
//
}
gemhoUtil
.
setCookie
(
'
userType
'
,
this
.
userInfo
.
userType
)
if
(
this
.
userInfo
.
userType
===
'
shop
'
)
{
if
(
this
.
userInfo
.
userType
=
'
consumers
'
){
// 2025年5月14日新增消费者逻辑
// 根据url地址的merid获取商户信息
if
(
gemhoUtil
.
getParameter
(
'
merId
'
)){
// 消费者直接在爱山东扫商户码进入首页
this
.
getMerInfo
()
}
else
{
// 消费者直接在爱山东点击应用进入首页
vant
.
Dialog
.
alert
({
title
:
'
信息提示
'
,
message
:
'
请扫描商户码访问~
'
,
}).
then
(()
=>
{
// 关闭当前访问页面回到爱山东
lightAppJssdk
.
navigation
.
close
({
success
:
function
(
data
)
{
},
fail
:
function
(
data
)
{
},
})
});
}
return
}
else
if
(
this
.
userInfo
.
userType
===
'
shop
'
)
{
this
.
defaultMenuList
[
1
].
navTo
=
'
checkrecord
'
}
else
{
this
.
defaultMenuList
[
1
].
navTo
=
'
shanghu_list
'
...
...
@@ -261,21 +289,12 @@ window.onload = function () {
remark
:
moduleItem
.
remark
||
''
,
})
)
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
// 下滑不在刷新数据
}
}
this
.
loading
=
false
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
)
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
))
})
}
)
},
0
)
...
...
@@ -299,6 +318,7 @@ window.onload = function () {
pageSize
:
this
.
size
,
date
:
this
.
selectedDate
,
sort
:
'
lawId,desc
'
,
merId
:
gemhoUtil
.
getParameter
(
'
merId
'
),
},
},
(
res
)
=>
{
...
...
@@ -318,16 +338,45 @@ window.onload = function () {
}
)
},
0
)
// http
// .get(
// '/gq/checkRecord/merHomeStatistics?merId=1&date=' +
// this.selectedDate
// )
// .then((res) => {
// if (res.code == 200) {
// this.userData = res.data
// }
// })
},
getMerInfo
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
});
http2
.
post
({
serviceId
:
API_KEY_MAP
[
"
no-page
"
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
"
no-page
"
][
"
publicKey
"
],
interfacePrivateKey
:
API_KEY_MAP
[
"
no-page
"
][
"
privateKey
"
],
reqParams
:
{
sign
:
11
,
"
merId
"
:
gemhoUtil
.
getParameter
(
'
merId
'
),
}
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
setTimeout
(()
=>
{
this
.
getMerInfo
()
},
0
);
return
}
if
(
res
)
{
console
.
log
(
'
接口回调数据
'
,
JSON
.
parse
(
res
))
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
);
var
result
=
JSON
.
parse
(
res
)
console
.
log
(
result
)
this
.
userInfo
.
businessAddress
=
result
.
data
.
businessAddress
,
//
this
.
userInfo
.
smallPlaceTypeName
=
result
.
data
.
smallPlaceTypeName
,
//
this
.
userInfo
.
unitName
=
result
.
data
.
unitName
}
})
},
},
//过滤器
...
...
@@ -339,5 +388,6 @@ window.onload = function () {
return
`
${
year
}
年
${
month
}
月`
},
},
})
}
sdk/axios_http.js
View file @
f85104ed
...
...
@@ -9,8 +9,12 @@ axios.defaults.timeout = 50000
axios
.
defaults
.
headers
.
post
[
'
Content-Type
'
]
=
'
application/json
'
// axios.defaults.headers.common['Authorization'] = gemhoUtil.getCookie('token')
// 商户token
// axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6ImYzZDMwY2Q4LWY5ODAtNGE0NC1iNzE1LTZiMTJlNGQyZTQ1OCJ9.HjtdJuJS7NjTw4GMaAtDtOeA2EnF75pXVQefzwkdrxQdxyHB6L8h0XhKSB5A_YMsznQMd4DZrGZ5TPEmc1fueg'
// 商户token
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6ImYzZDMwY2Q4LWY5ODAtNGE0NC1iNzE1LTZiMTJlNGQyZTQ1OCJ9.HjtdJuJS7NjTw4GMaAtDtOeA2EnF75pXVQefzwkdrxQdxyHB6L8h0XhKSB5A_YMsznQMd4DZrGZ5TPEmc1fueg
'
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg
'
// admin账号token
// axios.defaults.headers.common['Authorization'] =
...
...
sdk/axios_http3.js
View file @
f85104ed
...
...
@@ -6,12 +6,13 @@
if
(
window
.
env
==
'
dev
'
)
{
axios
.
defaults
.
baseURL
=
'
http://192.168.2.37:8080
'
// 商户token
// axios.defaults.headers.common['Authorization'] =
// 'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLlvKDlrZ3lvakiLCJsb2dpbl91c2VyX2tleSI6IjNjMmRiMWFiLWIyZGMtNDBjYi04YjM5LWRiNTJmM2VmYzNkYyJ9.sfZyPP-COShNCjwxKR26zGDsPHXss97gu7JEpaMapIZyMQEsxzMigVickcqdhaqDwTRcfr0IxAj64vnrriS9Cw'
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiLmtojotLnogIUiLCJsb2dpbl91c2VyX2tleSI6ImExNWIwMDNjLWRlYWItNGU2MC04ODg4LTJiODNjMzVkNDUzNSJ9.l6gHzFX-U5rKGJ7zoDA4jMBIxkhVgCjWr5ynFg1DR6xspM9Ls6raTxyEo2Kr61UbG2UD6P2kN63vF_U8nX8afg
'
gemhoUtil
.
setCookie
(
'
userType
'
,
'
consumers
'
)
// admin账号token
axios
.
defaults
.
headers
.
common
[
'
Authorization
'
]
=
'
Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ
'
//
axios.defaults.headers.common['Authorization'] =
//
'Bearer eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImxvZ2luX3VzZXJfa2V5IjoiYjA1MWRmZmEtYWE4Yy00NTNiLThlNGUtMTdjOTEzYmMwOWFkIn0.nj2miSFFPQRDabzhq_05z_wW0w13quXBooQbbtnyRZQxOhxenEQQZM3OgKjgd8AxjY7W2uKlpdyqGuTmMb1PRQ'
}
else
{
axios
.
defaults
.
baseURL
=
'
https://gqyjpt.weihai.cn/prod-api
'
...
...
src/_anquanjiandu_list.html
0 → 100644
View file @
f85104ed
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<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>
<script
type=
"text/javascript"
src=
"../sdk/includeHead.js"
></script>
<style>
html
,
body
{
background
:
#F5F6FA
;
}
.wrapper
{
}
.header
{
width
:
100vw
;
}
/* 条件查询样式 */
.header
.van-search__label
{
background-color
:
#fff
;
padding-right
:
.24rem
;
}
.header
.van-search__content
{
padding-left
:
0
;
}
.header
.van-search__content
.van-cell
{
padding-left
:
0.24rem
;
}
.van-list
{
padding-left
:
0.2rem
;
padding-right
:
0.2rem
;
}
</style>
</head>
<body>
<div
id=
"app"
>
<div
class=
"wrapper"
v-cloak
>
<!-- 隐患列表 -->
<van-list
v-model:loading=
"loading"
:offset=
"10"
:finished=
"finished"
finished-text=
"没有更多了"
@
load=
"getList"
:immediate-check=
"false"
>
<van-cell
v-for=
"item in list"
:key=
"item.id"
style=
"position: relative;margin-bottom: 0.25rem;margin-top: 0.25rem;"
@
click=
"viewDetail(item)"
>
<div
style=
"width: 100%;"
>
<!-- 第一行:隐患描述 -->
<div
style=
"
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: #333;
font-size: 0.3rem;
font-weight: bold;
font-family: PingFang SC;
"
>
{{ item.description }}
</div>
<!-- 第二行:状态和时间 -->
<div
style=
"position: relative: flex; justify-content: space-between; margin: 8px 0;"
>
<span
style=
"color: #737373; font-size: 0.28rem;"
>
{{ '2025/2/12' }}
</span>
<van-icon
name=
"arrow"
style=
"position: absolute; right:0;top:.5rem;font-size:.4rem;"
@
click=
"viewDetail(item,'YH_XQ')"
/>
</div>
</div>
</van-cell>
</van-list>
</div>
</body>
</html>
\ No newline at end of file
src/_anquanjiandu_list.js
0 → 100644
View file @
f85104ed
/**
* author: dabao
*/
var
VUE
=
null
window
.
addEventListener
(
'
load
'
,
function
()
{
VUE
=
new
Vue
({
el
:
'
#app
'
,
data
()
{
return
{
merName
:
''
,
value
:
''
,
list
:
[],
loading
:
false
,
finished
:
false
,
page
:
0
,
size
:
9999
,
total
:
0
,
}
},
mounted
()
{
this
.
getList
()
},
methods
:
{
viewDetail
(
itme
)
{
let
param
=
{
merId
:
itme
.
id
,
unitName
:
itme
.
unitName
,
smallPlaceTypeName
:
itme
.
smallPlaceTypeName
,
pageName
:
'
_shanghu_list
'
,
}
let
url
=
gemhoUtil
.
setParameter
(
'
_checkrecord.html
'
,
param
)
gemhoUtil
.
navigatePage
(
url
,
'
跳转中...
'
)
},
//获取商户自查数据
getMerchantSelfCheckData
()
{
// 更多示例数据...
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
})
setTimeout
(()
=>
{
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
1
,
type
:
'
3
'
,
merId
:
this
.
merId
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
// this.getList()
},
0
)
return
}
if
(
res
)
{
var
result
=
JSON
.
parse
(
res
)
if
(
result
.
code
!==
200
&&
result
.
data
==
null
)
{
return
}
this
.
list
=
result
.
rows
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
// 下滑不在刷新数据
}
}
this
.
loading
=
false
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
)
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
))
})
}
)
},
0
)
},
getList
()
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
forbidClick
:
true
,
loadingType
:
'
spinner
'
,
})
setTimeout
(()
=>
{
http2
.
post
(
{
serviceId
:
API_KEY_MAP
[
'
page
'
][
'
id
'
],
interfacePublicKey
:
API_KEY_MAP
[
'
page
'
][
'
publicKey
'
],
interfacePrivateKey
:
API_KEY_MAP
[
'
page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
3
,
type
:
'
3
'
,
"
merId
"
:
gemhoUtil
.
getParameter
(
'
merId
'
),
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
sort
:
'
lawId,desc
'
,
},
},
(
res
)
=>
{
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
// this.getList()
},
0
)
return
}
if
(
res
)
{
// console.log('接口回调数据', JSON.parse(res))
var
result
=
JSON
.
parse
(
res
)
this
.
list
=
result
.
rows
// this.total = result.totalElements
if
(
this
.
page
*
this
.
size
>=
this
.
total
)
{
this
.
finished
=
true
// 下滑不在刷新数据
}
}
this
.
loading
=
false
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
vant
.
Toast
.
clear
()
})
},
0
)
this
.
$nextTick
(()
=>
{
// 滚动条跳转位置
window
.
scrollTo
(
0
,
gemhoUtil
.
getCookie
(
'
scrollPosition
'
))
})
}
)
},
0
)
},
},
})
})
src/_shanghu_detail.html
View file @
f85104ed
...
...
@@ -40,6 +40,12 @@
<van-cell-group>
<van-field
label=
"场所类型"
v-model=
"formData.smallPlaceTypeName"
:disabled=
"flag=='XQ'"
/>
</van-cell-group>
<van-cell-group>
<div
class=
"textStyleWrapper"
>
<span
class=
"textStyleLabel"
style=
"width:2rem;"
>
消费者安全监督
</span>
<van-icon
name=
"arrow"
style=
"position: absolute; right:0;top:.3rem;font-size:.33rem;"
@
click=
"viewDetail4jiandu"
/>
</div>
</van-cell-group>
<!-- <van-cell-group>
<van-field label="场所类型" v-model="formData.type" placeholder="请选择场所类型" readonly clickable
@click="showTypePicker = true" />
...
...
src/_shanghu_detail.js
View file @
f85104ed
...
...
@@ -49,6 +49,9 @@ window.addEventListener('load', function () {
this
.
detail
()
},
methods
:
{
viewDetail4jiandu
(){
gemhoUtil
.
navigatePage
(
'
./_anquanjiandu_list.html?merId=
'
+
this
.
formData
.
id
,
'
跳转中...
'
)
},
detail
(
id
)
{
vant
.
Toast
.
loading
({
message
:
'
正在加载...
'
,
...
...
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