fix-0609-xwk
向文可 2 years ago
parent fc9d339606
commit 3eceb0c3f3

@ -100,13 +100,13 @@ const actions = {
}
return res;
},
logout: ({ commit }, returnUrl) => {
logout: async ({ commit }, returnUrl) => {
returnUrl = returnUrl || router.currentRoute.value.fullPath;
console.info('[logout]', returnUrl);
commit('local/setToken', null, { root: true });
commit('auth/setPermission', [], { root: true });
commit('layout/setReturnUrl', returnUrl, { root: true });
router.push({ name: 'Login', query: { returnUrl } });
await router.push({ name: 'Login', query: { returnUrl } });
location.reload();
},
getPermission: async ({ commit }) => {
let res = await getPermission();

@ -44,6 +44,8 @@
const { proxy } = getCurrentInstance();
const store = useStore();
const route = useRoute();
store.commit('layout/setReturnUrl', route.query.returnUrl);
const refsForm = ref(null);
// const sending = ref(false);

@ -133,7 +133,7 @@
state.form.id = id;
let res = await store.dispatch('product/detail', id);
if (res) {
Object.assign(state.form, state.form);
Object.assign(state.form, res);
}
res = await store.dispatch('productSkus/search', id);
state.form.skuInfos = res.map((item) => {

Loading…
Cancel
Save