feat: 切换用户之后返回主页
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
All checks were successful
git提交控制 AiDA WEB-Node.js main 分支构建部署 / build (20.19.0) (push) Has been skipped
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { ref, reactive, onMounted, inject } from 'vue'
|
||||
import router from '@/router'
|
||||
import { showConfirmDialog, showToast } from 'vant'
|
||||
import { useUserInfoStore, useOverallStore } from '@/stores'
|
||||
import { useUserInfoStore, useOverallStore,useGenerateStore } from '@/stores'
|
||||
import { LogOut } from '@/api/login'
|
||||
import { getCustomerList, type CustomerListParams, customerCheckin } from '@/api/workshop'
|
||||
import MyEvent from '@/utils/myEvent'
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
const userInfoStore = useUserInfoStore()
|
||||
const overallStore = useOverallStore()
|
||||
const generateStore = useGenerateStore()
|
||||
|
||||
const emit = defineEmits(['selected-customer'])
|
||||
const show = ref(false)
|
||||
const isEdit = ref(false)
|
||||
@@ -187,7 +189,8 @@
|
||||
customerCheckin({ nickname: selectedCustomer.name }).then((res) => {
|
||||
useUserInfoStore().resetGenerateParams()
|
||||
MyEvent.emit('clear-generate-state')
|
||||
useUserInfoStore().setCustomerInfo(res)
|
||||
useGenerateStore().setCustomerInfo(res)
|
||||
router.push({ path: '/workshop/home' })
|
||||
})
|
||||
}
|
||||
showSwitchCustomerPopup.value = false
|
||||
|
||||
Reference in New Issue
Block a user