diff --git a/src/pages/emergency/index.tsx b/src/pages/emergency/index.tsx index 54dc3b7..715ba76 100644 --- a/src/pages/emergency/index.tsx +++ b/src/pages/emergency/index.tsx @@ -147,7 +147,7 @@ const Emergency = (props: Store) => { }; useEffect(() => { emergencyStore.getlist(); - baseHttp.get("/team/list", null).then((res) => { + baseHttp.get("/v1/team/list", null).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.label = item.name; @@ -160,7 +160,7 @@ const Emergency = (props: Store) => { const onFinishFailed = () => {}; const handleSearch = (newValue: string) => { if (newValue === "") return; - baseHttp.get("/supplies/list/serch", { name: newValue }).then((res) => { + baseHttp.get("/v1/supplies/list/serch", { name: newValue }).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.text = item.name; diff --git a/src/pages/home/homeBottom/dispath.tsx b/src/pages/home/homeBottom/dispath.tsx index 49af0c5..0dd8b46 100644 --- a/src/pages/home/homeBottom/dispath.tsx +++ b/src/pages/home/homeBottom/dispath.tsx @@ -51,7 +51,7 @@ const Dispath = (props: Store) => { ]); }; useEffect(() => { - baseHttp.get("/team/list", null).then((res) => { + baseHttp.get("/v1/team/list", null).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.label = item.name; diff --git a/src/pages/home/homeBottom/emr.tsx b/src/pages/home/homeBottom/emr.tsx index 427aab5..afdc05a 100644 --- a/src/pages/home/homeBottom/emr.tsx +++ b/src/pages/home/homeBottom/emr.tsx @@ -50,7 +50,7 @@ const Emr = (props: Store) => { }; const handleSearch = (newValue: string) => { if (newValue === "") return; - baseHttp.get("/supplies/list/serch", { name: newValue }).then((res) => { + baseHttp.get("/v1/supplies/list/serch", { name: newValue }).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.text = item.name; @@ -61,7 +61,7 @@ const Emr = (props: Store) => { }; useEffect(() => { emergencyStore.getlist(); - baseHttp.get("/team/list", null).then((res) => { + baseHttp.get("/v1/team/list", null).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.label = item.name; diff --git a/src/pages/patrol/index.tsx b/src/pages/patrol/index.tsx index 4d32dfe..ec7de38 100644 --- a/src/pages/patrol/index.tsx +++ b/src/pages/patrol/index.tsx @@ -22,8 +22,8 @@ const Patrol = (props: Store) => { const formRef = React.useRef(null); const [record, setRecord] = useState(null); const [tagId, setId] = useState(null); - const [userList, setUserList] = useState>([]); - const [value, setValue] = useState([]); + const [, setUserList] = useState>([]); + const [value] = useState([]); const columns: ColumnsType = [ { title: "任务标题", dataIndex: "title" }, @@ -109,7 +109,7 @@ const Patrol = (props: Store) => { }; useEffect(() => { patrolStore.getlist(); - baseHttp.get("/user/list", null).then((res) => { + baseHttp.get("/v1/user/list", null).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.label = item.user_name; diff --git a/src/pages/system/er_code.tsx b/src/pages/system/er_code.tsx index 5ef5d1c..1dad446 100644 --- a/src/pages/system/er_code.tsx +++ b/src/pages/system/er_code.tsx @@ -5,7 +5,7 @@ import { useEffect, useState } from "react"; const ErCode = () => { const [url, setUrl] = useState(""); useEffect(() => { - base.gets("/sys/version", {}).then((res) => { + base.gets("/v1/sys/version", {}).then((res) => { setUrl(res.data.record.url); }); }, []); diff --git a/src/pages/training/training.tsx b/src/pages/training/training.tsx index bad7bf7..d01a98a 100644 --- a/src/pages/training/training.tsx +++ b/src/pages/training/training.tsx @@ -159,7 +159,7 @@ const Trainings = (props: Store) => { trainingCatStore.getlist().then(() => { setStash(trainingCatStore.list); }); - baseHttp.get("/team/list", null).then((res) => { + baseHttp.get("/v1/team/list", null).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.label = item.name; @@ -205,7 +205,7 @@ const Trainings = (props: Store) => { }; const handleSearch = (newValue: string) => { if (newValue === "") return; - baseHttp.get("/supplies/list/serch", { name: newValue }).then((res) => { + baseHttp.get("/v1/supplies/list/serch", { name: newValue }).then((res) => { let data = res.data?.record ?? []; data.forEach((item) => { item.text = item.name; diff --git a/src/service/base.ts b/src/service/base.ts index 48aadb2..5debb8a 100644 --- a/src/service/base.ts +++ b/src/service/base.ts @@ -5,7 +5,7 @@ import axios, { AxiosResponse } from "axios"; axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8"; axios.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest"; axios.interceptors.request.use((config) => { - config.baseURL = `${Config.baseUrl}v1/`; + config.baseURL = `${Config.baseUrl}`; config.timeout = 50000; let token = window.localStorage.getItem("token") config.headers.Authorization = token ?? "1" diff --git a/src/store/archives.ts b/src/store/archives.ts index d0b634f..86cc53b 100644 --- a/src/store/archives.ts +++ b/src/store/archives.ts @@ -5,10 +5,10 @@ import { TagDataType } from "@/model/userModel"; import baseHttp from "@/service/base"; class ArchivesConfig { - static LIST: string = "archives/list" - static ADD: string = "archives" - static DELETE: string = "archives" - static EDIT: string = "archives" + static LIST: string = "/v1/archives/list" + static ADD: string = "/v1/archives" + static DELETE: string = "/v1/archives" + static EDIT: string = "/v1/archives" } class ArchivesStore extends BaseStore { constructor() { diff --git a/src/store/archives_category.ts b/src/store/archives_category.ts index 3e4eb90..9da8a8a 100644 --- a/src/store/archives_category.ts +++ b/src/store/archives_category.ts @@ -3,10 +3,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class ArchivesCategoryConfig { - static LIST: string = "archives/category/list" - static ADD: string = "archives/category" - static DELETE: string = "archives/category" - static EDIT: string = "archives/category" + static LIST: string = "/v1/archives/category/list" + static ADD: string = "/v1/archives/category" + static DELETE: string = "/v1/archives/category" + static EDIT: string = "/v1/archives/category" } class ArchivesCategoryStore extends BaseStore { constructor() { diff --git a/src/store/community.ts b/src/store/community.ts index c12faea..579cede 100644 --- a/src/store/community.ts +++ b/src/store/community.ts @@ -4,10 +4,10 @@ import { TagDataType } from "@/model/userModel"; // 社区 class CommunityConfig { - static LIST: string = "community/list" - static ADD: string = "community" - static DELETE: string = "community" - static EDIT: string = "community" + static LIST: string = "/v1/community/list" + static ADD: string = "/v1/community" + static DELETE: string = "/v1/community" + static EDIT: string = "/v1/community" } class CommunityStore extends BaseStore { constructor() { diff --git a/src/store/dep.ts b/src/store/dep.ts index 41d1089..b0bd232 100644 --- a/src/store/dep.ts +++ b/src/store/dep.ts @@ -5,11 +5,11 @@ import { TagDataType } from "@/model/userModel"; import baseHttp from '@/service/base'; class DepConfig { - static LIST: string = "dep/list" - static ADD: string = "dep" - static DELETE: string = "dep" - static EDIT: string = "dep" - static ORG: string = "dep/org" + static LIST: string = "/v1/dep/list" + static ADD: string = "/v1/dep" + static DELETE: string = "/v1/dep" + static EDIT: string = "/v1/dep" + static ORG: string = "/v1/dep/org" } class DepStore extends BaseStore { constructor() { diff --git a/src/store/emergency.ts b/src/store/emergency.ts index ba3ef3b..48a24a3 100644 --- a/src/store/emergency.ts +++ b/src/store/emergency.ts @@ -6,13 +6,13 @@ import baseHttp from "@/service/base"; class EmergencyConfig { - static LIST: string = "emerg/list" - static ADD: string = "emerg" - static DELETE: string = "emerg" - static EDIT: string = "emerg" - static ACCESS: string = "emerg/accept" - static fish: string = "emerg/fish" - static USERLIST: string = "emerg/user" + static LIST: string = "/v1/emerg/list" + static ADD: string = "/v1/emerg" + static DELETE: string = "/v1/emerg" + static EDIT: string = "/v1/emerg" + static ACCESS: string = "/v1/emerg/accept" + static fish: string = "/v1/emerg/fish" + static USERLIST: string = "/v1/emerg/user" } class EmergencyStore extends BaseStore { diff --git a/src/store/exce_compet.ts b/src/store/exce_compet.ts index 31efbdd..a818620 100644 --- a/src/store/exce_compet.ts +++ b/src/store/exce_compet.ts @@ -5,11 +5,11 @@ import { TagDataType } from "@/model/userModel"; import baseHttp from "@/service/base"; class ExceCompetConfig { - static LIST: string = "exceCompet/list" - static ADD: string = "exceCompet" - static DELETE: string = "exceCompet" - static EDIT: string = "exceCompet" - static Audit: string = "exceCompet/audit" + static LIST: string = "/v1/exceCompet/list" + static ADD: string = "/v1/exceCompet" + static DELETE: string = "/v1/exceCompet" + static EDIT: string = "/v1/exceCompet" + static Audit: string = "/v1/exceCompet/audit" } class ExceCompetStore extends BaseStore { constructor() { diff --git a/src/store/folder.ts b/src/store/folder.ts index 5ed406b..c4808e7 100644 --- a/src/store/folder.ts +++ b/src/store/folder.ts @@ -5,11 +5,11 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class FolderConfig { - static LIST: string = "archives/folder/list" - static ADD: string = "archives/folder" - static DELETE: string = "archives/folder" - static EDIT: string = "archives/folder" - static AList: string = "archives/list" + static LIST: string = "/v1/archives/folder/list" + static ADD: string = "/v1/archives/folder" + static DELETE: string = "/v1/archives/folder" + static EDIT: string = "/v1/archives/folder" + static AList: string = "/v1/archives/list" } class FolderStore extends BaseStore { diff --git a/src/store/gp.ts b/src/store/gp.ts index 6cc2c01..066d60a 100644 --- a/src/store/gp.ts +++ b/src/store/gp.ts @@ -3,10 +3,10 @@ import { makeObservable } from "mobx"; import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class GpConfig { - static LIST: string = "gplaque/list" - static ADD: string = "gplaque" - static DELETE: string = "gplaque" - static EDIT: string = "gplaque" + static LIST: string = "/v1/gplaque/list" + static ADD: string = "/v1/gplaque" + static DELETE: string = "/v1/gplaque" + static EDIT: string = "/v1/gplaque" } class GpStore extends BaseStore { constructor() { diff --git a/src/store/grid.ts b/src/store/grid.ts index 4dcee3c..6035dd9 100644 --- a/src/store/grid.ts +++ b/src/store/grid.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class GridConfig { - static LIST: string = "grid/list" - static ADD: string = "grid" - static DELETE: string = "grid" - static EDIT: string = "grid" + static LIST: string = "/v1/grid/list" + static ADD: string = "/v1/grid" + static DELETE: string = "/v1/grid" + static EDIT: string = "/v1/grid" } class GridStore extends BaseStore { constructor() { diff --git a/src/store/home.ts b/src/store/home.ts index c4f1b96..a155773 100644 --- a/src/store/home.ts +++ b/src/store/home.ts @@ -7,17 +7,17 @@ import MapUtl from "@/components/map/mapUtil"; import Config from "@/util/config"; class HomeConfig { - static os: string = "public/os" - static tr: string = "public/tr" - static af: string = "public/af" - static mm: string = "public/mm" - static rm: string = "public/rm" - static ae: string = "public/ae" - static newTask: string = "user/newTask" - static taskulist: string = "public/taskInUser" - static deviceList: string = "api/v1/devicesconfig" //设备列表 - static channerList: string = "api/v1/channelsconfig" //设备列表 - static channelstream: string = "api/v1/devices/channelstream" //设备包活 + static os: string = "/v1/public/os" + static tr: string = "/v1/public/tr" + static af: string = "/v1/public/af" + static mm: string = "/v1/public/mm" + static rm: string = "/v1/public/rm" + static ae: string = "/v1/public/ae" + static newTask: string = "/v1/user/newTask" + static taskulist: string = "/v1/public/taskInUser" + static deviceList: string = "/api/v1/devicesconfig" //设备列表 + static channerList: string = "/api/v1/channelsconfig" //设备列表 + static channelstream: string = "/api/v1/devices/channelstream" //设备包活 } class HomeStore extends BaseStore { @@ -58,7 +58,7 @@ class HomeStore extends BaseStore { // 获取视频推流连接 async getVideoUrlList() { try { - let data = await baseHttp.gets(Config.videoApi + HomeConfig.deviceList, { + let data = await baseHttp.gets(HomeConfig.deviceList, { start: 0, limit: 30 }) @@ -71,7 +71,7 @@ class HomeStore extends BaseStore { // 通道列表 async getChannerUrlList(deviceId) { try { - let data = await baseHttp.gets(Config.videoApi + HomeConfig.channerList, { + let data = await baseHttp.gets(Config.baseUrl+HomeConfig.channerList, { start: 0, limit: 30, device: deviceId @@ -85,7 +85,7 @@ class HomeStore extends BaseStore { // 获取通道流 async getChannerStrem(deviceId, channel) { try { - let data = await baseHttp.gets(Config.videoApi + HomeConfig.channelstream, { + let data = await baseHttp.gets(Config.baseUrl+HomeConfig.channelstream, { device: deviceId, channel: channel, protocol: "HLS" diff --git a/src/store/leave.ts b/src/store/leave.ts index 5e92804..5bae259 100644 --- a/src/store/leave.ts +++ b/src/store/leave.ts @@ -6,11 +6,11 @@ import baseHttp from "@/service/base"; class LeaveConfig { - static LIST: string = "leave/list" - static ADD: string = "leave" - static DELETE: string = "leave" - static EDIT: string = "leave" - static ACCESS: string = "leave/access" + static LIST: string = "/v1/leave/list" + static ADD: string = "/v1/leave" + static DELETE: string = "/v1/leave" + static EDIT: string = "/v1/leave" + static ACCESS: string = "/v1/leave/access" } class LeaveStore extends BaseStore { constructor() { diff --git a/src/store/leave_cat.ts b/src/store/leave_cat.ts index b42fbcb..5289037 100644 --- a/src/store/leave_cat.ts +++ b/src/store/leave_cat.ts @@ -5,10 +5,10 @@ import { TagDataType } from "@/model/userModel"; class LeaveCategoryConfig { - static LIST: string = "leave/category/list" - static ADD: string = "leave/category" - static DELETE: string = "leave/category" - static EDIT: string = "leave/category" + static LIST: string = "/v1/leave/category/list" + static ADD: string = "/v1/leave/category" + static DELETE: string = "/v1/leave/category" + static EDIT: string = "/v1/leave/category" } class LeaveCategoryStore extends BaseStore { constructor() { diff --git a/src/store/materialCat.ts b/src/store/materialCat.ts index 6133776..e8d5ba5 100644 --- a/src/store/materialCat.ts +++ b/src/store/materialCat.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class MaterialCatConfig { - static LIST: string = "suppliesCat/list" - static ADD: string = "suppliesCat" - static DELETE: string = "suppliesCat" - static EDIT: string = "suppliesCat" + static LIST: string = "/v1/suppliesCat/list" + static ADD: string = "/v1/suppliesCat" + static DELETE: string = "/v1/suppliesCat" + static EDIT: string = "/v1/suppliesCat" } class MaterialCatStore extends BaseStore { constructor() { diff --git a/src/store/materialStore.ts b/src/store/materialStore.ts index 7a65685..bcebe83 100644 --- a/src/store/materialStore.ts +++ b/src/store/materialStore.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class MaterialConfig { - static LIST: string = "supplies/list" - static ADD: string = "supplies" - static DELETE: string = "supplies" - static EDIT: string = "supplies" + static LIST: string = "/v1/supplies/list" + static ADD: string = "/v1/supplies" + static DELETE: string = "/v1/supplies" + static EDIT: string = "/v1/supplies" } class MaterialStore extends BaseStore { constructor() { diff --git a/src/store/patrol.ts b/src/store/patrol.ts index 68c6c61..9f5ec7a 100644 --- a/src/store/patrol.ts +++ b/src/store/patrol.ts @@ -6,11 +6,11 @@ import baseHttp from "@/service/base"; class PatrolConfig { - static LIST: string = "patrol/list" - static ADD: string = "patrol" - static DELETE: string = "patrol" - static EDIT: string = "patrol" - static ACCESS: string = "patrol/accept" + static LIST: string = "/v1/patrol/list" + static ADD: string = "/v1/patrol" + static DELETE: string = "/v1/patrol" + static EDIT: string = "/v1/patrol" + static ACCESS: string = "/v1/patrol/accept" } class PatrolStore extends BaseStore { constructor() { diff --git a/src/store/patrol_brigade.ts b/src/store/patrol_brigade.ts index aad7258..8989630 100644 --- a/src/store/patrol_brigade.ts +++ b/src/store/patrol_brigade.ts @@ -4,8 +4,8 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class PatrolBrigadeConfig { - static LIST: string = "user/getPatrol" - static ADD: string = "user/setPatrol" + static LIST: string = "/v1/user/getPatrol" + static ADD: string = "/v1/user/setPatrol" } class PatrolBrigadeStore extends BaseStore { constructor() { diff --git a/src/store/persMgmt.ts b/src/store/persMgmt.ts index 461a862..63b27f9 100644 --- a/src/store/persMgmt.ts +++ b/src/store/persMgmt.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class PersMgmtConfig { - static LIST: string = "persMgmt/list" - static ADD: string = "persMgmt" - static DELETE: string = "persMgmt" - static EDIT: string = "persMgmt" + static LIST: string = "/v1/persMgmt/list" + static ADD: string = "/v1/persMgmt" + static DELETE: string = "/v1/persMgmt" + static EDIT: string = "/v1/persMgmt" } class PersMgmtStore extends BaseStore { constructor() { diff --git a/src/store/political_study.ts b/src/store/political_study.ts index b1b3bf3..50583e1 100644 --- a/src/store/political_study.ts +++ b/src/store/political_study.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class PoliticalStudyConfig { - static LIST: string = "learning/list" - static ADD: string = "learning/add" - static DELETE: string = "learning" - static EDIT: string = "learning" + static LIST: string = "/v1/learning/list" + static ADD: string = "/v1/learning/add" + static DELETE: string = "/v1/learning" + static EDIT: string = "/v1/learning" } class PoliticalStudy extends BaseStore { constructor() { diff --git a/src/store/regulations.ts b/src/store/regulations.ts index 6582787..8d95253 100644 --- a/src/store/regulations.ts +++ b/src/store/regulations.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class RegulationsConfig { - static LIST: string = "regulations/list" - static ADD: string = "regulations" - static DELETE: string = "regulations" - static EDIT: string = "regulations" + static LIST: string = "/v1/regulations/list" + static ADD: string = "/v1/regulations" + static DELETE: string = "/v1/regulations" + static EDIT: string = "/v1/regulations" } class Regulations extends BaseStore { constructor() { diff --git a/src/store/regulationsCat.ts b/src/store/regulationsCat.ts index 47a1465..3dfa9c0 100644 --- a/src/store/regulationsCat.ts +++ b/src/store/regulationsCat.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class RegulationsCatConfig { - static LIST: string = "regulations/catgory/list" - static ADD: string = "regulations/catgory" - static DELETE: string = "regulations/catgory" - static EDIT: string = "regulations/catgory" + static LIST: string = "/v1/regulations/catgory/list" + static ADD: string = "/v1/regulations/catgory" + static DELETE: string = "/v1/regulations/catgory" + static EDIT: string = "/v1/regulations/catgory" } class RegulationsCat extends BaseStore { constructor() { diff --git a/src/store/stash.ts b/src/store/stash.ts index cbe2bfd..cbf6c7f 100644 --- a/src/store/stash.ts +++ b/src/store/stash.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class StashConfig { - static LIST: string = "stash/list" - static ADD: string = "stash" - static DELETE: string = "stash" - static EDIT: string = "stash" + static LIST: string = "/v1/stash/list" + static ADD: string = "/v1/stash" + static DELETE: string = "/v1/stash" + static EDIT: string = "/v1/stash" } class Stash extends BaseStore { constructor() { diff --git a/src/store/storage.ts b/src/store/storage.ts index 004cb30..9b7ea8a 100644 --- a/src/store/storage.ts +++ b/src/store/storage.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class StoreageConfig { - static LIST: string = "storage/list" - static ADD: string = "storage" - static DELETE: string = "storage" - static EDIT: string = "storage" + static LIST: string = "/v1/storage/list" + static ADD: string = "/v1/storage" + static DELETE: string = "/v1/storage" + static EDIT: string = "/v1/storage" } class StorageStore extends BaseStore { constructor() { diff --git a/src/store/sys.ts b/src/store/sys.ts index b421389..401831c 100644 --- a/src/store/sys.ts +++ b/src/store/sys.ts @@ -5,11 +5,11 @@ import baseHttp from "@/service/base"; import { TagDataType } from "@/model/userModel"; class SysConfig { - static LISTBannler: string = "sys/banner" - static ADDBanner: string = "sys/banner" - static LIST: string = "sys/drop" - static ADD: string = "sys/drop" - static DELETE: string = "sys/drop" + static LISTBannler: string = "/v1/sys/banner" + static ADDBanner: string = "/v1/sys/banner" + static LIST: string = "/v1/sys/drop" + static ADD: string = "/v1/sys/drop" + static DELETE: string = "/v1/sys/drop" } class SysStore extends BaseStore { constructor() { diff --git a/src/store/tag.ts b/src/store/tag.ts index 8bb7353..da8f585 100644 --- a/src/store/tag.ts +++ b/src/store/tag.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class TagConfig { - static LIST: string = "tag/list" - static ADD: string = "tag" - static DELETE: string = "tag" - static EDIT: string = "tag" + static LIST: string = "/v1/tag/list" + static ADD: string = "/v1/tag" + static DELETE: string = "/v1/tag" + static EDIT: string = "/v1/tag" } class TagStore extends BaseStore { constructor() { diff --git a/src/store/team.ts b/src/store/team.ts index 32e03a5..ce6097c 100644 --- a/src/store/team.ts +++ b/src/store/team.ts @@ -4,10 +4,10 @@ import BaseStore from "./baseStore"; import { TagDataType } from "@/model/userModel"; class TeamConfig { - static LIST: string = "team/list" - static ADD: string = "team" - static DELETE: string = "team" - static EDIT: string = "team" + static LIST: string = "/v1/team/list" + static ADD: string = "/v1/team" + static DELETE: string = "/v1/team" + static EDIT: string = "/v1/team" } class TeamStore extends BaseStore { constructor() { diff --git a/src/store/training.ts b/src/store/training.ts index 0711aaf..365203e 100644 --- a/src/store/training.ts +++ b/src/store/training.ts @@ -5,16 +5,16 @@ import { TagDataType } from "@/model/userModel"; import baseHttp from "@/service/base"; class TrainingConfig { - static LIST: string = "training/list" - static ADD: string = "training" - static DELETE: string = "training" - static EDIT: string = "training" - static ACCESS: string = "training/accept" - static tran_user: string = "training/user" - static addScores: string = "scoreMgmt/scores" - static addAchives: string = "training/archives" - static back: string = "supplies/suppliesBack" - static fish: string = "training/taskFish" + static LIST: string = "/v1/training/list" + static ADD: string = "/v1/training" + static DELETE: string = "/v1/training" + static EDIT: string = "/v1/training" + static ACCESS: string = "/v1/training/accept" + static tran_user: string = "/v1/training/user" + static addScores: string = "/v1/scoreMgmt/scores" + static addAchives: string = "/v1/training/archives" + static back: string = "/v1/supplies/suppliesBack" + static fish: string = "/v1/training/taskFish" } class TrainingStore extends BaseStore { constructor() { diff --git a/src/store/trainingCat.ts b/src/store/trainingCat.ts index 446f0f2..074661d 100644 --- a/src/store/trainingCat.ts +++ b/src/store/trainingCat.ts @@ -5,10 +5,10 @@ import { TagDataType } from "@/model/userModel"; class TrainingCatConfig { - static LIST: string = "training/category/list" - static ADD: string = "training/category" - static DELETE: string = "training/category" - static EDIT: string = "training/category" + static LIST: string = "/v1/training/category/list" + static ADD: string = "/v1/training/category" + static DELETE: string = "/v1/training/category" + static EDIT: string = "/v1/training/category" } class TrainingCatStore extends BaseStore { constructor() { diff --git a/src/store/user.ts b/src/store/user.ts index d271e69..d1c5af8 100644 --- a/src/store/user.ts +++ b/src/store/user.ts @@ -4,18 +4,17 @@ import baseHttp from "@/service/base"; import BaseStore from "./baseStore"; import { UserDataType, UserInfos } from "@/model/userModel"; import { message } from "antd"; -import Config from "@/util/config"; class UserConfig { - static LOGINURI: string = "anth/login" - static LIST: string = "user/list" - static ADD: string = "user" - static DELETE: string = "user" - static EDIT: string = "user" - static pover: string = "user/userPower" - static team: string = "team/list" - static per: string = "persMgmt/list" - static serch: string = "user/serch" - static getPatrol: string = "user/getPatrol" + static LOGINURI: string = "/v1/anth/login" + static LIST: string = "/v1/user/list" + static ADD: string = "/v1/user" + static DELETE: string = "/v1/user" + static EDIT: string = "/v1/user" + static pover: string = "/v1/user/userPower" + static team: string = "/v1/team/list" + static per: string = "/v1/persMgmt/list" + static serch: string = "/v1/user/serch" + static getPatrol: string = "/v1/user/getPatrol" static videoLogin: string = "api/v1/login" @@ -98,7 +97,7 @@ class UserStore extends BaseStore { async loginVideo() { try { - let data = await baseHttp.get(Config.videoApi + UserConfig.videoLogin, { + let data = await baseHttp.get(UserConfig.videoLogin, { username: "easycvr", password: "4092c09db0af030641a977d76044de4f", }) diff --git a/src/util/config.ts b/src/util/config.ts index 6781c2d..1ffe3ec 100644 --- a/src/util/config.ts +++ b/src/util/config.ts @@ -1,5 +1,5 @@ class Config { - static baseUrl = "https://rw.quwanya.cn/"; + static baseUrl = "https://rw.quwanya.cn"; static ws = "wss://rw.quwanya.cn/wsadmin?id=admin"; static userStatic = "https://rw.quwanya.cn/uploads/user/"; static videoApi = "https://sprh.hswzct.cn:4443/"; //