mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 21:37:04 +08:00
update
This commit is contained in:
parent
573898149a
commit
249c294926
@ -60,7 +60,6 @@ FluContentPage{
|
|||||||
onCache:
|
onCache:
|
||||||
(result)=>{
|
(result)=>{
|
||||||
text_info.text = result
|
text_info.text = result
|
||||||
console.debug(result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -61,7 +61,6 @@ FluContentPage{
|
|||||||
onCache:
|
onCache:
|
||||||
(result)=>{
|
(result)=>{
|
||||||
text_info.text = result
|
text_info.text = result
|
||||||
console.debug(result)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,8 +21,9 @@ HttpRequest::HttpRequest(QObject *parent)
|
|||||||
|
|
||||||
QMap<QString, QVariant> HttpRequest::toMap(){
|
QMap<QString, QVariant> HttpRequest::toMap(){
|
||||||
QVariant _params;
|
QVariant _params;
|
||||||
|
bool isPostString = method() == "postString";
|
||||||
if(params().isNull()){
|
if(params().isNull()){
|
||||||
if(method() == "postString"){
|
if(isPostString){
|
||||||
_params = "";
|
_params = "";
|
||||||
}else{
|
}else{
|
||||||
_params = QMap<QString,QVariant>();
|
_params = QMap<QString,QVariant>();
|
||||||
@ -38,16 +39,20 @@ QMap<QString, QVariant> HttpRequest::toMap(){
|
|||||||
}
|
}
|
||||||
QMap<QString, QVariant> request = {
|
QMap<QString, QVariant> request = {
|
||||||
{"url",url()},
|
{"url",url()},
|
||||||
{"params",_params},
|
{"headers",_headers.toMap()},
|
||||||
{"headers",_headers},
|
|
||||||
{"method",method()},
|
{"method",method()},
|
||||||
{"downloadSavePath",downloadSavePath()}
|
{"downloadSavePath",downloadSavePath()}
|
||||||
};
|
};
|
||||||
|
if(isPostString){
|
||||||
|
request.insert("params",_params.toString());
|
||||||
|
}else{
|
||||||
|
request.insert("params",_params.toMap());
|
||||||
|
}
|
||||||
return request;
|
return request;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString HttpRequest::httpId(){
|
QString HttpRequest::httpId(){
|
||||||
return FluTools::getInstance()->sha256(QJsonDocument::fromVariant(QVariant(toMap())).toJson());
|
return FluTools::getInstance()->sha256(QJsonDocument::fromVariant(QVariant(toMap())).toJson(QJsonDocument::Compact));
|
||||||
}
|
}
|
||||||
|
|
||||||
HttpCallable::HttpCallable(QObject *parent)
|
HttpCallable::HttpCallable(QObject *parent)
|
||||||
|
Loading…
Reference in New Issue
Block a user