Browse Source

fix: bug 全局配置触发频率更新、全局配置域名集合显示具体域名

jcq 1 day ago
parent
commit
4649807141

+ 1 - 1
src/views/marketing/apps/components/form.vue

@@ -126,7 +126,7 @@ const updateDelDomains = (data: string[]) => {
 const formatNum = (value: string | number = 0) => {
   let num = Number(value);
   if(num > 0 && num < 1) {
-    return (num * 100).toFixed(2) + '%';
+    return (num * 100).toFixed(0) + '%';
   }else if (num >= 1 && num < 10000) {
     return num;
   }

+ 4 - 3
src/views/marketing/config/index.vue

@@ -325,10 +325,11 @@ const getData = () => {
 const onLoadDetail = async (item: any) => {
 	if (item.list.length !== 0) return;
 	await getGroupDetail({ id: item.groupId }).then((val) => {
-		item.list = val.data.ips.map((item) => {
-			return ipSplicing(item.startIp, item.endIp);
+		item.list = val.data.domains.map((item) => {
+			return item;
 		});
 	});
+	
 };
 
 // // 表单校验规则
@@ -547,7 +548,7 @@ const getIpData = async () => {
 const formatNum = (value: string | number = 0) => {
   let num = Number(value);
   if (num > 0 && num < 1) {
-    return (num * 100).toFixed(2) + '%';
+    return (num * 100).toFixed(0) + '%';
   } else if (num >= 1 && num < 10000) {
     return num;
   }