$http.post(myurl, myreq).success(function(apiReply) {
if (! checkApiResponse(apiReply)){
console.log("failed to run action with error: " + apiReply.retcode + " " + apiReply.retbody)
return false
} else {
callback(apiReply)
}
}).error(function(data, status) {
var errmsg = "handle api request failed with status: "
errmsg += status + ", error response: " + data
console.log(errmsg)
ons.notification.alert({
//title: "错误",
//message: '连接服务器失败',
title: "提示",
message: "请检查您的网络环境",
buttonLabel: ['确认']
});
});
}
这是我发布数据的方式,当使用http url时,它工作正常,但是当我使用https url时不起作用,我该怎么办?