From ce16c64fd5bc5a46b0ad9099761ad052cc84d476 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Fri, 13 Sep 2024 10:21:15 +0800 Subject: [PATCH] 1 --- app/svc/svc_store_order.go | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/app/svc/svc_store_order.go b/app/svc/svc_store_order.go index 79cc221..948b452 100644 --- a/app/svc/svc_store_order.go +++ b/app/svc/svc_store_order.go @@ -101,7 +101,6 @@ func StoreOrderList(c *gin.Context) { "head_img": headImg, "amount": v.Amount, "num": utils.IntToStr(v.Num), - "timer": "", "down_time": downTime, "create_at": v.CreateAt.Format("2006-01-02 15:04:05"), "pay_at": "", @@ -112,15 +111,16 @@ func StoreOrderList(c *gin.Context) { } if v.ConfirmAt.IsZero() == false { tmp["confirm_at"] = v.ConfirmAt.Format("2006-01-02 15:04:05") + } else { + if v.IsNow == 1 { + tmp["confirm_at"] = "立即提货" + } else if v.Timer != "" { + tmp["confirm_at"] = v.Timer + } } if v.Type == 1 { tmp["label"] = "外卖" } - if v.IsNow == 1 { - tmp["timer"] = "立即提货" - } else if v.Timer != "" { - tmp["timer"] = v.Timer - } list = append(list, tmp) } } @@ -146,8 +146,6 @@ func StoreOrderDetail(c *gin.Context) { downTime = "0" } } - img := "" - title := "" confirmAt := "" if data.ConfirmAt.IsZero() == false { confirmAt = data.ConfirmAt.Format("2006-01-02 15:04:05") @@ -216,8 +214,6 @@ func StoreOrderDetail(c *gin.Context) { "head_img": headImg, "state": utils.IntToStr(data.State), "state_str": state[data.State], - "img": img, - "title": title, "amount": data.Amount, "all_amount": utils.Float64ToStr(utils.StrToFloat64(data.Amount) + utils.StrToFloat64(data.Coupon)), "coupon": data.Coupon,