Commit 981df0ae by yancanhua

fix: 新增登录中 标题

1 parent 75eb9102
......@@ -54,8 +54,17 @@ const actions = {
const currentPath = window.location.href;
const pathKeywords = ['/department', '/personage', '/company'];
const isTargetPath = pathKeywords.some(keyword => currentPath.includes(keyword));
const pathTitleMap = {
'/department': '美团消费部门月度总结',
'/personage': '美团消费个人月度总结',
'/company': '美团消费公司月度总结'
};
const matchedPath = Object.keys(pathTitleMap).find(path => currentPath.includes(path));
if (matchedPath) {
document.title = pathTitleMap[matchedPath];
}
const pushId = util.getQuery('pushId');
if (isTargetPath && (pushId && (pushId * 1) > 744)) {
if (isTargetPath && (pushId && (pushId * 1) > 500)) {
try {
let { corpId, agentId } = util.getQuery();
const wwCode = util.getQuery('code');
......@@ -99,6 +108,7 @@ const actions = {
})
} else {
commit('SET_AUTHORIZE_PAGE', false);
document.title = '登录中...';
window.location.href = `${loginUrl}?redirect_uri=${encodeURIComponent(window.location.href)}&corpId=${corpId}&agentId=${agentId}&backLoginCode=BACKCODE`
}
} catch (error) {
......
......@@ -5,7 +5,7 @@ const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPl
const resolve = dir => path.join(__dirname, dir)
// page title
const name = defaultSettings.title || '授权中...'
const name = defaultSettings.title || '登录中...'
// 生产环境,测试和正式
const IS_PROD = ['production', 'prod'].includes(process.env.NODE_ENV)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!