适应定义的改变
This commit is contained in:
parent
477a274141
commit
fac497c999
|
|
@ -180,7 +180,7 @@ function setupMobile(mobile, env, context) {
|
|||
systemId: systemId,
|
||||
}
|
||||
}
|
||||
}, context, { notCollect: true })];
|
||||
}, context, { dontCollect: true })];
|
||||
case 3:
|
||||
result2 = (_h.sent()).result;
|
||||
if (!(result2.length > 0)) return [3 /*break*/, 11];
|
||||
|
|
@ -324,7 +324,7 @@ function loginByMobile(params, context) {
|
|||
}],
|
||||
indexFrom: 0,
|
||||
count: 1,
|
||||
}, context, { notCollect: true })];
|
||||
}, context, { dontCollect: true })];
|
||||
case 2:
|
||||
result = (_e.sent()).result;
|
||||
if (!(result.length > 0)) return [3 /*break*/, 4];
|
||||
|
|
@ -483,10 +483,10 @@ function loginWechat(_a, context) {
|
|||
entity: 'wechatUser',
|
||||
entityId: wechatUser2.id,
|
||||
},
|
||||
hint: {
|
||||
ignoreTrigger: true,
|
||||
},
|
||||
}, context)];
|
||||
}, context, {
|
||||
dummy: 1,
|
||||
ignoreTrigger: true,
|
||||
})];
|
||||
case 5:
|
||||
_e = __read.apply(void 0, [(_r.sent()).result, 1]), token = _e[0];
|
||||
if (!(token && (0, lodash_1.isEqual)(token.env, env))) return [3 /*break*/, 7];
|
||||
|
|
@ -738,10 +738,7 @@ function loginWechatMp(_a, context) {
|
|||
entity: 'wechatUser',
|
||||
entityId: wechatUser2.id,
|
||||
},
|
||||
hint: {
|
||||
ignoreTrigger: true,
|
||||
},
|
||||
}, context)];
|
||||
}, context, { dummy: 1, ignoreTrigger: true })];
|
||||
case 5:
|
||||
_e = __read.apply(void 0, [(_r.sent()).result, 1]), token = _e[0];
|
||||
if (!(token && (0, lodash_1.isEqual)(token.env, env))) return [3 /*break*/, 7];
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@ var Application = /** @class */ (function (_super) {
|
|||
}
|
||||
Application.prototype.getApplicationFromCache = function (callback) {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var result;
|
||||
var data;
|
||||
return __generator(this, function (_a) {
|
||||
switch (_a.label) {
|
||||
case 0: return [4 /*yield*/, this.cache.refresh('application', {
|
||||
|
|
@ -98,9 +98,9 @@ var Application = /** @class */ (function (_super) {
|
|||
}
|
||||
})];
|
||||
case 1:
|
||||
result = (_a.sent()).result;
|
||||
(0, assert_1.assert)(result.length === 1);
|
||||
this.application = result[0];
|
||||
data = (_a.sent()).data;
|
||||
(0, assert_1.assert)(data.length === 1);
|
||||
this.application = data[0];
|
||||
callback(this.application);
|
||||
return [2 /*return*/];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ function removeDts(path: string) {
|
|||
files.forEach(
|
||||
(file) => {
|
||||
const stat = statSync(join(path, file));
|
||||
if (stat.isDirectory() && !['types', 'typings', 'lin-ui'].includes(file)) {
|
||||
if (stat.isDirectory() && !['types', 'typings', 'miniprogram_npm'].includes(file)) {
|
||||
removeDts(join(path, file));
|
||||
}
|
||||
else if (file.endsWith('.d.ts') || file.endsWith('.js')) {
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ async function setupMobile<ED extends EntityDict, Cxt extends GeneralRuntimeCont
|
|||
systemId,
|
||||
}
|
||||
}
|
||||
}, context, { notCollect: true });
|
||||
}, context, { dontCollect: true });
|
||||
if (result2.length > 0) {
|
||||
// 此手机号已经存在
|
||||
assert(result2.length === 1);
|
||||
|
|
@ -255,7 +255,7 @@ export async function loginByMobile<ED extends EntityDict, Cxt extends GeneralRu
|
|||
}],
|
||||
indexFrom: 0,
|
||||
count: 1,
|
||||
}, context, { notCollect: true });
|
||||
}, context, { dontCollect: true });
|
||||
if (result.length > 0) {
|
||||
const [captchaRow] = result;
|
||||
if (captchaRow.expired) {
|
||||
|
|
@ -402,10 +402,10 @@ export async function loginWechat<ED extends EntityDict, Cxt extends GeneralRunt
|
|||
entity: 'wechatUser',
|
||||
entityId: wechatUser2.id,
|
||||
},
|
||||
hint: {
|
||||
ignoreTrigger: true,
|
||||
},
|
||||
}, context);
|
||||
}, context, {
|
||||
dummy: 1,
|
||||
ignoreTrigger: true,
|
||||
});
|
||||
if (token && isEqual(token.env, env)) {
|
||||
await rowStore.operate('token', {
|
||||
action: 'update',
|
||||
|
|
@ -640,10 +640,7 @@ export async function loginWechatMp<ED extends EntityDict, Cxt extends GeneralRu
|
|||
entity: 'wechatUser',
|
||||
entityId: wechatUser2.id,
|
||||
},
|
||||
hint: {
|
||||
ignoreTrigger: true,
|
||||
},
|
||||
}, context);
|
||||
}, context, { dummy: 1, ignoreTrigger: true });
|
||||
if (token && isEqual(token.env, env)) {
|
||||
await rowStore.operate('token', {
|
||||
action: 'update',
|
||||
|
|
|
|||
|
|
@ -65,14 +65,14 @@ export class Application<ED extends EntityDict, Cxt extends GeneralRuntimeContex
|
|||
}
|
||||
|
||||
private async getApplicationFromCache(callback: (application: SelectRowShape<ED['application']['Schema'], typeof projection>) => void) {
|
||||
const { result } = await this.cache.refresh('application', {
|
||||
const { data } = await this.cache.refresh('application', {
|
||||
data: projection,
|
||||
filter: {
|
||||
id: this.applicationId,
|
||||
}
|
||||
});
|
||||
assert(result.length === 1);
|
||||
this.application = result[0] as any;
|
||||
assert(data.length === 1);
|
||||
this.application = data[0] as any;
|
||||
callback(this.application!);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ const triggers: Trigger<EntityDict, 'user', GeneralRuntimeContext<EntityDict>>[]
|
|||
await context.rowStore.operate('token', {
|
||||
action: 'update',
|
||||
data: {
|
||||
userId: filter!.id,
|
||||
userId: filter!.id as string,
|
||||
},
|
||||
filter: {
|
||||
id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue