feat: fetch subscription prices from server settings

- Add GET /api/v1/subscription/plans public endpoint (no auth needed)
  that reads prices from system_settings table
- Subscribe-plans page now loads prices from server on show
- Falls back to hardcoded defaults if API fails
- Add api.getPlans() to miniprogram API module
这个提交包含在:
Guoguo
2026-04-29 08:07:47 -07:00
父节点 71e4a487a5
当前提交 e8f076c914
修改 3 个文件,包含 47 行新增4 行删除
+1
查看文件
@@ -17,6 +17,7 @@ module.exports = {
unbindDevice: function (deviceId) { return http.post('/api/v1/device/unbind', deviceId ? { device_id: deviceId } : {}) },
// Subscription
getPlans: function () { return http.get('/api/v1/subscription/plans') },
getSubscription: function () { return http.get('/api/v1/subscription') },
activateTrial: function () { return http.post('/api/v1/subscription/trial') },
purchase: function (plan) { return http.post('/api/v1/subscription/purchase', { plan: plan }) },