电子合同API开发文档 v5

签署合同-h5页面签署

请求地址:/v5/Contracts/h5signed.json

请求方式:POST

接口版本: 5.2.3

接口描述:

var url = "https://api-v2.1dq.com/v5/Contracts/h5signed.json"
var httpArg = "easy_id=175592531139104768&words_id=11529272-d742-11ea-a75a-0242ac110011&btn_text=&channel=&color=000000&display_date=&display_handwritten_signature=&display_personal_tpl=&display_place=&display_public_header=&display_success_footer=&display_success_header_help=&display_success_page=&display_system_seal=&number=&redirect_url="
APISTORE(url, httpArg: httpArg)
func  APISTORE(httpUrl: String, httpArg: String) {
    var req = NSMutableURLRequest(URL: NSURL(string: httpUrl + "?" + httpArg)!)
    req.timeoutInterval = 6
    req.HTTPMethod = "GET"
    NSURLConnection.sendAsynchronousRequest(req, queue: NSOperationQueue.mainQueue()) {
        (response, data, error) -> Void in
        let res = response as! NSHTTPURLResponse
        println(res.statusCode)
        if let e = error{
            println("请求失败")
        }
        if let d = data {
            var content = NSString(data: d, encoding: NSUTF8StringEncoding)
            println(content)
        }
    }
}