Commit 502ea066 by ethanlamzs

登陆协议

1 parent 63efad97
......@@ -77,24 +77,33 @@ const proxy = {
const { secret, account, type } = req.body;
if(secret === '888888' && account === 'admin'){
res.send({
status: 'ok',
type,
currentAuthority: 'admin'
token:{value:'xxxxxxx---xxxxx----xxxx'},
ext:{
status: 'ok',
type,
currentAuthority: 'admin'
}
});
return ;
}
if(secret === '123456' && account === 'user'){
res.send({
status: 'ok',
type,
currentAuthority: 'user'
token:{value:'xxxxxxx---xxxxx----xxxx'},
ext:{
status: 'ok',
type,
currentAuthority: 'user'
}
});
return ;
}
res.send({
status: 'error',
type,
currentAuthority: 'guest'
token:{value:'xxxxxxx---xxxxx----xxxx'},
ext:{
status: 'error',
type,
currentAuthority: 'guest'
}
});
},
'POST /api/register': (req, res) => {
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!