feat: 添加组件配置文件并优化页面结构

- 新增 components.d.json 文件,包含所有组件的属性配置
- 添加 card-item-plugin 组件及其相关文件(json、ts、wxml、wxss)
- 在 app.json 中添加新的生产流程管理页面路径
- 添加多个SVG图标文件用于菜单项
- 重构 popup-plugin 组件样式和关闭逻辑
- 更新 tab-bar-plugin 的激活状态逻辑
- 优化 search-popup 使用全局样式类
- 在首页添加菜单配置和页面跳转功能
- 调整组件样式细节和间距
This commit is contained in:
zhengw
2026-01-14 16:54:47 +08:00
parent 0d58fc80f4
commit b1ecd88641
58 changed files with 971 additions and 386 deletions

View File

@@ -18,58 +18,13 @@ const playVoice = (src: string, text: string) => {
};
export const voiceRequest = (text: string, cacheVoice?: boolean) => {
// if (cacheVoice) {
// const data = wx.getStorageSync(text);
// console.log(data);
// if (data) {
// console.log("有 base64");
// const fs = wx.getFileSystemManager();
// //随机定义路径名称
// var times = new Date().getTime();
// var codeimg = wx.env.USER_DATA_PATH + "/" + times + ".mp3";
// //将base64图片写入
// fs.writeFile({
// filePath: codeimg,
// data: data,
// encoding: "base64",
// success: (res) => {
// console.log(res);
// playVoice(codeimg, text);
// },
// fail: (res) => {
// console.log(res);
// },
// });
// return;
// }
// }
post(
"/Tools/voice",
{
txt: text,
per: 3,
spd: 5,
pit: 5,
vol: 9,
},
{ txt: text, per: 3, spd: 5, pit: 5, vol: 9 },
{ showLoading: false }
).then((res: any) => {
if (res.err_code == 0) {
playVoice(urlAddBaseUrl(res.data), text);
// if (cacheVoice) {
// wx.request({
// url: urlAddBaseUrl(res.data),
// responseType: "arraybuffer",
// success(res) {
// const base64 = base64js.fromByteArray(new Uint8Array(res.data));
// try {
// wx.setStorageSync(text, base64);
// } catch (_) {
// console.log("缓存错误");
// }
// },
// });
// }
}
});
};