feat:生产初版页面

This commit is contained in:
R524809
2026-03-26 17:33:04 +08:00
parent 3aaf340781
commit dc5e057cb3
63 changed files with 2940 additions and 543 deletions
+4 -52
View File
@@ -1,54 +1,6 @@
/**
* 调用云函数
* @param funcName
* @param options
* @param typeName
* @returns
* 桥接文件 - 保持向后兼容
* 实际实现已迁移到 platform/cloud-adapter.ts
*/
export default async function callCloud(
action: string,
options?: Record<string, any>,
// actionName?: string,
) {
try {
// const name = funcName
// const action = actionName || (options && options.action) || '';
// if (funcName.indexOf('.') > -1) {
// const nameArr = funcName.split('.') || [];
// name = nameArr[0];
// action = nameArr[1];
// }
const name = 'robotaxi';
const { errMsg, result } = await wx.cloud.callFunction({
name,
data: {
action,
...options,
},
});
if (!/ok/.test(errMsg)) {
wx.showToast({
title: '服务器错误',
icon: 'none',
duration: 2000,
});
return {
code: '500',
info: '服务器繁忙',
message: errMsg,
};
} else {
// const { code, info, data } = result;
// if (code === '401') {
// wx.showToast({
// title: info,
// duration: 2000,
// });
// }
return result;
}
} catch (e: any) {
return { code: '500', info: e.message || '服务器繁忙' };
}
}
import { callCloud } from '../platform/cloud-adapter';
export default callCloud;