Browse Source

fix: 用户分析新增用户上半部分接口联调结束

jcq 6 days ago
parent
commit
08851c05f7
2 changed files with 2 additions and 3 deletions
  1. 1 1
      .env
  2. 1 2
      src/views/count/user/adduser/components/AddTrend.vue

+ 1 - 1
.env

@@ -5,8 +5,8 @@ VITE_IS_MICRO= true
 VITE_PUBLIC_PATH = /
 
 # 后端请求前缀
-# VITE_API_URL = http://192.168.3.118:9999
 VITE_API_URL = http://192.168.10.101:9999
+# VITE_API_URL = http://192.168.3.118:9999
 # VITE_API_URL = http://192.168.3.17:9999
 
 # OAUTH2 密码模式客户端信息

+ 1 - 2
src/views/count/user/adduser/components/AddTrend.vue

@@ -157,7 +157,6 @@ import dayjs from 'dayjs';
 import { getDaysBetweenDates } from '/@/utils/formatTime';
 import { getAppVersion, getAppChannel } from '/@/api/common/common';
 import { getTrend, getTrendDetail } from '/@/api/count/addUser';
-import { data } from 'autoprefixer';
 
 const { t } = useI18n();
 const Title = defineAsyncComponent(() => import('/@/components/Title/index.vue'));
@@ -440,7 +439,7 @@ async function initCompareOptions() {
 function handleTimeCompareChange(value: string) {
 	timeCompareRange.value = value;
 	formData.value.toDate = timeCompareRange.value;
-	formData.value.fromDate = dayjs(timeCompareRange.value).subtract(15, 'day').format('YYYY-MM-DD');
+	formData.value.fromDate = dayjs(timeCompareRange.value).subtract(getDaysBetweenDates(props.formData?.time[0], props.formData?.time[1]), 'day').format('YYYY-MM-DD');
 	formData.value.channel = props.formData?.channel ? [props.formData?.channel] : [];
 	formData.value.version = props.formData?.version ? [props.formData?.version] : [];