From 06d91f86554d781248f8610b780a34cf3ab07e6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A3=E5=9C=A3=E5=8D=8E?= <752718920@qq.com> Date: Mon, 27 Sep 2021 22:25:35 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=8D=E5=8A=A1=E5=88=B0?= =?UTF-8?q?=E6=9C=9F=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jshERP-web/src/views/dashboard/IndexChart.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/jshERP-web/src/views/dashboard/IndexChart.vue b/jshERP-web/src/views/dashboard/IndexChart.vue index 2653144b..a948a4b7 100644 --- a/jshERP-web/src/views/dashboard/IndexChart.vue +++ b/jshERP-web/src/views/dashboard/IndexChart.vue @@ -54,6 +54,7 @@ 试用用户:{{tenant.userCurrentNum}}/{{tenant.userNumLimit}} 服务到期:{{tenant.expireTime}} 授权用户:{{tenant.userCurrentNum}}/{{tenant.userNumLimit}} + 立即续费 @@ -70,7 +71,7 @@ import LineChartMultid from '@/components/chart/LineChartMultid' import HeadInfo from '@/components/tools/HeadInfo.vue' import Trend from '@/components/Trend' - import { getBuyAndSaleStatistics, buyOrSalePrice } from '@/api/api' + import { getBuyAndSaleStatistics, buyOrSalePrice, getPlatformConfigByKey } from '@/api/api' import { getAction } from '../../api/manage' export default { @@ -99,6 +100,8 @@ salePriceData: [], visitFields:['ip','visit'], visitInfo:[], + hasExpire: false, + payFeeUrl: '', tenant: { type: '', expireTime: '', @@ -127,11 +130,24 @@ this.salePriceData = res.data.salePriceList; } }) + getPlatformConfigByKey({"platformKey": "pay_fee_url"}).then((res)=> { + if (res && res.code === 200) { + this.payFeeUrl = res.data.platformValue + } + }) }, initWithTenant() { getAction("/user/infoWithTenant",{}).then(res=>{ if(res && res.code === 200) { this.tenant = res.data + let currentTime = new Date(); //新建一个日期对象,默认现在的时间 + let expireTime = new Date(res.data.expireTime); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期 + let difftime = expireTime - currentTime; //计算时间差 + //如果距离到期还剩5天就进行提示续费 + if(difftime<86400000*5) { + this.hasExpire = true + this.$message.warning('您好,服务即将到期,请及时续费!',5) + } } }) }