Browse Source

运费

master
黄梓健 5 years ago
parent
commit
16d5d1e0ba
  1. 1
      controllers/client/good.go
  2. 2
      controllers/client/login.go
  3. 5
      models/customer_goods.go
  4. 1
      utils/define/define.go

1
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)

2
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)

5
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 {

1
utils/define/define.go

@ -80,7 +80,6 @@ const (
const (
TYPE_H5USER = "h5user"
TYPE_LIVEUSER = "live_user"
TYPE_CUSTOMER = "customer"
TYPE_ENTRYPEOPLE = "entry_people"
)
Loading…
Cancel
Save