mirror of
https://github.com/WeBankFinTech/fes.js.git
synced 2025-10-14 10:52:28 +08:00
1. 去掉编译打包时为正确配置BannerPlugin 2. fes-core替换Icon组件 3. setDefaultPage改为直接跳转到defaultPage,而不是redirect
43 lines
955 B
JavaScript
43 lines
955 B
JavaScript
import './assets/styles/main.scss';
|
|
|
|
export default function () {
|
|
this.FesApp.set('FesName', '$i18n.title');
|
|
|
|
|
|
// 设置退出逻辑
|
|
this.on('fes_logout', () => {
|
|
this.FesApp.setRole('unLogin');
|
|
this.FesStorage.set('userLogin', false);
|
|
});
|
|
|
|
// 设置logo点击事件
|
|
this.on('fes_logo_click', () => {
|
|
window.Toast('你点击了LOGO');
|
|
});
|
|
|
|
// 设置路由钩子
|
|
this.FesApp.setBeforeRouter((from, to, next) => {
|
|
next();
|
|
});
|
|
this.FesApp.setAfterRouter((route) => {
|
|
console.log(`您浏览到了${route.path}`);
|
|
});
|
|
|
|
// 设置当前角色
|
|
if (!this.FesStorage.get('userLogin') === true) {
|
|
this.setRole('unLogin');
|
|
}
|
|
|
|
// 设置AJAX配置
|
|
this.FesApi.option({
|
|
});
|
|
|
|
// 设置响应结构
|
|
this.FesApi.setResponse({
|
|
successCode: '0',
|
|
codePath: 'code',
|
|
messagePath: 'msg',
|
|
resultPath: 'result'
|
|
});
|
|
}
|