@fonixtree/magic-design 2.0.188 → 2.0.189
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/public/components/Location/mobile/index.js +11 -19
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -1
- package/es/composite-comp/public/components/Stores/mobile/index.js +1 -1
- package/es/constants/index.js +3 -1
- package/es/decorator/compositeDecorator.js +29 -0
- package/es/locale/ar/ar.json +1 -0
- package/es/locale/en/en.json +1 -0
- package/es/locale/es/es.json +1 -0
- package/es/locale/mn/mn.json +1 -0
- package/es/utils/businessUtil.js +27 -2
- package/es/utils/coreUtil.js +3 -1
- package/lib/composite-comp/public/components/Location/mobile/index.js +11 -19
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -1
- package/lib/composite-comp/public/components/Stores/mobile/index.js +1 -1
- package/lib/constants/index.js +3 -1
- package/lib/decorator/compositeDecorator.js +29 -0
- package/lib/locale/ar/ar.json +1 -0
- package/lib/locale/en/en.json +1 -0
- package/lib/locale/es/es.json +1 -0
- package/lib/locale/mn/mn.json +1 -0
- package/lib/utils/businessUtil.js +27 -2
- package/lib/utils/coreUtil.js +3 -1
- package/package.json +1 -1
|
@@ -19,7 +19,9 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
23
|
+
|
|
24
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
@@ -74,34 +76,24 @@ function (_super) {
|
|
|
74
76
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
75
77
|
|
|
76
78
|
_this.state = {};
|
|
77
|
-
|
|
78
|
-
_this.switchLanguage = function (value) {
|
|
79
|
-
alert(value);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
_this.getUserAddress = function (value) {
|
|
83
|
-
alert(value);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
79
|
return _this;
|
|
87
80
|
}
|
|
88
81
|
|
|
89
|
-
MerchantSalesMobile.prototype.componentDidMount = function () {
|
|
90
|
-
if ((0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
91
|
-
window.magicDesign.switchLanguage = this.switchLanguage;
|
|
92
|
-
window.magicDesign.getUserAddress = this.getUserAddress;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
82
|
+
MerchantSalesMobile.prototype.componentDidMount = function () {};
|
|
95
83
|
|
|
96
84
|
MerchantSalesMobile.prototype.render = function () {
|
|
97
85
|
var _a;
|
|
98
86
|
|
|
99
87
|
var panelProps = this.props.panelProps;
|
|
88
|
+
var info = (0, _storeUtil.getStore)('USER_ADDRESS_INFO') || {};
|
|
89
|
+
var customerInfo = info.customer ? info.customer + " " + info.tel : (0, _locale.i18n)('CAN_BE_ADDED_AS_YOUR_ADDRESS');
|
|
100
90
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
91
|
className: (0, _classnames["default"])('m-location-mobile', (_a = {}, _a['reversed-layout'] = (0, _commonUtil.needReverse)(), _a))
|
|
102
92
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
93
|
className: "address-wrap",
|
|
104
|
-
onClick: function onClick() {
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return (0, _coreUtil.clickUrl)('/location');
|
|
96
|
+
}
|
|
105
97
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
98
|
className: "address-bg",
|
|
107
99
|
style: {
|
|
@@ -116,12 +108,12 @@ function (_super) {
|
|
|
116
108
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
117
109
|
className: "address one_row",
|
|
118
110
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
119
|
-
text: (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS')
|
|
111
|
+
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : info.address
|
|
120
112
|
})
|
|
121
113
|
}), panelProps.content.customer.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
122
114
|
className: "customer one_row",
|
|
123
115
|
data: __assign(__assign({}, panelProps.content.customer), {
|
|
124
|
-
text: (0, _locale.i18n)('CUSTOMER_NAME_AND_PHONE_NUMBER')
|
|
116
|
+
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('CUSTOMER_NAME_AND_PHONE_NUMBER') : customerInfo
|
|
125
117
|
})
|
|
126
118
|
})), panelProps.content.arrowIcon.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
127
119
|
className: "reversed-icon",
|
|
@@ -101,7 +101,6 @@ function (_super) {
|
|
|
101
101
|
rest = __rest(_a, ["data", "panelProps", "onItemClick", "layout"]);
|
|
102
102
|
|
|
103
103
|
var soldNumber = data.salesCnt > 250 ? "" + (data.salesCnt - data.salesCnt % 250) : data.salesCnt || 0;
|
|
104
|
-
console.log(panelProps);
|
|
105
104
|
var storeName = panelProps.storeName,
|
|
106
105
|
storeDesc = panelProps.storeDesc,
|
|
107
106
|
freeDeliveryLabel = panelProps.freeDeliveryLabel,
|
|
@@ -318,7 +318,7 @@ function (_super) {
|
|
|
318
318
|
data: __assign({}, item),
|
|
319
319
|
layout: panelProps.customize.layout,
|
|
320
320
|
onItemClick: function onItemClick() {
|
|
321
|
-
return (0, _coreUtil.clickUrl)("store-" + item.storeId
|
|
321
|
+
return (0, _coreUtil.clickUrl)("store-" + item.storeId);
|
|
322
322
|
},
|
|
323
323
|
panelProps: panelProps.content
|
|
324
324
|
});
|
package/es/constants/index.js
CHANGED
|
@@ -133,6 +133,7 @@ var campaignTypes = {
|
|
|
133
133
|
exports.campaignTypes = campaignTypes;
|
|
134
134
|
var urlType = {
|
|
135
135
|
PRODUCT_DETAIL: 'proDetail',
|
|
136
|
+
STORE: 'store',
|
|
136
137
|
CATG_PROD_LIST: 'catg',
|
|
137
138
|
CUSTOMIZED: 'customized',
|
|
138
139
|
PROD_FILTER: 'filter',
|
|
@@ -162,7 +163,8 @@ var urlTypeMap = {
|
|
|
162
163
|
INTERESTED_MERCHANTS: 'InterestedMerchants',
|
|
163
164
|
INTERESTED_PRODUCTS: 'InterestedProducts',
|
|
164
165
|
MERCHANT_STORY: 'MerchantStory',
|
|
165
|
-
AFFILIATE_MISSION_DETAIL: 'AffiliateMissionDetail'
|
|
166
|
+
AFFILIATE_MISSION_DETAIL: 'AffiliateMissionDetail',
|
|
167
|
+
BUSINESS_TYPE: 'Business Type'
|
|
166
168
|
};
|
|
167
169
|
exports.urlTypeMap = urlTypeMap;
|
|
168
170
|
var respCodeMap = {
|
|
@@ -15,6 +15,10 @@ var _constants = require("../constants");
|
|
|
15
15
|
|
|
16
16
|
var _commonUtil = require("../utils/commonUtil");
|
|
17
17
|
|
|
18
|
+
var _androidUtil = require("../utils/androidUtil");
|
|
19
|
+
|
|
20
|
+
var _storeUtil = require("../utils/storeUtil");
|
|
21
|
+
|
|
18
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
23
|
|
|
20
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -84,8 +88,27 @@ function compositeDecorator(WrappedComponent) {
|
|
|
84
88
|
_this.state = {
|
|
85
89
|
clickedFloor: '',
|
|
86
90
|
hoveredFloor: ''
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
_this.switchLanguage = function (value) {
|
|
94
|
+
alert(value); // const lang = 'ar';
|
|
95
|
+
|
|
96
|
+
(0, _storeUtil.setStore)(_constants.STORAGE_KEY.LOCALE, value);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
_this.getUserAddress = function (value) {
|
|
100
|
+
alert(value); // const info = {
|
|
101
|
+
// address: '简短地址',
|
|
102
|
+
// customer: '客户名称',
|
|
103
|
+
// tel: '客户手机号',
|
|
104
|
+
// longitude: '经度',
|
|
105
|
+
// latitude: '纬度',
|
|
106
|
+
// };
|
|
107
|
+
|
|
108
|
+
(0, _storeUtil.setStore)('USER_ADDRESS_INFO', value);
|
|
87
109
|
}; // 复合组件点击事件
|
|
88
110
|
|
|
111
|
+
|
|
89
112
|
_this.onCompositeCompClick = function (event) {
|
|
90
113
|
if (window.magicDesign.mode === 'renderer') {
|
|
91
114
|
return;
|
|
@@ -267,6 +290,12 @@ function compositeDecorator(WrappedComponent) {
|
|
|
267
290
|
});
|
|
268
291
|
});
|
|
269
292
|
this.getOuterWrapStyle();
|
|
293
|
+
|
|
294
|
+
if ((0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
295
|
+
window['switchLanguage'] = this.switchLanguage;
|
|
296
|
+
window['getUserAddress'] = this.getUserAddress; // switchLanguage();
|
|
297
|
+
// getUserAddress();
|
|
298
|
+
}
|
|
270
299
|
};
|
|
271
300
|
|
|
272
301
|
Wrapper.prototype.componentWillUnmount = function () {
|
package/es/locale/ar/ar.json
CHANGED
package/es/locale/en/en.json
CHANGED
package/es/locale/es/es.json
CHANGED
package/es/locale/mn/mn.json
CHANGED
package/es/utils/businessUtil.js
CHANGED
|
@@ -267,6 +267,18 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
267
267
|
};
|
|
268
268
|
break;
|
|
269
269
|
|
|
270
|
+
case _constants.urlTypeMap.BUSINESS_TYPE:
|
|
271
|
+
// 业态列表
|
|
272
|
+
link = '';
|
|
273
|
+
params = {
|
|
274
|
+
action: 'jump',
|
|
275
|
+
params: {
|
|
276
|
+
type: 'SEARCH_STORE_LIST_PAGE',
|
|
277
|
+
storeBizTypeId: value
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
break;
|
|
281
|
+
|
|
270
282
|
default:
|
|
271
283
|
var map = {
|
|
272
284
|
'/main/cart': 'CART',
|
|
@@ -285,7 +297,8 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
285
297
|
'/account/wallet': 'WEBVIEW',
|
|
286
298
|
'/product/GroupBuy': 'GROUP',
|
|
287
299
|
'/search-page': 'SEARCH_PAGE',
|
|
288
|
-
'/commission': 'COMMISSION'
|
|
300
|
+
'/commission': 'COMMISSION',
|
|
301
|
+
'/location': 'ADD_ADDRESS_PAGE'
|
|
289
302
|
};
|
|
290
303
|
var typeTemp = map[link];
|
|
291
304
|
|
|
@@ -370,6 +383,17 @@ var parseUrl = function parseUrl(url) {
|
|
|
370
383
|
}
|
|
371
384
|
};
|
|
372
385
|
break;
|
|
386
|
+
|
|
387
|
+
case _constants.urlType.STORE:
|
|
388
|
+
// 店铺详情
|
|
389
|
+
params = {
|
|
390
|
+
action: 'jump',
|
|
391
|
+
params: {
|
|
392
|
+
type: 'STORE',
|
|
393
|
+
storeId: arg1
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
break;
|
|
373
397
|
// 海报页面
|
|
374
398
|
|
|
375
399
|
case _constants.urlType.CUSTOMIZED:
|
|
@@ -451,7 +475,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
451
475
|
'/product/GroupBuy': 'GROUP',
|
|
452
476
|
'/search-page': 'SEARCH_PAGE',
|
|
453
477
|
'/main/my-commission': 'WALLET',
|
|
454
|
-
'/commission': 'COMMISSION'
|
|
478
|
+
'/commission': 'COMMISSION',
|
|
479
|
+
'/location': 'ADD_ADDRESS_PAGE'
|
|
455
480
|
};
|
|
456
481
|
link = url;
|
|
457
482
|
params = {
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -335,7 +335,9 @@ var clickUrl = function clickUrl(url, state) {
|
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
console.log('sendToApp', data);
|
|
339
|
+
|
|
340
|
+
if ((0, _androidUtil.browserVersion)().isAshitaApp || (0, _androidUtil.browserVersion)().flutterApp || (0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
339
341
|
(0, _androidUtil.sendToApp)(data);
|
|
340
342
|
} else if ((0, _androidUtil.browserVersion)().isApp && params.link && params.link.startsWith('http')) {
|
|
341
343
|
// 跳转链接是个绝对路径
|
|
@@ -19,7 +19,9 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
23
|
+
|
|
24
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
23
25
|
|
|
24
26
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
27
|
|
|
@@ -74,34 +76,24 @@ function (_super) {
|
|
|
74
76
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
75
77
|
|
|
76
78
|
_this.state = {};
|
|
77
|
-
|
|
78
|
-
_this.switchLanguage = function (value) {
|
|
79
|
-
alert(value);
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
_this.getUserAddress = function (value) {
|
|
83
|
-
alert(value);
|
|
84
|
-
};
|
|
85
|
-
|
|
86
79
|
return _this;
|
|
87
80
|
}
|
|
88
81
|
|
|
89
|
-
MerchantSalesMobile.prototype.componentDidMount = function () {
|
|
90
|
-
if ((0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
91
|
-
window.magicDesign.switchLanguage = this.switchLanguage;
|
|
92
|
-
window.magicDesign.getUserAddress = this.getUserAddress;
|
|
93
|
-
}
|
|
94
|
-
};
|
|
82
|
+
MerchantSalesMobile.prototype.componentDidMount = function () {};
|
|
95
83
|
|
|
96
84
|
MerchantSalesMobile.prototype.render = function () {
|
|
97
85
|
var _a;
|
|
98
86
|
|
|
99
87
|
var panelProps = this.props.panelProps;
|
|
88
|
+
var info = (0, _storeUtil.getStore)('USER_ADDRESS_INFO') || {};
|
|
89
|
+
var customerInfo = info.customer ? info.customer + " " + info.tel : (0, _locale.i18n)('CAN_BE_ADDED_AS_YOUR_ADDRESS');
|
|
100
90
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
101
91
|
className: (0, _classnames["default"])('m-location-mobile', (_a = {}, _a['reversed-layout'] = (0, _commonUtil.needReverse)(), _a))
|
|
102
92
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
103
93
|
className: "address-wrap",
|
|
104
|
-
onClick: function onClick() {
|
|
94
|
+
onClick: function onClick() {
|
|
95
|
+
return (0, _coreUtil.clickUrl)('/location');
|
|
96
|
+
}
|
|
105
97
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
106
98
|
className: "address-bg",
|
|
107
99
|
style: {
|
|
@@ -116,12 +108,12 @@ function (_super) {
|
|
|
116
108
|
}, panelProps.content.address.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
117
109
|
className: "address one_row",
|
|
118
110
|
data: __assign(__assign({}, panelProps.content.address), {
|
|
119
|
-
text: (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS')
|
|
111
|
+
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('DISPLAY_LOCATION_ADDRESS') : info.address
|
|
120
112
|
})
|
|
121
113
|
}), panelProps.content.customer.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
122
114
|
className: "customer one_row",
|
|
123
115
|
data: __assign(__assign({}, panelProps.content.customer), {
|
|
124
|
-
text: (0, _locale.i18n)('CUSTOMER_NAME_AND_PHONE_NUMBER')
|
|
116
|
+
text: (0, _coreUtil.isDesignMode)() ? (0, _locale.i18n)('CUSTOMER_NAME_AND_PHONE_NUMBER') : customerInfo
|
|
125
117
|
})
|
|
126
118
|
})), panelProps.content.arrowIcon.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
127
119
|
className: "reversed-icon",
|
|
@@ -101,7 +101,6 @@ function (_super) {
|
|
|
101
101
|
rest = __rest(_a, ["data", "panelProps", "onItemClick", "layout"]);
|
|
102
102
|
|
|
103
103
|
var soldNumber = data.salesCnt > 250 ? "" + (data.salesCnt - data.salesCnt % 250) : data.salesCnt || 0;
|
|
104
|
-
console.log(panelProps);
|
|
105
104
|
var storeName = panelProps.storeName,
|
|
106
105
|
storeDesc = panelProps.storeDesc,
|
|
107
106
|
freeDeliveryLabel = panelProps.freeDeliveryLabel,
|
|
@@ -318,7 +318,7 @@ function (_super) {
|
|
|
318
318
|
data: __assign({}, item),
|
|
319
319
|
layout: panelProps.customize.layout,
|
|
320
320
|
onItemClick: function onItemClick() {
|
|
321
|
-
return (0, _coreUtil.clickUrl)("store-" + item.storeId
|
|
321
|
+
return (0, _coreUtil.clickUrl)("store-" + item.storeId);
|
|
322
322
|
},
|
|
323
323
|
panelProps: panelProps.content
|
|
324
324
|
});
|
package/lib/constants/index.js
CHANGED
|
@@ -133,6 +133,7 @@ var campaignTypes = {
|
|
|
133
133
|
exports.campaignTypes = campaignTypes;
|
|
134
134
|
var urlType = {
|
|
135
135
|
PRODUCT_DETAIL: 'proDetail',
|
|
136
|
+
STORE: 'store',
|
|
136
137
|
CATG_PROD_LIST: 'catg',
|
|
137
138
|
CUSTOMIZED: 'customized',
|
|
138
139
|
PROD_FILTER: 'filter',
|
|
@@ -162,7 +163,8 @@ var urlTypeMap = {
|
|
|
162
163
|
INTERESTED_MERCHANTS: 'InterestedMerchants',
|
|
163
164
|
INTERESTED_PRODUCTS: 'InterestedProducts',
|
|
164
165
|
MERCHANT_STORY: 'MerchantStory',
|
|
165
|
-
AFFILIATE_MISSION_DETAIL: 'AffiliateMissionDetail'
|
|
166
|
+
AFFILIATE_MISSION_DETAIL: 'AffiliateMissionDetail',
|
|
167
|
+
BUSINESS_TYPE: 'Business Type'
|
|
166
168
|
};
|
|
167
169
|
exports.urlTypeMap = urlTypeMap;
|
|
168
170
|
var respCodeMap = {
|
|
@@ -15,6 +15,10 @@ var _constants = require("../constants");
|
|
|
15
15
|
|
|
16
16
|
var _commonUtil = require("../utils/commonUtil");
|
|
17
17
|
|
|
18
|
+
var _androidUtil = require("../utils/androidUtil");
|
|
19
|
+
|
|
20
|
+
var _storeUtil = require("../utils/storeUtil");
|
|
21
|
+
|
|
18
22
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
23
|
|
|
20
24
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -84,8 +88,27 @@ function compositeDecorator(WrappedComponent) {
|
|
|
84
88
|
_this.state = {
|
|
85
89
|
clickedFloor: '',
|
|
86
90
|
hoveredFloor: ''
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
_this.switchLanguage = function (value) {
|
|
94
|
+
alert(value); // const lang = 'ar';
|
|
95
|
+
|
|
96
|
+
(0, _storeUtil.setStore)(_constants.STORAGE_KEY.LOCALE, value);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
_this.getUserAddress = function (value) {
|
|
100
|
+
alert(value); // const info = {
|
|
101
|
+
// address: '简短地址',
|
|
102
|
+
// customer: '客户名称',
|
|
103
|
+
// tel: '客户手机号',
|
|
104
|
+
// longitude: '经度',
|
|
105
|
+
// latitude: '纬度',
|
|
106
|
+
// };
|
|
107
|
+
|
|
108
|
+
(0, _storeUtil.setStore)('USER_ADDRESS_INFO', value);
|
|
87
109
|
}; // 复合组件点击事件
|
|
88
110
|
|
|
111
|
+
|
|
89
112
|
_this.onCompositeCompClick = function (event) {
|
|
90
113
|
if (window.magicDesign.mode === 'renderer') {
|
|
91
114
|
return;
|
|
@@ -267,6 +290,12 @@ function compositeDecorator(WrappedComponent) {
|
|
|
267
290
|
});
|
|
268
291
|
});
|
|
269
292
|
this.getOuterWrapStyle();
|
|
293
|
+
|
|
294
|
+
if ((0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
295
|
+
window['switchLanguage'] = this.switchLanguage;
|
|
296
|
+
window['getUserAddress'] = this.getUserAddress; // switchLanguage();
|
|
297
|
+
// getUserAddress();
|
|
298
|
+
}
|
|
270
299
|
};
|
|
271
300
|
|
|
272
301
|
Wrapper.prototype.componentWillUnmount = function () {
|
package/lib/locale/ar/ar.json
CHANGED
package/lib/locale/en/en.json
CHANGED
package/lib/locale/es/es.json
CHANGED
package/lib/locale/mn/mn.json
CHANGED
|
@@ -267,6 +267,18 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
267
267
|
};
|
|
268
268
|
break;
|
|
269
269
|
|
|
270
|
+
case _constants.urlTypeMap.BUSINESS_TYPE:
|
|
271
|
+
// 业态列表
|
|
272
|
+
link = '';
|
|
273
|
+
params = {
|
|
274
|
+
action: 'jump',
|
|
275
|
+
params: {
|
|
276
|
+
type: 'SEARCH_STORE_LIST_PAGE',
|
|
277
|
+
storeBizTypeId: value
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
break;
|
|
281
|
+
|
|
270
282
|
default:
|
|
271
283
|
var map = {
|
|
272
284
|
'/main/cart': 'CART',
|
|
@@ -285,7 +297,8 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
285
297
|
'/account/wallet': 'WEBVIEW',
|
|
286
298
|
'/product/GroupBuy': 'GROUP',
|
|
287
299
|
'/search-page': 'SEARCH_PAGE',
|
|
288
|
-
'/commission': 'COMMISSION'
|
|
300
|
+
'/commission': 'COMMISSION',
|
|
301
|
+
'/location': 'ADD_ADDRESS_PAGE'
|
|
289
302
|
};
|
|
290
303
|
var typeTemp = map[link];
|
|
291
304
|
|
|
@@ -370,6 +383,17 @@ var parseUrl = function parseUrl(url) {
|
|
|
370
383
|
}
|
|
371
384
|
};
|
|
372
385
|
break;
|
|
386
|
+
|
|
387
|
+
case _constants.urlType.STORE:
|
|
388
|
+
// 店铺详情
|
|
389
|
+
params = {
|
|
390
|
+
action: 'jump',
|
|
391
|
+
params: {
|
|
392
|
+
type: 'STORE',
|
|
393
|
+
storeId: arg1
|
|
394
|
+
}
|
|
395
|
+
};
|
|
396
|
+
break;
|
|
373
397
|
// 海报页面
|
|
374
398
|
|
|
375
399
|
case _constants.urlType.CUSTOMIZED:
|
|
@@ -451,7 +475,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
451
475
|
'/product/GroupBuy': 'GROUP',
|
|
452
476
|
'/search-page': 'SEARCH_PAGE',
|
|
453
477
|
'/main/my-commission': 'WALLET',
|
|
454
|
-
'/commission': 'COMMISSION'
|
|
478
|
+
'/commission': 'COMMISSION',
|
|
479
|
+
'/location': 'ADD_ADDRESS_PAGE'
|
|
455
480
|
};
|
|
456
481
|
link = url;
|
|
457
482
|
params = {
|
package/lib/utils/coreUtil.js
CHANGED
|
@@ -335,7 +335,9 @@ var clickUrl = function clickUrl(url, state) {
|
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
337
|
|
|
338
|
-
|
|
338
|
+
console.log('sendToApp', data);
|
|
339
|
+
|
|
340
|
+
if ((0, _androidUtil.browserVersion)().isAshitaApp || (0, _androidUtil.browserVersion)().flutterApp || (0, _androidUtil.browserVersion)().isDelivistaApp) {
|
|
339
341
|
(0, _androidUtil.sendToApp)(data);
|
|
340
342
|
} else if ((0, _androidUtil.browserVersion)().isApp && params.link && params.link.startsWith('http')) {
|
|
341
343
|
// 跳转链接是个绝对路径
|