适配2.0版本框架,还差一点

This commit is contained in:
Xu Chang 2022-11-22 12:54:57 +08:00
commit d3b8805112
804 changed files with 4587 additions and 30385 deletions

View File

@ -2,9 +2,9 @@ import { WebEnv, WechatMpEnv } from "../general-app-domain/Token/Schema";
import { AppType } from '../general-app-domain/Application/Schema';
import { EntityDict } from "../general-app-domain";
import { QiniuUploadInfo } from "oak-frontend-base/lib/types/Upload";
import { RuntimeContext } from '../context/RuntimeContext';
import { Config, Origin } from "../types/Config";
declare type GeneralAspectDict<ED extends EntityDict, Cxt extends RuntimeContext<ED>> = {
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
declare type GeneralAspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = {
loginByMobile: (params: {
captcha?: string;
password?: string;
@ -44,5 +44,5 @@ declare type GeneralAspectDict<ED extends EntityDict, Cxt extends RuntimeContext
config: Config;
}, context: Cxt) => Promise<void>;
};
export declare type AspectDict<ED extends EntityDict, Cxt extends RuntimeContext<ED>> = GeneralAspectDict<ED, Cxt>;
export declare type AspectDict<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>> = GeneralAspectDict<ED, Cxt>;
export {};

View File

@ -1,6 +1,6 @@
import { EntityDict } from '../general-app-domain';
import { AppType } from '../general-app-domain/Application/Schema';
import { RuntimeContext } from '../context/RuntimeContext';
export declare function getApplication<ED extends EntityDict, Cxt extends RuntimeContext<ED>>(params: {
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
export declare function getApplication<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
type: AppType;
}, context: Cxt): Promise<string>;

View File

@ -2,8 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.getApplication = void 0;
var tslib_1 = require("tslib");
var assert_1 = tslib_1.__importDefault(require("assert"));
var DEV_CONFIG_1 = require("../data/DEV-CONFIG");
var assert_1 = require("oak-domain/lib/utils/assert");
function getApplication(params, context) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var type, APP_ID, appId, _a, application, _b, application2;
@ -17,7 +17,7 @@ function getApplication(params, context) {
wechatPublic: DEV_CONFIG_1.DEV_WECHATPUPLIC_APPLICATION_ID,
};
appId = APP_ID[type];
return [4 /*yield*/, context.rowStore.select('application', {
return [4 /*yield*/, context.select('application', {
data: {
id: 1,
name: 1,
@ -28,21 +28,28 @@ function getApplication(params, context) {
id: 1,
name: 1,
config: 1,
type: 1,
systemId: 1,
system: {
id: 1,
name: 1,
config: 1,
},
},
filter: {
id: appId,
},
},
filter: {
id: appId,
},
}, context, {})];
}, {})];
case 1:
_a = tslib_1.__read.apply(void 0, [(_c.sent()).result, 1]), application = _a[0];
_a = tslib_1.__read.apply(void 0, [_c.sent(), 1]), application = _a[0];
if (!(type === 'wechatMp')) return [3 /*break*/, 2];
(0, assert_1.assert)(application, '微信小程序环境下 application必须存在小程序相关配置');
(0, assert_1.default)(application, '微信小程序环境下 application必须存在小程序相关配置');
return [3 /*break*/, 6];
case 2:
if (!(type === 'wechatPublic')) return [3 /*break*/, 5];
if (!!application) return [3 /*break*/, 4];
return [4 /*yield*/, context.rowStore.select('application', {
return [4 /*yield*/, context.select('application', {
data: {
id: 1,
name: 1,
@ -58,14 +65,14 @@ function getApplication(params, context) {
filter: {
id: APP_ID.web,
},
}, context, {})];
}, {})];
case 3:
_b = tslib_1.__read.apply(void 0, [(_c.sent()).result, 1]), application2 = _b[0];
(0, assert_1.assert)(application2, '微信公众号环境下 application不存在公众号配置但必须存在web相关配置');
_b = tslib_1.__read.apply(void 0, [_c.sent(), 1]), application2 = _b[0];
(0, assert_1.default)(application2, '微信公众号环境下 application不存在公众号配置但必须存在web相关配置');
return [2 /*return*/, application2.id];
case 4: return [3 /*break*/, 6];
case 5:
(0, assert_1.assert)(application, 'web环境下 application必须存在web相关配置');
(0, assert_1.default)(application, 'web环境下 application必须存在web相关配置');
_c.label = 6;
case 6: return [2 /*return*/, application.id];
}

View File

@ -1,6 +1,6 @@
import { EntityDict } from "../general-app-domain";
import { AppType } from "../general-app-domain/Application/Schema";
import { RuntimeContext } from '../context/RuntimeContext';
export declare function getApplication<ED extends EntityDict, Cxt extends RuntimeContext<ED>>(params: {
import { BackendRuntimeContext } from "../context/BackendRuntimeContext";
export declare function getApplication<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
type: AppType;
}, context: Cxt): Promise<string>;

View File

@ -18,7 +18,7 @@ function getApplication(params, context) {
appId = APP_ID[type];
url = context.getHeader('url');
console.log('url is', url);
return [4 /*yield*/, context.rowStore.select('application', {
return [4 /*yield*/, context.select('application', {
data: {
id: 1,
name: 1,
@ -34,9 +34,9 @@ function getApplication(params, context) {
filter: {
id: appId
}
}, context, {})];
}, {})];
case 1:
_a = tslib_1.__read.apply(void 0, [(_b.sent()).result, 1]), application = _a[0];
_a = tslib_1.__read.apply(void 0, [_b.sent(), 1]), application = _a[0];
return [2 /*return*/, application.id];
}
});

View File

@ -1,7 +1,7 @@
import { RuntimeContext } from '../context/RuntimeContext';
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
import { EntityDict } from '../general-app-domain';
import { Config } from '../types/Config';
export declare function updateConfig<ED extends EntityDict, Cxt extends RuntimeContext<ED>>(params: {
export declare function updateConfig<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
entity: 'platform' | 'system';
entityId: string;
config: Config;

View File

@ -2,30 +2,26 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateConfig = void 0;
var tslib_1 = require("tslib");
var uuid_1 = require("oak-domain/lib/utils/uuid");
function updateConfig(params, context) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var rowStore, entity, entityId, config, _a, _b, _c;
var _d;
return tslib_1.__generator(this, function (_e) {
switch (_e.label) {
var entity, entityId, config;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0:
rowStore = context.rowStore;
entity = params.entity, entityId = params.entityId, config = params.config;
_b = (_a = rowStore).operate;
_c = [entity];
_d = {};
return [4 /*yield*/, generateNewId()];
case 1: return [4 /*yield*/, _b.apply(_a, _c.concat([(_d.id = _e.sent(),
_d.action = 'update',
_d.data = {
return [4 /*yield*/, context.operate(entity, {
id: (0, uuid_1.generateNewId)(),
action: 'update',
data: {
config: config,
},
_d.filter = {
filter: {
id: entityId,
},
_d), context, {}]))];
case 2:
_e.sent();
}
}, {})];
case 1:
_a.sent();
return [2 /*return*/];
}
});

View File

@ -1,8 +1,8 @@
import { RuntimeContext } from '../context/RuntimeContext';
import { EntityDict } from '../general-app-domain';
import { Origin } from '../types/Config';
import { QiniuUploadInfo } from 'oak-frontend-base/lib/types/Upload';
export declare function getUploadInfo<ED extends EntityDict, Cxt extends RuntimeContext<ED>>(params: {
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
export declare function getUploadInfo<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
origin: Origin;
bucket?: string;
key?: string;

View File

@ -1,8 +1,8 @@
import { RuntimeContext } from '../context/RuntimeContext';
import { EntityDict } from '../general-app-domain';
import { WechatMpConfig } from '../general-app-domain/Application/Schema';
import { WebEnv, WechatMpEnv } from '../general-app-domain/Token/Schema';
export declare function loginByMobile<ED extends EntityDict, Cxt extends RuntimeContext<ED>>(params: {
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
export declare function loginByMobile<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>(params: {
captcha?: string;
password?: string;
mobile: string;
@ -13,7 +13,7 @@ export declare function loginByMobile<ED extends EntityDict, Cxt extends Runtime
* @param param0
* @param context
*/
export declare function loginWechat<ED extends EntityDict, Cxt extends RuntimeContext<ED>>({ code, env }: {
export declare function loginWechat<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>({ code, env }: {
code: string;
env: WebEnv;
}, context: Cxt): Promise<string>;
@ -23,7 +23,7 @@ export declare function loginWechat<ED extends EntityDict, Cxt extends RuntimeCo
* @param context
* @returns
*/
export declare function loginWechatMp<ED extends EntityDict, Cxt extends RuntimeContext<ED>>({ code, env }: {
export declare function loginWechatMp<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>({ code, env }: {
code: string;
env: WechatMpEnv;
}, context: Cxt): Promise<string>;
@ -32,14 +32,14 @@ export declare function loginWechatMp<ED extends EntityDict, Cxt extends Runtime
* @param param0
* @param context
*/
export declare function syncUserInfoWechatMp<ED extends EntityDict, Cxt extends RuntimeContext<ED>>({ nickname, avatarUrl, encryptedData, iv, signature }: {
export declare function syncUserInfoWechatMp<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>({ nickname, avatarUrl, encryptedData, iv, signature }: {
nickname: string;
avatarUrl: string;
encryptedData: string;
iv: string;
signature: string;
}, context: Cxt): Promise<void>;
export declare function sendCaptcha<ED extends EntityDict, Cxt extends RuntimeContext<ED>>({ mobile, env }: {
export declare function sendCaptcha<ED extends EntityDict, Cxt extends BackendRuntimeContext<ED>>({ mobile, env }: {
mobile: string;
env: WechatMpConfig | WebEnv;
}, context: Cxt): Promise<string>;

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
import { EntityDict } from "../general-app-domain";
import { WechatQrCodeProps } from '../general-app-domain/WechatQrCode/Schema';
import { RuntimeContext } from '../context/RuntimeContext';
import { BackendRuntimeContext } from '../context/BackendRuntimeContext';
/**
*
* 0SystemConfig中指定了qrCodeTypeqrCodeType去生成
@ -10,7 +10,7 @@ import { RuntimeContext } from '../context/RuntimeContext';
* @param context
* @returns
*/
export declare function createWechatQrCode<ED extends EntityDict, T extends keyof ED, Cxt extends RuntimeContext<ED>>(options: {
export declare function createWechatQrCode<ED extends EntityDict, T extends keyof ED, Cxt extends BackendRuntimeContext<ED>>(options: {
entity: T;
entityId: string;
tag?: string;

View File

@ -2,9 +2,10 @@
Object.defineProperty(exports, "__esModule", { value: true });
exports.createWechatQrCode = void 0;
var tslib_1 = require("tslib");
var uuid_1 = require("oak-domain/lib/utils/uuid");
var assert_1 = require("oak-domain/lib/utils/assert");
var oak_external_sdk_1 = require("oak-external-sdk");
var uuid_1 = require("oak-domain/lib/utils/uuid");
var uuid_2 = require("oak-domain/lib/utils/uuid");
/**
* 生成二维码优先级如下
* 0如果在SystemConfig中指定了qrCodeType则按照qrCodeType去生成
@ -16,17 +17,14 @@ var uuid_1 = require("oak-domain/lib/utils/uuid");
*/
function createWechatQrCode(options, context) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var entity, entityId, tag, _a, lifetimeLength, _b, permanent, props, applicationId, _c, system, appId, appType, url, _d, applications, sysConfig, id, self_1, publicApp, mpApp, data, type, application, applicationType, config, _e, config2, appId_1, appSecret, wechatInstance, buffer, str, config2, appId_2, appSecret, wechatInstance, result, _f, _g, _h;
var _j;
return tslib_1.__generator(this, function (_k) {
switch (_k.label) {
var entity, entityId, tag, _a, lifetimeLength, _b, permanent, props, applicationId, _c, system, appId, appType, url, _d, applications, sysConfig, id, self_1, publicApp, mpApp, data, type, application, applicationType, config, _e, config2, appId_1, appSecret, wechatInstance, buffer, str, config2, appId_2, appSecret, wechatInstance, result;
return tslib_1.__generator(this, function (_f) {
switch (_f.label) {
case 0:
entity = options.entity, entityId = options.entityId, tag = options.tag, _a = options.lifetimeLength, lifetimeLength = _a === void 0 ? 300 * 10000 : _a, _b = options.permanent, permanent = _b === void 0 ? false : _b, props = options.props;
return [4 /*yield*/, context.getApplicationId()];
case 1:
applicationId = _k.sent();
applicationId = context.getApplicationId();
(0, assert_1.assert)(applicationId);
return [4 /*yield*/, context.rowStore.select('system', {
return [4 /*yield*/, context.select('system', {
data: {
id: 1,
config: 1,
@ -53,20 +51,18 @@ function createWechatQrCode(options, context) {
},
},
},
}, context, {
}, {
dontCollect: true,
})];
case 2:
_c = tslib_1.__read.apply(void 0, [(_k.sent()).result, 1]), system = _c[0];
case 1:
_c = tslib_1.__read.apply(void 0, [_f.sent(), 1]), system = _c[0];
appId = '', appType = undefined;
url = undefined;
_d = system, applications = _d.application$system, sysConfig = _d.config;
if (!applications || (applications === null || applications === void 0 ? void 0 : applications.length) === 0) {
throw new Error('无法生成二维码找不到此system下的应用信息');
}
return [4 /*yield*/, generateNewId()];
case 3:
id = _k.sent();
id = (0, uuid_1.generateNewId)();
if (sysConfig.App.qrCodeApplicationId) {
appId = sysConfig.App.qrCodeApplicationId;
appType = sysConfig.App.qrCodeType;
@ -129,69 +125,64 @@ function createWechatQrCode(options, context) {
applicationType = application.type, config = application.config;
_e = type;
switch (_e) {
case 'wechatMpWxaCode': return [3 /*break*/, 4];
case 'wechatPublic': return [3 /*break*/, 6];
case 'wechatMpDomainUrl': return [3 /*break*/, 8];
case 'wechatMpWxaCode': return [3 /*break*/, 2];
case 'wechatPublic': return [3 /*break*/, 4];
case 'wechatMpDomainUrl': return [3 /*break*/, 6];
}
return [3 /*break*/, 9];
case 4:
return [3 /*break*/, 7];
case 2:
(0, assert_1.assert)(applicationType === 'wechatMp' && config.type === 'wechatMp');
config2 = config;
appId_1 = config2.appId, appSecret = config2.appSecret;
wechatInstance = oak_external_sdk_1.WechatSDK.getInstance(appId_1, appSecret, 'wechatMp');
return [4 /*yield*/, wechatInstance.getMpUnlimitWxaCode({
scene: (0, uuid_1.shrinkUuidTo32Bytes)(id),
scene: (0, uuid_2.shrinkUuidTo32Bytes)(id),
page: 'pages/index/index', // todo这里用其它的页面微信服务器拒绝因为没发布。应该是 pages/wechatQrCode/scan/index
})];
case 5:
buffer = _k.sent();
case 3:
buffer = _f.sent();
str = String.fromCharCode.apply(String, tslib_1.__spreadArray([], tslib_1.__read(new Uint8Array(buffer)), false));
Object.assign(data, {
buffer: str,
});
return [3 /*break*/, 10];
case 6:
return [3 /*break*/, 8];
case 4:
(0, assert_1.assert)(applicationType === 'wechatPublic' &&
config.type === 'wechatPublic');
config2 = config;
appId_2 = config2.appId, appSecret = config2.appSecret;
wechatInstance = oak_external_sdk_1.WechatSDK.getInstance(appId_2, appSecret, 'wechatPublic');
return [4 /*yield*/, wechatInstance.getQrCode({
sceneStr: (0, uuid_1.shrinkUuidTo32Bytes)(id),
sceneStr: (0, uuid_2.shrinkUuidTo32Bytes)(id),
isPermanent: false,
expireSeconds: 2592000,
})];
case 7:
result = _k.sent();
case 5:
result = _f.sent();
Object.assign(data, {
ticket: result === null || result === void 0 ? void 0 : result.ticket,
url: result === null || result === void 0 ? void 0 : result.url,
});
return [3 /*break*/, 10];
case 8:
return [3 /*break*/, 8];
case 6:
{
return [3 /*break*/, 10];
return [3 /*break*/, 8];
}
_k.label = 9;
case 9:
_f.label = 7;
case 7:
{
(0, assert_1.assert)(false, "\u672A\u5B9E\u73B0\u7684".concat(type));
}
_k.label = 10;
case 10:
_g = (_f = context.rowStore).operate;
_h = ['wechatQrCode'];
_j = {};
return [4 /*yield*/, generateNewId()];
case 11: return [4 /*yield*/, _g.apply(_f, _h.concat([(_j.id = _k.sent(),
_j.action = 'create',
_j.data = data,
_j), context,
{
dontCollect: true,
}]))];
case 12:
_k.sent();
_f.label = 8;
case 8: return [4 /*yield*/, context.operate('wechatQrCode', {
id: (0, uuid_1.generateNewId)(),
action: 'create',
data: data,
}, {
dontCollect: true,
})];
case 9:
_f.sent();
return [2 /*return*/];
}
});

View File

@ -1,5 +1,5 @@
import { Checker } from "oak-domain/lib/types";
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'address', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'address', RuntimeCxt>[];
export default checkers;

View File

@ -1,6 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var validator_1 = require("oak-domain/lib/utils/validator");
var types_1 = require("oak-domain/lib/types");
var validator_2 = require("oak-domain/lib/utils/validator");
@ -9,30 +8,38 @@ var checkers = [
type: 'data',
action: 'create',
entity: 'address',
checker: function (_a) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var action, data;
return tslib_1.__generator(this, function (_b) {
action = operation.action, data = operation.data;
if (data instanceof Array) {
data.forEach(function (ele) {
var a = 'name';
(0, validator_2.checkAttributesNotNull)('address', ele, ['name', 'detail', 'phone', 'areaId']);
if (!(0, validator_1.isMobile)(ele.phone)) {
throw new types_1.OakInputIllegalException('address', ['phone'], '手机号非法');
}
});
checker: function (data) {
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_2.checkAttributesNotNull)('address', ele, ['name', 'detail', 'phone' /* , 'areaId' */]);
if (!(0, validator_1.isMobile)(ele.phone)) {
throw new types_1.OakInputIllegalException('address', ['phone'], '手机号非法');
}
else {
(0, validator_2.checkAttributesNotNull)('address', data, ['name', 'detail', 'phone', 'areaId']);
if (!(0, validator_1.isMobile)(data.phone)) {
throw new types_1.OakInputIllegalException('address', ['phone'], '手机号非法');
}
}
return [2 /*return*/, 0];
});
});
}
else {
(0, validator_2.checkAttributesNotNull)('address', data, ['name', 'detail', 'phone' /* , 'areaId' */]);
if (!(0, validator_1.isMobile)(data.phone)) {
throw new types_1.OakInputIllegalException('address', ['phone'], '手机号非法');
}
}
},
},
{
type: 'data',
action: 'update',
entity: 'address',
checker: function (data) {
if (data.name === '') {
throw new types_1.OakInputIllegalException('address', ['name'], '姓名不可为空');
}
if (data.detail === '') {
throw new types_1.OakInputIllegalException('address', ['name'], '详细地址不可为空');
}
if (data.hasOwnProperty('phone') && !(0, validator_1.isMobile)(data.phone)) {
throw new types_1.OakInputIllegalException('address', ['phone'], '手机号非法');
}
return 0;
},
}
];

View File

@ -1,5 +1,5 @@
import { Checker } from 'oak-domain/lib/types';
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'application', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'application', RuntimeCxt>[];
export default checkers;

View File

@ -1,37 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var validator_1 = require("oak-domain/lib/utils/validator");
var checkers = [
{
type: 'data',
action: 'create',
entity: 'application',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var action, data;
return tslib_1.__generator(this, function (_b) {
action = operation.action, data = operation.data;
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('application', ele, [
'name',
'type',
'systemId',
]);
});
}
else {
(0, validator_1.checkAttributesNotNull)('application', data, [
'name',
'type',
'systemId',
]);
}
return [2 /*return*/, 0];
checker: function (data, context) {
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('application', ele, [
'name',
'type',
'systemId',
]);
});
});
}
else {
(0, validator_1.checkAttributesNotNull)('application', data, [
'name',
'type',
'systemId',
]);
}
return 0;
},
},
];

View File

@ -1,2 +1,2 @@
declare const checkers: (import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "address", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "token", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "user", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "userEntityGrant", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "wechatQrCode", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "application", import("../context/RuntimeContext").RuntimeContext<import("../general-app-domain").EntityDict>>)[];
declare const checkers: (import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "address", import("../types/RuntimeCxt").RuntimeCxt> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "token", import("../types/RuntimeCxt").RuntimeCxt> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "user", import("../types/RuntimeCxt").RuntimeCxt> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "userEntityGrant", import("../types/RuntimeCxt").RuntimeCxt> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "wechatQrCode", import("../types/RuntimeCxt").RuntimeCxt> | import("oak-domain/lib/types").Checker<import("../general-app-domain").EntityDict, "application", import("../types/RuntimeCxt").RuntimeCxt>)[];
export default checkers;

View File

@ -7,7 +7,5 @@ var user_1 = tslib_1.__importDefault(require("./user"));
var userEntityGrant_1 = tslib_1.__importDefault(require("./userEntityGrant"));
var wechatQrCode_1 = tslib_1.__importDefault(require("./wechatQrCode"));
var application_1 = tslib_1.__importDefault(require("./application"));
var check_1 = require("../utils/check");
var checkers = tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray(tslib_1.__spreadArray([], tslib_1.__read(address_1.default), false), tslib_1.__read(token_1.default), false), tslib_1.__read(user_1.default), false), tslib_1.__read(userEntityGrant_1.default), false), tslib_1.__read(wechatQrCode_1.default), false), tslib_1.__read(application_1.default), false);
(0, check_1.processCheckers)(checkers);
exports.default = checkers;

View File

@ -1,5 +1,5 @@
import { Checker } from 'oak-domain/lib/types';
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'platform', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'platform', RuntimeCxt>[];
export default checkers;

View File

@ -1,33 +1,25 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var validator_1 = require("oak-domain/lib/utils/validator");
var checkers = [
{
type: 'data',
action: 'create',
entity: 'platform',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var action, data;
return tslib_1.__generator(this, function (_b) {
action = operation.action, data = operation.data;
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('platform', ele, [
'name',
]);
});
}
else {
(0, validator_1.checkAttributesNotNull)('platform', data, [
'name',
]);
}
return [2 /*return*/, 0];
checker: function (data) {
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('platform', ele, [
'name',
]);
});
});
}
else {
(0, validator_1.checkAttributesNotNull)('platform', data, [
'name',
]);
}
return 0;
},
},
];

View File

@ -1,5 +1,5 @@
import { Checker } from 'oak-domain/lib/types';
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'system', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'system', RuntimeCxt>[];
export default checkers;

View File

@ -1,29 +1,21 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var validator_1 = require("oak-domain/lib/utils/validator");
var checkers = [
{
type: 'data',
action: 'create',
entity: 'system',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var action, data;
return tslib_1.__generator(this, function (_b) {
action = operation.action, data = operation.data;
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('system', ele, ['name', 'platformId']);
});
}
else {
(0, validator_1.checkAttributesNotNull)('system', data, ['name', 'platformId']);
}
return [2 /*return*/, 0];
checker: function (data) {
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('system', ele, ['name', 'platformId']);
});
});
}
else {
(0, validator_1.checkAttributesNotNull)('system', data, ['name', 'platformId']);
}
return 0;
},
},
];

View File

@ -1,5 +1,5 @@
import { Checker } from "oak-domain/lib/types";
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'token', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from "../types/RuntimeCxt";
declare const checkers: Checker<EntityDict, 'token', RuntimeCxt>[];
export default checkers;

View File

@ -1,5 +1,5 @@
import { Checker } from "oak-domain/lib/types";
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'user', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from "../types/RuntimeCxt";
declare const checkers: Checker<EntityDict, 'user', RuntimeCxt>[];
export default checkers;

View File

@ -1,83 +1,67 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var actionDef_1 = require("oak-domain/lib/store/actionDef");
var types_1 = require("oak-domain/lib/types");
var constants_1 = require("../constants");
var checkers = [
{
type: 'data',
type: 'row',
action: 'remove',
entity: 'user',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var filter;
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
filter = operation.filter;
return [4 /*yield*/, (0, actionDef_1.checkFilterContains)('user', context.rowStore.getSchema(), {
idState: 'shadow',
}, context, filter)];
case 1:
_b.sent();
return [2 /*return*/, 0];
}
});
});
},
filter: {
userState: 'shadow',
}
},
{
type: 'user',
action: 'play',
type: 'relation',
action: ['play', 'remove', 'disable', 'enable'],
entity: 'user',
checker: function () { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
// 只有root才能play
throw new types_1.OakUserUnpermittedException();
});
}); },
relationFilter: function (userId) {
// 只有root才能进行操作
throw new types_1.OakUserUnpermittedException();
},
errMsg: '越权操作',
},
{
type: 'data',
action: 'play',
entity: 'user',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var token, userId;
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0: return [4 /*yield*/, context.getToken()];
case 1:
token = _b.sent();
userId = token.userId;
if (userId === operation.filter.id) {
throw new types_1.OakRowInconsistencyException();
}
return [2 /*return*/, 0];
}
});
});
checker: function (data) {
// 不记得什么意思了
/* const token = context.getToken();
const { userId } = token!;
if (userId === operation.filter!.id) {
throw new OakRowInconsistencyException();
} */
},
},
{
type: 'data',
action: 'grant',
entity: 'user',
checker: function (_a) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var data;
return tslib_1.__generator(this, function (_b) {
data = operation.data;
if (Object.keys(data).filter(function (ele) { return !ele.includes('$'); }).length > 0) {
throw new types_1.OakInputIllegalException('user', Object.keys(data), '授权不允许传入其它属性');
}
return [2 /*return*/, 0];
});
});
checker: function (data) {
if (Object.keys(data).filter(function (ele) { return !ele.includes('$'); }).length > 0) {
throw new types_1.OakInputIllegalException('user', Object.keys(data), '授权不允许传入其它属性');
}
}
},
{
type: 'row',
action: 'disable',
entity: 'user',
filter: {
id: {
$nin: {
entity: 'userRole',
data: {
userId: 1,
},
filter: {
roleId: constants_1.ROOT_ROLE_ID,
},
},
}
},
errMsg: '不能禁用root用户',
}
];
exports.default = checkers;

