chore: remove all mock/debug code for production release

Miniprogram:
- ENV switched to 'prod' (disables __DEV__ flag)
- Deleted mock.js and test-ble-frame.js
- Removed mockBind/mockPurchase from api.js
- Removed all debug UI panels and onMock* handlers from 6 pages
- Removed mock purchase fallback in subscribe-plans
- Removed SIMPLE PERIPHERAL dev board from BLE scan

Server:
- Removed /device/mock-bind route
- Removed /subscription/mock-purchase route
- Removed dev_openid fallback in wechat.js
- Removed mockBind() from binding.dao.js
- Removed mock fallback in purchase endpoint
- NODE_ENV default changed to 'production'

Admin:
- ENV switched to 'prod'

All mock code preserved in 'test' branch for future development use.
这个提交包含在:
Guoguo
2026-05-20 07:19:26 -07:00
父节点 0b82d9dbcf
当前提交 f0fdb285b5
修改 24 个文件,包含 16 行新增428 行删除
-26
查看文件
@@ -1,6 +1,5 @@
var ble = require('../../services/ble')
var api = require('../../utils/api')
var config = require('../../config/env')
var app = getApp()
Page({
@@ -14,14 +13,9 @@ Page({
bleState: 'disconnected',
hasDevice: false,
deviceInfo: null,
devMode: false,
loading: true
},
onLoad: function () {
this.setData({ devMode: config.__DEV__ || false })
},
onShow: function () {
this.checkState()
this._onStatus = this.onBleStatus.bind(this)
@@ -173,26 +167,6 @@ Page({
wx.navigateTo({ url: '/pages/wear-check/wear-check' })
},
onMockBind: function () {
var self = this
wx.showModal({
title: '模拟绑定',
editable: true,
placeholderText: '输入设备编号(需先在后台创建)',
success: function (res) {
if (res.confirm && res.content) {
var deviceId = res.content.trim()
api.mockBind(deviceId).then(function () {
wx.showToast({ title: '模拟绑定成功', icon: 'success' })
self.checkState()
}).catch(function (err) {
wx.showToast({ title: err.message || '绑定失败', icon: 'none' })
})
}
}
})
},
onViewSubscription: function () {
wx.navigateTo({ url: '/pages/subscribe-plans/subscribe-plans' })
}