This commit is contained in:
richboo111
2022-08-25 10:52:11 +08:00
parent 95cd8433af
commit 245ceeb28c

View File

@@ -140,7 +140,6 @@ type Info1 struct {
WeeklyScore int `json:"weeklyScore"` //店铺每周评分
}
type Info2 struct {
StoreID int `json:"storeID"` //门店ID
SkuID int `json:"skuID"` //商品ID
SkuName string `json:"skuName"` //商品名字
SkuStatus int `json:"skuStatus"` //商品是否可售状态 1可售 0不可售
@@ -5806,7 +5805,6 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
for _, j := range topSkusInfo {
if i.StoreID == j.StoreID {
data = Info2{
StoreID: j.StoreID,
SkuID: j.SkuID,
SkuName: j.Name,
SkuStatus: j.Status,
@@ -5819,16 +5817,13 @@ func GetHomePageByLocation(ctx *jxcontext.Context, lng, lat float64, needWalkDis
}
multipleData = append(multipleData, data)
if len(multipleData) > 0 {
if i.StoreID == multipleData[0].StoreID {
ans = HomePageInfos{
Info: i,
Info2: multipleData,
}
ans = HomePageInfos{
Info: i,
Info2: multipleData,
}
} else {
ans = HomePageInfos{
Info: i,
Info2: nil,
Info: i,
}
}
res = append(res, ans)