oak-pay-business 2.2.9 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/AbstractComponents.d.ts +5 -15
- package/es/components/account/detail/index.js +10 -7
- package/es/components/account/detail/index.json +0 -1
- package/es/components/account/detail/index.less +2 -2
- package/es/components/account/detail/web.pc.module.less +68 -68
- package/es/components/deposit/new/index.js +33 -0
- package/es/components/deposit/new/index.xml +9 -19
- package/es/components/order/pay/info.js +6 -6
- package/es/components/order/pay/info.module.less +24 -24
- package/es/components/order/pay/web.mobile.module.less +35 -35
- package/es/components/order/pay/web.pc.module.less +35 -35
- package/es/components/pay/detail/index.d.ts +3 -0
- package/es/components/pay/detail/index.js +56 -38
- package/es/components/pay/detail/index.less +1 -0
- package/es/components/pay/detail/index.xml +56 -51
- package/es/components/pay/detail/locales/zh-CN.json +3 -1
- package/es/components/pay/detail/web.js +13 -13
- package/es/components/payConfig/upsert/offline/web.pc.module.less +4 -4
- package/es/components/payConfig/upsert/web.pc.module.less +10 -10
- package/es/configuration/attrUpdateMatrix.js +8 -0
- package/es/data/i18n.js +3 -1
- package/es/oak-app-domain/Application/Schema.d.ts +2 -2
- package/es/oak-app-domain/Application/Storage.js +0 -1
- package/es/oak-app-domain/Article/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/ArticleMenu/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/ExtraFile/Schema.d.ts +3 -3
- package/es/oak-app-domain/ExtraFile/Storage.js +3 -3
- package/es/oak-app-domain/ExtraFile/Style.js +7 -5
- package/es/oak-app-domain/ExtraFile/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/Platform/Schema.d.ts +2 -2
- package/es/oak-app-domain/Platform/Storage.js +0 -1
- package/es/oak-app-domain/SmsTemplate/Schema.d.ts +6 -5
- package/es/oak-app-domain/SmsTemplate/Storage.js +2 -4
- package/es/oak-app-domain/SmsTemplate/Style.d.ts +3 -0
- package/es/oak-app-domain/SmsTemplate/Style.js +10 -0
- package/es/oak-app-domain/SmsTemplate/locales/zh_CN.json +1 -1
- package/es/oak-app-domain/StyleDict.js +2 -0
- package/es/oak-app-domain/System/Schema.d.ts +4 -4
- package/es/oak-app-domain/System/Storage.js +2 -3
- package/es/oak-app-domain/WechatTemplate/locales/zh_CN.json +1 -1
- package/es/triggers/pay.js +50 -47
- package/es/types/Exception.d.ts +3 -0
- package/es/types/Exception.js +5 -0
- package/es/utils/pay.js +4 -1
- package/es/utils/payClazz/WechatPay/WechatPay.js +3 -0
- package/es/watchers/pay.js +17 -0
- package/lib/components/pay/detail/index.d.ts +3 -0
- package/lib/components/pay/detail/index.js +56 -38
- package/lib/configuration/attrUpdateMatrix.js +8 -0
- package/lib/data/i18n.js +3 -1
- package/lib/oak-app-domain/Application/Schema.d.ts +2 -2
- package/lib/oak-app-domain/Application/Storage.js +0 -1
- package/lib/oak-app-domain/Article/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/ArticleMenu/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/ExtraFile/Schema.d.ts +3 -3
- package/lib/oak-app-domain/ExtraFile/Storage.js +3 -3
- package/lib/oak-app-domain/ExtraFile/Style.js +7 -5
- package/lib/oak-app-domain/ExtraFile/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/Platform/Schema.d.ts +2 -2
- package/lib/oak-app-domain/Platform/Storage.js +0 -1
- package/lib/oak-app-domain/SmsTemplate/Schema.d.ts +6 -5
- package/lib/oak-app-domain/SmsTemplate/Storage.js +2 -4
- package/lib/oak-app-domain/SmsTemplate/Style.d.ts +3 -0
- package/lib/oak-app-domain/SmsTemplate/Style.js +13 -0
- package/lib/oak-app-domain/SmsTemplate/locales/zh_CN.json +1 -1
- package/lib/oak-app-domain/StyleDict.js +52 -50
- package/lib/oak-app-domain/System/Schema.d.ts +4 -4
- package/lib/oak-app-domain/System/Storage.js +0 -2
- package/lib/oak-app-domain/WechatTemplate/locales/zh_CN.json +1 -1
- package/lib/triggers/pay.js +50 -47
- package/lib/types/Exception.d.ts +3 -0
- package/lib/types/Exception.js +7 -1
- package/lib/utils/pay.js +4 -1
- package/lib/utils/payClazz/WechatPay/WechatPay.js +3 -0
- package/lib/watchers/pay.js +17 -0
- package/package.json +4 -4
|
@@ -5,6 +5,7 @@ import { isWeiXin } from 'oak-frontend-base/es/utils/utils';
|
|
|
5
5
|
import { merge } from "oak-domain/lib/utils/lodash";
|
|
6
6
|
import { canStartPay } from "../../../utils/wpProductFrontend";
|
|
7
7
|
import { generateNewIdAsync } from 'oak-domain/lib/utils/uuid';
|
|
8
|
+
import { StartPayFailure } from "../../../types/Exception";
|
|
8
9
|
const PayRoutineDict = {
|
|
9
10
|
wpProduct: {
|
|
10
11
|
projection: {
|
|
@@ -20,21 +21,22 @@ const PayRoutineDict = {
|
|
|
20
21
|
if (process.env.OAK_PLATFORM === 'wechatMp') {
|
|
21
22
|
const { prepayMeta } = meta;
|
|
22
23
|
if (prepayMeta) {
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
try {
|
|
25
|
+
const result = await wx.requestPayment(prepayMeta);
|
|
26
|
+
process.env.NODE_ENV === 'development' && console.log(result);
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
throw new StartPayFailure(err.errMsg.includes('cancel')
|
|
30
|
+
? features.locales.t('startPayError.userCancel')
|
|
31
|
+
: features.locales.t('startPayError.unknown'));
|
|
32
|
+
}
|
|
25
33
|
}
|
|
26
34
|
else {
|
|
27
|
-
features.
|
|
28
|
-
type: 'error',
|
|
29
|
-
content: features.locales.t('startPayError.illegaPayData'),
|
|
30
|
-
});
|
|
35
|
+
throw new StartPayFailure(features.locales.t('startPayError.illegalPrepayData'));
|
|
31
36
|
}
|
|
32
37
|
}
|
|
33
38
|
else {
|
|
34
|
-
features.
|
|
35
|
-
type: 'error',
|
|
36
|
-
content: features.locales.t('startPayError.falseEnv', { env: 'wechatMp' }),
|
|
37
|
-
});
|
|
39
|
+
throw new StartPayFailure(features.locales.t('startPayError.falseEnv', { env: 'wechatMp' }));
|
|
38
40
|
}
|
|
39
41
|
return;
|
|
40
42
|
}
|
|
@@ -50,10 +52,7 @@ const PayRoutineDict = {
|
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
else {
|
|
53
|
-
features.
|
|
54
|
-
type: 'error',
|
|
55
|
-
content: features.locales.t('startPayError.illegaPayData'),
|
|
56
|
-
});
|
|
55
|
+
throw new StartPayFailure(features.locales.t('startPayError.illegalPrepayData'));
|
|
57
56
|
}
|
|
58
57
|
}
|
|
59
58
|
}
|
|
@@ -111,11 +110,15 @@ export default OakComponent({
|
|
|
111
110
|
},
|
|
112
111
|
properties: {
|
|
113
112
|
onClose: () => undefined,
|
|
113
|
+
onPaid: () => undefined,
|
|
114
|
+
onPayFailure: () => undefined,
|
|
114
115
|
disableAutoPay: false,
|
|
116
|
+
closeWhenFailure: false,
|
|
115
117
|
},
|
|
116
118
|
data: {
|
|
117
119
|
showCloseConfirmMp: false,
|
|
118
120
|
showChannelSelectMp: false,
|
|
121
|
+
unsub: undefined,
|
|
119
122
|
},
|
|
120
123
|
formData({ data }) {
|
|
121
124
|
const application = this.features.application.getApplication();
|
|
@@ -202,32 +205,45 @@ export default OakComponent({
|
|
|
202
205
|
async confirmCloseMp() {
|
|
203
206
|
await this.execute('close');
|
|
204
207
|
this.cancelCloseMp();
|
|
208
|
+
const { onClose } = this.props;
|
|
209
|
+
onClose && onClose();
|
|
205
210
|
},
|
|
206
211
|
goBack() {
|
|
207
212
|
this.navigateBack();
|
|
208
213
|
},
|
|
209
214
|
async startPay() {
|
|
215
|
+
const { onPaid, onClose, onPayFailure } = this.props;
|
|
210
216
|
const { pay } = this.state;
|
|
211
|
-
|
|
217
|
+
try {
|
|
218
|
+
await PayRoutineDict[pay.entity].routine(pay, this.features);
|
|
219
|
+
onPaid && onPaid();
|
|
220
|
+
}
|
|
221
|
+
catch (err) {
|
|
222
|
+
if (this.props.closeWhenFailure) {
|
|
223
|
+
await this.execute(undefined, undefined, undefined, [
|
|
224
|
+
{
|
|
225
|
+
entity: 'pay',
|
|
226
|
+
operation: {
|
|
227
|
+
id: await generateNewIdAsync(),
|
|
228
|
+
action: 'close',
|
|
229
|
+
data: {},
|
|
230
|
+
filter: {
|
|
231
|
+
id: this.props.oakId,
|
|
232
|
+
},
|
|
233
|
+
},
|
|
234
|
+
}
|
|
235
|
+
]);
|
|
236
|
+
onClose && onClose();
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
onPayFailure && onPayFailure();
|
|
240
|
+
}
|
|
241
|
+
this.features.message.setMessage({
|
|
242
|
+
type: 'warning',
|
|
243
|
+
content: err.message,
|
|
244
|
+
});
|
|
245
|
+
}
|
|
212
246
|
},
|
|
213
|
-
/* async onWxBridgeReady(payMetaData: any): Promise<void> {
|
|
214
|
-
return new Promise(
|
|
215
|
-
(resolve, reject) => {
|
|
216
|
-
WeixinJSBridge.invoke('getBrandWCPayRequest', payMetaData,
|
|
217
|
-
function (res: { err_msg: string }) {
|
|
218
|
-
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
|
219
|
-
// 使用以上方式判断前端返回,微信团队郑重提示:
|
|
220
|
-
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
|
221
|
-
resolve(undefined as void);
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
reject(res.err_msg);
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
);
|
|
230
|
-
} */
|
|
231
247
|
openChannelSelectMp() {
|
|
232
248
|
this.setState({
|
|
233
249
|
showChannelSelectMp: true,
|
|
@@ -277,15 +293,17 @@ export default OakComponent({
|
|
|
277
293
|
}
|
|
278
294
|
},
|
|
279
295
|
lifetimes: {
|
|
280
|
-
ready() {
|
|
296
|
+
async ready() {
|
|
281
297
|
const { oakId } = this.props;
|
|
282
298
|
assert(typeof oakId === 'string');
|
|
283
|
-
this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`]
|
|
299
|
+
const unsub = await this.subDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`]);
|
|
300
|
+
this.setState({
|
|
301
|
+
unsub,
|
|
302
|
+
});
|
|
284
303
|
},
|
|
285
304
|
detached() {
|
|
286
|
-
const {
|
|
287
|
-
|
|
288
|
-
this.unsubDataEvents([`${DATA_SUBSCRIBER_KEYS.payStateChanged}-${oakId}`], 'opb-c-pay-detail');
|
|
305
|
+
const { unsub } = this.state;
|
|
306
|
+
unsub && unsub();
|
|
289
307
|
}
|
|
290
308
|
},
|
|
291
309
|
listeners: {
|
|
@@ -106,57 +106,62 @@
|
|
|
106
106
|
</block>
|
|
107
107
|
</view>
|
|
108
108
|
<view class="padding"></view>
|
|
109
|
-
<
|
|
110
|
-
<
|
|
111
|
-
size="long"
|
|
112
|
-
bind:lintap="startPay"
|
|
113
|
-
bg-color="#04BE02"
|
|
114
|
-
>
|
|
115
|
-
{{t('pay')}}
|
|
116
|
-
</l-button>
|
|
117
|
-
</block>
|
|
118
|
-
<block wx:elif="{{oakExecutable === true}}">
|
|
119
|
-
<view class="btn">
|
|
109
|
+
<view style="display:flex; align-items: center;justify-content: space-between;gap:16rpx;">
|
|
110
|
+
<block wx:if="{{closable && !oakExecutable}}">
|
|
120
111
|
<l-button
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
112
|
+
type="error"
|
|
113
|
+
size="long"
|
|
114
|
+
bind:lintap="closeMp"
|
|
115
|
+
style="flex:1;"
|
|
116
|
+
>
|
|
117
|
+
{{t('pay:action.close')}}
|
|
118
|
+
</l-button>
|
|
119
|
+
<l-dialog
|
|
120
|
+
show="{{showCloseConfirmMp}}"
|
|
121
|
+
type="confirm"
|
|
122
|
+
title="{{t('cc.title')}}"
|
|
123
|
+
content="{{t('cc.content')}}"
|
|
124
|
+
bind:linconfirm="confirmCloseMp"
|
|
125
|
+
bind:lincancel="cancelCloseMp"
|
|
126
|
+
bind:lintap="cancelCloseMp"
|
|
127
|
+
/>
|
|
128
|
+
</block>
|
|
129
|
+
<block wx:if="{{startPayable}}">
|
|
126
130
|
<l-button
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
131
|
+
size="long"
|
|
132
|
+
bind:lintap="startPay"
|
|
133
|
+
type="success"
|
|
134
|
+
style="flex:1;"
|
|
135
|
+
>
|
|
136
|
+
{{t('pay')}}
|
|
137
|
+
</l-button>
|
|
138
|
+
</block>
|
|
139
|
+
<block wx:elif="{{oakExecutable === true}}">
|
|
140
|
+
<view class="btn">
|
|
141
|
+
<l-button
|
|
142
|
+
plain="true"
|
|
143
|
+
size="long"
|
|
144
|
+
bind:lintap="resetMp"
|
|
145
|
+
>
|
|
146
|
+
{{t('common::reset')}}
|
|
147
|
+
</l-button>
|
|
148
|
+
<l-button
|
|
149
|
+
size="long"
|
|
150
|
+
bind:lintap="executeMp"
|
|
151
|
+
>
|
|
152
|
+
{{t('common::action.update')}}
|
|
153
|
+
</l-button>
|
|
154
|
+
</view>
|
|
155
|
+
</block>
|
|
156
|
+
<block wx:elif="{{!closable}}">
|
|
157
|
+
<l-button
|
|
158
|
+
type="default"
|
|
159
|
+
size="long"
|
|
160
|
+
bind:lintap="goBack"
|
|
161
|
+
style="flex:1;"
|
|
162
|
+
>
|
|
163
|
+
{{t('common::back')}}
|
|
164
|
+
</l-button>
|
|
165
|
+
</block>
|
|
166
|
+
</view>
|
|
162
167
|
</view>
|
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"wechatPay": "微信支付",
|
|
17
17
|
"startPayError": {
|
|
18
18
|
"illegalPrepayData": "没有有效的预支付数据,可能后台是运行在开发环境,请检查",
|
|
19
|
-
"falseEnv": "该订单渠道【%{env}】不匹配当前环境"
|
|
19
|
+
"falseEnv": "该订单渠道【%{env}】不匹配当前环境",
|
|
20
|
+
"userCancel": "用户取消支付",
|
|
21
|
+
"unknown": "用户支付失败"
|
|
20
22
|
},
|
|
21
23
|
"type": {
|
|
22
24
|
"label": "支付类型",
|
|
@@ -152,7 +152,18 @@ export default function Render(props) {
|
|
|
152
152
|
const { t, update, execute, clean, goBack, startPay } = props.methods;
|
|
153
153
|
if (pay) {
|
|
154
154
|
const { iState, price, entity } = pay;
|
|
155
|
-
let BtnPart =
|
|
155
|
+
let BtnPart = closable ? (<Button block color="danger" onClick={() => {
|
|
156
|
+
Modal.confirm({
|
|
157
|
+
title: t('cc.title'),
|
|
158
|
+
content: t('cc.content'),
|
|
159
|
+
onConfirm: async () => {
|
|
160
|
+
await execute('close');
|
|
161
|
+
onClose();
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
}}>
|
|
165
|
+
{t('pay:action.close')}
|
|
166
|
+
</Button>) : startPayable ? (<Button block style={{ backgroundColor: '#04BE02' }} className={Styles.btnWechatPay} onClick={() => startPay()}>
|
|
156
167
|
{t('pay')}
|
|
157
168
|
</Button>) : oakExecutable === true ? (<>
|
|
158
169
|
<div className={Styles.btnItem}>
|
|
@@ -165,18 +176,7 @@ export default function Render(props) {
|
|
|
165
176
|
{t('common::reset')}
|
|
166
177
|
</Button>
|
|
167
178
|
</div>
|
|
168
|
-
</>) :
|
|
169
|
-
Modal.confirm({
|
|
170
|
-
title: t('cc.title'),
|
|
171
|
-
content: t('cc.content'),
|
|
172
|
-
onConfirm: async () => {
|
|
173
|
-
await execute('close');
|
|
174
|
-
onClose();
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
}}>
|
|
178
|
-
{t('pay:action.close')}
|
|
179
|
-
</Button>) : (<Button block color="primary" onClick={goBack}>
|
|
179
|
+
</>) : (<Button block color="primary" onClick={goBack}>
|
|
180
180
|
{t('common::back')}
|
|
181
181
|
</Button>);
|
|
182
182
|
return (<div className={Styles.container}>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 100%;
|
|
5
5
|
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
.empty {
|
|
2
|
-
min-height: 600px;
|
|
3
|
-
}
|
|
4
|
-
|
|
5
|
-
.container {
|
|
6
|
-
width: 100%;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
align-items: center;
|
|
10
|
-
justify-content: center;
|
|
1
|
+
.empty {
|
|
2
|
+
min-height: 600px;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.container {
|
|
6
|
+
width: 100%;
|
|
7
|
+
display: flex;
|
|
8
|
+
flex-direction: column;
|
|
9
|
+
align-items: center;
|
|
10
|
+
justify-content: center;
|
|
11
11
|
}
|
package/es/data/i18n.js
CHANGED
|
@@ -197,7 +197,9 @@ const i18ns = [
|
|
|
197
197
|
"wechatPay": "微信支付",
|
|
198
198
|
"startPayError": {
|
|
199
199
|
"illegalPrepayData": "没有有效的预支付数据,可能后台是运行在开发环境,请检查",
|
|
200
|
-
"falseEnv": "该订单渠道【%{env}】不匹配当前环境"
|
|
200
|
+
"falseEnv": "该订单渠道【%{env}】不匹配当前环境",
|
|
201
|
+
"userCancel": "用户取消支付",
|
|
202
|
+
"unknown": "用户支付失败"
|
|
201
203
|
},
|
|
202
204
|
"type": {
|
|
203
205
|
"label": "支付类型",
|
|
@@ -74,7 +74,7 @@ export type NativeConfig = {
|
|
|
74
74
|
};
|
|
75
75
|
export type OpSchema = EntityShape & {
|
|
76
76
|
name: String<32>;
|
|
77
|
-
description
|
|
77
|
+
description?: Text | null;
|
|
78
78
|
type: AppType;
|
|
79
79
|
systemId: ForeignKey<"system">;
|
|
80
80
|
config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig;
|
|
@@ -84,7 +84,7 @@ export type OpSchema = EntityShape & {
|
|
|
84
84
|
export type OpAttr = keyof OpSchema;
|
|
85
85
|
export type Schema = EntityShape & {
|
|
86
86
|
name: String<32>;
|
|
87
|
-
description
|
|
87
|
+
description?: Text | null;
|
|
88
88
|
type: AppType;
|
|
89
89
|
systemId: ForeignKey<"system">;
|
|
90
90
|
config: WebConfig | WechatMpConfig | WechatPublicConfig | NativeConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文章", "attr": { "name": "
|
|
1
|
+
{ "name": "文章", "attr": { "name": "标题", "content": "正文内容", "articleMenu": "菜单", "files": "文件" } }
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "
|
|
1
|
+
{ "name": "文章分类", "attr": { "name": "分类标题", "isArticle": "是否存在文章", "parent": "所属分类", "entity": "对象", "entityId": "对象Id", "isLeaf": "结点下是否存在叶子结点", "files": "文件" } }
|
|
@@ -10,7 +10,7 @@ import * as ArticleMenu from "../ArticleMenu/Schema";
|
|
|
10
10
|
import * as SessionMessage from "../SessionMessage/Schema";
|
|
11
11
|
import * as User from "../User/Schema";
|
|
12
12
|
export type OpSchema = EntityShape & {
|
|
13
|
-
origin: "qiniu" | "wechat" | "
|
|
13
|
+
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown";
|
|
14
14
|
type: "image" | "video" | "audio" | "file";
|
|
15
15
|
bucket?: String<32> | null;
|
|
16
16
|
objectId?: String<64> | null;
|
|
@@ -33,7 +33,7 @@ export type OpSchema = EntityShape & {
|
|
|
33
33
|
};
|
|
34
34
|
export type OpAttr = keyof OpSchema;
|
|
35
35
|
export type Schema = EntityShape & {
|
|
36
|
-
origin: "qiniu" | "wechat" | "
|
|
36
|
+
origin: "qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown";
|
|
37
37
|
type: "image" | "video" | "audio" | "file";
|
|
38
38
|
bucket?: String<32> | null;
|
|
39
39
|
objectId?: String<64> | null;
|
|
@@ -66,7 +66,7 @@ type AttrFilter = {
|
|
|
66
66
|
$$createAt$$: Q_DateValue;
|
|
67
67
|
$$seq$$: Q_NumberValue;
|
|
68
68
|
$$updateAt$$: Q_DateValue;
|
|
69
|
-
origin: Q_EnumValue<"qiniu" | "wechat" | "
|
|
69
|
+
origin: Q_EnumValue<"qiniu" | "wechat" | "ctyun" | "aliyun" | "tencent" | "unknown">;
|
|
70
70
|
type: Q_EnumValue<"image" | "video" | "audio" | "file">;
|
|
71
71
|
bucket: Q_StringValue;
|
|
72
72
|
objectId: Q_StringValue;
|
|
@@ -4,7 +4,7 @@ export const desc = {
|
|
|
4
4
|
origin: {
|
|
5
5
|
notNull: true,
|
|
6
6
|
type: "enum",
|
|
7
|
-
enumeration: ["qiniu", "wechat", "
|
|
7
|
+
enumeration: ["qiniu", "wechat", "ctyun", "aliyun", "tencent", "unknown"]
|
|
8
8
|
},
|
|
9
9
|
type: {
|
|
10
10
|
notNull: true,
|
|
@@ -120,8 +120,8 @@ export const desc = {
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
name: '$$deleteAt$$',
|
|
123
|
-
}
|
|
124
|
-
]
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
125
|
}
|
|
126
126
|
]
|
|
127
127
|
};
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export const style = {
|
|
2
2
|
color: {
|
|
3
3
|
origin: {
|
|
4
|
-
qiniu: '#
|
|
5
|
-
wechat: '#
|
|
6
|
-
ctyun: '#
|
|
4
|
+
qiniu: '#37caff',
|
|
5
|
+
wechat: '#2aae67',
|
|
6
|
+
ctyun: '#ff0000',
|
|
7
|
+
aliyun: '#1677ff',
|
|
8
|
+
tencent: '#0052d9',
|
|
7
9
|
unknown: '#A9A9A9',
|
|
8
10
|
},
|
|
9
11
|
type: {
|
|
@@ -16,6 +18,6 @@ export const style = {
|
|
|
16
18
|
success: '#008000',
|
|
17
19
|
failed: '#FF0000',
|
|
18
20
|
uploading: '#0000FF',
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
+
},
|
|
22
|
+
},
|
|
21
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata", "application": "来源应用" }, "v": { "origin": { "qiniu": "七牛云", "ctyun": "天翼云", "wechat": "微信", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
|
1
|
+
{ "name": "文件", "attr": { "origin": "源", "type": "类型", "bucket": "桶", "objectId": "对象编号", "tag1": "标签一", "tag2": "标签二", "filename": "文件名", "md5": "md5", "entity": "关联对象", "entityId": "关联对象id", "extra1": "额外信息", "extra2": "非结构化额外信息", "extension": "后缀名", "size": "文件大小", "sort": "排序", "fileType": "文件类型", "isBridge": "是否桥接访问", "uploadState": "上传状态", "uploadMeta": "上传需要的metadata", "application": "来源应用" }, "v": { "origin": { "qiniu": "七牛云", "ctyun": "天翼云", "wechat": "微信", "aliyun": "阿里云", "tencent": "腾讯云", "unknown": "未知" }, "type": { "image": "图像", "video": "视频", "audio": "音频", "file": "文件" }, "uploadState": { "success": "上传成功", "failed": "上传失败", "uploading": "上传中" } } }
|
|
@@ -10,7 +10,7 @@ import * as Message from "../Message/Schema";
|
|
|
10
10
|
import * as System from "../System/Schema";
|
|
11
11
|
export type OpSchema = EntityShape & {
|
|
12
12
|
name: String<32>;
|
|
13
|
-
description
|
|
13
|
+
description?: Text | null;
|
|
14
14
|
config: Config;
|
|
15
15
|
style?: Style | null;
|
|
16
16
|
entity?: String<32> | null;
|
|
@@ -19,7 +19,7 @@ export type OpSchema = EntityShape & {
|
|
|
19
19
|
export type OpAttr = keyof OpSchema;
|
|
20
20
|
export type Schema = EntityShape & {
|
|
21
21
|
name: String<32>;
|
|
22
|
-
description
|
|
22
|
+
description?: Text | null;
|
|
23
23
|
config: Config;
|
|
24
24
|
style?: Style | null;
|
|
25
25
|
entity?: String<32> | null;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ForeignKey } from "oak-domain/lib/types/DataType";
|
|
2
|
-
import { Q_DateValue, Q_NumberValue, Q_StringValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand";
|
|
2
|
+
import { Q_DateValue, Q_NumberValue, Q_StringValue, Q_EnumValue, NodeId, MakeFilter, ExprOp, ExpressionKey, SubQueryPredicateMetadata } from "oak-domain/lib/types/Demand";
|
|
3
3
|
import { OneOf } from "oak-domain/lib/types/Polyfill";
|
|
4
4
|
import { FormCreateData, FormUpdateData, DeduceAggregation, Operation as OakOperation, Selection as OakSelection, MakeAction as OakMakeAction, AggregationResult, EntityShape } from "oak-domain/lib/types/Entity";
|
|
5
5
|
import { GenericAction } from "oak-domain/lib/actions/action";
|
|
6
|
-
import {
|
|
6
|
+
import { Text, String, Datetime } from "oak-domain/lib/types/DataType";
|
|
7
7
|
import * as System from "../System/Schema";
|
|
8
8
|
import * as MessageTypeSmsTemplate from "../MessageTypeSmsTemplate/Schema";
|
|
9
|
+
export type Origin = "ali" | "tencent" | "ctyun" | "qiniu";
|
|
9
10
|
export type OpSchema = EntityShape & {
|
|
10
11
|
systemId: ForeignKey<"system">;
|
|
11
|
-
origin:
|
|
12
|
+
origin: Origin;
|
|
12
13
|
templateName: Text;
|
|
13
14
|
templateCode: String<64>;
|
|
14
15
|
templateContent: Text;
|
|
@@ -17,7 +18,7 @@ export type OpSchema = EntityShape & {
|
|
|
17
18
|
export type OpAttr = keyof OpSchema;
|
|
18
19
|
export type Schema = EntityShape & {
|
|
19
20
|
systemId: ForeignKey<"system">;
|
|
20
|
-
origin:
|
|
21
|
+
origin: Origin;
|
|
21
22
|
templateName: Text;
|
|
22
23
|
templateCode: String<64>;
|
|
23
24
|
templateContent: Text;
|
|
@@ -35,7 +36,7 @@ type AttrFilter = {
|
|
|
35
36
|
$$updateAt$$: Q_DateValue;
|
|
36
37
|
systemId: Q_StringValue;
|
|
37
38
|
system: System.Filter;
|
|
38
|
-
origin:
|
|
39
|
+
origin: Q_EnumValue<Origin>;
|
|
39
40
|
templateName: Q_StringValue;
|
|
40
41
|
templateCode: Q_StringValue;
|
|
41
42
|
templateContent: Q_StringValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{ "name": "
|
|
1
|
+
{ "name": "短信模板", "attr": { "system": "系统", "origin": "源", "templateName": "模板名称", "templateCode": "模板Code", "templateContent": "模板内容", "syncAt": "同步时间" }, "v": { "origin": { "ali": "阿里云", "tencent": "腾讯云", "ctyun": "天翼云", "qiniu": "七牛云" } } }
|
|
@@ -11,6 +11,7 @@ import { style as message } from "./Message/Style";
|
|
|
11
11
|
import { style as mobile } from "./Mobile/Style";
|
|
12
12
|
import { style as notification } from "./Notification/Style";
|
|
13
13
|
import { style as parasite } from "./Parasite/Style";
|
|
14
|
+
import { style as smsTemplate } from "./SmsTemplate/Style";
|
|
14
15
|
import { style as toDo } from "./ToDo/Style";
|
|
15
16
|
import { style as token } from "./Token/Style";
|
|
16
17
|
import { style as userEntityGrant } from "./UserEntityGrant/Style";
|
|
@@ -50,6 +51,7 @@ export const styleDict = {
|
|
|
50
51
|
mobile,
|
|
51
52
|
notification,
|
|
52
53
|
parasite,
|
|
54
|
+
smsTemplate,
|
|
53
55
|
toDo,
|
|
54
56
|
token,
|
|
55
57
|
userEntityGrant,
|