From d34ab9113d9ba0849dced2e5d4e5ed9b469feee3 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Tue, 13 Jul 2021 15:09:04 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8E=BB=E6=8E=89=E9=A6=96?= =?UTF-8?q?=E9=A1=B5tips=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/api/homepage/ApiTestHomePage.vue | 15 --------------- .../business/components/track/home/TrackHome.vue | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue index f8708503e7..8929192062 100644 --- a/frontend/src/business/components/api/homepage/ApiTestHomePage.vue +++ b/frontend/src/business/components/api/homepage/ApiTestHomePage.vue @@ -58,30 +58,15 @@ export default { testCaseCountData: {}, scheduleTaskCountData: {}, interfaceCoverage: "waitting...", - tipsType: "1", result: {}, - seasonTips: "😊 MeterSphere温馨提醒 —— 多喝热水哟!", } }, activated() { this.search(); - this.checkTipsType(); }, created() { }, methods: { - checkTipsType() { - var random = Math.floor(Math.random() * (4 - 1 + 1)) + 1; - this.tipsType = random + ""; - - let today = new Date(); - let month = today.getMonth(); - if (9 > month > 4) { - this.seasonTips = "🤔️ 天凉了,保温杯买了吗?"; - } else { - this.seasonTips = "🤔️天热了,小风扇买了吗?"; - } - }, search() { let selectProjectId = getCurrentProjectID(); diff --git a/frontend/src/business/components/track/home/TrackHome.vue b/frontend/src/business/components/track/home/TrackHome.vue index 84b015d542..3afb06f248 100644 --- a/frontend/src/business/components/track/home/TrackHome.vue +++ b/frontend/src/business/components/track/home/TrackHome.vue @@ -73,16 +73,13 @@ export default { }, data() { return { - tipsType: "1", result: {}, trackCountData: {}, relevanceCountData: {}, caseOption: {}, - seasonTips: "😊 MeterSphere温馨提醒 —— 多喝热水哟!", } }, activated() { - this.checkTipsType(); this.init(); }, computed: { @@ -91,18 +88,6 @@ export default { }, }, methods: { - checkTipsType() { - let random = Math.floor(Math.random() * (4 - 1 + 1)) + 1; - this.tipsType = random + ""; - - let today = new Date(); - let month = today.getMonth(); - if (9 > month > 4) { - this.seasonTips = "🤔️ 天凉了,保温杯买了吗?"; - } else { - this.seasonTips = "🤔️天热了,小风扇买了吗?"; - } - }, init() { let selectProjectId = this.projectId; if (!selectProjectId) {