Merge branch 'develop' of gitee.com:fusenpack/fusenapi into develop
This commit is contained in:
commit
42b169f3df
@ -185,6 +185,42 @@ func (l *UserEmailConfirmationLogic) AfterLogic(w http.ResponseWriter, r *http.R
|
|||||||
w.Write([]byte(successHtml))
|
w.Write([]byte(successHtml))
|
||||||
httpx.Ok(w)
|
httpx.Ok(w)
|
||||||
} else {
|
} else {
|
||||||
httpx.OkJsonCtx(r.Context(), w, resp)
|
|
||||||
|
errorHtml := `
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>注册失败</title>
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: sans-serif;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 24px;
|
||||||
|
color: blue;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 480px) {
|
||||||
|
body {
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>%s</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
`
|
||||||
|
|
||||||
|
errorHtml = fmt.Sprintf(errorHtml, resp.Message)
|
||||||
|
w.Write([]byte(errorHtml))
|
||||||
|
httpx.Ok(w)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ func (l *UserGoogleLoginLogic) UserGoogleLogin(req *types.RequestGoogleLogin, us
|
|||||||
Platform: "google",
|
Platform: "google",
|
||||||
OperateType: auth.OpTypeRegister,
|
OperateType: auth.OpTypeRegister,
|
||||||
TraceId: uuid.NewString(),
|
TraceId: uuid.NewString(),
|
||||||
CreateAt: time.Now(),
|
CreateAt: time.Now().UTC(),
|
||||||
Extend: map[string]interface{}{
|
Extend: map[string]interface{}{
|
||||||
"google_id": googleId,
|
"google_id": googleId,
|
||||||
},
|
},
|
||||||
|
@ -67,13 +67,13 @@ func (l *UserOrderListLogic) UserOrderList(req *types.UserOrderListReq, userinfo
|
|||||||
// 根据时间来查询不同范围的订单
|
// 根据时间来查询不同范围的订单
|
||||||
switch req.Time {
|
switch req.Time {
|
||||||
case 1:
|
case 1:
|
||||||
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -1, 0).Unix())
|
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -1, 0).Unix())
|
||||||
case 2:
|
case 2:
|
||||||
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -3, 0).Unix())
|
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -3, 0).Unix())
|
||||||
case 3:
|
case 3:
|
||||||
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(0, -6, 0).Unix())
|
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(0, -6, 0).Unix())
|
||||||
case 4:
|
case 4:
|
||||||
rowBuilder = rowBuilder.Where("ctime >?", time.Now().AddDate(-1, 0, 0).Unix())
|
rowBuilder = rowBuilder.Where("ctime >?", time.Now().UTC().AddDate(-1, 0, 0).Unix())
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ func (l *CartListLogic) CartList(req *types.CartListReq, userinfo *auth.UserInfo
|
|||||||
Cover: *v.Cover,
|
Cover: *v.Cover,
|
||||||
Name: name,
|
Name: name,
|
||||||
Capacity: "",
|
Capacity: "",
|
||||||
ETA: time.Now().AddDate(0, 0, 60).Format("2006-01-02 15:04:05"),
|
ETA: time.Now().UTC().AddDate(0, 0, 60).Format("2006-01-02 15:04:05"),
|
||||||
Pcs: *v.BuyNum,
|
Pcs: *v.BuyNum,
|
||||||
ProductSn: productSn,
|
ProductSn: productSn,
|
||||||
DesignSn: designSn,
|
DesignSn: designSn,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user