Compare commits

..

No commits in common. "d55730f317a083a6b6bd06367feb8f46a050a65c" and "85e2a440c6b489d067bd82c72072a114f2b24416" have entirely different histories.

2 changed files with 6 additions and 2 deletions

View File

@ -6,7 +6,7 @@ module.exports = {
framework: 'react',
ts: true,
compiler: 'vite',
useBuiltIns: false
useBuiltIns: process.env.TARO_ENV === 'h5' ? 'usage' : false
}]
]
}

View File

@ -636,7 +636,11 @@ export class SdkServer {
*/
async getUserExecutions(userId?: string): Promise<UserExecution[]> {
try {
const response = await this.request<{ executions: UserExecution[]; total: number }>(`/templates/executions/user`);
const uid = userId || Taro.getStorageSync(TOKEN_UID_KEY);
if (!uid) {
throw new Error('用户ID不存在');
}
const response = await this.request<{ executions: UserExecution[]; total: number }>(`/templates/executions/user/${uid}`);
return response.data.executions || [];
} catch (error) {
throw error;