Commit 89a4f8eb by Jaxon

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

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