import { defineLoginApi, type LoginResult } from '@byted-doubao-apps/framework'; import { postLoginResult } from '@byted-doubao-apps/framework/api'; export default defineLoginApi({ onLogin: async (res: LoginResult) => { await postLoginResult({ result: true, code: '123456' }); }, onRefuseLogin: async () => { await postLoginResult({ result: false }); // await close({}); } });