@fonixtree/magic-design 1.0.47 → 1.0.48
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.
|
@@ -13,8 +13,6 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
var _common = require("../../../../../common");
|
|
15
15
|
|
|
16
|
-
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
-
|
|
18
16
|
var _star = _interopRequireDefault(require("../imgs/star.svg"));
|
|
19
17
|
|
|
20
18
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
@@ -240,8 +238,13 @@ function (_super) {
|
|
|
240
238
|
};
|
|
241
239
|
|
|
242
240
|
_this.searchProduct = function () {
|
|
243
|
-
var storeId = window.magicDesign.storeId;
|
|
244
|
-
|
|
241
|
+
var storeId = window.magicDesign.storeId; // 只读模式,设计模式,url为空,邮箱模版
|
|
242
|
+
|
|
243
|
+
if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
(0, _commonUtil.navigateToWithSearch)('/product/list', "q=" + _this.state.inputVal + "&storeId=" + storeId); // clickUrl(`/product/list?q=${this.state.inputVal}&storeId=${storeId}`);
|
|
245
248
|
};
|
|
246
249
|
|
|
247
250
|
_this.clickCollect = function () {
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -16,7 +16,9 @@ exports.dragSource = exports.downloadBase64Image = void 0;
|
|
|
16
16
|
exports.ensure = ensure;
|
|
17
17
|
exports.getGAData = exports.getColorRgba = void 0;
|
|
18
18
|
exports.getPageDataMap = getPageDataMap;
|
|
19
|
-
exports.
|
|
19
|
+
exports.navigateTo = exports.importAsync = exports.getUrlParams = void 0;
|
|
20
|
+
exports.navigateToWithSearch = navigateToWithSearch;
|
|
21
|
+
exports.nextTick = void 0;
|
|
20
22
|
exports.pushGA = pushGA;
|
|
21
23
|
exports.pxToRem = void 0;
|
|
22
24
|
exports.shareFacebook = shareFacebook;
|
|
@@ -309,9 +311,21 @@ var navigateTo = function navigateTo(url) {
|
|
|
309
311
|
}
|
|
310
312
|
}
|
|
311
313
|
};
|
|
314
|
+
/** 携带search 跳转 */
|
|
315
|
+
|
|
312
316
|
|
|
313
317
|
exports.navigateTo = navigateTo;
|
|
314
318
|
|
|
319
|
+
function navigateToWithSearch(url, search, state) {
|
|
320
|
+
var _a;
|
|
321
|
+
|
|
322
|
+
(_a = window.magicDesign) === null || _a === void 0 ? void 0 : _a.history.push({
|
|
323
|
+
pathname: url,
|
|
324
|
+
search: search,
|
|
325
|
+
state: state
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
315
329
|
var addUrlQuery = function addUrlQuery(url, queryObj) {
|
|
316
330
|
if (/\?/.test(url)) {
|
|
317
331
|
return url + '&' + _qs["default"].stringify(queryObj);
|
|
@@ -13,8 +13,6 @@ var _antd = require("antd");
|
|
|
13
13
|
|
|
14
14
|
var _common = require("../../../../../common");
|
|
15
15
|
|
|
16
|
-
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
17
|
-
|
|
18
16
|
var _star = _interopRequireDefault(require("../imgs/star.svg"));
|
|
19
17
|
|
|
20
18
|
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
@@ -240,8 +238,13 @@ function (_super) {
|
|
|
240
238
|
};
|
|
241
239
|
|
|
242
240
|
_this.searchProduct = function () {
|
|
243
|
-
var storeId = window.magicDesign.storeId;
|
|
244
|
-
|
|
241
|
+
var storeId = window.magicDesign.storeId; // 只读模式,设计模式,url为空,邮箱模版
|
|
242
|
+
|
|
243
|
+
if (window.magicDesign.readOnly || window.magicDesign.mode !== 'renderer' || !url || window.magicDesign.outputType == 'html') {
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
(0, _commonUtil.navigateToWithSearch)('/product/list', "q=" + _this.state.inputVal + "&storeId=" + storeId); // clickUrl(`/product/list?q=${this.state.inputVal}&storeId=${storeId}`);
|
|
245
248
|
};
|
|
246
249
|
|
|
247
250
|
_this.clickCollect = function () {
|
package/lib/utils/commonUtil.js
CHANGED
|
@@ -16,7 +16,9 @@ exports.dragSource = exports.downloadBase64Image = void 0;
|
|
|
16
16
|
exports.ensure = ensure;
|
|
17
17
|
exports.getGAData = exports.getColorRgba = void 0;
|
|
18
18
|
exports.getPageDataMap = getPageDataMap;
|
|
19
|
-
exports.
|
|
19
|
+
exports.navigateTo = exports.importAsync = exports.getUrlParams = void 0;
|
|
20
|
+
exports.navigateToWithSearch = navigateToWithSearch;
|
|
21
|
+
exports.nextTick = void 0;
|
|
20
22
|
exports.pushGA = pushGA;
|
|
21
23
|
exports.pxToRem = void 0;
|
|
22
24
|
exports.shareFacebook = shareFacebook;
|
|
@@ -309,9 +311,21 @@ var navigateTo = function navigateTo(url) {
|
|
|
309
311
|
}
|
|
310
312
|
}
|
|
311
313
|
};
|
|
314
|
+
/** 携带search 跳转 */
|
|
315
|
+
|
|
312
316
|
|
|
313
317
|
exports.navigateTo = navigateTo;
|
|
314
318
|
|
|
319
|
+
function navigateToWithSearch(url, search, state) {
|
|
320
|
+
var _a;
|
|
321
|
+
|
|
322
|
+
(_a = window.magicDesign) === null || _a === void 0 ? void 0 : _a.history.push({
|
|
323
|
+
pathname: url,
|
|
324
|
+
search: search,
|
|
325
|
+
state: state
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
|
|
315
329
|
var addUrlQuery = function addUrlQuery(url, queryObj) {
|
|
316
330
|
if (/\?/.test(url)) {
|
|
317
331
|
return url + '&' + _qs["default"].stringify(queryObj);
|