提交 216150fc authored 作者: leon's avatar leon

store.user getters添加是否是是否是华润供应商

上级 be9a17d8
......@@ -61,6 +61,13 @@ export const useUserStore = defineStore({
getLastUpdateTime(): number {
return this.lastUpdateTime;
},
/**
* @description 是否是华润供应商
* @return true是 , false不是 ,null用户信息为空
*/
getIsSupplier(): boolean | null {
return this.userInfo?.distributorId === 0 || getAuthCache<User>(USER_INFO_KEY)?.distributorId === 0 || null;
},
},
actions: {
setToken(info: string | undefined) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论