|
|
@@ -19,17 +19,19 @@ export const useCompanyStore = defineStore('company-store', {
|
|
|
recordState() {
|
|
|
setLocalState(this.$state)
|
|
|
},
|
|
|
- async getCompanyInfo(companyId: number | undefined) {
|
|
|
+ async getCompanyInfo(companyId: number | undefined | string) {
|
|
|
if (companyId === 0) {
|
|
|
this.setCompanyInfo({
|
|
|
id: 0,
|
|
|
name: '走马AI'
|
|
|
})
|
|
|
useAuthStore().changeToken(`SECRET_TOKEN`)
|
|
|
+ document.title = '走马AI助手'
|
|
|
} else {
|
|
|
await fetchGetCompany(companyId).then((res: any) => {
|
|
|
this.setCompanyInfo(res)
|
|
|
useAuthStore().changeToken(`SECRET_TOKEN${res.id === 0 ? '' : res.id}`)
|
|
|
+ document.title = res.name + '助手'
|
|
|
})
|
|
|
}
|
|
|
}
|