Commit 502ea066 by ethanlamzs

登陆协议

1 parent 63efad97
...@@ -77,24 +77,33 @@ const proxy = { ...@@ -77,24 +77,33 @@ const proxy = {
const { secret, account, type } = req.body; const { secret, account, type } = req.body;
if(secret === '888888' && account === 'admin'){ if(secret === '888888' && account === 'admin'){
res.send({ res.send({
status: 'ok', token:{value:'xxxxxxx---xxxxx----xxxx'},
type, ext:{
currentAuthority: 'admin' status: 'ok',
type,
currentAuthority: 'admin'
}
}); });
return ; return ;
} }
if(secret === '123456' && account === 'user'){ if(secret === '123456' && account === 'user'){
res.send({ res.send({
status: 'ok', token:{value:'xxxxxxx---xxxxx----xxxx'},
type, ext:{
currentAuthority: 'user' status: 'ok',
type,
currentAuthority: 'user'
}
}); });
return ; return ;
} }
res.send({ res.send({
status: 'error', token:{value:'xxxxxxx---xxxxx----xxxx'},
type, ext:{
currentAuthority: 'guest' status: 'error',
type,
currentAuthority: 'guest'
}
}); });
}, },
'POST /api/register': (req, res) => { '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!