Commit 504bc6ea authored by xinzhedeai's avatar xinzhedeai

fix:清理无用代码-home

parent 6fdf9f04
...@@ -374,3 +374,82 @@ border-right: 1px solid #eee; */ ...@@ -374,3 +374,82 @@ border-right: 1px solid #eee; */
color: #666; color: #666;
margin-top: 0.1rem; 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
This diff is collapsed.
...@@ -18,26 +18,6 @@ window.onload = function () { ...@@ -18,26 +18,6 @@ window.onload = function () {
// 日期选择的最大范围,这里设置为当前日期的后 10 年 // 日期选择的最大范围,这里设置为当前日期的后 10 年
// maxDate: new Date(new Date().getFullYear() + 10, 11), // maxDate: new Date(new Date().getFullYear() + 10, 11),
maxDate: new Date(), maxDate: new Date(),
// checkModules: [
// {
// intro: '提交检查反馈',
// },
// {
// intro: '查看检查历史记录',
// },
// {
// intro: '提交检查反馈',
// },
// {
// intro: '下载检查报告',
// },
// {
// intro: '查看隐患详情',
// },
// {
// intro: '设置检查提醒',
// },
// ],
userInfo: { userInfo: {
userType: 'sj1', // 登录用户type userType: 'sj1', // 登录用户type
userType: 'consumers', // 登录用户type userType: 'consumers', // 登录用户type
...@@ -51,51 +31,7 @@ window.onload = function () { ...@@ -51,51 +31,7 @@ window.onload = function () {
}, },
showOrg: false, //是否显示组织 showOrg: false, //是否显示组织
showShop: 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: [], menuList: [],
// 初始化为空数组,等待接口数据填充 // 初始化为空数组,等待接口数据填充
...@@ -118,14 +54,6 @@ window.onload = function () { ...@@ -118,14 +54,6 @@ window.onload = function () {
}, },
computed: {}, computed: {},
methods: { methods: {
// 新增:年份倒序过滤函数
filterYear(type, options) {
console.log(options, 'options')
if (type === 'year') {
return options.reverse(); // 仅对年份类型反转选项数组
}
return options; // 其他类型保持原顺序
},
getRemindStatistic() { getRemindStatistic() {
http2.post( http2.post(
{ {
...@@ -281,9 +209,8 @@ window.onload = function () { ...@@ -281,9 +209,8 @@ window.onload = function () {
if (!res) { if (!res) {
// 中台返回为undefined 重新请求 // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => { setTimeout(() => {
// this.getList() this.getUserInfo()
}, 0) }, 0)
return return
} }
...@@ -319,51 +246,10 @@ window.onload = function () { ...@@ -319,51 +246,10 @@ window.onload = function () {
this.showShop = false //是否显示店铺 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) console.log('菜单', result.data.modules)
// 生成最终菜单列表 // 生成最终菜单列表
this.menuList = 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(() => { setTimeout(() => {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -389,10 +275,7 @@ window.onload = function () { ...@@ -389,10 +275,7 @@ window.onload = function () {
interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'], interfacePrivateKey: API_KEY_MAP['no-page']['privateKey'],
reqParams: { reqParams: {
sign: 6, sign: 6,
pageNum: this.page++, // 每次请求增加下一页
pageSize: this.size,
date: this.selectedDate, date: this.selectedDate,
sort: 'lawId,desc',
merId: gemhoUtil.getParameter('merId'), merId: gemhoUtil.getParameter('merId'),
}, },
}, },
...@@ -400,9 +283,8 @@ window.onload = function () { ...@@ -400,9 +283,8 @@ window.onload = function () {
if (!res) { if (!res) {
// 中台返回为undefined 重新请求 // 中台返回为undefined 重新请求
vant.Toast.clear() vant.Toast.clear()
this.page = this.page - 1 // 重新请求后,分页数恢复上一次请求的值
setTimeout(() => { setTimeout(() => {
// this.getList() this.getUserData()
}, 0) }, 0)
return return
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment