huangjiajun 1 month ago
parent
commit
ce16c64fd5
1 changed files with 6 additions and 10 deletions
  1. +6
    -10
      app/svc/svc_store_order.go

+ 6
- 10
app/svc/svc_store_order.go View File

@@ -101,7 +101,6 @@ func StoreOrderList(c *gin.Context) {
"head_img": headImg, "head_img": headImg,
"amount": v.Amount, "amount": v.Amount,
"num": utils.IntToStr(v.Num), "num": utils.IntToStr(v.Num),
"timer": "",
"down_time": downTime, "down_time": downTime,
"create_at": v.CreateAt.Format("2006-01-02 15:04:05"), "create_at": v.CreateAt.Format("2006-01-02 15:04:05"),
"pay_at": "", "pay_at": "",
@@ -112,15 +111,16 @@ func StoreOrderList(c *gin.Context) {
} }
if v.ConfirmAt.IsZero() == false { if v.ConfirmAt.IsZero() == false {
tmp["confirm_at"] = v.ConfirmAt.Format("2006-01-02 15:04:05") 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 { if v.Type == 1 {
tmp["label"] = "外卖" tmp["label"] = "外卖"
} }
if v.IsNow == 1 {
tmp["timer"] = "立即提货"
} else if v.Timer != "" {
tmp["timer"] = v.Timer
}
list = append(list, tmp) list = append(list, tmp)
} }
} }
@@ -146,8 +146,6 @@ func StoreOrderDetail(c *gin.Context) {
downTime = "0" downTime = "0"
} }
} }
img := ""
title := ""
confirmAt := "" confirmAt := ""
if data.ConfirmAt.IsZero() == false { if data.ConfirmAt.IsZero() == false {
confirmAt = data.ConfirmAt.Format("2006-01-02 15:04:05") confirmAt = data.ConfirmAt.Format("2006-01-02 15:04:05")
@@ -216,8 +214,6 @@ func StoreOrderDetail(c *gin.Context) {
"head_img": headImg, "head_img": headImg,
"state": utils.IntToStr(data.State), "state": utils.IntToStr(data.State),
"state_str": state[data.State], "state_str": state[data.State],
"img": img,
"title": title,
"amount": data.Amount, "amount": data.Amount,
"all_amount": utils.Float64ToStr(utils.StrToFloat64(data.Amount) + utils.StrToFloat64(data.Coupon)), "all_amount": utils.Float64ToStr(utils.StrToFloat64(data.Amount) + utils.StrToFloat64(data.Coupon)),
"coupon": data.Coupon, "coupon": data.Coupon,


Loading…
Cancel
Save