fix(api):data
This commit is contained in:
parent
63fbef3ca7
commit
193d88f09c
File diff suppressed because it is too large
Load Diff
|
@ -32,6 +32,7 @@
|
|||
"dayjs": "^1.11.10",
|
||||
"dotenv": "^10.0.0",
|
||||
"dotenv-expand": "^5.1.0",
|
||||
"echarts": "^5.5.1",
|
||||
"eslint": "^8.3.0",
|
||||
"eslint-config-react-app": "^7.0.1",
|
||||
"eslint-webpack-plugin": "^3.1.1",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { inject, observer } from "mobx-react";
|
||||
import "antd/dist/antd.css";
|
||||
import Home from "./pages/home";
|
||||
import Home from "./pages/home/home";
|
||||
const App = (props: any) => {
|
||||
return <Home />
|
||||
};
|
||||
|
|
|
@ -64,4 +64,44 @@ code {
|
|||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
.btn-dp {
|
||||
color: #00EF97 !important;
|
||||
border-color: #00EF97 !important;
|
||||
}
|
||||
.owner_model{
|
||||
padding-bottom: 0px !important;
|
||||
.ant-modal-content{
|
||||
background: url("static/frame_s@1x.png") ;
|
||||
background-size: 100% 100%;
|
||||
background-position: center center; /* 可选,确保图片在容器中居中 */
|
||||
background-repeat: no-repeat; /* 确保图片不会重复 */
|
||||
padding-bottom: 0px;
|
||||
.ant-modal-close{
|
||||
display: none;
|
||||
}
|
||||
.ant-modal-header{
|
||||
padding: 30px 30px;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
background: none;
|
||||
border-bottom: 0px solid #f0f0f0;
|
||||
min-height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-left:40px ;
|
||||
.ant-modal-title{
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.ant-modal-body{
|
||||
min-height: 300px;
|
||||
}
|
||||
.ant-modal-footer{
|
||||
padding: 30px 30px;
|
||||
text-align: center;
|
||||
background: transparent;
|
||||
border-top: 0px solid #f0f0f0;
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import { observer } from "mobx-react";
|
||||
import "./home.less";
|
||||
import MapContainer from "@/components/map/MapComponent";
|
||||
const Home = observer(() => {
|
||||
return (
|
||||
<div className="contents_center">
|
||||
<div className="map_container_t"></div>
|
||||
<div className="map_container_l"></div>
|
||||
<MapContainer />
|
||||
<div className="map_container_r"></div>
|
||||
<div className="map_container_b">
|
||||
<div className="bottom_content">
|
||||
<span>民兵调度</span>
|
||||
<span>装备调度</span>
|
||||
<span>应急连线</span>
|
||||
<span>应急预案</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default Home;
|
|
@ -8,10 +8,34 @@
|
|||
height: 80px;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
background: linear-gradient(270deg, rgba(7, 99, 78, 0) 0%, rgba(7, 99, 78, 0.0826) 32%, rgba(41, 173, 150, 0.16) 63%, rgba(91, 255, 234, 0.35) 100%);
|
||||
background-image: url("../../static/head.png");
|
||||
background-repeat: no-repeat;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title_img{
|
||||
margin-left: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
.twp{
|
||||
width: 160px;
|
||||
height: 30px;
|
||||
}
|
||||
>span{
|
||||
margin-left: 15px;
|
||||
margin-right: 15px;
|
||||
color: #fff;
|
||||
font-size: 38px;
|
||||
font-weight: normal;
|
||||
line-height: normal;
|
||||
letter-spacing: 0.1em;
|
||||
font-variation-settings: "opsz" auto;
|
||||
color: #FFFFFF;
|
||||
text-shadow: 0px 0px 10px #29ECB4;
|
||||
}
|
||||
}
|
||||
.map_container_l{
|
||||
position: absolute;
|
|
@ -0,0 +1,31 @@
|
|||
import { observer } from "mobx-react";
|
||||
import "./home.less";
|
||||
import MapContainer from "@/components/map/MapComponent";
|
||||
import HomeLeft from "@/pages/home/homeLeft/home_left";
|
||||
import HomeRight from "@/pages/home/homeRigrt/home_right";
|
||||
import HomeBottom from "@/pages/home/homeBottom/home_bottom";
|
||||
import image1 from "@/static/title_jiantou@1x.png"
|
||||
import image2 from "@/static/title_line@1x.png"
|
||||
const Home = observer(() => {
|
||||
return (
|
||||
<div className="contents_center">
|
||||
<div className="map_container_t">
|
||||
<img className="title_img" src={image1} alt="" />
|
||||
<span>黄水镇武装平台</span>
|
||||
<img className="twp" src={image2} alt=""/>
|
||||
</div>
|
||||
<div className="map_container_l">
|
||||
<HomeLeft />
|
||||
</div>
|
||||
<MapContainer />
|
||||
<div className="map_container_r">
|
||||
<HomeRight />
|
||||
</div>
|
||||
<div className="map_container_b">
|
||||
<HomeBottom />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
export default Home;
|
|
@ -0,0 +1,46 @@
|
|||
import { useState } from "react";
|
||||
import { Button, Modal } from "antd";
|
||||
import "./right.less";
|
||||
const HomeBottom = () => {
|
||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||
const openDispatch = () => {
|
||||
setIsModalOpen(true);
|
||||
};
|
||||
const handleCancle = () => {
|
||||
setIsModalOpen(false);
|
||||
};
|
||||
const handleSubmit = ()=>{
|
||||
setIsModalOpen(false);
|
||||
}
|
||||
return (
|
||||
<div className="bottom_container">
|
||||
<div className="bottom_content">
|
||||
<span onClick={openDispatch}>民兵调度</span>
|
||||
<span onClick={openDispatch}>应急处突</span>
|
||||
<span onClick={openDispatch}>应急连线</span>
|
||||
<span onClick={openDispatch}>视频查看</span>
|
||||
</div>
|
||||
<Modal
|
||||
title={"添加用户"}
|
||||
className="owner_model"
|
||||
width={800}
|
||||
open={isModalOpen}
|
||||
afterClose={() => {}}
|
||||
onOk={() => {}}
|
||||
footer={[
|
||||
<Button key="return" ghost onClick={handleCancle}>
|
||||
取消
|
||||
</Button>,
|
||||
<Button className="btn-dp" key="submit" type="primary" ghost onClick={handleSubmit}>
|
||||
确定
|
||||
</Button>,
|
||||
]}
|
||||
onCancel={() => {
|
||||
setIsModalOpen(false);
|
||||
}}
|
||||
></Modal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HomeBottom;
|
|
@ -0,0 +1,13 @@
|
|||
.bottom_container{
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
|
||||
}
|
||||
|
||||
.owner_model{
|
||||
background-color: #000;
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
import { useState } from "react";
|
||||
import { Modal } from "antd";
|
||||
import "./left.less";
|
||||
const HomeLeft = () => {
|
||||
const [isModalOpen, setIsModalOpen] = useState<boolean>(false);
|
||||
const openDispatch = () => {
|
||||
setIsModalOpen(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="left_container">
|
||||
<div onClick={openDispatch} className="org">
|
||||
<div className="org_head">
|
||||
<p>组织架构</p>
|
||||
</div>
|
||||
</div>
|
||||
<div onClick={openDispatch} className="org">
|
||||
<div className="org_head">
|
||||
<p>用户管理</p>
|
||||
</div>
|
||||
</div>
|
||||
<div onClick={openDispatch} className="org">
|
||||
<div className="org_head">
|
||||
<p>HomeLeft</p>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div onClick={openDispatch}>
|
||||
用户管理
|
||||
</div>
|
||||
<div onClick={openDispatch}>
|
||||
HomeLeft
|
||||
</div> */}
|
||||
<Modal
|
||||
title="组织架构"
|
||||
className="owner_model"
|
||||
width={"80%"}
|
||||
open={isModalOpen}
|
||||
afterClose={() => {}}
|
||||
onOk={() => {}}
|
||||
onCancel={() => {
|
||||
setIsModalOpen(false);
|
||||
}}
|
||||
>
|
||||
<p>cascsa</p>
|
||||
</Modal>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default HomeLeft;
|
|
@ -0,0 +1,20 @@
|
|||
.left_container{
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
height: auto;
|
||||
.org{
|
||||
width: 100%;
|
||||
min-height: 200px;
|
||||
text-align: center;
|
||||
.org_head{
|
||||
width: 100%;
|
||||
background-image: url("../../../static/titie_secend@1x.png");
|
||||
background-size: 100% 50px;
|
||||
background-repeat: no-repeat;
|
||||
line-height: 60px;
|
||||
height: 50px;
|
||||
text-align: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
import "./right.less";
|
||||
const HomeRight = () => {
|
||||
return <div className="right_container">
|
||||
<div className="right_body">HomeRight</div>
|
||||
</div>;
|
||||
};
|
||||
|
||||
export default HomeRight;
|
|
@ -0,0 +1,8 @@
|
|||
.right_container{
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
import Home from "@/pages/home";
|
||||
import { Navigate } from "react-router-dom";
|
||||
import Home from "@/pages/home/home";
|
||||
export const homeRouter = [
|
||||
{
|
||||
path: "/",
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
Binary file not shown.
After Width: | Height: | Size: 82 KiB |
Binary file not shown.
After Width: | Height: | Size: 743 B |
Binary file not shown.
After Width: | Height: | Size: 12 KiB |
Binary file not shown.
After Width: | Height: | Size: 489 B |
Binary file not shown.
After Width: | Height: | Size: 671 B |
|
@ -1,17 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
import ActiveConfig from "@/service/apiConfig/active";
|
||||
|
||||
class ActiveStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(ActiveConfig)
|
||||
makeObservable(this, {
|
||||
otherAction: action,
|
||||
})
|
||||
}
|
||||
otherAction() {
|
||||
|
||||
}
|
||||
}
|
||||
export default new ActiveStore();
|
|
@ -1,14 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import { makeObservable } from "mobx";
|
||||
import ActivityConfig from "@/service/apiConfig/activity_config";
|
||||
|
||||
class ActivityStore extends BaseStore<CardDataType> {
|
||||
constructor() {
|
||||
super(ActivityConfig)
|
||||
makeObservable(this, {
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
export default new ActivityStore();
|
|
@ -1,15 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
import ActivityTypeConfig from "@/service/apiConfig/activity_type_config";
|
||||
|
||||
class ActivityType extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(ActivityTypeConfig)
|
||||
makeObservable(this, {
|
||||
otherAction: action,
|
||||
})
|
||||
}
|
||||
otherAction() {}
|
||||
}
|
||||
export default new ActivityType();
|
|
@ -1,53 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import baseHttp from "@/service/base";
|
||||
import { action, makeObservable } from "mobx";
|
||||
import AppConfig from "@/service/apiConfig/app_config";
|
||||
|
||||
class AppStore extends BaseStore<CardDataType> {
|
||||
constructor() {
|
||||
super(AppConfig)
|
||||
makeObservable(this, {
|
||||
getApp: action
|
||||
})
|
||||
}
|
||||
// 设置Ios 配置
|
||||
async setIosConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.IOSAPPPUSH + id, param)
|
||||
}
|
||||
|
||||
// 设置hw 配置
|
||||
async setHwConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.HUAWEIAPPPUSH + id, param)
|
||||
}
|
||||
|
||||
// 设置op 配置
|
||||
async setOPConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.OPPOAPPPUSH + id, param)
|
||||
}
|
||||
|
||||
// 设置op 配置
|
||||
async setVivoConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.VIVOAPPPUSH + id, param)
|
||||
}
|
||||
|
||||
// 设置wx 配置
|
||||
async setWechatConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.WechatConfig + id, param)
|
||||
}
|
||||
// 设置wx 配置
|
||||
async setXmConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.XIAOMIAPPPUSH + id, param)
|
||||
}
|
||||
|
||||
// 设置wx 配置
|
||||
async setAlConfig(id: number, param) {
|
||||
return await baseHttp.put(AppConfig.ALCONFIG + id, param)
|
||||
}
|
||||
|
||||
async getApp(id: number) {
|
||||
let data = await baseHttp.get(AppConfig.ADD + "/" + id, {})
|
||||
this.item = data.data
|
||||
}
|
||||
}
|
||||
export default new AppStore();
|
|
@ -58,14 +58,14 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
|||
async getlist() {
|
||||
this.listStatus = true;
|
||||
let res = await baseHttp.get(this.urlConfig.LIST, {
|
||||
pageNum: this.page?.PageNum | 1,
|
||||
pageSize: this.page?.PageSize | 20,
|
||||
size: this.page?.Size | 1,
|
||||
offset: this.page?.Offset | 20,
|
||||
isSelf:0
|
||||
});
|
||||
|
||||
this.page = {
|
||||
PageNum: res.data?.pageNum,
|
||||
PageSize: res.data?.pageSize
|
||||
Offset: res.data?.pageNum,
|
||||
Size: res.data?.pageSize
|
||||
}
|
||||
let data: Array<B> = []
|
||||
if (!res.data.list) {
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
||||
class CardStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(CardConfig.CardConfig)
|
||||
makeObservable(this, {
|
||||
otherAction: action,
|
||||
})
|
||||
}
|
||||
otherAction() {
|
||||
|
||||
}
|
||||
}
|
||||
export default new CardStore();
|
|
@ -1,17 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
||||
class characterStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(CardConfig.characterConfig)
|
||||
makeObservable(this, {
|
||||
otherAction: action,
|
||||
})
|
||||
}
|
||||
otherAction() {
|
||||
|
||||
}
|
||||
}
|
||||
export default new characterStore();
|
|
@ -1,57 +0,0 @@
|
|||
import { action, makeAutoObservable, observable } from "mobx";
|
||||
import baseHttp from "@/service/base";
|
||||
import { CardDataType, Pages, ComponsitionDataType } from "@/util/model/interface";
|
||||
import componsitionConfig from "@/service/apiConfig/componsition_config";
|
||||
class ComponSitionStore {
|
||||
datalist: ComponsitionDataType[] = [];
|
||||
total: number | null | undefined;
|
||||
_pages: Pages = {
|
||||
PageNum: 1,
|
||||
PageSize: 20
|
||||
}
|
||||
constructor() {
|
||||
makeAutoObservable(this, {
|
||||
list: action,
|
||||
delete: action,
|
||||
datalist: observable,
|
||||
_pages: observable,
|
||||
setPages: action
|
||||
})
|
||||
}
|
||||
setlist = (arrlist: ComponsitionDataType[]) => {
|
||||
this.datalist = arrlist
|
||||
}
|
||||
setPages = (page: Pages) => {
|
||||
this._pages = page
|
||||
}
|
||||
async add(param: CardDataType) {
|
||||
await baseHttp.post(componsitionConfig.ADD, param)
|
||||
}
|
||||
async edit(param: CardDataType, id: any) {
|
||||
await baseHttp.put(componsitionConfig.EDIT + "/" + id, param)
|
||||
}
|
||||
|
||||
async list(id:string) {
|
||||
let arr = await baseHttp.get(componsitionConfig.LIST + `/${id}`, {
|
||||
pageIndex: this._pages.PageNum,
|
||||
pageSize: this._pages.PageSize,
|
||||
})
|
||||
let listdata = arr.data.records;
|
||||
if (!listdata) this.datalist = []
|
||||
this.total = arr.data.total
|
||||
let arrs: ComponsitionDataType[] = [];
|
||||
for (let index = 0; index < listdata.length; index++) {
|
||||
arrs.push({
|
||||
key: listdata[index].id,
|
||||
...listdata[index]
|
||||
})
|
||||
}
|
||||
this.datalist = arrs;
|
||||
}
|
||||
|
||||
async delete(id: number) {
|
||||
await baseHttp.delete(componsitionConfig.DELETE + "/" + id, {})
|
||||
}
|
||||
}
|
||||
|
||||
export default new ComponSitionStore();
|
|
@ -1,17 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import CardConfig from "@/service/apiConfig/card_config";
|
||||
import BaseStore from "../baseStore";
|
||||
import { action, makeObservable } from "mobx";
|
||||
|
||||
class CurrentEventStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(CardConfig.currentEvenConfig)
|
||||
makeObservable(this, {
|
||||
otherAction: action,
|
||||
})
|
||||
}
|
||||
otherAction() {
|
||||
|
||||
}
|
||||
}
|
||||
export default new CurrentEventStore();
|
|
@ -1,14 +0,0 @@
|
|||
import { CardDataType } from "@/util/model/interface";
|
||||
import BaseStore from "../baseStore";
|
||||
import { makeObservable } from "mobx";
|
||||
import DynamicConfig from "@/service/apiConfig/dynamic_config";
|
||||
|
||||
class DynamicStore extends BaseStore<CardDataType>{
|
||||
constructor() {
|
||||
super(DynamicConfig)
|
||||
makeObservable(this, {
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
export default new DynamicStore();
|
|
@ -1,35 +1,7 @@
|
|||
import usrStore from '@/store/user'
|
||||
import projectStore from '@/store/project'
|
||||
import cardStore from '@/store/card'
|
||||
import characterStore from '@/store/character'
|
||||
import currentEventStore from '@/store/current_event'
|
||||
import componSitionStore from '@/store/componsition'
|
||||
import systemStore from '@/store/system'
|
||||
import merchantStore from '@/store/merchants'
|
||||
import projectTypeStore from '@/store/project_type'
|
||||
import productUnitStore from '@/store/product_unit'
|
||||
import dynamicStore from '@/store/dynamic'
|
||||
import activityStore from '@/store/activity'
|
||||
import activityTypeStore from '@/store/activity_type'
|
||||
import appStore from '@/store/app'
|
||||
import activeStore from '@/store/active'
|
||||
|
||||
const store = {
|
||||
activeStore,
|
||||
activityStore,
|
||||
activityTypeStore,
|
||||
usrStore,
|
||||
projectStore,
|
||||
cardStore,
|
||||
characterStore,
|
||||
componSitionStore,
|
||||
currentEventStore,
|
||||
systemStore,
|
||||
merchantStore,
|
||||
projectTypeStore,
|
||||
productUnitStore,
|
||||
dynamicStore,
|
||||
appStore,
|
||||
};
|
||||
|
||||
export default store;
|
|
@ -1,13 +0,0 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
import merchantsConfig from '@/service/apiConfig/merchants_config';
|
||||
class MerchantStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(merchantsConfig)
|
||||
makeObservable(this, {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default new MerchantStore();
|
|
@ -1,13 +0,0 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import productUnit from "@/service/apiConfig/product_unit_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProductUnitStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(productUnit)
|
||||
makeObservable(this, {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new ProductUnitStore();
|
|
@ -1,13 +0,0 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import ProjectConfig from "@/service/apiConfig/project_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProjectStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(ProjectConfig)
|
||||
makeObservable(this, {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new ProjectStore();
|
|
@ -1,13 +0,0 @@
|
|||
import { makeObservable } from "mobx";
|
||||
import projectTypeConfig from "@/service/apiConfig/project_type_config";
|
||||
import BaseStore from "@/store/baseStore";
|
||||
|
||||
class ProjectTypeStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(projectTypeConfig)
|
||||
makeObservable(this, {
|
||||
|
||||
})
|
||||
}
|
||||
}
|
||||
export default new ProjectTypeStore();
|
|
@ -1,28 +0,0 @@
|
|||
import { action, makeObservable } from "mobx";
|
||||
import baseHttp from "@/service/base";
|
||||
import BaseStore from "../baseStore";
|
||||
import SystemConfig from '../../service/apiConfig/system_config';
|
||||
class SystemStore extends BaseStore<any> {
|
||||
constructor() {
|
||||
super(SystemConfig)
|
||||
makeObservable(this, {
|
||||
getBanner: action,
|
||||
addBanner: action,
|
||||
addImage: action,
|
||||
})
|
||||
}
|
||||
// 获取banner
|
||||
async getBanner() {
|
||||
return await baseHttp.get( SystemConfig.BannerList, {})
|
||||
}
|
||||
// 获取banner
|
||||
async addImage(params) {
|
||||
return await baseHttp.post( SystemConfig.AddImages, { ...params })
|
||||
}
|
||||
// 保存banner地址
|
||||
async addBanner(params) {
|
||||
return await baseHttp.post( SystemConfig.AddBanner, { list: params })
|
||||
}
|
||||
}
|
||||
|
||||
export default new SystemStore();
|
|
@ -33,8 +33,8 @@ interface ComponsitionDataType {
|
|||
|
||||
|
||||
interface Pages {
|
||||
PageNum: number;
|
||||
PageSize: number;
|
||||
Size: number;
|
||||
Offset: number;
|
||||
}
|
||||
|
||||
// export default DataType
|
||||
|
|
Loading…
Reference in New Issue