From 8002969f5f9ae2afb10bbc1f31d2d2e41c6f48b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Wed, 29 May 2019 17:34:12 +0800 Subject: [PATCH] new mock data url\ --- AccountCenter/src/_mock.ts | 65 ++++++++++++++++++++++++++++++++-- ProfileAdvanced/src/_mock.ts | 2 +- ProfileAdvanced/src/service.ts | 2 +- ProfileBasic/src/_mock.ts | 2 +- ProfileBasic/src/service.ts | 2 +- package.json | 2 +- 6 files changed, 68 insertions(+), 7 deletions(-) diff --git a/AccountCenter/src/_mock.ts b/AccountCenter/src/_mock.ts index 40e859d1..7b3740d6 100644 --- a/AccountCenter/src/_mock.ts +++ b/AccountCenter/src/_mock.ts @@ -177,13 +177,12 @@ export default { // 支持值为 Object 和 Array 'GET /api/currentUser': { name: 'Serati Ma', - avatar: 'https://gw.alipayobjects.com/zos/rmsportal/BiazfanxmamNRoxxVxka.png', + avatar: 'https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png', userid: '00000001', email: 'antdesign@alipay.com', signature: '海纳百川,有容乃大', title: '交互专家', group: '蚂蚁金服-某某某事业群-某某平台部-某某技术部-UED', - notice: getNotice, tags: [ { key: '0', @@ -210,6 +209,68 @@ export default { label: '海纳百川', }, ], + notice: [ + { + id: 'xxx1', + title: titles[0], + logo: avatars[0], + description: '那是一种内在的东西,他们到达不了,也无法触及的', + updatedAt: new Date(), + member: '科学搬砖组', + href: '', + memberLink: '', + }, + { + id: 'xxx2', + title: titles[1], + logo: avatars[1], + description: '希望是一个好东西,也许是最好的,好东西是不会消亡的', + updatedAt: new Date('2017-07-24'), + member: '全组都是吴彦祖', + href: '', + memberLink: '', + }, + { + id: 'xxx3', + title: titles[2], + logo: avatars[2], + description: '城镇中有那么多的酒馆,她却偏偏走进了我的酒馆', + updatedAt: new Date(), + member: '中二少女团', + href: '', + memberLink: '', + }, + { + id: 'xxx4', + title: titles[3], + logo: avatars[3], + description: '那时候我只会想自己想要什么,从不想自己拥有什么', + updatedAt: new Date('2017-07-23'), + member: '程序员日常', + href: '', + memberLink: '', + }, + { + id: 'xxx5', + title: titles[4], + logo: avatars[4], + description: '凛冬将至', + updatedAt: new Date('2017-07-23'), + member: '高逼格设计天团', + href: '', + memberLink: '', + }, + { + id: 'xxx6', + title: titles[5], + logo: avatars[5], + description: '生命就像一盒巧克力,结果往往出人意料', + updatedAt: new Date('2017-07-23'), + member: '骗你来学计算机', + href: '', + memberLink: '', + }, + ], notifyCount: 12, unreadCount: 11, country: 'China', diff --git a/ProfileAdvanced/src/_mock.ts b/ProfileAdvanced/src/_mock.ts index a9a05fef..4d7d1995 100644 --- a/ProfileAdvanced/src/_mock.ts +++ b/ProfileAdvanced/src/_mock.ts @@ -70,5 +70,5 @@ const getProfileAdvancedData = { }; export default { - 'GET /api/advanced': getProfileAdvancedData, + 'GET /api/profile/advanced': getProfileAdvancedData, }; diff --git a/ProfileAdvanced/src/service.ts b/ProfileAdvanced/src/service.ts index 2c6e60f7..2f773f7f 100644 --- a/ProfileAdvanced/src/service.ts +++ b/ProfileAdvanced/src/service.ts @@ -1,5 +1,5 @@ import request from 'umi-request'; export async function queryAdvancedProfile() { - return request('/api/advanced'); + return request('/api/profile/advanced'); } diff --git a/ProfileBasic/src/_mock.ts b/ProfileBasic/src/_mock.ts index 2bc3a353..b52499a1 100644 --- a/ProfileBasic/src/_mock.ts +++ b/ProfileBasic/src/_mock.ts @@ -82,5 +82,5 @@ const getProfileBasicData = { }; export default { - 'GET /api/basic': getProfileBasicData, + 'GET /api/profile/basic': getProfileBasicData, }; diff --git a/ProfileBasic/src/service.ts b/ProfileBasic/src/service.ts index 1c4154ca..bc2a9fd4 100644 --- a/ProfileBasic/src/service.ts +++ b/ProfileBasic/src/service.ts @@ -1,5 +1,5 @@ import request from 'umi-request'; export async function queryBasicProfile() { - return request('/api/basic'); + return request('/api/profile/basic'); } diff --git a/package.json b/package.json index aa661b04..24495c3f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "private": true, "scripts": { - "dev": "cross-env PAGES_PATH='AccountCenter/src' umi dev", + "dev": "cross-env PAGES_PATH='ProfileAdvanced/src' umi dev", "lint": "npm run lint:ts && npm run lint:style && npm run lint:prettier", "lint-staged": "lint-staged", "lint-staged:ts": "tslint", -- GitLab