@fonixtree/magic-design 0.1.93 → 0.2.2

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.
Files changed (247) hide show
  1. package/es/assets/fonts/magic-box-iconfont.css +7 -35
  2. package/es/assets/fonts/magic-box-iconfont.css.bak +4 -8
  3. package/es/assets/fonts/magic-box-iconfont.js +1 -1
  4. package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
  5. package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
  6. package/es/assets/fonts/magic-box-iconfont.woff +0 -0
  7. package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
  8. package/es/assets/less/button.less +0 -5
  9. package/es/common/AffiliateProductModal/index.js +1 -1
  10. package/es/common/AffiliateProductModal/index.less +1 -1
  11. package/es/common/Button/index.less +1 -0
  12. package/es/common/CountDown/index.js +11 -20
  13. package/es/common/GroupList/index.js +2 -7
  14. package/es/common/LinkModal/BundleCampaign/index.js +2 -2
  15. package/es/common/LinkModal/CouponTable/index.js +1 -1
  16. package/es/common/LinkModal/CustomTable/index.js +0 -1
  17. package/es/common/LinkModal/FilteredProductModal/index.js +106 -82
  18. package/es/common/LinkModal/FilteredProductModal/index.less +0 -1
  19. package/es/common/LinkModal/ProductDetailPage/index.js +60 -115
  20. package/es/common/LinkModal/ProductDetailPage/index.less +1 -6
  21. package/es/common/LinkModal/SelectVideoModal/index.js +2 -3
  22. package/es/common/LinkModal/index.js +5 -20
  23. package/es/common/MagicLink/index.js +2 -2
  24. package/es/common/ProductModal/index.js +124 -181
  25. package/es/common/ProductModal/index.less +1 -7
  26. package/es/common/ProductSource/index.js +21 -81
  27. package/es/common/UrlPicker/index.js +10 -51
  28. package/es/common/Video/index.js +86 -142
  29. package/es/common/VideoUpload/index.js +1 -1
  30. package/es/common/index.js +0 -8
  31. package/es/composite-comp/bol/components/Banner/mobile/index.js +2 -4
  32. package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
  33. package/es/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
  34. package/es/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
  35. package/es/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
  36. package/es/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
  37. package/{lib/composite-comp/nuri → es/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
  38. package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
  39. package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
  40. package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
  41. package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  42. package/es/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
  43. package/es/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
  44. package/es/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  45. package/es/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
  46. package/{lib/composite-comp/nuri → es/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  47. package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
  48. package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  49. package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  50. package/es/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
  51. package/es/constants/component-types.js +6 -24
  52. package/es/constants/index.js +5 -52
  53. package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
  54. package/es/core/Designer/ChatRobot/index.js +4 -49
  55. package/es/core/Designer/ConfigPanel/index.js +0 -6
  56. package/es/core/Designer/FonixtreeGpt/index.js +29 -222
  57. package/es/core/Designer/PageCompList/index.js +1 -1
  58. package/es/core/Designer/QuickMenuBar/index.js +2 -6
  59. package/es/core/Designer/ToolBarModal/index.js +1 -5
  60. package/es/core/Designer/index.js +1 -12
  61. package/es/core/Renderer/index.js +2 -6
  62. package/es/decorator/compositeDecorator.js +6 -10
  63. package/es/decorator/index.js +1 -4
  64. package/es/decorator/metaDecorator.js +3 -7
  65. package/es/locale/en/en.json +2 -20
  66. package/es/locale/es/es.json +2 -20
  67. package/es/locale/id/id.json +2 -20
  68. package/es/meta-comp/config-panels/TextConfig/index.js +1 -1
  69. package/es/mobx/index.js +3 -9
  70. package/es/utils/androidUtil.js +2 -17
  71. package/es/utils/businessUtil.js +5 -54
  72. package/es/utils/commonUtil.js +13 -151
  73. package/es/utils/coreUtil.js +24 -89
  74. package/lib/assets/fonts/magic-box-iconfont.css +7 -35
  75. package/lib/assets/fonts/magic-box-iconfont.css.bak +4 -8
  76. package/lib/assets/fonts/magic-box-iconfont.js +1 -1
  77. package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
  78. package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
  79. package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
  80. package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
  81. package/lib/assets/less/button.less +0 -5
  82. package/lib/common/AffiliateProductModal/index.js +1 -1
  83. package/lib/common/AffiliateProductModal/index.less +1 -1
  84. package/lib/common/Button/index.less +1 -0
  85. package/lib/common/CountDown/index.js +11 -20
  86. package/lib/common/GroupList/index.js +2 -7
  87. package/lib/common/LinkModal/BundleCampaign/index.js +2 -2
  88. package/lib/common/LinkModal/CouponTable/index.js +1 -1
  89. package/lib/common/LinkModal/CustomTable/index.js +0 -1
  90. package/lib/common/LinkModal/FilteredProductModal/index.js +106 -82
  91. package/lib/common/LinkModal/FilteredProductModal/index.less +0 -1
  92. package/lib/common/LinkModal/ProductDetailPage/index.js +60 -115
  93. package/lib/common/LinkModal/ProductDetailPage/index.less +1 -6
  94. package/lib/common/LinkModal/SelectVideoModal/index.js +2 -3
  95. package/lib/common/LinkModal/index.js +5 -20
  96. package/lib/common/MagicLink/index.js +2 -2
  97. package/lib/common/ProductModal/index.js +124 -181
  98. package/lib/common/ProductModal/index.less +1 -7
  99. package/lib/common/ProductSource/index.js +21 -81
  100. package/lib/common/UrlPicker/index.js +10 -51
  101. package/lib/common/Video/index.js +86 -142
  102. package/lib/common/VideoUpload/index.js +1 -1
  103. package/lib/common/index.js +0 -8
  104. package/lib/composite-comp/bol/components/Banner/mobile/index.js +2 -4
  105. package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +8 -4
  106. package/lib/composite-comp/bol/second-config-panels/VideoSecondConfig/index.js +1 -3
  107. package/lib/composite-comp/common/components/AffiliateProductItem/index.js +20 -22
  108. package/lib/composite-comp/common/components/AffiliateProductItem/index.less +1 -31
  109. package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +0 -1
  110. package/{es/composite-comp/nuri → lib/composite-comp/dito}/components/AffiliateRecommend/mobile/index.js +10 -12
  111. package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.js +10 -12
  112. package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +1 -8
  113. package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +17 -22
  114. package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +2 -2
  115. package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.js +0 -11
  116. package/lib/composite-comp/dito/components/Recommend/mobile/index.js +26 -31
  117. package/lib/composite-comp/dito/components/Recommend/pc/index.js +1 -1
  118. package/lib/composite-comp/dito/components/SearchBar/mobile/index.js +1 -13
  119. package/{es/composite-comp/nuri → lib/composite-comp/dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +1 -1
  120. package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +27 -25
  121. package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +1 -1
  122. package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +1 -1
  123. package/lib/composite-comp/dito/second-config-panels/RecommendSecondConfig/index.js +2 -4
  124. package/lib/constants/component-types.js +6 -24
  125. package/lib/constants/index.js +5 -52
  126. package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +16 -34
  127. package/lib/core/Designer/ChatRobot/index.js +4 -49
  128. package/lib/core/Designer/ConfigPanel/index.js +0 -6
  129. package/lib/core/Designer/FonixtreeGpt/index.js +29 -222
  130. package/lib/core/Designer/PageCompList/index.js +1 -1
  131. package/lib/core/Designer/QuickMenuBar/index.js +2 -6
  132. package/lib/core/Designer/ToolBarModal/index.js +1 -5
  133. package/lib/core/Designer/index.js +1 -12
  134. package/lib/core/Renderer/index.js +2 -6
  135. package/lib/decorator/compositeDecorator.js +6 -10
  136. package/lib/decorator/index.js +1 -4
  137. package/lib/decorator/metaDecorator.js +3 -7
  138. package/lib/locale/en/en.json +2 -20
  139. package/lib/locale/es/es.json +2 -20
  140. package/lib/locale/id/id.json +2 -20
  141. package/lib/meta-comp/config-panels/TextConfig/index.js +1 -1
  142. package/lib/mobx/index.js +3 -9
  143. package/lib/utils/androidUtil.js +2 -17
  144. package/lib/utils/businessUtil.js +5 -54
  145. package/lib/utils/commonUtil.js +13 -151
  146. package/lib/utils/coreUtil.js +24 -89
  147. package/package.json +1 -2
  148. package/es/common/CropperModal/index.js +0 -126
  149. package/es/common/CropperModal/index.less +0 -29
  150. package/es/common/LinkModal/AffiliatePlatform/index.js +0 -326
  151. package/es/common/LinkModal/AffiliateStore/index.js +0 -332
  152. package/es/common/ProductModal/SortableImageList/index.js +0 -118
  153. package/es/common/ProductModal/SortableImageList/index.less +0 -3
  154. package/es/common/UrlPicker/AnchorModal/index.js +0 -170
  155. package/es/common/UrlPicker/AnchorModal/index.less +0 -21
  156. package/es/common/Video/QualityComponent/index.js +0 -169
  157. package/es/common/Video/QualityComponent/index.less +0 -78
  158. package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
  159. package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
  160. package/es/composite-comp/dito/components/CommonFunctions/index.js +0 -84
  161. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
  162. package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
  163. package/es/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
  164. package/es/composite-comp/dito/components/Orders/index.js +0 -84
  165. package/es/composite-comp/dito/components/Orders/mobile/index.js +0 -350
  166. package/es/composite-comp/dito/components/Orders/mobile/index.less +0 -86
  167. package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
  168. package/es/composite-comp/dito/components/PersonalInformation/index.js +0 -84
  169. package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  170. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
  171. package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
  172. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
  173. package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
  174. package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
  175. package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
  176. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
  177. package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
  178. package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
  179. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
  180. package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
  181. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
  182. package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
  183. package/es/mobx/UserState.js +0 -144
  184. package/lib/common/CropperModal/index.js +0 -126
  185. package/lib/common/CropperModal/index.less +0 -29
  186. package/lib/common/LinkModal/AffiliatePlatform/index.js +0 -326
  187. package/lib/common/LinkModal/AffiliateStore/index.js +0 -332
  188. package/lib/common/ProductModal/SortableImageList/index.js +0 -118
  189. package/lib/common/ProductModal/SortableImageList/index.less +0 -3
  190. package/lib/common/UrlPicker/AnchorModal/index.js +0 -170
  191. package/lib/common/UrlPicker/AnchorModal/index.less +0 -21
  192. package/lib/common/Video/QualityComponent/index.js +0 -169
  193. package/lib/common/Video/QualityComponent/index.less +0 -78
  194. package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-cashback.svg +0 -9
  195. package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +0 -92
  196. package/lib/composite-comp/dito/components/CommonFunctions/index.js +0 -84
  197. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +0 -113
  198. package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +0 -30
  199. package/lib/composite-comp/dito/components/Orders/defaultJSON.js +0 -89
  200. package/lib/composite-comp/dito/components/Orders/index.js +0 -84
  201. package/lib/composite-comp/dito/components/Orders/mobile/index.js +0 -350
  202. package/lib/composite-comp/dito/components/Orders/mobile/index.less +0 -86
  203. package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +0 -95
  204. package/lib/composite-comp/dito/components/PersonalInformation/index.js +0 -84
  205. package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
  206. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +0 -592
  207. package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +0 -135
  208. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +0 -128
  209. package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +0 -113
  210. package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +0 -131
  211. package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +0 -114
  212. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +0 -131
  213. package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +0 -118
  214. package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +0 -121
  215. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +0 -148
  216. package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +0 -9
  217. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +0 -143
  218. package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +0 -9
  219. package/lib/mobx/UserState.js +0 -144
  220. /package/es/common/Video/{RateComponent → components}/index.js +0 -0
  221. /package/es/common/Video/{RateComponent → components}/index.less +0 -0
  222. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
  223. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
  224. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
  225. /package/es/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
  226. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  227. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  228. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  229. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  230. /package/es/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  231. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  232. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  233. /package/es/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
  234. /package/lib/common/Video/{RateComponent → components}/index.js +0 -0
  235. /package/lib/common/Video/{RateComponent → components}/index.less +0 -0
  236. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/defaultJSON.js +0 -0
  237. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/index.js +0 -0
  238. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/mobile/index.less +0 -0
  239. /package/lib/composite-comp/{nuri → dito}/components/AffiliateRecommend/pc/index.less +0 -0
  240. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +0 -0
  241. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
  242. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +0 -0
  243. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
  244. /package/lib/composite-comp/{nuri → dito}/config-panels/AffiliateRecommendConfig/index.js +0 -0
  245. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +0 -0
  246. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.js +0 -0
  247. /package/lib/composite-comp/{nuri → dito}/second-config-panels/AffiliateRecommendSecondConfig/index.less +0 -0
@@ -431,7 +431,7 @@ var AffiliateProductModal = function AffiliateProductModal(props) {
431
431
  title: (0, _locale.i18n)('PRODUCT_SELECT'),
432
432
  visible: visible,
433
433
  width: "1200px",
434
- wrapClassName: "affiliateModalCot"
434
+ wrapClassName: "modalCot"
435
435
  }, /*#__PURE__*/_react["default"].createElement("div", {
436
436
  className: "proModalWrap"
437
437
  }, /*#__PURE__*/_react["default"].createElement("div", {
@@ -1,4 +1,4 @@
1
- .affiliateModalCot {
1
+ .modalCot {
2
2
  width: 1200px;
3
3
  right: unset !important;
4
4
  left: unset !important;
@@ -44,6 +44,7 @@
44
44
  }
45
45
 
46
46
  &.text {
47
+ background: #F5F6F7;
47
48
  color: #2F54EB;
48
49
  font-weight: 400;
49
50
  }
@@ -57,11 +57,9 @@ function (_super) {
57
57
  hour: '00',
58
58
  min: '00',
59
59
  second: '00',
60
- nowTime: Number(_this.props.now),
61
- now: _this.props.now
60
+ nowTime: _this.props.now
62
61
  };
63
62
  _this.timer = null;
64
- _this.preTime = '';
65
63
 
66
64
  _this.componentWillUnmount = function () {
67
65
  _this.clearTimer();
@@ -114,26 +112,19 @@ function (_super) {
114
112
  return _this;
115
113
  }
116
114
 
117
- CountDown.getDerivedStateFromProps = function (nextProps, prevState) {
118
- // 检查是否需要更新sortType
119
- if (nextProps.now !== prevState.now) {
120
- return {
121
- now: nextProps.now,
122
- nowTime: nextProps.now
123
- };
124
- }
115
+ CountDown.prototype.componentWillReceiveProps = function (nextProps) {
116
+ var _this = this;
125
117
 
126
- return null;
127
- };
118
+ if (nextProps.now !== this.props.now) {
119
+ this.setState({
120
+ nowTime: nextProps.now
121
+ }, function () {
122
+ _this.clearTimer();
128
123
 
129
- CountDown.prototype.componentDidUpdate = function () {
130
- var now = this.state.now;
124
+ _this.calcLastTime();
131
125
 
132
- if (this.preTime != now) {
133
- this.preTime = now;
134
- this.clearTimer();
135
- this.calcLastTime();
136
- this.timer = setInterval(this.calcLastTime, 1000);
126
+ _this.timer = setInterval(_this.calcLastTime, 1000);
127
+ });
137
128
  }
138
129
  };
139
130
 
@@ -52,11 +52,8 @@ var renderCardDefault = function renderCardDefault(src) {
52
52
  alt: "",
53
53
  src: ((0, _coreUtil.isPc)() ? src.image.content.pcImgSrc : src.image.content.h5ImgSrc) || _defaultImg["default"]
54
54
  }), /*#__PURE__*/_react["default"].createElement("div", {
55
- className: "name",
56
- dangerouslySetInnerHTML: {
57
- __html: src.title.text
58
- }
59
- }));
55
+ className: "name"
56
+ }, src.title.text));
60
57
  };
61
58
 
62
59
  var GroupList =
@@ -121,8 +118,6 @@ function (_super) {
121
118
  _this.setState({});
122
119
 
123
120
  (0, _coreUtil.renderPreview)();
124
-
125
- _this.props.reRender();
126
121
  };
127
122
 
128
123
  _this.deleteItem = function (e, item) {
@@ -179,7 +179,7 @@ var BundleCampaign = function BundleCampaign(props) {
179
179
  campaignName = _b[0],
180
180
  setCampaignName = _b[1];
181
181
 
182
- var _c = (0, _react.useState)(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''),
182
+ var _c = (0, _react.useState)(window.magicDesign.storeId ? window.magicDesign.storeId : ''),
183
183
  storeId = _c[0],
184
184
  setStoreId = _c[1];
185
185
 
@@ -241,7 +241,7 @@ var BundleCampaign = function BundleCampaign(props) {
241
241
 
242
242
  var reset = function reset() {
243
243
  setCampaignName('');
244
- setStoreId(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : '');
244
+ setStoreId(window.magicDesign.storeId ? window.magicDesign.storeId : '');
245
245
  setCmpState('A,B');
246
246
  };
247
247
 
@@ -257,7 +257,7 @@ function CouponTable(props) {
257
257
  state: 'A',
258
258
  couponLocation: 'Promotion',
259
259
  pageTotal: false,
260
- storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
260
+ storeId: window.magicDesign.storeId ? window.magicDesign.storeId : ''
261
261
  });
262
262
  return [4
263
263
  /*yield*/
@@ -198,7 +198,6 @@ function CustomTable(props) {
198
198
 
199
199
  (0, _react.useEffect)(function () {
200
200
  queryCus({
201
- templateType: 'Page',
202
201
  pageType: 'Customized',
203
202
  verType: 'Formal',
204
203
  configVersion: 'V2',
@@ -213,45 +213,49 @@ var FilteredProductModal = function FilteredProductModal(props) {
213
213
  labelData = _f[0],
214
214
  setLabelData = _f[1];
215
215
 
216
- var _g = (0, _react.useState)(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''),
217
- storeId = _g[0],
218
- setStoreId = _g[1];
216
+ var _g = (0, _react.useState)(''),
217
+ storeName = _g[0],
218
+ setStoreName = _g[1];
219
219
 
220
- var _h = (0, _react.useState)([]),
221
- storeList = _h[0],
222
- setStoreList = _h[1];
220
+ var _h = (0, _react.useState)(window.magicDesign.storeId || ''),
221
+ storeId = _h[0],
222
+ setStoreId = _h[1];
223
223
 
224
- var _j = (0, _react.useState)(''),
225
- productName = _j[0],
226
- setProductName = _j[1];
224
+ var _j = (0, _react.useState)([]),
225
+ storeList = _j[0],
226
+ setStoreList = _j[1];
227
227
 
228
228
  var _k = (0, _react.useState)(''),
229
- minimum = _k[0],
230
- setMinimum = _k[1];
229
+ productName = _k[0],
230
+ setProductName = _k[1];
231
231
 
232
232
  var _l = (0, _react.useState)(''),
233
- maximum = _l[0],
234
- setMaximum = _l[1];
233
+ minimum = _l[0],
234
+ setMinimum = _l[1];
235
235
 
236
- var _m = (0, _react.useState)([]),
237
- dataSource = _m[0],
238
- setDataSource = _m[1];
236
+ var _m = (0, _react.useState)(''),
237
+ maximum = _m[0],
238
+ setMaximum = _m[1];
239
239
 
240
- var _o = (0, _react.useState)({}),
241
- promotions = _o[0],
242
- setPromotions = _o[1];
240
+ var _o = (0, _react.useState)([]),
241
+ dataSource = _o[0],
242
+ setDataSource = _o[1];
243
243
 
244
- var _p = (0, _react.useState)(false),
245
- loading = _p[0],
246
- setLoading = _p[1];
244
+ var _p = (0, _react.useState)({}),
245
+ promotions = _p[0],
246
+ setPromotions = _p[1];
247
247
 
248
- var _q = (0, _react.useState)({
248
+ var _q = (0, _react.useState)(false),
249
+ loading = _q[0],
250
+ setLoading = _q[1];
251
+
252
+ var _r = (0, _react.useState)({
249
253
  pageSize: 20,
250
254
  current: 1,
251
255
  total: 0
252
256
  }),
253
- paginationParams = _q[0],
254
- setPaginationParams = _q[1];
257
+ paginationParams = _r[0],
258
+ setPaginationParams = _r[1];
255
259
 
256
260
  var onChange = function onChange(value) {
257
261
  settVal(value);
@@ -277,7 +281,8 @@ var FilteredProductModal = function FilteredProductModal(props) {
277
281
  settVal([]);
278
282
  settBrandId([]);
279
283
  settLabelId({});
280
- setStoreId(window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : '');
284
+ setStoreId(window.magicDesign.storeId || '');
285
+ setStoreName('');
281
286
  setProductName('');
282
287
  setMinimum('');
283
288
  setMaximum('');
@@ -288,7 +293,7 @@ var FilteredProductModal = function FilteredProductModal(props) {
288
293
 
289
294
  var columns = [{
290
295
  title: 'Image',
291
- dataIndex: 'productImageUrl',
296
+ dataIndex: 'imgUrl',
292
297
  key: 'imgUrl',
293
298
  width: 100,
294
299
  render: function render(imgUrl, record) {
@@ -304,7 +309,13 @@ var FilteredProductModal = function FilteredProductModal(props) {
304
309
  dataIndex: 'offerName',
305
310
  key: 'offerName',
306
311
  ellipsis: true
307
- }, {
312
+ }, // {
313
+ // title: 'SKU',
314
+ // dataIndex: 'attrValues',
315
+ // key: 'attrValues',
316
+ // ellipsis: true,
317
+ // },
318
+ {
308
319
  title: 'Price',
309
320
  dataIndex: 'salesPrice',
310
321
  key: 'salesPrice',
@@ -428,57 +439,72 @@ var FilteredProductModal = function FilteredProductModal(props) {
428
439
  };
429
440
 
430
441
  var loadGoods = function loadGoods() {
431
- return __awaiter(void 0, void 0, void 0, function () {
432
- var params, res, h5UrlStr;
433
- return __generator(this, function (_a) {
434
- switch (_a.label) {
435
- case 0:
436
- setLoading(true);
437
- params = {
438
- catgIds: tValue.join(','),
439
- brandIds: brandId.map(function (v) {
440
- return v.key;
441
- }).join(','),
442
- labelIds: labelId.key,
443
- q: productName,
444
- storeId: storeId,
445
- startPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
446
- endPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
447
- campaignType: promotions.key || '',
448
- state: 'A',
449
- pageSize: paginationParams.pageSize,
450
- pageIndex: paginationParams.current
451
- };
452
- return [4
453
- /*yield*/
454
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
455
-
456
- case 1:
457
- res = _a.sent();
458
- setDataSource(res.list || []);
459
- paginationParams.total = res.total;
460
- setPaginationParams(__assign({}, paginationParams));
461
- setLoading(false);
462
- h5UrlStr = JsonToUrl({
463
- catgIds: tValue.join(',') || '',
464
- brandIds: brandId.map(function (v) {
465
- return v.key;
466
- }).join(',') || '',
467
- labelIds: labelId.key || '',
468
- q: productName || '',
469
- storeId: storeId || '',
470
- minPrice: (0, _currencyUtil.formatBackendCurrency)(minimum),
471
- maxPrice: (0, _currencyUtil.formatBackendCurrency)(maximum),
472
- campaignType: promotions.key || '',
473
- state: 'A'
474
- });
475
- return [2
476
- /*return*/
477
- , {
478
- url: h5UrlStr,
479
- total: res.total
480
- }];
481
- }
442
+ setLoading(true);
443
+ return new Promise(function (resolve, reject) {
444
+ return __awaiter(void 0, void 0, void 0, function () {
445
+ var precision, params, res;
446
+ return __generator(this, function (_a) {
447
+ switch (_a.label) {
448
+ case 0:
449
+ precision = Math.pow(10, (0, _commonUtil.ensure)(function () {
450
+ return window.systemParams.precision;
451
+ }, '0'));
452
+ params = {
453
+ catgIds: tValue.join(','),
454
+ brandIds: brandId.map(function (v) {
455
+ return v.key;
456
+ }).join(','),
457
+ labelIds: labelId.key,
458
+ q: productName,
459
+ // productName,
460
+ storeId: storeId,
461
+ startPrice: minimum * precision || '',
462
+ endPrice: maximum * precision || '',
463
+ // storeName:storeName,
464
+ campaignType: promotions.key || '',
465
+ pageSize: paginationParams.pageSize,
466
+ pageIndex: paginationParams.current,
467
+ state: 'A'
468
+ };
469
+ return [4
470
+ /*yield*/
471
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers/es", params, 'POST')];
472
+
473
+ case 1:
474
+ res = _a.sent();
475
+ setLoading(false);
476
+ paginationParams.total = res.total;
477
+
478
+ if (res && res.list && res.list.length > 0) {
479
+ setDataSource(res.list);
480
+ resolve({
481
+ url: JsonToUrl({
482
+ catgIds: tValue.join(',') || '',
483
+ brandIds: brandId.map(function (v) {
484
+ return v.key;
485
+ }).join(',') || '',
486
+ labelIds: labelId.key || '',
487
+ q: productName || '',
488
+ minPrice: minimum * precision || '',
489
+ maxPrice: maximum * precision || '',
490
+ storeId: storeId || '',
491
+ campaignType: promotions.key || '',
492
+ state: 'A'
493
+ }),
494
+ total: res.total
495
+ });
496
+ } else {
497
+ setDataSource([]);
498
+ resolve({
499
+ total: 0
500
+ });
501
+ }
502
+
503
+ return [2
504
+ /*return*/
505
+ ];
506
+ }
507
+ });
482
508
  });
483
509
  });
484
510
  };
@@ -638,15 +664,13 @@ var FilteredProductModal = function FilteredProductModal(props) {
638
664
  onClick: function onClick() {
639
665
  paginationParams.current = 1;
640
666
  loadGoods().then(function (res) {
641
- console.log('res', res);
642
-
643
667
  if (res.total !== 0) {
644
668
  onDataChange({
645
669
  value: res.url,
646
670
  name: res.url
647
671
  }, res.total);
648
672
  } else {
649
- onDataChange('', res.total);
673
+ onDataChange('', res.total); // message.warn('no goods!');
650
674
  }
651
675
  });
652
676
  },
@@ -1,6 +1,5 @@
1
1
  .mFilteredProductModal {
2
2
  height: 550px;
3
-
4
3
  .proModalWrap {
5
4
  .info {
6
5
  background: #ecf1fd;
@@ -182,10 +182,23 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
182
182
  }
183
183
  };
184
184
 
185
+ var __rest = void 0 && (void 0).__rest || function (s, e) {
186
+ var t = {};
187
+
188
+ for (var p in s) {
189
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
190
+ }
191
+
192
+ if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
193
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
194
+ }
195
+ return t;
196
+ };
197
+
185
198
  var Option = _antd.Select.Option;
186
199
 
187
200
  var ProductDetailPage = function ProductDetailPage(props) {
188
- var onChange = props.onChange;
201
+ var _onChange = props.onChange;
189
202
 
190
203
  var _a = (0, _react.useState)([]),
191
204
  productList = _a[0],
@@ -219,25 +232,12 @@ var ProductDetailPage = function ProductDetailPage(props) {
219
232
  loading = _h[0],
220
233
  setLoading = _h[1];
221
234
 
222
- var _j = (0, _react.useState)('sku'),
223
- proType = _j[0],
224
- setProType = _j[1];
225
-
226
- var _k = (0, _react.useState)(false),
227
- flag = _k[0],
228
- setFlag = _k[1];
229
-
230
- var _l = (0, _react.useState)({}),
231
- selectedPro = _l[0],
232
- setSelectedPro = _l[1];
233
-
234
- var _m = (0, _react.useState)({
235
+ var _j = (0, _react.useState)({
235
236
  pageSize: 20,
236
- current: 1,
237
- total: 0
237
+ pageIndex: 1
238
238
  }),
239
- paginationParams = _m[0],
240
- setPaginationParams = _m[1];
239
+ paginationParams = _j[0],
240
+ setPaginationParams = _j[1];
241
241
 
242
242
  var columns = [{
243
243
  title: 'Image',
@@ -266,81 +266,32 @@ var ProductDetailPage = function ProductDetailPage(props) {
266
266
  ellipsis: true
267
267
  }];
268
268
  var rowSelection = {
269
- selectedRowKeys: [(selectedPro === null || selectedPro === void 0 ? void 0 : selectedPro.productId) || ''],
270
269
  onChange: function onChange(selectedRowKeys, selectedRows) {
271
- var selected = {
270
+ _onChange({
272
271
  offerId: selectedRows[0].offerId,
273
272
  productId: selectedRows[0].productId,
274
273
  name: selectedRows[0].productName
275
- };
276
- setSelectedPro(selected);
274
+ });
277
275
  },
278
276
  type: 'radio'
279
277
  };
280
278
 
281
- var queryGoods = function queryGoods() {
279
+ var queryGoods = function queryGoods(params) {
282
280
  return __awaiter(void 0, void 0, void 0, function () {
283
- var _list, total, params, res_1, res;
284
-
281
+ var res;
285
282
  return __generator(this, function (_a) {
286
283
  switch (_a.label) {
287
284
  case 0:
288
- _list = [];
289
- total = 0;
290
- params = {
291
- productName: productName,
292
- brandIds: brandId.map(function (v) {
293
- return v.key;
294
- }).join(',') || '',
295
- storeId: storeId,
296
- pageSize: paginationParams.pageSize,
297
- pageIndex: paginationParams.current
298
- };
299
- if (!(proType === 'spu')) return [3
300
- /*break*/
301
- , 2];
302
285
  return [4
303
286
  /*yield*/
304
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/offers", __assign(__assign({}, params), {
305
- offerCode: productCode,
306
- isDefaultCover: 'Y',
307
- onlyQryPublishSku: true,
308
- auditState: 'S',
309
- crmFlag: 'on'
310
- }), 'GET')];
287
+ , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", params, 'GET')];
311
288
 
312
289
  case 1:
313
- res_1 = _a.sent();
314
- _list = (0, _commonUtil.ensure)(function () {
315
- return res_1.list.map(function (m) {
316
- return __assign(__assign({}, m.products[0]), m);
317
- });
318
- }, []);
319
- total = res_1.total;
320
- return [3
321
- /*break*/
322
- , 4];
323
-
324
- case 2:
325
- return [4
326
- /*yield*/
327
- , (0, _commonUtil.commonFetch)("/designer/v1/" + window.magicDesign.MBaseUrl + "/products", __assign(__assign({}, params), {
328
- state: 'A',
329
- productCode: productCode
330
- }), 'GET')];
331
-
332
- case 3:
333
290
  res = _a.sent();
334
- _list = res.list || [];
335
- total = res.total;
336
- _a.label = 4;
337
-
338
- case 4:
339
- setProductList(_list);
340
291
  setLoading(false);
341
- window.MProductList = _list;
342
- paginationParams.total = total;
343
- setPaginationParams(__assign({}, paginationParams));
292
+ paginationParams.total = res.total;
293
+ setProductList(res.list);
294
+ window.MProductList = res.list;
344
295
  return [2
345
296
  /*return*/
346
297
  ];
@@ -410,32 +361,18 @@ var ProductDetailPage = function ProductDetailPage(props) {
410
361
  };
411
362
 
412
363
  (0, _react.useEffect)(function () {
364
+ setLoading(true);
365
+
366
+ var total = paginationParams.total,
367
+ params = __rest(paginationParams, ["total"]);
368
+
369
+ queryGoods(params);
413
370
  queryBrand();
414
371
 
415
372
  if ((0, _businessUtil.isPlatform)()) {
416
373
  queryStore();
417
374
  }
418
375
  }, []);
419
- (0, _react.useEffect)(function () {
420
- onChange(selectedPro);
421
- }, [selectedPro]);
422
- (0, _react.useEffect)(function () {
423
- setLoading(true);
424
- reset();
425
- setSelectedPro({});
426
- paginationParams.current = 1;
427
- setFlag(!flag);
428
- }, [proType]);
429
- (0, _react.useEffect)(function () {
430
- queryGoods();
431
- }, [flag]);
432
- var proTypeOption = [{
433
- label: 'SKU',
434
- value: 'sku'
435
- }, {
436
- label: 'SPU',
437
- value: 'spu'
438
- }];
439
376
  return /*#__PURE__*/_react["default"].createElement("div", {
440
377
  className: "productDetailPage"
441
378
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form, {
@@ -445,20 +382,6 @@ var ProductDetailPage = function ProductDetailPage(props) {
445
382
  layout: "horizontal"
446
383
  }, /*#__PURE__*/_react["default"].createElement(_antd.Row, {
447
384
  gutter: 24
448
- }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
449
- offset: 20,
450
- span: 4
451
- }, /*#__PURE__*/_react["default"].createElement(_antd.Radio.Group, {
452
- buttonStyle: "solid",
453
- className: "btn-select-type",
454
- onChange: function onChange(e) {
455
- setProType(e.target.value);
456
- },
457
- options: proTypeOption,
458
- optionType: "button",
459
- value: proType
460
- }))), /*#__PURE__*/_react["default"].createElement(_antd.Row, {
461
- gutter: 24
462
385
  }, /*#__PURE__*/_react["default"].createElement(_antd.Col, {
463
386
  span: 9
464
387
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
@@ -472,7 +395,7 @@ var ProductDetailPage = function ProductDetailPage(props) {
472
395
  }))), /*#__PURE__*/_react["default"].createElement(_antd.Col, {
473
396
  span: 9
474
397
  }, /*#__PURE__*/_react["default"].createElement(_antd.Form.Item, {
475
- label: proType === 'spu' ? 'SPU Code' : 'SKU Code'
398
+ label: "SKU Code"
476
399
  }, /*#__PURE__*/_react["default"].createElement(_antd.Input, {
477
400
  onChange: function onChange(e) {
478
401
  return setProductCode(e.target.value);
@@ -521,8 +444,19 @@ var ProductDetailPage = function ProductDetailPage(props) {
521
444
  }, /*#__PURE__*/_react["default"].createElement(_antd.Button, {
522
445
  onClick: function onClick() {
523
446
  setLoading(true);
524
- paginationParams.current = 1;
525
- queryGoods();
447
+ paginationParams.pageIndex = 1;
448
+
449
+ var total = paginationParams.total,
450
+ params = __rest(paginationParams, ["total"]);
451
+
452
+ queryGoods(__assign({
453
+ productName: productName,
454
+ productCode: productCode,
455
+ brandIds: brandId.map(function (v) {
456
+ return v.key;
457
+ }).join(',') || '',
458
+ storeId: storeId
459
+ }, params));
526
460
  },
527
461
  size: "small",
528
462
  style: {
@@ -542,15 +476,26 @@ var ProductDetailPage = function ProductDetailPage(props) {
542
476
  pagination: __assign(__assign({}, paginationParams), {
543
477
  onChange: function onChange(page) {
544
478
  setLoading(true);
545
- paginationParams.current = page;
546
- queryGoods();
479
+ paginationParams.pageIndex = page;
480
+
481
+ var total = paginationParams.total,
482
+ params = __rest(paginationParams, ["total"]);
483
+
484
+ queryGoods(__assign({
485
+ productName: productName,
486
+ productCode: productCode,
487
+ brandIds: brandId.map(function (v) {
488
+ return v.key;
489
+ }).join(',') || '',
490
+ storeId: storeId
491
+ }, params));
547
492
  },
548
493
  showSizeChanger: false
549
494
  }),
550
495
  rowKey: "productId",
551
496
  rowSelection: rowSelection,
552
497
  scroll: {
553
- y: 300
498
+ y: 340
554
499
  }
555
500
  }));
556
501
  };
@@ -1,10 +1,5 @@
1
1
  .productDetailPage {
2
2
  height: 550px;
3
-
4
- .btn-select-type {
5
- margin-bottom: 10px;
6
- }
7
-
8
3
  .prodImage {
9
4
  width: 36px;
10
5
  height: 36px;
@@ -12,4 +7,4 @@
12
7
  background-position: 50% 50%;
13
8
  background-size: contain;
14
9
  }
15
- }
10
+ }