15 lines
396 B
TypeScript
15 lines
396 B
TypeScript
import { useContextKey } from '@kevisual/context';
|
|
import { App } from '@kevisual/router';
|
|
|
|
export const loginByTicket = async (msgInfo: { openid: string, ticket: string }) => {
|
|
const app: App = useContextKey('app');
|
|
const res = await app.call({
|
|
path: 'wx',
|
|
key: 'login-by-ticket',
|
|
payload: {
|
|
ticket: msgInfo.ticket,
|
|
openid: msgInfo.openid,
|
|
},
|
|
})
|
|
return res;
|
|
} |