@fonixtree/magic-design 2.0.189 → 3.0.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.
- package/es/assets/fonts/magic-box-iconfont.css +3 -3
- package/es/assets/fonts/magic-box-iconfont.css.bak +3 -3
- package/es/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff +0 -0
- package/es/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/es/assets/images/base64/index.js +2 -8
- package/es/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/es/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/es/assets/images/layout-icon/bundleLayout1.png +0 -0
- package/es/assets/images/layout-icon/center.png +0 -0
- package/es/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
- package/es/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
- package/es/assets/images/layout-icon/imageTextLeft.svg +6 -0
- package/es/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/es/assets/images/layout-icon/interestLayout1.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
- package/es/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-3.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-4.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-5.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/es/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/es/assets/images/layout-icon/layout-search.png +0 -0
- package/es/assets/images/layout-icon/left.png +0 -0
- package/es/assets/images/layout-icon/locationLayout.png +0 -0
- package/es/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
- package/es/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
- package/es/assets/images/layout-icon/right.png +0 -0
- package/es/assets/images/layout-icon/textLayout1.png +0 -0
- package/es/assets/less/common.less +3 -40
- package/es/common/Field/index.js +2 -5
- package/es/common/Field/index.less +0 -5
- package/es/common/LinkModal/index.js +0 -7
- package/es/common/MyModal/index.less +4 -12
- package/es/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/{lib/composite-comp/public → es/composite-comp/bol}/components/Location/index.js +20 -4
- package/es/composite-comp/bol/components/Location/index.less +15 -0
- package/{lib/composite-comp/ashita/components/WalletAshita → es/composite-comp/bol/components/Wallet}/defaultJSON.js +1 -1
- package/{lib/composite-comp/public → es/composite-comp/bol}/config-panels/LocationConfig/index.js +52 -10
- package/{lib/composite-comp/ashita/config-panels/WalletAshitaConfig → es/composite-comp/bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.js +1 -1
- package/es/composite-comp/common/components/MonpayProductItem/index.js +3 -3
- package/es/composite-comp/common/components/MonpayProductItem/index.less +12 -8
- package/es/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/index.js +5 -1
- package/es/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +30 -5
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +584 -0
- package/es/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +8 -8
- package/es/composite-comp/monpay/components/MonpayRecommend/index.js +5 -1
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +14 -15
- package/es/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +0 -11
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.js +809 -0
- package/es/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
- package/es/constants/component-types.js +13 -23
- package/es/constants/index.js +2 -12
- package/es/constants/layout.js +16 -29
- package/es/core/Designer/ConfigPanel/TerminalSelect/index.js +1 -1
- package/es/core/Designer/QuickMenuBar/index.js +1 -1
- package/es/decorator/compositeDecorator.js +0 -29
- package/es/locale/en/en.json +1 -16
- package/es/locale/es/es.json +1 -16
- package/es/locale/index.js +1 -5
- package/es/locale/mn/mn.json +2 -17
- package/es/meta-comp/components/Text/index.less +0 -6
- package/es/meta-comp/config-panels/ButtonConfig/index.js +8 -7
- package/es/utils/androidUtil.js +1 -2
- package/es/utils/businessUtil.js +2 -27
- package/es/utils/commonUtil.js +10 -26
- package/es/utils/coreUtil.js +1 -3
- package/es/utils/dateUtil.js +14 -0
- package/lib/assets/fonts/magic-box-iconfont.css +3 -3
- package/lib/assets/fonts/magic-box-iconfont.css.bak +3 -3
- package/lib/assets/fonts/magic-box-iconfont.ttf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff +0 -0
- package/lib/assets/fonts/magic-box-iconfont.woff2 +0 -0
- package/lib/assets/images/base64/index.js +2 -8
- package/lib/assets/images/layout-icon/banner-slide-layout1.png +0 -0
- package/lib/assets/images/layout-icon/banner-slide-layout2.png +0 -0
- package/lib/assets/images/layout-icon/bundleLayout1.png +0 -0
- package/lib/assets/images/layout-icon/center.png +0 -0
- package/lib/assets/images/layout-icon/imageGalleryLayout2.png +0 -0
- package/lib/assets/images/layout-icon/imageGalleryLayout3.png +0 -0
- package/lib/assets/images/layout-icon/imageTextLeft.svg +6 -0
- package/lib/assets/images/layout-icon/imageTextRight.svg +6 -0
- package/lib/assets/images/layout-icon/interestLayout1.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m1-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-m3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p1.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p2.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p3.png +0 -0
- package/lib/assets/images/layout-icon/layout-imagetext-p4.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-4.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-5.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-1.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-2.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-3.png +0 -0
- package/lib/assets/images/layout-icon/layout-recommend-mobile-4.png +0 -0
- package/lib/assets/images/layout-icon/layout-search.png +0 -0
- package/lib/assets/images/layout-icon/left.png +0 -0
- package/lib/assets/images/layout-icon/locationLayout.png +0 -0
- package/lib/assets/images/layout-icon/merchantSalesLayout1.png +0 -0
- package/lib/assets/images/layout-icon/monpaySignBoardLayout1.png +0 -0
- package/lib/assets/images/layout-icon/right.png +0 -0
- package/lib/assets/images/layout-icon/textLayout1.png +0 -0
- package/lib/assets/less/common.less +3 -40
- package/lib/common/Field/index.js +2 -5
- package/lib/common/Field/index.less +0 -5
- package/lib/common/LinkModal/index.js +0 -7
- package/lib/common/MyModal/index.less +4 -12
- package/lib/composite-comp/bol/components/Location/defaultJSON.js +60 -0
- package/{es/composite-comp/public → lib/composite-comp/bol}/components/Location/index.js +20 -4
- package/lib/composite-comp/bol/components/Location/index.less +15 -0
- package/{es/composite-comp/ashita/components/WalletAshita → lib/composite-comp/bol/components/Wallet}/defaultJSON.js +1 -1
- package/{es/composite-comp/public → lib/composite-comp/bol}/config-panels/LocationConfig/index.js +52 -10
- package/{es/composite-comp/ashita/config-panels/WalletAshitaConfig → lib/composite-comp/bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.js +1 -1
- package/lib/composite-comp/common/components/MonpayProductItem/index.js +3 -3
- package/lib/composite-comp/common/components/MonpayProductItem/index.less +12 -8
- package/lib/composite-comp/dito/config-panels/BargainConfig/FlashDealConfigContent/index.js +1 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/index.js +5 -1
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/mobile/index.js +30 -5
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg1.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg2.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/imgs/defImg3.png +0 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.js +584 -0
- package/lib/composite-comp/monpay/components/MonpayFlashDeal/pc/index.less +150 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/defaultJSON.js +8 -8
- package/lib/composite-comp/monpay/components/MonpayRecommend/index.js +5 -1
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.js +14 -15
- package/lib/composite-comp/monpay/components/MonpayRecommend/mobile/index.less +0 -11
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.js +809 -0
- package/lib/composite-comp/monpay/components/MonpayRecommend/pc/index.less +129 -0
- package/lib/constants/component-types.js +13 -23
- package/lib/constants/index.js +2 -12
- package/lib/constants/layout.js +16 -29
- package/lib/core/Designer/ConfigPanel/TerminalSelect/index.js +1 -1
- package/lib/core/Designer/QuickMenuBar/index.js +1 -1
- package/lib/decorator/compositeDecorator.js +0 -29
- package/lib/locale/en/en.json +1 -16
- package/lib/locale/es/es.json +1 -16
- package/lib/locale/index.js +1 -5
- package/lib/locale/mn/mn.json +2 -17
- package/lib/meta-comp/components/Text/index.less +0 -6
- package/lib/meta-comp/config-panels/ButtonConfig/index.js +8 -7
- package/lib/utils/androidUtil.js +1 -2
- package/lib/utils/businessUtil.js +2 -27
- package/lib/utils/commonUtil.js +10 -26
- package/lib/utils/coreUtil.js +1 -3
- package/lib/utils/dateUtil.js +14 -0
- package/package.json +2 -2
- package/es/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
- package/es/assets/images/layout-icon/storesLayout1.png +0 -0
- package/es/assets/images/layout-icon/storesLayout2.png +0 -0
- package/es/common/LinkModal/BizType/index.js +0 -274
- package/es/composite-comp/ashita/components/WalletAshita/index.js +0 -84
- package/es/composite-comp/public/components/Location/defaultJSON.js +0 -104
- package/es/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
- package/es/composite-comp/public/components/Location/mobile/index.js +0 -133
- package/es/composite-comp/public/components/Location/mobile/index.less +0 -21
- package/es/composite-comp/public/components/Stores/defaultJSON.js +0 -348
- package/es/composite-comp/public/components/Stores/index.js +0 -86
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -250
- package/es/composite-comp/public/components/Stores/mobile/StoreItem/index.less +0 -81
- package/es/composite-comp/public/components/Stores/mobile/index.js +0 -335
- package/es/composite-comp/public/components/Stores/mobile/index.less +0 -33
- package/es/composite-comp/public/components/Wallet/defaultJSON.js +0 -149
- package/es/composite-comp/public/components/Wallet/mobile/index.js +0 -350
- package/es/composite-comp/public/components/Wallet/mobile/index.less +0 -22
- package/es/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +0 -153
- package/es/composite-comp/public/config-panels/LocationConfig/index.less +0 -17
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +0 -176
- package/es/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +0 -103
- package/es/composite-comp/public/config-panels/StoresConfig/index.js +0 -134
- package/es/composite-comp/public/config-panels/WalletConfig/index.js +0 -61
- package/es/locale/ar/ar.json +0 -362
- package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +0 -207
- package/es/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +0 -81
- package/lib/assets/images/layout-icon/layout-imagetext-p5.png +0 -0
- package/lib/assets/images/layout-icon/storesLayout1.png +0 -0
- package/lib/assets/images/layout-icon/storesLayout2.png +0 -0
- package/lib/common/LinkModal/BizType/index.js +0 -274
- package/lib/composite-comp/ashita/components/WalletAshita/index.js +0 -84
- package/lib/composite-comp/ashita/config-panels/WalletAshitaConfig/WalletConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.js +0 -100
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/GroupList/index.less +0 -72
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -123
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/nuri/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/nuri/second-config-panels/WalletNuriSecondConfig/index.js +0 -152
- package/lib/composite-comp/public/components/Location/defaultJSON.js +0 -104
- package/lib/composite-comp/public/components/Location/mobile/img/img-circle.png +0 -0
- package/lib/composite-comp/public/components/Location/mobile/index.js +0 -133
- package/lib/composite-comp/public/components/Location/mobile/index.less +0 -21
- package/lib/composite-comp/public/components/Stores/defaultJSON.js +0 -348
- package/lib/composite-comp/public/components/Stores/index.js +0 -86
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.js +0 -250
- package/lib/composite-comp/public/components/Stores/mobile/StoreItem/index.less +0 -81
- package/lib/composite-comp/public/components/Stores/mobile/index.js +0 -335
- package/lib/composite-comp/public/components/Stores/mobile/index.less +0 -33
- package/lib/composite-comp/public/components/Wallet/defaultJSON.js +0 -149
- package/lib/composite-comp/public/components/Wallet/mobile/index.js +0 -350
- package/lib/composite-comp/public/components/Wallet/mobile/index.less +0 -22
- package/lib/composite-comp/public/config-panels/LocationConfig/ConfigContent/index.js +0 -153
- package/lib/composite-comp/public/config-panels/LocationConfig/index.less +0 -17
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.js +0 -176
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigContent/index.less +0 -0
- package/lib/composite-comp/public/config-panels/StoresConfig/ConfigTitle/index.js +0 -103
- package/lib/composite-comp/public/config-panels/StoresConfig/index.js +0 -134
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.js +0 -100
- package/lib/composite-comp/public/config-panels/WalletConfig/GroupList/index.less +0 -72
- package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.js +0 -123
- package/lib/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/public/config-panels/WalletConfig/index.js +0 -61
- package/lib/composite-comp/public/second-config-panels/WalletSecondConfig/index.js +0 -152
- package/lib/locale/ar/ar.json +0 -362
- package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.js +0 -207
- package/lib/meta-comp/config-panels/ButtonConfig/BorderRadiusInput/index.less +0 -81
- /package/es/composite-comp/{public → bol}/components/Wallet/index.js +0 -0
- /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.js +0 -0
- /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.less +0 -0
- /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.js +0 -0
- /package/es/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.less +0 -0
- /package/es/composite-comp/{nuri → bol}/components/WalletNuri/defaultJSON.js +0 -0
- /package/es/composite-comp/{nuri → bol}/components/WalletNuri/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.less +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.js +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.less +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigImageGroup/index.less +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.js +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.less +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/imgs/defaultImg.png +0 -0
- /package/es/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/GroupList/index.less +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- /package/es/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/index.js +0 -0
- /package/es/composite-comp/{nuri → bol}/second-config-panels/WalletNuriSecondConfig/index.js +0 -0
- /package/es/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.js +0 -0
- /package/es/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.less +0 -0
- /package/es/{assets/images/common/product.png → composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png} +0 -0
- /package/lib/composite-comp/{public → bol}/components/Wallet/index.js +0 -0
- /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.js +0 -0
- /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/mobile/index.less +0 -0
- /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.js +0 -0
- /package/lib/composite-comp/{ashita/components/WalletAshita → bol/components/Wallet}/pc/index.less +0 -0
- /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/defaultJSON.js +0 -0
- /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/index.js +0 -0
- /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.js +0 -0
- /package/lib/composite-comp/{nuri → bol}/components/WalletNuri/mobile/index.less +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigContent/index.js +0 -0
- /package/{es/composite-comp/public/config-panels/StoresConfig/ConfigContent → lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigContent}/index.less +0 -0
- /package/{es/composite-comp/public → lib/composite-comp/bol}/config-panels/WalletConfig/WalletConfigImageGroup/index.less +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.js +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/WalletConfigSetting/index.less +0 -0
- /package/{es/composite-comp/public/config-panels/WalletConfig/GroupList → lib/composite-comp/bol/config-panels/WalletConfig/imgs}/defaultImg.png +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletConfig}/index.js +0 -0
- /package/{es/composite-comp/public/config-panels/WalletConfig/imgs → lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList}/defaultImg.png +0 -0
- /package/{es/composite-comp/public/config-panels/WalletConfig → lib/composite-comp/bol/config-panels/WalletNuriConfig}/GroupList/index.js +0 -0
- /package/{es/composite-comp/public/config-panels/WalletConfig → lib/composite-comp/bol/config-panels/WalletNuriConfig}/GroupList/index.less +0 -0
- /package/{es/composite-comp/public/config-panels/WalletConfig/WalletConfigImageGroup → lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup}/index.js +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig/WalletConfigContent → bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup}/index.less +0 -0
- /package/lib/composite-comp/{ashita/config-panels/WalletAshitaConfig → bol/config-panels/WalletNuriConfig}/imgs/defaultImg.png +0 -0
- /package/lib/composite-comp/{nuri → bol}/config-panels/WalletNuriConfig/index.js +0 -0
- /package/{es/composite-comp/public/second-config-panels/WalletSecondConfig → lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig}/index.js +0 -0
- /package/lib/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.js +0 -0
- /package/lib/composite-comp/{ashita/second-config-panels/WalletAshitaSecondConfig → bol/second-config-panels/WalletSecondConfig}/index.less +0 -0
- /package/lib/{assets/images/common/product.png → composite-comp/monpay/components/MonpayRecommend/pc/imgs/card.png} +0 -0
|
@@ -0,0 +1,809 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _macy = _interopRequireDefault(require("macy"));
|
|
11
|
+
|
|
12
|
+
require("./index.less");
|
|
13
|
+
|
|
14
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
+
|
|
16
|
+
var _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
17
|
+
|
|
18
|
+
var _lodash = _interopRequireDefault(require("lodash.throttle"));
|
|
19
|
+
|
|
20
|
+
var _card = _interopRequireDefault(require("./imgs/card.png"));
|
|
21
|
+
|
|
22
|
+
var _mobx = require("../../../../../mobx");
|
|
23
|
+
|
|
24
|
+
var _MonpayProductItem = _interopRequireDefault(require("../../../../common/components/MonpayProductItem"));
|
|
25
|
+
|
|
26
|
+
var _components = require("../../../../../meta-comp/components");
|
|
27
|
+
|
|
28
|
+
var _storeUtil = require("../../../../../utils/storeUtil");
|
|
29
|
+
|
|
30
|
+
var _commonUtil = require("../../../../../utils/commonUtil");
|
|
31
|
+
|
|
32
|
+
var _coreUtil = require("../../../../../utils/coreUtil");
|
|
33
|
+
|
|
34
|
+
var _Iconfont = _interopRequireDefault(require("../../../../../common/Iconfont"));
|
|
35
|
+
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
|
|
38
|
+
var __extends = void 0 && (void 0).__extends || function () {
|
|
39
|
+
var _extendStatics = function extendStatics(d, b) {
|
|
40
|
+
_extendStatics = Object.setPrototypeOf || {
|
|
41
|
+
__proto__: []
|
|
42
|
+
} instanceof Array && function (d, b) {
|
|
43
|
+
d.__proto__ = b;
|
|
44
|
+
} || function (d, b) {
|
|
45
|
+
for (var p in b) {
|
|
46
|
+
if (b.hasOwnProperty(p)) d[p] = b[p];
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
return _extendStatics(d, b);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return function (d, b) {
|
|
54
|
+
_extendStatics(d, b);
|
|
55
|
+
|
|
56
|
+
function __() {
|
|
57
|
+
this.constructor = d;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
61
|
+
};
|
|
62
|
+
}();
|
|
63
|
+
|
|
64
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
65
|
+
__assign = Object.assign || function (t) {
|
|
66
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
67
|
+
s = arguments[i];
|
|
68
|
+
|
|
69
|
+
for (var p in s) {
|
|
70
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return t;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
return __assign.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
|
81
|
+
function adopt(value) {
|
|
82
|
+
return value instanceof P ? value : new P(function (resolve) {
|
|
83
|
+
resolve(value);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
88
|
+
function fulfilled(value) {
|
|
89
|
+
try {
|
|
90
|
+
step(generator.next(value));
|
|
91
|
+
} catch (e) {
|
|
92
|
+
reject(e);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function rejected(value) {
|
|
97
|
+
try {
|
|
98
|
+
step(generator["throw"](value));
|
|
99
|
+
} catch (e) {
|
|
100
|
+
reject(e);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function step(result) {
|
|
105
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
113
|
+
var _ = {
|
|
114
|
+
label: 0,
|
|
115
|
+
sent: function sent() {
|
|
116
|
+
if (t[0] & 1) throw t[1];
|
|
117
|
+
return t[1];
|
|
118
|
+
},
|
|
119
|
+
trys: [],
|
|
120
|
+
ops: []
|
|
121
|
+
},
|
|
122
|
+
f,
|
|
123
|
+
y,
|
|
124
|
+
t,
|
|
125
|
+
g;
|
|
126
|
+
return g = {
|
|
127
|
+
next: verb(0),
|
|
128
|
+
"throw": verb(1),
|
|
129
|
+
"return": verb(2)
|
|
130
|
+
}, typeof Symbol === "function" && (g[Symbol.iterator] = function () {
|
|
131
|
+
return this;
|
|
132
|
+
}), g;
|
|
133
|
+
|
|
134
|
+
function verb(n) {
|
|
135
|
+
return function (v) {
|
|
136
|
+
return step([n, v]);
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
function step(op) {
|
|
141
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
142
|
+
|
|
143
|
+
while (_) {
|
|
144
|
+
try {
|
|
145
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
146
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
147
|
+
|
|
148
|
+
switch (op[0]) {
|
|
149
|
+
case 0:
|
|
150
|
+
case 1:
|
|
151
|
+
t = op;
|
|
152
|
+
break;
|
|
153
|
+
|
|
154
|
+
case 4:
|
|
155
|
+
_.label++;
|
|
156
|
+
return {
|
|
157
|
+
value: op[1],
|
|
158
|
+
done: false
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
case 5:
|
|
162
|
+
_.label++;
|
|
163
|
+
y = op[1];
|
|
164
|
+
op = [0];
|
|
165
|
+
continue;
|
|
166
|
+
|
|
167
|
+
case 7:
|
|
168
|
+
op = _.ops.pop();
|
|
169
|
+
|
|
170
|
+
_.trys.pop();
|
|
171
|
+
|
|
172
|
+
continue;
|
|
173
|
+
|
|
174
|
+
default:
|
|
175
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
176
|
+
_ = 0;
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
|
|
181
|
+
_.label = op[1];
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
186
|
+
_.label = t[1];
|
|
187
|
+
t = op;
|
|
188
|
+
break;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
if (t && _.label < t[2]) {
|
|
192
|
+
_.label = t[2];
|
|
193
|
+
|
|
194
|
+
_.ops.push(op);
|
|
195
|
+
|
|
196
|
+
break;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (t[2]) _.ops.pop();
|
|
200
|
+
|
|
201
|
+
_.trys.pop();
|
|
202
|
+
|
|
203
|
+
continue;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
op = body.call(thisArg, _);
|
|
207
|
+
} catch (e) {
|
|
208
|
+
op = [6, e];
|
|
209
|
+
y = 0;
|
|
210
|
+
} finally {
|
|
211
|
+
f = t = 0;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
if (op[0] & 5) throw op[1];
|
|
216
|
+
return {
|
|
217
|
+
value: op[0] ? op[1] : void 0,
|
|
218
|
+
done: true
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
|
224
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) {
|
|
225
|
+
s += arguments[i].length;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) {
|
|
229
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) {
|
|
230
|
+
r[k] = a[j];
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return r;
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
var defaultData = [{
|
|
238
|
+
imgUrlContent: {
|
|
239
|
+
url: _card["default"]
|
|
240
|
+
},
|
|
241
|
+
offerName: 'Product Name',
|
|
242
|
+
salesPrice: 18000000,
|
|
243
|
+
specialPrice: 18000000,
|
|
244
|
+
marketPrice: 19000000,
|
|
245
|
+
salePercent: 500
|
|
246
|
+
}, {
|
|
247
|
+
imgUrlContent: {
|
|
248
|
+
url: _card["default"]
|
|
249
|
+
},
|
|
250
|
+
offerName: 'Product Name',
|
|
251
|
+
salesPrice: 18000000,
|
|
252
|
+
specialPrice: 18000000,
|
|
253
|
+
marketPrice: 19000000,
|
|
254
|
+
salePercent: 500
|
|
255
|
+
}, {
|
|
256
|
+
imgUrlContent: {
|
|
257
|
+
url: _card["default"]
|
|
258
|
+
},
|
|
259
|
+
offerName: 'Product Name',
|
|
260
|
+
salesPrice: 18000000,
|
|
261
|
+
specialPrice: 18000000,
|
|
262
|
+
marketPrice: 19000000,
|
|
263
|
+
salePercent: 500
|
|
264
|
+
}, {
|
|
265
|
+
imgUrlContent: {
|
|
266
|
+
url: _card["default"]
|
|
267
|
+
},
|
|
268
|
+
offerName: 'Product Name',
|
|
269
|
+
salesPrice: 18000000,
|
|
270
|
+
specialPrice: 18000000,
|
|
271
|
+
marketPrice: 19000000,
|
|
272
|
+
salePercent: 500
|
|
273
|
+
}];
|
|
274
|
+
|
|
275
|
+
var RecommendMobile =
|
|
276
|
+
/** @class */
|
|
277
|
+
function (_super) {
|
|
278
|
+
__extends(RecommendMobile, _super);
|
|
279
|
+
|
|
280
|
+
function RecommendMobile() {
|
|
281
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
282
|
+
|
|
283
|
+
_this.preData = {};
|
|
284
|
+
_this.preLayout = '';
|
|
285
|
+
_this.preContent = '';
|
|
286
|
+
_this.preSpacing = '';
|
|
287
|
+
_this._cache = (0, _coreUtil.isDesignMode)() ? {} : (0, _commonUtil.ensure)(function () {
|
|
288
|
+
return (0, _storeUtil.getMagicStore)("recommend_" + (window.magicDesign.pageId || '') + "_" + _this.props.panelProps.id);
|
|
289
|
+
}, {});
|
|
290
|
+
_this.scrollRef = /*#__PURE__*/_react["default"].createRef();
|
|
291
|
+
_this.state = __assign({
|
|
292
|
+
contentWidth: 0,
|
|
293
|
+
tabIndex: 0,
|
|
294
|
+
tabLeft: 0,
|
|
295
|
+
tabWidth: 0,
|
|
296
|
+
groupSource: [],
|
|
297
|
+
hideTabs: false,
|
|
298
|
+
scrollToLeftDisabled: true,
|
|
299
|
+
scrollToRightDisabled: true
|
|
300
|
+
}, _this._cache);
|
|
301
|
+
|
|
302
|
+
_this.listenWidth = function () {
|
|
303
|
+
setTimeout(function () {
|
|
304
|
+
var renderContainer = document.querySelector(".macyContainer_" + _this.props.panelProps.id) || document.querySelector(".scrollContainer_" + _this.props.panelProps.id);
|
|
305
|
+
if (renderContainer) _this.setState({
|
|
306
|
+
contentWidth: renderContainer.offsetWidth
|
|
307
|
+
});
|
|
308
|
+
});
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
_this.setScrollDisabled = function (scrollDom) {
|
|
312
|
+
var scrollToLeftDisabled = scrollDom.scrollLeft === 0;
|
|
313
|
+
var scrollToRightDisabled = scrollDom.clientWidth + scrollDom.scrollLeft >= scrollDom.scrollWidth;
|
|
314
|
+
|
|
315
|
+
_this.setState({
|
|
316
|
+
scrollToLeftDisabled: scrollToLeftDisabled,
|
|
317
|
+
scrollToRightDisabled: scrollToRightDisabled
|
|
318
|
+
});
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
_this.initTab = function (index, hideTabs) {
|
|
322
|
+
var selectedTabDom = document.querySelector(".tab-select-wrap .tabTitle:nth-child(" + (index + 1) + ")");
|
|
323
|
+
var tabLeft = 0;
|
|
324
|
+
var tabWidth = 0;
|
|
325
|
+
|
|
326
|
+
if (selectedTabDom && !hideTabs) {
|
|
327
|
+
tabLeft = selectedTabDom.offsetLeft;
|
|
328
|
+
tabWidth = selectedTabDom.offsetWidth;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
_this.setState({
|
|
332
|
+
tabLeft: tabLeft,
|
|
333
|
+
tabWidth: tabWidth
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
_this.getTabBarActiveColor = function (_panelProps) {
|
|
338
|
+
var tabIndex = _this.state.tabIndex;
|
|
339
|
+
return (0, _commonUtil.ensure)(function () {
|
|
340
|
+
return _panelProps.groupSource[tabIndex].hover.groupName.content.color;
|
|
341
|
+
}, '#1890ff');
|
|
342
|
+
};
|
|
343
|
+
|
|
344
|
+
_this.getProductList = function (index) {
|
|
345
|
+
return __awaiter(_this, void 0, void 0, function () {
|
|
346
|
+
var panelProps, groupSource, recommendId, pageId, cache, _a, _b, sourceType, _c, prodIds, _d, intelligentType, _e, intelligentValue, _f, maxProdNum, newData, res, res, e_1, _cache;
|
|
347
|
+
|
|
348
|
+
var _g, _h, _j;
|
|
349
|
+
|
|
350
|
+
var _this = this;
|
|
351
|
+
|
|
352
|
+
return __generator(this, function (_k) {
|
|
353
|
+
switch (_k.label) {
|
|
354
|
+
case 0:
|
|
355
|
+
panelProps = this.props.panelProps;
|
|
356
|
+
groupSource = this.state.groupSource;
|
|
357
|
+
recommendId = panelProps.id;
|
|
358
|
+
pageId = window.magicDesign.pageId || '';
|
|
359
|
+
|
|
360
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
361
|
+
cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
362
|
+
|
|
363
|
+
if (cache) {
|
|
364
|
+
if ("products" + index in cache) {
|
|
365
|
+
this.setState((_g = {}, _g["products" + index] = cache["products" + index], _g), function () {
|
|
366
|
+
_this.resetLayout();
|
|
367
|
+
});
|
|
368
|
+
/** 如果数据未过期 */
|
|
369
|
+
|
|
370
|
+
if (cache.endTime > Date.now()) return [2
|
|
371
|
+
/*return*/
|
|
372
|
+
];
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
_a = groupSource[index] || {}, _b = _a.sourceType, sourceType = _b === void 0 ? '' : _b, _c = _a.prodIds, prodIds = _c === void 0 ? '' : _c, _d = _a.intelligentType, intelligentType = _d === void 0 ? '' : _d, _e = _a.intelligentValue, intelligentValue = _e === void 0 ? [] : _e, _f = _a.maxProdNum, maxProdNum = _f === void 0 ? 10 : _f;
|
|
378
|
+
newData = [];
|
|
379
|
+
_k.label = 1;
|
|
380
|
+
|
|
381
|
+
case 1:
|
|
382
|
+
_k.trys.push([1, 9,, 10]);
|
|
383
|
+
|
|
384
|
+
if (!(groupSource.length > 0)) return [3
|
|
385
|
+
/*break*/
|
|
386
|
+
, 7];
|
|
387
|
+
if (!(sourceType === 'select')) return [3
|
|
388
|
+
/*break*/
|
|
389
|
+
, 3];
|
|
390
|
+
|
|
391
|
+
if (!prodIds) {
|
|
392
|
+
return [2
|
|
393
|
+
/*return*/
|
|
394
|
+
];
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return [4
|
|
398
|
+
/*yield*/
|
|
399
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/products', {
|
|
400
|
+
products: prodIds,
|
|
401
|
+
state: 'A'
|
|
402
|
+
}, 'GET')];
|
|
403
|
+
|
|
404
|
+
case 2:
|
|
405
|
+
res = _k.sent();
|
|
406
|
+
newData = __spreadArrays(res.list);
|
|
407
|
+
return [3
|
|
408
|
+
/*break*/
|
|
409
|
+
, 6];
|
|
410
|
+
|
|
411
|
+
case 3:
|
|
412
|
+
if (!(sourceType === 'recommend')) return [3
|
|
413
|
+
/*break*/
|
|
414
|
+
, 5];
|
|
415
|
+
return [4
|
|
416
|
+
/*yield*/
|
|
417
|
+
, (0, _commonUtil.commonFetch)('/designer/v1/h5/offers', {
|
|
418
|
+
pageIndex: 1,
|
|
419
|
+
pageSize: maxProdNum,
|
|
420
|
+
sortType: '1',
|
|
421
|
+
intelligentType: intelligentType,
|
|
422
|
+
intelligentValue: intelligentValue.join(','),
|
|
423
|
+
aggregation: false,
|
|
424
|
+
storeId: window.magicDesign.storeId >= 0 ? window.magicDesign.storeId : ''
|
|
425
|
+
}, 'POST')];
|
|
426
|
+
|
|
427
|
+
case 4:
|
|
428
|
+
res = _k.sent();
|
|
429
|
+
newData = __spreadArrays(res.pageInfo.list);
|
|
430
|
+
return [3
|
|
431
|
+
/*break*/
|
|
432
|
+
, 6];
|
|
433
|
+
|
|
434
|
+
case 5:
|
|
435
|
+
newData = [];
|
|
436
|
+
_k.label = 6;
|
|
437
|
+
|
|
438
|
+
case 6:
|
|
439
|
+
return [3
|
|
440
|
+
/*break*/
|
|
441
|
+
, 8];
|
|
442
|
+
|
|
443
|
+
case 7:
|
|
444
|
+
newData = [];
|
|
445
|
+
_k.label = 8;
|
|
446
|
+
|
|
447
|
+
case 8:
|
|
448
|
+
return [3
|
|
449
|
+
/*break*/
|
|
450
|
+
, 10];
|
|
451
|
+
|
|
452
|
+
case 9:
|
|
453
|
+
e_1 = _k.sent();
|
|
454
|
+
newData = [];
|
|
455
|
+
return [3
|
|
456
|
+
/*break*/
|
|
457
|
+
, 10];
|
|
458
|
+
|
|
459
|
+
case 10:
|
|
460
|
+
if (!(0, _coreUtil.isDesignMode)()) {
|
|
461
|
+
_cache = (0, _storeUtil.getMagicStore)("recommend_" + pageId + "_" + recommendId);
|
|
462
|
+
(0, _storeUtil.setMagicStore)("recommend_" + pageId + "_" + recommendId, __assign(__assign({}, _cache), (_h = {}, _h["products" + index] = newData, _h.endTime = Date.now() + 3 * 60 * 1000, _h)));
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
this.setState((_j = {}, _j["products" + index] = newData, _j), function () {
|
|
466
|
+
_this.resetLayout();
|
|
467
|
+
});
|
|
468
|
+
return [2
|
|
469
|
+
/*return*/
|
|
470
|
+
];
|
|
471
|
+
}
|
|
472
|
+
});
|
|
473
|
+
});
|
|
474
|
+
};
|
|
475
|
+
|
|
476
|
+
_this.resetLayout = function () {
|
|
477
|
+
var customize = _this.props.panelProps.customize;
|
|
478
|
+
if (customize.layout.pcLayout !== 'layout1') return;
|
|
479
|
+
setTimeout(function () {
|
|
480
|
+
if (document.querySelector(".macyContainer_" + _this.props.panelProps.id)) {
|
|
481
|
+
_this.getMacy(".macyContainer_" + _this.props.panelProps.id, customize.pcRowNum);
|
|
482
|
+
}
|
|
483
|
+
}, 10);
|
|
484
|
+
};
|
|
485
|
+
|
|
486
|
+
_this.getMacy = function (container, columns) {
|
|
487
|
+
var masonryNew = new _macy["default"]({
|
|
488
|
+
container: container,
|
|
489
|
+
trueOrder: false,
|
|
490
|
+
waitForImages: false,
|
|
491
|
+
useOwnImageLoader: false,
|
|
492
|
+
margin: {
|
|
493
|
+
x: 24,
|
|
494
|
+
y: 24
|
|
495
|
+
},
|
|
496
|
+
columns: columns
|
|
497
|
+
});
|
|
498
|
+
masonryNew.runOnImageLoad(function () {
|
|
499
|
+
masonryNew.recalculate(true);
|
|
500
|
+
}, true);
|
|
501
|
+
};
|
|
502
|
+
|
|
503
|
+
_this.onTabClick = function (e, index) {
|
|
504
|
+
var tabIndex = _this.state.tabIndex;
|
|
505
|
+
if (tabIndex === index) return; // e.currentTarget.scrollIntoView(false);
|
|
506
|
+
|
|
507
|
+
_this.setState({
|
|
508
|
+
tabIndex: index
|
|
509
|
+
}, function () {
|
|
510
|
+
_this.resetLayout();
|
|
511
|
+
|
|
512
|
+
_this.initTab(index);
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
_this.getProductList(index);
|
|
516
|
+
|
|
517
|
+
setTimeout(function () {
|
|
518
|
+
var scrollDom = _this.scrollRef.current;
|
|
519
|
+
|
|
520
|
+
if (scrollDom) {
|
|
521
|
+
_this.setScrollDisabled(scrollDom);
|
|
522
|
+
|
|
523
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
524
|
+
_this.setScrollDisabled(scrollDom);
|
|
525
|
+
}, 500);
|
|
526
|
+
}
|
|
527
|
+
}, 0);
|
|
528
|
+
};
|
|
529
|
+
|
|
530
|
+
_this.scrollToRight = function () {
|
|
531
|
+
var scrollDom = _this.scrollRef.current;
|
|
532
|
+
|
|
533
|
+
if (scrollDom.clientWidth + scrollDom.scrollLeft < scrollDom.scrollWidth) {
|
|
534
|
+
scrollDom.scrollTo(scrollDom.scrollLeft + scrollDom.clientWidth, 0);
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
_this.scrollToLeft = function () {
|
|
539
|
+
var scrollDom = _this.scrollRef.current;
|
|
540
|
+
|
|
541
|
+
if (scrollDom.scrollLeft > 0) {
|
|
542
|
+
scrollDom.scrollTo(scrollDom.scrollLeft - scrollDom.clientWidth, 0);
|
|
543
|
+
}
|
|
544
|
+
};
|
|
545
|
+
|
|
546
|
+
return _this;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
RecommendMobile.prototype.componentDidMount = function () {
|
|
550
|
+
var _this = this;
|
|
551
|
+
|
|
552
|
+
var panelProps = this.props.panelProps;
|
|
553
|
+
var source = [];
|
|
554
|
+
panelProps.groupSource.map(function (m) {
|
|
555
|
+
var show = m.image.open || m.groupName.open;
|
|
556
|
+
if (show) source.push(m);
|
|
557
|
+
});
|
|
558
|
+
this.setState({
|
|
559
|
+
groupSource: source
|
|
560
|
+
}, function () {
|
|
561
|
+
_this.initTab(0);
|
|
562
|
+
|
|
563
|
+
_this.getProductList(0);
|
|
564
|
+
});
|
|
565
|
+
setTimeout(function () {
|
|
566
|
+
var scrollDom = _this.scrollRef.current;
|
|
567
|
+
|
|
568
|
+
if (scrollDom) {
|
|
569
|
+
_this.setScrollDisabled(scrollDom);
|
|
570
|
+
|
|
571
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
572
|
+
_this.setScrollDisabled(scrollDom);
|
|
573
|
+
}, 500);
|
|
574
|
+
}
|
|
575
|
+
}, 0);
|
|
576
|
+
this.listenWidth();
|
|
577
|
+
window.addEventListener('resize', (0, _debounce["default"])(this.listenWidth));
|
|
578
|
+
};
|
|
579
|
+
|
|
580
|
+
RecommendMobile.prototype.componentWillUnmount = function () {
|
|
581
|
+
window.removeEventListener('resize', this.listenWidth);
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
RecommendMobile.prototype.componentWillReceiveProps = function (nextProps) {
|
|
585
|
+
var _this = this;
|
|
586
|
+
|
|
587
|
+
var tabIndex = this.state.tabIndex;
|
|
588
|
+
var panelProps = nextProps.panelProps;
|
|
589
|
+
var source = [];
|
|
590
|
+
var hideTabs = false;
|
|
591
|
+
panelProps.groupSource.map(function (m) {
|
|
592
|
+
var show = m.image.open || m.groupName.open;
|
|
593
|
+
if (show) source.push(m);
|
|
594
|
+
});
|
|
595
|
+
|
|
596
|
+
if (source.length === 0) {
|
|
597
|
+
if (panelProps.groupSource.length > 0) source.push(panelProps.groupSource[0]);
|
|
598
|
+
hideTabs = true;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
this.setState({
|
|
602
|
+
groupSource: source
|
|
603
|
+
}, function () {
|
|
604
|
+
var groupSource = _this.state.groupSource;
|
|
605
|
+
|
|
606
|
+
if (JSON.stringify(groupSource) === _this.preData) {
|
|
607
|
+
return;
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
_this.preData = JSON.stringify(groupSource);
|
|
611
|
+
var newTabIndex = tabIndex;
|
|
612
|
+
if (tabIndex >= source.length) newTabIndex = 0;
|
|
613
|
+
|
|
614
|
+
_this.initTab(newTabIndex, hideTabs);
|
|
615
|
+
|
|
616
|
+
_this.getProductList(newTabIndex);
|
|
617
|
+
|
|
618
|
+
_this.setState({
|
|
619
|
+
tabIndex: newTabIndex,
|
|
620
|
+
hideTabs: hideTabs
|
|
621
|
+
});
|
|
622
|
+
});
|
|
623
|
+
var curLayout = JSON.stringify(panelProps.customize);
|
|
624
|
+
|
|
625
|
+
if (curLayout !== this.preLayout) {
|
|
626
|
+
this.resetLayout();
|
|
627
|
+
setTimeout(function () {
|
|
628
|
+
var scrollDom = _this.scrollRef.current;
|
|
629
|
+
|
|
630
|
+
if (scrollDom) {
|
|
631
|
+
_this.setScrollDisabled(scrollDom);
|
|
632
|
+
|
|
633
|
+
scrollDom.onscroll = (0, _lodash["default"])(function () {
|
|
634
|
+
_this.setScrollDisabled(scrollDom);
|
|
635
|
+
}, 500);
|
|
636
|
+
}
|
|
637
|
+
}, 0);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
var curContent = JSON.stringify(panelProps.content);
|
|
641
|
+
var curSpacing = JSON.stringify(panelProps.spacing);
|
|
642
|
+
|
|
643
|
+
if (curLayout !== this.preLayout || curSpacing !== this.preSpacing) {
|
|
644
|
+
this.listenWidth();
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
if (curContent !== this.preContent || curSpacing !== this.preSpacing) {
|
|
648
|
+
this.resetLayout();
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
this.preLayout = curLayout;
|
|
652
|
+
this.preContent = curContent;
|
|
653
|
+
this.preSpacing = curSpacing;
|
|
654
|
+
};
|
|
655
|
+
|
|
656
|
+
RecommendMobile.prototype.render = function () {
|
|
657
|
+
var _this = this;
|
|
658
|
+
|
|
659
|
+
var panelProps = this.props.panelProps;
|
|
660
|
+
var _a = this.state,
|
|
661
|
+
tabIndex = _a.tabIndex,
|
|
662
|
+
tabLeft = _a.tabLeft,
|
|
663
|
+
tabWidth = _a.tabWidth,
|
|
664
|
+
groupSource = _a.groupSource,
|
|
665
|
+
hideTabs = _a.hideTabs,
|
|
666
|
+
scrollToLeftDisabled = _a.scrollToLeftDisabled,
|
|
667
|
+
scrollToRightDisabled = _a.scrollToRightDisabled,
|
|
668
|
+
contentWidth = _a.contentWidth;
|
|
669
|
+
var products = this.state["products" + tabIndex] || [];
|
|
670
|
+
|
|
671
|
+
var _products = products.length === 0 && (0, _coreUtil.isDesignMode)() ? defaultData : products;
|
|
672
|
+
|
|
673
|
+
var isDivide = false;
|
|
674
|
+
var layout = panelProps.customize.layout.pcLayout;
|
|
675
|
+
|
|
676
|
+
var _seeAll = (0, _commonUtil.ensure)(function () {
|
|
677
|
+
return groupSource[tabIndex].seeAll;
|
|
678
|
+
}, '');
|
|
679
|
+
|
|
680
|
+
var imgSize = 140;
|
|
681
|
+
var otherWidth = layout === 'layout3' ? 100 : 0;
|
|
682
|
+
var colNumber = layout === 'layout1' ? panelProps.customize.pcRowNum : panelProps.customize.pcRowNum + 0.5;
|
|
683
|
+
var spaceNumber = layout === 'layout1' ? panelProps.customize.pcRowNum - 1 : panelProps.customize.pcRowNum;
|
|
684
|
+
if (contentWidth) imgSize = (contentWidth - 24 * spaceNumber - otherWidth) / colNumber;
|
|
685
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
686
|
+
className: "m-recommend-pc"
|
|
687
|
+
}, panelProps.title.headerImage.open && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
688
|
+
className: "headerImg",
|
|
689
|
+
data: panelProps.title.headerImage
|
|
690
|
+
}), !hideTabs && /*#__PURE__*/_react["default"].createElement("div", {
|
|
691
|
+
className: "tab-select-wrap"
|
|
692
|
+
}, groupSource.map(function (tab, index) {
|
|
693
|
+
var _image = index == tabIndex && tab.hover.open && tab.hover.image.open ? tab.hover.image : tab.image;
|
|
694
|
+
|
|
695
|
+
var _groupName = index == tabIndex && tab.hover.open && tab.hover.groupName.open ? tab.hover.groupName : tab.groupName;
|
|
696
|
+
|
|
697
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
698
|
+
key: tab.id,
|
|
699
|
+
className: "tabTitle",
|
|
700
|
+
onClick: function onClick(e) {
|
|
701
|
+
_this.onTabClick(e, index);
|
|
702
|
+
|
|
703
|
+
_mobx.store.setState({
|
|
704
|
+
clickedGroup: tab.id,
|
|
705
|
+
clickedFloor: _mobx.store.getFloorIdByGroupId(tab.id)
|
|
706
|
+
});
|
|
707
|
+
},
|
|
708
|
+
style: {
|
|
709
|
+
flex: ~~isDivide
|
|
710
|
+
}
|
|
711
|
+
}, tab.image.open && _image && /*#__PURE__*/_react["default"].createElement(_components.MetaImage, {
|
|
712
|
+
data: _image
|
|
713
|
+
}), tab.groupName.open && /*#__PURE__*/_react["default"].createElement(_components.MetaText, {
|
|
714
|
+
data: _groupName,
|
|
715
|
+
onTextInput: function onTextInput(text) {
|
|
716
|
+
tab.hover.groupName.text = text;
|
|
717
|
+
tab.groupName.text = text;
|
|
718
|
+
}
|
|
719
|
+
}));
|
|
720
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
721
|
+
className: "active-line",
|
|
722
|
+
style: {
|
|
723
|
+
width: tabWidth,
|
|
724
|
+
transform: "translateX(" + tabLeft + "px)",
|
|
725
|
+
background: this.getTabBarActiveColor(panelProps)
|
|
726
|
+
}
|
|
727
|
+
})), /*#__PURE__*/_react["default"].createElement("div", {
|
|
728
|
+
className: "tab-content"
|
|
729
|
+
}, layout !== 'layout1' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
730
|
+
className: "arrow-icon left",
|
|
731
|
+
onClick: function onClick() {
|
|
732
|
+
return _this.scrollToLeft();
|
|
733
|
+
}
|
|
734
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
735
|
+
color: scrollToLeftDisabled ? '#BDC1C8' : '#232F46',
|
|
736
|
+
size: (0, _commonUtil.convertToRem)(20),
|
|
737
|
+
type: "icon-outlined-left"
|
|
738
|
+
})), layout === 'layout1' ? /*#__PURE__*/_react["default"].createElement("div", {
|
|
739
|
+
className: "tab-list"
|
|
740
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
741
|
+
key: "macyContainer",
|
|
742
|
+
ref: this.scrollRef,
|
|
743
|
+
className: "macyContainer macyContainer_" + panelProps.id
|
|
744
|
+
}, _products.map(function (item) {
|
|
745
|
+
return /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
|
|
746
|
+
key: item.productId,
|
|
747
|
+
data: item,
|
|
748
|
+
fixHeight: true,
|
|
749
|
+
imgHeight: imgSize,
|
|
750
|
+
imgWidth: "100%" // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
751
|
+
,
|
|
752
|
+
onItemClick: function onItemClick() {
|
|
753
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
754
|
+
},
|
|
755
|
+
panelProps: panelProps.content,
|
|
756
|
+
showProgress: false
|
|
757
|
+
});
|
|
758
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
759
|
+
className: (0, _classnames["default"])('btnSeeAll', {
|
|
760
|
+
line: layout === 'layout1'
|
|
761
|
+
}),
|
|
762
|
+
data: _seeAll
|
|
763
|
+
})) : /*#__PURE__*/_react["default"].createElement("div", {
|
|
764
|
+
key: "scrollContainer",
|
|
765
|
+
ref: this.scrollRef,
|
|
766
|
+
className: (0, _classnames["default"])("scrollContainer scrollContainer_" + panelProps.id, {
|
|
767
|
+
pl_100: layout === 'layout3'
|
|
768
|
+
})
|
|
769
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
770
|
+
className: "scrollProductList"
|
|
771
|
+
}, _products.map(function (item) {
|
|
772
|
+
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
773
|
+
className: "productCard"
|
|
774
|
+
}, /*#__PURE__*/_react["default"].createElement(_MonpayProductItem["default"], {
|
|
775
|
+
key: "scroll_" + item.productId,
|
|
776
|
+
data: item,
|
|
777
|
+
fixHeight: true,
|
|
778
|
+
imgHeight: imgSize,
|
|
779
|
+
imgWidth: imgSize // onItemClick={() => clickUrl(`/product/detail/${item.offerId}`)}
|
|
780
|
+
,
|
|
781
|
+
onItemClick: function onItemClick() {
|
|
782
|
+
return (0, _coreUtil.clickUrl)("proDetail-" + item.offerId);
|
|
783
|
+
},
|
|
784
|
+
panelProps: panelProps.content,
|
|
785
|
+
showProgress: false
|
|
786
|
+
}));
|
|
787
|
+
})), _seeAll.open && _products.length > 0 && /*#__PURE__*/_react["default"].createElement(_components.MetaButton, {
|
|
788
|
+
className: "btnSeeAll",
|
|
789
|
+
data: _seeAll
|
|
790
|
+
})), layout !== 'layout1' && /*#__PURE__*/_react["default"].createElement("div", {
|
|
791
|
+
className: "arrow-icon right",
|
|
792
|
+
onClick: function onClick() {
|
|
793
|
+
return _this.scrollToRight();
|
|
794
|
+
}
|
|
795
|
+
}, /*#__PURE__*/_react["default"].createElement(_Iconfont["default"], {
|
|
796
|
+
color: scrollToRightDisabled ? '#BDC1C8' : '#232F46',
|
|
797
|
+
size: (0, _commonUtil.convertToRem)(20),
|
|
798
|
+
type: "icon-outlined-right"
|
|
799
|
+
}))));
|
|
800
|
+
};
|
|
801
|
+
|
|
802
|
+
RecommendMobile.defaultProps = {
|
|
803
|
+
panelProps: {}
|
|
804
|
+
};
|
|
805
|
+
return RecommendMobile;
|
|
806
|
+
}(_react["default"].Component);
|
|
807
|
+
|
|
808
|
+
var _default = RecommendMobile;
|
|
809
|
+
exports["default"] = _default;
|