Skip to content

Commit

Permalink
修改文档
Browse files Browse the repository at this point in the history
  • Loading branch information
carsonxu committed Nov 7, 2018
1 parent 6c52bab commit 47357dc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,20 @@ var cos = new COS({
getAuthorization: function (options, callback) {
// 异步获取签名
wx.request({
           url: 'https://example.com/sign', // 步骤二提供的签名接口
           url: 'https://example.com/server/sts.php', // 步骤二提供的签名接口
           data: {
Method: options.Method,
               Key: options.Key
},
dataType: 'text',
success: function (result) {
callback(result.data);
var data = result.data;
callback({
TmpSecretId: data.credentials && data.credentials.tmpSecretId,
TmpSecretKey: data.credentials && data.credentials.tmpSecretKey,
XCosSecurityToken: data.credentials && data.credentials.sessionToken,
ExpiredTime: data.expiredTime,
});
}
});
}
Expand Down

0 comments on commit 47357dc

Please sign in to comment.