From 62c0e1fc59e8063abcbc9edbdfeb9e1633871abf Mon Sep 17 00:00:00 2001 From: richboo111 Date: Thu, 25 Aug 2022 10:26:11 +0800 Subject: [PATCH] home --- business/jxstore/cms/store.go | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/business/jxstore/cms/store.go b/business/jxstore/cms/store.go index 112d1694e..49d07f1af 100644 --- a/business/jxstore/cms/store.go +++ b/business/jxstore/cms/store.go @@ -5745,6 +5745,7 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis tmp1s []Info1 multipleData []Info2 data Info2 + ans HomePageInfos res []HomePageInfos ) locationList, err := common.GetStoreListByLocation(ctx, lng, lat, 20000, needWalkDistance, false, 0) @@ -5815,10 +5816,15 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis } } multipleData = append(multipleData, data) - globals.SugarLogger.Debug("multipleData===============", multipleData) - ans := HomePageInfos{ - Info: i, - Info2: multipleData, + if len(multipleData) > 0 { + ans = HomePageInfos{ + Info: i, + Info2: multipleData, + } + } else { + ans = HomePageInfos{ + Info: i, + } } res = append(res, ans) }