Skip to content

Commit

Permalink
chore: 页面修改
Browse files Browse the repository at this point in the history
  • Loading branch information
xwchris committed Dec 25, 2024
1 parent 2726ffa commit feaab7b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const speedy = require('@bytedance/mona-speedy');
let isFirst = true;

export interface NavComponent {
position: 'left' | 'top',
position: 'sidebar' | 'topbar',
level: number
}

Expand Down Expand Up @@ -89,7 +89,7 @@ const max: IPlugin = async ctx => {
const isSideBar = appDetail.appExtend.componentGroupType === 7;

if (isTopBar || isSideBar) {
const position: 'left' | 'top' = isTopBar ? 'top' : 'left';
const position: 'topbar' | 'sidebar' = isTopBar ? 'topbar' : 'sidebar';
navComponent = {
position,
level: appDetail.appExtend.componentLevel || 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WS_PORT = 10079;
const TARGET_URL = `https://fxg.jinritemai.com/ffa/shop/decorate/brand/list?debug=1&WSPORT=${WS_PORT}`;

function generateTargetUrl({ debugPage = '', navComponent }) {
const extra = ''
let extra = ''
if (navComponent) {
extra = `&nav_position=${navComponent.position}&nav_level=${navComponent.level}`
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ function generateDevConfig({ navComponent, debugPage }) {
}
const addr = devServer.server.address();
openBrowser(`http://localhost:${addr.port}`);
openBrowser(generateTargetUrl({ navComponent, debugPage }));
const maxUrl = generateTargetUrl({ navComponent, debugPage });
console.log('打开 '+ maxUrl)
openBrowser(maxUrl);
},
},
plugins: [
Expand Down

0 comments on commit feaab7b

Please sign in to comment.