From 8e6b4fbf0ced25ea7bed8fc8fa8364bb104d05c2 Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期五, 24 五月 2024 16:18:48 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg --- _Main/BL/Type_Archive/StaticMethod_HandlePR.qbl | 32 ++++++++++++++++++++------------ 1 files changed, 20 insertions(+), 12 deletions(-) diff --git a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl index d157263..f14945f 100644 --- a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl +++ b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl @@ -27,17 +27,25 @@ info( json ); // 璋冪敤鎺ュ彛 - //url := "/PR/Import"; - //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() ); - //i.URL( url ); - //i.PostMethod( true ); - // - //try { - // i.Call( json ); - // - // htmlresult := i.Result(); - //} onerror { - // - //} + url := "/PR/Import"; + + i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() ); + i.URL( url ); + i.PostMethod( true ); + i.MediaType( "application/json" ); + + i.Call( json ); + + htmlresult := i.Result(); + + respJSON := JSON::Parse( htmlresult ); + code := respJSON.Get( "code" ).GetNumber(); + message := respJSON.Get( "message" ).GetString(); + + if ( code = 200 ) { + + } else { + error( message ); + } *] } -- Gitblit v1.9.3