yapi/server/controllers/base.js

25 lines
437 B
JavaScript
Raw Normal View History

2017-07-05 17:47:51 +08:00
import yapi from '../yapi.js'
class baseController{
constructor(ctx){
console.log('baseControler init...')
}
getUid(){
return 0
}
getLoginStatus(){
2017-07-06 20:55:02 +08:00
let token = getCookie('_yapi_token');
let uid = getCookie('_yapi_uid');
let usermodel
usermode.token === token
2017-07-05 17:47:51 +08:00
return true
}
2017-07-06 19:21:54 +08:00
getRole(){
return 'admin'
}
2017-07-05 17:47:51 +08:00
}
module.exports = baseController