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 行删除
+1 -24
查看文件
@@ -1,6 +1,5 @@
var ble = require('../../services/ble')
var http = require('../../utils/request')
var config = require('../../config/env')
var app = getApp()
var SCAN_TIMEOUT = 15000
@@ -11,7 +10,6 @@ Page({
bindToken: '',
state: 'scanning',
error: '',
devMode: false
},
onBack: function () {
@@ -26,8 +24,7 @@ Page({
this.setData({ statusBarHeight: app.globalData.statusBarHeight })
this.setData({
deviceId: options.device_id || '',
bindToken: options.bind_token || '',
devMode: config.__DEV__ || false
bindToken: options.bind_token || ''
})
this.startBleConnect()
},
@@ -110,24 +107,4 @@ Page({
}, 1000)
},
onMockConnect: function () {
var self = this
clearTimeout(this._scanTimer)
ble.stopScan()
self.setData({ state: 'binding' })
http.post('/api/v1/device/mock-bind', {
device_id: self.data.deviceId
}).then(function () {
self.setData({ state: 'done' })
wx.redirectTo({
url: '/pages/bind-success/bind-success?device_id=' + self.data.deviceId
})
}).catch(function (err) {
self.setData({ state: 'error', error: err.message || '模拟绑定失败' })
})
},
onMockBindSuccess: function () {
this.onMockConnect()
}
})