diff --git a/controllers/client/good.go b/controllers/client/good.go index 1ba29e5..7eae796 100644 --- a/controllers/client/good.go +++ b/controllers/client/good.go @@ -29,6 +29,7 @@ func (t *GoodCtl) ListGood() { goods, err := models.GetGoodsByActivityId(activityId, areaId) for index := range goods { goods[index].GoodType = option.PostFeeType + goods[index].Postage = option.PostFee } t.CheckErr(err) t.JSON(goods) diff --git a/controllers/client/login.go b/controllers/client/login.go index d70ba57..62f2959 100644 --- a/controllers/client/login.go +++ b/controllers/client/login.go @@ -233,7 +233,7 @@ func (t *UserCtl) Login() { t.CheckErr(err) } - jwtToken, err := jwt.GenJwtToken(define.TYPE_LIVEUSER, user.Id, 0, 0, 0, 0) + jwtToken, err := jwt.GenJwtToken(define.TYPE_H5USER, user.Id, 0, 0, 0, 0) t.CheckErr(err) t.SetSession(define.TOKEN, jwtToken) diff --git a/models/customer_goods.go b/models/customer_goods.go index 4c036c5..26101c4 100644 --- a/models/customer_goods.go +++ b/models/customer_goods.go @@ -24,8 +24,9 @@ type CustomerGoods struct { Desc string `json:"desc" xorm:"not null default '' comment('商品介绍') VARCHAR(255)"` // 无关变量 - GoodType int `json:"good_type" xorm:"-"` - Qrcode string `json:"qrcode,omitempty" xorm:"-"` + GoodType int `json:"good_type" xorm:"-"` + Postage float64 `json:"postage" xorm:"-"` + Qrcode string `json:"qrcode,omitempty" xorm:"-"` } func (t *CustomerGoods) TableName() string { diff --git a/utils/define/define.go b/utils/define/define.go index 77aa9f2..282b9c2 100644 --- a/utils/define/define.go +++ b/utils/define/define.go @@ -80,7 +80,6 @@ const ( const ( TYPE_H5USER = "h5user" - TYPE_LIVEUSER = "live_user" TYPE_CUSTOMER = "customer" TYPE_ENTRYPEOPLE = "entry_people" )