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