feat: require couple binding and refine miniapp settings

Gate record features and storage entry points with invitation guidance; enforce record access in the backend. Add homepage greetings, right-swipe profile dismissal, and move the smoking switch to settings. Simplify API base configuration and remove the unused legacy tab bar component.
This commit is contained in:
2026-11-04 21:27:03 +08:00
parent 41bcb793da
commit b854d2873e
67 changed files with 430 additions and 227 deletions
+4 -4
View File
@@ -2,14 +2,14 @@ const test = require('node:test');
const assert = require('node:assert/strict');
const path = require('node:path');
const loader = require('./load-module.cjs');
test('development requests and file previews use local backend, trial and release use production', () => {
test('requests and file previews use the manually configured API base in every runtime', () => {
for (const version of ['develop','trial','release']) {
const wx = {getAccountInfoSync:()=>({miniProgram:{envVersion:version}})};
const load = loader({wx,console});
const env = load(path.join(__dirname,'../config/env.js'));
const configured = load(path.join(__dirname,'../config/env.js'));
const {API_BASE,getImageUrl} = load(path.join(__dirname,'../utils/request.js'));
assert.equal(env.env, version === 'develop' ? 'dev' : version);
assert.equal(API_BASE, version === 'develop' ? 'http://127.0.0.1:8080/api' : 'https://we.sundynix.cn/api');
assert.deepEqual(Object.keys(configured),['API_BASE']);
assert.equal(API_BASE,require('../config/env').API_BASE);
assert.equal(getImageUrl('/api/files/6083e119-6b26-441b-8b70-44d224366238'),API_BASE+'/files/6083e119-6b26-441b-8b70-44d224366238');
}
});