feat: 搭建微信小程序展示端

- 初始化小程序工程配置与类型声明

- 增加首页、律所、律师列表、详情与历史页面

- 补充公共组件、运行时配置与示例素材
This commit is contained in:
2026-03-20 12:44:31 +08:00
parent 86c321e832
commit 9605384edc
87 changed files with 26373 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
import type { MiniProgramEnvVersion } from '../config/runtime';
const APPID_OVERRIDE_KEY = 'miniapp_appid_override';
export function getMiniappAppId(): string {
const override = wx.getStorageSync(APPID_OVERRIDE_KEY);
if (typeof override === 'string' && override.trim()) {
return override.trim();
}
try {
const accountInfo = wx.getAccountInfoSync();
return accountInfo.miniProgram.appId || '';
} catch {
return '';
}
}
export function getMiniappEnvVersion(): MiniProgramEnvVersion {
try {
const envVersion = wx.getAccountInfoSync().miniProgram.envVersion;
if (envVersion === 'trial' || envVersion === 'release') {
return envVersion;
}
return 'develop';
} catch {
return 'develop';
}
}