Commit 8f118371 by 李伟康

refactor(components): 优化首页入口点击逻辑

- 修改了 DailyReport 入口的点击逻辑,使其不受 checkDailyReport 和 inspectionOfProhibitionBill 方法的限制
- 优化了 clockInConfigPhone 数据处理,移除了不必要的解构赋值
- 注释掉了 LocalLog 类中的日志记录方法,暂时禁用日志功能
1 parent 0a07d8c5
...@@ -405,7 +405,7 @@ export default { ...@@ -405,7 +405,7 @@ export default {
this.$emit('start') this.$emit('start')
}, },
async entranceClick (item) { async entranceClick (item) {
if (await this.checkDailyReport() || await this.inspectionOfProhibitionBill()) return if (item.name != 'DailyReport' && (await this.checkDailyReport() || await this.inspectionOfProhibitionBill())) return
uni.navigateTo({ uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=${item.name}` url: `/pages/boutique/tool/index?componentName=${item.name}`
}) })
......
...@@ -67,7 +67,6 @@ export default { ...@@ -67,7 +67,6 @@ export default {
}) })
.then(data => { .then(data => {
if (data) { if (data) {
console.log(4)
// 获取当前日期 // 获取当前日期
let currentDate = new Date(); let currentDate = new Date();
// 获取上一天的日期 // 获取上一天的日期
...@@ -79,7 +78,6 @@ export default { ...@@ -79,7 +78,6 @@ export default {
// 格式化日期为"yyyy-mm-dd" // 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split("T")[0]; let formattedDate = previousDate.toISOString().split("T")[0];
// if (wx.__HAS_NOTLOGIN_MODAL) return false; // // if (wx.__HAS_NOTLOGIN_MODAL) return false; //
console.log(5)
this.addModalToQueue( this.addModalToQueue(
"日报提醒", "日报提醒",
"您有未填写的日报,请点击前往。", "您有未填写的日报,请点击前往。",
...@@ -88,7 +86,6 @@ export default { ...@@ -88,7 +86,6 @@ export default {
2, 2,
(res) => { (res) => {
if (res.confirm) { if (res.confirm) {
console.log(123)
uni.navigateTo({ uni.navigateTo({
url: `/pages/boutique/tool/index?componentName=DailyReport` url: `/pages/boutique/tool/index?componentName=DailyReport`
}) })
...@@ -112,8 +109,7 @@ export default { ...@@ -112,8 +109,7 @@ export default {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.$api.interceptionApi.clockInConfigPhone({}) uni.$api.interceptionApi.clockInConfigPhone({})
.then((res) => { .then((res) => {
let { need, clockIn } = res.data; let { need, clockIn } = res;
// console.log(res, need == 0 && clockIn == 0, "clockInConfigPhone");
// 已配置未打卡 // 已配置未打卡
if (need == 1 && clockIn == 0) { if (need == 1 && clockIn == 0) {
// 有配置并且没有打卡就提示 // 有配置并且没有打卡就提示
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!