wechatMpJump build
This commit is contained in:
parent
a22a1b4f18
commit
59697900c7
|
|
@ -19,7 +19,6 @@ export async function wechatMpJump(params, context) {
|
|||
const config2 = config;
|
||||
const { appId, appSecret } = config2;
|
||||
const wechatInstance = WechatSDK.getInstance(appId, 'wechatMp', appSecret);
|
||||
/* const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
|
||||
return result; */
|
||||
const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const checkers: (import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt>)[];
|
||||
declare const checkers: (import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt>)[];
|
||||
export default checkers;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
import { Style } from '../../../../types/Style';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, keyof import("../../../../oak-app-domain").EntityDict, false, {
|
||||
style: Style;
|
||||
entity: "application" | "system" | "platform";
|
||||
entity: "system" | "application" | "platform";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
|
|
|
|||
|
|
@ -12,19 +12,19 @@ declare const _default: <ED2 extends EntityDict & BaseEntityDict, T2 extends key
|
|||
type?: ButtonProps['type'] | AmButtonProps['type'];
|
||||
executeText?: string | undefined;
|
||||
buttonProps?: (ButtonProps & {
|
||||
color?: "default" | "success" | "warning" | "primary" | "danger" | undefined;
|
||||
color?: "primary" | "success" | "warning" | "default" | "danger" | undefined;
|
||||
fill?: "none" | "solid" | "outline" | undefined;
|
||||
size?: "small" | "middle" | "large" | "mini" | undefined;
|
||||
size?: "small" | "large" | "middle" | "mini" | undefined;
|
||||
block?: boolean | undefined;
|
||||
loading?: boolean | "auto" | undefined;
|
||||
loadingText?: string | undefined;
|
||||
loadingIcon?: import("react").ReactNode;
|
||||
disabled?: boolean | undefined;
|
||||
onClick?: ((event: import("react").MouseEvent<HTMLButtonElement, MouseEvent>) => unknown) | undefined;
|
||||
type?: "button" | "submit" | "reset" | undefined;
|
||||
type?: "button" | "reset" | "submit" | undefined;
|
||||
shape?: "default" | "rounded" | "rectangular" | undefined;
|
||||
children?: import("react").ReactNode;
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseDown" | "onMouseUp" | "onTouchStart" | "onTouchEnd"> & {
|
||||
} & Pick<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement>, "id" | "onMouseUp" | "onMouseDown" | "onTouchStart" | "onTouchEnd"> & {
|
||||
className?: string | undefined;
|
||||
style?: (import("react").CSSProperties & Partial<Record<"--text-color" | "--background-color" | "--border-radius" | "--border-width" | "--border-style" | "--border-color", string>>) | undefined;
|
||||
tabIndex?: number | undefined;
|
||||
|
|
|
|||
|
|
@ -32,21 +32,21 @@ export default function Render() {
|
|||
const features = useFeatures();
|
||||
const themeState = features.theme.get();
|
||||
const [systemTheme, setSystemTheme] = useState(themeState?.systemTheme);
|
||||
const [theme, setTheme] = useState(themeState?.theme);
|
||||
const [theme, setTheme] = useState(themeState?.themeMode);
|
||||
const [color, setColor] = useState(themeState?.color);
|
||||
const handleThemeSwitch = (value) => {
|
||||
if (value === ESettingTheme.system) {
|
||||
features.theme.openSystemTheme();
|
||||
}
|
||||
else {
|
||||
features.theme.switchTheme(value);
|
||||
features.theme.switchThemeMode(value);
|
||||
}
|
||||
};
|
||||
useEffect(() => {
|
||||
const themeUnsub = features.theme.subscribe(() => {
|
||||
const themeState = features.theme.get();
|
||||
setSystemTheme(themeState.systemTheme);
|
||||
setTheme(themeState.theme);
|
||||
setTheme(themeState.themeMode);
|
||||
setColor(themeState.color);
|
||||
});
|
||||
return () => {
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ export default class Theme<ED extends EntityDict, Cxt extends BackendRuntimeCont
|
|||
get(): IThemeState;
|
||||
set(themeState: IThemeState): void;
|
||||
toggleSetting(): void;
|
||||
switchTheme(finalTheme: ETheme): void;
|
||||
switchThemeMode(finalThemeMode: ETheme): void;
|
||||
openSystemTheme(): void;
|
||||
getColor(): string;
|
||||
switchColor(color: string): void;
|
||||
insertThemeStylesheet(theme: string, color: string, mode: 'light' | 'dark'): void;
|
||||
insertThemeStylesheet(theme: string, color: string, mode: ETheme): void;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ETheme } from '../types/Theme';
|
|||
const defaultTheme = ETheme.light;
|
||||
const initialThemeState = {
|
||||
setting: false,
|
||||
theme: defaultTheme,
|
||||
themeMode: defaultTheme,
|
||||
systemTheme: false,
|
||||
isFullPage: false,
|
||||
color: '#0052d9',
|
||||
|
|
@ -25,7 +25,7 @@ export default class Theme extends Feature {
|
|||
this.cache = cache;
|
||||
this.storage = storage;
|
||||
this.themeState = initialThemeState;
|
||||
this.switchTheme(this.themeState.theme);
|
||||
this.switchThemeMode(this.themeState.themeMode);
|
||||
this.switchColor(this.themeState.color);
|
||||
}
|
||||
get() {
|
||||
|
|
@ -41,15 +41,15 @@ export default class Theme extends Feature {
|
|||
state.setting = !state.setting;
|
||||
this.set(state);
|
||||
}
|
||||
switchTheme(finalTheme) {
|
||||
switchThemeMode(finalThemeMode) {
|
||||
const state = this.themeState;
|
||||
// 切换主题颜色
|
||||
state.theme = finalTheme;
|
||||
state.themeMode = finalThemeMode;
|
||||
// 关闭跟随系统
|
||||
state.systemTheme = false;
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||
document.documentElement.setAttribute('theme-mode', finalThemeMode);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
@ -62,13 +62,13 @@ export default class Theme extends Feature {
|
|||
const state = this.themeState;
|
||||
const media = window.matchMedia('(prefers-color-scheme:dark)');
|
||||
if (media.matches) {
|
||||
const finalTheme = media.matches ? ETheme.dark : ETheme.light;
|
||||
// 切换主题颜色
|
||||
state.theme = finalTheme;
|
||||
const finalThemeMode = media.matches ? ETheme.dark : ETheme.light;
|
||||
// 切换黑暗主题
|
||||
state.themeMode = finalThemeMode;
|
||||
state.systemTheme = true;
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||
document.documentElement.setAttribute('theme-mode', finalThemeMode);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
@ -85,12 +85,12 @@ export default class Theme extends Feature {
|
|||
switchColor(color) {
|
||||
const state = this.themeState;
|
||||
if (color) {
|
||||
state.color = color;
|
||||
const colorType = 'blue';
|
||||
state.color = color; // 某主题 主题色
|
||||
const themeColor = 'blue'; // 主题颜色类型
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
this.insertThemeStylesheet('blue', color, state.theme);
|
||||
document.documentElement.setAttribute('theme-color', colorType || '');
|
||||
this.insertThemeStylesheet(themeColor, color, state.themeMode);
|
||||
document.documentElement.setAttribute('theme-color', themeColor);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -22,15 +22,15 @@ export const desc = {
|
|||
name: 'index_relation_path',
|
||||
attributes: [
|
||||
{
|
||||
name: "relationId"
|
||||
name: "relationId",
|
||||
},
|
||||
{
|
||||
name: "pathId"
|
||||
name: "pathId",
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ const IActionDef = {
|
|||
stm: {
|
||||
send: ['unsent', 'sending'],
|
||||
success: ['sending', 'sent'],
|
||||
fail: ['sending', 'failure']
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
is: 'unsent'
|
||||
is: 'unsent',
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "send", "success", "fail"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -52,17 +52,17 @@ export const desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'code',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: '$$createAt$$',
|
||||
direction: 'DESC'
|
||||
direction: 'DESC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ export const desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'email',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -116,10 +116,10 @@ export const desc = {
|
|||
name: 'objectId_deleteAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'objectId'
|
||||
name: 'objectId',
|
||||
},
|
||||
{
|
||||
name: '$$deleteAt$$'
|
||||
name: '$$deleteAt$$',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,15 +42,15 @@ export const desc = {
|
|||
name: 'namespace_language',
|
||||
attributes: [
|
||||
{
|
||||
name: 'namespace'
|
||||
name: 'namespace',
|
||||
},
|
||||
{
|
||||
name: 'language'
|
||||
name: 'language',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@ export const actions = ["count", "stat", "download", "select", "aggregate", "cre
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure']
|
||||
}
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
};
|
||||
const VisitActionDef = {
|
||||
stm: {
|
||||
visit: ['unvisited', 'visited']
|
||||
visit: ['unvisited', 'visited'],
|
||||
},
|
||||
is: 'unvisited'
|
||||
is: 'unvisited',
|
||||
};
|
||||
export const ActionDefDict = {
|
||||
iState: IActionDef,
|
||||
|
|
|
|||
|
|
@ -25,13 +25,13 @@ export const desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
apply: ['active', 'applied'],
|
||||
abandon: ['active', 'abandoned']
|
||||
abandon: ['active', 'abandoned'],
|
||||
},
|
||||
is: 'active'
|
||||
is: 'active',
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "apply", "abandon"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ export const desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'iState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ export const actions = ["count", "stat", "download", "select", "aggregate", "cre
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure']
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
is: 'sending'
|
||||
is: 'sending',
|
||||
};
|
||||
export const ActionDefDict = {
|
||||
iState: IActionDef
|
||||
|
|
|
|||
|
|
@ -34,18 +34,18 @@ export const desc = {
|
|||
name: 'index_source_dest_path',
|
||||
attributes: [
|
||||
{
|
||||
name: 'sourceEntity'
|
||||
name: 'sourceEntity',
|
||||
},
|
||||
{
|
||||
name: 'value'
|
||||
name: 'value',
|
||||
},
|
||||
{
|
||||
name: 'destEntity'
|
||||
name: 'destEntity',
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -35,18 +35,18 @@ export const desc = {
|
|||
name: 'index_targetEntity_entityId_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -24,18 +24,18 @@ export const desc = {
|
|||
name: 'index_entity_relation_path',
|
||||
attributes: [
|
||||
{
|
||||
name: "sourceRelationId"
|
||||
name: "sourceRelationId",
|
||||
},
|
||||
{
|
||||
name: "pathId"
|
||||
name: "pathId",
|
||||
},
|
||||
{
|
||||
name: "destRelationId"
|
||||
name: "destRelationId",
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -44,20 +44,20 @@ export const desc = {
|
|||
name: 'index_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_entity',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
done: ['active', 'done']
|
||||
}
|
||||
done: ['active', 'done'],
|
||||
},
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "done"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@ const IdActionDef = {
|
|||
stm: {
|
||||
verify: ['unverified', 'verifying'],
|
||||
accept: [['unverified', 'verifying'], 'verified'],
|
||||
reject: [['verifying', 'verified'], 'unverified']
|
||||
reject: [['verifying', 'verified'], 'unverified'],
|
||||
},
|
||||
is: 'unverified'
|
||||
is: 'unverified',
|
||||
};
|
||||
const UserActionDef = {
|
||||
stm: {
|
||||
|
|
@ -12,8 +12,8 @@ const UserActionDef = {
|
|||
disable: [['normal', 'shadow'], 'disabled'],
|
||||
enable: ['disabled', 'normal'],
|
||||
mergeTo: [['normal', 'shadow'], 'merged'],
|
||||
mergeFrom: ['normal', 'normal']
|
||||
}
|
||||
mergeFrom: ['normal', 'normal'],
|
||||
},
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "activate", "disable", "enable", "mergeTo", "mergeFrom", "verify", "accept", "reject"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -60,33 +60,33 @@ export const desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'birth',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_fulltext',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
},
|
||||
{
|
||||
name: 'nickname'
|
||||
name: 'nickname',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
type: 'fulltext',
|
||||
parser: 'ngram'
|
||||
parser: 'ngram',
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'index_userState_refId',
|
||||
attributes: [
|
||||
{
|
||||
name: 'userState'
|
||||
name: 'userState',
|
||||
},
|
||||
{
|
||||
name: "refId"
|
||||
name: "refId",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,12 +85,12 @@ export const desc = {
|
|||
name: 'index_expired_expiredAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -34,21 +34,21 @@ export const desc = {
|
|||
name: 'index_user_entity_entityId_relation',
|
||||
attributes: [
|
||||
{
|
||||
name: "userId"
|
||||
name: "userId",
|
||||
},
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: "relationId"
|
||||
name: "relationId",
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "sync", "success", "fail"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ export const desc = {
|
|||
name: 'index_uuid',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "success", "fail", "publish"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -46,12 +46,12 @@ export const desc = {
|
|||
name: 'index_uuid',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
export const actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "sync", "success", "fail"];
|
||||
export const ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -75,34 +75,34 @@ export const desc = {
|
|||
name: 'index_entity_entityId_tag',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: 'tag'
|
||||
name: 'tag',
|
||||
}
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_expired_expiresAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_url',
|
||||
attributes: [
|
||||
{
|
||||
name: 'url'
|
||||
name: 'url',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "微信用户", "attr": { "origin": "源", "openId": "openId", "unionId": "unionId", "sessionKey": "sessionKey", "accessToken": "accessToken", "refreshToken": "refreshToken", "atExpiredAt": "accessToken过期时间", "rtExpiredAt": "refreshToken过期时间", "scope": "accessToken域", "subscribed": "是否订阅", "subscribedAt": "订阅时间", "unsubscribedAt": "取关时间", "user": "用户", "tokens": "相关令牌", "application": "应用", "nickname": "昵称", "avatar": "头像" }, "v": { "origin": { "mp": "小程序", "public": "公众号", "web": "网站" } } }
|
||||
{ "name": "微信用户", "attr": { "origin": "源", "openId": "openId", "unionId": "unionId", "sessionKey": "sessionKey", "accessToken": "accessToken", "refreshToken": "refreshToken", "atExpiredAt": "accessToken过期时间", "rtExpiredAt": "refreshToken过期时间", "scope": "accessToken域", "subscribed": "是否订阅", "subscribedAt": "订阅时间", "unsubscribedAt": "取关时间", "user": "用户", "tokens": "相关令牌", "application": "应用", "nickname": "昵称", "avatar": "头像" }, "v": { "origin": { "native": "App", "mp": "小程序", "public": "公众号", "web": "网站" } } }
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Trigger } from 'oak-domain/lib/types/Trigger';
|
||||
import { EntityDict } from '../oak-app-domain/EntityDict';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
declare const triggers: Trigger<EntityDict, 'wechatMpJump', BRC>[];
|
||||
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
|
||||
declare const triggers: Trigger<EntityDict, 'wechatMpJump', BackendRuntimeContext<EntityDict>>[];
|
||||
export default triggers;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
// import { wechatMpJump } from '@project/aspects/wechatMpJump';
|
||||
import { wechatMpJump } from '../aspects/wechatMpJump';
|
||||
const triggers = [
|
||||
{
|
||||
name: '当创建WechatMpJump时,尝试为之创建一个wechatQrCode',
|
||||
name: '当创建WechatMpJump时,生成openlink',
|
||||
entity: 'wechatMpJump',
|
||||
action: 'create',
|
||||
when: 'before',
|
||||
|
|
@ -10,14 +10,13 @@ const triggers = [
|
|||
const { data, filter } = operation;
|
||||
const fn = async (wechatMpJumpData) => {
|
||||
const { jump_wxa, expiresAt, expireType, expireInterval } = wechatMpJumpData;
|
||||
Object.assign(wechatMpJumpData, {});
|
||||
const applicationId = context.getApplicationId();
|
||||
assert(applicationId);
|
||||
const openlink = await wechatMpJump({ applicationId, jump_wxa: jump_wxa, expiresAt: expiresAt, expireType, expireInterval: expireInterval }, context);
|
||||
Object.assign(wechatMpJumpData, {
|
||||
openlink
|
||||
});
|
||||
};
|
||||
if (data instanceof Array) {
|
||||
assert('授权不存在一对多的情况');
|
||||
}
|
||||
else {
|
||||
await fn(data);
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export interface IThemeState {
|
|||
/**
|
||||
* 主题:深色 浅色
|
||||
*/
|
||||
theme: ETheme;
|
||||
themeMode: ETheme;
|
||||
/**
|
||||
* 是否开启跟随系统主题
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ async function wechatMpJump(params, context) {
|
|||
const config2 = config;
|
||||
const { appId, appSecret } = config2;
|
||||
const wechatInstance = oak_external_sdk_1.WechatSDK.getInstance(appId, 'wechatMp', appSecret);
|
||||
/* const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
|
||||
return result; */
|
||||
const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
return result;
|
||||
}
|
||||
exports.wechatMpJump = wechatMpJump;
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const checkers: (import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt>)[];
|
||||
declare const checkers: (import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "token", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "mobile", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "message", import("..").RuntimeCxt> | import("oak-domain").Checker<import("../oak-app-domain").EntityDict, "parasite", import("..").RuntimeCxt>)[];
|
||||
export default checkers;
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ export default class Theme<ED extends EntityDict, Cxt extends BackendRuntimeCont
|
|||
get(): IThemeState;
|
||||
set(themeState: IThemeState): void;
|
||||
toggleSetting(): void;
|
||||
switchTheme(finalTheme: ETheme): void;
|
||||
switchThemeMode(finalThemeMode: ETheme): void;
|
||||
openSystemTheme(): void;
|
||||
getColor(): string;
|
||||
switchColor(color: string): void;
|
||||
insertThemeStylesheet(theme: string, color: string, mode: 'light' | 'dark'): void;
|
||||
insertThemeStylesheet(theme: string, color: string, mode: ETheme): void;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const Theme_1 = require("../types/Theme");
|
|||
const defaultTheme = Theme_1.ETheme.light;
|
||||
const initialThemeState = {
|
||||
setting: false,
|
||||
theme: defaultTheme,
|
||||
themeMode: defaultTheme,
|
||||
systemTheme: false,
|
||||
isFullPage: false,
|
||||
color: '#0052d9',
|
||||
|
|
@ -27,7 +27,7 @@ class Theme extends oak_frontend_base_1.Feature {
|
|||
this.cache = cache;
|
||||
this.storage = storage;
|
||||
this.themeState = initialThemeState;
|
||||
this.switchTheme(this.themeState.theme);
|
||||
this.switchThemeMode(this.themeState.themeMode);
|
||||
this.switchColor(this.themeState.color);
|
||||
}
|
||||
get() {
|
||||
|
|
@ -43,15 +43,15 @@ class Theme extends oak_frontend_base_1.Feature {
|
|||
state.setting = !state.setting;
|
||||
this.set(state);
|
||||
}
|
||||
switchTheme(finalTheme) {
|
||||
switchThemeMode(finalThemeMode) {
|
||||
const state = this.themeState;
|
||||
// 切换主题颜色
|
||||
state.theme = finalTheme;
|
||||
state.themeMode = finalThemeMode;
|
||||
// 关闭跟随系统
|
||||
state.systemTheme = false;
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||
document.documentElement.setAttribute('theme-mode', finalThemeMode);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
@ -64,13 +64,13 @@ class Theme extends oak_frontend_base_1.Feature {
|
|||
const state = this.themeState;
|
||||
const media = window.matchMedia('(prefers-color-scheme:dark)');
|
||||
if (media.matches) {
|
||||
const finalTheme = media.matches ? Theme_1.ETheme.dark : Theme_1.ETheme.light;
|
||||
// 切换主题颜色
|
||||
state.theme = finalTheme;
|
||||
const finalThemeMode = media.matches ? Theme_1.ETheme.dark : Theme_1.ETheme.light;
|
||||
// 切换黑暗主题
|
||||
state.themeMode = finalThemeMode;
|
||||
state.systemTheme = true;
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
document.documentElement.setAttribute('theme-mode', finalTheme);
|
||||
document.documentElement.setAttribute('theme-mode', finalThemeMode);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
@ -87,12 +87,12 @@ class Theme extends oak_frontend_base_1.Feature {
|
|||
switchColor(color) {
|
||||
const state = this.themeState;
|
||||
if (color) {
|
||||
state.color = color;
|
||||
const colorType = 'blue';
|
||||
state.color = color; // 某主题 主题色
|
||||
const themeColor = 'blue'; // 主题颜色类型
|
||||
switch (process.env.OAK_PLATFORM) {
|
||||
case 'web': {
|
||||
this.insertThemeStylesheet('blue', color, state.theme);
|
||||
document.documentElement.setAttribute('theme-color', colorType || '');
|
||||
this.insertThemeStylesheet(themeColor, color, state.themeMode);
|
||||
document.documentElement.setAttribute('theme-color', themeColor);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
|
|
|
|||
|
|
@ -25,15 +25,15 @@ exports.desc = {
|
|||
name: 'index_relation_path',
|
||||
attributes: [
|
||||
{
|
||||
name: "relationId"
|
||||
name: "relationId",
|
||||
},
|
||||
{
|
||||
name: "pathId"
|
||||
name: "pathId",
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ const IActionDef = {
|
|||
stm: {
|
||||
send: ['unsent', 'sending'],
|
||||
success: ['sending', 'sent'],
|
||||
fail: ['sending', 'failure']
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
is: 'unsent'
|
||||
is: 'unsent',
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "send", "success", "fail"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -55,17 +55,17 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'code',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: '$$createAt$$',
|
||||
direction: 'DESC'
|
||||
direction: 'DESC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -29,13 +29,13 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'email',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -119,10 +119,10 @@ exports.desc = {
|
|||
name: 'objectId_deleteAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'objectId'
|
||||
name: 'objectId',
|
||||
},
|
||||
{
|
||||
name: '$$deleteAt$$'
|
||||
name: '$$deleteAt$$',
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,15 +45,15 @@ exports.desc = {
|
|||
name: 'namespace_language',
|
||||
attributes: [
|
||||
{
|
||||
name: 'namespace'
|
||||
name: 'namespace',
|
||||
},
|
||||
{
|
||||
name: 'language'
|
||||
name: 'language',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,14 +5,14 @@ exports.actions = ["count", "stat", "download", "select", "aggregate", "create",
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure']
|
||||
}
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
};
|
||||
const VisitActionDef = {
|
||||
stm: {
|
||||
visit: ['unvisited', 'visited']
|
||||
visit: ['unvisited', 'visited'],
|
||||
},
|
||||
is: 'unvisited'
|
||||
is: 'unvisited',
|
||||
};
|
||||
exports.ActionDefDict = {
|
||||
iState: IActionDef,
|
||||
|
|
|
|||
|
|
@ -28,13 +28,13 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'mobile',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
{
|
||||
name: 'ableState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ exports.ActionDefDict = exports.actions = void 0;
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
apply: ['active', 'applied'],
|
||||
abandon: ['active', 'abandoned']
|
||||
abandon: ['active', 'abandoned'],
|
||||
},
|
||||
is: 'active'
|
||||
is: 'active',
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "apply", "abandon"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -55,9 +55,9 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'iState',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ exports.actions = ["count", "stat", "download", "select", "aggregate", "create",
|
|||
const IActionDef = {
|
||||
stm: {
|
||||
succeed: ['sending', 'success'],
|
||||
fail: ['sending', 'failure']
|
||||
fail: ['sending', 'failure'],
|
||||
},
|
||||
is: 'sending'
|
||||
is: 'sending',
|
||||
};
|
||||
exports.ActionDefDict = {
|
||||
iState: IActionDef
|
||||
|
|
|
|||
|
|
@ -37,18 +37,18 @@ exports.desc = {
|
|||
name: 'index_source_dest_path',
|
||||
attributes: [
|
||||
{
|
||||
name: 'sourceEntity'
|
||||
name: 'sourceEntity',
|
||||
},
|
||||
{
|
||||
name: 'value'
|
||||
name: 'value',
|
||||
},
|
||||
{
|
||||
name: 'destEntity'
|
||||
name: 'destEntity',
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -38,18 +38,18 @@ exports.desc = {
|
|||
name: 'index_targetEntity_entityId_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -27,18 +27,18 @@ exports.desc = {
|
|||
name: 'index_entity_relation_path',
|
||||
attributes: [
|
||||
{
|
||||
name: "sourceRelationId"
|
||||
name: "sourceRelationId",
|
||||
},
|
||||
{
|
||||
name: "pathId"
|
||||
name: "pathId",
|
||||
},
|
||||
{
|
||||
name: "destRelationId"
|
||||
name: "destRelationId",
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -47,20 +47,20 @@ exports.desc = {
|
|||
name: 'index_name',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_entity',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|||
exports.ActionDefDict = exports.actions = void 0;
|
||||
const IActionDef = {
|
||||
stm: {
|
||||
done: ['active', 'done']
|
||||
}
|
||||
done: ['active', 'done'],
|
||||
},
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "done"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -5,9 +5,9 @@ const IdActionDef = {
|
|||
stm: {
|
||||
verify: ['unverified', 'verifying'],
|
||||
accept: [['unverified', 'verifying'], 'verified'],
|
||||
reject: [['verifying', 'verified'], 'unverified']
|
||||
reject: [['verifying', 'verified'], 'unverified'],
|
||||
},
|
||||
is: 'unverified'
|
||||
is: 'unverified',
|
||||
};
|
||||
const UserActionDef = {
|
||||
stm: {
|
||||
|
|
@ -15,8 +15,8 @@ const UserActionDef = {
|
|||
disable: [['normal', 'shadow'], 'disabled'],
|
||||
enable: ['disabled', 'normal'],
|
||||
mergeTo: [['normal', 'shadow'], 'merged'],
|
||||
mergeFrom: ['normal', 'normal']
|
||||
}
|
||||
mergeFrom: ['normal', 'normal'],
|
||||
},
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "grant", "revoke", "activate", "disable", "enable", "mergeTo", "mergeFrom", "verify", "accept", "reject"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -63,33 +63,33 @@ exports.desc = {
|
|||
attributes: [
|
||||
{
|
||||
name: 'birth',
|
||||
direction: 'ASC'
|
||||
direction: 'ASC',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_fulltext',
|
||||
attributes: [
|
||||
{
|
||||
name: 'name'
|
||||
name: 'name',
|
||||
},
|
||||
{
|
||||
name: 'nickname'
|
||||
name: 'nickname',
|
||||
}
|
||||
],
|
||||
config: {
|
||||
type: 'fulltext',
|
||||
parser: 'ngram'
|
||||
parser: 'ngram',
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'index_userState_refId',
|
||||
attributes: [
|
||||
{
|
||||
name: 'userState'
|
||||
name: 'userState',
|
||||
},
|
||||
{
|
||||
name: "refId"
|
||||
name: "refId",
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,12 +88,12 @@ exports.desc = {
|
|||
name: 'index_expired_expiredAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
}
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -37,21 +37,21 @@ exports.desc = {
|
|||
name: 'index_user_entity_entityId_relation',
|
||||
attributes: [
|
||||
{
|
||||
name: "userId"
|
||||
name: "userId",
|
||||
},
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: "relationId"
|
||||
name: "relationId",
|
||||
},
|
||||
],
|
||||
config: {
|
||||
unique: true
|
||||
}
|
||||
unique: true,
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "sync", "success", "fail"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -39,12 +39,12 @@ exports.desc = {
|
|||
name: 'index_uuid',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "success", "fail", "publish"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -49,12 +49,12 @@ exports.desc = {
|
|||
name: 'index_uuid',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ const IActionDef = {
|
|||
success: [['wait', 'fail'], 'success'],
|
||||
fail: [['wait', 'success'], 'fail']
|
||||
},
|
||||
is: 'wait'
|
||||
is: 'wait',
|
||||
};
|
||||
exports.actions = ["count", "stat", "download", "select", "aggregate", "create", "remove", "update", "sync", "success", "fail"];
|
||||
exports.ActionDefDict = {
|
||||
|
|
|
|||
|
|
@ -78,34 +78,34 @@ exports.desc = {
|
|||
name: 'index_entity_entityId_tag',
|
||||
attributes: [
|
||||
{
|
||||
name: 'entity'
|
||||
name: 'entity',
|
||||
},
|
||||
{
|
||||
name: 'entityId'
|
||||
name: 'entityId',
|
||||
},
|
||||
{
|
||||
name: 'tag'
|
||||
name: 'tag',
|
||||
}
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_expired_expiresAt',
|
||||
attributes: [
|
||||
{
|
||||
name: 'expired'
|
||||
name: 'expired',
|
||||
},
|
||||
{
|
||||
name: 'expiresAt'
|
||||
name: 'expiresAt',
|
||||
},
|
||||
]
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'index_url',
|
||||
attributes: [
|
||||
{
|
||||
name: 'url'
|
||||
name: 'url',
|
||||
},
|
||||
]
|
||||
],
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
{ "name": "微信用户", "attr": { "origin": "源", "openId": "openId", "unionId": "unionId", "sessionKey": "sessionKey", "accessToken": "accessToken", "refreshToken": "refreshToken", "atExpiredAt": "accessToken过期时间", "rtExpiredAt": "refreshToken过期时间", "scope": "accessToken域", "subscribed": "是否订阅", "subscribedAt": "订阅时间", "unsubscribedAt": "取关时间", "user": "用户", "tokens": "相关令牌", "application": "应用", "nickname": "昵称", "avatar": "头像" }, "v": { "origin": { "mp": "小程序", "public": "公众号", "web": "网站" } } }
|
||||
{ "name": "微信用户", "attr": { "origin": "源", "openId": "openId", "unionId": "unionId", "sessionKey": "sessionKey", "accessToken": "accessToken", "refreshToken": "refreshToken", "atExpiredAt": "accessToken过期时间", "rtExpiredAt": "refreshToken过期时间", "scope": "accessToken域", "subscribed": "是否订阅", "subscribedAt": "订阅时间", "unsubscribedAt": "取关时间", "user": "用户", "tokens": "相关令牌", "application": "应用", "nickname": "昵称", "avatar": "头像" }, "v": { "origin": { "native": "App", "mp": "小程序", "public": "公众号", "web": "网站" } } }
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
declare const _default: (import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
declare const _default: (import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "message", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "address", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "user", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "userEntityGrant", import("..").BRC> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatQrCode", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "notification", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatLogin", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "application", import("..").RuntimeCxt> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "articleMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "article", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "parasite", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "extraFile", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "sessionMessage", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatMenu", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "wechatPublicTag", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>> | import("oak-domain").Trigger<import("../oak-app-domain").EntityDict, "account", import("..").BackendRuntimeContext<import("../oak-app-domain").EntityDict>>)[];
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { Trigger } from 'oak-domain/lib/types/Trigger';
|
||||
import { EntityDict } from '../oak-app-domain/EntityDict';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
declare const triggers: Trigger<EntityDict, 'wechatMpJump', BRC>[];
|
||||
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
|
||||
declare const triggers: Trigger<EntityDict, 'wechatMpJump', BackendRuntimeContext<EntityDict>>[];
|
||||
export default triggers;
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
// import { wechatMpJump } from '@project/aspects/wechatMpJump';
|
||||
const wechatMpJump_1 = require("../aspects/wechatMpJump");
|
||||
const triggers = [
|
||||
{
|
||||
name: '当创建WechatMpJump时,尝试为之创建一个wechatQrCode',
|
||||
name: '当创建WechatMpJump时,生成openlink',
|
||||
entity: 'wechatMpJump',
|
||||
action: 'create',
|
||||
when: 'before',
|
||||
|
|
@ -12,14 +12,13 @@ const triggers = [
|
|||
const { data, filter } = operation;
|
||||
const fn = async (wechatMpJumpData) => {
|
||||
const { jump_wxa, expiresAt, expireType, expireInterval } = wechatMpJumpData;
|
||||
Object.assign(wechatMpJumpData, {});
|
||||
const applicationId = context.getApplicationId();
|
||||
(0, assert_1.assert)(applicationId);
|
||||
const openlink = await (0, wechatMpJump_1.wechatMpJump)({ applicationId, jump_wxa: jump_wxa, expiresAt: expiresAt, expireType, expireInterval: expireInterval }, context);
|
||||
Object.assign(wechatMpJumpData, {
|
||||
openlink
|
||||
});
|
||||
};
|
||||
if (data instanceof Array) {
|
||||
(0, assert_1.assert)('授权不存在一对多的情况');
|
||||
}
|
||||
else {
|
||||
await fn(data);
|
||||
}
|
||||
return 0;
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export interface IThemeState {
|
|||
/**
|
||||
* 主题:深色 浅色
|
||||
*/
|
||||
theme: ETheme;
|
||||
themeMode: ETheme;
|
||||
/**
|
||||
* 是否开启跟随系统主题
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ export async function wechatMpJump<
|
|||
appSecret
|
||||
) as WechatMpInstance;
|
||||
|
||||
/* const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
const result = await wechatInstance.getURLScheme({ jump_wxa, expireType, expiresAt, expireInterval });
|
||||
|
||||
return result; */
|
||||
return result;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ export default function Render(this: any) {
|
|||
const features = useFeatures();
|
||||
const themeState = features.theme.get();
|
||||
const [systemTheme, setSystemTheme] = useState(themeState?.systemTheme);
|
||||
const [theme, setTheme] = useState(themeState?.theme);
|
||||
const [theme, setTheme] = useState(themeState?.themeMode);
|
||||
const [color, setColor] = useState(themeState?.color);
|
||||
|
||||
|
||||
|
|
@ -47,7 +47,7 @@ export default function Render(this: any) {
|
|||
if (value === ESettingTheme.system) {
|
||||
features.theme.openSystemTheme();
|
||||
} else {
|
||||
features.theme.switchTheme(value);
|
||||
features.theme.switchThemeMode(value);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -55,10 +55,10 @@ export default function Render(this: any) {
|
|||
const themeUnsub = features.theme.subscribe(() => {
|
||||
const themeState = features.theme.get();
|
||||
setSystemTheme(themeState.systemTheme);
|
||||
setTheme(themeState.theme);
|
||||
setTheme(themeState.themeMode);
|
||||
setColor(themeState.color);
|
||||
});
|
||||
|
||||
|
||||
return () => {
|
||||
themeUnsub();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import { Trigger, CreateTrigger, UpdateTrigger } from 'oak-domain/lib/types/Trigger';
|
||||
import { CreateOperationData as CreateWechatMpJumpData } from '../oak-app-domain/WechatMpJump/Schema';
|
||||
import { EntityDict } from '../oak-app-domain/EntityDict';
|
||||
|
||||
import { OakRowInconsistencyException, OakUserException } from 'oak-domain/lib/types';
|
||||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { RuntimeCxt } from '../types/RuntimeCxt';
|
||||
import { wechatMpJump } from '../aspects/wechatMpJump';
|
||||
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
|
||||
const triggers: Trigger<EntityDict, 'wechatMpJump', BackendRuntimeContext<EntityDict>>[] = [
|
||||
{
|
||||
name: '当创建WechatMpJump时,生成openlink',
|
||||
entity: 'wechatMpJump',
|
||||
action: 'create',
|
||||
when: 'before',
|
||||
fn: async ({ operation }, context, params) => {
|
||||
const { data, filter } = operation;
|
||||
const fn = async (
|
||||
wechatMpJumpData: CreateWechatMpJumpData
|
||||
) => {
|
||||
const { jump_wxa, expiresAt, expireType, expireInterval } = wechatMpJumpData;
|
||||
const applicationId = context.getApplicationId();
|
||||
assert(applicationId);
|
||||
const openlink = await wechatMpJump({ applicationId, jump_wxa: jump_wxa!, expiresAt: expiresAt as number, expireType, expireInterval: expireInterval as number }, context);
|
||||
Object.assign(wechatMpJumpData, {
|
||||
openlink
|
||||
});
|
||||
};
|
||||
return 0;
|
||||
},
|
||||
} as CreateTrigger<EntityDict, 'wechatMpJump', BackendRuntimeContext<EntityDict>>,
|
||||
];
|
||||
export default triggers;
|
||||
Loading…
Reference in New Issue