Browse Source

拼多多

master
huangjiajun 5 months ago
parent
commit
feb1b21b94
1 changed files with 24 additions and 0 deletions
  1. +24
    -0
      pdd_union/extend_url.go

+ 24
- 0
pdd_union/extend_url.go View File

@@ -17,6 +17,12 @@ func ExtendUrl(keyArr map[string]string, param map[string]interface{}) map[strin
"page_path": "",
"schema_url": "",
}
if param["open_app"] == "<nil>" || param["open_app"] == nil {
param["open_app"] = ""
}
if param["link_type"] == "<nil>" || 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"] == "<nil>" || param["open_app"] == nil {
param["open_app"] = ""
}
if param["link_type"] == "<nil>" || 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"] == "<nil>" || param["open_app"] == nil {
param["open_app"] = ""
}
if param["link_type"] == "<nil>" || 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"] == "<nil>" || param["open_app"] == nil {
param["open_app"] = ""
}
if param["link_type"] == "<nil>" || param["link_type"] == nil {
param["link_type"] = ""
}
for _, v := range res.RpPromotionUrlGenerateResponse.UrlList {
tmp["url"] = v.ShortUrl
tmp["open_app_url"] = v.MobileUrl


Loading…
Cancel
Save