View File

@ -1,5 +1,5 @@
import { Checker } from 'oak-domain/lib/types';
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'userEntityGrant', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'userEntityGrant', RuntimeCxt>[];
export default checkers;

View File

@ -1,6 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var types_1 = require("oak-domain/lib/types");
var validator_1 = require("oak-domain/lib/utils/validator");
var checkers = [
@ -8,92 +7,54 @@ var checkers = [
type: 'data',
action: 'create',
entity: 'userEntityGrant',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var data;
return tslib_1.__generator(this, function (_b) {
data = operation.data;
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', ele, [
'type',
'entity',
'entityId',
'relation',
]);
if (ele.type === 'grant') {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', ele, [
'number',
]);
if (ele.number <= 0) {
throw new types_1.OakInputIllegalException('userEntityGrant', ['number', '分享的权限数量必须大于0']);
}
}
Object.assign(ele, {
confirmed: 0,
});
});
}
else {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', data, [
'type',
'entity',
'entityId',
'relation',
checker: function (data) {
if (data instanceof Array) {
data.forEach(function (ele) {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', ele, [
'type',
'entity',
'entityId',
'relation',
]);
if (ele.type === 'grant') {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', ele, [
'number',
]);
if (data.type === 'grant') {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', data, ['number']);
if (data.number <= 0) {
throw new types_1.OakInputIllegalException('userEntityGrant', [
'number',
'分享的权限数量必须大于0',
]);
}
if (ele.number <= 0) {
throw new types_1.OakInputIllegalException('userEntityGrant', ['number', '分享的权限数量必须大于0']);
}
Object.assign(data, {
confirmed: 0,
});
}
return [2 /*return*/, 0];
Object.assign(ele, {
confirmed: 0,
});
});
});
}
else {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', data, [
'type',
'entity',
'entityId',
'relation',
]);
if (data.type === 'grant') {
(0, validator_1.checkAttributesNotNull)('userEntityGrant', data, ['number']);
if (data.number <= 0) {
throw new types_1.OakInputIllegalException('userEntityGrant', ['number', '分享的权限数量必须大于0']);
}
}
Object.assign(data, {
confirmed: 0,
});
}
},
},
{
type: 'row',
entity: 'userEntityGrant',
action: ['disable'],
checker: function (event, context, params) { return tslib_1.__awaiter(void 0, void 0, void 0, function () {
var filter, rowStore, _a, userEntityGrant;
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
filter = event.operation.filter;
rowStore = context.rowStore;
return [4 /*yield*/, rowStore.select('userEntityGrant', {
data: {
id: 1,
expired: 1,
},
filter: {
id: filter === null || filter === void 0 ? void 0 : filter.id,
},
indexFrom: 0,
count: 1,
}, context, params)];
case 1:
_a = tslib_1.__read.apply(void 0, [(_b.sent()).result, 1]), userEntityGrant = _a[0];
if (!(userEntityGrant === null || userEntityGrant === void 0 ? void 0 : userEntityGrant.expired)) {
return [2 /*return*/, 1];
}
else {
throw new types_1.OakUserUnpermittedException();
}
return [2 /*return*/];
}
});
}); },
},
filter: {
expired: false,
},
}
];
exports.default = checkers;

View File

@ -1,5 +1,5 @@
import { Checker } from 'oak-domain/lib/types';
import { EntityDict } from '../general-app-domain';
import { RuntimeContext } from '../context/RuntimeContext';
declare const checkers: Checker<EntityDict, 'wechatQrCode', RuntimeContext<EntityDict>>[];
import { RuntimeCxt } from '../types/RuntimeCxt';
declare const checkers: Checker<EntityDict, 'wechatQrCode', RuntimeCxt>[];
export default checkers;

View File

@ -1,19 +1,12 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var checkers = [
{
type: 'data',
action: 'create',
entity: 'wechatQrCode',
checker: function (_a, context) {
var operation = _a.operation;
return tslib_1.__awaiter(void 0, void 0, void 0, function () {
return tslib_1.__generator(this, function (_b) {
return [2 /*return*/, 0];
});
});
checker: function (data) {
},
},
}
];
exports.default = checkers;

View File

@ -1,30 +0,0 @@
.oak-location {
&-map {
width: 100%;
height: 500px;
}
&-list {
height: 500px;
overflow: auto;
&-header {
display: flex;
flex-direction: row;
align-items: center;
}
&-checked {
color: var(--oak-brand-color);
font-size: 24px;
}
&-loadingBox {
display: flex;
flex-direction: row;
justify-content: center;
min-height: 100px;
}
}
}

View File

@ -1,5 +0,0 @@
.oak-map {
width: 500px;
height: 500px;
}

View File

@ -1,28 +0,0 @@
/** index.wxss **/
.page-body {
display: flex;
flex-direction: column;
align-items: stretch;
color: #aaa;
}
.label-bar {
padding: 20rpx;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
}
.label-bar text {
margin-right: 20rpx;
width: 200rpx;
}
.label-bar input {
flex: 1;
}
.usermotto {
margin-top: 200px;
}

View File

@ -1,7 +0,0 @@
<!-- index.wxml -->
<view class="page-body">
<view class="label-bar">
<text>地区名称</text>
<input placeholder="请输入名称" value="{{name}}" type="string" data-path="name" bindinput="setUpdateData" />
</view>
</view>

View File

@ -1,9 +0,0 @@
import React from 'react';
declare type Props = {
icon?: React.ReactNode;
title?: string;
description?: string;
children?: React.ReactNode;
};
declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>;
export default _default;

View File

@ -1,9 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var icons_1 = require("@ant-design/icons");
var index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
var Fail = function (props) { return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: index_module_less_1.default.content }, { children: [props.icon || (0, jsx_runtime_1.jsx)(icons_1.ExclamationCircleOutlined, { className: index_module_less_1.default.icon }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: index_module_less_1.default.title }, { children: props.title || '创建失败' })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: index_module_less_1.default.description }, { children: props.description || '抱歉,创建失败,请联系管理员进行排查!' })), props.children] }))); };
exports.default = (0, react_1.memo)(Fail);

View File

@ -1,34 +0,0 @@
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
// padding: 24px;
min-height: 400px;
color: var(--oak-brand-color);
.icon {
font-size: 72px;
color: var(--oak-text-color-secondary);
}
.title {
font-weight: 500;
font-size: 20px;
line-height: 28px;
margin-top: 8px;
color: var(--oak-text-color-primary);
}
.description {
margin: 8px 0 32px;
font-size: 14px;
line-height: 22px;
color: var(--oak-text-color-secondary);
}
.rightButton {
margin-left: 8px;
}
}

View File

@ -1,9 +0,0 @@
import React from 'react';
declare type Props = {
icon?: React.ReactNode;
title?: string;
description?: string;
children?: React.ReactNode;
};
declare const _default: React.MemoExoticComponent<(props: Props) => JSX.Element>;
export default _default;

View File

@ -1,9 +0,0 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var icons_1 = require("@ant-design/icons");
var index_module_less_1 = tslib_1.__importDefault(require("./index.module.less"));
var Success = function (props) { return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ className: index_module_less_1.default.content }, { children: [props.icon || (0, jsx_runtime_1.jsx)(icons_1.CheckCircleOutlined, { className: index_module_less_1.default.icon }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: index_module_less_1.default.title }, { children: props.title || '创建成功' })), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: index_module_less_1.default.description }, { children: props.description || '恭喜,创建成功,可以在列表中查看。' })), props.children] }))); };
exports.default = (0, react_1.memo)(Success);

View File

@ -1,34 +0,0 @@
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
// padding: 24px;
min-height: 400px;
color: var(--oak-brand-color);
.icon {
font-size: 72px;
color: var(--oak-success-color);
}
.title {
font-weight: 500;
font-size: 20px;
line-height: 28px;
margin-top: 8px;
color: var(--oak-text-color-primary);
}
.description {
margin: 8px 0 32px;
font-size: 14px;
line-height: 22px;
color: var(--oak-text-color-secondary);
}
.rightButton {
margin-left: 8px;
}
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -1,146 +0,0 @@
.oak-empty {
margin: 0 8px;
font-size: 14px;
line-height: 1.5715;
text-align: center;
&-image {
height: 100px;
margin-bottom: 8px;
img {
height: 100%;
}
svg {
height: 100%;
margin: auto;
}
}
&-footer {
margin-top: 16px;
}
&-normal {
margin: 32px 0;
color: var(--oak-text-color-disabled);
.oak-empty-image {
height: 40px;
}
}
&-small {
margin: 8px 0;
color: var(--oak-text-color-disabled);
.oak-empty-image {
height: 35px;
}
}
}
.oak-empty-img-default {
&-ellipse {
fill: #f5f5f5;
fill-opacity: 0.8;
}
&-path {
&-1 {
fill: #aeb8c2;
}
&-2 {
fill: url('#linearGradient-1');
}
&-3 {
fill: #f5f5f7;
}
&-4 {
fill: #dce0e6;
}
&-5 {
fill: #dce0e6;
}
}
&-g {
fill: var(--oak-font-white-1);
}
}
.oak-empty-img-default-dark {
&-ellipse {
fill: var(--oak-font-white-1);
fill-opacity: 0.08;
}
&-path {
&-1 {
fill: #262626;
}
&-2 {
fill: url('#linearGradient-1');
}
&-3 {
fill: #595959;
}
&-4 {
fill: #434343;
}
&-5 {
fill: #595959;
}
}
&-g {
fill: #434343;
}
}
.oak-empty-img-simple {
&-ellipse {
fill: #f5f5f5;
}
&-g {
stroke: #d9d9d9;
}
&-path {
fill: #fafafa;
}
}
.oak-empty-img-simple-dark {
&-ellipse {
fill: var(--oak-font-white-1);
fill-opacity: 0.08;
}
&-g {
stroke: #434343;
}
&-path {
fill: #262626;
stroke: #434343;
}
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import './index.less';
declare const Empty: () => JSX.Element;
export default Empty;

View File

@ -1,32 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_17_619)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
<g filter="url(#filter0_f_17_619)">
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB" />
</g>
<g filter="url(#filter1_f_17_619)">
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB" />
</g>
<rect x="46" y="105" width="32" height="2" fill="white" />
<rect x="46" y="98" width="32" height="2" fill="white" />
<rect x="46" y="88" width="16" height="2" fill="white" />
</g>
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor" />
<mask id="mask1_17_619" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
</mask>
<g mask="url(#mask1_17_619)">
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
<g opacity="0.3" filter="url(#filter2_f_17_619)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
</g>
</g>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M95.6863 40.8577L105.964 51.1345C106.295 51.0466 106.642 50.9998 107 50.9998C109.213 50.9998 111 52.7865 111 54.9998C111 55.3574 110.953 55.7038 110.866 56.0333L121.142 66.3135L118.314 69.1419L113.716 64.5448C111.653 65.423 109.384 65.9089 107 65.9089C99.7273 65.9089 93.5164 61.3853 91 54.9998C92.1785 52.0093 94.1673 49.4271 96.6961 47.5268L92.8579 43.6861L95.6863 40.8577ZM99 54.9998C99 59.4158 102.584 62.9998 107 62.9998C108.483 62.9998 109.872 62.5957 111.063 61.8917L108.034 58.8657C107.704 58.9532 107.358 58.9998 107 58.9998C104.787 58.9998 103 57.2131 103 54.9998C103 54.6423 103.047 54.2958 103.134 53.9663L100.107 50.9389C99.4037 52.1295 99 53.5178 99 54.9998ZM107 44.0907C114.273 44.0907 120.484 48.6143 123 54.9998C122.071 57.3574 120.638 59.4612 118.834 61.1773L114.729 57.0717C114.906 56.4108 115 55.7162 115 54.9998C115 50.5838 111.416 46.9998 107 46.9998C106.284 46.9998 105.589 47.0941 104.928 47.2711L102.378 44.7205C103.848 44.3101 105.398 44.0907 107 44.0907Z"
fill="white" />
<rect x="68" y="24" width="2" height="2" fill="white" />
<rect x="74" y="24" width="2" height="2" fill="white" />
<rect x="80" y="24" width="66" height="2" fill="white" />
<path d="M157 53.9998L181.249 95.9998H132.751L157 53.9998Z" fill="white" stroke="black" />
<path d="M157 88.9998L157 70.9998" stroke="black" />
</svg>

Before

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -1,36 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_16559_24301)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
<g filter="url(#filter0_f_16559_24301)">
<rect x="12" y="84" width="80" height="60" fill="#E3E6EB" />
</g>
<g filter="url(#filter1_f_16559_24301)">
<rect x="80" y="54" width="80" height="60" fill="#E3E6EB" />
</g>
<path d="M49 93L42 100L49 107" stroke="white" stroke-width="2" />
<path d="M69 107L76 100L69 93" stroke="white" stroke-width="2" />
<path d="M62.3647 87.4431L55.6355 112.557" stroke="white" stroke-width="2" />
</g>
<path opacity="0.9" d="M63 20H151V30H63V20Z" fill="currentcolor" />
<mask id="mask1_16559_24301" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="63" y="30" width="88" height="50">
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
</mask>
<g mask="url(#mask1_16559_24301)">
<path d="M63 30H151V80H63V30Z" fill="currentcolor" />
<g opacity="0.3" filter="url(#filter2_f_16559_24301)">
<path d="M30 62H118V122H30V62Z" fill="#97A3B7" />
</g>
</g>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M105.25 41C112.015 41 117.5 46.4845 117.5 53.25C117.5 55.6827 116.791 57.9498 115.568 59.8558L121 65.2877L117.288 69L111.856 63.5681C109.95 64.7909 107.683 65.5 105.25 65.5C98.4845 65.5 93 60.0155 93 53.25C93 46.4845 98.4845 41 105.25 41ZM105.25 44.5C100.418 44.5 96.5 48.4175 96.5 53.25C96.5 58.0825 100.418 62 105.25 62C110.082 62 114 58.0825 114 53.25C114 48.4175 110.082 44.5 105.25 44.5Z"
fill="white" />
<rect x="68" y="24" width="2" height="2" fill="white" />
<rect x="74" y="24" width="2" height="2" fill="white" />
<rect x="80" y="24" width="66" height="2" fill="white" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M153 56C140.85 56 131 65.8497 131 78C131 82.6039 132.414 86.8776 134.832 90.4102L127 98.5L139.495 95.3681C143.222 98.2709 147.909 100 153 100C165.15 100 175 90.1503 175 78C175 65.8497 165.15 56 153 56Z"
fill="white" />
<path
d="M131 78L131.5 78V78L131 78ZM134.832 90.4102L135.191 90.758L135.475 90.4647L135.245 90.1278L134.832 90.4102ZM127 98.5L126.641 98.1522L125.422 99.411L127.122 98.985L127 98.5ZM139.495 95.3681L139.802 94.9736L139.61 94.8238L139.373 94.8831L139.495 95.3681ZM153 100L153 100.5L153 100.5L153 100ZM175 78L174.5 78L174.5 78L175 78ZM131.5 78C131.5 66.1259 141.126 56.5 153 56.5V55.5C140.574 55.5 130.5 65.5736 130.5 78L131.5 78ZM135.245 90.1278C132.882 86.6757 131.5 82.5 131.5 78H130.5C130.5 82.7079 131.946 87.0794 134.419 90.6926L135.245 90.1278ZM134.473 90.0624L126.641 98.1522L127.359 98.8478L135.191 90.758L134.473 90.0624ZM127.122 98.985L139.616 95.8531L139.373 94.8831L126.878 98.015L127.122 98.985ZM153 99.5C148.024 99.5 143.445 97.8105 139.802 94.9736L139.187 95.7626C143 98.7314 147.794 100.5 153 100.5V99.5ZM174.5 78C174.5 89.8741 164.874 99.5 153 99.5L153 100.5C165.426 100.5 175.5 90.4264 175.5 78L174.5 78ZM153 56.5C164.874 56.5 174.5 66.1259 174.5 78H175.5C175.5 65.5736 165.426 55.5 153 55.5V56.5Z"
fill="black" />
</svg>

Before

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -1,32 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_16559_24251)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7" />
<g filter="url(#filter0_f_16559_24251)">
<rect x="46.3911" y="92" width="80" height="60" fill="#E3E6EB" />
</g>
<g filter="url(#filter1_f_16559_24251)">
<rect y="23" width="80" height="60" fill="#E3E6EB" />
</g>
</g>
<mask id="mask1_16559_24251" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="80" y="9" width="78" height="88">
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentcolor" />
</mask>
<g mask="url(#mask1_16559_24251)">
<path fill-rule="evenodd" clip-rule="evenodd" d="M80.895 31V75L119 97L157.105 75V31L119 53L80.895 31Z"
fill="currentcolor" />
<path opacity="0.9" d="M119 -35L157.105 -13L157.105 31.5L119 53.5L80.8952 31.5L80.895 -13L119 -35Z"
fill="currentcolor" />
<g opacity="0.3" filter="url(#filter2_f_16559_24251)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7" />
</g>
</g>
<path
d="M143 68.822L147.867 85.875L148 86.3405L148.469 86.2228L165.671 81.911L153.336 94.6522L152.999 95L153.336 95.3478L165.671 108.089L148.469 103.777L148 103.659L147.867 104.125L143 121.178L138.133 104.125L138 103.659L137.531 103.777L120.329 108.089L132.664 95.3478L133.001 95L132.664 94.6522L120.329 81.911L137.531 86.2228L138 86.3405L138.133 85.875L143 68.822Z"
fill="white" stroke="black" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M123.243 35.0821L126.071 33.4493L123.243 31.8164L120.414 33.4493L123.243 35.0821ZM119 32.6329L121.828 31L114.757 26.9179L111.929 28.5507L119 32.6329ZM127.485 35.8986C122.806 38.6001 115.194 38.6001 110.515 35.8986C105.835 33.197 105.835 28.803 110.515 26.1014C115.194 23.3999 122.806 23.3999 127.485 26.1014C132.165 28.803 132.165 33.197 127.485 35.8986ZM107.686 24.4686C101.438 28.0756 101.438 33.9244 107.686 37.5314C113.934 41.1384 124.066 41.1384 130.314 37.5314C136.562 33.9244 136.562 28.0756 130.314 24.4686C124.066 20.8616 113.934 20.8616 107.686 24.4686Z"
fill="white" />
<path fill-rule="evenodd" clip-rule="evenodd"
d="M41.8989 86.2863L44.7272 87.9193L44.7275 94.4512L41.8992 92.8181L41.8989 86.2863ZM53.9194 93.2269L56.7477 94.86L56.7479 101.392L53.9196 99.7587L53.9194 93.2269ZM44.7281 107.515L41.8999 105.882L41.9 109.148L44.7283 110.781L44.7282 107.515L53.92 112.822L53.9201 116.088L56.7484 117.721L56.7483 114.455L53.9201 112.822L53.92 109.556L44.728 104.249L44.7281 107.515Z"
fill="white" />
</svg>

Before

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,33 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_22_990)">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M144.569 105.61L96.5692 133.322L48.5693 105.61V83.7121L96.569 55.9995L144.569 83.7122V105.61Z"
fill="#97A3B7" />
<g filter="url(#filter0_f_22_990)">
<rect x="-3" y="33.9995" width="80" height="60" fill="#E3E6EB" />
</g>
<g filter="url(#filter1_f_22_990)">
<rect x="97" y="97.9995" width="80" height="60" fill="#E3E6EB" />
</g>
</g>
<mask id="mask1_22_990" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="53" y="16" width="86" height="69">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z"
fill="currentcolor" />
</mask>
<g mask="url(#mask1_22_990)">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M113.357 42.715L129.829 33.2059C128.859 32.4995 127.789 31.823 126.643 31.1615C121.268 28.0584 114.723 26.0153 107.758 25.023C103.549 19.4606 97.5775 16.1248 90.4344 16.1945C83.6788 16.2821 74.9482 21.9412 68.9271 30.5602C68.096 30.975 67.2847 31.4099 66.4949 31.8659C52.1168 40.1664 49.5542 52.6155 59.0218 61.9309C57.9871 56.1259 58.712 51.0657 62.1231 45.7161C62.0653 46.3482 61.9127 50.143 61.8906 50.7834C61.2209 69.6969 76.9107 84.8409 88.03 84.7113C96.4806 84.6119 103.595 79.6976 108.349 72.0797C114.563 70.8487 120.438 68.786 125.443 65.8968C138.919 58.1167 142.01 46.7146 134.547 37.629L117.948 47.2113C119.71 50.8655 117.997 55.034 112.87 57.9936C107.744 60.9532 100.523 61.9424 94.1928 60.9252C91.3499 60.4563 88.6706 59.5834 86.4524 58.3029L86.4042 58.275L113.357 42.715ZM78.6546 53.7727C72.5285 49.7965 72.9717 43.5469 79.8498 39.5762C86.7276 35.6056 97.5532 35.3496 104.441 38.8864L78.6546 53.7727ZM93.5561 18.1703C98.1657 18.1302 102.284 20.5752 105.496 24.7401C97.0486 23.8219 88.1122 24.4143 79.9732 26.5054C83.672 21.3809 88.444 18.2301 93.5561 18.1703ZM91.3238 81.6169C85.471 81.685 80.3525 77.691 76.9473 71.2848C85.7921 73.6267 95.8719 74.0599 105.374 72.6022C101.618 78.1222 96.6601 81.5531 91.3238 81.6169Z"
fill="currentcolor" />
<g opacity="0.3" filter="url(#filter2_f_22_990)">
<path d="M96.569 55.9995L144.569 83.7122V139.138L96.569 166.85L48.5692 139.138V83.7122L96.569 55.9995Z"
fill="#97A3B7" />
</g>
</g>
<ellipse cx="155" cy="78" rx="22" ry="22" transform="rotate(180 155 78)" fill="white" stroke="black" />
<path d="M155 83L155 65" stroke="black" />
<rect x="155" y="87" width="0.00390625" height="0.00390625" fill="#C4C4C4" stroke="black" stroke-width="2"
stroke-linejoin="round" />
<path d="M96.5693 112L96.5693 87.9995" stroke="white" stroke-width="2" />
<path d="M86.5693 97.9995L96.5693 87.9995L106.569 97.9995" stroke="white" stroke-width="2" />
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

View File

@ -1,49 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<mask id="mask0_216_313" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="80" y="9" width="78" height="88">
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentColor"/>
</mask>
<g mask="url(#mask0_216_313)">
<path d="M119 9L157.105 31V75L119 97L80.8949 75V31L119 9Z" fill="currentColor"/>
<path opacity="0.9" d="M119 -35L157.105 -13V31L119 53L80.8949 31V-13L119 -35Z" fill="currentColor" />
<g opacity="0.3" filter="url(#filter0_f_216_313)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
</g>
</g>
<mask id="mask1_216_313" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="29" y="48" width="78" height="88">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
</mask>
<g mask="url(#mask1_216_313)">
<path d="M68 48L106.105 70V114L68 136L29.8949 114V70L68 48Z" fill="#97A3B7"/>
<g filter="url(#filter1_f_216_313)">
<rect x="46.3906" y="92" width="80" height="60" fill="#E3E6EB"/>
</g>
<g filter="url(#filter2_f_216_313)">
<rect y="23" width="80" height="60" fill="#E3E6EB"/>
</g>
</g>
<path d="M41.8984 86.2866L44.7267 87.9197L44.727 94.4515L41.8987 92.8185L41.8984 86.2866Z" fill="white"/>
<path d="M53.9189 93.2273L56.7472 94.8603L56.7474 101.392L53.9191 99.7591L53.9189 93.2273Z" fill="white"/>
<path d="M44.7276 107.515L41.8994 105.882L41.8995 109.148L44.7278 110.781L44.7276 107.515L53.9195 112.823L53.9196 116.088L56.7479 117.721L56.7478 114.455L53.9195 112.823L53.9195 109.557L44.7275 104.249L44.7276 107.515Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M108.348 23.4792C106.188 25.9904 106.535 29.3829 109.395 31.5604C112.66 34.0461 117.963 34.007 121.24 31.4731C124.516 28.9392 124.526 24.8699 121.261 22.3841C118.401 20.2066 113.977 19.9666 110.721 21.6439L115.923 25.6047L113.55 27.4399L108.348 23.4792Z" fill="white"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M120.865 33.0087L129.83 39.8346L132.203 37.9994L123.238 31.1735C122.917 31.521 122.554 31.8531 122.149 32.1657C121.745 32.4784 121.315 32.7594 120.865 33.0087ZM119.662 32.0932C120.123 31.8557 120.561 31.5798 120.967 31.2655C121.373 30.9513 121.73 30.6134 122.035 30.2579L122.035 30.2579C121.73 30.6134 121.373 30.9513 120.967 31.2655C120.561 31.5798 120.123 31.8557 119.662 32.0931L119.662 32.0932Z" fill="white"/>
<path d="M144 70L168.249 112H119.751L144 70Z" fill="white" stroke="#181818"/>
<path d="M144 100L144 82" stroke="#181818"/>
<path d="M144 105H144.004V105.004H144V105Z" stroke="#181818" stroke-width="2" stroke-linejoin="round"/>
<defs>
<filter id="filter0_f_216_313" x="23.8949" y="42" width="88.2102" height="100" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="3" result="effect1_foregroundBlur_216_313"/>
</filter>
<filter id="filter1_f_216_313" x="-3.60938" y="42" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_216_313"/>
</filter>
<filter id="filter2_f_216_313" x="-50" y="-27" width="180" height="160" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/>
<feGaussianBlur stdDeviation="25" result="effect1_foregroundBlur_216_313"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -1,23 +0,0 @@
<svg width="200" height="140" viewBox="0 0 200 140" fill="none" xmlns="http://www.w3.org/2000/svg">
<g mask="url(#mask0_21_716)">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M33 46.843L96.3214 119L159.643 46.843C142.742 31.9998 120.583 23 96.3214 23C72.0601 23 49.9009 31.9998 33 46.843Z"
fill="#97A3B7" />
<g filter="url(#filter0_f_21_716)">
<rect x="95" y="21" width="80" height="60" fill="#E3E6EB" />
</g>
<g filter="url(#filter1_f_21_716)">
<rect x="-7" y="43" width="80" height="60" fill="#E3E6EB" />
</g>
</g>
<path
d="M72.8122 63.6882L69.6548 66.8455L75.9009 73.0916C71.2469 75.1648 66.9663 77.925 63.188 81.2433L96.3213 119L108.234 105.425L114.647 111.837L117.804 108.68L80.4504 71.3261C80.4505 71.3261 80.4503 71.3261 80.4504 71.3261L72.8122 63.6882Z"
fill="currentcolor" />
<path
d="M129.455 81.2433L114.137 98.6982L85.3974 69.9585C88.9142 69.1786 92.5697 68.7674 96.3213 68.7674C109.016 68.7674 120.611 73.4766 129.455 81.2433Z"
fill="currentcolor" />
<path
d="M152 21.822L156.867 38.875L157 39.3405L157.469 39.2228L174.671 34.911L162.336 47.6522L161.999 48L162.336 48.3478L174.671 61.089L157.469 56.7772L157 56.6595L156.867 57.125L152 74.178L147.133 57.125L147 56.6595L146.531 56.7772L129.329 61.089L141.664 48.3478L142.001 48L141.664 47.6522L129.329 34.911L146.531 39.2228L147 39.3405L147.133 38.875L152 21.822Z"
fill="white" stroke="black" />
<path d="M101 31L90 42L101 53L93 61" stroke="white" stroke-width="2" />
</svg>

Before

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,35 +0,0 @@
.oak-errorBox {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
// padding: 24px;
min-height: 400px;
color: var(--oak-brand-color);
img {
width: 200px;
height: 140px;
color: var(--oak-brand-color);
}
&__title {
font-weight: 500;
font-size: 20px;
line-height: 28px;
margin-top: 8px;
color: var(--oak-text-color-primary);
}
&__description {
margin: 8px 0 32px;
font-size: 14px;
line-height: 22px;
color: var(--oak-text-color-secondary);
}
&__rightButton {
margin-left: 8px;
}
}

View File

@ -1,69 +0,0 @@
.oak-grid {
flex-wrap: wrap;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: flex;
box-sizing: border-box;
&-item {
display: flex;
flex-direction: column;
padding-left: 0px;
padding-right: 0px;
align-items: center;
justify-content: center;
text-align: center;
padding-bottom: 6px;
padding-top: 6px;
&-column {
&-1 {
flex-basis: 100%;
}
&-2 {
flex-basis: 50%;
}
&-3 {
flex-basis: 33.33%;
}
&-4 {
flex-basis: 25%;
}
&-5 {
flex-basis: 20%;
}
&-6 {
flex-basis: 16.66%;
}
&-7 {
flex-basis: 14.28%;
}
&-8 {
flex-basis: 12.5%;
}
}
&-image {
display: block;
height: 42px;
width: 100%;
}
&-title {
color: #000000e6;
font-size: 12px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
}
}

View File

@ -1,13 +0,0 @@
.chineseInput {
:global {
// 隐藏safari表单输入项右侧出现的图标
input::-webkit-contacts-auto-fill-button {
visibility: hidden;
display: none !important;
pointer-events: none;
position: absolute;
right: 0;
}
}
}

View File

@ -1,64 +0,0 @@
.oak-pageHeader {
display: flex;
flex-direction: column;
&-header {
margin: 0;
font-size: 0;
height: auto;
line-height: inherit;
min-height: inherit;
position: relative;
padding: 10px 20px;
color: #000;
background: var(--oak-bg-color-container);
&-backIcon {
width: 16px;
height: 16px;
font-size: 16px;
}
&-title {
display: inline-block;
vertical-align: middle;
font-size: 16px;
font-weight: 700;
margin-right: 20px;
max-width: 70%;
overflow: hidden;
white-space: nowrap;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
height: 30px;
line-height: 30px;
}
&-subTitle {
font-size: 12px;
display: inline-block;
vertical-align: middle;
margin-right: 20px;
}
&-back {
margin-right: 24px;
}
&-col {
display: flex;
align-items: center;
}
}
&-content {
display: flex;
flex-direction: column;
&-margin {
margin: 20px;
}
}
}

View File

@ -1,28 +0,0 @@
.oak-qrCodeBox {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
&_caption {
color: var(--oak-text-color-secondary);
font-size: var(--oak-font-size-body-small);
line-height: var(--oak-line-height-body-small);
}
&_actions {
margin-top: 10px;
&_downloadIcon {
color: var(--oak-brand-color);
font-size: 24px;
}
&_refreshIcon {
color: var(--oak-brand-color);
font-size: 24px;
}
}
}

View File

@ -1,34 +0,0 @@
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
// padding: 24px;
min-height: 400px;
color: var(--oak-brand-color);
.icon {
font-size: 72px;
color: var(--oak-text-color-secondary);
}
.title {
font-weight: 500;
font-size: 20px;
line-height: 28px;
margin-top: 8px;
color: var(--oak-text-color-primary);
}
.description {
margin: 8px 0 32px;
font-size: 14px;
line-height: 22px;
color: var(--oak-text-color-secondary);
}
.rightButton {
margin-left: 8px;
}
}

View File

@ -1,34 +0,0 @@
.content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 75vh;
// padding: 24px;
min-height: 400px;
color: var(--oak-brand-color);
.icon {
font-size: 72px;
color: var(--oak-success-color);
}
.title {
font-weight: 500;
font-size: 20px;
line-height: 28px;
margin-top: 8px;
color: var(--oak-text-color-primary);
}
.description {
margin: 8px 0 32px;
font-size: 14px;
line-height: 22px;
color: var(--oak-text-color-secondary);
}
.rightButton {
margin-left: 8px;
}
}

View File

@ -1,105 +0,0 @@
.oak-tabBar {
flex-wrap: nowrap;
display: -webkit-inline-box;
display: -ms-inline-flexbox;
display: flex;
box-sizing: border-box;
background-color: #fff;
height: 48px;
position: relative;
width: 100%;
&--fixed {
bottom: 0;
left: 0;
position: fixed;
}
&--bordered {
::before {
border-top: 1px solid #e7e7e7;
top: 0;
}
::after {
border-bottom: 1px solid #e7e7e7;
bottom: 0;
}
}
&-item {
display: flex;
flex-direction: column;
padding-left: 0px;
padding-right: 0px;
align-items: center;
justify-content: center;
text-align: center;
color: #0009;
::after {
border-left: 1px solid #e7e7e7;
}
:first-child::before {
border: unset;
}
&-column {
&-1 {
flex-basis: 100%;
}
&-2 {
flex-basis: 50%;
}
&-3 {
flex-basis: 33.33%;
}
&-4 {
flex-basis: 25%;
}
&-5 {
flex-basis: 20%;
}
&-6 {
flex-basis: 16.66%;
}
&-7 {
flex-basis: 14.28%;
}
&-8 {
flex-basis: 12.5%;
}
}
&-checked {
color: var(--oak-brand-color);
}
&-image {
display: block;
height: 24px;
width: 100%;
}
&-icon {}
&-text {
font-size: 10px;
line-height: 18px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
word-break: break-all;
}
}
}

View File

@ -1,208 +0,0 @@
.oak-typography {
overflow-wrap: break-word;
&-link {
color: var(--oak-brand-color);
outline: none;
cursor: pointer;
transition: color .3s;
text-decoration: none;
background-color: transparent;
}
&-italic {
font-style: italic;
}
&-strong {
font-weight: 600;
}
&-underline {
text-decoration: underline;
}
&-delete {
text-decoration: line-through;
}
&-code {
margin: 0 0.2em;
padding: 0.2em 0.4em 0.1em;
font-size: 85%;
background: rgba(150, 150, 150, .1);
border: 1px solid rgba(100, 100, 100, .2);
border-radius: 3px;
}
&-keyboard {
margin: 0 0.2em;
padding: 0.15em 0.4em 0.1em;
font-size: 90%;
background: rgba(150, 150, 150, .06);
border: 1px solid rgba(100, 100, 100, .2);
border-bottom-width: 2px;
border-radius: 3px;
}
&-mark {
padding: 0;
background-color: #ffe58f;
}
&-disabled {
cursor: not-allowed;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
&-link {
&-small {
font-size: var(--oak-font-size-link-small);
line-height: var(--oak-line-height-link-small);
}
&-medium {
font-size: var(--oak-font-size-link-medium);
line-height: var(--oak-line-height-link-medium);
}
&-large {
font-size: var(--oak-font-size-link-large);
line-height: var(--oak-line-height-link-large);
}
}
&-mark {
&-small {
font-size: var(--oak-font-size-mark-small);
line-height: var(--oak-line-height-mark-small);
}
&-medium {
font-size: var(--oak-font-size-mark-medium);
line-height: var(--oak-line-height-mark-medium);
}
&-large {
font-size: var(--oak-font-size-body-large);
line-height: var(--oak-line-height-body-large);
}
}
&-body {
&-small {
font-size: var(--oak-font-size-body-small);
line-height: var(--oak-line-height-body-small);
}
&-medium {
font-size: var(--oak-font-size-body-medium);
line-height: var(--oak-line-height-body-medium);
}
&-large {
font-size: var(--oak-font-size-body-large);
line-height: var(--oak-line-height-body-large);
}
}
&-title {
&-small {
font-size: var(--oak-font-size-title-small);
line-height: var(--oak-line-height-title-small);
}
&-medium {
font-size: var(--oak-font-size-title-medium);
line-height: var(--oak-line-height-title-medium);
}
&-large {
font-size: var(--oak-font-size-title-large);
line-height: var(--oak-line-height-title-large);
}
}
&-headline {
&-small {
font-size: var(--oak-font-size-headline-small);
line-height: var(--oak-line-height-headline-small);
}
&-medium {
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
&-large {
font-size: var(--oak-font-size-headline-large);
line-height: var(--oak-line-height-headline-large);
}
}
&-display {
&-small {
font-size: 40px;
line-height: 48px;
}
&-medium {
font-size: var(--oak-font-size-display-medium);
line-height: var(--oak-line-height-display-medium);
}
&-large {
font-size: var(--oak-font-size-display-large);
line-height: var(--oak-line-height-display-large);
}
}
&-color {
&-default {
color: var(--oak-text-color-primary);
}
&-secondary {
color: var(--oak-text-color-secondary);
}
&-primary {
color: var(--oak-brand-color);
}
&-danger {
color: var(--oak-error-color);
}
&-warning {
color: var(--oak-warning-color);
}
&-success {
color: var(--oak-success-color);
}
&-link {
color: var(--oak-text-color-link);
}
&-placeholder {
color: var(--oak-text-color-placeholder);
}
&-disabled {
color: var(--oak-text-color-disabled);
}
&-anti {
color: var(--oak-text-color-anti);
}
&-brand {
color: var(--oak-text-color-brand);
}
}
}

View File

@ -1,187 +0,0 @@
.oak-loginGrant {
&_dev {
height: 280px;
border: 1px dashed var(--oak-component-stroke);
padding: 10px;
&_header {
display: flex;
flex-direction: column;
align-items: center;
&_input {
border: none;
outline: none;
font-size: 48px;
font-weight: 500;
width: 200px;
text-align: center;
}
&_input:focus {
border: none;
box-shadow: none;
}
&_btn {
width: 60px;
height: 60px;
margin-top: 16px;
border-radius: 30px;
background-color: transparent;
color: #000000d9;
border: 1px solid #d9d9d9;
font-size: 14px;
line-height: 24px;
box-shadow: 0 2px #00000004;
cursor: pointer;
transition: .3s;
}
&_btn:hover {
color: var(--oak-brand-color-7);
border-color: currentColor;
}
&_btn::after {
/*其他样式*/
opacity: 0;
box-shadow: 0 0 0 6px var(--oak-brand-color);
transition: .3s;
}
/*点击*/
&_btn:active::after {
box-shadow: none;
opacity: 0.4;
transition: 0s;
/*取消过渡*/
}
}
&_bottom {
display: flex;
flex-direction: column;
margin-top: 16px;
&_title {
font-size: 16px;
line-height: 26px;
color: var(--oak-text-color-primary);
text-align: center;
margin-bottom: 8px;
}
&_desc {
font-size: 12px;
line-height: 20px;
color: var(--oak-text-color-secondary);
}
}
}
&_prod {
height: 280px;
border: 1px dashed var(--oak-component-stroke);
padding: 10px;
&_header {
display: flex;
flex-direction: column;
align-items: center;
&_input {
border: none;
outline: none;
font-size: 48px;
font-weight: 500;
width: 200px;
text-align: center;
}
&_input:focus {
border: none;
box-shadow: none;
}
&_btn {
width: 60px;
height: 60px;
margin-top: 16px;
border-radius: 30px;
background-color: transparent;
color: #000000d9;
border: 1px solid #d9d9d9;
font-size: 14px;
line-height: 24px;
box-shadow: 0 2px #00000004;
cursor: pointer;
transition: .3s;
}
&_btn:hover {
color: var(--oak-brand-color-7);
border-color: currentColor;
}
&_btn::after {
/*其他样式*/
opacity: 0;
box-shadow: 0 0 0 6px var(--oak-brand-color);
transition: .3s;
}
/*点击*/
&_btn:active::after {
box-shadow: none;
opacity: 0.4;
transition: 0s;
/*取消过渡*/
}
}
&_bottom {
display: flex;
flex-direction: column;
margin-top: 16px;
&_title {
font-size: 16px;
line-height: 26px;
color: var(--oak-text-color-primary);
text-align: center;
margin-bottom: 8px;
}
&_desc {
font-size: 12px;
line-height: 20px;
color: var(--oak-text-color-secondary);
}
}
}
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import './index.less';
interface QrCodeProps {
id?: string;

View File

@ -1,98 +0,0 @@
.oak-loginQrCode {
iframe {
height: 280px !important;
}
&_dev {
height: 280px;
border: 1px dashed var(--oak-component-stroke);
padding: 10px;
&_header {
display: flex;
flex-direction: column;
align-items: center;
&_input {
border: none;
outline: none;
font-size: 48px;
font-weight: 500;
width: 200px;
text-align: center;
}
&_input:focus {
border: none;
box-shadow: none;
}
&_btn {
width: 60px;
height: 60px;
margin-top: 16px;
border-radius: 30px;
background-color: transparent;
color: #000000d9;
border: 1px solid #d9d9d9;
font-size: 14px;
line-height: 24px;
box-shadow: 0 2px #00000004;
cursor: pointer;
transition: .3s;
}
&_btn:hover {
color: var(--oak-brand-color-7);
border-color: currentColor;
}
&_btn::after {
/*其他样式*/
opacity: 0;
box-shadow: 0 0 0 6px var(--oak-brand-color);
transition: .3s;
}
/*点击*/
&_btn:active::after {
box-shadow: none;
opacity: 0.4;
transition: 0s;
/*取消过渡*/
}
}
&_bottom {
display: flex;
flex-direction: column;
margin-top: 16px;
&_title {
font-size: 16px;
line-height: 26px;
color: var(--oak-text-color-primary);
text-align: center;
margin-bottom: 8px;
}
&_desc {
font-size: 12px;
line-height: 20px;
color: var(--oak-text-color-secondary);
}
}
}
}

View File

@ -1,38 +0,0 @@
.container {
background: var(--oak-bg-color-container);
// box-shadow: 0 2px 3px #0000001a;
// border-radius: 3px;
padding: 30px 32px;
}
.padding {
background-color: var(--oak-bg-color-page);
width: 100%;
height: 77px;
}
.ctrl {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10px;
border: solid 0.4px;
border-radius: 3px;
border-color: var(--oak-component-border);
position: absolute;
z-index: 10;
background-color: var(--oak-bg-color-container-hover);
width: calc(100vw - 138px);
top: 85px;
height: 55px;
text {
color: var(--oak-text-color-secondary);
.weight {
font-weight: bold;
color: var(--oak-text-color-primary);
text-decoration: underline;
}
}
}

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WebConfig } from '../../../../general-app-domain/Application/Schema';
export default function Web(props: {
config: WebConfig;

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatMpConfig } from '../../../../general-app-domain/Application/Schema';
export default function WechatMp(props: {
config: WechatMpConfig;

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { WechatPublicConfig } from '../../../../general-app-domain/Application/Schema';
export default function WechatPublic(props: {
config: WechatPublicConfig;

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Account(props: {
account: Required<Config>['Account'];

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
cos: Required<Config>['Cos'];

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
live: Required<Config>['Live'];

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,4 +1,3 @@
/// <reference types="react" />
import { Config } from '../../../../types/Config';
export default function Cos(props: {
map: Required<Config>['Map'];

View File

@ -1,16 +0,0 @@
.label {
color: var(--oak-text-color-primary);
font-size: var(--oak-font-size-headline-medium);
line-height: var(--oak-line-height-headline-medium);
}
.tips {
color: var(--oak-gray-color-6);
font-size: var(--oak-font-size-mark-small);
}
.title {
margin-bottom: 0px;
margin-top:36px;
}

View File

@ -1,38 +0,0 @@
.container {
background: var(--oak-bg-color-container);
// box-shadow: 0 2px 3px #0000001a;
// border-radius: 3px;
padding: 30px 32px;
}
.padding {
background-color: var(--oak-bg-color-page);
width: 100%;
height: 77px;
}
.ctrl {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
padding: 10px;
border: solid 0.4px;
border-radius: 3px;
border-color: var(--oak-component-border);
position: absolute;
z-index: 10;
background-color: var(--oak-bg-color-container-hover);
width: calc(100vw - 138px);
top: 85px;
height: 55px;
text {
color: var(--oak-text-color-secondary);
.weight {
font-weight: bold;
color: var(--oak-text-color-primary);
text-decoration: underline;
}
}
}

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;

View File

@ -1,11 +0,0 @@
/** index.wxss **/
.image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1rpx solid #eee;
border-radius: 4rpx;
}

View File

@ -1,2 +0,0 @@
<!-- index.wxml -->
<image src="{{src}}" mode="{{mode}}" class="image l-class"/>

View File

@ -1,2 +1 @@
/// <reference types="react" />
export default function render(): JSX.Element;

View File

@ -1,9 +0,0 @@
.container {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: 'center';
align-items: 'center';
}

View File

@ -1,6 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var uuid_1 = require("oak-domain/lib/utils/uuid");
var assert_1 = tslib_1.__importDefault(require("assert"));
var index_1 = tslib_1.__importDefault(require("../../../utils/dialog/index"));
var extraFile_1 = require("../../../utils/extraFile");
@ -58,9 +59,6 @@ exports.default = OakComponent({
externalClasses: ['l-class', 'l-item-class'],
},
properties: {
oakFullpath: String,
oakParent: String,
oakPath: String,
removeLater: Boolean,
autoUpload: {
type: Boolean,
@ -247,10 +245,9 @@ exports.default = OakComponent({
pushExtraFile: function (options, callback) {
return tslib_1.__awaiter(this, void 0, void 0, function () {
var _a, type, origin, tag1, tag2, entity, entityId, autoUpload, name, extra1, fileType, size, extension, filename, updateData, bucket, error_1;
var _b;
var _this = this;
return tslib_1.__generator(this, function (_c) {
switch (_c.label) {
return tslib_1.__generator(this, function (_b) {
switch (_b.label) {
case 0:
_a = this.props, type = _a.type, origin = _a.origin, tag1 = _a.tag1, tag2 = _a.tag2, entity = _a.entity, entityId = _a.entityId, autoUpload = _a.autoUpload;
name = options.name, extra1 = options.extra1, fileType = options.fileType, size = options.size;
@ -258,36 +255,31 @@ exports.default = OakComponent({
filename = name.substring(0, name.lastIndexOf('.'));
(0, assert_1.default)(entity, '必须传入entity');
(0, assert_1.default)(origin === 'qiniu', '目前只支持七牛上传'); // 目前只支持七牛上传
_b = {
updateData = {
extra1: extra1,
origin: origin,
type: type || 'file',
tag1: tag1,
tag2: tag2
tag2: tag2,
objectId: (0, uuid_1.generateNewId)(),
entity: entity,
filename: filename,
size: size,
extension: extension,
fileType: fileType,
id: (0, uuid_1.generateNewId)(),
entityId: entityId,
};
return [4 /*yield*/, generateNewId()];
case 1:
_b.objectId = _c.sent(),
_b.entity = entity,
_b.filename = filename,
_b.size = size,
_b.extension = extension,
_b.fileType = fileType;
return [4 /*yield*/, generateNewId()];
case 2:
updateData = (_b.id = _c.sent(),
_b.entityId = entityId,
_b);
if (!autoUpload) return [3 /*break*/, 9];
if (!autoUpload) return [3 /*break*/, 7];
if (callback) {
callback(updateData, 'uploading');
}
_c.label = 3;
case 3:
_c.trys.push([3, 5, , 6]);
_b.label = 1;
case 1:
_b.trys.push([1, 3, , 4]);
return [4 /*yield*/, this.features.extraFile.upload(updateData)];
case 4:
bucket = (_c.sent()).bucket;
case 2:
bucket = (_b.sent()).bucket;
Object.assign(updateData, {
bucket: bucket,
extra1: null,
@ -295,28 +287,22 @@ exports.default = OakComponent({
if (callback) {
callback(updateData, 'success');
}
return [3 /*break*/, 6];
case 5:
error_1 = _c.sent();
return [3 /*break*/, 4];
case 3:
error_1 = _b.sent();
if (callback) {
callback(updateData, 'failed');
}
//todo 保存extraFile失败 需要remove七牛图片
throw error_1;
case 6: return [4 /*yield*/, this.addOperation({
action: 'create',
data: updateData,
})];
case 7:
_c.sent();
case 4: return [4 /*yield*/, this.addItem(updateData)];
case 5:
_b.sent();
return [4 /*yield*/, this.execute()];
case 8:
_c.sent();
return [3 /*break*/, 11];
case 9: return [4 /*yield*/, this.addOperation({
action: 'create',
data: updateData,
}, function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
case 6:
_b.sent();
return [3 /*break*/, 9];
case 7: return [4 /*yield*/, this.addItem(updateData, function () { return tslib_1.__awaiter(_this, void 0, void 0, function () {
var bucket;
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
@ -336,10 +322,10 @@ exports.default = OakComponent({
}
});
}); })];
case 10:
_c.sent();
_c.label = 11;
case 11: return [2 /*return*/];
case 8:
_b.sent();
_b.label = 9;
case 9: return [2 /*return*/];
}
});
});
@ -386,13 +372,7 @@ exports.default = OakComponent({
value = event.currentTarget.dataset.value;
id = value.id, bucket = value.bucket;
if (!(this.props.removeLater || (origin !== 'unknown' && !bucket))) return [3 /*break*/, 2];
return [4 /*yield*/, this.addOperation({
action: 'remove',
data: {},
filter: {
id: id,
},
})];
return [4 /*yield*/, this.removeItem(id)];
case 1:
_a.sent();
return [3 /*break*/, 6];
@ -404,13 +384,7 @@ exports.default = OakComponent({
result = _a.sent();
confirm_1 = result.confirm;
if (!confirm_1) return [3 /*break*/, 6];
return [4 /*yield*/, this.addOperation({
action: 'remove',
data: {},
filter: {
id: id,
},
})];
return [4 /*yield*/, this.removeItem(id)];
case 4:
_a.sent();
return [4 /*yield*/, this.execute()];
@ -431,13 +405,7 @@ exports.default = OakComponent({
case 0:
id = value.id, bucket = value.bucket;
if (!(this.props.removeLater || (origin !== 'unknown' && !bucket))) return [3 /*break*/, 2];
return [4 /*yield*/, this.addOperation({
action: 'remove',
data: {},
filter: {
id: id,
},
})];
return [4 /*yield*/, this.removeItem(id)];
case 1:
_a.sent();
return [3 /*break*/, 3];
@ -450,13 +418,7 @@ exports.default = OakComponent({
onOk: function (e) { return tslib_1.__awaiter(_this, void 0, void 0, function () {
return tslib_1.__generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.addOperation({
action: 'remove',
data: {},
filter: {
id: id,
},
})];
case 0: return [4 /*yield*/, this.removeItem(id)];
case 1:
_a.sent();
return [4 /*yield*/, this.execute()];

View File

@ -1,110 +0,0 @@
@import "../../../config/styles/mp/index.less";
@import "../../../config/styles/mp/mixins.less";
.file-list__container {
position: relative;
display: flex;
flex-wrap: wrap;
}
.file-list__item {
position: relative;
width: 220rpx;
padding-bottom: 220rpx;
height: 0;
}
// size 不同时,对应的图片间距设置
// size 仅支持 1-10
each(range(2, 10), {
@valuePlusOne : @value+1;
.file-list__item--@{value}:nth-of-type(n+@{valuePlusOne}) {
margin-top : 20rpx;
}
.file-list__item--@{value}:not(:nth-of-type(@{value}n+1)) {
margin-left : 20rpx;
}
}) // 当 size 为 null每行会显示 3 张图片
.file-list__item--null:nth-of-type(n+4) {
margin-top: 20rpx;
}
.file-list__item--null:not(:nth-of-type(3n+1)) {
margin-left: 20rpx;
}
.file-list__image {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border: 1rpx solid #eee;
border-radius: 4rpx;
}
.file-list__item--selected {
width: 100%;
height: 100%;
z-index: 10;
background-color: #000;
filter: Alpha(Opacity=50);
opacity: 0.5;
position: absolute;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
}
.file-list__remove {
position: absolute;
right: 10rpx;
top: 10rpx;
height: 40rpx;
width: 40rpx;
border-radius: 50%;
background: rgb(0 0 0 / 40%);
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
box-sizing: border-box;
}
.file-list__item--add {
border: 1rpx solid #eee;
border-radius: 4rpx;
background-color: white;
}
.file-list__image--add {
visibility: hidden;
position: absolute;
width: 50%;
height: 50%;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
align-items: center;
justify-content: center;
display: flex;
}
.file-list__item-slot-wrapper {
display: flex;
justify-content: center;
align-items: center;
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
}
.file-list__item-slot-wrapper:empty+.file-list__image--add {
visibility: visible;
}

View File

@ -1,20 +0,0 @@
<view class="file-list__container l-class">
<block wx:for="{{files}}" wx:key="index">
<block wx:if="{{item}}">
<view class="file-list__item file-list__item--{{size}} l-item-class" style="{{itemSizePercentage?'width:'+itemSizePercentage+'padding-bottom:'+itemSizePercentage:'xxx'}}">
<item data-index="{{index}}" bind:tap="onItemTapped" mode="{{mode}}" oakPath="{{oakFullpath}}.{{index}}" />
<view wx:if="{{!disableDelete}}" mut-bind:tap="onDeleteByMp" class="file-list__remove" data-value="{{item}}">
<t-icon name="close" color="#ffffff" size="18" />
</view>
</view>
</block>
</block>
<view class="file-list__item file-list__item--add file-list__item--{{size}} l-item-class" style="{{itemSizePercentage?'width:'+itemSizePercentage+'padding-bottom:'+itemSizePercentage:''}}" wx:if="{{!disableInsert}}" bind:tap="onPickByMp">
<view class="file-list__item-slot-wrapper">
<slot />
</view>
<view class="file-list__image--add">
<t-icon name="add" size="80" />
</view>
</view>
</view>

View File

@ -1,2 +1,28 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;
import { UploadFile } from 'antd';
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
declare type Theme = 'file' | 'image' | 'file-flow' | 'image-flow' | 'custom';
export default function render(props: WebComponentProps<EntityDict, 'extraFile', true, {
accept?: string;
maxNumber?: number;
multiple?: boolean;
draggable?: boolean;
theme?: Theme;
tips?: string;
beforeUpload?: (file: File) => Promise<boolean>;
disabled?: boolean;
style?: Record<string, string>;
className?: string;
directory?: boolean;
onPreview?: (file: UploadFile<any>) => void;
onDownload?: (file: UploadFile<any>) => void;
showUploadList?: boolean;
children?: JSX.Element;
files?: EntityDict['extraFile']['OpSchema'][];
systemConfig: EntityDict['system']['OpSchema']['config'];
disableInsert?: boolean;
}, {
onPickByWeb: (files: UploadFile[], callback?: (file: any, status: string) => void) => void;
onDeleteByWeb: (file: UploadFile) => void;
}>): JSX.Element;
export {};

View File

@ -2,6 +2,7 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = require("react");
var extraFile_1 = require("../../../utils/extraFile");
var antd_1 = require("antd");
var icons_1 = require("@ant-design/icons");
@ -25,10 +26,12 @@ function getListType(theme) {
};
return themeMap[theme];
}
function render() {
function render(props) {
var _this = this;
var _a = this.props, _b = _a.accept, accept = _b === void 0 ? 'image/*' : _b, _c = _a.maxNumber, maxNumber = _c === void 0 ? 20 : _c, _d = _a.multiple, multiple = _d === void 0 ? true : _d, _e = _a.draggable, draggable = _e === void 0 ? false : _e, _f = _a.theme, theme = _f === void 0 ? 'image' : _f, tips = _a.tips, beforeUpload = _a.beforeUpload, disabled = _a.disabled, style = _a.style, className = _a.className, _g = _a.directory, directory = _g === void 0 ? false : _g, onPreview = _a.onPreview, onDownload = _a.onDownload, children = _a.children, _h = _a.showUploadList, showUploadList = _h === void 0 ? true : _h;
var _j = this.state, files = _j.files, systemConfig = _j.systemConfig, newUploadFiles = _j.newUploadFiles, disableInsert = _j.disableInsert;
var _a = props.data, _b = _a.accept, accept = _b === void 0 ? 'image/*' : _b, _c = _a.maxNumber, maxNumber = _c === void 0 ? 20 : _c, _d = _a.multiple, multiple = _d === void 0 ? true : _d, _e = _a.draggable, draggable = _e === void 0 ? false : _e, _f = _a.theme, theme = _f === void 0 ? 'image' : _f, tips = _a.tips, beforeUpload = _a.beforeUpload, disabled = _a.disabled, style = _a.style, className = _a.className, _g = _a.directory, directory = _g === void 0 ? false : _g, onPreview = _a.onPreview, onDownload = _a.onDownload, children = _a.children, _h = _a.showUploadList, showUploadList = _h === void 0 ? true : _h, files = _a.files, systemConfig = _a.systemConfig, disableInsert = _a.disableInsert;
var _j = props.methods, onPickByWeb = _j.onPickByWeb, onDeleteByWeb = _j.onDeleteByWeb;
// 这里的逻辑可能和原来有点不对
var _k = tslib_1.__read((0, react_1.useState)([]), 2), newUploadFiles = _k[0], setNewUploadFiles = _k[1];
var listType = getListType(theme);
var getUploadButton = function () {
if (children) {
@ -61,17 +64,15 @@ function render() {
? files.map(function (ele) {
return extraFileToUploadFile(ele, systemConfig);
})
: null, onChange: function (_a) {
: undefined, onChange: function (_a) {
var file = _a.file, fileList = _a.fileList, event = _a.event;
var arr = (fileList === null || fileList === void 0 ? void 0 : fileList.filter(function (ele) { return !ele.id; })) || [];
_this.setState({
newUploadFiles: arr,
});
setNewUploadFiles(arr);
if (theme !== 'custom') {
_this.onPickByWeb(arr);
onPickByWeb(arr);
}
}, onRemove: function (file) {
_this.onDeleteByWeb(file);
onDeleteByWeb(file);
}, onPreview: onPreview, onDownload: onDownload }, { children: disableInsert ? null : getUploadButton() })), tips && ((0, jsx_runtime_1.jsx)("small", tslib_1.__assign({ className: web_module_less_1.default['oak-upload__tips'] }, { children: tips }))), theme === 'custom' && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Table, { dataSource: newUploadFiles || [], rowKey: "id", columns: [
{
align: 'center',
@ -117,19 +118,13 @@ function render() {
title: '操作',
align: 'center',
render: function (value, record, index) {
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !record.id && ((0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "link", onClick: function () {
_this.customDelete(index);
} }, { children: "\u5220\u9664" }))) }));
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}));
},
fixed: 'right',
},
] }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { display: 'flex', justifyContent: 'flex-end' } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ danger: true, type: "default", onClick: function () {
_this.setState({
newUploadFiles: [],
});
} }, { children: "\u6E05\u7A7A" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
_this.onWebPick(newUploadFiles, function (file, status) {
_this.setNewUploadFiles(file, status);
] }), (0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ style: { display: 'flex', justifyContent: 'flex-end' } }, { children: (0, jsx_runtime_1.jsxs)(antd_1.Space, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ danger: true, type: "default", onClick: function () { return setNewUploadFiles([]); } }, { children: "\u6E05\u7A7A" })), (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ type: "primary", onClick: function () {
onPickByWeb(newUploadFiles, function (file, status) {
setNewUploadFiles(file, status);
});
} }, { children: "\u4E0A\u4F20" }))] }) }))] }))] })));
}

View File

@ -1,7 +0,0 @@
.oak-upload {
&__tips {
display: block;
color: var(--oak-text-color-placeholder);
margin-top: 8px;
}
}

View File

@ -0,0 +1,3 @@
/// <reference types="react" />
declare const _default: import("react").ComponentType<any>;
export default _default;

View File

@ -1,36 +1,35 @@
"use strict";
Component({
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = OakComponent({
isList: false,
properties: {
actions: Array,
actionDescriptions: Object,
show: {
type: Boolean,
value: false,
}
},
onActionClick: Function,
},
methods: {
onClick: function (touch) {
var index = touch.currentTarget.dataset.index;
var actions = this.data.actions;
var action = actions[index];
this.triggerEvent('click', { action: action });
onClick: function (action) {
this.props.onActionClick(action);
},
closeDrawer: function () {
this.triggerEvent('close');
}
},
observers: {
actions: function (actions) {
var actionDescriptions = this.data.actionDescriptions;
var actionss = actions.map(function (action) { return actionDescriptions[action]; });
this.setData({ actionss: actionss });
var actionDescriptions = this.props.actionDescriptions;
var actionss = actions.map(function (action) { return Object.assign({}, actionDescriptions[action], { action: action }); });
this.setState({ actionss: actionss });
},
},
lifetimes: {
ready: function () {
var _a = this.data, actions = _a.actions, actionDescriptions = _a.actionDescriptions;
var actionss = actions.map(function (action) { return actionDescriptions[action]; });
this.setData({ actionss: actionss });
var _a = this.props, actions = _a.actions, actionDescriptions = _a.actionDescriptions;
if (actions) {
var actionss = actions.map(function (action) { return Object.assign({}, actionDescriptions[action], { action: action }); });
this.setState({ actionss: actionss });
}
}
}
});

View File

@ -1,55 +0,0 @@
@import "../../../config/styles/mp/index.less";
@import "../../../config/styles/mp/mixins.less";
.grid {
display: grid;
grid-template-columns: 1fr 1fr 1fr 1fr;
}
.grid-item {
min-width: 25%;
padding: 20rpx;
display: flex;
flex-direction: column;
justify-content: center;
box-sizing: border-box;
}
.block {
width: 176rpx;
height: 176rpx;
background: #fff;
color: #333;
display: flex;
}
.block--bottom {
width: 100vw;
height: 35vh;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.btn-box {
display: flex;
flex: 1;
flex-direction: column;
padding: 32rpx;
}
.five-grid {
position: unset;
}
.external-class-content {
padding: 32rpx 0 !important;
}
.image-icon {
width: 96rpx !important;
height: 96rpx !important;
}
.image {
width: 100%;
height: 100%;
}

View File

@ -1,13 +0,0 @@
<t-popup placement="bottom" visible="{{show}}" bind:visible-change="closeDrawer" close-btn="true">
<view class="block block--bottom">
<view class="btn-box">
<t-grid t-class="five-grid" column="{{5}}">
<block wx:for="{{actionss}}" wx:key="index">
<t-grid-item bind:tap="onClick" data-index="{{index}}" text="{{item.label}}" t-class-text="text" t-class-image="image-icon" t-class-content="external-class-content">
<t-icon class="image" name="{{item.icon.name}}" slot="image" />
</t-grid-item>
</block>
</t-grid>
</view>
</view>
</t-popup>

View File

@ -0,0 +1,13 @@
import { WebComponentProps } from "oak-frontend-base";
import { EntityDict } from "../../../general-app-domain";
export default function Render(props: WebComponentProps<EntityDict, 'user', false, {
actionss: Array<{
icon: {
name: string;
};
label: string;
action: string;
}>;
}, {
onClick: (action: string) => void;
}>): JSX.Element | null;

View File

@ -0,0 +1,16 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var antd_mobile_1 = require("antd-mobile");
var web_module_less_1 = tslib_1.__importDefault(require("./web.module.less"));
function Render(props) {
var actionss = props.data.actionss;
var onClick = props.methods.onClick;
// icon方案还未最终确定
if (actionss) {
return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: web_module_less_1.default.container }, { children: actionss.map(function (ele) { return ((0, jsx_runtime_1.jsx)("div", tslib_1.__assign({ className: "action" }, { children: (0, jsx_runtime_1.jsx)(antd_mobile_1.Button, tslib_1.__assign({ color: 'primary', fill: 'outline', onClick: function () { return onClick(ele.action); } }, { children: ele.label })) }))); }) })));
}
return null;
}
exports.default = Render;

View File

@ -58,8 +58,10 @@ exports.default = OakComponent({
},
downloadEnv: function () {
var data = this.features.localStorage.loadAll();
return data;
},
uploadEnv: function () {
resetEnv: function (data) {
this.features.localStorage.resetAll(data);
}
},
});

View File

@ -1,35 +0,0 @@
.btn-popup {
position: fixed !important;
bottom: 10rpx;
// bottom: constant(safe-area-inset-bottom) !important;
// /* 兼容 iOS < 11.2 */
// bottom: env(safe-area-inset-bottom) !important;
right: 45%;
}
.block {
width: 176rpx;
height: 176rpx;
background: #fff;
color: #333;
display: flex;
}
.block--bottom {
width: 100vw;
height: 35vh;
border-top-left-radius: 16rpx;
border-top-right-radius: 16rpx;
}
.btn-box {
display: flex;
flex-direction: row;
padding: 32rpx;
flex-wrap: wrap;
}
.btn-item {
margin-top: 32rpx;
margin-right: 32rpx !important;
}

View File

@ -1,12 +0,0 @@
<t-button bind:tap="handlePopup" t-class="btn-popup" variant="text" theme="primary" icon="chevron-up" shape="circle"></t-button>
<t-popup visible="{{visible}}" bind:visible-change="onVisibleChange" placement="bottom" close-btn="true">
<view class="block block--bottom">
<view class="btn-box">
<t-button bind:tap="printRunningTree" t-class="btn-item" theme="primary" size="small" shape="circle">R</t-button>
<t-button bind:tap="printDebugStore" t-class="btn-item" theme="primary" size="small" shape="circle">S</t-button>
<t-button bind:tap="printCachedStore" t-class="btn-item" theme="primary" size="small" shape="circle">C</t-button>
<t-button bind:tap="showDialog" t-class="btn-item" theme="danger" size="small" shape="circle">Reset</t-button>
</view>
</view>
</t-popup>
<t-dialog visible="{{dialogVisible}}" title="重置数据" content="重置后,原来的数据不可恢复" cancel-btn="取消" confirm-btn="确定" bind:cancel="closeDialog" bind:confirm="handleReset" />

View File

@ -1,2 +1,13 @@
/// <reference types="react" />
export default function render(this: any): JSX.Element;
import { WebComponentProps } from 'oak-frontend-base';
import { EntityDict } from '../../../general-app-domain';
export default function render(props: WebComponentProps<EntityDict, 'address', true, {
placement: 'top' | 'bottom' | 'left' | 'right';
style: Record<string, any>;
}, {
printDebugStore: () => void;
printCachedStore: () => void;
printRunningTree: () => void;
resetInitialData: () => void;
downloadEnv: () => void;
resetEnv: (data: Record<string, any>) => void;
}>): JSX.Element;

View File

@ -2,19 +2,18 @@
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var jsx_runtime_1 = require("react/jsx-runtime");
var react_1 = tslib_1.__importDefault(require("react"));
var react_1 = tslib_1.__importStar(require("react"));
var antd_1 = require("antd");
var icons_1 = require("@ant-design/icons");
function render() {
var _this = this;
var _a = this.props, _b = _a.placement, placement = _b === void 0 ? 'bottom' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
var visible = this.state.visible;
function render(props) {
var _a = props.data, _b = _a.placement, placement = _b === void 0 ? 'bottom' : _b, _c = _a.style, style = _c === void 0 ? {} : _c;
var _d = props.methods, printCachedStore = _d.printCachedStore, printDebugStore = _d.printDebugStore, printRunningTree = _d.printRunningTree, resetInitialData = _d.resetInitialData, downloadEnv = _d.downloadEnv, resetEnv = _d.resetEnv;
var _e = tslib_1.__read((0, react_1.useState)(false), 2), visible = _e[0], setVisible = _e[1];
return ((0, jsx_runtime_1.jsxs)(react_1.default.Fragment, { children: [(0, jsx_runtime_1.jsx)(antd_1.Button, { type: "text", shape: "circle", icon: (0, jsx_runtime_1.jsx)(icons_1.UpOutlined, { style: { fontSize: 12 } }), style: tslib_1.__assign({ position: 'fixed', bottom: 0, right: '45vw', zIndex: 999 }, style), onClick: function () {
_this.setVisible(true);
setVisible(true);
} }), (0, jsx_runtime_1.jsxs)(antd_1.Drawer, tslib_1.__assign({ placement: placement, open: visible, onClose: function () {
_this.setVisible(false);
setVisible(false);
}, title: "Debug\u63A7\u5236\u53F0", footer: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, {}) }, { children: [(0, jsx_runtime_1.jsx)("input", { type: "file", accept: "application/json", hidden: true, id: "upload", onChange: function () {
var that = _this;
var file = document.getElementById('upload')
.files[0];
if (typeof FileReader === undefined) {
@ -26,7 +25,7 @@ function render() {
reader.onload = function () {
try {
var data = JSON.parse(this.result);
that.features.localStorage.resetAll(data);
resetEnv(data);
window.location.reload();
}
catch (err) {
@ -34,8 +33,8 @@ function render() {
}
};
}
} }), (0, jsx_runtime_1.jsxs)(antd_1.Space, tslib_1.__assign({ wrap: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7ED3\u6784" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printRunningTree(); } }, { children: "R" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "Store\u6570\u636E" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printDebugStore(); } }, { children: "S" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7F13\u5B58" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return _this.printCachedStore(); } }, { children: "C" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u4E0B\u8F7DStore" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () {
var data = _this.features.localStorage.loadAll();
} }), (0, jsx_runtime_1.jsxs)(antd_1.Space, tslib_1.__assign({ wrap: true }, { children: [(0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7ED3\u6784" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return printRunningTree(); } }, { children: "R" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "Store\u6570\u636E" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return printDebugStore(); } }, { children: "S" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u9875\u9762\u7F13\u5B58" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () { return printCachedStore(); } }, { children: "C" })) })), (0, jsx_runtime_1.jsx)(antd_1.Tooltip, tslib_1.__assign({ title: "\u4E0B\u8F7DStore" }, { children: (0, jsx_runtime_1.jsx)(antd_1.Button, tslib_1.__assign({ size: "large", type: "primary", shape: "circle", onClick: function () {
var data = downloadEnv();
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' +
encodeURIComponent(JSON.stringify(data)));
@ -54,7 +53,7 @@ function render() {
okText: '确定',
cancelText: '取消',
onOk: function (e) {
_this.resetInitialData();
resetInitialData();
modal.destroy();
window.location.reload();
},

View File

@ -1,5 +0,0 @@
.container {
display: flex;
}

Some files were not shown because too many files have changed in this diff Show More