first commit
This commit is contained in:
parent
dc37129ad3
commit
c76d3d3f1f
|
@ -16,16 +16,16 @@ const menuList: ItemType[] = [
|
||||||
icon: <UserOutlined />,
|
icon: <UserOutlined />,
|
||||||
label: "首页",
|
label: "首页",
|
||||||
},
|
},
|
||||||
// userMenu,
|
userMenu,
|
||||||
cardMenu,
|
// cardMenu,
|
||||||
// contentMenu,
|
contentMenu,
|
||||||
// dynimacStateMenu,
|
dynimacStateMenu,
|
||||||
activeMenu,
|
activeMenu,
|
||||||
// merchant,
|
merchant,
|
||||||
// system,
|
system,
|
||||||
// rbac,
|
rbac,
|
||||||
// taskMenu,
|
taskMenu,
|
||||||
// app,
|
app,
|
||||||
];
|
];
|
||||||
|
|
||||||
export default menuList;
|
export default menuList;
|
||||||
|
|
|
@ -19,11 +19,11 @@ const AppManage = (props: Store) => {
|
||||||
const columns: ColumnsType<UserDataType> = [
|
const columns: ColumnsType<UserDataType> = [
|
||||||
{
|
{
|
||||||
title: "app名称",
|
title: "app名称",
|
||||||
dataIndex: "title",
|
dataIndex: "appName",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "图标",
|
title: "图标",
|
||||||
dataIndex: "desc",
|
dataIndex: "appIcon",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: "预览图片",
|
title: "预览图片",
|
||||||
|
@ -107,6 +107,18 @@ const AppManage = (props: Store) => {
|
||||||
appStore.getlist(UserConfig.LIST);
|
appStore.getlist(UserConfig.LIST);
|
||||||
}, [appStore]);
|
}, [appStore]);
|
||||||
const onFinish = (values: any) => {
|
const onFinish = (values: any) => {
|
||||||
|
let ids = values.photosIds.map((item) => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
let appIcon = values.appIcon.map((item) => {
|
||||||
|
return item.id;
|
||||||
|
});
|
||||||
|
console.log(values);
|
||||||
|
values = {
|
||||||
|
...values,
|
||||||
|
photosIds: ids.join(","),
|
||||||
|
appIcon: appIcon.join(","),
|
||||||
|
};
|
||||||
if (!id) {
|
if (!id) {
|
||||||
appStore.add(values);
|
appStore.add(values);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
class UserConfig {
|
class UserConfig {
|
||||||
static LOGINURI: string = "user/login/system"
|
static LOGINURI: string = "login"
|
||||||
static LIST: string = "user/list"
|
static LIST: string = "user/list"
|
||||||
static ADD: string = "user"
|
static ADD: string = "user"
|
||||||
static DELETE: string = "user"
|
static DELETE: string = "user"
|
||||||
|
|
|
@ -6,7 +6,7 @@ import axios, { AxiosResponse } from "axios";
|
||||||
axios.defaults.headers.common["CommonType"] = "shouka";
|
axios.defaults.headers.common["CommonType"] = "shouka";
|
||||||
axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8";
|
axios.defaults.headers.common["Content-Type"] = "application/json; charset=utf8";
|
||||||
axios.interceptors.request.use((config) => {
|
axios.interceptors.request.use((config) => {
|
||||||
config.baseURL = "http://81.68.81.205:8181/apis/v1/";
|
config.baseURL = "http://quwanya.cn:8899/v1/api/";
|
||||||
config.timeout = 5000;
|
config.timeout = 5000;
|
||||||
let token = window.localStorage.getItem("token")
|
let token = window.localStorage.getItem("token")
|
||||||
config.headers.Authorization = 'Bearer ' + token
|
config.headers.Authorization = 'Bearer ' + token
|
||||||
|
|
|
@ -64,16 +64,16 @@ class BaseStore<B> implements BaseStoreInterface<B> {
|
||||||
PageSize: res.data?.pageSize
|
PageSize: res.data?.pageSize
|
||||||
}
|
}
|
||||||
let data: Array<B> = []
|
let data: Array<B> = []
|
||||||
if (!res.data.records) {
|
if (!res.data.list) {
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.list = data;
|
this.list = data;
|
||||||
})
|
})
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
for (let i = 0; i < res.data.records.length; i++) {
|
for (let i = 0; i < res.data.list.length; i++) {
|
||||||
data.push({
|
data.push({
|
||||||
key: res.data.records[i].id,
|
key: res.data.list[i].id,
|
||||||
...res.data.records[i]
|
...res.data.list[i]
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
|
|
|
@ -29,9 +29,10 @@ class UserStore extends BaseStore<UserDataType> {
|
||||||
this.item = "";
|
this.item = "";
|
||||||
}
|
}
|
||||||
async login(params: UserInfos) {
|
async login(params: UserInfos) {
|
||||||
let data = await baseHttp.forms(UserConfig.LOGINURI, {
|
let data = await baseHttp.post(UserConfig.LOGINURI, {
|
||||||
acount: params.userName,
|
acount: params.userName,
|
||||||
password: params.passWord,
|
passwd: params.passWord,
|
||||||
|
loginType:5
|
||||||
})
|
})
|
||||||
this._userinfo = {
|
this._userinfo = {
|
||||||
userName: data.data.name,
|
userName: data.data.name,
|
||||||
|
|
Loading…
Reference in New Issue