auth/mobile

This commit is contained in:
Xu Chang 2023-01-30 10:55:07 +08:00
parent 2cfdb708f5
commit 7ef242ec49
109 changed files with 359 additions and 386 deletions

View File

@ -96,10 +96,10 @@ function tryMakeChangeLoginWay(userId, context) {
function setupMobile(mobile, env, context) {
var _a;
return tslib_1.__awaiter(this, void 0, void 0, function () {
var currentToken, applicationId, systemId, result2, _b, mobileRow, userId, tokenData, user, userState, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, mobileData, _o, _p, _q, userData, _r, _s, _t, tokenData, _u, _v, _w;
var _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10;
return tslib_1.__generator(this, function (_11) {
switch (_11.label) {
var currentToken, applicationId, systemId, result2, _b, mobileRow, userId, tokenData, user, userState, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, mobileData, _o, _p, _q, userData, _r, _s, _t, mobileData, tokenData, _u, _v, _w, _x, _y, _z;
var _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
return tslib_1.__generator(this, function (_14) {
switch (_14.label) {
case 0:
currentToken = context.getToken(true);
applicationId = context.getApplicationId();
@ -134,7 +134,7 @@ function setupMobile(mobile, env, context) {
}
}, { dontCollect: true })];
case 1:
result2 = _11.sent();
result2 = _14.sent();
if (!(result2.length > 0)) return [3 /*break*/, 19];
// 此手机号已经存在
(0, assert_1.assert)(result2.length === 1);
@ -145,19 +145,19 @@ function setupMobile(mobile, env, context) {
case 2:
userId = mobileRow.userId;
return [4 /*yield*/, makeDistinguishException(userId, context)];
case 3: throw _11.sent();
case 3: throw _14.sent();
case 4: return [3 /*break*/, 18];
case 5:
_x = {};
_0 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 6:
tokenData = (_x.id = _11.sent(),
_x.applicationId = applicationId,
_x.playerId = mobileRow.userId,
_x.env = env,
_x.entity = 'mobile',
_x.entityId = mobileRow.id,
_x);
tokenData = (_0.id = _14.sent(),
_0.applicationId = applicationId,
_0.playerId = mobileRow.userId,
_0.env = env,
_0.entity = 'mobile',
_0.entityId = mobileRow.id,
_0);
user = mobileRow.user;
userState = user.userState;
_c = userState;
@ -170,21 +170,21 @@ function setupMobile(mobile, env, context) {
{
throw new Exception_1.OakUserDisabledException();
}
_11.label = 8;
_14.label = 8;
case 8:
_e = (_d = Object).assign;
_f = [tokenData];
_y = {
_1 = {
userId: mobileRow.userId
};
_z = {};
_2 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 9:
_e.apply(_d, _f.concat([(_y.user = (_z.id = _11.sent(),
_z.action = 'activate',
_z.data = {},
_z),
_y)]));
_e.apply(_d, _f.concat([(_1.user = (_2.id = _14.sent(),
_2.action = 'activate',
_2.data = {},
_2),
_1)]));
return [3 /*break*/, 11];
case 10:
{
@ -193,112 +193,121 @@ function setupMobile(mobile, env, context) {
userId: mobileRow.userId,
});
}
_11.label = 11;
_14.label = 11;
case 11:
_h = (_g = context).operate;
_j = ['token'];
_0 = {};
_3 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 12: return [4 /*yield*/, _h.apply(_g, _j.concat([(_0.id = _11.sent(),
_0.data = tokenData,
_0.action = 'create',
_0), {
case 12: return [4 /*yield*/, _h.apply(_g, _j.concat([(_3.id = _14.sent(),
_3.data = tokenData,
_3.action = 'create',
_3), {
dontCollect: true,
}]))];
case 13:
_11.sent();
_14.sent();
if (!(((_a = user === null || user === void 0 ? void 0 : user.userSystem$user) === null || _a === void 0 ? void 0 : _a.length) == 0)) return [3 /*break*/, 17];
_l = (_k = context).operate;
_m = ['userSystem'];
_1 = {};
_4 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 14:
_1.id = _11.sent(),
_1.action = 'create';
_2 = {};
_4.id = _14.sent(),
_4.action = 'create';
_5 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 15: return [4 /*yield*/, _l.apply(_k, _m.concat([(_1.data = (_2.id = _11.sent(),
_2.userId = user.id,
_2.systemId = systemId,
_2),
_1), {
case 15: return [4 /*yield*/, _l.apply(_k, _m.concat([(_4.data = (_5.id = _14.sent(),
_5.userId = user.id,
_5.systemId = systemId,
_5),
_4), {
dontCollect: true,
}]))];
case 16:
_11.sent();
_11.label = 17;
_14.sent();
_14.label = 17;
case 17: return [2 /*return*/, tokenData.id];
case 18: return [3 /*break*/, 32];
case 18: return [3 /*break*/, 34];
case 19:
if (!currentToken) return [3 /*break*/, 23];
_3 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 20:
mobileData = (_3.id = _11.sent(),
_3.mobile = mobile,
_3.userId = currentToken.userId,
_3);
_p = (_o = context).operate;
_q = ['mobile'];
_4 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 21: return [4 /*yield*/, _p.apply(_o, _q.concat([(_4.id = _11.sent(),
_4.action = 'create',
_4.data = mobileData,
_4), {}]))];
case 22:
_11.sent();
return [2 /*return*/, currentToken.id];
case 23:
_5 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 24:
userData = (_5.id = _11.sent(),
_5.userState = 'normal',
_5);
_s = (_r = context).operate;
_t = ['user'];
_6 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 25: return [4 /*yield*/, _s.apply(_r, _t.concat([(_6.id = _11.sent(),
_6.action = 'create',
_6.data = userData,
_6), {}]))];
case 26:
_11.sent();
case 20:
mobileData = (_6.id = _14.sent(),
_6.mobile = mobile,
_6.userId = currentToken.userId,
_6);
_p = (_o = context).operate;
_q = ['mobile'];
_7 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 27:
_7.id = _11.sent(),
_7.userId = userData.id,
_7.playerId = userData.id,
_7.env = env;
case 21: return [4 /*yield*/, _p.apply(_o, _q.concat([(_7.id = _14.sent(),
_7.action = 'create',
_7.data = mobileData,
_7), {}]))];
case 22:
_14.sent();
return [2 /*return*/, currentToken.id];
case 23:
_8 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 28:
_8.id = _11.sent(),
_8.action = 'create';
case 24:
userData = (_8.id = _14.sent(),
_8.userState = 'normal',
_8);
_s = (_r = context).operate;
_t = ['user'];
_9 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 29:
tokenData = (_7.mobile = (_8.data = (_9.id = _11.sent(),
_9.mobile = mobile,
_9.userId = userData.id,
_9),
_8),
_7);
_v = (_u = context).operate;
_w = ['token'];
case 25: return [4 /*yield*/, _s.apply(_r, _t.concat([(_9.id = _14.sent(),
_9.action = 'create',
_9.data = userData,
_9), {}]))];
case 26:
_14.sent();
_10 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 30: return [4 /*yield*/, _v.apply(_u, _w.concat([(_10.id = _11.sent(),
_10.action = 'create',
_10.data = tokenData,
_10), {}]))];
case 27:
mobileData = (_10.id = _14.sent(),
_10.mobile = mobile,
_10.userId = userData.id,
_10);
_11 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 28:
tokenData = (_11.id = _14.sent(),
_11.userId = userData.id,
_11.playerId = userData.id,
_11.env = env,
_11.entity = 'mobile',
_11.entityId = mobileData.id,
_11);
_v = (_u = context).operate;
_w = ['token'];
_12 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 29: return [4 /*yield*/, _v.apply(_u, _w.concat([(_12.id = _14.sent(),
_12.action = 'create',
_12.data = tokenData,
_12), { dontCollect: true }]))];
case 30:
_14.sent();
return [4 /*yield*/, context.setTokenValue(tokenData.id)];
case 31:
_11.sent();
_14.sent();
_y = (_x = context).operate;
_z = ['mobile'];
_13 = {};
return [4 /*yield*/, (0, uuid_1.generateNewIdAsync)()];
case 32: return [4 /*yield*/, _y.apply(_x, _z.concat([(_13.id = _14.sent(),
_13.action = 'create',
_13.data = mobileData,
_13), { dontCollect: true }]))];
case 33:
_14.sent();
return [2 /*return*/, tokenData.id];
case 32: return [2 /*return*/];
case 34: return [2 /*return*/];
}
});
});

4
lib/auth/index.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
import { AuthDefDict } from 'oak-domain/lib/types/Auth';
import { EntityDict } from '../general-app-domain';
declare const _default: AuthDefDict<EntityDict>;
export default _default;

8
lib/auth/index.js Normal file
View File

@ -0,0 +1,8 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var mobile_1 = tslib_1.__importDefault(require("./mobile"));
// import park from './park';
exports.default = {
mobile: mobile_1.default,
};

4
lib/auth/mobile.d.ts vendored Normal file
View File

@ -0,0 +1,4 @@
import { AuthDef } from 'oak-domain/lib/types/Auth';
import { EntityDict } from '../general-app-domain';
declare const authDef: AuthDef<EntityDict, 'mobile'>;
export default authDef;

11
lib/auth/mobile.js Normal file
View File

@ -0,0 +1,11 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var userAuth = {
cascadePath: '',
};
var authDef = {
actionAuth: {
create: [userAuth],
}
};
exports.default = authDef;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { AppType, WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../general-app-domain/Application/Schema';
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebConfig } from '../../../../general-app-domain/Application/Schema';
export default function Web(props: {
config: WebConfig;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
export default function WechatMp(props: {
config: WechatMpConfig;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatPublicConfig } from '../../../../general-app-domain/Application/Schema';
export default function WechatPublic(props: {
isService?: boolean;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Style as StyleType } from '../../../types/Style';
declare type StyleProps = {
value?: StyleType | null;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Account(props: {
account: Required<Config>['Account'];

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
cos: Required<Config>['Cos'];

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
live: Required<Config>['Live'];

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
map: Required<Config>['Map'];

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Sms(props: {
sms: Required<Config>['Sms'];

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../types/Config';
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { ButtonProps, SpaceProps } from 'antd';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../general-app-domain';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { UploadFile } from 'antd';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { UploadFile } from 'antd';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from "oak-frontend-base";
import { EntityDict } from "../../../general-app-domain";
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'address', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../general-app-domain';
import './web.less';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {}, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { MessageProps } from 'oak-frontend-base/lib/types/Message';
export default function render(props: {
data: {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
import { AvatarSize } from 'antd/es/avatar/SizeContext';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'token', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'token', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {

View File

@ -11,6 +11,7 @@ export declare class BackendRuntimeContext<ED extends EntityDict> extends AsyncC
protected amIRoot?: boolean;
protected amIReallyRoot?: boolean;
protected rootMode?: boolean;
setTokenValue(tokenValue: string): Promise<void>;
protected initialize(data?: SerializedData): Promise<void>;
getApplicationId(): ED["application"]["Schema"]["id"] | undefined;
getSystemId(): ED["application"]["Schema"]["systemId"] | undefined;

View File

@ -15,9 +15,81 @@ var BackendRuntimeContext = /** @class */ (function (_super) {
function BackendRuntimeContext() {
return _super !== null && _super.apply(this, arguments) || this;
}
BackendRuntimeContext.prototype.setTokenValue = function (tokenValue) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var result, token, user, player, userRole$user, userRole$player;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.select('token', {
data: {
id: 1,
userId: 1,
playerId: 1,
player: {
id: 1,
userState: 1,
userRole$user: {
$entity: 'userRole',
data: {
id: 1,
userId: 1,
roleId: 1,
role: {
id: 1,
name: 1,
}
},
},
},
ableState: 1,
user: {
id: 1,
userState: 1,
userRole$user: {
$entity: 'userRole',
data: {
id: 1,
userId: 1,
roleId: 1,
role: {
id: 1,
name: 1,
}
},
},
},
},
filter: {
id: tokenValue,
},
}, {
dontCollect: true,
blockTrigger: true,
})];
case 1:
result = _a.sent();
if (result.length === 0) {
console.log("\u6784\u5EFABackendRuntimeContext\u5BF9\u5E94tokenValue\u300C".concat(tokenValue, "\u627E\u4E0D\u5230\u76F8\u5173\u7684user"));
throw new Exception_1.OakTokenExpiredException();
}
token = result[0];
if (token.ableState === 'disabled') {
throw new Exception_1.OakTokenExpiredException();
}
user = token.user, player = token.player;
userRole$user = user.userRole$user;
this.amIRoot = userRole$user.length > 0 && userRole$user.find(function (ele) { return ele.role.name === 'root'; });
userRole$player = player.userRole$user;
this.amIReallyRoot = userRole$player.length > 0 && userRole$player.find(function (ele) { return ele.role.name === 'root'; });
this.token = token;
return [2 /*return*/];
}
});
});
};
BackendRuntimeContext.prototype.initialize = function (data) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var appId, tokenValue, result, result, token, user, player, userRole$user, userRole$player, err_1;
var appId, tokenValue, result, err_1;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
@ -67,68 +139,9 @@ var BackendRuntimeContext = /** @class */ (function (_super) {
_a.label = 4;
case 4:
if (!tokenValue) return [3 /*break*/, 6];
return [4 /*yield*/, this.select('token', {
data: {
id: 1,
userId: 1,
playerId: 1,
player: {
id: 1,
userState: 1,
userRole$user: {
$entity: 'userRole',
data: {
id: 1,
userId: 1,
roleId: 1,
role: {
id: 1,
name: 1,
}
},
},
},
ableState: 1,
user: {
id: 1,
userState: 1,
userRole$user: {
$entity: 'userRole',
data: {
id: 1,
userId: 1,
roleId: 1,
role: {
id: 1,
name: 1,
}
},
},
},
},
filter: {
id: tokenValue,
},
}, {
dontCollect: true,
blockTrigger: true,
})];
return [4 /*yield*/, this.setTokenValue(tokenValue)];
case 5:
result = _a.sent();
if (result.length === 0) {
console.log("\u6784\u5EFABackendRuntimeContext\u5BF9\u5E94tokenValue\u300C".concat(tokenValue, "\u627E\u4E0D\u5230\u76F8\u5173\u7684user"));
throw new Exception_1.OakTokenExpiredException();
}
token = result[0];
if (token.ableState === 'disabled') {
throw new Exception_1.OakTokenExpiredException();
}
user = token.user, player = token.player;
userRole$user = user.userRole$user;
this.amIRoot = userRole$user.length > 0 && userRole$user.find(function (ele) { return ele.role.name === 'root'; });
userRole$player = player.userRole$user;
this.amIReallyRoot = userRole$player.length > 0 && userRole$player.find(function (ele) { return ele.role.name === 'root'; });
this.token = token;
_a.sent();
_a.label = 6;
case 6: return [4 /*yield*/, this.commit()];
case 7:

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'address', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'address', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { AppType, WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
import { EntityDict } from '../../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebConfig, WechatPublicConfig, WechatMpConfig } from '../../../general-app-domain/Application/Schema';
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'application', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'application', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from './../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function render(props: WebComponentProps<EntityDict, 'article', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'article', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'article', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import '@wangeditor/editor/dist/css/style.css';
import { EntityDict } from './../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'system', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'domain', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'token', true, {}, {}>): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'token', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'message', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'message', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'message', true, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'mobile', true, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function Render(): JSX.Element;

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function Render(): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function render(props: WebComponentProps<EntityDict, 'area', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
import { EntityDict } from '../../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { Config } from '../../../types/Config';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'platform', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'platform', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function Render(): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatPublicConfig } from '../../../../general-app-domain/Application/Schema';
import { EntityDict } from '../../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatPublicConfig } from '../../../general-app-domain/Application/Schema';
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'subscription', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'subscription', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../../general-app-domain';
import { Config } from '../../../../types/Config';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { Config } from '../../../types/Config';
import { WebComponentProps } from 'oak-frontend-base';

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'system', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'system', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'token', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
declare type DataProps = {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function render(props: WebComponentProps<EntityDict, 'user', true, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function Render(props: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function render(props: WebComponentProps<EntityDict, 'token', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { EntityDict } from '../../../general-app-domain';
import { WebComponentProps } from 'oak-frontend-base';
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', true, {

View File

@ -150,7 +150,7 @@ exports.default = OakComponent({
},
lifetimes: {
ready: function () {
console.log('ready', this.props.relations);
//console.log('ready', this.props.relations);
}
},
methods: {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', true, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', true, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'mobile', false, {

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'userEntityGrant', false, {

View File

@ -83,7 +83,7 @@ exports.default = OakComponent({
}); });
}
else {
this.update({}, 'grant');
this.update({});
}
this.setState({
userRelationRelativePath: "user".concat((0, string_1.firstLetterUpperCase)(entity), "$user"),

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../../general-app-domain';
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {

View File

@ -17,7 +17,7 @@ function Render(props) {
var strValue = e.target.value;
update({
name: strValue,
}, 'grant');
});
}, value: name, placeholder: t('placeholder.name') }) }) })), !!oakId ? (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('user:attr.nickname'), name: "nickname", rules: [
{
required: true,
@ -30,7 +30,7 @@ function Render(props) {
var strValue = e.target.value;
update({
password: strValue,
}, 'grant');
});
}, placeholder: t('placeholder.password') }) }) })), (0, jsx_runtime_1.jsx)(antd_1.Form.Item, tslib_1.__assign({ label: t('auth'), rules: [
{
required: true,

Some files were not shown because too many files have changed in this diff Show More