Merge branch 'dev' of gitea.51mars.com:Oak-Team/oak-general-business into dev
This commit is contained in:
commit
1c13ecc25a
|
|
@ -126,7 +126,7 @@ export async function getApplication(params, context) {
|
|||
applications2 = await context.select('application', {
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
type: 'web',
|
||||
system: {
|
||||
domain$system: {
|
||||
url: domain,
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
import WechatSDK from 'oak-external-sdk/lib/WechatSDK';
|
||||
import { assert } from 'oak-domain/lib/utils/assert';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import { OakExternalException } from 'oak-domain/lib/types/Exception';
|
||||
|
||||
async function getWechatPublicConfig(applicationId, context) {
|
||||
const [application] = await context.select('application', {
|
||||
data: {
|
||||
|
|
@ -47,8 +49,17 @@ export async function getMenu(params, context) {
|
|||
try {
|
||||
const result = await wechatInstance.getMenu();
|
||||
return result;
|
||||
}
|
||||
catch (e) {
|
||||
} catch (e) {
|
||||
if (
|
||||
e instanceof OakExternalException &&
|
||||
e?.message?.includes('menu no exist')
|
||||
) {
|
||||
return {
|
||||
menu: {
|
||||
button: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ function Ali(props) {
|
|||
</Form.Item>
|
||||
<Form.Item label="apiVersion">
|
||||
<>
|
||||
<Input placeholder="请输入apiVersion" type="text" value={ele.apiVersion} onChange={(e) => setValue(`${idx}.defaultSignName`, e.target.value)}/>
|
||||
<Input placeholder="请输入apiVersion" type="text" value={ele.apiVersion} onChange={(e) => setValue(`${idx}.apiVersion`, e.target.value)}/>
|
||||
</>
|
||||
</Form.Item>
|
||||
<Form.Item label="defaultSignName">
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@
|
|||
placeholder="{{ t('please choose idCardType') }}" range="{{ idCardTypeArr }}" disabled="{{ idState !== 'unverified' }}"
|
||||
rangeKey="label" value="{{idCardType}}" bind:linchange="setIdCardTypeMp" />
|
||||
|
||||
<l-input required value="{{ idNumber }}" disabled="{{!idCardType || idState !== 'unverified'}}" type="idcard"
|
||||
<l-input required value="{{ idNumber }}"
|
||||
disabled="{{!idCardType || idState !== 'unverified'}}"
|
||||
type="{{ idCardType === 'ID-Card' ? 'idcard' : 'text' }}"
|
||||
label="{{ t('user:attr.idNumber') }}"
|
||||
placeholder="{{ t('please input idNumber') }}" bind:lininput="setIdNumberMp" />
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ async function getApplication(params, context) {
|
|||
applications2 = await context.select('application', {
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
type: 'web',
|
||||
system: {
|
||||
domain$system: {
|
||||
url: domain,
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@ const tslib_1 = require("tslib");
|
|||
const WechatSDK_1 = tslib_1.__importDefault(require("oak-external-sdk/lib/WechatSDK"));
|
||||
const assert_1 = require("oak-domain/lib/utils/assert");
|
||||
const uuid_1 = require("oak-domain/lib/utils/uuid");
|
||||
const Exception_1 = require('oak-domain/lib/types/Exception');
|
||||
|
||||
async function getWechatPublicConfig(applicationId, context) {
|
||||
const [application] = await context.select('application', {
|
||||
data: {
|
||||
|
|
@ -54,6 +56,16 @@ async function getMenu(params, context) {
|
|||
return result;
|
||||
}
|
||||
catch (e) {
|
||||
if (
|
||||
e instanceof Exception_1.OakExternalException &&
|
||||
e?.message?.includes('menu no exist')
|
||||
) {
|
||||
return {
|
||||
menu: {
|
||||
button: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ export async function getApplication<ED extends EntityDict>(
|
|||
{
|
||||
data,
|
||||
filter: {
|
||||
type,
|
||||
type: 'web',
|
||||
system: {
|
||||
domain$system: {
|
||||
url: domain,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
WechatPublicConfig,
|
||||
} from '../oak-app-domain/Application/Schema';
|
||||
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
||||
import { OakExternalException } from 'oak-domain/lib/types/Exception';
|
||||
import { BRC } from '../types/RuntimeCxt';
|
||||
|
||||
async function getWechatPublicConfig<ED extends EntityDict>(applicationId: string, context: BRC<ED>) {
|
||||
|
|
@ -85,6 +86,16 @@ export async function getMenu<ED extends EntityDict>(
|
|||
const result = await wechatInstance.getMenu();
|
||||
return result;
|
||||
} catch (e) {
|
||||
if (
|
||||
e instanceof OakExternalException &&
|
||||
e?.message?.includes('menu no exist')
|
||||
) {
|
||||
return {
|
||||
menu: {
|
||||
button: []
|
||||
}
|
||||
};
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ function Ali(props: {
|
|||
>
|
||||
<Form.Item
|
||||
label="accessKeyId"
|
||||
// name="accessKeyId"
|
||||
// name="accessKeyId"
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
|
|
@ -79,7 +79,7 @@ function Ali(props: {
|
|||
</Form.Item>
|
||||
<Form.Item
|
||||
label="accessKeySecret"
|
||||
// name="accessKeySecret"
|
||||
// name="accessKeySecret"
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
|
|
@ -97,7 +97,7 @@ function Ali(props: {
|
|||
</Form.Item>
|
||||
<Form.Item
|
||||
label="endpoint"
|
||||
// name="endpoint"
|
||||
// name="endpoint"
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
|
|
@ -115,7 +115,7 @@ function Ali(props: {
|
|||
</Form.Item>
|
||||
<Form.Item
|
||||
label="apiVersion"
|
||||
// name="apiVersion"
|
||||
// name="apiVersion"
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
|
|
@ -124,7 +124,7 @@ function Ali(props: {
|
|||
value={ele.apiVersion}
|
||||
onChange={(e) =>
|
||||
setValue(
|
||||
`${idx}.defaultSignName`,
|
||||
`${idx}.apiVersion`,
|
||||
e.target.value
|
||||
)
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ function Ali(props: {
|
|||
</Form.Item>
|
||||
<Form.Item
|
||||
label="defaultSignName"
|
||||
// name="defaultSignName"
|
||||
// name="defaultSignName"
|
||||
>
|
||||
<>
|
||||
<Input
|
||||
|
|
|
|||
|
|
@ -29,7 +29,9 @@
|
|||
placeholder="{{ t('please choose idCardType') }}" range="{{ idCardTypeArr }}" disabled="{{ idState !== 'unverified' }}"
|
||||
rangeKey="label" value="{{idCardType}}" bind:linchange="setIdCardTypeMp" />
|
||||
|
||||
<l-input required value="{{ idNumber }}" disabled="{{!idCardType || idState !== 'unverified'}}" type="idcard"
|
||||
<l-input required value="{{ idNumber }}"
|
||||
disabled="{{!idCardType || idState !== 'unverified'}}"
|
||||
type="{{ idCardType === 'ID-Card' ? 'idcard' : 'text' }}"
|
||||
label="{{ t('user:attr.idNumber') }}"
|
||||
placeholder="{{ t('please input idNumber') }}" bind:lininput="setIdNumberMp" />
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue