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

remove serve block

parent 829e25b2
import request from 'umi-request'; import request from 'umi-request';
export async function queryCurrent() { export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser'); return request('/api/currentUser');
} }
export async function queryFakeList(params: { count: number }) { export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, { return request(`/api/fake_list`, {
params, params,
}); });
} }
import request from 'umi-request'; import request from 'umi-request';
export async function queryCurrent() { export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser'); return request('/api/currentUser');
} }
export async function queryProvince() { export async function queryProvince() {
return request('/api/BLOCK_NAME/province'); return request('/api/province');
} }
export async function queryCity(province: string) { export async function queryCity(province: string) {
return request(`/api/BLOCK_NAME/city/${province}`); return request(`/api/city/${province}`);
} }
export async function query() { export async function query() {
return request('/api/BLOCK_NAME/users'); return request('/api/users');
} }
import request from 'umi-request'; import request from 'umi-request';
export async function fakeChartData() { export async function fakeChartData() {
return request('/api/BLOCK_NAME/fake_chart_data'); return request('/api/fake_chart_data');
} }
import request from 'umi-request'; import request from 'umi-request';
export async function queryTags() { export async function queryTags() {
return request('/api/BLOCK_NAME/tags'); return request('/api/tags');
} }
import request from 'umi-request'; import request from 'umi-request';
export async function queryProjectNotice() { export async function queryProjectNotice() {
return request('/api/BLOCK_NAME/project/notice'); return request('/api/project/notice');
} }
export async function queryActivities() { export async function queryActivities() {
return request('/api/BLOCK_NAME/activities'); return request('/api/activities');
} }
export async function fakeChartData() { export async function fakeChartData() {
return request('/api/BLOCK_NAME/fake_chart_data'); return request('/api/fake_chart_data');
} }
export async function queryCurrent() { export async function queryCurrent() {
return request('/api/BLOCK_NAME/currentUser'); return request('/api/currentUser');
} }
import request from 'umi-request'; import request from 'umi-request';
export async function fakeSubmitForm(params) { export async function fakeSubmitForm(params: any) {
return request('/api/BLOCK_NAME/forms', { return request('/api/forms', {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
......
import request from 'umi-request'; import request from 'umi-request';
export async function fakeSubmitForm(params) { export async function fakeSubmitForm(params: any) {
return request('/api/BLOCK_NAME/forms', { return request('/api/forms', {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
......
import request from 'umi-request'; import request from 'umi-request';
export async function fakeSubmitForm(params) { export async function fakeSubmitForm(params: any) {
return request('/api/BLOCK_NAME/forms', { return request('/api/forms', {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
......
...@@ -6,14 +6,14 @@ interface ParamsType extends Partial<BasicListItemDataType> { ...@@ -6,14 +6,14 @@ interface ParamsType extends Partial<BasicListItemDataType> {
} }
export async function queryFakeList(params: ParamsType) { export async function queryFakeList(params: ParamsType) {
return request('/api/BLOCK_NAME/fake_list', { return request('/api/fake_list', {
params, params,
}); });
} }
export async function removeFakeList(params: ParamsType) { export async function removeFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params; const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', { return request('/api/fake_list', {
method: 'POST', method: 'POST',
params: { params: {
count, count,
...@@ -27,7 +27,7 @@ export async function removeFakeList(params: ParamsType) { ...@@ -27,7 +27,7 @@ export async function removeFakeList(params: ParamsType) {
export async function addFakeList(params: ParamsType) { export async function addFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params; const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', { return request('/api/fake_list', {
method: 'POST', method: 'POST',
params: { params: {
count, count,
...@@ -41,7 +41,7 @@ export async function addFakeList(params: ParamsType) { ...@@ -41,7 +41,7 @@ export async function addFakeList(params: ParamsType) {
export async function updateFakeList(params: ParamsType) { export async function updateFakeList(params: ParamsType) {
const { count = 5, ...restParams } = params; const { count = 5, ...restParams } = params;
return request('/api/BLOCK_NAME/fake_list', { return request('/api/fake_list', {
method: 'POST', method: 'POST',
params: { params: {
count, count,
......
import request from 'umi-request'; import request from 'umi-request';
export async function queryFakeList(params: { count: number }) { export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, { return request(`/api/fake_list`, {
params, params,
}); });
} }
import request from 'umi-request'; import request from 'umi-request';
import { ListItemDataType } from './data'; import { ListItemDataType } from './data';
export async function queryFakeList(params: ListItemDataType) { export async function queryFakeList(params: ListItemDataType) {
return request(`/api/BLOCK_NAME/fake_list`, { return request(`/api/fake_list`, {
params, params,
}); });
} }
...@@ -2,7 +2,7 @@ import request from 'umi-request'; ...@@ -2,7 +2,7 @@ import request from 'umi-request';
import { ListItemDataType } from './data'; import { ListItemDataType } from './data';
export async function queryFakeList(params: ListItemDataType) { export async function queryFakeList(params: ListItemDataType) {
return request(`/api/BLOCK_NAME/fake_list`, { return request(`/api/fake_list`, {
params, params,
}); });
} }
import request from 'umi-request'; import request from 'umi-request';
export async function queryFakeList(params: { count: number }) { export async function queryFakeList(params: { count: number }) {
return request(`/api/BLOCK_NAME/fake_list`, { return request(`/api/fake_list`, {
params, params,
}); });
} }
...@@ -2,13 +2,13 @@ import request from 'umi-request'; ...@@ -2,13 +2,13 @@ import request from 'umi-request';
import { TableListParams } from './data'; import { TableListParams } from './data';
export async function queryRule(params: TableListParams) { export async function queryRule(params: TableListParams) {
return request(`/api/BLOCK_NAME`, { return request(`/api`, {
params, params,
}); });
} }
export async function removeRule(params: TableListParams) { export async function removeRule(params: TableListParams) {
return request('/api/BLOCK_NAME', { return request('/api', {
method: 'POST', method: 'POST',
data: { data: {
...params, ...params,
...@@ -18,7 +18,7 @@ export async function removeRule(params: TableListParams) { ...@@ -18,7 +18,7 @@ export async function removeRule(params: TableListParams) {
} }
export async function addRule(params: TableListParams) { export async function addRule(params: TableListParams) {
return request('/api/BLOCK_NAME', { return request('/api', {
method: 'POST', method: 'POST',
data: { data: {
...params, ...params,
...@@ -28,7 +28,7 @@ export async function addRule(params: TableListParams) { ...@@ -28,7 +28,7 @@ export async function addRule(params: TableListParams) {
} }
export async function updateRule(params: TableListParams) { export async function updateRule(params: TableListParams) {
return request('/api/BLOCK_NAME', { return request('/api', {
method: 'POST', method: 'POST',
data: { data: {
...params, ...params,
......
import request from 'umi-request'; import request from 'umi-request';
export async function queryAdvancedProfile() { export async function queryAdvancedProfile() {
return request('/api/BLOCK_NAME/advanced'); return request('/api/advanced');
} }
import request from 'umi-request'; import request from 'umi-request';
export async function queryBasicProfile() { export async function queryBasicProfile() {
return request('/api/BLOCK_NAME/basic'); return request('/api/basic');
} }
...@@ -2,12 +2,12 @@ import request from 'umi-request'; ...@@ -2,12 +2,12 @@ import request from 'umi-request';
import { FromDataType } from './index'; import { FromDataType } from './index';
export async function fakeAccountLogin(params: FromDataType) { export async function fakeAccountLogin(params: FromDataType) {
return request('/api/BLOCK_NAME/account', { return request('/api/account', {
method: 'POST', method: 'POST',
data: params, data: params,
}); });
} }
export async function getFakeCaptcha(mobile: string) { 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'; ...@@ -2,7 +2,7 @@ import request from 'umi-request';
import { IUserRegisterParams } from './index'; import { IUserRegisterParams } from './index';
export async function fakeRegister(params: IUserRegisterParams) { export async function fakeRegister(params: IUserRegisterParams) {
return request('/api/BLOCK_NAME/register', { return request('/api/register', {
method: 'POST', method: 'POST',
data: params, 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