feat: production readiness — feature gaps + config hardening
Miniprogram: - Add BLE reconnect button on home page when disconnected - Add loading states to index, profile, subscribe-plans pages - Add profile editing (avatar + nickname) with COS upload - Enable pull-to-refresh on history page - Fix auto-scan self.options → self.data inconsistency - Add console.error to silent catch blocks - Gate 'Simple Peripheral' BLE scan behind __DEV__ flag - Add production config comment to env.js Admin console: - Add empty state '暂无数据' to all 5 list views - Replace plain text plan input with select dropdown - Add type="date" to record date filters - Add production config comment Server: - CORS origin restricted in production (env CORS_ORIGIN) - DB pool size configurable via DB_POOL_SIZE env var - .env.example updated with WeChat Pay + production fields
这个提交包含在:
@@ -1,3 +1,4 @@
|
||||
// Production: change to 'prod'
|
||||
const ENV = 'test'
|
||||
|
||||
const API_BASES = {
|
||||
|
||||
@@ -211,3 +211,10 @@
|
||||
box-sizing: border-box;
|
||||
resize: vertical;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 40px 0;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@
|
||||
</template>
|
||||
</DataTable>
|
||||
|
||||
<view class="empty-state" v-if="records.length === 0">暂无数据</view>
|
||||
|
||||
<ConfirmModal
|
||||
:visible="showBatchImport"
|
||||
title="批量导入设备"
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty-state" v-if="logs.length === 0">暂无数据</view>
|
||||
|
||||
<view class="pagination">
|
||||
<button class="btn-page" :disabled="page <= 1" @click="onPage(page - 1)">‹</button>
|
||||
<button class="btn-page active">{{ page }}</button>
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
<text class="filter-tag-text">用户: {{ filterUserId }}</text>
|
||||
<text class="filter-tag-close" @click="clearUserFilter">x</text>
|
||||
</view>
|
||||
<input class="search-input date-input" v-model="dateFrom" placeholder="开始日期" />
|
||||
<input type="date" class="search-input date-input" v-model="dateFrom" placeholder="开始日期" />
|
||||
<text class="date-sep">~</text>
|
||||
<input class="search-input date-input" v-model="dateTo" placeholder="结束日期" />
|
||||
<input type="date" class="search-input date-input" v-model="dateTo" placeholder="结束日期" />
|
||||
<input
|
||||
class="search-input"
|
||||
v-model="keyword"
|
||||
@@ -55,6 +55,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty-state" v-if="records.length === 0">暂无数据</view>
|
||||
|
||||
<view class="pagination">
|
||||
<button class="btn-page" :disabled="page <= 1" @click="onPage(page - 1)">‹</button>
|
||||
<button class="btn-page active">{{ page }}</button>
|
||||
|
||||
@@ -65,6 +65,8 @@
|
||||
</template>
|
||||
</DataTable>
|
||||
|
||||
<view class="empty-state" v-if="records.length === 0">暂无数据</view>
|
||||
|
||||
<ConfirmModal
|
||||
:visible="showCreate"
|
||||
title="创建订阅"
|
||||
@@ -79,7 +81,10 @@
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<text class="form-label">方案</text>
|
||||
<input class="form-input" v-model="createForm.plan" placeholder="monthly/quarterly/yearly" />
|
||||
<select v-model="createForm.plan" class="form-input">
|
||||
<option value="monthly">月卡 (30天)</option>
|
||||
<option value="yearly">年卡 (365天)</option>
|
||||
</select>
|
||||
</view>
|
||||
<view class="form-group">
|
||||
<text class="form-label">天数</text>
|
||||
|
||||
@@ -54,6 +54,8 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="empty-state" v-if="users.length === 0">暂无数据</view>
|
||||
|
||||
<view class="pagination">
|
||||
<button class="btn-page" :disabled="page <= 1" @click="onPage(page - 1)">‹</button>
|
||||
<button class="btn-page active">{{ page }}</button>
|
||||
|
||||
在新工单中引用
屏蔽一个用户