From feb1b21b94350933f30921cff04ac318c4c9b280 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 23 May 2024 10:14:28 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8B=BC=E5=A4=9A=E5=A4=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pdd_union/extend_url.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pdd_union/extend_url.go b/pdd_union/extend_url.go index 46b7f2f..07d2d07 100644 --- a/pdd_union/extend_url.go +++ b/pdd_union/extend_url.go @@ -17,6 +17,12 @@ func ExtendUrl(keyArr map[string]string, param map[string]interface{}) map[strin "page_path": "", "schema_url": "", } + if param["open_app"] == "" || param["open_app"] == nil { + param["open_app"] = "" + } + if param["link_type"] == "" || param["link_type"] == nil { + param["link_type"] = "" + } for _, v := range res.GoodsPromotionUrlGenerateResponse.GoodsPromotionUrlList { tmp["url"] = v.ShortUrl tmp["open_app_url"] = v.MobileUrl @@ -54,6 +60,12 @@ func MainThemeUrl(keyArr map[string]string, param map[string]interface{}) map[st tmp["no_open_app_url"] = res.ResourceUrlResponse.SingleUrlList.ShortUrl tmp["page_path"] = res.ResourceUrlResponse.WeAppInfo.PagePath tmp["schema_url"] = res.ResourceUrlResponse.SingleUrlList.SchemaUrl + if param["open_app"] == "" || param["open_app"] == nil { + param["open_app"] = "" + } + if param["link_type"] == "" || param["link_type"] == nil { + param["link_type"] = "" + } if param["open_app"] == "" && param["link_type"] != "" { tmp["url"] = res.ResourceUrlResponse.SingleUrlList.Url } @@ -87,6 +99,12 @@ func WnMainThemeUrl(keyArr map[string]string, param map[string]interface{}) map[ tmp["no_open_app_url"] = res.GoodsZsUnitGenerateResponse.ShortUrl tmp["page_path"] = res.GoodsZsUnitGenerateResponse.WeAppInfo.PagePath tmp["schema_url"] = res.GoodsZsUnitGenerateResponse.SchemaUrl + if param["open_app"] == "" || param["open_app"] == nil { + param["open_app"] = "" + } + if param["link_type"] == "" || param["link_type"] == nil { + param["link_type"] = "" + } if param["open_app"] == "" && param["link_type"] != "" { tmp["url"] = res.GoodsZsUnitGenerateResponse.Url } @@ -116,6 +134,12 @@ func RpUrl(keyArr map[string]string, param map[string]interface{}) map[string]st "user_name": "", "app_id": "", } + if param["open_app"] == "" || param["open_app"] == nil { + param["open_app"] = "" + } + if param["link_type"] == "" || param["link_type"] == nil { + param["link_type"] = "" + } for _, v := range res.RpPromotionUrlGenerateResponse.UrlList { tmp["url"] = v.ShortUrl tmp["open_app_url"] = v.MobileUrl