From 06b1ea6a46e9c48399805b26726f1c621ce5c168 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 25 Oct 2024 16:53:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/md/md_data_center_original_data.go | 1 + app/svc/svc_data_center_generate_data.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/md/md_data_center_original_data.go b/app/md/md_data_center_original_data.go index fe85d99..49f33dc 100644 --- a/app/md/md_data_center_original_data.go +++ b/app/md/md_data_center_original_data.go @@ -10,6 +10,7 @@ var AdState = []SelectData{ var AdPlatform = []SelectData{ {Name: "微信小程序", Value: "wx_applet"}, } +var AdPlatformMap = map[string]string{"wx_applet": "微信小程序"} type DataCenterOriginalDataReq struct { Limit string `json:"limit"` diff --git a/app/svc/svc_data_center_generate_data.go b/app/svc/svc_data_center_generate_data.go index a07210b..7076b0e 100644 --- a/app/svc/svc_data_center_generate_data.go +++ b/app/svc/svc_data_center_generate_data.go @@ -102,7 +102,7 @@ func DataCenterIncomeDataListOutput(c *gin.Context, req md.DataCenterGenerateDat } tmpApplet := GetAppletInfo(c, v.AppId) if tmpApplet["platform"] != "" { - tmp.Platform = tmpApplet["platform"] + tmp.Platform = md.AdPlatformMap[tmpApplet["platform"]] } if tmpApplet["name"] != "" { tmp.Name = tmpApplet["name"]