|
|
@@ -235,7 +235,7 @@ async function login(username, password){
|
|
|
magicJS.logger.info(`登录1`);
|
|
|
username = rsaEncode(extData.j_rsakey, username);
|
|
|
password = rsaEncode(extData.j_rsakey, password);
|
|
|
- let data = {
|
|
|
+ let rsqData = {
|
|
|
appKey: "cloud",
|
|
|
accountType: '01',
|
|
|
userName: `{{RSA}}${username}`,
|
|
|
@@ -246,7 +246,7 @@ async function login(username, password){
|
|
|
mailSuffix: "@189.cn",
|
|
|
paramId: extData.paramId
|
|
|
};
|
|
|
- let body = JSON.stringify(data);
|
|
|
+ let body = JSON.stringify(rsqData);
|
|
|
let options = {
|
|
|
url: "https://open.e.189.cn/api/logbox/oauth2/loginSubmit.do",
|
|
|
headers: {
|
|
|
@@ -262,9 +262,9 @@ async function login(username, password){
|
|
|
};
|
|
|
magicJS.logger.info(`登录2`);
|
|
|
magicJS.http.post(options).then(resp => {
|
|
|
- const htmlText = resp.body;
|
|
|
+ const rspData = resp.body;
|
|
|
try {
|
|
|
- magicJS.logger.info(`接口数据:${JSON.stringify(data)}`);
|
|
|
+ magicJS.logger.info(`接口数据:${JSON.stringify(rspData)}`);
|
|
|
resolve(true);
|
|
|
} catch (err) {
|
|
|
resolve(false);
|