@fonixtree/magic-design 1.0.67 → 1.0.69
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/.DS_Store +0 -0
- package/es/assets/fonts/Trueno-Light.otf +0 -0
- package/es/assets/fonts/Trueno-Regular.otf +0 -0
- package/es/assets/fonts/TruenoBd.otf +0 -0
- package/es/assets/fonts/magic-box-iconfont.css +62 -6
- package/es/assets/fonts/magic-box-iconfont.css.bak +35 -3
- package/es/assets/fonts/magic-box-iconfont.js +1 -1
- package/es/assets/fonts/magic-box-iconfont.js.bak +1 -1
- 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 +36 -2
- package/es/assets/images/layout-icon/walletLayout2.png +0 -0
- package/es/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/es/assets/less/button.less +5 -0
- package/es/assets/less/cylon-antd.less +7246 -1686
- package/es/assets/less/font.less +22 -0
- package/es/common/AffiliateProductModal/index.js +582 -0
- package/es/common/AffiliateProductModal/index.less +146 -0
- package/es/common/Button/index.less +0 -1
- package/es/common/CardCarousel/index.js +171 -0
- package/es/common/CardCarousel/index.less +28 -0
- package/es/common/CountDown/index.js +20 -11
- package/es/common/CropperModal/index.js +126 -0
- package/es/common/CropperModal/index.less +29 -0
- package/es/common/GroupList/index.js +7 -2
- package/es/common/ImagePicker/index.js +1 -3
- package/es/common/LinkModal/CouponTable/index.js +3 -3
- package/es/common/LinkModal/CustomTable/index.js +1 -0
- package/es/common/LinkModal/FunctionTable/index.js +2 -1
- package/es/common/LinkModal/index.js +14 -2
- package/es/common/MagicLink/index.js +2 -2
- package/es/common/MyModal/index.js +417 -0
- package/es/common/MyModal/index.less +74 -0
- package/es/common/ProductModal/index.js +38 -3
- package/es/common/ProductSource/index.js +59 -18
- package/es/common/UrlPicker/AnchorModal/index.js +170 -0
- package/es/common/UrlPicker/AnchorModal/index.less +21 -0
- package/es/common/UrlPicker/index.js +52 -9
- package/es/common/index.js +24 -0
- package/es/composite-comp/bol/components/Banner/mobile/index.js +1 -2
- package/es/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/es/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/es/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/es/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/es/composite-comp/bol/components/Video/index.js +1 -2
- package/es/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/es/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/es/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
- package/es/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/es/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/es/composite-comp/bol/components/Wallet/index.js +11 -15
- package/es/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/es/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
- package/es/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/es/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/es/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/es/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/es/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/es/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/es/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/es/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/es/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/es/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
- package/es/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/es/composite-comp/common/components/ProductItem/index.js +22 -20
- package/es/composite-comp/common/components/ProductItem/index.less +2 -12
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/es/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/es/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/es/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/es/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
- package/es/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
- package/es/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/es/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/es/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/es/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
- package/es/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/es/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/es/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/es/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/es/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/es/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/es/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/es/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/es/composite-comp/dito/components/Orders/index.js +84 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.js +345 -0
- package/es/composite-comp/dito/components/Orders/mobile/index.less +82 -0
- package/es/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/es/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.js +587 -0
- package/es/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -0
- package/es/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/es/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/es/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/es/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/es/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
- package/es/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/es/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/es/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
- package/es/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/es/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/es/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/es/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/es/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/es/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -0
- package/es/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/es/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/es/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/es/constants/component-types.js +45 -3
- package/es/constants/index.js +74 -5
- package/es/constants/layout.js +48 -1
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
- package/es/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/es/core/Designer/ChatRobot/index.js +84 -17
- package/es/core/Designer/ChatRobot/index.less +69 -28
- package/es/core/Designer/ConfigPanel/index.js +14 -3
- package/es/core/Designer/FonixtreeGpt/index.js +222 -29
- package/es/core/Designer/PageCompList/index.js +6 -5
- package/es/core/Designer/QuickMenuBar/index.js +11 -5
- package/es/core/Designer/QuickMenuBar/index.less +4 -0
- package/es/core/Designer/RenderHtml/index.js +18 -15
- package/es/core/Designer/RenderHtml/index.less +1 -1
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/es/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/es/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/es/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/es/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/es/core/Designer/ToolBarModal/index.js +68 -22
- package/es/core/Designer/ToolBarModal/index.less +3 -2
- package/es/core/Designer/index.js +26 -2
- package/es/core/Renderer/index.js +76 -29
- package/es/decorator/compositeDecorator.js +33 -6
- package/es/decorator/metaDecorator.js +1 -1
- package/es/locale/en/en.json +17 -3
- package/es/locale/es/es.json +17 -3
- package/es/locale/id/id.json +17 -3
- package/es/meta-comp/components/Image/index.js +31 -25
- package/es/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/es/meta-comp/components/Text/index.js +4 -1
- package/es/meta-comp/components/Text/index.less +8 -0
- package/es/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/es/mobx/Frame.js +17 -2
- package/es/mobx/UserState.js +144 -0
- package/es/mobx/index.js +9 -3
- package/es/utils/androidUtil.js +13 -2
- package/es/utils/businessUtil.js +25 -3
- package/es/utils/commonUtil.js +177 -22
- package/es/utils/coreUtil.js +45 -2
- package/es/utils/currencyUtil.js +9 -2
- package/lib/assets/fonts/.DS_Store +0 -0
- package/lib/assets/fonts/Trueno-Light.otf +0 -0
- package/lib/assets/fonts/Trueno-Regular.otf +0 -0
- package/lib/assets/fonts/TruenoBd.otf +0 -0
- package/lib/assets/fonts/magic-box-iconfont.css +62 -6
- package/lib/assets/fonts/magic-box-iconfont.css.bak +35 -3
- package/lib/assets/fonts/magic-box-iconfont.js +1 -1
- package/lib/assets/fonts/magic-box-iconfont.js.bak +1 -1
- 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 +36 -2
- package/lib/assets/images/layout-icon/walletLayout2.png +0 -0
- package/lib/assets/images/layout-icon/walletNuriLayout1.png +0 -0
- package/lib/assets/less/button.less +5 -0
- package/lib/assets/less/cylon-antd.less +7246 -1686
- package/lib/assets/less/font.less +22 -0
- package/lib/common/AffiliateProductModal/index.js +582 -0
- package/lib/common/AffiliateProductModal/index.less +146 -0
- package/lib/common/Button/index.less +0 -1
- package/lib/common/CardCarousel/index.js +171 -0
- package/lib/common/CardCarousel/index.less +28 -0
- package/lib/common/CountDown/index.js +20 -11
- package/lib/common/CropperModal/index.js +126 -0
- package/lib/common/CropperModal/index.less +29 -0
- package/lib/common/GroupList/index.js +7 -2
- package/lib/common/ImagePicker/index.js +1 -3
- package/lib/common/LinkModal/CouponTable/index.js +3 -3
- package/lib/common/LinkModal/CustomTable/index.js +1 -0
- package/lib/common/LinkModal/FunctionTable/index.js +2 -1
- package/lib/common/LinkModal/index.js +14 -2
- package/lib/common/MagicLink/index.js +2 -2
- package/lib/common/MyModal/index.js +417 -0
- package/lib/common/MyModal/index.less +74 -0
- package/lib/common/ProductModal/index.js +38 -3
- package/lib/common/ProductSource/index.js +59 -18
- package/lib/common/UrlPicker/AnchorModal/index.js +170 -0
- package/lib/common/UrlPicker/AnchorModal/index.less +21 -0
- package/lib/common/UrlPicker/index.js +52 -9
- package/lib/common/index.js +24 -0
- package/lib/composite-comp/bol/components/Banner/mobile/index.js +1 -2
- package/lib/composite-comp/bol/components/Banner/mobile/index.less +52 -78
- package/lib/composite-comp/bol/components/Carousel/mobile/index.less +81 -100
- package/lib/composite-comp/bol/components/ImageGallery/mobile/index.less +15 -22
- package/lib/composite-comp/bol/components/ImageText/mobile/index.less +233 -292
- package/lib/composite-comp/bol/components/Video/index.js +1 -2
- package/lib/composite-comp/bol/components/Video/mobile/Layout1/index.less +21 -27
- package/lib/composite-comp/bol/components/Video/mobile/Layout2/index.less +36 -45
- package/lib/composite-comp/bol/components/Video/mobile/Layout3/index.less +43 -54
- package/lib/composite-comp/bol/components/Video/mobile/index.less +2 -3
- package/lib/composite-comp/bol/components/Wallet/defaultJSON.js +112 -88
- package/lib/composite-comp/bol/components/Wallet/index.js +11 -15
- package/lib/composite-comp/bol/components/Wallet/mobile/index.js +314 -64
- package/lib/composite-comp/bol/components/Wallet/mobile/index.less +103 -40
- package/lib/composite-comp/bol/components/Wallet/pc/index.js +0 -2
- package/lib/composite-comp/bol/components/Wallet/pc/index.less +1 -40
- package/lib/composite-comp/bol/components/WalletNuri/defaultJSON.js +148 -0
- package/lib/composite-comp/bol/components/WalletNuri/index.js +84 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.js +366 -0
- package/lib/composite-comp/bol/components/WalletNuri/mobile/index.less +22 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigImageGroup/index.js +1 -6
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.js +201 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/WalletConfigSetting/index.less +9 -0
- package/lib/composite-comp/bol/config-panels/WalletConfig/index.js +11 -2
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.js +100 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.js +123 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/WalletNuriConfigImageGroup/index.less +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/bol/config-panels/WalletNuriConfig/index.js +61 -0
- package/lib/composite-comp/bol/second-config-panels/ImageTextSecondConfig/index.js +2 -2
- package/lib/composite-comp/bol/second-config-panels/WalletNuriSecondConfig/index.js +152 -0
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.js +58 -82
- package/lib/composite-comp/bol/second-config-panels/WalletSecondConfig/index.less +2 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Balance2.svg +9 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/imgs/icon-Koin.svg +40 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.js +168 -0
- package/lib/composite-comp/common/components/AffiliateProductItem/index.less +129 -0
- package/lib/composite-comp/common/components/ProductItem/index.js +22 -20
- package/lib/composite-comp/common/components/ProductItem/index.less +2 -12
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.js +13 -0
- package/lib/composite-comp/common/config-panels/CustomizeConfig/index.less +3 -2
- package/lib/composite-comp/common/config-panels/SpacingConfig/index.js +1 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/defaultJSON.js +243 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/index.js +90 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.js +660 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/mobile/index.less +84 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.js +728 -0
- package/lib/composite-comp/dito/components/AffiliateRecommend/pc/index.less +124 -0
- package/lib/composite-comp/dito/components/CommonFunctions/defaultJSON.js +92 -0
- package/lib/composite-comp/dito/components/CommonFunctions/index.js +84 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.js +107 -0
- package/lib/composite-comp/dito/components/CommonFunctions/mobile/index.less +30 -0
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.js +8 -6
- package/lib/composite-comp/dito/components/FlashDeal/mobile/index.less +83 -97
- package/lib/composite-comp/dito/components/FlashDeal/pc/index.js +8 -6
- package/lib/composite-comp/dito/components/HeadNavigation/defaultJSON.js +102 -0
- package/lib/composite-comp/dito/components/HeadNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.js +112 -0
- package/lib/composite-comp/dito/components/HeadNavigation/mobile/index.less +34 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.js +206 -0
- package/lib/composite-comp/dito/components/MenuNavigation/MenuNavMetaImage/index.less +25 -0
- package/lib/composite-comp/dito/components/MenuNavigation/defaultJSON.js +107 -0
- package/lib/composite-comp/dito/components/MenuNavigation/index.js +84 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.js +87 -0
- package/lib/composite-comp/dito/components/MenuNavigation/mobile/index.less +8 -0
- package/lib/composite-comp/dito/components/MobileNavigation/mobile/index.less +18 -35
- package/lib/composite-comp/dito/components/Orders/defaultJSON.js +89 -0
- package/lib/composite-comp/dito/components/Orders/index.js +84 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.js +345 -0
- package/lib/composite-comp/dito/components/Orders/mobile/index.less +82 -0
- package/lib/composite-comp/dito/components/PersonalInformation/defaultJSON.js +95 -0
- package/lib/composite-comp/dito/components/PersonalInformation/index.js +84 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/images/avatar.png +0 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.js +587 -0
- package/lib/composite-comp/dito/components/PersonalInformation/mobile/index.less +133 -0
- package/lib/composite-comp/dito/components/Recommend/mobile/index.js +6 -5
- package/lib/composite-comp/dito/components/Recommend/mobile/index.less +73 -86
- package/lib/composite-comp/dito/components/Recommend/pc/index.js +6 -5
- package/lib/composite-comp/dito/components/SearchBar/mobile/index.less +45 -52
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.js +6 -9
- package/lib/composite-comp/dito/components/SignBoard/mobile/index.less +62 -66
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.js +102 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigContent/index.less +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.js +148 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/RecommendConfigGroup/index.less +16 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/imgs/defaultImg.png +0 -0
- package/lib/composite-comp/dito/config-panels/AffiliateRecommendConfig/index.js +141 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/ConfigGroup/index.js +128 -0
- package/lib/composite-comp/dito/config-panels/CommonFunctionsConfig/index.js +113 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/HeadNavConfigImageGroup/index.js +142 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.js +121 -0
- package/lib/composite-comp/dito/config-panels/HeadNavigationConfig/index.less +23 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.js +203 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/GroupList/index.less +72 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.js +137 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/MenuNavConfigImageGroup/index.less +6 -0
- package/lib/composite-comp/dito/config-panels/MenuNavigationConfig/index.js +40 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/OrdersConfig/index.js +114 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/ConfigGroup/index.js +131 -0
- package/lib/composite-comp/dito/config-panels/PersonalInformationConfig/index.js +118 -0
- package/lib/composite-comp/dito/config-panels/RecommendConfig/RecommendConfigGroup/index.js +10 -9
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/AIRecommendation/index.js +431 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.js +214 -0
- package/lib/composite-comp/dito/second-config-panels/AffiliateRecommendSecondConfig/index.less +15 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.js +122 -0
- package/lib/composite-comp/dito/second-config-panels/CommonFunctionsSecondConfig/index.less +0 -0
- package/lib/composite-comp/dito/second-config-panels/HeadNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/MenuNavigationSecondConfig/index.js +127 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.js +148 -0
- package/lib/composite-comp/dito/second-config-panels/OrdersSecondConfig/index.less +9 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.js +143 -0
- package/lib/composite-comp/dito/second-config-panels/PersonalInformationSecondConfig/index.less +9 -0
- package/lib/constants/component-types.js +45 -3
- package/lib/constants/index.js +74 -5
- package/lib/constants/layout.js +48 -1
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.js +128 -0
- package/lib/core/Designer/ChatRobot/components/SearchCondition/index.less +33 -0
- package/lib/core/Designer/ChatRobot/index.js +84 -17
- package/lib/core/Designer/ChatRobot/index.less +69 -28
- package/lib/core/Designer/ConfigPanel/index.js +14 -3
- package/lib/core/Designer/FonixtreeGpt/index.js +222 -29
- package/lib/core/Designer/PageCompList/index.js +6 -5
- package/lib/core/Designer/QuickMenuBar/index.js +11 -5
- package/lib/core/Designer/QuickMenuBar/index.less +4 -0
- package/lib/core/Designer/RenderHtml/index.js +18 -15
- package/lib/core/Designer/RenderHtml/index.less +1 -1
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignCenterSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignLeftSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/AlignPicker/images/AlignRightSVG.js +19 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/BulletPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.js +77 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/UnderlineSelectPicker/index.less +27 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.js +36 -5
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/ColorPickerBtn/index.less +17 -16
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.js +27 -6
- package/lib/core/Designer/ToolBarModal/ToolBtn/components/OrderedPicker/index.less +4 -20
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignCenterSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignLeftSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/images/AlignRightSVG.js +40 -0
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.js +28 -3
- package/lib/core/Designer/ToolBarModal/ToolBtn/index.less +2 -1
- package/lib/core/Designer/ToolBarModal/index.js +68 -22
- package/lib/core/Designer/ToolBarModal/index.less +3 -2
- package/lib/core/Designer/index.js +26 -2
- package/lib/core/Renderer/index.js +76 -29
- package/lib/decorator/compositeDecorator.js +33 -6
- package/lib/decorator/metaDecorator.js +1 -1
- package/lib/locale/en/en.json +17 -3
- package/lib/locale/es/es.json +17 -3
- package/lib/locale/id/id.json +17 -3
- package/lib/meta-comp/components/Image/index.js +31 -25
- package/lib/meta-comp/components/Text/formats/textAlign.js +58 -0
- package/lib/meta-comp/components/Text/index.js +4 -1
- package/lib/meta-comp/components/Text/index.less +8 -0
- package/lib/meta-comp/config-panels/ImageConfig/index.js +48 -44
- package/lib/mobx/Frame.js +17 -2
- package/lib/mobx/UserState.js +144 -0
- package/lib/mobx/index.js +9 -3
- package/lib/utils/androidUtil.js +13 -2
- package/lib/utils/businessUtil.js +25 -3
- package/lib/utils/commonUtil.js +177 -22
- package/lib/utils/coreUtil.js +45 -2
- package/lib/utils/currencyUtil.js +9 -2
- package/package.json +2 -1
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.UserState = void 0;
|
|
7
|
+
|
|
8
|
+
var _mobx = require("mobx");
|
|
9
|
+
|
|
10
|
+
var _storeUtil = require("../utils/storeUtil");
|
|
11
|
+
|
|
12
|
+
var _androidUtil = require("../utils/androidUtil");
|
|
13
|
+
|
|
14
|
+
var _commonUtil = require("../utils/commonUtil");
|
|
15
|
+
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
|
|
18
|
+
var __assign = void 0 && (void 0).__assign || function () {
|
|
19
|
+
__assign = Object.assign || function (t) {
|
|
20
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
21
|
+
s = arguments[i];
|
|
22
|
+
|
|
23
|
+
for (var p in s) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
return t;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
return __assign.apply(this, arguments);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
var __decorate = void 0 && (void 0).__decorate || function (decorators, target, key, desc) {
|
|
35
|
+
var c = arguments.length,
|
|
36
|
+
r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc,
|
|
37
|
+
d;
|
|
38
|
+
if ((typeof Reflect === "undefined" ? "undefined" : _typeof(Reflect)) === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);else for (var i = decorators.length - 1; i >= 0; i--) {
|
|
39
|
+
if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
40
|
+
}
|
|
41
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
var debug = require('debug')('worker:userState');
|
|
45
|
+
/** 缓存 Key */
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
var CACHE_KEY = 'USER_STATE';
|
|
49
|
+
/** 持久化白名单 */
|
|
50
|
+
|
|
51
|
+
var whiteList = ['photo', 'firstName', 'middleName', 'lastName', 'nickName', 'mobilePhone', 'cartNum', 'email', 'lastPaymentDate', 'userAddress', 'userDefAddress', 'recentViewNum', 'userCollectionNum', 'couponNum', 'language', 'distributor', 'tempVal', 'gender', 'birthdayDay', 'enUserId'];
|
|
52
|
+
|
|
53
|
+
var getUserStore = function getUserStore() {
|
|
54
|
+
if (!(0, _commonUtil.isLogin)()) {
|
|
55
|
+
return {};
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
return (0, _storeUtil.getStore)(CACHE_KEY);
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
var initData = {
|
|
62
|
+
/** 头像 */
|
|
63
|
+
photo: '',
|
|
64
|
+
|
|
65
|
+
/** userId */
|
|
66
|
+
userId: '',
|
|
67
|
+
|
|
68
|
+
/** 昵称 */
|
|
69
|
+
nickName: '',
|
|
70
|
+
|
|
71
|
+
/** 名字 */
|
|
72
|
+
firstName: '',
|
|
73
|
+
|
|
74
|
+
/** 名字 */
|
|
75
|
+
middleName: '',
|
|
76
|
+
|
|
77
|
+
/** 名字 */
|
|
78
|
+
lastName: '',
|
|
79
|
+
|
|
80
|
+
/** 手机号 */
|
|
81
|
+
mobilePhone: '',
|
|
82
|
+
|
|
83
|
+
/** 购物车数量 */
|
|
84
|
+
cartNum: 0,
|
|
85
|
+
// 邮箱
|
|
86
|
+
email: '',
|
|
87
|
+
// 上次支付时间
|
|
88
|
+
lastPaymentDate: '',
|
|
89
|
+
// 用户设置语言
|
|
90
|
+
language: (0, _androidUtil.browserVersion)().isApp && localStorage.getItem('USER_LANGUAGE') ? localStorage.getItem('USER_LANGUAGE') : 'en',
|
|
91
|
+
|
|
92
|
+
/** 用户邮寄地址 */
|
|
93
|
+
userAddress: null,
|
|
94
|
+
userDefAddress: {},
|
|
95
|
+
// 最近浏览数量
|
|
96
|
+
recentViewNum: 0,
|
|
97
|
+
// 收藏数量
|
|
98
|
+
userCollectionNum: 0,
|
|
99
|
+
// 优惠券数量
|
|
100
|
+
couponNum: 0,
|
|
101
|
+
// 临时存放值
|
|
102
|
+
tempVal: '',
|
|
103
|
+
gender: '',
|
|
104
|
+
birthdayDay: '',
|
|
105
|
+
enUserId: '',
|
|
106
|
+
distributor: null
|
|
107
|
+
};
|
|
108
|
+
|
|
109
|
+
var UserState =
|
|
110
|
+
/** @class */
|
|
111
|
+
function () {
|
|
112
|
+
function UserState() {
|
|
113
|
+
this.state = __assign(__assign({}, initData), getUserStore());
|
|
114
|
+
}
|
|
115
|
+
/** 修改状态 */
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
UserState.prototype.setState = function (data) {
|
|
119
|
+
debug('用户状态更新', data);
|
|
120
|
+
var preState = this.state;
|
|
121
|
+
this.state = __assign(__assign({}, preState), data);
|
|
122
|
+
(0, _storeUtil.persistence)(CACHE_KEY, this.state, whiteList);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
UserState.prototype.clearUserState = function () {
|
|
126
|
+
this.state = __assign(__assign({}, initData), {
|
|
127
|
+
language: this.state.language
|
|
128
|
+
});
|
|
129
|
+
(0, _storeUtil.persistence)(CACHE_KEY, this.state, whiteList);
|
|
130
|
+
/** 恢复默认地址 */
|
|
131
|
+
|
|
132
|
+
(0, _commonUtil.setDefaultAddressFromIP)();
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
__decorate([_mobx.observable], UserState.prototype, "state", void 0);
|
|
136
|
+
|
|
137
|
+
__decorate([_mobx.action.bound], UserState.prototype, "setState", null);
|
|
138
|
+
|
|
139
|
+
__decorate([_mobx.action.bound], UserState.prototype, "clearUserState", null);
|
|
140
|
+
|
|
141
|
+
return UserState;
|
|
142
|
+
}();
|
|
143
|
+
|
|
144
|
+
exports.UserState = UserState;
|
package/es/mobx/index.js
CHANGED
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
var _exportNames = {
|
|
7
7
|
store: true,
|
|
8
|
-
frameStore: true
|
|
8
|
+
frameStore: true,
|
|
9
|
+
userState: true
|
|
9
10
|
};
|
|
10
|
-
exports.store = exports.frameStore = exports["default"] = void 0;
|
|
11
|
+
exports.userState = exports.store = exports.frameStore = exports["default"] = void 0;
|
|
11
12
|
|
|
12
13
|
var _mobx = require("mobx");
|
|
13
14
|
|
|
@@ -27,6 +28,8 @@ var _Store = require("./Store");
|
|
|
27
28
|
|
|
28
29
|
var _Frame = require("./Frame");
|
|
29
30
|
|
|
31
|
+
var _UserState = require("./UserState");
|
|
32
|
+
|
|
30
33
|
/* 开启严格模式 */
|
|
31
34
|
(0, _mobx.configure)({
|
|
32
35
|
enforceActions: 'observed'
|
|
@@ -35,8 +38,11 @@ var store = new _Store.Store();
|
|
|
35
38
|
exports.store = store;
|
|
36
39
|
var frameStore = new _Frame.Frame();
|
|
37
40
|
exports.frameStore = frameStore;
|
|
41
|
+
var userState = new _UserState.UserState();
|
|
42
|
+
exports.userState = userState;
|
|
38
43
|
var _default = {
|
|
39
44
|
store: store,
|
|
40
|
-
frameStore: frameStore
|
|
45
|
+
frameStore: frameStore,
|
|
46
|
+
userState: userState
|
|
41
47
|
};
|
|
42
48
|
exports["default"] = _default;
|
package/es/utils/androidUtil.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.sendToJs = exports.sendToIos = exports.sendToApp = exports.sendToAndroid = exports.iosSendToJs = exports.connectWebViewJavascriptBridge = exports.browserVersion = void 0;
|
|
6
|
+
exports.sendToJs = exports.sendToIos = exports.sendToApp = exports.sendToAndroid = exports.iosSendToJs = exports.goToLoginApp = exports.connectWebViewJavascriptBridge = exports.browserVersion = void 0;
|
|
7
7
|
|
|
8
8
|
// 判断访问终端
|
|
9
9
|
var browserVersion = function browserVersion() {
|
|
@@ -129,6 +129,17 @@ var sendToApp = function sendToApp(params) {
|
|
|
129
129
|
if (AlipayJSBridge) {
|
|
130
130
|
AlipayJSBridge.call('mpaasAction', params);
|
|
131
131
|
}
|
|
132
|
+
}; // 拉起APP登录
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
exports.sendToApp = sendToApp;
|
|
136
|
+
|
|
137
|
+
var goToLoginApp = function goToLoginApp() {
|
|
138
|
+
if (browserVersion().androidApp) {
|
|
139
|
+
window.dito.goToLogin();
|
|
140
|
+
} else if (browserVersion().iosApp) {
|
|
141
|
+
window.dito.goToLogin();
|
|
142
|
+
}
|
|
132
143
|
};
|
|
133
144
|
|
|
134
|
-
exports.
|
|
145
|
+
exports.goToLoginApp = goToLoginApp;
|
package/es/utils/businessUtil.js
CHANGED
|
@@ -31,9 +31,25 @@ var newParseUrl = function newParseUrl(urlObj) {
|
|
|
31
31
|
productId = urlObj.productId;
|
|
32
32
|
|
|
33
33
|
switch (type) {
|
|
34
|
+
// 锚点跳转
|
|
35
|
+
case _constants.urlTypeMap.ANCHOR:
|
|
36
|
+
params = {
|
|
37
|
+
action: 'operation',
|
|
38
|
+
params: {
|
|
39
|
+
type: 'ANCHOR',
|
|
40
|
+
data: value
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
break;
|
|
34
44
|
// 商品详情
|
|
45
|
+
|
|
35
46
|
case _constants.urlTypeMap.PRODUCT_DETAIL_PAGE:
|
|
36
|
-
|
|
47
|
+
if (offerId) {
|
|
48
|
+
link = "/product/detail/" + offerId + "?productId=" + (productId !== null && productId !== void 0 ? productId : '');
|
|
49
|
+
} else {
|
|
50
|
+
link = "/product/detail/" + productId;
|
|
51
|
+
}
|
|
52
|
+
|
|
37
53
|
params = {
|
|
38
54
|
action: 'jump',
|
|
39
55
|
params: {
|
|
@@ -214,7 +230,12 @@ var parseUrl = function parseUrl(url) {
|
|
|
214
230
|
switch (type) {
|
|
215
231
|
// 商品详情
|
|
216
232
|
case _constants.urlType.PRODUCT_DETAIL:
|
|
217
|
-
|
|
233
|
+
if (arg1 && arg1 !== 'undefined') {
|
|
234
|
+
link = "/product/detail/" + arg1 + "?productId=" + (arg2 !== null && arg2 !== void 0 ? arg2 : '');
|
|
235
|
+
} else {
|
|
236
|
+
link = "/product/detail/" + arg2;
|
|
237
|
+
}
|
|
238
|
+
|
|
218
239
|
params = {
|
|
219
240
|
action: 'jump',
|
|
220
241
|
params: {
|
|
@@ -315,7 +336,8 @@ var parseUrl = function parseUrl(url) {
|
|
|
315
336
|
'/social-commerce/my-cashback': 'CASHBACK',
|
|
316
337
|
'/account/wallet': 'WEBVIEW',
|
|
317
338
|
'/product/GroupBuy': 'GROUP',
|
|
318
|
-
'/search-page': 'SEARCH_PAGE'
|
|
339
|
+
'/search-page': 'SEARCH_PAGE',
|
|
340
|
+
'/main/my-commission': 'WALLET'
|
|
319
341
|
};
|
|
320
342
|
link = url;
|
|
321
343
|
params = {
|
package/es/utils/commonUtil.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.addZero = exports.addUrlQuery = void 0;
|
|
7
7
|
exports.asyncDataURLtoImage = asyncDataURLtoImage;
|
|
8
|
-
exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
8
|
+
exports.checkLogin = exports.checkFileName = exports.calcLastTime = exports.asyncNextTick = void 0;
|
|
9
9
|
exports.commonFetch = commonFetch;
|
|
10
10
|
exports.convertCount = exports.compatibleNewPageData = void 0;
|
|
11
11
|
exports.convertImageUrl = convertImageUrl;
|
|
@@ -16,11 +16,13 @@ exports.dragSource = exports.downloadBase64Image = void 0;
|
|
|
16
16
|
exports.ensure = ensure;
|
|
17
17
|
exports.getGAData = exports.getColorRgba = void 0;
|
|
18
18
|
exports.getPageDataMap = getPageDataMap;
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
19
|
+
exports.getUrlParams = void 0;
|
|
20
|
+
exports.goLogin = goLogin;
|
|
21
|
+
exports.importAsync = void 0;
|
|
22
|
+
exports.isLogin = isLogin;
|
|
23
|
+
exports.onListenTouch = exports.nextTick = exports.navigateTo = void 0;
|
|
22
24
|
exports.pushGA = pushGA;
|
|
23
|
-
exports.pxToRem = void 0;
|
|
25
|
+
exports.setDefaultAddressFromIP = exports.pxToRem = void 0;
|
|
24
26
|
exports.shareFacebook = shareFacebook;
|
|
25
27
|
exports.shareLinkedin = shareLinkedin;
|
|
26
28
|
exports.shareTwitter = shareTwitter;
|
|
@@ -35,8 +37,14 @@ var _uuid = require("uuid");
|
|
|
35
37
|
|
|
36
38
|
var _qs = _interopRequireDefault(require("qs"));
|
|
37
39
|
|
|
40
|
+
var _androidUtil = require("./androidUtil");
|
|
41
|
+
|
|
42
|
+
var _storeUtil = require("./storeUtil");
|
|
43
|
+
|
|
38
44
|
var _constants = require("../constants");
|
|
39
45
|
|
|
46
|
+
var _mobx = require("../mobx");
|
|
47
|
+
|
|
40
48
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
41
49
|
|
|
42
50
|
var __assign = void 0 && (void 0).__assign || function () {
|
|
@@ -288,20 +296,29 @@ function commonFetch(url, data, method) {
|
|
|
288
296
|
});
|
|
289
297
|
}
|
|
290
298
|
|
|
291
|
-
var navigateTo = function navigateTo(url) {
|
|
299
|
+
var navigateTo = function navigateTo(url, state) {
|
|
300
|
+
console.log(url);
|
|
301
|
+
|
|
292
302
|
if (!url) {
|
|
293
303
|
return;
|
|
294
304
|
}
|
|
295
305
|
|
|
296
306
|
var _a = url.split(';'),
|
|
297
307
|
h5Url = _a[0],
|
|
298
|
-
appUrl = _a[1];
|
|
308
|
+
appUrl = _a[1];
|
|
309
|
+
|
|
310
|
+
if (appUrl && (0, _androidUtil.browserVersion)().isApp) {
|
|
311
|
+
window.location.href = appUrl;
|
|
312
|
+
} // 未配置App路径并且h5绝对路径时直接跳转,其他情况让业务层处理
|
|
299
313
|
|
|
300
314
|
|
|
301
315
|
if (!appUrl && !h5Url.startsWith('/')) {
|
|
302
316
|
window.location.href = h5Url;
|
|
303
317
|
} else if (window.magicDesign.history) {
|
|
304
|
-
window.magicDesign.history.push(
|
|
318
|
+
window.magicDesign.history.push({
|
|
319
|
+
pathname: h5Url,
|
|
320
|
+
state: state
|
|
321
|
+
});
|
|
305
322
|
} else if (window.magicDesign.navigatePreUrl) {
|
|
306
323
|
// 预览模式跳转
|
|
307
324
|
if (h5Url.startsWith('/')) {
|
|
@@ -311,20 +328,110 @@ var navigateTo = function navigateTo(url) {
|
|
|
311
328
|
}
|
|
312
329
|
}
|
|
313
330
|
};
|
|
314
|
-
/**
|
|
331
|
+
/** 判断是否登录状态 */
|
|
315
332
|
|
|
316
333
|
|
|
317
334
|
exports.navigateTo = navigateTo;
|
|
318
335
|
|
|
319
|
-
function
|
|
320
|
-
|
|
336
|
+
function isLogin() {
|
|
337
|
+
return localStorage.getItem('isLogin') === 'Y';
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* 跳转登陆页面
|
|
341
|
+
* SF打开的页面,需要跳转到手机验证码登陆页面
|
|
342
|
+
* @param {*} state
|
|
343
|
+
*/
|
|
321
344
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
state
|
|
326
|
-
}
|
|
345
|
+
|
|
346
|
+
function goLogin(state, replaceFlag) {
|
|
347
|
+
if (state === void 0) {
|
|
348
|
+
state = {};
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
if (replaceFlag === void 0) {
|
|
352
|
+
replaceFlag = false;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
var isFromSf = (0, _storeUtil.getStore)(_constants.STORE_KEY.IS_FROM_SF);
|
|
356
|
+
var signUrl = isFromSf === 'Y' ? '/sign-in-opt' : '/sign-in';
|
|
357
|
+
|
|
358
|
+
if (replaceFlag) {
|
|
359
|
+
window.magicDesign.history.replace({
|
|
360
|
+
pathname: signUrl,
|
|
361
|
+
state: state
|
|
362
|
+
});
|
|
363
|
+
} else {
|
|
364
|
+
navigateTo(signUrl, state);
|
|
365
|
+
}
|
|
327
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* 检查是否登录 未登录返回登录页
|
|
369
|
+
* @param {boolean?} isLead 是否引导登录
|
|
370
|
+
* @returns boolean
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
var checkLogin = function checkLogin(isLead, redirectUrl, replaceFlag) {
|
|
375
|
+
if (isLead === void 0) {
|
|
376
|
+
isLead = true;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
if (!isLogin()) {
|
|
380
|
+
if (isLead) {
|
|
381
|
+
if ((0, _androidUtil.browserVersion)().isApp) {
|
|
382
|
+
goToLoginApp();
|
|
383
|
+
} else {
|
|
384
|
+
var _a = window.location,
|
|
385
|
+
pathname = _a.pathname,
|
|
386
|
+
search = _a.search,
|
|
387
|
+
hash = _a.hash;
|
|
388
|
+
|
|
389
|
+
var _redirectUrl = pathname + search + hash;
|
|
390
|
+
|
|
391
|
+
goLogin({
|
|
392
|
+
redirectUrl: redirectUrl || _redirectUrl
|
|
393
|
+
}, replaceFlag);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
return true;
|
|
401
|
+
};
|
|
402
|
+
/**
|
|
403
|
+
* TODO 根据IP获取地址信息
|
|
404
|
+
*/
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
exports.checkLogin = checkLogin;
|
|
408
|
+
|
|
409
|
+
var setDefaultAddressFromIP = function setDefaultAddressFromIP() {
|
|
410
|
+
/** 设置初始地址 */
|
|
411
|
+
|
|
412
|
+
/** 接口返回数据addrPath: "1|2|137088|137089|137090" 保留后两个再拼上contactStdId
|
|
413
|
+
* 未登陆造数据和真实数据一致使用countryId占位
|
|
414
|
+
*/
|
|
415
|
+
|
|
416
|
+
/** 138375,138376,126065,126066 */
|
|
417
|
+
if (!_mobx.userState.state.userAddress) {
|
|
418
|
+
_mobx.userState.setState({
|
|
419
|
+
userAddress: {
|
|
420
|
+
_FROM: 'ip',
|
|
421
|
+
addrPath: 'countryId|countryId1T|countryId2T|138375|138376|126065',
|
|
422
|
+
city: 'CITY OF MANILA',
|
|
423
|
+
contactStdId: 126066,
|
|
424
|
+
// country: 'CITY OF MANILA',
|
|
425
|
+
district: 'SAN MIGUEL',
|
|
426
|
+
street: 'Barangay 637',
|
|
427
|
+
province: 'NCR, CITY OF MANILA, FIRST DISTRICT',
|
|
428
|
+
type: 'address'
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
exports.setDefaultAddressFromIP = setDefaultAddressFromIP;
|
|
328
435
|
|
|
329
436
|
var addUrlQuery = function addUrlQuery(url, queryObj) {
|
|
330
437
|
if (/\?/.test(url)) {
|
|
@@ -652,7 +759,7 @@ function pushGA(data, eventName) {
|
|
|
652
759
|
elementName: data.elementName
|
|
653
760
|
};
|
|
654
761
|
console.log('GA push', eventName, eventData);
|
|
655
|
-
window.gtag('event', eventName, eventData);
|
|
762
|
+
if (window.gtag) window.gtag('event', eventName, eventData);
|
|
656
763
|
}
|
|
657
764
|
} catch (error) {
|
|
658
765
|
console.error(error);
|
|
@@ -765,8 +872,7 @@ var asyncNextTick = function asyncNextTick(asyncFunc, interval, count) {
|
|
|
765
872
|
exports.asyncNextTick = asyncNextTick;
|
|
766
873
|
|
|
767
874
|
var convertToRem = function convertToRem(value) {
|
|
768
|
-
return value; // PTO项目 解开注释
|
|
769
|
-
|
|
875
|
+
// return value; // PTO项目 解开注释
|
|
770
876
|
if (window.magicDesign.device === 'pc') {
|
|
771
877
|
return value + "px";
|
|
772
878
|
}
|
|
@@ -785,8 +891,7 @@ var convertToRem = function convertToRem(value) {
|
|
|
785
891
|
exports.convertToRem = convertToRem;
|
|
786
892
|
|
|
787
893
|
var pxToRem = function pxToRem(styleObj) {
|
|
788
|
-
return styleObj; // PTO项目 解开注释
|
|
789
|
-
|
|
894
|
+
// return styleObj; // PTO项目 解开注释
|
|
790
895
|
if (window.magicDesign.device === 'pc') {
|
|
791
896
|
return styleObj;
|
|
792
897
|
}
|
|
@@ -922,4 +1027,54 @@ var convertCount = function convertCount(value) {
|
|
|
922
1027
|
return newValue;
|
|
923
1028
|
};
|
|
924
1029
|
|
|
925
|
-
exports.convertCount = convertCount;
|
|
1030
|
+
exports.convertCount = convertCount;
|
|
1031
|
+
|
|
1032
|
+
var onListenTouch = function onListenTouch(cls, leftFunc, rightFunc) {
|
|
1033
|
+
var box = document.querySelector(cls); // 监听对象
|
|
1034
|
+
|
|
1035
|
+
var startTime = ''; // 触摸开始时间
|
|
1036
|
+
|
|
1037
|
+
var startDistanceX = ''; // 触摸开始X轴位置
|
|
1038
|
+
|
|
1039
|
+
var startDistanceY = ''; // 触摸开始Y轴位置
|
|
1040
|
+
|
|
1041
|
+
var endTime = ''; // 触摸结束时间
|
|
1042
|
+
|
|
1043
|
+
var endDistanceX = ''; // 触摸结束X轴位置
|
|
1044
|
+
|
|
1045
|
+
var endDistanceY = ''; // 触摸结束Y轴位置
|
|
1046
|
+
|
|
1047
|
+
var moveTime = ''; // 触摸时间
|
|
1048
|
+
|
|
1049
|
+
var moveDistanceX = ''; // 触摸移动X轴距离
|
|
1050
|
+
|
|
1051
|
+
var moveDistanceY = ''; // 触摸移动Y轴距离
|
|
1052
|
+
|
|
1053
|
+
box.addEventListener('touchstart', function (e) {
|
|
1054
|
+
startTime = new Date().getTime();
|
|
1055
|
+
startDistanceX = e.touches[0].screenX;
|
|
1056
|
+
startDistanceY = e.touches[0].screenY;
|
|
1057
|
+
});
|
|
1058
|
+
box.addEventListener('touchend', function (e) {
|
|
1059
|
+
endTime = new Date().getTime();
|
|
1060
|
+
endDistanceX = e.changedTouches[0].screenX;
|
|
1061
|
+
endDistanceY = e.changedTouches[0].screenY;
|
|
1062
|
+
moveTime = endTime - startTime;
|
|
1063
|
+
moveDistanceX = startDistanceX - endDistanceX;
|
|
1064
|
+
moveDistanceY = startDistanceY - endDistanceY; // 判断滑动距离超过40 且 时间小于500毫秒
|
|
1065
|
+
|
|
1066
|
+
if ((Math.abs(moveDistanceX) > 40 || Math.abs(moveDistanceY) > 40) && moveTime < 500) {
|
|
1067
|
+
// 判断X轴移动的距离是否大于Y轴移动的距离
|
|
1068
|
+
if (Math.abs(moveDistanceX) > Math.abs(moveDistanceY)) {
|
|
1069
|
+
// 左右
|
|
1070
|
+
if (moveDistanceX > 0) leftFunc();else rightFunc();
|
|
1071
|
+
} else {
|
|
1072
|
+
// 上下
|
|
1073
|
+
return moveDistanceY > 0 ? 'top' : 'bottom';
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
});
|
|
1077
|
+
return null;
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
exports.onListenTouch = onListenTouch;
|
package/es/utils/coreUtil.js
CHANGED
|
@@ -286,6 +286,22 @@ var getCoupon = function getCoupon(couponId) {
|
|
|
286
286
|
});
|
|
287
287
|
};
|
|
288
288
|
|
|
289
|
+
function isUrl(string) {
|
|
290
|
+
// var pattern = new RegExp('^(https?:\\/\\/)?' + // 协议
|
|
291
|
+
// '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + // 域名
|
|
292
|
+
// '((\\d{1,3}\\.){3}\\d{1,3}))' + // 或者 IP (v4) 地址
|
|
293
|
+
// '(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*' + // 端口和路径
|
|
294
|
+
// '(\\?[;&a-z\\d%_.~+=-]*)?' + // 查询字符串
|
|
295
|
+
// '(\\#[-a-z\\d_]*)?$', 'i'); // fragment locator
|
|
296
|
+
// return !!pattern.test(string);
|
|
297
|
+
try {
|
|
298
|
+
new URL(string);
|
|
299
|
+
return true;
|
|
300
|
+
} catch (_) {
|
|
301
|
+
return false;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
|
|
289
305
|
var clickUrl = function clickUrl(url) {
|
|
290
306
|
if (url === void 0) {
|
|
291
307
|
url = '';
|
|
@@ -310,6 +326,17 @@ var clickUrl = function clickUrl(url) {
|
|
|
310
326
|
url: params.link
|
|
311
327
|
}
|
|
312
328
|
});
|
|
329
|
+
/** 锚点跳转 */
|
|
330
|
+
|
|
331
|
+
if (params.type === 'ANCHOR') {
|
|
332
|
+
(0, _commonUtil.ensure)(function () {
|
|
333
|
+
var nodeId = isPc() ? params.data.pcNodeId : params.data.mobileNodeId;
|
|
334
|
+
document.querySelector("#node-" + nodeId).scrollIntoView({
|
|
335
|
+
behavior: 'smooth'
|
|
336
|
+
});
|
|
337
|
+
});
|
|
338
|
+
return;
|
|
339
|
+
}
|
|
313
340
|
|
|
314
341
|
if ((0, _androidUtil.browserVersion)().isAshitaApp) {
|
|
315
342
|
(0, _androidUtil.sendToApp)(data);
|
|
@@ -342,9 +369,25 @@ var clickUrl = function clickUrl(url) {
|
|
|
342
369
|
}
|
|
343
370
|
|
|
344
371
|
return;
|
|
372
|
+
} // 输入的是完整的跳转地址
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
if (isUrl(link)) {
|
|
376
|
+
if (!link.includes(window.location.host)) {
|
|
377
|
+
// 跳转外链 需要把userToken带上
|
|
378
|
+
if (link.includes('?')) {
|
|
379
|
+
var a = link + "&userToken=" + (localStorage.getItem('h5Token') || '');
|
|
380
|
+
window.open(a);
|
|
381
|
+
} else {
|
|
382
|
+
var a = link + "?userToken=" + (localStorage.getItem('h5Token') || '');
|
|
383
|
+
window.open(a);
|
|
384
|
+
}
|
|
385
|
+
} else {
|
|
386
|
+
window.open(link);
|
|
387
|
+
}
|
|
388
|
+
} else {
|
|
389
|
+
(0, _commonUtil.navigateTo)(link);
|
|
345
390
|
}
|
|
346
|
-
|
|
347
|
-
(0, _commonUtil.navigateTo)(link);
|
|
348
391
|
}
|
|
349
392
|
};
|
|
350
393
|
|
package/es/utils/currencyUtil.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
6
|
+
exports.numberToFixed = exports.getPricePrefix = exports.getPrecision = exports.formatCurrencyWithSymbolNotSpace = exports.formatCurrencyWithSymbol = exports.formatCurrency = exports.formatBackendCurrency = exports.currencyToFont = exports.calcFloatCount = exports.addSeparators = void 0;
|
|
7
7
|
|
|
8
8
|
var _divide = _interopRequireDefault(require("lodash/divide"));
|
|
9
9
|
|
|
@@ -105,6 +105,13 @@ var formatCurrencyWithSymbol = function formatCurrencyWithSymbol(num) {
|
|
|
105
105
|
var ret = formatCurrency(num);
|
|
106
106
|
return getPricePrefix() + " " + ret;
|
|
107
107
|
};
|
|
108
|
+
|
|
109
|
+
exports.formatCurrencyWithSymbol = formatCurrencyWithSymbol;
|
|
110
|
+
|
|
111
|
+
var formatCurrencyWithSymbolNotSpace = function formatCurrencyWithSymbolNotSpace(num) {
|
|
112
|
+
var ret = formatCurrency(num);
|
|
113
|
+
return "" + getPricePrefix() + ret;
|
|
114
|
+
};
|
|
108
115
|
/**
|
|
109
116
|
* TODO 未兼容科学计数法(小数点后7位)
|
|
110
117
|
* 计算浮点位数
|
|
@@ -113,7 +120,7 @@ var formatCurrencyWithSymbol = function formatCurrencyWithSymbol(num) {
|
|
|
113
120
|
*/
|
|
114
121
|
|
|
115
122
|
|
|
116
|
-
exports.
|
|
123
|
+
exports.formatCurrencyWithSymbolNotSpace = formatCurrencyWithSymbolNotSpace;
|
|
117
124
|
|
|
118
125
|
var calcFloatCount = function calcFloatCount(number) {
|
|
119
126
|
var numbString = String(number);
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|