上传商店优化
This commit is contained in:
parent
72a3246f7e
commit
782a67734b
@ -175,13 +175,14 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
sdata.Items = make([]*pb.UserShopGood, len(items))
|
||||
sdata.Preview = make(map[int32]*pb.DB_Equipment)
|
||||
for i, v := range items {
|
||||
id := v.Key*100 + int32(i)
|
||||
sdata.Items[i] = &pb.UserShopGood{
|
||||
Id: v.Key*100 + int32(i),
|
||||
Id: id,
|
||||
Gid: v.Key,
|
||||
Buy: 0,
|
||||
}
|
||||
if v.Preview { //是否预览
|
||||
if errdata, sdata.Preview[v.Key] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
|
||||
if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
@ -224,13 +225,14 @@ func (this *apiComp) Getlist(session comm.IUserSession, req *pb.ShopGetListReq)
|
||||
sdata.Items = make([]*pb.UserShopGood, len(items))
|
||||
sdata.Preview = make(map[int32]*pb.DB_Equipment)
|
||||
for i, v := range items {
|
||||
id := v.Key*100 + int32(i)
|
||||
sdata.Items[i] = &pb.UserShopGood{
|
||||
Id: v.Key*100 + int32(i),
|
||||
Id: id,
|
||||
Gid: v.Key,
|
||||
Buy: 0,
|
||||
}
|
||||
if v.Preview { //是否预览
|
||||
if errdata, sdata.Preview[v.Key] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
|
||||
if errdata, sdata.Preview[id] = this.module.equip.NewEquipment(session.GetUserId(), v.Iteminfo[0].T); errdata != nil {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user