diff --git a/es/aspects/account.d.ts b/es/aspects/account.d.ts deleted file mode 100644 index 759d107b..00000000 --- a/es/aspects/account.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { BRC } from '../types/RuntimeCxt'; -export declare function getAccountPayRefunds(params: { - accountId: string; - price: number; -}, context: BRC): Promise[]>; diff --git a/es/aspects/account.js b/es/aspects/account.js deleted file mode 100644 index b35f35eb..00000000 --- a/es/aspects/account.js +++ /dev/null @@ -1,4 +0,0 @@ -import { getAccountPayRefunds as getAprsFn } from '../utils/pay'; -export async function getAccountPayRefunds(params, context) { - return getAprsFn(context, params.accountId, params.price); -} diff --git a/es/aspects/sample.d.ts b/es/aspects/sample.d.ts deleted file mode 100644 index 3f7dd235..00000000 --- a/es/aspects/sample.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -import { BRC } from '../types/RuntimeCxt'; -export declare function test(params: string, context: BRC): Promise; diff --git a/es/aspects/sample.js b/es/aspects/sample.js deleted file mode 100644 index 3dfbcb53..00000000 --- a/es/aspects/sample.js +++ /dev/null @@ -1,3 +0,0 @@ -export async function test(params, context) { - return 'hello world'; -} diff --git a/es/components/offlineAccount/index.d.ts b/es/components/offlineAccount/index.d.ts deleted file mode 100644 index 244478b6..00000000 --- a/es/components/offlineAccount/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -/// -declare const _default: (props: import("oak-frontend-base").ReactComponentProps) => React.ReactElement; -export default _default; diff --git a/es/components/offlineAccount/index.js b/es/components/offlineAccount/index.js deleted file mode 100644 index 61419664..00000000 --- a/es/components/offlineAccount/index.js +++ /dev/null @@ -1,17 +0,0 @@ -export default OakComponent({ - entity: 'offlineAccount', - projection: { - id: 1, - type: 1, - channel: 1, - name: 1, - desc: 1, - systemId: 1, - }, - isList: false, - formData({ data }) { - return { - offlineAccount: data, - }; - }, -}); diff --git a/es/components/offlineAccount/index.json b/es/components/offlineAccount/index.json deleted file mode 100644 index 0967ef42..00000000 --- a/es/components/offlineAccount/index.json +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/es/components/offlineAccount/locales/zh-CN.json b/es/components/offlineAccount/locales/zh-CN.json deleted file mode 100644 index 2c157872..00000000 --- a/es/components/offlineAccount/locales/zh-CN.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "tips": "线下交易账户是需要人工同步收款和打款行为的账户" -} diff --git a/es/components/offlineAccount/web.pc.d.ts b/es/components/offlineAccount/web.pc.d.ts deleted file mode 100644 index c83f4d65..00000000 --- a/es/components/offlineAccount/web.pc.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { EntityDict } from "../../oak-app-domain"; -import { RowWithActions, WebComponentProps } from "oak-frontend-base"; -import React from 'react'; -export default function render(props: WebComponentProps; -}>): React.JSX.Element | undefined; diff --git a/es/components/offlineAccount/web.pc.js b/es/components/offlineAccount/web.pc.js deleted file mode 100644 index 65fd0c75..00000000 --- a/es/components/offlineAccount/web.pc.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; -import { Alert, Form, Switch, InputNumber } from 'antd'; -export default function render(props) { - const { offlineAccount } = props.data; - const { t } = props.methods; - if (offlineAccount) { - return (
- - - { - config.depositLoss = value; - if (value === false) { - config.depositLossRatio = undefined; - } - update(config); - }}/> - - {config.depositLoss && - - { - config.depositLossRatio = value; - update(config); - }}/> - } - ); - } -} diff --git a/es/components/pay/channelPicker/index.d.ts b/es/components/pay/channelPicker/index.d.ts deleted file mode 100644 index 7662ee3e..00000000 --- a/es/components/pay/channelPicker/index.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -/// -import { PayConfig } from "../../../types/PayConfig"; -/** - * 支持自定义支付通道的选择器注入 - * 未来遇到真正需求时再实现,by Xc 20240426 - */ -export type ExtraPicker = { - label: string; - name: string; - icon: React.ForwardRefExoticComponent; - component?: React.ForwardRefExoticComponent<{ - onSetMeta?: (meta: object) => void; - }>; -}; -declare const _default: (props: import("oak-frontend-base").ReactComponentProps void; - onSetMeta: (meta?: object) => void; -}>) => React.ReactElement; -export default _default; diff --git a/es/components/pay/channelPicker/index.js b/es/components/pay/channelPicker/index.js deleted file mode 100644 index c0807d26..00000000 --- a/es/components/pay/channelPicker/index.js +++ /dev/null @@ -1,47 +0,0 @@ -import { PAY_CHANNEL_OFFLINE_NAME } from "../../../types/PayConfig"; -import assert from 'assert'; -export default OakComponent({ - properties: { - payConfig: [], - channel: '', - meta: {}, - extraChannelPickers: [], - onPick: (channel) => undefined, - onSetMeta: (meta) => undefined, - }, - formData() { - const { payConfig } = this.props; - assert(payConfig); - const offlineConfig = payConfig.find(ele => ele.channel === PAY_CHANNEL_OFFLINE_NAME); - return { - offlineConfig, - payChannels: payConfig.map(ele => ele.channel), - }; - }, - methods: { - onPickChannel(channel) { - this.props.onPick(channel); - if (channel === PAY_CHANNEL_OFFLINE_NAME && this.state.offlineConfig?.options?.length) { - this.props.onSetMeta({ - option: this.state.offlineConfig.options[0], - }); - } - else { - this.props.onSetMeta({}); - } - }, - onPickChannelMp(touch) { - const { detail } = touch; - const { currentKey } = detail; - this.onPickChannel(currentKey); - }, - onSelectOfflineOptionMp(touch) { - const { option } = touch.currentTarget.dataset; - const { meta, onSetMeta } = this.props; - onSetMeta({ - ...meta, - option, - }); - } - } -}); diff --git a/es/components/pay/channelPicker/index.json b/es/components/pay/channelPicker/index.json deleted file mode 100644 index f7cacce4..00000000 --- a/es/components/pay/channelPicker/index.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "usingComponents": { - "l-input": "@oak-frontend-base/miniprogram_npm/lin-ui/input/index", - "l-radio": "@oak-frontend-base/miniprogram_npm/lin-ui/radio/index", - "l-radio-group": "@oak-frontend-base/miniprogram_npm/lin-ui/radio-group/index", - "l-tag": "@oak-frontend-base/miniprogram_npm/lin-ui/tag/index" - } -} diff --git a/es/components/pay/channelPicker/index.less b/es/components/pay/channelPicker/index.less deleted file mode 100644 index d2c1125f..00000000 --- a/es/components/pay/channelPicker/index.less +++ /dev/null @@ -1,31 +0,0 @@ -.form-item { - position: relative; - font-size: 28rpx; - color: #333; - padding-right: 25rpx; - margin-left: 12rpx; - box-sizing: border-box; - - .radio { - height: 80rpx; - display: flex; - flex-direction: row; - align-items: center; - - .offline-option { - margin-left: 12rpx; - display: flex; - flex-direction: row; - flex-wrap: wrap; - - l-tag { - margin-left: 6rpx; - } - - .selected { - background:#333 !important; - color:#fff !important; - } - } - } -} \ No newline at end of file diff --git a/es/components/pay/channelPicker/index.xml b/es/components/pay/channelPicker/index.xml deleted file mode 100644 index a0f55970..00000000 --- a/es/components/pay/channelPicker/index.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {{t('payChannel::' + item)}} - - - - {{item}} - - - - - - - - - - \ No newline at end of file diff --git a/es/components/pay/channelPicker/locales/zh-CN.json b/es/components/pay/channelPicker/locales/zh-CN.json deleted file mode 100644 index 45ff5010..00000000 --- a/es/components/pay/channelPicker/locales/zh-CN.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "label": { - "option": "渠道" - }, - "noChannel": "未配置收费渠道" -} diff --git a/es/components/pay/channelPicker/web.d.ts b/es/components/pay/channelPicker/web.d.ts deleted file mode 100644 index 7572543d..00000000 --- a/es/components/pay/channelPicker/web.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -import React from 'react'; -import { WebComponentProps } from 'oak-frontend-base'; -import { EntityDict } from '../../../oak-app-domain'; -import { OfflinePayConfig, PayConfig } from '../../../types/PayConfig'; -export default function Render(props: WebComponentProps void; - onSetMeta: (meta?: object) => void; -}, { - onPickChannel: (channel: string) => void; -}>): React.JSX.Element; diff --git a/es/components/pay/channelPicker/web.js b/es/components/pay/channelPicker/web.js deleted file mode 100644 index f835eaad..00000000 --- a/es/components/pay/channelPicker/web.js +++ /dev/null @@ -1,49 +0,0 @@ -import React, { useState } from 'react'; -import { Radio, Space, Picker, Button } from 'antd-mobile'; -import { PAY_CHANNEL_ACCOUNT_NAME, PAY_CHANNEL_OFFLINE_NAME, PAY_CHANNEL_WECHAT_APP_NAME, PAY_CHANNEL_WECHAT_H5_NAME, PAY_CHANNEL_WECHAT_JS_NAME, PAY_CHANNEL_WECHAT_MP_NAME, PAY_CHANNEL_WECHAT_NATIVE_NAME } from '../../../types/PayConfig'; -import { WechatOutlined, WalletOutlined } from '@ant-design/icons'; -import Styles from './web.mobile.module.less'; -const ChannelIconDict = { - [PAY_CHANNEL_ACCOUNT_NAME]: , - [PAY_CHANNEL_OFFLINE_NAME]: , - [PAY_CHANNEL_WECHAT_APP_NAME]: , - [PAY_CHANNEL_WECHAT_JS_NAME]: , - [PAY_CHANNEL_WECHAT_NATIVE_NAME]: , - [PAY_CHANNEL_WECHAT_H5_NAME]: , - [PAY_CHANNEL_WECHAT_MP_NAME]: , -}; -export default function Render(props) { - const { payConfig, offlineConfig, channel, onPick, meta, onSetMeta } = props.data; - const { t, onPickChannel } = props.methods; - const [offlinePickerVisible, setOpVisible] = useState(false); - if (payConfig?.length) { - const Offline = offlineConfig && offlineConfig.options?.length && (<> - - ({ - label: ele, - value: ele, - }))]} visible={offlinePickerVisible} onConfirm={(value) => { - onSetMeta({ - ...meta, - option: value[0], - }); - setOpVisible(false); - }} onCancel={() => setOpVisible(false)}/> - ); - return ( onPickChannel(value)} value={channel}> - - {payConfig.map((v) => ( - - - {t(`payChannel::${v.channel}`)} - - {v.channel === PAY_CHANNEL_OFFLINE_NAME && channel === PAY_CHANNEL_OFFLINE_NAME && Offline} - - ))} - - ); - } - return (
{t('noChannel')}
); -} diff --git a/es/components/pay/channelPicker/web.mobile.module.less b/es/components/pay/channelPicker/web.mobile.module.less deleted file mode 100644 index fb4541d7..00000000 --- a/es/components/pay/channelPicker/web.mobile.module.less +++ /dev/null @@ -1,8 +0,0 @@ -.span { - margin-right: 10px; -} - - -.radio { - height: 40px; -} \ No newline at end of file diff --git a/es/components/pay/channelPicker/web.pc.d.ts b/es/components/pay/channelPicker/web.pc.d.ts deleted file mode 100644 index 141df524..00000000 --- a/es/components/pay/channelPicker/web.pc.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -import React from 'react'; -import { WebComponentProps } from 'oak-frontend-base'; -import { EntityDict } from '../../../oak-app-domain'; -import { OfflinePayConfig, PayConfig } from '../../../types/PayConfig'; -export default function Render(props: WebComponentProps void; - onSetMeta: (meta?: object) => void; -}>): React.JSX.Element; diff --git a/es/components/pay/channelPicker/web.pc.js b/es/components/pay/channelPicker/web.pc.js deleted file mode 100644 index 4f62dd76..00000000 --- a/es/components/pay/channelPicker/web.pc.js +++ /dev/null @@ -1,54 +0,0 @@ -import React from 'react'; -import { Radio, Space, Select, Flex } from 'antd'; -import Styles from './web.pc.module.less'; -import { PAY_CHANNEL_ACCOUNT_NAME, PAY_CHANNEL_OFFLINE_NAME, PAY_CHANNEL_WECHAT_APP_NAME, PAY_CHANNEL_WECHAT_H5_NAME, PAY_CHANNEL_WECHAT_JS_NAME, PAY_CHANNEL_WECHAT_MP_NAME, PAY_CHANNEL_WECHAT_NATIVE_NAME } from '../../../types/PayConfig'; -import { WechatOutlined, WalletOutlined } from '@ant-design/icons'; -const ChannelIconDict = { - [PAY_CHANNEL_ACCOUNT_NAME]: , - [PAY_CHANNEL_OFFLINE_NAME]: , - [PAY_CHANNEL_WECHAT_APP_NAME]: , - [PAY_CHANNEL_WECHAT_JS_NAME]: , - [PAY_CHANNEL_WECHAT_NATIVE_NAME]: , - [PAY_CHANNEL_WECHAT_H5_NAME]: , - [PAY_CHANNEL_WECHAT_MP_NAME]: , -}; -export default function Render(props) { - const { payConfig, offlineConfig, channel, onPick, meta, onSetMeta } = props.data; - const { t } = props.methods; - if (payConfig?.length) { - const Offline = offlineConfig && offlineConfig.options?.length && ( -