## OSS签名参数
> 代号:1000_g16
+++
get:Xmkz_v3/OverallSituation/ossHousing
*class=图片分类编号 1是楼盘。2户型,3为普通带看图片 ,4为留言板图片 #
*token=上传图片用户的token #
<<<
success
返回参数说明:
host:上传地址
accessid:OSSAccessKeyId
dir:上传到OSS的目录
imgName:图片文件名称
signature:oss签名
callback:经过编码的数据
policy:经过编码后的配置文件
{
"accessid": "LTAIeRk0QoxhhwLq",
"host": "http://xiaomaapp.oss-cn-shenzhen.aliyuncs.com/", //阿里云OSS地址
"policy": "eyJleHBpcmF0aW9uIjoiMjAxNy0wMS0xOFQxNzozNjo1NFoiLCJjb25kaXRpb25zIjpbWyJjb250ZW50LWxlbmd0aC1yYW5nZSIsMCwxMDQ4NTc2MDAwXSxbInN0YXJ0cy13aXRoIiwiJGtleSIsInNoZW5GZW5nWmhlbmdcLyJdXX0=",
"signature": "40kQx59GZ48v0/M0bAlYxQOQ27U=",
"expire": 1484732214,
"callback": "eyJjYWxsYmFja1VybCI6ImFwcC54aWFvbWFrdWFpenUuY29tXC9pbmRleC5waHBcL1N0YWZmXC9Ib3VzZVwvY2FsbGJhY2suaHRtbCIsImNhbGxiYWNrQm9keSI6ImZpbGVuYW1lPSR7b2JqZWN0fSZzaXplPSR7c2l6ZX0mbWltZVR5cGU9JHttaW1lVHlwZX0maGVpZ2h0PSR7aW1hZ2VJbmZvLmhlaWdodH0md2lkdGg9JHtpbWFnZUluZm8ud2lkdGh9IiwiY2FsbGJhY2tCb2R5VHlwZSI6ImFwcGxpY2F0aW9uXC94LXd3dy1mb3JtLXVybGVuY29kZWQifQ==",
"imgName": "2017011817265414847316149756", //图片文件名
"dir": "shenFengZheng/", //上传目录
"callbackUrl": "app.xiaomakuaizu.com/index.php/Staff/House/callback.html" //回调地址
}
+++
## 上传图片
> 代号:1000_g16
+++
get: host【OSS签名参数返回的上传地址】
*name=图片名称 #
*key=图片路径与名称 #
*policy=上传图片用户的token #
*OSSAccessKeyId=OSSAccessKeyId #
*success_action_status=让服务端返回200,不然,默认会返回204 #
*callback=经过编码的数据 #
*signature=签名 #
*file=图片或文件 #
![](https://box.kancloud.cn/57250f09f11b0d5bd82d1ee681da1193_1525x459.png)
<<<
success
返回参数说明:
imgId:图片ID //上传带看图片的时候。该ID需要先保存。用户上传数据的时候一起上传上来
{
"data": {
"imgId": "317"
},
"info": "图片上传成功",
"code": 1000,
"state": 1
}
+++