@fonixtree/magic-design 2.0.195 → 2.0.198
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/assets/less/common.less +12 -0
- package/es/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -1
- package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +5 -1
- package/es/composite-comp/public/components/Location/mobile/index.js +2 -2
- package/es/utils/businessUtil.js +9 -5
- package/es/utils/coreUtil.js +2 -2
- package/lib/assets/less/common.less +12 -0
- package/lib/composite-comp/dito/components/SearchBar/defaultJSON.js +4 -1
- package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js +5 -1
- package/lib/composite-comp/public/components/Location/mobile/index.js +2 -2
- package/lib/utils/businessUtil.js +9 -5
- package/lib/utils/coreUtil.js +2 -2
- package/package.json +1 -1
|
@@ -85,6 +85,18 @@
|
|
|
85
85
|
text-overflow: ellipsis;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
.two_row {
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
line-height: 1.5em;
|
|
95
|
+
/* 设置行高 */
|
|
96
|
+
max-height: 3em;
|
|
97
|
+
/* 行高的两倍,因为最多显示两行 */
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
.common_mask {
|
|
89
101
|
position: fixed;
|
|
90
102
|
top: 0;
|
package/es/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _common = require("../../../../../common");
|
|
|
15
15
|
|
|
16
16
|
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
17
17
|
|
|
18
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
19
|
+
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
19
21
|
|
|
20
22
|
var _locale = require("../../../../../locale");
|
|
@@ -213,7 +215,9 @@ function (_super) {
|
|
|
213
215
|
key: 'search6',
|
|
214
216
|
name: (0, _locale.i18n)('POINTS'),
|
|
215
217
|
toggleType: 'switch',
|
|
216
|
-
value:
|
|
218
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
219
|
+
data: panelProps.points
|
|
220
|
+
}),
|
|
217
221
|
metaOption: panelProps.points
|
|
218
222
|
}];
|
|
219
223
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -102,7 +102,7 @@ function (_super) {
|
|
|
102
102
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
103
|
className: "address-wrap",
|
|
104
104
|
onClick: function onClick() {
|
|
105
|
-
return (0, _coreUtil.clickUrl)('/location');
|
|
105
|
+
return (0, _coreUtil.clickUrl)(locationInfo.address ? '/location' : '/add-location');
|
|
106
106
|
}
|
|
107
107
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
108
|
className: "address-bg",
|
|
@@ -116,7 +116,7 @@ function (_super) {
|
|
|
116
116
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
117
|
className: "text"
|
|
118
118
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
119
|
-
className: "address
|
|
119
|
+
className: "address two_row",
|
|
120
120
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
121
121
|
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : locationInfo.address
|
|
122
122
|
})
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -298,7 +298,9 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
298
298
|
'/product/GroupBuy': 'GROUP',
|
|
299
299
|
'/search-page': 'SEARCH_PAGE',
|
|
300
300
|
'/commission': 'COMMISSION',
|
|
301
|
-
'/location': 'ADD_ADDRESS_PAGE'
|
|
301
|
+
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
302
|
+
'/location': 'ADDRESS_PAGE',
|
|
303
|
+
'/my-points': 'POINT_PAGE'
|
|
302
304
|
};
|
|
303
305
|
var typeTemp = map[link];
|
|
304
306
|
|
|
@@ -366,8 +368,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
366
368
|
action: 'jump',
|
|
367
369
|
params: {
|
|
368
370
|
type: 'PRODUCT_DETAIL',
|
|
369
|
-
offerId: arg1,
|
|
370
|
-
productId: arg2
|
|
371
|
+
offerId: Number(arg1),
|
|
372
|
+
productId: Number(arg2)
|
|
371
373
|
}
|
|
372
374
|
};
|
|
373
375
|
break;
|
|
@@ -390,7 +392,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
390
392
|
action: 'jump',
|
|
391
393
|
params: {
|
|
392
394
|
type: 'STORE',
|
|
393
|
-
storeId: arg1
|
|
395
|
+
storeId: Number(arg1)
|
|
394
396
|
}
|
|
395
397
|
};
|
|
396
398
|
break;
|
|
@@ -476,7 +478,9 @@ var parseUrl = function parseUrl(url) {
|
|
|
476
478
|
'/search-page': 'SEARCH_PAGE',
|
|
477
479
|
'/main/my-commission': 'WALLET',
|
|
478
480
|
'/commission': 'COMMISSION',
|
|
479
|
-
'/location': 'ADD_ADDRESS_PAGE'
|
|
481
|
+
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
482
|
+
'/location': 'ADDRESS_PAGE',
|
|
483
|
+
'/my-points': 'POINT_PAGE'
|
|
480
484
|
};
|
|
481
485
|
link = url;
|
|
482
486
|
params = {
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -405,8 +405,8 @@ var clickUrl = function clickUrl(url, state) {
|
|
|
405
405
|
(0, _commonUtil.navigateTo)(link, state);
|
|
406
406
|
}
|
|
407
407
|
} else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
|
|
408
|
-
// 输入的是完整的跳转地址
|
|
409
|
-
if (isUrl(link)) {
|
|
408
|
+
// 输入的是完整的跳转地址 排除掉‘https://www.baidu.com;mydito://BuyLoad’这种情况
|
|
409
|
+
if (isUrl(link) && !link.includes('mydito://')) {
|
|
410
410
|
if (!link.includes(window.location.host)) {
|
|
411
411
|
// 跳转外链 需要把token带上
|
|
412
412
|
if (link.includes('?')) {
|
|
@@ -85,6 +85,18 @@
|
|
|
85
85
|
text-overflow: ellipsis;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
+
.two_row {
|
|
89
|
+
display: -webkit-box;
|
|
90
|
+
-webkit-line-clamp: 2;
|
|
91
|
+
-webkit-box-orient: vertical;
|
|
92
|
+
overflow: hidden;
|
|
93
|
+
text-overflow: ellipsis;
|
|
94
|
+
line-height: 1.5em;
|
|
95
|
+
/* 设置行高 */
|
|
96
|
+
max-height: 3em;
|
|
97
|
+
/* 行高的两倍,因为最多显示两行 */
|
|
98
|
+
}
|
|
99
|
+
|
|
88
100
|
.common_mask {
|
|
89
101
|
position: fixed;
|
|
90
102
|
top: 0;
|
package/lib/composite-comp/dito/config-panels/SearchBarConfig/SearchBarConfigContent/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var _common = require("../../../../../common");
|
|
|
15
15
|
|
|
16
16
|
var _ImageConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ImageConfig"));
|
|
17
17
|
|
|
18
|
+
var _ButtonConfig = _interopRequireDefault(require("../../../../../meta-comp/config-panels/ButtonConfig"));
|
|
19
|
+
|
|
18
20
|
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
19
21
|
|
|
20
22
|
var _locale = require("../../../../../locale");
|
|
@@ -213,7 +215,9 @@ function (_super) {
|
|
|
213
215
|
key: 'search6',
|
|
214
216
|
name: (0, _locale.i18n)('POINTS'),
|
|
215
217
|
toggleType: 'switch',
|
|
216
|
-
value:
|
|
218
|
+
value: /*#__PURE__*/_react["default"].createElement(_ButtonConfig["default"], {
|
|
219
|
+
data: panelProps.points
|
|
220
|
+
}),
|
|
217
221
|
metaOption: panelProps.points
|
|
218
222
|
}];
|
|
219
223
|
return /*#__PURE__*/_react["default"].createElement(_common.Collapse, {
|
|
@@ -102,7 +102,7 @@ function (_super) {
|
|
|
102
102
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
103
|
className: "address-wrap",
|
|
104
104
|
onClick: function onClick() {
|
|
105
|
-
return (0, _coreUtil.clickUrl)('/location');
|
|
105
|
+
return (0, _coreUtil.clickUrl)(locationInfo.address ? '/location' : '/add-location');
|
|
106
106
|
}
|
|
107
107
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
108
|
className: "address-bg",
|
|
@@ -116,7 +116,7 @@ function (_super) {
|
|
|
116
116
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
117
117
|
className: "text"
|
|
118
118
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
119
|
-
className: "address
|
|
119
|
+
className: "address two_row",
|
|
120
120
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
121
121
|
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : locationInfo.address
|
|
122
122
|
})
|
|
@@ -298,7 +298,9 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
298
298
|
'/product/GroupBuy': 'GROUP',
|
|
299
299
|
'/search-page': 'SEARCH_PAGE',
|
|
300
300
|
'/commission': 'COMMISSION',
|
|
301
|
-
'/location': 'ADD_ADDRESS_PAGE'
|
|
301
|
+
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
302
|
+
'/location': 'ADDRESS_PAGE',
|
|
303
|
+
'/my-points': 'POINT_PAGE'
|
|
302
304
|
};
|
|
303
305
|
var typeTemp = map[link];
|
|
304
306
|
|
|
@@ -366,8 +368,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
366
368
|
action: 'jump',
|
|
367
369
|
params: {
|
|
368
370
|
type: 'PRODUCT_DETAIL',
|
|
369
|
-
offerId: arg1,
|
|
370
|
-
productId: arg2
|
|
371
|
+
offerId: Number(arg1),
|
|
372
|
+
productId: Number(arg2)
|
|
371
373
|
}
|
|
372
374
|
};
|
|
373
375
|
break;
|
|
@@ -390,7 +392,7 @@ var parseUrl = function parseUrl(url) {
|
|
|
390
392
|
action: 'jump',
|
|
391
393
|
params: {
|
|
392
394
|
type: 'STORE',
|
|
393
|
-
storeId: arg1
|
|
395
|
+
storeId: Number(arg1)
|
|
394
396
|
}
|
|
395
397
|
};
|
|
396
398
|
break;
|
|
@@ -476,7 +478,9 @@ var parseUrl = function parseUrl(url) {
|
|
|
476
478
|
'/search-page': 'SEARCH_PAGE',
|
|
477
479
|
'/main/my-commission': 'WALLET',
|
|
478
480
|
'/commission': 'COMMISSION',
|
|
479
|
-
'/location': 'ADD_ADDRESS_PAGE'
|
|
481
|
+
'/add-location': 'ADD_ADDRESS_PAGE',
|
|
482
|
+
'/location': 'ADDRESS_PAGE',
|
|
483
|
+
'/my-points': 'POINT_PAGE'
|
|
480
484
|
};
|
|
481
485
|
link = url;
|
|
482
486
|
params = {
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -405,8 +405,8 @@ var clickUrl = function clickUrl(url, state) {
|
|
|
405
405
|
(0, _commonUtil.navigateTo)(link, state);
|
|
406
406
|
}
|
|
407
407
|
} else if (((_b = window === null || window === void 0 ? void 0 : window.magicDesign) === null || _b === void 0 ? void 0 : _b.projectCode) === 'pto') {
|
|
408
|
-
// 输入的是完整的跳转地址
|
|
409
|
-
if (isUrl(link)) {
|
|
408
|
+
// 输入的是完整的跳转地址 排除掉‘https://www.baidu.com;mydito://BuyLoad’这种情况
|
|
409
|
+
if (isUrl(link) && !link.includes('mydito://')) {
|
|
410
410
|
if (!link.includes(window.location.host)) {
|
|
411
411
|
// 跳转外链 需要把token带上
|
|
412
412
|
if (link.includes('?')) {
|