From 3bca1e6b6d7cf0b145e4fd0a0ca001d6cd8a4d16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Fri, 10 Dec 2021 00:47:48 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E6=81=AF=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/tools/HeaderNotice.vue | 82 ++-- .../src/components/tools/ShowAnnouncement.vue | 278 ++++++------- jshERP-web/src/views/dashboard/IndexChart.vue | 23 +- .../{UserAnnouncementList.vue => MsgList.vue} | 367 +++++++++--------- 4 files changed, 361 insertions(+), 389 deletions(-) rename jshERP-web/src/views/system/{UserAnnouncementList.vue => MsgList.vue} (51%) diff --git a/jshERP-web/src/components/tools/HeaderNotice.vue b/jshERP-web/src/components/tools/HeaderNotice.vue index 778b4a12..dfb843c0 100644 --- a/jshERP-web/src/components/tools/HeaderNotice.vue +++ b/jshERP-web/src/components/tools/HeaderNotice.vue @@ -1,7 +1,7 @@ - - - + + + + + + diff --git a/jshERP-web/src/views/dashboard/IndexChart.vue b/jshERP-web/src/views/dashboard/IndexChart.vue index f97fb548..ef48cb9a 100644 --- a/jshERP-web/src/views/dashboard/IndexChart.vue +++ b/jshERP-web/src/views/dashboard/IndexChart.vue @@ -99,7 +99,7 @@ import Trend from '@/components/Trend' import { getBuyAndSaleStatistics, buyOrSalePrice, getPlatformConfigByKey } from '@/api/api' import { handleIntroJs } from "@/utils/util" - import { getAction } from '../../api/manage' + import { getAction,postAction } from '../../api/manage' export default { name: "IndexChart", @@ -179,6 +179,27 @@ //如果距离到期还剩5天就进行提示续费 if(difftime<86400000*5) { this.hasExpire = true + //针对免费租户发送试用到期的消息提醒 + if(res.data.type === '0') { + //先检查有无发送过,只发送一次 + getAction("/msg/getMsgCountByType",{'type': '试用到期'}).then(res=>{ + if(res && res.code === 200) { + if(res.data.count === 0) { + //发送消息 + let msgParam = { + 'msgTitle': '试用到期提醒', + 'msgContent': '试用期即将结束,请您及时续费,过期将会影响正常使用!', + 'type': '试用到期' + } + postAction("/msg/add",msgParam).then(res=>{ + if(res && res.code === 200) { + + } + }) + } + } + }) + } } } }) diff --git a/jshERP-web/src/views/system/UserAnnouncementList.vue b/jshERP-web/src/views/system/MsgList.vue similarity index 51% rename from jshERP-web/src/views/system/UserAnnouncementList.vue rename to jshERP-web/src/views/system/MsgList.vue index 891880ef..09f8e320 100644 --- a/jshERP-web/src/views/system/UserAnnouncementList.vue +++ b/jshERP-web/src/views/system/MsgList.vue @@ -1,192 +1,177 @@ - - - - \ No newline at end of file