yapi/server/controllers/base.js

26 lines
472 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-07 12:04:14 +08:00
// let token = getCookie('_yapi_token');
// let uid = getCookie('_yapi_uid');
// let usermodel
2017-07-06 20:55:02 +08:00
2017-07-07 12:04:14 +08:00
// usermode.token === token
// return true
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