wx.request({
url: fullUrl,
data: params,
method: httpMethod,
header: {
"content-type": "application/x-www-form-urlencoded",
'PlatForm': config.platform,
'PlatFormDesc': config.platformDesc,
'Token': token,
},
通过这个方法,post参数, data: params偶发性的为空,token也会偶发性的为空,
后台是c#的,会报异常
2019-07-05 16:32:22,665 [12] ERROR LoHas.Logger - 异常 ---> signs->setMomentTimes
System.ArgumentException: 对于“LoHas.Web.Api.Areas.Api.Controllers.SignsController”中方法“System.Web.Mvc.ActionResult setMomentTimes(Int32, LoHas.Model.SignInfoModel, System.String)”的不可以为 null 的类型“System.Int32”的参数“signId”,参数字典包含一个 null 项。可选参数必须为引用类型、可以为 null 的类型或声明为可选参数。
参数名: parameters
我是调用wx.requestPayment 在success 在此请求 后台参数有时候为null ,生成不了订单了,求大神帮忙啊