应用信息

管理应用的基本信息,包括名称、描述等

🏠 前台
应用: 开路者
版本: 1.0.0
正在加载应用信息...

基本信息

    <div class="form-group">
      <label>应用代码</label>
      <input type="text" x-model="profile.code" class="form-control" readonly style="background-color: #f8f9fa;">
      <small style="color: #6c757d;">应用代码不可修改</small>
    </div>
    
    <div class="form-group">
      <label>应用名称 *</label>
      <input type="text" x-model="profile.name" class="form-control" required>
    </div>
    
    <div class="form-group">
      <label>应用描述</label>
      <textarea x-model="profile.description" class="form-control" rows="3" placeholder="应用的简短描述"></textarea>
    </div>
    
    <div class="form-group">
      <label>官方网站</label>
      <input type="url" x-model="profile.website" class="form-control" placeholder="https://example.com">
    </div>
  </div>

  <!-- 应用状态信息 -->
  <div style="margin-bottom: 2rem;">
    <h4 style="margin: 0 0 1rem 0; color: #495057; border-bottom: 2px solid #007bff; padding-bottom: 0.5rem;">状态信息</h4>
    
    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
      <div class="form-group">
        <label>应用状态</label>
        <div style="padding: 0.75rem; background-color: #f8f9fa; border-radius: 0.35rem;">
          <span x-show="profile.status === 'active'" style="color: #28a745; font-weight: bold;">✓ 正常运行</span>
          <span x-show="profile.status !== 'active'" style="color: #dc3545; font-weight: bold;">✗ 已停用</span>
        </div>
      </div>
      
      <div class="form-group">
        <label>创建时间</label>
        <div style="padding: 0.75rem; background-color: #f8f9fa; border-radius: 0.35rem;" x-text="profile.created_at ? window.$wg.helper.formatDate(profile.created_at) : '-'">
        </div>
      </div>
    </div>
    
    <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;">
      <div class="form-group">
        <label>用户总数</label>
        <div style="padding: 0.75rem; background-color: #f8f9fa; border-radius: 0.35rem;" x-text="stats.users || 0">
        </div>
      </div>
      
      <div class="form-group">
        <label>订单总数</label>
        <div style="padding: 0.75rem; background-color: #f8f9fa; border-radius: 0.35rem;" x-text="stats.orders || 0">
        </div>
      </div>
    </div>
  </div>

  <!-- API 密钥信息 -->
  <div style="margin-bottom: 2rem;">
    <h4 style="margin: 0 0 1rem 0; color: #495057; border-bottom: 2px solid #007bff; padding-bottom: 0.5rem;">API 信息</h4>
    
    <div class="form-group">
      <label>应用代码 (App Code)</label>
      <div style="display: flex; align-items: center; gap: 1rem;">
        <input type="text" :value="profile.code" class="form-control" readonly style="background-color: #f8f9fa;">
        <button type="button" @click="copyToClipboard(profile.code)" class="btn btn-sm" style="background: #f8f9fa; border: 1px solid #dee2e6;">
          📋 复制
        </button>
      </div>
    </div>
    
    <div class="form-group">
      <label>API 密钥 (App Secret)</label>
      <div style="display: flex; align-items: center; gap: 1rem;">
        <input type="password" x-model="apiSecret" class="form-control" readonly style="background-color: #f8f9fa;" placeholder="点击显示查看">
        <button type="button" @click="toggleSecretVisible()" class="btn btn-sm" style="background: #f8f9fa; border: 1px solid #dee2e6;">
          <span x-show="!secretVisible">👁️ 显示</span>
          <span x-show="secretVisible">🙈 隐藏</span>
        </button>
        <button type="button" @click="copyToClipboard(apiSecret)" class="btn btn-sm" style="background: #f8f9fa; border: 1px solid #dee2e6;">
          📋 复制
        </button>
      </div>
      <small style="color: #dc3545;">⚠️ 请妥善保管 API 密钥,不要泄露给他人</small>
    </div>
  </div>

  <!-- 保存按钮 -->
  <div style="text-align: right;">
    <button type="submit" class="btn btn-primary" :disabled="submitting">
      <span x-show="!submitting">💾 保存信息</span>
      <span x-show="submitting">保存中...</span>
    </button>
  </div>
</form>

访问受限

您需要管理员权限才能访问此页面

登录