feat: 🚀 完工
This commit is contained in:
@@ -6,11 +6,11 @@
|
||||
|
||||
<script setup lang="ts" name="home">
|
||||
//登录请求接口
|
||||
// import { getOrgsApi, getWarehousesListApi } from "@/api/modules/global";
|
||||
import { getWarehousesListApi } from "@/api/modules/global";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
//用户信息存储
|
||||
// import { useUserStore } from "@/stores/modules/user";
|
||||
// const userStore = useUserStore();
|
||||
import { useUserStore } from "@/stores/modules/user";
|
||||
const userStore = useUserStore();
|
||||
//路由;
|
||||
const $route = useRoute();
|
||||
const $router = useRouter();
|
||||
@@ -33,24 +33,24 @@ const $router = useRouter();
|
||||
// }
|
||||
// };
|
||||
// getOrgs();
|
||||
// const getWarehousesList = async () => {
|
||||
// const result = await getWarehousesListApi();
|
||||
// if (result?.code === 0) {
|
||||
// const { data } = result;
|
||||
// if (data?.length) {
|
||||
// let options: any = [];
|
||||
// data.forEach((item: any) => {
|
||||
// options.push({
|
||||
// id: item.id,
|
||||
// value: item.warehouse_name,
|
||||
// label: item.warehouse_name
|
||||
// });
|
||||
// });
|
||||
// userStore.setWarehouse(options);
|
||||
// }
|
||||
// }
|
||||
// };
|
||||
// getWarehousesList();
|
||||
const getWarehousesList = async () => {
|
||||
const result = await getWarehousesListApi();
|
||||
if (result?.code === 0) {
|
||||
const { data } = result;
|
||||
if (data?.length) {
|
||||
let options: any = [];
|
||||
data.forEach((item: any) => {
|
||||
options.push({
|
||||
id: item.id,
|
||||
value: item.warehouse_number,
|
||||
label: item.warehouse_name
|
||||
});
|
||||
});
|
||||
userStore.setWarehouse(options);
|
||||
}
|
||||
}
|
||||
};
|
||||
getWarehousesList();
|
||||
|
||||
const init = () => {
|
||||
let redirect_path: any = $route.query.redirect_path;
|
||||
|
||||
Reference in New Issue
Block a user