Commit 29cb41f698211ae34dd64dce6d77ac14cf410ebd
1 parent
340f3133
replace header avatar with icon
Showing
3 changed files
with
3 additions
and
10 deletions
front-end/h5/src/store/modules/work.js
| @@ -51,6 +51,7 @@ export const actions = { | @@ -51,6 +51,7 @@ export const actions = { | ||
| 51 | }, | 51 | }, |
| 52 | fetchWorks ({ commit, state }, workId) { | 52 | fetchWorks ({ commit, state }, workId) { |
| 53 | strapi.getEntries('works', {}).then(entries => { | 53 | strapi.getEntries('works', {}).then(entries => { |
| 54 | + entries.sort((a, b) => b.id - a.id) | ||
| 54 | commit('setWorks', entries) | 55 | commit('setWorks', entries) |
| 55 | }) | 56 | }) |
| 56 | }, | 57 | }, |
front-end/h5/src/utils/http.js
| @@ -7,14 +7,6 @@ message.config({ | @@ -7,14 +7,6 @@ message.config({ | ||
| 7 | 7 | ||
| 8 | export const myMessage = message | 8 | export const myMessage = message |
| 9 | 9 | ||
| 10 | -export const client = axios.create({ | ||
| 11 | - baseURL: '/v1', | ||
| 12 | - responseType: 'json' | ||
| 13 | -}) | ||
| 14 | -export const baseClient = axios.create({ | ||
| 15 | - responseType: 'json' | ||
| 16 | -}) | ||
| 17 | - | ||
| 18 | export class AxiosWrapper { | 10 | export class AxiosWrapper { |
| 19 | // eslint-disable-next-line camelcase | 11 | // eslint-disable-next-line camelcase |
| 20 | constructor ({ name = 'default', loading_name, responseType = 'json', headers, dispatch, commit, router, successMsg, failMsg, successCallback, failCallback, customRequest }) { | 12 | constructor ({ name = 'default', loading_name, responseType = 'json', headers, dispatch, commit, router, successMsg, failMsg, successCallback, failCallback, customRequest }) { |
front-end/h5/src/views/work-manager/index.vue
| @@ -89,7 +89,7 @@ export default { | @@ -89,7 +89,7 @@ export default { | ||
| 89 | <a-layout-header class="header"> | 89 | <a-layout-header class="header"> |
| 90 | <LogoOfHeader /> | 90 | <LogoOfHeader /> |
| 91 | {/* TODO we can show the plugins shortcuts here */} | 91 | {/* TODO we can show the plugins shortcuts here */} |
| 92 | - <a-dropdown style={{ float: 'right', background: 'transparent', margin: '16px 28px 16px 0' }}> | 92 | + <a-dropdown style={{ float: 'right', background: 'transparent', margin: '0 28px 16px 0', cursor: 'pointer' }}> |
| 93 | <a-menu slot="overlay" onClick={() => {}}> | 93 | <a-menu slot="overlay" onClick={() => {}}> |
| 94 | <a-menu-item key="1"> | 94 | <a-menu-item key="1"> |
| 95 | <span>someone@luban</span> | 95 | <span>someone@luban</span> |
| @@ -98,7 +98,7 @@ export default { | @@ -98,7 +98,7 @@ export default { | ||
| 98 | <a-menu-item key="2"><a-icon type="setting" />账号设置</a-menu-item> | 98 | <a-menu-item key="2"><a-icon type="setting" />账号设置</a-menu-item> |
| 99 | <a-menu-item key="3"><a-icon type="logout" />退出登录</a-menu-item> | 99 | <a-menu-item key="3"><a-icon type="logout" />退出登录</a-menu-item> |
| 100 | </a-menu> | 100 | </a-menu> |
| 101 | - <a-avatar src="https://zos.alipayobjects.com/rmsportal/ODTLcjxAfvqbxHnVXCYX.png" /> | 101 | + <a-menu-item><a-icon type="user" style={{ color: 'white' }} /></a-menu-item> |
| 102 | </a-dropdown> | 102 | </a-dropdown> |
| 103 | <ExternalLinksOfHeader /> | 103 | <ExternalLinksOfHeader /> |
| 104 | </a-layout-header> | 104 | </a-layout-header> |