Commit 624c1a2b authored by 张瑶's avatar 张瑶

feat: 更新登录接口参数

parent 63159031
Pipeline #40725 passed with stages
in 3 minutes 48 seconds
...@@ -595,10 +595,10 @@ class Login { ...@@ -595,10 +595,10 @@ class Login {
expiration: this.globalConfig.expiration, // token过期时间(单位:秒) expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer', client: 'referer',
username: usr, username: usr,
password: sha1(pwd).toUpperCase(), password: params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase(),
referer: this.globalConfig.client, referer: this.globalConfig.client,
skipMenuTest: 1, skipMenuTest: 1,
generateType: params.getParams('generateType') || 'pandaoa' generateType: params.getParams('generateType') || ''
}) })
.then(response => { .then(response => {
...@@ -844,8 +844,9 @@ class Login { ...@@ -844,8 +844,9 @@ class Login {
usr = userPhone ? userPhone: usr; usr = userPhone ? userPhone: usr;
appService.authorizationToken({ appService.authorizationToken({
loginName: usr, loginName: usr,
password: pwd ? sha1(pwd).toUpperCase(): '', password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
type: mode type: mode,
generateType: params.getParams('generateType') || ''
}).then(res => { }).then(res => {
if(res.code === 0) { if(res.code === 0) {
...@@ -873,12 +874,14 @@ class Login { ...@@ -873,12 +874,14 @@ class Login {
expiration: this.globalConfig.expiration, // token过期时间(单位:秒) expiration: this.globalConfig.expiration, // token过期时间(单位:秒)
client: 'referer', client: 'referer',
username: usr, username: usr,
password: pwd ? sha1(pwd).toUpperCase() : '', password: pwd ? (params.getParams('generateType') ? pwd : sha1(pwd).toUpperCase()) : '',
referer: this.globalConfig.client, referer: this.globalConfig.client,
skipMenuTest: 1, skipMenuTest: 1,
userPhone, userPhone,
'request.preventCache': Date.now(), 'request.preventCache': Date.now(),
ignoreSite: true, ignoreSite: true,
loginName: usr,
generateType: params.getParams('generateType') || ''
}, },
) )
.then(response => { .then(response => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment