{
“code”: 200,
“data”: {
“avatar”: “https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif”,
“name”: “黄晓果”,
“roles”: [
“editor”
]
}
}
- 修改models/user.ts
export type CurrentUser = {
avatar?: string;
name?: string;
introduction?: string;
roles?: string | string[];
};
effects: {
*fetchCurrent(_, { call, put }) {
const response = yield call(queryCurrent);
yield put({
type: ‘saveCurrentUser’,
payload: response.data,
});
},
},
import type { Effect, Reducer } from ‘umi’;
import { queryCurrent } from ‘@/services/user’;
export type CurrentUser = {
avatar?: string;
name?: string;
introduction?: string;
roles?: string | string[];
};
export type UserModelState = {
currentUser?: CurrentUser;
};
export type UserModelType = {
namespace: ‘user’;
state: UserModelState;
effects: {
fetchCurrent: Effect;
};
reducers: {
saveCurrentUser: Reducer;
};
};
const UserModel: UserModelType = {
namespace: ‘user’,
state: {
currentUser: {},
},
effects: {
*fetchCurrent(_, { call, put }) {
const response = yield call(queryCurrent);
yield put({
type: ‘saveCurrentUser’,
payload: response.data,
});
},
},
reducers: {
saveCurrentUser(state, action) {
return {
…state,
currentUser: action.payload || {},
};
},
},
};
export default UserModel;
- 改造config/routes.ts
export default [
{
path: ‘/’,
component: ‘…/layouts/BlankLayout’,
routes: [
{
path: ‘/user’,
component: ‘…/layouts/UserLayout’,
routes: [
{
name: ‘登录’,
path: ‘/user/login’,
component: ‘./User/login’,
},
{
component: ‘./404’,
},
],
},
{
path: ‘/’,
component: ‘…/layouts/SecurityLayout’,
routes: [
{
path: ‘/’,
component: ‘…/layouts/BasicLayout’,
routes: [
{
path: ‘/’,
redirect: ‘/welcome’,
},
{
path: ‘/welcome’,
component: ‘./Welcome’,
},
{
path: ‘/Usermanage’,
icon: ‘form’,
name: ‘用户管理’,
authority: [‘admin’],
routes: [
{
path: ‘/’,
redirect: ‘/usermanage/rolemanage’,
},
{
name: ‘角色管理’,
icon: ‘form’,
path: ‘/usermanage/rolemanage’,
component: ‘./Usermanage/rolemanage’,
authority: [‘admin’],
},
{
name: ‘账号列表’,
icon: ‘form’,
path: ‘/usermanage/accountlist’,
component: ‘./Usermanage/accountlist’,
authority: [‘admin’],
},
],
},
{
path: ‘/voicemanage’,
icon: ‘form’,
name: ‘语音管理’,
authority: [‘admin’],
routes: [
{
path: ‘/’,
redirect: ‘/voicemanage/albumscategories’,
},
{
name: ‘专辑分类’,
icon: ‘form’,
path: ‘/voicemanage/albumscategories’,
component: ‘./voicemanage/albumscategories’,
},
{
name: ‘收听管理’,
icon: ‘form’,
path: ‘/voicemanage/listenmanage’,
component: ‘./voicemanage/listenmanage’,
},
],
},
{
path: ‘/appmanagement’,
icon: ‘form’,
name: ‘App管理’,
routes: [
{
path: ‘/’,
redirect: ‘/appmanagement/banner’,
},
{
name: ‘Banner管理’,
icon: ‘form’,
path: ‘/appmanagement/banner’,
component: ‘./appmanagement/banner’,
},
{
name: ‘App版本管理’,
icon: ‘form’,
path: ‘/appmanagement/appversions’,
component: ‘./appmanagement/appversions’,
},
],
},
{
path: ‘/vipmanagement’,
icon: ‘form’,
name: ‘VIP管理’,
authority: [‘admin’],
routes: [
{
path: ‘/’,
redirect: ‘/vipmanagement/setmeal’,
},
{
name: ‘套餐管理’,
icon: ‘form’,
path: ‘/vipmanagement/setmeal’,
component: ‘./vipmanagement/setmeal’,
authority: [‘admin’],
},
{
name: ‘激活码管理’,
icon: ‘form’,
path: ‘/vipmanagement/activationcode’,
component: ‘./vipmanagement/activationcode’,
authority: [‘admin’],
},
{
name: ‘激活码生成列表’,
icon: ‘form’,
path: ‘/vipmanagement/activationcodelist’,
component: ‘./vipmanagement/activationcodelist’,
authority: [‘admin’],
},
{
name: ‘激活码导出列表’,
icon: ‘form’,
path: ‘/vipmanagement/activationcodeexport’,
component: ‘./vipmanagement/activationcodeexport’,
authority: [‘admin’],
},
{
name: ‘订单列表’,
icon: ‘form’,
path: ‘/vipmanagement/orderlist’,
component: ‘./vipmanagement/orderlist’,
authority: [‘admin’],
},
{
name: ‘VIP权益说明’,
icon: ‘form’,
path: ‘/vipmanagement/vipequity’,
component: ‘./vipmanagement/vipequity’,
authority: [‘admin’],
},
],
},
{
path: ‘/brandownermanage’,
icon: ‘form’,
name: ‘品牌商管理’,
authority: [‘admin’],
routes: [
{
path: ‘/’,
redirect: ‘/brandownermanage/brandownerlist’,
},
{
name: ‘品牌商列表’,
icon: ‘form’,
path: ‘/brandownermanage/brandownerlist’,
component: ‘./brandownermanage/brandownerlist’,
authority: [‘admin’],
},
],
},
{
path: ‘/machinemanage’,
icon: ‘form’,
name: ‘机器管理’, authority: [‘admin’],
routes: [
{
path: ‘/’,
redirect: ‘/machinemanage/machinelist’,
},
{
name: ‘机器列表’,
icon: ‘form’,
path: ‘/machinemanage/machinelist’,
component: ‘./machinemanage/machinelist’,
authority: [‘admin’],
},
],
},
{
path: ‘/softwaremanage’,
icon: ‘form’,
name: ‘软件管理’,
authority: [‘user’],
routes: [
{
path: ‘/’,
redirect: ‘/softwaremanage/versions’,
},
{
name: ‘版本管理’,
icon: ‘form’,
path: ‘/softwaremanage/versions’,
component: ‘./softwaremanage/versions’,
authority: [‘admin’],
},
{
name: ‘使用说明’,
icon: ‘form’,
path: ‘/softwaremanage/usedirection’,
component: ‘./softwaremanage/usedirection’,
authority: [‘admin’],
},
],
},
{
path: ‘/officialaccounts’,
icon: ‘form’,
name: ‘公众号设置’,
authority: [‘user’],
routes: [
{
path: ‘/’,
redirect: ‘/officialaccounts/accesssettings’,
},
{
name: ‘接入设置’,
icon: ‘form’,
path: ‘/officialaccounts/accesssettings’,
component: ‘./officialaccounts/accesssettings’,
自我介绍一下,小编13年上海交大毕业,曾经在小公司待过,也去过华为、OPPO等大厂,18年进入阿里一直到现在。
深知大多数初中级Android工程师,想要提升技能,往往是自己摸索成长或者是报班学习,但对于培训机构动则近万的学费,着实压力不小。自己不成体系的自学效果低效又漫长,而且极易碰到天花板技术停滞不前!
因此收集整理了一份《2024年Android移动开发全套学习资料》,初衷也很简单,就是希望能够帮助到想自学提升又不知道该从何学起的朋友,同时减轻大家的负担。
既有适合小白学习的零基础资料,也有适合3年以上经验的小伙伴深入学习提升的进阶课程,基本涵盖了95%以上Android开发知识点,真正体系化!
由于文件比较大,这里只是将部分目录截图出来,每个节点里面都包含大厂面经、学习笔记、源码讲义、实战项目、讲解视频,并且会持续更新!
如果你觉得这些内容对你有帮助,可以扫码获取!!(备注:Android)
尾声
对于很多初中级Android工程师而言,想要提升技能,往往是自己摸索成长,不成体系的学习效果低效漫长且无助。 整理的这些架构技术希望对Android开发的朋友们有所参考以及少走弯路,本文的重点是你有没有收获与成长,其余的都不重要,希望读者们能谨记这一点。
最后想要拿高薪实现技术提升薪水得到质的飞跃。最快捷的方式,就是有人可以带着你一起分析,这样学习起来最为高效,所以为了大家能够顺利进阶中高级、架构师,我特地为大家准备了一套高手学习的源码和框架视频等精品Android架构师教程,保证你学了以后保证薪资上升一个台阶。
当你有了学习线路,学习哪些内容,也知道以后的路怎么走了,理论看多了总要实践的。
进阶学习视频
附上:我们之前因为秋招收集的二十套一二线互联网公司Android面试真题 (含BAT、小米、华为、美团、滴滴)和我自己整理Android复习笔记(包含Android基础知识点、Android扩展知识点、Android源码解析、设计模式汇总、Gradle知识点、常见算法题汇总。)
《Android学习笔记总结+移动架构视频+大厂面试真题+项目实战源码》,点击传送门即可获取!
尾声
对于很多初中级Android工程师而言,想要提升技能,往往是自己摸索成长,不成体系的学习效果低效漫长且无助。 整理的这些架构技术希望对Android开发的朋友们有所参考以及少走弯路,本文的重点是你有没有收获与成长,其余的都不重要,希望读者们能谨记这一点。
最后想要拿高薪实现技术提升薪水得到质的飞跃。最快捷的方式,就是有人可以带着你一起分析,这样学习起来最为高效,所以为了大家能够顺利进阶中高级、架构师,我特地为大家准备了一套高手学习的源码和框架视频等精品Android架构师教程,保证你学了以后保证薪资上升一个台阶。
[外链图片转存中…(img-W2DTytGQ-1711810783484)]
当你有了学习线路,学习哪些内容,也知道以后的路怎么走了,理论看多了总要实践的。
进阶学习视频
[外链图片转存中…(img-7Rd5Z5HS-1711810783484)]
附上:我们之前因为秋招收集的二十套一二线互联网公司Android面试真题 (含BAT、小米、华为、美团、滴滴)和我自己整理Android复习笔记(包含Android基础知识点、Android扩展知识点、Android源码解析、设计模式汇总、Gradle知识点、常见算法题汇总。)
[外链图片转存中…(img-RDC1e7kw-1711810783484)]