build
This commit is contained in:
parent
085ec63909
commit
6c69828cc5
|
|
@ -1,14 +1,14 @@
|
|||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import WechatSDK from 'oak-external-sdk/lib/WechatSDK';
|
||||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { OakRowInconsistencyException, OakUnloggedInException, OakUserException, OakUserUnpermittedException, } from 'oak-domain/lib/types';
|
||||
import { OakPreConditionUnsetException, OakRowInconsistencyException, OakUnloggedInException, OakUserException, OakUserUnpermittedException, } from 'oak-domain/lib/types';
|
||||
import { composeFileUrl } from '../utils/cos';
|
||||
import { OakChangeLoginWayException, OakDistinguishUserException, OakUserDisabledException, } from '../types/Exception';
|
||||
import { encryptPasswordSha1 } from '../utils/password';
|
||||
import { tokenProjection } from '../types/Projection';
|
||||
import { sendSms } from '../utils/sms';
|
||||
import { mergeUser } from './user';
|
||||
import { cloneDeep, pick } from 'oak-domain/lib/utils/lodash';
|
||||
import { cloneDeep } from 'oak-domain/lib/utils/lodash';
|
||||
async function makeDistinguishException(userId, context, message) {
|
||||
const [user] = await context.select('user', {
|
||||
data: {
|
||||
|
|
@ -1189,7 +1189,7 @@ export async function switchTo({ userId }, context) {
|
|||
}
|
||||
const currentUserId = context.getCurrentUserId();
|
||||
if (currentUserId === userId) {
|
||||
throw new OakRowInconsistencyException(undefined, '您已经是当前用户');
|
||||
throw new OakPreConditionUnsetException('您已经是当前用户');
|
||||
}
|
||||
const token = context.getToken();
|
||||
await context.operate('token', {
|
||||
|
|
@ -1265,14 +1265,9 @@ export async function wakeupParasite(params, context) {
|
|||
},
|
||||
}, { dontCollect: true });
|
||||
if (parasite.expired) {
|
||||
throw new OakRowInconsistencyException({
|
||||
a: 's',
|
||||
d: {
|
||||
parasite: {
|
||||
[id]: pick(parasite, ['id', 'expired']),
|
||||
},
|
||||
},
|
||||
}, '数据已经过期');
|
||||
const e = new OakRowInconsistencyException('数据已经过期');
|
||||
e.addData('parasite', [parasite]);
|
||||
throw e;
|
||||
}
|
||||
if (parasite.user?.userState !== 'shadow') {
|
||||
throw new OakUserException('此用户已经登录过系统,不允许借用身份');
|
||||
|
|
|
|||
|
|
@ -23,14 +23,9 @@ const checkers = [
|
|||
const checkUser = (users) => {
|
||||
const [user] = users;
|
||||
if (user.userState !== 'shadow') {
|
||||
throw new OakRowInconsistencyException({
|
||||
a: 's',
|
||||
d: {
|
||||
user: {
|
||||
[user.id]: user,
|
||||
},
|
||||
},
|
||||
});
|
||||
const e = new OakRowInconsistencyException();
|
||||
e.addData('user', [user]);
|
||||
throw e;
|
||||
}
|
||||
};
|
||||
if (users2 instanceof Promise) {
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "address", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "application", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -15,5 +15,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
articleId: string;
|
||||
currentArticle: string;
|
||||
setCurrentArticle: (id: string) => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "article", false, {
|
||||
articleMenuId: string;
|
||||
changeIsEdit: () => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
}) => void;
|
||||
currentArticle: string;
|
||||
setCurrentArticle: (id: string) => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
}) => void;
|
||||
currentArticle: string;
|
||||
setCurrentArticle: (id: string) => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
show: string;
|
||||
articleMenuId: string;
|
||||
articleId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "user", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../oak-app-domain").EntityDict, keyof import("../../oak-app-domain").EntityDict, false, {
|
||||
oakId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -17,5 +17,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
border: boolean;
|
||||
selectedIconPath: string;
|
||||
iconPath: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
type: string;
|
||||
isService: boolean;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: "application" | "system" | "platform";
|
||||
entityId: string;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: "system" | "platform";
|
||||
name: string;
|
||||
entityId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", true, {
|
||||
systemId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "domain", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -12,5 +12,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
tag1: string;
|
||||
tag2: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -4,5 +4,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: keyof EntityDict;
|
||||
entityId: string;
|
||||
autoUpload: boolean;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
/// <reference types="react" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import { EntityDict as BaseEntityDict } from 'oak-domain/lib/types/Entity';
|
||||
import { ReactComponentProps } from 'oak-frontend-base/lib/types/Page';
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, boolean, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "message", true, {
|
||||
onClose: (() => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeSmsTemplate", true, {
|
||||
systemId: string;
|
||||
origin: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, {
|
||||
systemId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "messageTypeTemplate", true, {
|
||||
applicationId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onlyPassword: boolean;
|
||||
eventLoggedIn: string;
|
||||
callback: (() => void) | undefined;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function render(props) {
|
|||
const validMobile = isMobile(mobile);
|
||||
const validCaptcha = isCaptcha(captcha);
|
||||
const allowSubmit = validMobile && validCaptcha;
|
||||
const LoginCaptcha = (<Form colon={true}>
|
||||
const Captcha = (<Form colon={true}>
|
||||
<Form.Item name="mobile">
|
||||
<Input allowClear value={mobile} data-attr="mobile" type="tel" maxLength={11} prefix={<MobileOutlined />} placeholder={t('placeholder.Mobile')} size="large" onChange={(e) => {
|
||||
setMobile(e.target.value);
|
||||
|
|
@ -37,9 +37,7 @@ export default function render(props) {
|
|||
为了更好的体验,请绑定手机号
|
||||
</div>
|
||||
<div className={Style['loginbox-bd']}>
|
||||
<div className={Style['loginbox-mobile']}>
|
||||
{LoginCaptcha}
|
||||
</div>
|
||||
<div className={Style['loginbox-mobile']}>{Captcha}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default function render(props) {
|
|||
const validMobile = isMobile(mobile);
|
||||
const validCaptcha = isCaptcha(captcha);
|
||||
const allowSubmit = validMobile && validCaptcha;
|
||||
const LoginCaptcha = (<Form colon={true}>
|
||||
const Captcha = (<Form colon={true}>
|
||||
<Form.Item name="mobile">
|
||||
<Input allowClear value={mobile} data-attr="mobile" type="tel" maxLength={11} prefix={<MobileOutlined />} placeholder={t('placeholder.Mobile')} size="large" onChange={(e) => {
|
||||
setMobile(e.target.value);
|
||||
|
|
@ -38,7 +38,7 @@ export default function render(props) {
|
|||
</div>
|
||||
<div className={Style['loginbox-bd']}>
|
||||
<div className={Style['loginbox-mobile']}>
|
||||
{LoginCaptcha}
|
||||
{Captcha}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "mobile", true, {
|
||||
showBack: boolean;
|
||||
}>) => React.ReactElement;
|
||||
onFinish: (() => void) | undefined;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import { OakUserDisabledException } from '../../../types/Exception';
|
||||
export default OakComponent({
|
||||
entity: 'mobile',
|
||||
isList: true,
|
||||
|
|
@ -10,7 +11,6 @@ export default OakComponent({
|
|||
filters: [
|
||||
{
|
||||
filter() {
|
||||
// const token = this.features.token.getToken();
|
||||
const userId = this.features.token.getUserId();
|
||||
return {
|
||||
userId,
|
||||
|
|
@ -33,41 +33,59 @@ export default OakComponent({
|
|||
deleteIdx: undefined,
|
||||
},
|
||||
properties: {
|
||||
showBack: false,
|
||||
onFinish: undefined
|
||||
},
|
||||
methods: {
|
||||
async onRefreshMobile(e) {
|
||||
const { onFinish } = this.props;
|
||||
this.setState({
|
||||
refreshing: true,
|
||||
});
|
||||
try {
|
||||
const { code, errMsg } = e.detail;
|
||||
if (errMsg !== 'getPhoneNumber:ok') {
|
||||
console.error(errMsg);
|
||||
this.setMessage({
|
||||
title: '获取手机号失败',
|
||||
type: 'warning',
|
||||
});
|
||||
// 用户拒绝不用管
|
||||
console.warn(errMsg);
|
||||
if (errMsg !== 'getPhoneNumber:fail user deny') {
|
||||
this.setMessage({
|
||||
content: '获取手机号失败',
|
||||
type: 'warning',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
else {
|
||||
await this.features.token.getWechatMpUserPhoneNumber(code);
|
||||
// await this.features.token.getWechatMpUserPhoneNumber(code);
|
||||
if (onFinish) {
|
||||
onFinish();
|
||||
}
|
||||
else if (process.env.OAK_PLATFORM === 'wechatMp') {
|
||||
this.triggerEvent('finish', {});
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
if (err instanceof OakUserDisabledException) {
|
||||
this.setMessage({
|
||||
content: err?.message,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.setMessage({
|
||||
content: err?.message || '获取手机号错误',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
}
|
||||
this.setState({
|
||||
refreshing: false,
|
||||
});
|
||||
},
|
||||
goAddMobile() {
|
||||
const eventLoggedIn = `mobile:me:login:${Date.now()}`;
|
||||
this.subEvent(eventLoggedIn, () => {
|
||||
this.navigateBack();
|
||||
});
|
||||
this.navigateTo({
|
||||
url: '/mobile/login',
|
||||
eventLoggedIn,
|
||||
});
|
||||
},
|
||||
async onRemoveConfirm() {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,11 @@
|
|||
/** index.wxss **/
|
||||
@import "../../../config/styles/mp/index.less";
|
||||
@import "../../../config/styles/mp/mixins.less";
|
||||
|
||||
.page-body {
|
||||
height: 100vh;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
align-items: stretch;
|
||||
background-color: @oak-bg-color-page;
|
||||
.safe-area-inset-bottom();
|
||||
}
|
||||
|
||||
.container {
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@
|
|||
<view class="container container2">
|
||||
<l-card type="primary" plaintext="{{true}}">
|
||||
<view class="card">
|
||||
您尚未授权手机号
|
||||
您尚未授权手机号
|
||||
</view>
|
||||
</l-card>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<l-button type="default" block size="long" open-type="getPhoneNumber" bindgetphonenumber="onRefreshMobile">
|
||||
授权手机号
|
||||
<l-button type="default" block size="long" loading="{{ refreshing }}" open-type="getPhoneNumber" bindgetphonenumber="onRefreshMobile">
|
||||
授权手机号
|
||||
</l-button>
|
||||
</view>
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
export default function render(props: WebComponentProps<EntityDict, 'mobile', true, {
|
||||
mobiles?: EntityDict['mobile']['OpSchema'][];
|
||||
allowRemove: boolean;
|
||||
showBack: boolean;
|
||||
tokenMobileId?: string;
|
||||
}, {
|
||||
goAddMobile: () => void;
|
||||
|
|
|
|||
|
|
@ -3,10 +3,9 @@ import { List, Button, Modal, Row, Col } from 'antd';
|
|||
import { MobileOutlined, DeleteOutlined } from '@ant-design/icons';
|
||||
import MobileLogin from '../login';
|
||||
export default function render(props) {
|
||||
const { mobiles, allowRemove, tokenMobileId, showBack = false } = props.data;
|
||||
const { mobiles, allowRemove, tokenMobileId } = props.data;
|
||||
const { goAddMobile, removeItem, recoverItem, execute } = props.methods;
|
||||
const [open, setOpen] = useState(false);
|
||||
const eventLoggedIn = `user:info:login:${Date.now()}`;
|
||||
return (<>
|
||||
<Button type="primary" onClick={() => {
|
||||
setOpen(true);
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
size: string | number;
|
||||
iconColor: string;
|
||||
iconName: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, {
|
||||
showLogout: boolean;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "article", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "article", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "parasite", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "parasite", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, keyof EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entity: string;
|
||||
entityId: string;
|
||||
nameLabel: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "area", true, {
|
||||
depth: number;
|
||||
onAreaSelected: (id: string) => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", true, {
|
||||
platformId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "platform", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onSelect: (id: string) => void;
|
||||
isEntity: boolean;
|
||||
name: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
isEntity: boolean;
|
||||
entityDisplay: (data: any) => any[];
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, keyof import("../../../oak-app-domain").EntityDict, false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -9,5 +9,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
sessionId: string;
|
||||
dialog: boolean;
|
||||
onItemClick: ((sessionId: string) => {}) | null | undefined;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -112,22 +112,22 @@ export default OakComponent({
|
|||
const { entityFilter, entityFilterSubStr } = this.props;
|
||||
if (entityFilter) {
|
||||
assert(entityFilterSubStr);
|
||||
this.subDataEvents([entityFilterSubStr]);
|
||||
this.subDataEvents([entityFilterSubStr], 'ogb-c-session-list');
|
||||
}
|
||||
else {
|
||||
const userId = this.features.token.getUserId();
|
||||
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionList}-u-${userId}`]);
|
||||
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionList}-u-${userId}`], 'ogb-c-session-list');
|
||||
}
|
||||
},
|
||||
detached() {
|
||||
const { entityFilter, entityFilterSubStr } = this.props;
|
||||
if (entityFilter) {
|
||||
assert(entityFilterSubStr);
|
||||
this.unsubDataEvents([entityFilterSubStr]);
|
||||
this.unsubDataEvents([entityFilterSubStr], 'ogb-c-session-list');
|
||||
}
|
||||
else {
|
||||
const userId = this.features.token.getUserId();
|
||||
this.unsubDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionList}-u-${userId}`]);
|
||||
this.unsubDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionList}-u-${userId}`], 'ogb-c-session-list');
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
sessionId: string;
|
||||
entity: string;
|
||||
entityId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "sessionMessage", false, {
|
||||
isEntity: boolean;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -8,5 +8,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
entityId: string;
|
||||
entityDisplay: (data: EntityDict['session']['Schema'][] | RowWithActions<EntityDict, 'session'>[]) => any[];
|
||||
entityProjection: any;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -48,15 +48,15 @@ export default OakComponent({
|
|||
lifetimes: {
|
||||
async ready() {
|
||||
const { sessionId } = this.props;
|
||||
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionMessageList}-${sessionId}`]);
|
||||
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.sessionMessageList}-${sessionId}`], 'ogb-c-sessionMessage-list');
|
||||
this.createItem();
|
||||
this.getSessionInfo();
|
||||
},
|
||||
detached() {
|
||||
const { sessionId } = this.props;
|
||||
this.unsubDataEvents([
|
||||
`${DATA_SUBSCRIBER_KEYS.sessionMessageList}-${sessionId}`,
|
||||
]);
|
||||
`${DATA_SUBSCRIBER_KEYS.sessionMessageList}-${sessionId}`
|
||||
], 'ogb-c-sessionMessage-list');
|
||||
},
|
||||
},
|
||||
listeners: {
|
||||
|
|
|
|||
|
|
@ -5,5 +5,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
customUpload: (file: UploadFile) => void;
|
||||
send: () => void;
|
||||
setText: (text: string) => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "subscription", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain/EntityDict';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subscription", false, {
|
||||
entityId: string;
|
||||
entity: keyof EntityDict;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", true, {}>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", true, {}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
onCancel: (() => void) | undefined;
|
||||
onConfirm: ((stationIds: string[]) => void) | undefined;
|
||||
selectIds: string[] | undefined;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -3,5 +3,5 @@ declare const _default: (props: import("oak-frontend-base").ReactComponentProps<
|
|||
openStation: boolean;
|
||||
onClose: () => void;
|
||||
subwayId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -2,5 +2,5 @@ import { EntityDict } from '../../../oak-app-domain';
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "subway", false, {
|
||||
openSubway: boolean;
|
||||
onClose: () => void;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "application", true, {
|
||||
systemId: string;
|
||||
}>) => React.ReactElement;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "system", false, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
/// <reference types="wechat-miniprogram" />
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, WechatMiniprogram.Component.DataOption>) => React.ReactElement;
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<import("../../../oak-app-domain").EntityDict, "token", true, WechatMiniprogram.Component.DataOption>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
import { EntityDict } from '../../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "extraFile", true, {
|
||||
origin: string;
|
||||
idCardType: string;
|
||||
entityId: string;
|
||||
entity: string;
|
||||
autoUpload: boolean;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,131 @@
|
|||
import { generateNewId } from 'oak-domain/lib/utils/uuid';
|
||||
export default OakComponent({
|
||||
entity: 'extraFile',
|
||||
projection: {
|
||||
id: 1,
|
||||
tag1: 1,
|
||||
tag2: 1,
|
||||
origin: 1,
|
||||
bucket: 1,
|
||||
objectId: 1,
|
||||
filename: 1,
|
||||
extra1: 1,
|
||||
extension: 1,
|
||||
type: 1,
|
||||
entity: 1,
|
||||
entityId: 1,
|
||||
fileType: 1,
|
||||
sort: 1,
|
||||
isBridge: 1,
|
||||
uploadState: 1,
|
||||
},
|
||||
isList: true,
|
||||
formData({ data: rows, features }) {
|
||||
let file1;
|
||||
let file1Url;
|
||||
let file2;
|
||||
let file2Url;
|
||||
const { idCardType } = this.props;
|
||||
if (idCardType === 'ID-Card') {
|
||||
file1 = rows?.find((ele) => !ele.$$deleteAt$$ && ele.tag1 === idCardType && ele.tag2 === 'file1');
|
||||
file1Url = features.extraFile.getUrl(file1);
|
||||
file2 = rows?.find((ele) => !ele.$$deleteAt$$ && ele.tag1 === idCardType && ele.tag2 === 'file2');
|
||||
file2Url = features.extraFile.getUrl(file2);
|
||||
}
|
||||
return {
|
||||
file1,
|
||||
file2,
|
||||
file1Url,
|
||||
file2Url
|
||||
};
|
||||
},
|
||||
data: {},
|
||||
properties: {
|
||||
origin: 'qiniu',
|
||||
idCardType: '',
|
||||
entityId: '',
|
||||
entity: 'user',
|
||||
autoUpload: false
|
||||
},
|
||||
methods: {
|
||||
async onPickMp(e) {
|
||||
const tag2 = e.currentTarget.dataset.tag2;
|
||||
try {
|
||||
const { errMsg, tempFiles } = await wx.chooseMedia({
|
||||
count: 1,
|
||||
mediaType: ['image'],
|
||||
sourceType: ['album', 'camera'],
|
||||
});
|
||||
if (errMsg !== 'chooseMedia:ok') {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: errMsg,
|
||||
});
|
||||
}
|
||||
else {
|
||||
await Promise.all(tempFiles.map(async (tempExtraFile) => {
|
||||
const { tempFilePath, thumbTempFilePath, fileType, size, } = tempExtraFile;
|
||||
const filePath = tempFilePath || thumbTempFilePath;
|
||||
const fileFullName = filePath.match(/[^/]+(?!.*\/)/g)[0];
|
||||
this.pushExtraFile({
|
||||
name: fileFullName,
|
||||
fileType,
|
||||
size,
|
||||
extra1: filePath,
|
||||
}, tag2);
|
||||
}));
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
if (err.errMsg !== 'chooseMedia:fail cancel') {
|
||||
this.setMessage({
|
||||
type: 'error',
|
||||
content: err.errMsg,
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
async pushExtraFile(options, tag2) {
|
||||
const { entity, entityId, autoUpload = false, origin = 'qiniu', idCardType } = this.props;
|
||||
const { name, extra1, fileType, size } = options;
|
||||
const extension = name.substring(name.lastIndexOf('.') + 1);
|
||||
const filename = name.substring(0, name.lastIndexOf('.'));
|
||||
const applicationId = this.features.application.getApplicationId();
|
||||
const id = generateNewId();
|
||||
const updateData = {
|
||||
applicationId,
|
||||
origin,
|
||||
type: 'image',
|
||||
tag1: idCardType,
|
||||
tag2,
|
||||
objectId: generateNewId(),
|
||||
filename,
|
||||
size,
|
||||
extension,
|
||||
fileType,
|
||||
id,
|
||||
entityId,
|
||||
entity,
|
||||
sort: 1000,
|
||||
uploadState: 'uploading'
|
||||
};
|
||||
const _file = this.state[tag2]; //取出file1、file2
|
||||
// 如果autoUpload
|
||||
if (autoUpload) {
|
||||
await this.features.extraFile.autoUpload(updateData, extra1);
|
||||
if (_file) {
|
||||
this.removeItem(_file.id);
|
||||
await this.execute();
|
||||
}
|
||||
}
|
||||
else {
|
||||
this.addItem(updateData);
|
||||
if (_file) {
|
||||
this.removeItem(_file.id);
|
||||
}
|
||||
this.features.extraFile.addLocalFile(id, extra1);
|
||||
}
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
@import '../../../../config/styles/mp/index.less';
|
||||
|
||||
|
||||
|
||||
.card-box {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
border-radius: 5px;
|
||||
background: rgba(245, 245, 245, 1);
|
||||
padding: 20rpx 20rpx;
|
||||
|
||||
margin-top: 20rpx;
|
||||
|
||||
|
||||
.card {
|
||||
width: 158px;
|
||||
height: 100px;
|
||||
opacity: 1;
|
||||
border-radius: 5px;
|
||||
background: rgba(255, 255, 255, 1);
|
||||
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.image {
|
||||
width: 158px;
|
||||
height: 100px;
|
||||
}
|
||||
|
||||
.card-add {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
.icon {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 10px;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: @oak-color-primary;
|
||||
|
||||
color: #fff;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.text {
|
||||
/** 文本1 */
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
letter-spacing: 0px;
|
||||
line-height: 20.27px;
|
||||
color: rgba(128, 128, 128, 1);
|
||||
margin-top: 18rpx;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
|
||||
<block wx:if="{{ idCardType === 'ID-Card' }}" >
|
||||
<view class="card-box">
|
||||
<view class="card" bindtap="onPickMp" data-tag2="file1">
|
||||
<block wx:if="{{file1Url}}">
|
||||
<image src="{{file1Url}}" class="image" mode="aspectFit" />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="card-add" >
|
||||
<view class="icon">
|
||||
+
|
||||
</view>
|
||||
<view class="text">
|
||||
身份证人像面
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="card" bindtap="onPickMp" data-tag2="file2">
|
||||
<block wx:if="{{file2Url}}">
|
||||
<image src="{{file2Url}}" class="image" mode="aspectFit" />
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view class="card-add" >
|
||||
<view class="icon">
|
||||
+
|
||||
</view>
|
||||
<view class="text">
|
||||
身份证国徽面
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</block>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
import { EntityDict } from '../../../oak-app-domain';
|
||||
declare const _default: (props: import("oak-frontend-base").ReactComponentProps<EntityDict, "user", false, {
|
||||
origin: string;
|
||||
}>) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
||||
export default _default;
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
import { isIdCardNumber, isHkCardNumber, isTwCardNumber, isAmCardNumber, isPassportNumber, } from 'oak-domain/lib/utils/validator';
|
||||
export default OakComponent({
|
||||
entity: 'user',
|
||||
// projection: {
|
||||
// id: 1,
|
||||
// name: 1,
|
||||
// idCardType: 1,
|
||||
// idNumber: 1,
|
||||
// idState: 1,
|
||||
// extraFile$entity: {
|
||||
// $entity: 'extraFile',
|
||||
// data: {
|
||||
// id: 1,
|
||||
// tag1: 1,
|
||||
// origin: 1,
|
||||
// bucket: 1,
|
||||
// objectId: 1,
|
||||
// filename: 1,
|
||||
// extra1: 1,
|
||||
// extension: 1,
|
||||
// type: 1,
|
||||
// entity: 1,
|
||||
// entityId: 1,
|
||||
// },
|
||||
// filter: {
|
||||
// tag1: 'IDCard',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
isList: false,
|
||||
formData({ data: row, features }) {
|
||||
let file1;
|
||||
let file2;
|
||||
const idCardType = row?.idCardType;
|
||||
if (idCardType === 'ID-Card') {
|
||||
file1 = row?.extraFile$entity?.find((ele) => !ele.$$deleteAt$$ &&
|
||||
ele.tag1 === idCardType &&
|
||||
ele.tag2 === 'file1');
|
||||
file2 = row?.extraFile$entity?.find((ele) => !ele.$$deleteAt$$ &&
|
||||
ele.tag1 === idCardType &&
|
||||
ele.tag2 === 'file2');
|
||||
}
|
||||
return {
|
||||
name: row?.name,
|
||||
idNumber: row?.idNumber,
|
||||
idCardType: row?.idCardType,
|
||||
idState: row?.idState,
|
||||
file1,
|
||||
file2,
|
||||
};
|
||||
},
|
||||
data: {
|
||||
idCardTypeArr: [
|
||||
{
|
||||
value: 'ID-Card',
|
||||
label: '身份证',
|
||||
},
|
||||
{
|
||||
value: 'passport',
|
||||
label: '护照',
|
||||
},
|
||||
{
|
||||
value: 'Mainland-passport',
|
||||
label: '港澳台通行证',
|
||||
},
|
||||
],
|
||||
},
|
||||
properties: {
|
||||
origin: 'qiniu',
|
||||
},
|
||||
methods: {
|
||||
setNameMp(e) {
|
||||
const { detail: { value }, } = e;
|
||||
this.update({
|
||||
name: value,
|
||||
});
|
||||
},
|
||||
setIdCardTypeMp(e) {
|
||||
const { detail: { value }, } = e;
|
||||
this.update({
|
||||
idCardType: value,
|
||||
});
|
||||
},
|
||||
setIdNumberMp(e) {
|
||||
const { detail: { value }, } = e;
|
||||
this.update({
|
||||
idNumber: value,
|
||||
});
|
||||
},
|
||||
async onConfirm() {
|
||||
const { name, idCardType, idNumber, idState } = this.state;
|
||||
if (!name) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '请输入姓名',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!idCardType) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '请输入证件类型',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!idNumber) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '请输入证件号码',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (idCardType === 'ID-Card' && !isIdCardNumber(idNumber)) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '身份证号输入不合法',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (idCardType === 'passport' && !isPassportNumber(idNumber)) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '护照输入不合法',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (idCardType === 'Mainland-passport' &&
|
||||
!(isHkCardNumber(idNumber) ||
|
||||
isTwCardNumber(idNumber) ||
|
||||
isAmCardNumber(idNumber))) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '港澳台通行证输入不合法',
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (idCardType === 'ID-Card') {
|
||||
const { file1, file2 } = this.state;
|
||||
if (!file1) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '请上传身份证人像面',
|
||||
});
|
||||
return;
|
||||
}
|
||||
else if (!file2) {
|
||||
this.setMessage({
|
||||
type: 'warning',
|
||||
content: '请上传身份证国徽面',
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
// this.execute();
|
||||
},
|
||||
},
|
||||
});
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"l-loading": "@oak-frontend-base/miniprogram_npm/lin-ui/loading/index",
|
||||
"l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index",
|
||||
"l-picker": "@oak-frontend-base/miniprogram_npm/lin-ui/picker/index",
|
||||
"l-button": "@oak-frontend-base/miniprogram_npm/lin-ui/button/index",
|
||||
"idCard": "./idCard/index"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
@import '../../../config/styles/mp/index.less';
|
||||
|
||||
|
||||
.page-body {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
.container {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.inner {
|
||||
background-color: #fff;
|
||||
padding: 20rpx 0rpx;
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
<view class="page-body">
|
||||
<view class="container">
|
||||
<view class="inner">
|
||||
<l-input required value="{{ name }}" label="{{ t('user:attr.name') }}" placeholder="{{ t('please input name') }}" bind:lininput="setNameMp" />
|
||||
<l-picker required label="{{ t('user:attr.idCardType') }}" placeholder="{{ t('please choose idCardType') }}" range="{{ idCardTypeArr }}" rangeKey="label" value="{{idCardType}}" bind:linchange="setIdCardTypeMp" />
|
||||
|
||||
<l-input required value="{{ idNumber }}" disabled="{{!idCardType}}" type="idcard" label="{{ t('user:attr.idNumber') }}" placeholder="{{ t('please input idNumber') }}" bind:lininput="setIdNumberMp" />
|
||||
|
||||
<block wx:if="{{oakId && idCardType}}">
|
||||
<idCard entity="user" entityId="{{oakId}}" origin="{{origin}}" idCardType="{{idCardType}}" oakPath="{{ oakFullpath + '.extraFile$entity' }}" />
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<l-button type="default" block size="long" bind:lintap="onConfirm">
|
||||
提交认证
|
||||
</l-button>
|
||||
</view>
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"please input name": "请输入姓名",
|
||||
"please input idNumber": "请输入证件号码",
|
||||
"please choose idCardType": "请选择证件类型",
|
||||
"Identity witness profile": "身份证人像面",
|
||||
"Identity national emblem profile": "身份证国徽面",
|
||||
"Real name verification passed": "已通过实名验证",
|
||||
"please upload identity witness profile": "请上传身份证人像面",
|
||||
"please upload identity national emblem profile": "请上传身份证国徽面",
|
||||
"commit": "提交认证"
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
.addView {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
left: 50%;
|
||||
z-index: 99;
|
||||
}
|
||||
|
||||
.imgView {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 200px;
|
||||
}
|
||||
|
||||
.img {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
|
||||
.imgContent {
|
||||
padding: 16px;
|
||||
margin: 16px;
|
||||
border-radius: 8px;
|
||||
background-color: var(--oak-bg-color-page);
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.circleBtn {
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: var(--oak-color-primary);
|
||||
}
|
||||
|
||||
.buttonView {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
justify-content: flex-end;
|
||||
padding: 16px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
import type { UploadFile } from 'antd/es/upload/interface';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
userId: string;
|
||||
name: string;
|
||||
idNumber: string;
|
||||
idState: EntityDict['user']['Schema']['idState'];
|
||||
}, {
|
||||
commit: (file1: UploadFile, file2: UploadFile) => void;
|
||||
prevImg: (file: UploadFile, id: string) => void;
|
||||
onChange: (attr: keyof EntityDict['user']['Schema'], value: string) => void;
|
||||
}>): null;
|
||||
|
|
@ -0,0 +1,104 @@
|
|||
export default function Render(props) {
|
||||
const { methods, data } = props;
|
||||
const { t, onChange, prevImg, commit } = methods;
|
||||
// const { oakFullpath, oakId, oakLegalActions, userId, idState, name, idNumber } = data;
|
||||
// const [fileList, setFileList] = useState<UploadFile[]>([]);
|
||||
// const [fileList2, setFileList2] = useState<UploadFile[]>([]);
|
||||
// const uploadProps: UploadProps = {
|
||||
// maxCount: 1,
|
||||
// showUploadList: false,
|
||||
// beforeUpload: (file) => {
|
||||
// return false;
|
||||
// },
|
||||
// onChange: ({ file, fileList, event }) => {
|
||||
// prevImg(file, 'imgView1');
|
||||
// setFileList([...fileList]);
|
||||
// },
|
||||
// fileList,
|
||||
// };
|
||||
// const uploadProps2: UploadProps = {
|
||||
// maxCount: 1,
|
||||
// showUploadList: false,
|
||||
// beforeUpload: (file) => {
|
||||
// return false;
|
||||
// },
|
||||
// onChange: ({ file, fileList, event }) => {
|
||||
// prevImg(file, 'imgView2');
|
||||
// setFileList2([...fileList]);
|
||||
// },
|
||||
// fileList: fileList2,
|
||||
// };
|
||||
// if (idState === 'verified') {
|
||||
// return (
|
||||
// <Result
|
||||
// status='success'
|
||||
// title={t("Real name verification passed")}
|
||||
// />
|
||||
// )
|
||||
// }
|
||||
return null;
|
||||
// return (
|
||||
// <div className={styles.container}>
|
||||
// <div className={styles.imgContent}>
|
||||
// <Upload {...uploadProps}>
|
||||
// <div id="imgView1" className={styles.imgView} style={{ marginBottom: 16 }}>
|
||||
// <IDCard1 width={"100%"} height={"100%"} style={{ background: '#fff' }} />
|
||||
// {/* <img id="img1" className={styles.img} /> */}
|
||||
// {fileList.length === 0 && (
|
||||
// <Space direction="vertical" className={styles.addView} align="center">
|
||||
// <div className={styles.circleBtn}>
|
||||
// <AddOutline color="#fff" />
|
||||
// </div>
|
||||
// <div className={styles.text}>
|
||||
// {t("Identity witness profile")}
|
||||
// </div>
|
||||
// </Space>
|
||||
// )}
|
||||
// </div>
|
||||
// </Upload>
|
||||
// <Upload {...uploadProps2}>
|
||||
// <div id="imgView2" className={styles.imgView}>
|
||||
// <IDCard2 width={"100%"} height={"100%"} style={{ background: '#fff' }} />
|
||||
// {/* <img id="img2" className={styles.img} /> */}
|
||||
// {fileList2.length === 0 && (
|
||||
// <Space direction="vertical" className={styles.addView} align="center">
|
||||
// <div className={styles.circleBtn}>
|
||||
// <AddOutline color="#fff" />
|
||||
// </div>
|
||||
// <div className={styles.text}>
|
||||
// {t("Identity national emblem profile")}
|
||||
// </div>
|
||||
// </Space>
|
||||
// )}
|
||||
// </div>
|
||||
// </Upload>
|
||||
// </div>
|
||||
// <Form layout='horizontal'>
|
||||
// <Form.Item label={t("user:attr.name")}>
|
||||
// <Input
|
||||
// value={name}
|
||||
// style={{ '--text-align': 'right' }}
|
||||
// placeholder={t("please input name")}
|
||||
// clearable
|
||||
// onChange={(value) => onChange('name', value)}
|
||||
// />
|
||||
// </Form.Item>
|
||||
// <Form.Item label={t("user:attr.idNumber")}>
|
||||
// <Input
|
||||
// value={idNumber}
|
||||
// style={{ '--text-align': 'right' }}
|
||||
// placeholder={t("please input idNumber")}
|
||||
// clearable
|
||||
// onChange={(value) => onChange('idNumber', value)}
|
||||
// />
|
||||
// </Form.Item>
|
||||
// </Form>
|
||||
// <div className={styles.buttonView}>
|
||||
// <Button block shape='rounded' color='primary' onClick={() => commit(fileList[0], fileList2[0])}>
|
||||
// {t("common::commit")}
|
||||
// </Button>
|
||||
// <SafeArea position='bottom' />
|
||||
// </div>
|
||||
// </div>
|
||||
// );
|
||||
}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
import React from 'react';
|
||||
import { WebComponentProps } from 'oak-frontend-base';
|
||||
import { EntityDict } from '../../../oak-app-domain';
|
||||
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
|
||||
avatar: string;
|
||||
}, {}>): React.JSX.Element;
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
import React from 'react';
|
||||
import Styles from './web.module.less';
|
||||
export default function Render(props) {
|
||||
const { methods, data } = props;
|
||||
const { t } = methods;
|
||||
const { oakFullpath, oakId, oakLegalActions, avatar } = data;
|
||||
return <div className={Styles.container}></div>;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue