@fonixtree/magic-design 0.1.87 → 0.1.88
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/VideoConfig/VideoConfigGroup/index.js +3 -3
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +4 -3
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +4 -3
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +15 -2
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +4 -3
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +16 -2
- package/es/composite-comp/nuri/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +16 -2
- package/es/utils/androidUtil.js +3 -0
- package/es/utils/businessUtil.js +5 -3
- package/es/utils/coreUtil.js +39 -20
- package/lib/composite-comp/bol/config-panels/BannerConfig/BannerConfigGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/ButtonCompConfig/ButtonConfigGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/CarouselConfig/CarouselConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/ImageGalleryConfig/ImageGalleryConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/ImageTextConfig/ImageTextConfigGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/TagCompConfig/TagConfigGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/TextCompConfig/TextConfigGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/VideoConfig/VideoConfigGroup/index.js +3 -3
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +15 -2
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/MobileNavigationConfig/MobileNavigationConfigGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/PcNavigationConfig/PcNavigationConfigGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +4 -3
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +16 -2
- package/lib/composite-comp/nuri/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +16 -2
- package/lib/utils/androidUtil.js +3 -0
- package/lib/utils/businessUtil.js +5 -3
- package/lib/utils/coreUtil.js +39 -20
- package/package.json +1 -1
- package/es/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/.DS_Store +0 -0
package/lib/composite-comp/nuri/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js
CHANGED
|
@@ -7,6 +7,8 @@ exports["default"] = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
|
|
10
|
+
var _mobxReact = require("mobx-react");
|
|
11
|
+
|
|
10
12
|
var _defaultImg = _interopRequireDefault(require("../imgs/defaultImg.png"));
|
|
11
13
|
|
|
12
14
|
var _Button = _interopRequireDefault(require("../../../../../common/Button"));
|
|
@@ -23,6 +25,8 @@ var _locale = require("../../../../../locale");
|
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
28
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
29
|
+
|
|
26
30
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
27
31
|
var _extendStatics = function extendStatics(d, b) {
|
|
28
32
|
_extendStatics = Object.setPrototypeOf || {
|
|
@@ -49,8 +53,17 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
|
49
53
|
};
|
|
50
54
|
}();
|
|
51
55
|
|
|
52
|
-
var
|
|
53
|
-
|
|
56
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
57
|
+
var c = arguments.length,
|
|
58
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
59
|
+
d;
|
|
60
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
61
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
62
|
+
}
|
|
63
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
var notice = '';
|
|
54
67
|
|
|
55
68
|
var AComponent =
|
|
56
69
|
/** @class */
|
|
@@ -127,6 +140,7 @@ function (_super) {
|
|
|
127
140
|
AComponent.defaultProps = {
|
|
128
141
|
source: []
|
|
129
142
|
};
|
|
143
|
+
AComponent = __decorate([(0, _mobxReact.inject)('store'), _mobxReact.observer], AComponent);
|
|
130
144
|
return AComponent;
|
|
131
145
|
}(_react["default"].Component);
|
|
132
146
|
|
package/lib/utils/androidUtil.js
CHANGED
|
@@ -23,6 +23,9 @@ var browserVersion = function browserVersion() {
|
|
|
23
23
|
qq: u.match(/\sQQ/i) == ' qq',
|
|
24
24
|
isApp: u.indexOf('app/CYLON-APP') > -1,
|
|
25
25
|
isNuriApp: u.indexOf('app/NURI-APP') > -1,
|
|
26
|
+
isDitoApp: u.indexOf('mydito') > -1,
|
|
27
|
+
ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
|
|
28
|
+
ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
26
29
|
isAshitaApp: u.indexOf('app/ASHITA-APP') > -1
|
|
27
30
|
};
|
|
28
31
|
};
|
|
@@ -28,7 +28,8 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
28
28
|
var type = urlObj.type,
|
|
29
29
|
value = urlObj.value,
|
|
30
30
|
offerId = urlObj.offerId,
|
|
31
|
-
productId = urlObj.productId
|
|
31
|
+
productId = urlObj.productId,
|
|
32
|
+
name = urlObj.name;
|
|
32
33
|
|
|
33
34
|
switch (type) {
|
|
34
35
|
// 锚点跳转
|
|
@@ -216,8 +217,9 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
216
217
|
params = {
|
|
217
218
|
action: 'jump',
|
|
218
219
|
params: {
|
|
219
|
-
type: map[link],
|
|
220
|
-
link: link
|
|
220
|
+
type: map[link] || name,
|
|
221
|
+
link: link,
|
|
222
|
+
url: link
|
|
221
223
|
}
|
|
222
224
|
};
|
|
223
225
|
}
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
|
|
6
|
+
exports.setMagicDesign = exports.renderPreview = exports.isPc = exports.isDesignMode = exports.isAutoAudit = exports.isActiveFloor = exports.getVideoCover = exports.copyNode = exports.clickUrl = void 0;
|
|
7
7
|
|
|
8
8
|
var _uuid = require("uuid");
|
|
9
9
|
|
|
@@ -337,23 +337,29 @@ var clickUrl = function clickUrl(url) {
|
|
|
337
337
|
|
|
338
338
|
if ((0, _androidUtil.browserVersion)().isAshitaApp) {
|
|
339
339
|
(0, _androidUtil.sendToApp)(data);
|
|
340
|
-
} else if (
|
|
341
|
-
//
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
340
|
+
} else if (params.link && params.link.startsWith('http')) {
|
|
341
|
+
// 跳转链接是个绝对路径
|
|
342
|
+
if (params.type === 'Gamezop') {
|
|
343
|
+
// Nuri 对接 Gamezop 特殊情况
|
|
344
|
+
(0, _androidUtil.sendToApp)(data);
|
|
345
|
+
} else if ((0, _androidUtil.browserVersion)().isApp || (0, _androidUtil.browserVersion)().isNuriApp) {
|
|
346
|
+
// Nuri 抽奖系统对接
|
|
347
|
+
var urlTemp = "" + params.link + (params.link.includes('?') ? '&' : '?') + "userToken=" + (localStorage.getItem('h5Token') || '');
|
|
348
|
+
(0, _androidUtil.sendToApp)({
|
|
349
|
+
type: 'jumpBrowser',
|
|
350
|
+
params: {
|
|
351
|
+
url: urlTemp
|
|
352
|
+
}
|
|
353
|
+
});
|
|
354
|
+
} else {
|
|
355
|
+
// 新开浏览器打开
|
|
356
|
+
(0, _androidUtil.sendToApp)({
|
|
357
|
+
type: 'jumpBrowser',
|
|
358
|
+
params: {
|
|
359
|
+
url: params.link
|
|
360
|
+
}
|
|
361
|
+
});
|
|
362
|
+
}
|
|
357
363
|
} else {
|
|
358
364
|
// 视频
|
|
359
365
|
if (params.type === 'VIDEO') {
|
|
@@ -381,7 +387,10 @@ var clickUrl = function clickUrl(url) {
|
|
|
381
387
|
if (((_a = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _a === void 0 ? void 0 : _a.projectCode) === 'nuri') {
|
|
382
388
|
// 输入的是完整的跳转地址
|
|
383
389
|
if (isUrl(link)) {
|
|
384
|
-
if (
|
|
390
|
+
if (params.type === 'Gamezop') {
|
|
391
|
+
// Nuri 对接游戏页面
|
|
392
|
+
window.open(link);
|
|
393
|
+
} else if (!link.includes(window.location.host)) {
|
|
385
394
|
// 跳转外链 需要把userToken带上
|
|
386
395
|
if (link.includes('?')) {
|
|
387
396
|
var a = link + "&userToken=" + (localStorage.getItem('h5Token') || '');
|
|
@@ -444,5 +453,15 @@ var copyNode = function copyNode(value, parentId) {
|
|
|
444
453
|
});
|
|
445
454
|
return newNode;
|
|
446
455
|
};
|
|
456
|
+
/**
|
|
457
|
+
* 是否开启自动审核
|
|
458
|
+
*/
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
exports.copyNode = copyNode;
|
|
462
|
+
|
|
463
|
+
var isAutoAudit = function isAutoAudit() {
|
|
464
|
+
return window.magicDesign.autoAudit !== 'false' || window.partyType === partyTypeMap.PLATFORM;
|
|
465
|
+
};
|
|
447
466
|
|
|
448
|
-
exports.
|
|
467
|
+
exports.isAutoAudit = isAutoAudit;
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|