This commit is contained in:
张成
2025-10-09 18:21:05 +08:00
parent ba61c9e45d
commit 6be5f7ed4f
49 changed files with 97 additions and 80 deletions

View File

@@ -2,7 +2,7 @@ import http from "@/libs/http";
class SysAdServer { class SysAdServer {
async getAll(param) { async getAll(param) {
return await window.framework.httpget("/sys_ad/index", param); return await window.framework.http.get("/sys_ad/index", param);
} }
async add(row) { async add(row) {

View File

@@ -1,7 +1,7 @@
class ai_messagesClServer { class ai_messagesClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/ai_messages/all', param); let res= await window.framework.http.get('/ai_messages/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class gamesClServer { class gamesClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/gme_games/all', param); let res= await window.framework.http.get('/gme_games/all', param);
return res; return res;
} }
@@ -41,7 +41,7 @@ class gamesClServer {
} }
async statistics() { async statistics() {
let res = await window.framework.httpget('/gme_games/statistics', {}); let res = await window.framework.http.get('/gme_games/statistics', {});
return res; return res;
} }
} }

View File

@@ -1,7 +1,7 @@
class paymentOrdersClServer { class paymentOrdersClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/pay_orders/all', param); let res= await window.framework.http.get('/pay_orders/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class venuesClServer { class venuesClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/ven_venues/all', param); let res= await window.framework.http.get('/ven_venues/all', param);
return res; return res;
} }

View File

@@ -2,7 +2,7 @@
class walletTransactionsClServer { class walletTransactionsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/wch_wallet_transactions/all', param); let res= await window.framework.http.get('/wch_wallet_transactions/all', param);
return res; return res;
} }
@@ -17,7 +17,7 @@ class walletTransactionsClServer {
} }
async detail(id) { async detail(id) {
let res= await window.framework.httpget('/wch_wallet_transactions/detail', { id }); let res= await window.framework.http.get('/wch_wallet_transactions/detail', { id });
return res; return res;
} }
@@ -27,7 +27,7 @@ class walletTransactionsClServer {
} }
async statistics() { async statistics() {
let res = await window.framework.httpget('/wch_wallet_transactions/statistics', {}); let res = await window.framework.http.get('/wch_wallet_transactions/statistics', {});
return res; return res;
} }
} }

View File

@@ -2,7 +2,7 @@
class walletsClServer { class walletsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/wch_wallets/all', param); let res= await window.framework.http.get('/wch_wallets/all', param);
return res; return res;
} }
@@ -27,7 +27,7 @@ class walletsClServer {
} }
async statistics() { async statistics() {
let res = await window.framework.httpget('/wch_wallets/statistics', {}); let res = await window.framework.http.get('/wch_wallets/statistics', {});
return res; return res;
} }
} }

View File

