Commit 5c6613be authored by chenqikuai's avatar chenqikuai

fix

parent 98603707
......@@ -14,10 +14,13 @@ export function authCheck(cb: Function) {
export async function chatAuthCheck(cb: Function, cb2?: Function) {
const msg = getUserMsg()
if (msg?.role === eRole.user) return true
if (msg?.role === eRole.user) {
cb();
}
else if (msg?.role === eRole.staff) {
const ret = await getStaffOnDutyStatus()
if (ret.code === 200 && ret.data) {
console.log('cb');
cb()
} else {
cb2 && cb2()
......
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