|
|
@ -80,13 +80,17 @@ func main() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//
|
|
|
|
//
|
|
|
|
respDetail, err := clientA.ShowProductDetail(context.TODO(), reqDetail)
|
|
|
|
respDetail, err := clientA.ShowProductDetail(context.TODO(), reqDetail)
|
|
|
|
req.ProductName = respDetail.ProductDetail[0].Name
|
|
|
|
if respDetail != nil {
|
|
|
|
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
|
|
|
|
req.ProductName = respDetail.ProductDetail[0].Name
|
|
|
|
log.Println(" /ProductDetailReq get :", req)
|
|
|
|
req.ProductMainPicture = respDetail.ProductDetail[0].MainPicture
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
log.Println(" /ShowProductDetail resp :", respDetail)
|
|
|
|
//SKU
|
|
|
|
//SKU
|
|
|
|
//添加购物车 远程调用服务
|
|
|
|
//添加购物车 远程调用服务
|
|
|
|
|
|
|
|
log.Println(" /AddCart req :", req)
|
|
|
|
resp, err := client.AddCart(context.TODO(), req)
|
|
|
|
resp, err := client.AddCart(context.TODO(), req)
|
|
|
|
log.Println(" /increase :", resp)
|
|
|
|
log.Println(" /AddCart resp :", resp)
|
|
|
|
//根据响应做输出
|
|
|
|
//根据响应做输出
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
log.Println(err.Error())
|
|
|
|
log.Println(err.Error())
|
|
|
|