@fonixtree/magic-design 2.0.187 → 2.0.188
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/common/LinkModal/BizType/index.js +1 -1
- package/es/composite-comp/public/components/Location/mobile/index.js +19 -26
- package/es/composite-comp/public/components/Location/mobile/index.less +0 -39
- package/es/utils/androidUtil.js +2 -1
- package/lib/common/LinkModal/BizType/index.js +1 -1
- package/lib/composite-comp/public/components/Location/mobile/index.js +19 -26
- package/lib/composite-comp/public/components/Location/mobile/index.less +0 -39
- package/lib/utils/androidUtil.js +2 -1
- package/package.json +1 -1
|
@@ -231,7 +231,7 @@ function AffiliatePlatform(props) {
|
|
|
231
231
|
render: function render(val) {
|
|
232
232
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
233
233
|
alt: "",
|
|
234
|
-
src: val.url,
|
|
234
|
+
src: (val === null || val === void 0 ? void 0 : val.url) || '',
|
|
235
235
|
style: {
|
|
236
236
|
maxWidth: '50px',
|
|
237
237
|
maxHeight: '50px'
|
|
@@ -19,6 +19,8 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
+
var _androidUtil = require("../../../../../utils/androidUtil");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -72,10 +74,24 @@ function (_super) {
|
|
|
72
74
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
75
|
|
|
74
76
|
_this.state = {};
|
|
77
|
+
|
|
78
|
+
_this.switchLanguage = function (value) {
|
|
79
|
+
alert(value);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.getUserAddress = function (value) {
|
|
83
|
+
alert(value);
|
|
84
|
+
};
|
|
85
|
+
|
|
75
86
|
return _this;
|
|
76
87
|
}
|
|
77
88
|
|
|
78
|
-
MerchantSalesMobile.prototype.componentDidMount = function () {
|
|
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
|
+
};
|
|
79
95
|
|
|
80
96
|
MerchantSalesMobile.prototype.render = function () {
|
|
81
97
|
var _a;
|
|
@@ -83,30 +99,7 @@ function (_super) {
|
|
|
83
99
|
var panelProps = this.props.panelProps;
|
|
84
100
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
101
|
className: (0, _classnames["default"])('m-location-mobile', (_a = {}, _a['reversed-layout'] = (0, _commonUtil.needReverse)(), _a))
|
|
86
|
-
}, panelProps.content.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
87
|
-
color: panelProps.content.logo.color,
|
|
88
|
-
size: 20,
|
|
89
|
-
type: "icon-basket-logo"
|
|
90
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
-
className: "search-row"
|
|
92
102
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
-
className: "search-input"
|
|
94
|
-
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
95
|
-
placeholder: (0, _locale.i18n)('SEARCH_FOR_PRODUCT_OR_SHOP'),
|
|
96
|
-
type: "text"
|
|
97
|
-
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
98
|
-
className: "m-icon-search",
|
|
99
|
-
color: "#545454",
|
|
100
|
-
fontWeight: 600,
|
|
101
|
-
size: 24,
|
|
102
|
-
type: "icon-search-short"
|
|
103
|
-
})), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
104
|
-
color: "#FF8650",
|
|
105
|
-
size: 20,
|
|
106
|
-
type: "icon-star-circle"
|
|
107
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
-
className: "rate-num"
|
|
109
|
-
}, "800")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
103
|
className: "address-wrap",
|
|
111
104
|
onClick: function onClick() {}
|
|
112
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -114,8 +107,8 @@ function (_super) {
|
|
|
114
107
|
style: {
|
|
115
108
|
backgroundColor: panelProps.content.locationBg.open ? panelProps.content.locationBg.color : 'transparent'
|
|
116
109
|
}
|
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
118
|
-
color:
|
|
110
|
+
}, panelProps.content.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
111
|
+
color: panelProps.content.logo.color,
|
|
119
112
|
size: 22,
|
|
120
113
|
type: "icon-map-marker-star"
|
|
121
114
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1,41 +1,10 @@
|
|
|
1
1
|
.m-location-mobile {
|
|
2
2
|
text-align: center;
|
|
3
|
-
padding: 0.4rem 0;
|
|
4
|
-
}
|
|
5
|
-
.m-location-mobile .search-row {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
margin: 0.2rem 0.4rem;
|
|
9
|
-
}
|
|
10
|
-
.m-location-mobile .search-row .search-input {
|
|
11
|
-
background-color: #F2F2F2;
|
|
12
|
-
border-radius: 0.08rem;
|
|
13
|
-
margin-right: 0.32rem;
|
|
14
|
-
flex: auto;
|
|
15
|
-
padding: 0.16rem 0.24rem;
|
|
16
|
-
}
|
|
17
|
-
.m-location-mobile .search-row .search-input input {
|
|
18
|
-
width: 84%;
|
|
19
|
-
margin-right: 0.2rem;
|
|
20
|
-
border: none;
|
|
21
|
-
outline: none;
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
}
|
|
24
|
-
.m-location-mobile .search-row .search-input .m-icon-search {
|
|
25
|
-
vertical-align: middle;
|
|
26
|
-
}
|
|
27
|
-
.m-location-mobile .search-row .rate-num {
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
font-size: 0.28rem;
|
|
30
|
-
font-family: Inter;
|
|
31
|
-
color: #545454;
|
|
32
|
-
margin-left: 0.1rem;
|
|
33
3
|
}
|
|
34
4
|
.m-location-mobile .address-wrap {
|
|
35
5
|
border-top: 0.02rem solid #F0F0F0;
|
|
36
6
|
}
|
|
37
7
|
.m-location-mobile .address-wrap .address-bg {
|
|
38
|
-
margin: 0.2rem 0.4rem 0 0.4rem;
|
|
39
8
|
background-color: #F2F2F2;
|
|
40
9
|
display: flex;
|
|
41
10
|
padding: 0.16rem;
|
|
@@ -47,14 +16,6 @@
|
|
|
47
16
|
text-align: left;
|
|
48
17
|
max-width: 80%;
|
|
49
18
|
}
|
|
50
|
-
.m-location-mobile.reversed-layout .search-input {
|
|
51
|
-
margin-right: 0;
|
|
52
|
-
margin-left: 0.32rem;
|
|
53
|
-
}
|
|
54
|
-
.m-location-mobile.reversed-layout .search-input input {
|
|
55
|
-
margin-right: 0;
|
|
56
|
-
margin-left: 0.2rem;
|
|
57
|
-
}
|
|
58
19
|
.m-location-mobile.reversed-layout .address-wrap .text {
|
|
59
20
|
text-align: right;
|
|
60
21
|
}
|
package/es/utils/androidUtil.js
CHANGED
|
@@ -27,7 +27,8 @@ var browserVersion = function browserVersion() {
|
|
|
27
27
|
ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
|
|
28
28
|
ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
29
29
|
isAshitaApp: u.indexOf('app/ASHITA-APP') > -1,
|
|
30
|
-
flutterApp: u.indexOf('app/NURI-APP') > -1
|
|
30
|
+
flutterApp: u.indexOf('app/NURI-APP') > -1,
|
|
31
|
+
isDelivistaApp: u.indexOf('app/Delivista') > -1
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
|
|
@@ -231,7 +231,7 @@ function AffiliatePlatform(props) {
|
|
|
231
231
|
render: function render(val) {
|
|
232
232
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
233
233
|
alt: "",
|
|
234
|
-
src: val.url,
|
|
234
|
+
src: (val === null || val === void 0 ? void 0 : val.url) || '',
|
|
235
235
|
style: {
|
|
236
236
|
maxWidth: '50px',
|
|
237
237
|
maxHeight: '50px'
|
|
@@ -19,6 +19,8 @@ var _common = require("../../../../../common");
|
|
|
19
19
|
|
|
20
20
|
var _locale = require("../../../../../locale");
|
|
21
21
|
|
|
22
|
+
var _androidUtil = require("../../../../../utils/androidUtil");
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
25
|
|
|
24
26
|
var __extends = void 0 && (void 0).__extends || function () {
|
|
@@ -72,10 +74,24 @@ function (_super) {
|
|
|
72
74
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
73
75
|
|
|
74
76
|
_this.state = {};
|
|
77
|
+
|
|
78
|
+
_this.switchLanguage = function (value) {
|
|
79
|
+
alert(value);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.getUserAddress = function (value) {
|
|
83
|
+
alert(value);
|
|
84
|
+
};
|
|
85
|
+
|
|
75
86
|
return _this;
|
|
76
87
|
}
|
|
77
88
|
|
|
78
|
-
MerchantSalesMobile.prototype.componentDidMount = function () {
|
|
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
|
+
};
|
|
79
95
|
|
|
80
96
|
MerchantSalesMobile.prototype.render = function () {
|
|
81
97
|
var _a;
|
|
@@ -83,30 +99,7 @@ function (_super) {
|
|
|
83
99
|
var panelProps = this.props.panelProps;
|
|
84
100
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
85
101
|
className: (0, _classnames["default"])('m-location-mobile', (_a = {}, _a['reversed-layout'] = (0, _commonUtil.needReverse)(), _a))
|
|
86
|
-
}, panelProps.content.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
87
|
-
color: panelProps.content.logo.color,
|
|
88
|
-
size: 20,
|
|
89
|
-
type: "icon-basket-logo"
|
|
90
|
-
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
91
|
-
className: "search-row"
|
|
92
102
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
93
|
-
className: "search-input"
|
|
94
|
-
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
95
|
-
placeholder: (0, _locale.i18n)('SEARCH_FOR_PRODUCT_OR_SHOP'),
|
|
96
|
-
type: "text"
|
|
97
|
-
}), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
98
|
-
className: "m-icon-search",
|
|
99
|
-
color: "#545454",
|
|
100
|
-
fontWeight: 600,
|
|
101
|
-
size: 24,
|
|
102
|
-
type: "icon-search-short"
|
|
103
|
-
})), /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
104
|
-
color: "#FF8650",
|
|
105
|
-
size: 20,
|
|
106
|
-
type: "icon-star-circle"
|
|
107
|
-
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
108
|
-
className: "rate-num"
|
|
109
|
-
}, "800")), /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
103
|
className: "address-wrap",
|
|
111
104
|
onClick: function onClick() {}
|
|
112
105
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -114,8 +107,8 @@ function (_super) {
|
|
|
114
107
|
style: {
|
|
115
108
|
backgroundColor: panelProps.content.locationBg.open ? panelProps.content.locationBg.color : 'transparent'
|
|
116
109
|
}
|
|
117
|
-
}, /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
118
|
-
color:
|
|
110
|
+
}, panelProps.content.logo.open && /*#__PURE__*/_react["default"].createElement(_common.Iconfont, {
|
|
111
|
+
color: panelProps.content.logo.color,
|
|
119
112
|
size: 22,
|
|
120
113
|
type: "icon-map-marker-star"
|
|
121
114
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -1,41 +1,10 @@
|
|
|
1
1
|
.m-location-mobile {
|
|
2
2
|
text-align: center;
|
|
3
|
-
padding: 0.4rem 0;
|
|
4
|
-
}
|
|
5
|
-
.m-location-mobile .search-row {
|
|
6
|
-
display: flex;
|
|
7
|
-
align-items: center;
|
|
8
|
-
margin: 0.2rem 0.4rem;
|
|
9
|
-
}
|
|
10
|
-
.m-location-mobile .search-row .search-input {
|
|
11
|
-
background-color: #F2F2F2;
|
|
12
|
-
border-radius: 0.08rem;
|
|
13
|
-
margin-right: 0.32rem;
|
|
14
|
-
flex: auto;
|
|
15
|
-
padding: 0.16rem 0.24rem;
|
|
16
|
-
}
|
|
17
|
-
.m-location-mobile .search-row .search-input input {
|
|
18
|
-
width: 84%;
|
|
19
|
-
margin-right: 0.2rem;
|
|
20
|
-
border: none;
|
|
21
|
-
outline: none;
|
|
22
|
-
background-color: transparent;
|
|
23
|
-
}
|
|
24
|
-
.m-location-mobile .search-row .search-input .m-icon-search {
|
|
25
|
-
vertical-align: middle;
|
|
26
|
-
}
|
|
27
|
-
.m-location-mobile .search-row .rate-num {
|
|
28
|
-
font-weight: 400;
|
|
29
|
-
font-size: 0.28rem;
|
|
30
|
-
font-family: Inter;
|
|
31
|
-
color: #545454;
|
|
32
|
-
margin-left: 0.1rem;
|
|
33
3
|
}
|
|
34
4
|
.m-location-mobile .address-wrap {
|
|
35
5
|
border-top: 0.02rem solid #F0F0F0;
|
|
36
6
|
}
|
|
37
7
|
.m-location-mobile .address-wrap .address-bg {
|
|
38
|
-
margin: 0.2rem 0.4rem 0 0.4rem;
|
|
39
8
|
background-color: #F2F2F2;
|
|
40
9
|
display: flex;
|
|
41
10
|
padding: 0.16rem;
|
|
@@ -47,14 +16,6 @@
|
|
|
47
16
|
text-align: left;
|
|
48
17
|
max-width: 80%;
|
|
49
18
|
}
|
|
50
|
-
.m-location-mobile.reversed-layout .search-input {
|
|
51
|
-
margin-right: 0;
|
|
52
|
-
margin-left: 0.32rem;
|
|
53
|
-
}
|
|
54
|
-
.m-location-mobile.reversed-layout .search-input input {
|
|
55
|
-
margin-right: 0;
|
|
56
|
-
margin-left: 0.2rem;
|
|
57
|
-
}
|
|
58
19
|
.m-location-mobile.reversed-layout .address-wrap .text {
|
|
59
20
|
text-align: right;
|
|
60
21
|
}
|
package/lib/utils/androidUtil.js
CHANGED
|
@@ -27,7 +27,8 @@ var browserVersion = function browserVersion() {
|
|
|
27
27
|
ditoAndroidApp: u.indexOf('mydito') > -1 && (u.indexOf('Android') > -1 || u.indexOf('Adr') > -1),
|
|
28
28
|
ditoIosApp: u.indexOf('mydito') > -1 && !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
|
|
29
29
|
isAshitaApp: u.indexOf('app/ASHITA-APP') > -1,
|
|
30
|
-
flutterApp: u.indexOf('app/NURI-APP') > -1
|
|
30
|
+
flutterApp: u.indexOf('app/NURI-APP') > -1,
|
|
31
|
+
isDelivistaApp: u.indexOf('app/Delivista') > -1
|
|
31
32
|
};
|
|
32
33
|
};
|
|
33
34
|
|