diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/enterprise/index.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/enterprise/index.js index 8dcc441..c8ae842 100644 --- a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/enterprise/index.js +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/enterprise/index.js @@ -1,29 +1,10 @@ import { _get, _post } from "../../http/index"; // 仅保留登录与主页所需接口 - let enterpriseAppBaseUrl = "/app-ent"; // 企业端用户登录 export const enterpriseLogin = (params, success, error) => _post(enterpriseAppBaseUrl + "/enterprise/login/siqLogin", params, success, error); -// 获取深i企认证信息(accessKey/accessSecret) -export const siqCode = (params, success, error) => _get(enterpriseAppBaseUrl + "/thirdLogin/getSiqCode", params, success, error); - // 获取用户关联的企业信息(登录后扩展使用,已在 login.vue 注释保留) export const getUserRefEnterpriseInfo = (params, success, error) => _get(enterpriseAppBaseUrl + "/enterpriseInfo/getUserRefEnterpriseInfo", params, success, error); - -// 查询用户关联企业授权信息(主页 mounted 调用) -export const getEnterpriseMerchantAuthorization = (params, success, error) => _get(enterpriseAppBaseUrl + "/authorization/queryList", params, success, error); - -// 首页轮播图列表 -export const getCarouselBannerList = (params, success, error) => _get(enterpriseAppBaseUrl + "/enterprise/carouselBanner/list", params, success, error); - -// 系统通知公告列表 -export const getSystemNoticeList = (params, success, error) => _get(enterpriseAppBaseUrl + "/enterprise/noticeInfo/list", params, success, error); - -// 深i企登录-生产模式 -export const getSiqLoginAuth = (params, success, error) => _post(enterpriseAppBaseUrl + "/thirdLogin/siqLogin", params, success, error); - -// 深i企模拟登录(通过userId模拟) -export const getSiqLoginAuthMock = (params, success, error) => _post(enterpriseAppBaseUrl + "/thirdLogin/siqLoginMock", params, success, error); diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/nos/enfDemo.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/nos/enfDemo.js new file mode 100644 index 0000000..63b0ca1 --- /dev/null +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/api/nos/enfDemo.js @@ -0,0 +1,19 @@ +import http from '@/http/http'; + +// 非现场执法后台基础路径(走 vite 代理 /nosapi -> http://127.0.0.1:8080) +const NOS_BASE = import.meta.env.VITE_NOS_BASE_URL || '/nosapi'; + +/** + * 查询 enf 测试单分页列表 + * 后端: GET /enforcementcode/enfDemo/list + * 返回: TableDataInfo -> { rows, total, code, msg } + * + * 通过 baseURL: '' 绕过 axios 默认 baseURL(默认是 /api,给企业端老接口用) + */ +export const listEnfDemo = (params) => + http.request({ + method: 'GET', + url: NOS_BASE + '/enforcementcode/enfDemo/list', + params, + baseURL: '', + }).then(res => res.data); diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/common/globalExpandRouter.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/common/globalExpandRouter.js index adb4a6e..d709681 100644 --- a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/common/globalExpandRouter.js +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/common/globalExpandRouter.js @@ -4,7 +4,7 @@ const $globalRouterModules = (routes) => { let pathArr = []; let nameArr = []; const modulesRouter = import.meta.glob( - ["../router/enterprise-app/ent-main-router.js", "../router/demo/demo-main-router.js", "../router/enforcement-app/enf-main-router.js", "../router/supervision-app/sup-main-router.js"] + ["../router/ent-main-router.js"] ,{ eager: true, }); diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/ent-main-router.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/ent-main-router.js new file mode 100644 index 0000000..67cecd4 --- /dev/null +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/ent-main-router.js @@ -0,0 +1,12 @@ +// 企业端路由聚合入口 +// 由 globalExpandRouter.js 显式 import.meta.glob 识别此文件 +// 子路由文件:base 位于 enterprise-app/、demo 位于 nos/ +import { routes as baseRoutes } from "./enterprise-app/ent-base-router"; +import { routes as demoRoutes } from "./nos/nos-base-router"; + +const routes = [ + ...baseRoutes, + ...demoRoutes, +]; + +export { routes }; diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-main-router.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-base-router.js similarity index 89% rename from zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-main-router.js rename to zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-base-router.js index c6c768e..7675293 100644 --- a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-main-router.js +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/enterprise-app/ent-base-router.js @@ -1,4 +1,4 @@ - +// 企业端基础路由(根路径重定向 / 登录 / 首页) const routes = [ // 企业端根路径重定向 { @@ -28,4 +28,4 @@ const routes = [ }, ]; -export {routes}; +export { routes }; diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/nos/nos-base-router.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/nos/nos-base-router.js new file mode 100644 index 0000000..0b924d7 --- /dev/null +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/router/nos/nos-base-router.js @@ -0,0 +1,15 @@ +// nos 业务基础路由(与 /nosapi 后端联调相关页面) +const routes = [ + // enf 测试单列表 Demo(调用 /nosapi/enforcementcode/enfDemo/list) + { + path: "/enterprise/enfDemoList", + name: "enfDemoList", + component: () => import("@/views/enterprise/nos/enfDemoList.vue"), + meta: { + isKeepAlive: false, + title: "enf 测试单列表", + }, + }, +]; + +export { routes }; diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/enfDemoList.vue b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/enfDemoList.vue new file mode 100644 index 0000000..6980fa4 --- /dev/null +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/enfDemoList.vue @@ -0,0 +1,104 @@ + + + + + diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/mockHome.vue b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/mockHome.vue index f9330ef..a22308c 100644 --- a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/mockHome.vue +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/src/views/enterprise/nos/mockHome.vue @@ -100,7 +100,8 @@ const showEnterpriseQRCode = () => { }; const toEnforcementRegistrationListView = () => { - router.push({ path: "/enterprise/enforcementRegistrationList" }); + // Demo: 跳转 enf 测试单列表(调用 /nosapi 后台) + router.push({ path: "/enterprise/enfDemoList" }); }; const toEnforcementCaseInfoView = () => { diff --git a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/vite-config/index.js b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/vite-config/index.js index 463d4cd..bad6479 100644 --- a/zdxt-web-client/zdxt-efcode-nos-enterprise-app/vite-config/index.js +++ b/zdxt-web-client/zdxt-efcode-nos-enterprise-app/vite-config/index.js @@ -50,9 +50,9 @@ const baseCfg = (viteEnv = {}) => { }, //走非现场执法后台 '/nosapi': { - target: 'http://139.186.148.21:8080', + target: 'http://127.0.0.1:8080', changeOrigin: true, - rewrite: (path) => path.replace(/^\/api/, '') + rewrite: (path) => path.replace(/^\/nosapi/, '') } } },