login中的一些问题
This commit is contained in:
parent
d895f05b15
commit
2ec21ba4ad
|
|
@ -89,7 +89,9 @@ export async function loginWechatMp<ED extends EntityDict, Cxt extends GeneralRu
|
|||
entity: 'wechatUser',
|
||||
entityId: wechatUser2.id,
|
||||
},
|
||||
}, context);
|
||||
}, context, {
|
||||
omitTrigger: true,
|
||||
});
|
||||
if (token && isEqual(token.env, env)) {
|
||||
await rowStore.operate('token', {
|
||||
action: 'update',
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ export class Token<ED extends EntityDict, Cxt extends GeneralRuntimeContext<ED>,
|
|||
}
|
||||
|
||||
@Action
|
||||
async loginWechatMp(scene: string) {
|
||||
async loginWechatMp() {
|
||||
await this.rwLock.acquire('X');
|
||||
try {
|
||||
const { code } = await wx.login();
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ OakPage({
|
|||
async onLoginClicked(options: WechatMiniprogram.Touch) {
|
||||
const { code } = await wx.login();
|
||||
const env = await wx.getSystemInfo();
|
||||
await this.features.token.loginWechatMp('token:login');
|
||||
await this.features.token.loginWechatMp();
|
||||
},
|
||||
|
||||
onReturnClicked() {
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ OakPage(
|
|||
refreshing: true,
|
||||
});
|
||||
try {
|
||||
await this.features.token.loginWechatMp('token:me');
|
||||
await this.features.token.loginWechatMp();
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue