<view class="page safe-bottom">
  <view class="nav-container">
    <view class="status-bar" style="height: {{statusBarHeight}}px;"></view>
    <view class="nav-bar" style="height: {{navBarHeight}}px;">
      <view class="nav-back" bindtap="onBack">
        <image src="/images/icon-back.png" class="back-icon" mode="aspectFit"></image>
      </view>
      <view class="nav-title">设置</view>
    </view>
  </view>

  <view class="wrap" style="padding-top: {{totalNavHeight + 20}}px">
    <view class="card">
      <view class="field">
        <text class="label">接口地址</text>
        <input class="input" placeholder="例如：https://ai-c.maimanji.com" value="{{baseUrl}}" bindinput="onBaseUrl" />
        <view class="presets">
          <button class="btn-reset preset" bindtap="setOnline">线上</button>
          <button class="btn-reset preset" bindtap="setLocalhost">本地（localhost:3000）</button>
        </view>
        <text class="hint">用于切换测试/正式环境</text>
      </view>
      <button class="btn-reset save" bindtap="save">保存</button>
    </view>

    <view class="card">
      <button class="btn-reset logout" bindtap="logout">退出登录</button>
      <button class="btn-reset login" bindtap="syncProfile">同步昵称头像</button>
    </view>
  </view>
</view>
