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