Browse Source

增加子账号详情接口传参

liudongzhi 1 tháng trước cách đây
mục cha
commit
97daa2a4ae

+ 1 - 1
src/views/accountRoleManagement/subAccountManagement/create.vue

@@ -262,7 +262,7 @@ const loadSubAccountData = async () => {
   if (!accountId.value) return;
   try {
     const storeId = localGet("createdId") || localGet("geeker-user")?.userInfo?.storeId || "";
-    const userId = route.query.userId;
+    const userId = route.query.userId ? Number(route.query.userId) : Number(accountId.value);
     const roleIdNew = Number(route.query.roleId);
     const res = await getSubAccountDetail(Number(storeId), userId, roleIdNew);
     const code = typeof res.code === "string" ? parseInt(res.code) : res.code;

+ 1 - 0
src/views/accountRoleManagement/subAccountManagement/index.vue

@@ -216,6 +216,7 @@ const handleView = (row: SubAccountItem) => {
     path: "/accountRoleManagement/subAccountManagement/create",
     query: {
       id: row.userId.toString(),
+      userId: row.userId.toString(),
       accountName: row.accountName,
       roleId: row.roleId,
       type: "view"