|
|
|
@ -84,16 +84,17 @@ jx.cloudview.oauth.listen = function (key,callback,err) {
|
|
|
|
|
http.setHeader('code', encodeURIComponent(p.code))
|
|
|
|
|
http.setHeader('pid', 'authentication')
|
|
|
|
|
http.setHeader('platform', navigator.appName)
|
|
|
|
|
http.setHeader('redirect_uri', key)
|
|
|
|
|
http.setHeader('redirect-uri', key)
|
|
|
|
|
|
|
|
|
|
http.post(url, function (x) {
|
|
|
|
|
try{
|
|
|
|
|
try{
|
|
|
|
|
var info = JSON.parse(x.responseText)
|
|
|
|
|
callback(info)
|
|
|
|
|
|
|
|
|
|
}catch(e){
|
|
|
|
|
if (err != null){
|
|
|
|
|
err(e)
|
|
|
|
|
}
|
|
|
|
|
}else {console.log(e)}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|