feat: 增加环境切换

This commit is contained in:
R524809
2026-10-19 17:49:19 +08:00
parent 997042789d
commit fe1074e3f0
21 changed files with 968 additions and 123 deletions
+20 -5
View File
@@ -1,9 +1,24 @@
<view class="debug-page">
<view class="debug-page__hero">
<text class="debug-page__hero-title">Debug 工具页</text>
<text class="debug-page__hero-desc">
仅开发环境可见,用于发布前检查和同步调试数据。
</text>
<view wx:if="{{isDevEnv}}" class="debug-page__environment">
<text class="debug-page__section-title"
>接口环境 · {{currentEnvironment}}</text
>
<text class="debug-page__environment-url">{{currentBaseUrl}}</text>
<view class="debug-page__environment-options">
<button
wx:for="{{environments}}"
wx:key="environment"
class="debug-environment-option {{currentEnvironment === item.environment ? 'debug-environment-option--selected' : ''}}"
data-environment="{{item.environment}}"
disabled="{{!item.available || isSwitchingEnvironment}}"
bindtap="onSelectEnvironment">
{{item.environment}}
<text wx:if="{{!item.available}}">(未配置)</text>
</button>
</view>
<text class="debug-page__environment-note"
>切换后自动返回首页;下次打开开发版继续使用所选环境。</text
>
</view>
<view class="debug-page__section">