Commit 3363969c authored by 陈帅's avatar 陈帅

remove serve block

parent 829e25b2
import request from 'umi-request';
export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser');
return request('/api/currentUser');
}
export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, {
return request(`/api/fake_list`, {
params,
});
}
import request from 'umi-request';
export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser');
return request('/api/currentUser');
}
export async function queryProvince() {
return request('/api/BLOCK_NAME/province');
return request('/api/province');
}
export async function queryCity(province: string) {
return request(`/api/BLOCK_NAME/city/${province}`);
return request(`/api/city/${province}`);
}
export async function query() {
return request('/api/BLOCK_NAME/users');
return request('/api/users');
}
import request from 'umi-request';
export async function fakeChartData() {
return request('/api/BLOCK_NAME/fake_chart_data');
return request('/api/fake_chart_data');
}
import request from 'umi-request';
export async function queryTags() {
return request('/api/BLOCK_NAME/tags');
return request('/api/tags');
}
import request from 'umi-request';
export async function queryProjectNotice() {
return request('/api/BLOCK_NAME/project/notice');
return request('/api/project/notice');
}
export async function queryActivities() {
return request('/api/BLOCK_NAME/activities');
return request('/api/activities');
}
export async function fakeChartData() {
return request('/api/BLOCK_NAME/fake_chart_data');
return request('/api/fake_chart_data');
}
export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser');
return request('/api/currentUser');
}
import request from 'umi-request';
export async function fakeSubmitForm(params) {
return request('/api/BLOCK_NAME/forms', {
export async function fakeSubmitForm(params: any) {
return request('/api/forms', {
method: 'POST',
data: params,
});
......
import request from 'umi-request';
export async function fakeSubmitForm(params) {
return request('/api/BLOCK_NAME/forms', {
export async function fakeSubmitForm(params: any) {
return request('/api/forms', {
method: 'POST',
data: params,
});
......
import request from 'umi-request';
export async function fakeSubmitForm(params) {
return request('/api/BLOCK_NAME/forms', {
export async function fakeSubmitForm(params: any) {
return request('/api/forms', {
method: 'POST',
data: params,
});
......
......@@ -6,14 +6,14 @@ interface ParamsType extends Partial<BasicListItemDataType> {
}
export async function queryFakeList(params: ParamsType) {
return request('/api/BLOCK_NAME/fake_list', {
return request('/api/fake_list', {
params,
});
}
export async function removeFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', {
return request('/api/fake_list', {
method: 'POST',
params: {
count,
......@@ -27,7 +27,7 @@ export async function removeFakeList(params: ParamsType) {
export async function addFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', {
return request('/api/fake_list', {
method: 'POST',
params: {
count,
......@@ -41,7 +41,7 @@ export async function addFakeList(params: ParamsType) {
export async function updateFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', {
return request('/api/fake_list', {
method: 'POST',
params: {
count,
......
import request from 'umi-request';
export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, {
return request(`/api/fake_list`, {
params,
});
}
import request from 'umi-request';
import { ListItemDataType } from './data';
export async function queryFakeList(params: ListItemDataType) {
return request(`/api/BLOCK_NAME/fake_list`, {
return request(`/api/fake_list`, {
params,
});
}
......@@ -2,7 +2,7 @@ import request from 'umi-request';
import { ListItemDataType } from './data';
export async function queryFakeList(params: ListItemDataType) {
return request(`/api/BLOCK_NAME/fake_list`, {
return request(`/api/fake_list`, {
params,
});
}
import request from 'umi-request';
export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, {
return request(`/api/fake_list`, {
params,
});
}
......@@ -2,13 +2,13 @@ import request from 'umi-request';
import { TableListParams } from './data';
export async function queryRule(params: TableListParams) {
return request(`/api/BLOCK_NAME`, {
return request(`/api`, {
params,
});
}
export async function removeRule(params: TableListParams) {
return request('/api/BLOCK_NAME', {
return request('/api', {
method: 'POST',
data: {
...params,
......@@ -18,7 +18,7 @@ export async function removeRule(params: TableListParams) {
}
export async function addRule(params: TableListParams) {
return request('/api/BLOCK_NAME', {
return request('/api', {
method: 'POST',
data: {
...params,
......@@ -28,7 +28,7 @@ export async function addRule(params: TableListParams) {
}
export async function updateRule(params: TableListParams) {
return request('/api/BLOCK_NAME', {
return request('/api', {
method: 'POST',
data: {
...params,
......
import request from 'umi-request';
export async function queryAdvancedProfile() {
return request('/api/BLOCK_NAME/advanced');
return request('/api/advanced');
}
import request from 'umi-request';
export async function queryBasicProfile() {
return request('/api/BLOCK_NAME/basic');
return request('/api/basic');
}
......@@ -2,12 +2,12 @@ import request from 'umi-request';
import { FromDataType } from './index';
export async function fakeAccountLogin(params: FromDataType) {
return request('/api/BLOCK_NAME/account', {
return request('/api/account', {
method: 'POST',
data: params,
});
}
export async function getFakeCaptcha(mobile: string) {
return request(`/api/BLOCK_NAME/captcha?mobile=${mobile}`);
return request(`/api/captcha?mobile=${mobile}`);
}
......@@ -2,7 +2,7 @@ import request from 'umi-request';
import { IUserRegisterParams } from './index';
export async function fakeRegister(params: IUserRegisterParams) {
return request('/api/BLOCK_NAME/register', {
return request('/api/register', {
method: 'POST',
data: params,
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment