Commit 93fecd46 by mushishixian

debug

parent c4356e00
Showing with 5 additions and 7 deletions
......@@ -45,10 +45,10 @@ func (ls *LyService) GetActivityPrice(sku model.LySku, suffix string, power Powe
//获取redis里面存储的活动相关信息
brandIdArray := gjson.Get(activityInfo, "brand_id").Array()
var brandIds []string
var brandIds []int
for _, brandId := range brandIdArray {
if brandId.String() != "" {
brandIds = append(brandIds, brandId.String())
brandIds = append(brandIds, int(brandId.Int()))
}
}
goodsNameArray := gjson.Get(activityInfo, "goods_name").Array()
......
......@@ -6,9 +6,7 @@ import (
)
func main() {
str := `{"cn":{"max":"10000","price":"20"},"hk":{"max":69000,"price":138}}`
var res interface{}
fmt.Println(php2go.JSONDecode([]byte(str), &res))
tem, _ := php2go.JSONEncode(res)
fmt.Println(string(tem))
var a = []string{"3923"}
var b = 3923
fmt.Println(php2go.InArray(b,a))
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment