Commit 89a4f8eb by Jaxon

fix(workspace): 修复服务中心通知弹窗重复触发问题

在显示通知弹窗时设置 isShowingModal 标志位,防止在弹窗显示期间重复检查通知
同时将 config.js 中的多行字符串常量合并为单行以保持代码风格一致
1 parent e9f7ab99
......@@ -88,12 +88,10 @@ export const ALIYUN = ALIYUN_LIST[1];
export const quotedImgUrl = createQuotedUrl[target[envIndex]];
export const scoket_url = scoketURL[target[envIndex]];
// sentry Dsn 地址
export const dsnUrl =
"https://6b10bd312d154ff3a4664772bb4e50f5@sentry.glsx.com.cn/49";
export const dsnUrl = "https://6b10bd312d154ff3a4664772bb4e50f5@sentry.glsx.com.cn/49";
// 图片基地址
export const ImgUrl =
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat";
export const ImgUrl = "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat";
export const ossConfig = {
// 请求域名 格式:https://xxx.xxx.com
......
......@@ -79,6 +79,7 @@ Page({
showReportPopup: false,
reportTemplateList: [],
currentReportItem: null,
isShowingModal: false,
},
/**
......@@ -154,6 +155,9 @@ Page({
// 根据类型取到对应的值
const { message, ...dialogParams } = dialogOptions[serviceCenterEnum][noticeItem.reminderType || 1];
this.setData({
isShowingModal: true,
});
wx.showModal({
title: dialogParams.title,
content: message(noticeItem.msgTitle),
......@@ -161,6 +165,9 @@ Page({
confirmText: dialogParams.confirmButtonText,
success: function (res) {
wx.$router.go("packageWorkspace.companyNoticeDetail", { id: noticeItem.id });
this.setData({
isShowingModal: false,
});
},
});
break;
......@@ -206,8 +213,10 @@ Page({
},
);
// 服务中心 - 检查通知
await this.checkServiceNotice();
if (!this.data.isShowingModal) {
// 服务中心 - 检查通知
await this.checkServiceNotice();
}
},
getWaitAuditCount(userInfo) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!