|
|
|
@ -11,15 +11,16 @@ function createsession(headers,deviceId,userId){ |
|
|
|
|
for(let i=1; i<5; i++){ |
|
|
|
|
let signature; |
|
|
|
|
let public_key; |
|
|
|
|
if(getItem('aliecctype')=="1"){ |
|
|
|
|
if(i == 3){ |
|
|
|
|
try{ |
|
|
|
|
let getaliecc = JSON.parse(request('http://124.221.241.174:87/api', { body: 'did=' + deviceId + '&uid=' + userId + '&token=' + md5(getNowTime()), method: 'POST', timeout: 3000 })); |
|
|
|
|
if (getaliecc.code == 200) { |
|
|
|
|
signature = getaliecc.sign; |
|
|
|
|
public_key = getaliecc.key; |
|
|
|
|
} |
|
|
|
|
let getaliecc = JSON.parse(request('http://124.221.241.174:87/api', { body: 'did=' + deviceId + '&uid=' + userId + '&token=' + md5(getNowTime()), method: 'POST', timeout: 3000 })); |
|
|
|
|
if (getaliecc.code == 200) { |
|
|
|
|
signature = getaliecc.sign; |
|
|
|
|
public_key = getaliecc.key; |
|
|
|
|
} |
|
|
|
|
log("调用py服务器生成算法"); |
|
|
|
|
}catch(e){ |
|
|
|
|
clearItem('aliecctype'); |
|
|
|
|
log("调用py服务器失败"); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
let a = justTestSign('5dde4e1bdf9e4966b387ba58f4b3fdc3',deviceId,userId); |