@@ -1,7 +1,7 @@
class wch_usersClServer { class wch_usersClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/wch_users/all', param); let res= await window.framework.http.get('/wch_users/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class infoClServer { class infoClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/inf_info/all', param); let res= await window.framework.http.get('/inf_info/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class info_typeClServer { class info_typeClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/inf_info_type/all', param); let res= await window.framework.http.get('/inf_info_type/all', param);
return res; return res;
} }

View File

@@ -2,22 +2,22 @@ import http from "@/libs/http";
class HomeServer { class HomeServer {
// 获取订单统计 // 获取订单统计
async getOderCount() { async getOderCount() {
let res = await window.framework.httpget("/order/count"); let res = await window.framework.http.get("/order/count");
return res; return res;
} }
async getUserCount() { async getUserCount() {
let res = await window.framework.httpget("/user/count"); let res = await window.framework.http.get("/user/count");
return res; return res;
} }
async getSalesRank() { async getSalesRank() {
let res = await window.framework.httpget("/index/salesRank"); let res = await window.framework.http.get("/index/salesRank");
return res; return res;
} }
async userRecommendRank() { async userRecommendRank() {
let res = await window.framework.httpget("/index/userRecommendRank"); let res = await window.framework.http.get("/index/userRecommendRank");
return res; return res;
} }
} }

View File

@@ -1,7 +1,7 @@
class ntr_questionsClServer { class ntr_questionsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/ntr_questions/all', param); let res= await window.framework.http.get('/ntr_questions/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class ntr_recordsClServer { class ntr_recordsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/ntr_records/all', param); let res= await window.framework.http.get('/ntr_records/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class transfer_detailsClServer { class transfer_detailsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/transfer_details/all', param); let res= await window.framework.http.get('/transfer_details/all', param);
return res; return res;
} }

View File

@@ -1,12 +1,12 @@
import http from '@/libs/http' import http from '@/libs/http'
class RolePermissionServer { class RolePermissionServer {
async getRoles(callback) { async getRoles(callback) {
let res = await window.framework.httpget('/SysRolePermission/Query', {}) let res = await window.framework.http.get('/SysRolePermission/Query', {})
return res return res
} }
async getRole(row) { async getRole(row) {
let res = await window.framework.httpget('/SysRolePermission/QueryByRoleId', row) let res = await window.framework.http.get('/SysRolePermission/QueryByRoleId', row)
return res return res
} }

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http"; import http from "@/libs/http";
class RoleServer { class RoleServer {
async list() { async list() {
let res = await window.framework.httpget("/sys_role/index", {}); let res = await window.framework.http.get("/sys_role/index", {});
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http"; import http from "@/libs/http";
class SysAddress { class SysAddress {
async index(param) { async index(param) {
let res = await window.framework.httpget("/sys_address/index", param); let res = await window.framework.http.get("/sys_address/index", param);
return res; return res;
} }
} }

View File

@@ -1,12 +1,12 @@
import http from "@/libs/http"; import http from "@/libs/http";
class SysModuleServer { class SysModuleServer {
async all() { async all() {
let res = await window.framework.httpget("/sys_menu/all", {}); let res = await window.framework.http.get("/sys_menu/all", {});
return res; return res;
} }
async list(row) { async list(row) {
let res = await window.framework.httpget("/sys_menu/all", row); let res = await window.framework.http.get("/sys_menu/all", row);
return res; return res;
} }

View File

@@ -1,27 +1,27 @@
import http from "@/libs/http"; import http from "@/libs/http";
class SysLogServe { class SysLogServe {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_log/all", param); let res = await window.framework.http.get("/sys_log/all", param);
return res; return res;
} }
async detail(param) { async detail(param) {
let res = await window.framework.httpget("/sys_log/detail", param); let res = await window.framework.http.get("/sys_log/detail", param);
return res; return res;
} }
async delete(param) { async delete(param) {
let res = await window.framework.httpget("/sys_log/delete", param); let res = await window.framework.http.get("/sys_log/delete", param);
return res; return res;
} }
async delete_all(param) { async delete_all(param) {
let res = await window.framework.httpget("/sys_log/delete_all", param); let res = await window.framework.http.get("/sys_log/delete_all", param);
return res; return res;
} }
async operates(param) { async operates(param) {
let res = await window.framework.httpget("/sys_log/operates", param); let res = await window.framework.http.get("/sys_log/operates", param);
return res; return res;
} }
} }

View File

@@ -1,7 +1,7 @@
class systemTypeClServer { class systemTypeClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/sys_project_type/all', param); let res= await window.framework.http.get('/sys_project_type/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from '@/libs/http' import http from '@/libs/http'
class TableServer { class TableServer {
async getAll(callback) { async getAll(callback) {
return await window.framework.httpget('/table/index', {}) return await window.framework.http.get('/table/index', {})
} }
async add(row, callback) { async add(row, callback) {
@@ -19,11 +19,11 @@ class TableServer {
} }
async autoApi(id) { async autoApi(id) {
return await window.framework.httpget('/template/api', { id: id }) return await window.framework.http.get('/template/api', { id: id })
} }
async autoDb(id) { async autoDb(id) {
return await window.framework.httpget('/template/autoDb', { id: id }) return await window.framework.http.get('/template/autoDb', { id: id })
} }
} }

View File

@@ -6,7 +6,7 @@ class UserServer {
} }
async all() { async all() {
let res = await window.framework.httpget("/sys_user/index", {}); let res = await window.framework.http.get("/sys_user/index", {});
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http"; import http from "@/libs/http";
class FormFieldServer { class FormFieldServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_form_field/all", param); let res = await window.framework.http.get("/sys_form_field/all", param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http"; import http from "@/libs/http";
class FormServer { class FormServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_form/all", param); let res = await window.framework.http.get("/sys_form/all", param);
return res; return res;
} }

View File

@@ -2,7 +2,7 @@ import http from "@/libs/http";
class MenuServer { class MenuServer {
async list(row) { async list(row) {
let res = await window.framework.httpget("/sys_menu/index", row); let res = await window.framework.http.get("/sys_menu/index", row);
return res; return res;
} }

View File

@@ -1,12 +1,12 @@
import http from "@/libs/http"; import http from "@/libs/http";
class ModelFieldServer { class ModelFieldServer {
async all(row) { async all(row) {
let res = await window.framework.httpget("/sys_model_field/all", row); let res = await window.framework.http.get("/sys_model_field/all", row);
return res; return res;
} }
async allByKey(row) { async allByKey(row) {
let res = await window.framework.httpget("/sys_model_field/allByKey", row, { let res = await window.framework.http.get("/sys_model_field/allByKey", row, {
hideLoad: true hideLoad: true
}); });
return res; return res;

View File

@@ -6,12 +6,12 @@ class ModelServer {
} }
async all() { async all() {
let res = await window.framework.httpget("/sys_model/all", {}); let res = await window.framework.http.get("/sys_model/all", {});
return res; return res;
} }
async detail(row) { async detail(row) {
let res = await window.framework.httpget("/sys_model/detail", row); let res = await window.framework.http.get("/sys_model/detail", row);
return res; return res;
} }

View File

@@ -1,11 +1,11 @@
import http from "@/libs/http"; import http from "@/libs/http";
class ParamSetupServer { class ParamSetupServer {
async getAll() { async getAll() {
return await window.framework.httpget("/sys_parameter/index", {}); return await window.framework.http.get("/sys_parameter/index", {});
} }
async getOne(key) { async getOne(key) {
return await window.framework.httpget("/sys_parameter/key", { key }); return await window.framework.http.get("/sys_parameter/key", { key });
} }
async add(row) { async add(row) {

View File

@@ -1,7 +1,7 @@
import http from "@/libs/http"; import http from "@/libs/http";
class SysControlTypeServer { class SysControlTypeServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_control_type/all", param); let res = await window.framework.http.get("/sys_control_type/all", param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class recommend_blocksClServer { class recommend_blocksClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/recommend_blocks/all', param); let res= await window.framework.http.get('/recommend_blocks/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class user_followsClServer { class user_followsClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/user_follows/all', param); let res= await window.framework.http.get('/user_follows/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class user_trackingClServer { class user_trackingClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/user_tracking/all', param); let res= await window.framework.http.get('/user_tracking/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
class wch_citiesClServer { class wch_citiesClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/wch_cities/all', param); let res= await window.framework.http.get('/wch_cities/all', param);
return res; return res;
} }

View File

@@ -1,12 +1,12 @@
import http from '@/utils/http' import http from '@/utils/http'
class RolePermissionServer { class RolePermissionServer {
async getRoles(callback) { async getRoles(callback) {
let res = await window.framework.httpget('/SysRolePermission/Query', {}) let res = await window.framework.http.get('/SysRolePermission/Query', {})
return res return res
} }
async getRole(row) { async getRole(row) {
let res = await window.framework.httpget('/SysRolePermission/QueryByRoleId', row) let res = await window.framework.http.get('/SysRolePermission/QueryByRoleId', row)
return res return res
} }

View File

@@ -1,7 +1,7 @@
import http from "@/utils/http"; import http from "@/utils/http";
class RoleServer { class RoleServer {
async list() { async list() {
let res = await window.framework.httpget("/sys_role/index", {}); let res = await window.framework.http.get("/sys_role/index", {});
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/utils/http"; import http from "@/utils/http";
class SysAddress { class SysAddress {
async index(param) { async index(param) {
let res = await window.framework.httpget("/sys_address/index", param); let res = await window.framework.http.get("/sys_address/index", param);
return res; return res;
} }
} }

View File

@@ -1,12 +1,12 @@
import http from "@/utils/http"; import http from "@/utils/http";
class SysModuleServer { class SysModuleServer {
async all() { async all() {
let res = await window.framework.httpget("/sys_menu/all", {}); let res = await window.framework.http.get("/sys_menu/all", {});
return res; return res;
} }
async list(row) { async list(row) {
let res = await window.framework.httpget("/sys_menu/all", row); let res = await window.framework.http.get("/sys_menu/all", row);
return res; return res;
} }

View File

@@ -1,27 +1,27 @@
import http from "@/utils/http"; import http from "@/utils/http";
class SysLogServe { class SysLogServe {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_log/all", param); let res = await window.framework.http.get("/sys_log/all", param);
return res; return res;
} }
async detail(param) { async detail(param) {
let res = await window.framework.httpget("/sys_log/detail", param); let res = await window.framework.http.get("/sys_log/detail", param);
return res; return res;
} }
async delete(param) { async delete(param) {
let res = await window.framework.httpget("/sys_log/delete", param); let res = await window.framework.http.get("/sys_log/delete", param);
return res; return res;
} }
async delete_all(param) { async delete_all(param) {
let res = await window.framework.httpget("/sys_log/delete_all", param); let res = await window.framework.http.get("/sys_log/delete_all", param);
return res; return res;
} }
async operates(param) { async operates(param) {
let res = await window.framework.httpget("/sys_log/operates", param); let res = await window.framework.http.get("/sys_log/operates", param);
return res; return res;
} }
} }

View File

@@ -1,7 +1,7 @@
import http from '@/utils/http'; import http from '@/utils/http';
class systemTypeClServer { class systemTypeClServer {
async all(param) { async all(param) {
let res= await window.framework.httpget('/sys_project_type/all', param); let res= await window.framework.http.get('/sys_project_type/all', param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from '@/utils/http' import http from '@/utils/http'
class TableServer { class TableServer {
async getAll(callback) { async getAll(callback) {
return await window.framework.httpget('/table/index', {}) return await window.framework.http.get('/table/index', {})
} }
async add(row, callback) { async add(row, callback) {
@@ -19,11 +19,11 @@ class TableServer {
} }
async autoApi(id) { async autoApi(id) {
return await window.framework.httpget('/template/api', { id: id }) return await window.framework.http.get('/template/api', { id: id })
} }
async autoDb(id) { async autoDb(id) {
return await window.framework.httpget('/template/autoDb', { id: id }) return await window.framework.http.get('/template/autoDb', { id: id })
} }
} }

View File

@@ -6,7 +6,7 @@ class UserServer {
} }
async all() { async all() {
let res = await window.framework.httpget("/sys_user/index", {}); let res = await window.framework.http.get("/sys_user/index", {});
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/utils/http"; import http from "@/utils/http";
class FormFieldServer { class FormFieldServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_form_field/all", param); let res = await window.framework.http.get("/sys_form_field/all", param);
return res; return res;
} }

View File

@@ -1,7 +1,7 @@
import http from "@/utils/http"; import http from "@/utils/http";
class FormServer { class FormServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_form/all", param); let res = await window.framework.http.get("/sys_form/all", param);
return res; return res;
} }

View File

@@ -2,7 +2,7 @@ import http from "@/utils/http";
class MenuServer { class MenuServer {
async list(row) { async list(row) {
let res = await window.framework.httpget("/sys_menu/index", row); let res = await window.framework.http.get("/sys_menu/index", row);
return res; return res;
} }

View File

@@ -1,12 +1,12 @@
import http from "@/utils/http"; import http from "@/utils/http";
class ModelFieldServer { class ModelFieldServer {
async all(row) { async all(row) {
let res = await window.framework.httpget("/sys_model_field/all", row); let res = await window.framework.http.get("/sys_model_field/all", row);
return res; return res;
} }
async allByKey(row) { async allByKey(row) {
let res = await window.framework.httpget("/sys_model_field/allByKey", row, { let res = await window.framework.http.get("/sys_model_field/allByKey", row, {
hideLoad: true hideLoad: true
}); });
return res; return res;

View File

@@ -6,12 +6,12 @@ class ModelServer {
} }
async all() { async all() {
let res = await window.framework.httpget("/sys_model/all", {}); let res = await window.framework.http.get("/sys_model/all", {});
return res; return res;
} }
async detail(row) { async detail(row) {
let res = await window.framework.httpget("/sys_model/detail", row); let res = await window.framework.http.get("/sys_model/detail", row);
return res; return res;
} }

View File

@@ -1,11 +1,11 @@
import http from "@/utils/http"; import http from "@/utils/http";
class ParamSetupServer { class ParamSetupServer {
async getAll() { async getAll() {
return await window.framework.httpget("/sys_parameter/index", {}); return await window.framework.http.get("/sys_parameter/index", {});
} }
async getOne(key) { async getOne(key) {
return await window.framework.httpget("/sys_parameter/key", { key }); return await window.framework.http.get("/sys_parameter/key", { key });
} }
async add(row) { async add(row) {

View File

@@ -1,7 +1,7 @@
import http from "@/utils/http"; import http from "@/utils/http";
class SysControlTypeServer { class SysControlTypeServer {
async all(param) { async all(param) {
let res = await window.framework.httpget("/sys_control_type/all", param); let res = await window.framework.http.get("/sys_control_type/all", param);
return res; return res;
} }

View File

@@ -244,10 +244,27 @@ export default class uiTool {
let menus = uiTool.transformTree(authorityMenus) let menus = uiTool.transformTree(authorityMenus)
let curRoutes = uiTool.menuToRoute(menus, ParentView, Page404) let curRoutes = uiTool.menuToRoute(menus, ParentView, Page404)
// 合并权限路由,保留默认 home 路由 // 递归检查所有层级中是否有首页路由
const hasHomeInRoutes = (routes) => {
if (!routes || !Array.isArray(routes)) return false
for (let route of routes) {
// 检查当前路由的 path
if (route.path === '/home' || route.path === 'home') {
return true
}
// 递归检查子路由
if (route.children && route.children.length > 0) {
if (hasHomeInRoutes(route.children)) {
return true
}
}
}
return false
}
const homeRoute = mainRoute.children.find(r => r.path === '/home') const homeRoute = mainRoute.children.find(r => r.path === '/home')
// 检查权限路由中是否有首页(基于 path 判断) const hasHome = hasHomeInRoutes(curRoutes)
const hasHome = curRoutes.some(r => r.path === '/home' || r.path === 'home')
if (hasHome) { if (hasHome) {
// 如果权限路由中有 home使用权限路由的 home不添加默认首页 // 如果权限路由中有 home使用权限路由的 home不添加默认首页