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
504bc6ea
Commit
504bc6ea
authored
Jun 19, 2025
by
xinzhedeai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:清理无用代码-home
parent
6fdf9f04
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
205 additions
and
396 deletions
+205
-396
home.css
home.css
+79
-0
home.html
home.html
+123
-275
home.js
home.js
+3
-121
No files found.
home.css
View file @
504bc6ea
...
...
@@ -374,3 +374,82 @@ border-right: 1px solid #eee; */
color
:
#666
;
margin-top
:
0.1rem
;
}
/* 新增提醒模块样式 */
.info-reminder
{
width
:
6.9rem
;
height
:
2.54rem
;
background
:
#FFFFFF
;
border-radius
:
0.2rem
;
margin
:
0.3rem
auto
;
padding
:
0.24rem
0.3rem
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
}
.reminder-item
{
position
:
relative
;
width
:
2.2rem
;
height
:
100%
;
text-align
:
center
;
}
.new-badge
{
position
:
absolute
;
top
:
0.15rem
;
right
:
0.1rem
;
min-width
:
.8rem
;
text-align
:
left
;
text-indent
:
.16rem
;
height
:
0.36rem
;
line-height
:
0.36rem
;
font-size
:
0.2rem
;
color
:
#FFFFFF
;
background-image
:
url(image/code/home/tip.png)
;
background-size
:
contain
;
background-repeat
:
no-repeat
;
}
.reminder-badge
{
position
:
absolute
;
top
:
-0.15rem
;
right
:
0.2rem
;
min-width
:
0.4rem
;
height
:
0.4rem
;
line-height
:
0.4rem
;
padding
:
0
0.12rem
;
border-radius
:
0.2rem
;
font-size
:
0.24rem
;
color
:
#FFFFFF
;
background
:
#00AEF1
;
}
.reminder-badge1
{
background
:
#00AEF1
;
/* 默认 蓝色 */
}
.reminder-badge2
{
background
:
#FF9C01
;
/* 橙黄色 */
}
.reminder-badge2
{
background
:
#FF4D4F
;
/* 红色 */
}
.reminder-img
{
width
:
1.2rem
;
height
:
1.2rem
;
margin-bottom
:
0.16rem
;
}
.reminder-text
{
font-size
:
0.28rem
;
color
:
#333333
;
line-height
:
1.2
;
}
\ No newline at end of file
home.html
View file @
504bc6ea
This diff is collapsed.
Click to expand it.
home.js
View file @
504bc6ea
...
...
@@ -18,26 +18,6 @@ window.onload = function () {
// 日期选择的最大范围,这里设置为当前日期的后 10 年
// maxDate: new Date(new Date().getFullYear() + 10, 11),
maxDate
:
new
Date
(),
// checkModules: [
// {
// intro: '提交检查反馈',
// },
// {
// intro: '查看检查历史记录',
// },
// {
// intro: '提交检查反馈',
// },
// {
// intro: '下载检查报告',
// },
// {
// intro: '查看隐患详情',
// },
// {
// intro: '设置检查提醒',
// },
// ],
userInfo
:
{
userType
:
'
sj1
'
,
// 登录用户type
userType
:
'
consumers
'
,
// 登录用户type
...
...
@@ -51,51 +31,7 @@ window.onload = function () {
},
showOrg
:
false
,
//是否显示组织
showShop
:
false
,
//是否显示店铺
// 登录用户type
// defaultMenuList: [
// {
// className: 'saoma',
// title: '扫码检查',
// remark: '',
// navTo: false,
// },
// {
// className: 'jiancha',
// title: '检查记录',
// remark: '',
// navTo: 'checkrecord-all',
// },
// {
// className: 'yinhuan',
// title: '隐患记录',
// remark: '',
// navTo: 'yh_check',
// },
// {
// className: 'yinhuan',
// title: '隐患整改',
// remark: '',
// navTo: 'yh_check',
// },
// {
// className: 'shangjia',
// title: '商家信息',
// remark: '',
// navTo: 'shanghu_detail-edit',
// },
// {
// className: 'zicha',
// title: '安全自查',
// remark: '',
// navTo: 'check_info',
// },
// {
// className: 'shangbao',
// title: '隐患上报',
// remark: '',
// navTo: 'shangbao-list',
// },
// ],
// 修改默认菜单结构为最小化配置
menuList
:
[],
// 初始化为空数组,等待接口数据填充
...
...
@@ -118,14 +54,6 @@ window.onload = function () {
},
computed
:
{},
methods
:
{
// 新增:年份倒序过滤函数
filterYear
(
type
,
options
)
{
console
.
log
(
options
,
'
options
'
)
if
(
type
===
'
year
'
)
{
return
options
.
reverse
();
// 仅对年份类型反转选项数组
}
return
options
;
// 其他类型保持原顺序
},
getRemindStatistic
()
{
http2
.
post
(
{
...
...
@@ -281,9 +209,8 @@ window.onload = function () {
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
// this.getList
()
this
.
getUserInfo
()
},
0
)
return
}
...
...
@@ -319,51 +246,10 @@ window.onload = function () {
this
.
showShop
=
false
//是否显示店铺
}
/* if (this.userInfo.userType === 'consumers') { // 2025年5月14日新增消费者逻辑
// 根据url地址的merid获取商户信息
if (gemhoUtil.getParameter('merId')) { // 消费者直接在爱山东扫商户码进入首页
// this.getMerInfo()
param = {
merId: gemhoUtil.getParameter('merId'),
pageName: 'src/_consumer_home',
}
let url = gemhoUtil.setParameter(`${param.pageName}.html`, param)
gemhoUtil.navigatePage(url, '跳转中...')
return
} 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'
// }
// // 2025年6月9日 跳转检查记录 统一跳转新页面。
// this.defaultMenuList[1].navTo = 'checkrecord-all'
console
.
log
(
'
菜单
'
,
result
.
data
.
modules
)
// 生成最终菜单列表
this
.
menuList
=
result
.
data
.
modules
// this.menuList = (result.data.modules || []).map(
// (moduleItem) => ({
// ...(this.defaultMenuList.find(
// (d) => d.title === moduleItem.title
// ) || {}),
// ...moduleItem,
// remark: moduleItem.remark || '',
// })
// )
}
setTimeout
(()
=>
{
this
.
$nextTick
(()
=>
{
...
...
@@ -389,10 +275,7 @@ window.onload = function () {
interfacePrivateKey
:
API_KEY_MAP
[
'
no-page
'
][
'
privateKey
'
],
reqParams
:
{
sign
:
6
,
pageNum
:
this
.
page
++
,
// 每次请求增加下一页
pageSize
:
this
.
size
,
date
:
this
.
selectedDate
,
sort
:
'
lawId,desc
'
,
merId
:
gemhoUtil
.
getParameter
(
'
merId
'
),
},
},
...
...
@@ -400,9 +283,8 @@ window.onload = function () {
if
(
!
res
)
{
// 中台返回为undefined 重新请求
vant
.
Toast
.
clear
()
this
.
page
=
this
.
page
-
1
// 重新请求后,分页数恢复上一次请求的值
setTimeout
(()
=>
{
// this.getList
()
this
.
getUserData
()
},
0
)
return
}
...
...
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