|
|
@ -294,7 +294,11 @@ func (this *Seckill) SubmitSeckillOrder() bool { |
|
|
|
paymentPwd := this.conf.MustValue("account", "payment_pwd", "") |
|
|
|
initInfo, err := this.SeckillInitInfo() |
|
|
|
if err != nil { |
|
|
|
if len(err.Error()) > 200 { |
|
|
|
log.Println(fmt.Sprintf("抢购失败,无法获取生成订单的基本信息,接口返回: html代码")) |
|
|
|
} else { |
|
|
|
log.Println(fmt.Sprintf("抢购失败,无法获取生成订单的基本信息,接口返回:【%s】", err.Error())) |
|
|
|
} |
|
|
|
return false |
|
|
|
} |
|
|
|
address := gjson.Get(initInfo, "addressList").Array() |
|
|
@ -355,6 +359,7 @@ func (this *Seckill) SubmitSeckillOrder() bool { |
|
|
|
req.SetData("fp", fp) |
|
|
|
req.SetData("token", token) |
|
|
|
req.SetData("pru", "") |
|
|
|
//req.SetData("sk", "s76lo6CABKGBMSZ") // 自己添加
|
|
|
|
resp, body, err := req.SetUrl("https://marathon.jd.com/seckillnew/orderService/pc/submitOrder.action?skuId=" + skuId).SetMethod("post").Send().End() |
|
|
|
if err != nil || resp.StatusCode != http.StatusOK { |
|
|
|
log.Println("抢购失败,网络错误") |
|
|
|