|
|
@ -21,7 +21,7 @@ jx.cloudview.init = function(url,redir_url){//host,protocol){
|
|
|
|
jx.cloudview.oauth.init = function (id, key,callback,err) {
|
|
|
|
jx.cloudview.oauth.init = function (id, key,callback,err) {
|
|
|
|
// var url = ":protocol://:host/cloud-view/" +id+"/get"
|
|
|
|
// var url = ":protocol://:host/cloud-view/" +id+"/get"
|
|
|
|
// url = url.replace(/:protocol/,jx.cloudview.protocol).replace(/:host/,jx.cloudview.host)
|
|
|
|
// url = url.replace(/:protocol/,jx.cloudview.protocol).replace(/:host/,jx.cloudview.host)
|
|
|
|
var url = ([jx.cloudview.url,key,'get']).join('/')
|
|
|
|
var url = ([jx.cloudview.url,id,'get']).join('/')
|
|
|
|
var httpclient = HttpClient.instance()
|
|
|
|
var httpclient = HttpClient.instance()
|
|
|
|
httpclient.setHeader("platform",navigator.appName)
|
|
|
|
httpclient.setHeader("platform",navigator.appName)
|
|
|
|
|
|
|
|
|
|
|
@ -33,7 +33,8 @@ jx.cloudview.oauth.init = function (id, key,callback,err) {
|
|
|
|
|
|
|
|
|
|
|
|
if(url.match(/^http.+$/)){
|
|
|
|
if(url.match(/^http.+$/)){
|
|
|
|
|
|
|
|
|
|
|
|
var oauth_uri = url.match(/redirect_uri=(.+)&/)[1];
|
|
|
|
|
|
|
|
|
|
|
|
var oauth_uri = url.match(/redirect_uri=(.+)\&/)[1];
|
|
|
|
url = url.replace(oauth_uri, key)
|
|
|
|
url = url.replace(oauth_uri, key)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|