# 批量创建前端页面脚本 # PowerShell脚本 - 为新增菜单创建基础Vue页面 $modules = @( @{path="giftnum"; name="礼物数量管理"; component="GiftNumManage"}, @{path="interact"; name="互动管理"; component="InteractManage"}, @{path="task"; name="任务管理"; component="TaskManage"}, @{path="help"; name="帮助中心"; component="HelpCenter"}, @{path="activity"; name="平台活动管理"; component="ActivityManage"}, @{path="lottery"; name="抽奖管理"; component="LotteryManage"}, @{path="headwear"; name="头饰管理"; component="HeadwearManage"}, @{path="mount"; name="坐骑管理"; component="MountManage"}, @{path="report"; name="举报反馈管理"; component="ReportManage"}, @{path="invite"; name="邀请管理"; component="InviteManage"}, @{path="family"; name="家族管理"; component="FamilyManage"}, @{path="couple"; name="夫妻相管理"; component="CoupleManage"}, @{path="agent"; name="代理管理"; component="AgentManage"}, @{path="chatpay"; name="聊天付费配置"; component="ChatPayConfig"}, @{path="coinexchange"; name="金币兑换钻石配置"; component="CoinExchangeConfig"}, @{path="chatphrase"; name="聊天常用语"; component="ChatPhraseManage"}, @{path="noble"; name="贵族等级管理"; component="NobleManage"}, @{path="dynamic"; name="动态管理"; component="DynamicManage"}, @{path="blacklist"; name="黑名单管理"; component="BlacklistManage"}, @{path="certification"; name="认证管理"; component="CertificationManage"}, @{path="charm"; name="魅力值管理"; component="CharmManage"}, @{path="member"; name="会员管理"; component="MemberManage"}, @{path="withdraw"; name="提现管理"; component="WithdrawManage"}, @{path="appeal"; name="申诉管理"; component="AppealManage"}, @{path="banner"; name="轮播图管理"; component="BannerManage"}, @{path="comment"; name="评论管理"; component="CommentManage"}, @{path="newtask"; name="新手任务管理"; component="NewTaskManage"}, @{path="sensitive"; name="敏感词管理"; component="SensitiveManage"}, @{path="fans"; name="粉丝团管理"; component="FansManage"}, @{path="session"; name="会话管理"; component="SessionManage"}, @{path="detail"; name="明细管理"; component="DetailManage"}, @{path="mountpurchase"; name="购买坐骑管理"; component="MountPurchaseManage"}, @{path="version"; name="客户端版本管理"; component="VersionManage"}, @{path="giftreward"; name="礼物打赏管理"; component="GiftRewardManage"}, @{path="follow"; name="关注管理"; component="FollowManage"}, @{path="exchange"; name="兑换管理"; component="ExchangeManage"}, @{path="sysconfig"; name="配置管理"; component="SysConfigManage"} ) $baseDir = ".\src\views" foreach ($module in $modules) { $dirPath = Join-Path $baseDir $module.path $filePath = Join-Path $dirPath "index.vue" # 创建目录 if (!(Test-Path $dirPath)) { New-Item -ItemType Directory -Path $dirPath -Force | Out-Null Write-Host "创建目录: $dirPath" -ForegroundColor Green } # 创建Vue文件 $content = @" "@ $content | Out-File -FilePath $filePath -Encoding UTF8 Write-Host "创建文件: $filePath" -ForegroundColor Cyan } Write-Host "`n所有页面创建完成!" -ForegroundColor Yellow Write-Host "共创建 $($modules.Count) 个模块页面" -ForegroundColor Yellow