xiaoe_mp_npm 1.1.21 → 1.1.22-test02
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/.babelrc +10 -10
- package/.eslintrc.js +102 -102
- package/.gitlab-ci.yml +44 -44
- package/.prettierrc.js +34 -34
- package/.vscode/extensions.json +4 -4
- package/.vscode/settings.json +9 -9
- package/LICENSE +21 -21
- package/README.md +134 -134
- package/gulpfile.js +26 -26
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/components/friends/friends.js +181 -181
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +25 -25
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.js +253 -253
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.less +255 -255
- package/miniprogram_dist/AliveInvite/LiveRoomVertical/index.wxml +122 -122
- package/miniprogram_dist/CollectionAddress/index.js +288 -288
- package/miniprogram_dist/CollectionAddress/index.json +13 -13
- package/miniprogram_dist/CollectionAddress/index.less +4 -4
- package/miniprogram_dist/CollectionAddress/index.wxml +93 -93
- package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.json +10 -10
- package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.less +123 -123
- package/miniprogram_dist/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
- package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.js +168 -168
- package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.json +7 -7
- package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.less +95 -95
- package/miniprogram_dist/ConfirmOrder/components/AddressManage/index.wxml +36 -36
- package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.js +160 -160
- package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.json +4 -4
- package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.less +79 -79
- package/miniprogram_dist/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
- package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.js +115 -115
- package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.json +5 -5
- package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.less +20 -20
- package/miniprogram_dist/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.js +1819 -1819
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.json +27 -27
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
- package/miniprogram_dist/ConfirmOrder/components/ConfirmOrderContent/index.wxml +225 -225
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
- package/miniprogram_dist/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
- package/miniprogram_dist/GoodsItem/index.js +180 -21
- package/miniprogram_dist/GoodsItem/index.scss +822 -627
- package/miniprogram_dist/GoodsItem/index.wxml +145 -108
- package/miniprogram_dist/GoodsItem/index.wxs +40 -40
- package/miniprogram_dist/GoodsItem/index.wxss +1149 -461
- package/miniprogram_dist/LiveGoodsList/Header/index.js +65 -65
- package/miniprogram_dist/LiveGoodsList/Header/index.json +6 -6
- package/miniprogram_dist/LiveGoodsList/Header/index.less +45 -45
- package/miniprogram_dist/LiveGoodsList/Header/index.scss +157 -137
- package/miniprogram_dist/LiveGoodsList/Header/index.wxml +39 -36
- package/miniprogram_dist/LiveGoodsList/Header/index.wxss +88 -12
- package/miniprogram_dist/LiveGoodsList/README.md +9 -9
- package/miniprogram_dist/LiveGoodsList/index.js +29 -10
- package/miniprogram_dist/LiveGoodsList/index.less +53 -53
- package/miniprogram_dist/LiveGoodsList/index.scss +173 -173
- package/miniprogram_dist/LiveGoodsList/index.wxml +9 -1
- package/miniprogram_dist/MatchList/index.js +445 -441
- package/miniprogram_dist/MatchList/index.json +5 -5
- package/miniprogram_dist/MatchList/index.scss +175 -175
- package/miniprogram_dist/MatchList/index.wxml +98 -97
- package/miniprogram_dist/MemberIntegralMultiplierBar/index.js +196 -196
- package/miniprogram_dist/MemberIntegralMultiplierBar/index.json +7 -7
- package/miniprogram_dist/MemberIntegralMultiplierBar/index.scss +67 -67
- package/miniprogram_dist/MemberIntegralMultiplierBar/index.wxml +8 -8
- package/miniprogram_dist/MemberIntegralMultiplierPopup/index.js +54 -54
- package/miniprogram_dist/MemberIntegralMultiplierPopup/index.json +7 -7
- package/miniprogram_dist/MemberIntegralMultiplierPopup/index.scss +86 -86
- package/miniprogram_dist/MemberIntegralMultiplierPopup/index.wxml +48 -48
- package/miniprogram_dist/MemberIntegralMultiplierPopup/popup-service.js +18 -18
- package/miniprogram_dist/MsgBubble/index.js +312 -0
- package/miniprogram_dist/MsgBubble/index.json +7 -0
- package/miniprogram_dist/MsgBubble/index.scss +81 -0
- package/miniprogram_dist/MsgBubble/index.wxml +19 -0
- package/miniprogram_dist/MsgBubble/index.wxss +202 -0
- package/miniprogram_dist/ShoppingCartBubble/index.js +336 -156
- package/miniprogram_dist/ShoppingCartBubble/index.scss +94 -55
- package/miniprogram_dist/ShoppingCartBubble/index.wxml +14 -11
- package/miniprogram_dist/ShoppingCartBubble/index.wxss +196 -40
- package/miniprogram_dist/Task/TaskBubble/index.json +3 -3
- package/miniprogram_dist/Task/TaskBubble/index.scss +125 -125
- package/miniprogram_dist/Task/TaskBubble/index.wxml +22 -22
- package/miniprogram_dist/Task/TaskIcon/index.js +29 -29
- package/miniprogram_dist/Task/TaskIcon/index.json +4 -4
- package/miniprogram_dist/Task/TaskIcon/index.scss +70 -70
- package/miniprogram_dist/Task/TaskIcon/index.wxml +5 -5
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.js +52 -52
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.json +6 -6
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.scss +39 -39
- package/miniprogram_dist/Task/TaskPopup/component/RewardList/index.wxml +23 -23
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.js +578 -578
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.json +10 -10
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.scss +245 -245
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxml +145 -145
- package/miniprogram_dist/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.js +298 -298
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.json +7 -7
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.scss +66 -66
- package/miniprogram_dist/Task/TaskPopup/component/TaskList/index.wxml +41 -41
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.js +129 -129
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.json +13 -13
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.scss +90 -90
- package/miniprogram_dist/Task/TaskPopup/component/TaskType/index.wxml +69 -69
- package/miniprogram_dist/Task/TaskPopup/index.js +174 -174
- package/miniprogram_dist/Task/TaskPopup/index.json +7 -7
- package/miniprogram_dist/Task/TaskPopup/index.scss +166 -166
- package/miniprogram_dist/Task/TaskPopup/index.wxml +87 -87
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
- package/miniprogram_dist/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
- package/miniprogram_dist/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
- package/miniprogram_dist/Task/TaskQuizPopup/index.js +246 -246
- package/miniprogram_dist/Task/TaskQuizPopup/index.json +7 -7
- package/miniprogram_dist/Task/TaskQuizPopup/index.scss +158 -158
- package/miniprogram_dist/Task/TaskQuizPopup/index.wxml +99 -99
- package/miniprogram_dist/Task/common/task.js +55 -55
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.js +74 -74
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.json +5 -5
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.scss +107 -107
- package/miniprogram_dist/Task/taskQuizRemindPopup/index.wxml +27 -27
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.js +68 -68
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.json +6 -6
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.scss +123 -123
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxml +81 -81
- package/miniprogram_dist/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.js +44 -44
- package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.json +6 -6
- package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.scss +106 -106
- package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
- package/miniprogram_dist/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
- package/miniprogram_dist/Task/taskReceivePopup/index.js +47 -47
- package/miniprogram_dist/Task/taskReceivePopup/index.json +13 -13
- package/miniprogram_dist/Task/taskReceivePopup/index.wxml +32 -32
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.js +106 -106
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.json +7 -7
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.scss +60 -60
- package/miniprogram_dist/Task/taskReceivePopup/integral/index.wxml +23 -23
- package/miniprogram_dist/TeacherGoodsList/index.js +997 -983
- package/miniprogram_dist/TeacherGoodsList/index.json +10 -10
- package/miniprogram_dist/TeacherGoodsList/index.scss +178 -178
- package/miniprogram_dist/TeacherGoodsList/index.wxml +146 -144
- package/miniprogram_dist/common/api/liveGoodsList.js +181 -167
- package/miniprogram_dist/common/assets/images/coupon/emptypage.svg +49 -49
- package/miniprogram_dist/common/assets/images/coupon/failed.svg +5 -5
- package/miniprogram_dist/common/assets/images/coupon/up.svg +21 -21
- package/miniprogram_dist/common/assets/images/pay/loading.svg +3 -3
- package/miniprogram_dist/common/assets/images/recommend.svg +6 -6
- package/miniprogram_dist/common/assets/images/refresh.svg +10 -10
- package/miniprogram_dist/common/assets/images/refresh_white.svg +3 -3
- package/miniprogram_dist/common/assets/images/wechat.svg +4 -4
- package/miniprogram_dist/common/css/index.less +2 -2
- package/miniprogram_dist/common/css/theme.less +19 -19
- package/miniprogram_dist/common/libs/dataUp/sensorUp.js +91 -91
- package/miniprogram_dist/common/libs/playerHttp.js +58 -58
- package/miniprogram_dist/common/libs/playerRequestUrl.js +39 -39
- package/miniprogram_dist/common/transaction/parameter/channel-info.js +36 -36
- package/miniprogram_dist/common/transaction/parameter/delivery-info.js +26 -26
- package/miniprogram_dist/common/transaction/parameter/misc-parameter.js +21 -21
- package/miniprogram_dist/common/utils/currency.js +52 -52
- package/miniprogram_dist/common/utils/getInfoCollectionData.js +59 -59
- package/miniprogram_dist/common/utils/image-cdn-slim/constant.js +8 -8
- package/miniprogram_dist/common/utils/image-cdn-slim/index.js +7 -7
- package/miniprogram_dist/common/utils/image-cdn-slim/utils.js +156 -156
- package/miniprogram_dist/common/utils/index.js +86 -86
- package/miniprogram_dist/common/utils/liveGoods.js +217 -217
- package/miniprogram_dist/common/utils/specialList.js +5 -5
- package/miniprogram_dist/common/utils/tool.js +72 -72
- package/miniprogram_dist/common/wxs/filter.wxs +29 -29
- package/miniprogram_dist/index.js +6 -6
- package/miniprogram_dist/index.js.map +1 -1
- package/miniprogram_dist/lib.js.map +1 -1
- package/package.json +78 -78
- package/project.config.json +79 -79
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.js +181 -181
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +25 -25
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxss +97 -97
- package/src/AliveInvite/LiveRoomVertical/index.js +253 -253
- package/src/AliveInvite/LiveRoomVertical/index.less +255 -255
- package/src/AliveInvite/LiveRoomVertical/index.wxml +122 -122
- package/src/AliveInvite/LiveRoomVertical/index.wxss +252 -252
- package/src/CollectionAddress/index.js +288 -288
- package/src/CollectionAddress/index.json +13 -13
- package/src/CollectionAddress/index.less +4 -4
- package/src/CollectionAddress/index.wxml +93 -93
- package/src/CollectionAddress/index.wxss +5 -5
- package/src/ConfirmOrder/components/AddressEdit/index.json +10 -10
- package/src/ConfirmOrder/components/AddressEdit/index.less +123 -123
- package/src/ConfirmOrder/components/AddressEdit/index.wxml +51 -51
- package/src/ConfirmOrder/components/AddressEdit/index.wxss +120 -120
- package/src/ConfirmOrder/components/AddressManage/index.js +168 -168
- package/src/ConfirmOrder/components/AddressManage/index.json +7 -7
- package/src/ConfirmOrder/components/AddressManage/index.less +95 -95
- package/src/ConfirmOrder/components/AddressManage/index.wxml +36 -36
- package/src/ConfirmOrder/components/AddressManage/index.wxss +98 -98
- package/src/ConfirmOrder/components/AddressSelect/index.js +160 -160
- package/src/ConfirmOrder/components/AddressSelect/index.json +4 -4
- package/src/ConfirmOrder/components/AddressSelect/index.less +79 -79
- package/src/ConfirmOrder/components/AddressSelect/index.wxml +33 -33
- package/src/ConfirmOrder/components/AddressSelect/index.wxss +67 -67
- package/src/ConfirmOrder/components/ChoosePicker/index.js +115 -115
- package/src/ConfirmOrder/components/ChoosePicker/index.json +5 -5
- package/src/ConfirmOrder/components/ChoosePicker/index.less +20 -20
- package/src/ConfirmOrder/components/ChoosePicker/index.wxml +9 -9
- package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -18
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +1819 -1819
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +27 -27
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.scss +44 -44
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +225 -225
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +37 -37
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.js +129 -129
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.json +8 -8
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.scss +58 -58
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxml +25 -25
- package/src/ConfirmOrder/components/GoodsInfo/components/CopGoodsList/index.wxss +1 -1
- package/src/ConfirmOrder/components/GoodsInfo/index.wxss +1 -1
- package/src/ConfirmOrder/components/IntegralSelect/index.wxss +218 -218
- package/src/ConfirmOrder/components/Invoice/index.wxss +93 -93
- package/src/ConfirmOrder/components/LeaveWord/index.wxss +1 -1
- package/src/ConfirmOrder/components/OrderBubble/index.wxss +1 -1
- package/src/ConfirmOrder/components/PayBar/index.wxss +1 -1
- package/src/ConfirmOrder/components/PayDetail/index.wxss +78 -78
- package/src/ConfirmOrder/components/SvipSelect/SvipSelect.wxss +266 -266
- package/src/CopGoodsCard/index.wxss +1 -1
- package/src/CouponList/components/CouponItem/index.wxss +1 -1
- package/src/CouponList/components/couponIcon/index.wxss +1 -1
- package/src/CouponList/stuCouponPopup/index.wxss +1 -1
- package/src/CouponReceivePopup/index.wxss +1 -1
- package/src/CustomPopup/index.wxss +37 -37
- package/src/GoodsBubble/index.wxss +1 -1
- package/src/GoodsItem/index.js +180 -21
- package/src/GoodsItem/index.scss +822 -627
- package/src/GoodsItem/index.wxml +145 -108
- package/src/GoodsItem/index.wxs +40 -40
- package/src/GoodsItem/index.wxss +1 -1
- package/src/GoodsRecommend/index.wxss +537 -537
- package/src/LevelMemberBar/index.wxss +1 -1
- package/src/LiveGoodsList/Header/index.js +65 -65
- package/src/LiveGoodsList/Header/index.json +6 -6
- package/src/LiveGoodsList/Header/index.less +45 -45
- package/src/LiveGoodsList/Header/index.scss +157 -137
- package/src/LiveGoodsList/Header/index.wxml +39 -36
- package/src/LiveGoodsList/Header/index.wxss +1 -1
- package/src/LiveGoodsList/README.md +9 -9
- package/src/LiveGoodsList/index.js +29 -10
- package/src/LiveGoodsList/index.less +53 -53
- package/src/LiveGoodsList/index.scss +173 -173
- package/src/LiveGoodsList/index.wxml +9 -1
- package/src/LiveGoodsList/index.wxss +1 -1
- package/src/MatchList/index.js +445 -441
- package/src/MatchList/index.json +5 -5
- package/src/MatchList/index.scss +175 -175
- package/src/MatchList/index.wxml +98 -97
- package/src/MatchList/index.wxss +1 -1
- package/src/MemberIntegralMultiplierBar/index.js +196 -196
- package/src/MemberIntegralMultiplierBar/index.json +7 -7
- package/src/MemberIntegralMultiplierBar/index.scss +67 -67
- package/src/MemberIntegralMultiplierBar/index.wxml +8 -8
- package/src/MemberIntegralMultiplierBar/index.wxss +1 -1
- package/src/MemberIntegralMultiplierPopup/index.js +54 -54
- package/src/MemberIntegralMultiplierPopup/index.json +7 -7
- package/src/MemberIntegralMultiplierPopup/index.scss +86 -86
- package/src/MemberIntegralMultiplierPopup/index.wxml +48 -48
- package/src/MemberIntegralMultiplierPopup/index.wxss +1 -1
- package/src/MemberIntegralMultiplierPopup/popup-service.js +18 -18
- package/src/MsgBubble/index.js +312 -0
- package/src/MsgBubble/index.json +7 -0
- package/src/MsgBubble/index.scss +81 -0
- package/src/MsgBubble/index.wxml +19 -0
- package/src/MsgBubble/index.wxss +1 -0
- package/src/PayModule/button/index.wxss +58 -58
- package/src/ShoppingCartBubble/index.js +336 -156
- package/src/ShoppingCartBubble/index.scss +94 -55
- package/src/ShoppingCartBubble/index.wxml +14 -11
- package/src/ShoppingCartBubble/index.wxss +1 -1
- package/src/Task/TaskBubble/index.json +3 -3
- package/src/Task/TaskBubble/index.scss +125 -125
- package/src/Task/TaskBubble/index.wxml +22 -22
- package/src/Task/TaskBubble/index.wxss +289 -289
- package/src/Task/TaskIcon/index.js +29 -29
- package/src/Task/TaskIcon/index.json +4 -4
- package/src/Task/TaskIcon/index.scss +70 -70
- package/src/Task/TaskIcon/index.wxml +5 -5
- package/src/Task/TaskIcon/index.wxss +130 -130
- package/src/Task/TaskPopup/component/RewardList/index.js +52 -52
- package/src/Task/TaskPopup/component/RewardList/index.json +6 -6
- package/src/Task/TaskPopup/component/RewardList/index.scss +39 -39
- package/src/Task/TaskPopup/component/RewardList/index.wxml +23 -23
- package/src/Task/TaskPopup/component/RewardList/index.wxss +18 -18
- package/src/Task/TaskPopup/component/TaskItem/index.js +578 -578
- package/src/Task/TaskPopup/component/TaskItem/index.json +10 -10
- package/src/Task/TaskPopup/component/TaskItem/index.scss +245 -245
- package/src/Task/TaskPopup/component/TaskItem/index.wxml +145 -145
- package/src/Task/TaskPopup/component/TaskItem/index.wxs +7 -7
- package/src/Task/TaskPopup/component/TaskItem/index.wxss +1 -1
- package/src/Task/TaskPopup/component/TaskList/index.js +298 -298
- package/src/Task/TaskPopup/component/TaskList/index.json +7 -7
- package/src/Task/TaskPopup/component/TaskList/index.scss +66 -66
- package/src/Task/TaskPopup/component/TaskList/index.wxml +41 -41
- package/src/Task/TaskPopup/component/TaskList/index.wxss +118 -118
- package/src/Task/TaskPopup/component/TaskType/index.js +129 -129
- package/src/Task/TaskPopup/component/TaskType/index.json +13 -13
- package/src/Task/TaskPopup/component/TaskType/index.scss +90 -90
- package/src/Task/TaskPopup/component/TaskType/index.wxml +69 -69
- package/src/Task/TaskPopup/component/TaskType/index.wxss +1 -1
- package/src/Task/TaskPopup/index.js +174 -174
- package/src/Task/TaskPopup/index.json +7 -7
- package/src/Task/TaskPopup/index.scss +166 -166
- package/src/Task/TaskPopup/index.wxml +87 -87
- package/src/Task/TaskPopup/index.wxss +490 -490
- package/src/Task/TaskQuizPopup/components/quizContent/index.js +131 -131
- package/src/Task/TaskQuizPopup/components/quizContent/index.json +5 -5
- package/src/Task/TaskQuizPopup/components/quizContent/index.scss +191 -191
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxml +64 -64
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxs +78 -78
- package/src/Task/TaskQuizPopup/components/quizContent/index.wxss +521 -521
- package/src/Task/TaskQuizPopup/components/quizRichText/index.js +40 -40
- package/src/Task/TaskQuizPopup/components/quizRichText/index.json +5 -5
- package/src/Task/TaskQuizPopup/components/quizRichText/index.scss +6 -6
- package/src/Task/TaskQuizPopup/components/quizRichText/index.wxml +1 -1
- package/src/Task/TaskQuizPopup/components/quizRichText/index.wxss +298 -298
- package/src/Task/TaskQuizPopup/components/wxParse/base.wxml +50 -50
- package/src/Task/TaskQuizPopup/components/wxParse/html2json.js +623 -623
- package/src/Task/TaskQuizPopup/components/wxParse/htmlparser.js +183 -183
- package/src/Task/TaskQuizPopup/components/wxParse/iframeParse.js +216 -216
- package/src/Task/TaskQuizPopup/components/wxParse/loop.wxml +3563 -3563
- package/src/Task/TaskQuizPopup/components/wxParse/showdown.js +2364 -2364
- package/src/Task/TaskQuizPopup/components/wxParse/wxDiscode.js +209 -209
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.js +269 -269
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxml +1276 -1276
- package/src/Task/TaskQuizPopup/components/wxParse/wxParse.wxss +316 -316
- package/src/Task/TaskQuizPopup/index.js +246 -246
- package/src/Task/TaskQuizPopup/index.json +7 -7
- package/src/Task/TaskQuizPopup/index.scss +158 -158
- package/src/Task/TaskQuizPopup/index.wxml +99 -99
- package/src/Task/TaskQuizPopup/index.wxss +478 -478
- package/src/Task/common/task.js +55 -55
- package/src/Task/taskQuizRemindPopup/index.js +74 -74
- package/src/Task/taskQuizRemindPopup/index.json +5 -5
- package/src/Task/taskQuizRemindPopup/index.scss +107 -107
- package/src/Task/taskQuizRemindPopup/index.wxml +27 -27
- package/src/Task/taskQuizRemindPopup/index.wxss +286 -286
- package/src/Task/taskReceivePopup/coupon/index.js +68 -68
- package/src/Task/taskReceivePopup/coupon/index.json +6 -6
- package/src/Task/taskReceivePopup/coupon/index.scss +123 -123
- package/src/Task/taskReceivePopup/coupon/index.wxml +81 -81
- package/src/Task/taskReceivePopup/coupon/index.wxs +48 -48
- package/src/Task/taskReceivePopup/coupon/index.wxss +274 -274
- package/src/Task/taskReceivePopup/customPrizes/index.js +44 -44
- package/src/Task/taskReceivePopup/customPrizes/index.json +6 -6
- package/src/Task/taskReceivePopup/customPrizes/index.scss +106 -106
- package/src/Task/taskReceivePopup/customPrizes/index.wxml +38 -38
- package/src/Task/taskReceivePopup/customPrizes/index.wxs +48 -48
- package/src/Task/taskReceivePopup/customPrizes/index.wxss +220 -220
- package/src/Task/taskReceivePopup/index.js +47 -47
- package/src/Task/taskReceivePopup/index.json +13 -13
- package/src/Task/taskReceivePopup/index.wxml +32 -32
- package/src/Task/taskReceivePopup/index.wxss +1 -1
- package/src/Task/taskReceivePopup/integral/index.js +106 -106
- package/src/Task/taskReceivePopup/integral/index.json +7 -7
- package/src/Task/taskReceivePopup/integral/index.scss +60 -60
- package/src/Task/taskReceivePopup/integral/index.wxml +23 -23
- package/src/Task/taskReceivePopup/integral/index.wxss +94 -94
- package/src/TeacherGoodsList/index.js +997 -983
- package/src/TeacherGoodsList/index.json +10 -10
- package/src/TeacherGoodsList/index.scss +178 -178
- package/src/TeacherGoodsList/index.wxml +146 -144
- package/src/TeacherGoodsList/index.wxss +1 -1
- package/src/common/api/liveGoodsList.js +181 -167
- package/src/common/assets/copy.wxss +3 -3
- package/src/common/assets/images/coupon/emptypage.svg +49 -49
- package/src/common/assets/images/coupon/failed.svg +5 -5
- package/src/common/assets/images/coupon/up.svg +21 -21
- package/src/common/assets/images/pay/loading.svg +3 -3
- package/src/common/assets/images/recommend.svg +6 -6
- package/src/common/assets/images/refresh.svg +10 -10
- package/src/common/assets/images/refresh_white.svg +3 -3
- package/src/common/assets/images/wechat.svg +4 -4
- package/src/common/css/index.less +2 -2
- package/src/common/css/theme.less +19 -19
- package/src/common/css/theme.wxss +16 -16
- package/src/common/libs/dataUp/sensorUp.js +91 -91
- package/src/common/libs/playerHttp.js +58 -58
- package/src/common/libs/playerRequestUrl.js +39 -39
- package/src/common/transaction/parameter/channel-info.js +36 -36
- package/src/common/transaction/parameter/delivery-info.js +26 -26
- package/src/common/transaction/parameter/misc-parameter.js +21 -21
- package/src/common/utils/currency.js +52 -52
- package/src/common/utils/getInfoCollectionData.js +59 -59
- package/src/common/utils/image-cdn-slim/constant.js +8 -8
- package/src/common/utils/image-cdn-slim/index.js +7 -7
- package/src/common/utils/image-cdn-slim/utils.js +156 -156
- package/src/common/utils/index.js +86 -86
- package/src/common/utils/liveGoods.js +217 -217
- package/src/common/utils/specialList.js +5 -5
- package/src/common/utils/tool.js +72 -72
- package/src/common/wxs/filter.wxs +29 -29
- package/src/coupon/components/CouponItem/index.wxss +821 -821
- package/src/coupon/components/CouponSelect/index.wxss +1132 -1132
- package/src/coupon/index.wxss +216 -216
- package/src/index.js +23 -23
- package/src/lib.ts +5 -5
- package/src/project.config.json +68 -68
- package/src/utils.js +5 -5
- package/tsconfig.json +25 -25
|
@@ -1,218 +1,218 @@
|
|
|
1
|
-
const priceInt = (val) => {
|
|
2
|
-
val = Number(val);
|
|
3
|
-
return ((val / 100).toFixed(2) + '').split('.')[0];
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
const priceFlow = (val) => {
|
|
7
|
-
val = Number(val);
|
|
8
|
-
return ((val / 100).toFixed(2) + '').split('.')[1] || '00';
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const MARKET_ACTIVITY_MAP = {
|
|
12
|
-
3: '限时折扣',
|
|
13
|
-
4: '好友助力',
|
|
14
|
-
5: '裂变海报',
|
|
15
|
-
6: '拼团',
|
|
16
|
-
7: '涨粉神器',
|
|
17
|
-
8: '秒杀'
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export const stuFormatItem = (e) => {
|
|
21
|
-
e.resourceTypeName = e.resource_type_name; // 商品类型
|
|
22
|
-
e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock; // 商品库存,活动中且有活动库存就用活动库存
|
|
23
|
-
// 处理未到活动时间的限时折扣
|
|
24
|
-
if (e.activity_type === 3) {
|
|
25
|
-
let nowTime = new Date().getTime();
|
|
26
|
-
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
|
|
27
|
-
let isStart = !!(nowTime - startTime > 0);
|
|
28
|
-
if (!isStart) {
|
|
29
|
-
e.is_activity = 0; // 未到活动时间的限时折扣 不参与比价
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
// 预热前和活动结束后的秒杀不参与比价
|
|
33
|
-
if (e.activity_type === 8) {
|
|
34
|
-
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
|
|
35
|
-
let preHeatTime = startTime - e.sec_kill_preheat_time * 1000; // 预热开始时间
|
|
36
|
-
let nowTime = new Date().getTime();
|
|
37
|
-
let isStartPreHeat = !!(nowTime - preHeatTime > 0); // 预热时间到了
|
|
38
|
-
let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime();
|
|
39
|
-
let isEndSecKill = !!(nowTime - endTime > 0); // 秒杀活动结束了
|
|
40
|
-
if (!isStartPreHeat || isEndSecKill) {
|
|
41
|
-
e.is_activity = 0; // 预热前和活动结束后的秒杀 不参与比价
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
//展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
|
|
45
|
-
let arr = [];
|
|
46
|
-
arr.push({
|
|
47
|
-
active: "",
|
|
48
|
-
price: e.price,
|
|
49
|
-
weight: e.price + 0.0003
|
|
50
|
-
});
|
|
51
|
-
// 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
|
|
52
|
-
let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1;
|
|
53
|
-
e.is_activity &&
|
|
54
|
-
(notExistNowStock || typeof e.now_stock === 'number' || e.activity_type === 6) &&
|
|
55
|
-
arr.push({
|
|
56
|
-
//参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
|
|
57
|
-
active: MARKET_ACTIVITY_MAP[e.activity_type],
|
|
58
|
-
price: e.activity_price,
|
|
59
|
-
weight: e.activity_price + 0.0001
|
|
60
|
-
});
|
|
61
|
-
// 是超级会员 && 是等级会员, 比价取出两者的最小值 否者各取各的价格,这里的权重都是 加上 0.0002
|
|
62
|
-
if (e.is_membership_goods && e.membership_price && e.svip_price) {
|
|
63
|
-
const svip_price = e.svip_price;
|
|
64
|
-
const membership_price = e.membership_price;
|
|
65
|
-
// 等级会员和超级会员的最低价进入数组
|
|
66
|
-
if (svip_price <= membership_price ){
|
|
67
|
-
arr.push({
|
|
68
|
-
active: '超级会员',
|
|
69
|
-
price: svip_price,
|
|
70
|
-
weight: svip_price + 0.0002
|
|
71
|
-
})
|
|
72
|
-
} else {
|
|
73
|
-
arr.push({
|
|
74
|
-
active: '等级会员',
|
|
75
|
-
price: membership_price,
|
|
76
|
-
weight: membership_price + 0.0002
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
} else if (e.is_membership_goods && e.membership_price) {
|
|
80
|
-
// 等级会员的最低价
|
|
81
|
-
arr.push({
|
|
82
|
-
active: '等级会员',
|
|
83
|
-
price: e.membership_price,
|
|
84
|
-
weight: e.membership_price + 0.0002
|
|
85
|
-
});
|
|
86
|
-
} else if (e.svip_price) {
|
|
87
|
-
// 兼容原有的超级会员逻辑
|
|
88
|
-
arr.push({
|
|
89
|
-
//判断超级会员价
|
|
90
|
-
active: '超级会员',
|
|
91
|
-
price: e.svip_price,
|
|
92
|
-
weight: e.svip_price + 0.0002
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
// 为了兼容活动价必须优先于原价,所以重新做一下这个gb排序
|
|
96
|
-
arr.sort((a, b) => {
|
|
97
|
-
if (a.active === "" && b.active !== "") {
|
|
98
|
-
return 1; // 有活动的排前面
|
|
99
|
-
} else if (b.active === "") {
|
|
100
|
-
return -1; // 没活动的排在前面
|
|
101
|
-
} else {
|
|
102
|
-
return 0; // 保持原顺序
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
e.stillShowOriginalPrice = false; // 可能出现划线价小于展示价的情况,这个字段设置为true,前端强制展示原价,保持原始逻辑
|
|
106
|
-
e.currentActive = arr[0].active; //当前适用得营销模式;有可能是原价,超级会员,等级会员(有自己的等级名),营销活动
|
|
107
|
-
e.isMembershipActive = e.currentActive === "等级会员"; // 是否比价后,会员价更优惠
|
|
108
|
-
e.svipAllFree = e.resource_rights_type === 1; // 0-无权益 1-免费权益 2-折扣权益
|
|
109
|
-
if (e.isMembershipActive && e.membership_price >= e.price) {
|
|
110
|
-
console.log("划线价大于展示的会员价,保持原来的显示逻辑, 会员价是:",e.membership_price, "原价是:", e.price);
|
|
111
|
-
e.stillShowOriginalPrice = true;
|
|
112
|
-
}
|
|
113
|
-
if (e.stillShowOriginalPrice) {
|
|
114
|
-
e.priceShow = e.price // 强制显示原来价格逻辑
|
|
115
|
-
} else {
|
|
116
|
-
e.priceShow = arr[0].price; //展示的购买价格,arr 数组取出排序后的最小值
|
|
117
|
-
}
|
|
118
|
-
e.priceShowInt = (e.stillShowOriginalPrice || e.svipAllFree) ? priceInt(e.price) : priceInt(e.priceShow); // 展示价格的整数部分
|
|
119
|
-
e.priceShowFlow = (e.stillShowOriginalPrice || e.svipAllFree) ? priceFlow(e.price) : priceFlow(e.priceShow); // 展示是价格的小数部分
|
|
120
|
-
e.preferentialShowInt = priceInt(e.preferential_price); // 展示券后价的整数部分
|
|
121
|
-
e.preferentialShowFlow = priceFlow(e.preferential_price); // 展示券后价的小数部分
|
|
122
|
-
//展示划线价处理;有营销活动、超级会员、等级会员会员价,划线价是原价;只有原价和原划线价,划线价是原划线价;
|
|
123
|
-
if (e.currentActive !== "" && !e.stillShowOriginalPrice) {
|
|
124
|
-
e.priceLine = e.price;
|
|
125
|
-
} else {
|
|
126
|
-
e.priceLine = e.line_price || 0; //未设置原划线价的时候不展示划线价
|
|
127
|
-
}
|
|
128
|
-
e.priceLineShowInt = priceInt(e.priceLine); // 展示划线价的整数部分
|
|
129
|
-
e.priceLineShowFlow = priceFlow(e.priceLine); // 展示划线的小数部分
|
|
130
|
-
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock; // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
131
|
-
e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock; // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
|
|
132
|
-
// 等级会员相关字段归一到一个对象中
|
|
133
|
-
//! 调试使用,切勿放开注释
|
|
134
|
-
// e.currentActive = "等级会员"
|
|
135
|
-
// e.rank_name = "白银会员"
|
|
136
|
-
//! 调试使用,切勿放开注释
|
|
137
|
-
e.membershipInfo = {
|
|
138
|
-
is_membership: e.isMembershipActive, // 是否当前激活会员价展示
|
|
139
|
-
price: e.priceShow,
|
|
140
|
-
priceLine: e.priceLine,
|
|
141
|
-
membership_price: e.membership_price,
|
|
142
|
-
membership_price_min: e.membership_price,
|
|
143
|
-
membership_price_max: e.membership_price,
|
|
144
|
-
rank_name: e.rank_name,
|
|
145
|
-
rank_id: e.rank_id,
|
|
146
|
-
rank_flag: e.rank_flag,
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export const teaFormatItem = (e) => {
|
|
151
|
-
e.resourceTypeName = e.resource_type_name // 商品类型
|
|
152
|
-
e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock // 商品库存,活动中且有活动库存就用活动库存
|
|
153
|
-
// 处理未到活动时间的限时折扣
|
|
154
|
-
if (e.activity_type === 3) {
|
|
155
|
-
let nowTime = new Date().getTime()
|
|
156
|
-
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
|
|
157
|
-
let isStart = !!(nowTime - startTime > 0)
|
|
158
|
-
if (!isStart) {
|
|
159
|
-
e.is_activity = 0 // 未到活动时间的限时折扣 不参与比价
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
// 预热前和活动结束后的秒杀不参与比价
|
|
163
|
-
if (e.activity_type === 8) {
|
|
164
|
-
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
|
|
165
|
-
let preHeatTime = startTime - e.sec_kill_preheat_time * 1000 // 预热开始时间
|
|
166
|
-
let nowTime = new Date().getTime()
|
|
167
|
-
let isStartPreHeat = !!(nowTime - preHeatTime > 0) // 预热时间到了
|
|
168
|
-
let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime()
|
|
169
|
-
let isEndSecKill = !!(nowTime - endTime > 0) // 秒杀活动结束了
|
|
170
|
-
if (!isStartPreHeat || isEndSecKill) {
|
|
171
|
-
e.is_activity = 0 // 预热前和活动结束后的秒杀 不参与比价
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
//展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
|
|
175
|
-
let arr = []
|
|
176
|
-
arr.push({
|
|
177
|
-
active: "",
|
|
178
|
-
price: e.price,
|
|
179
|
-
weight: e.price + 0.0003,
|
|
180
|
-
})
|
|
181
|
-
// 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
|
|
182
|
-
let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1
|
|
183
|
-
e.is_activity &&
|
|
184
|
-
(notExistNowStock ||
|
|
185
|
-
typeof e.now_stock === "number" ||
|
|
186
|
-
e.activity_type === 6) &&
|
|
187
|
-
arr.push({
|
|
188
|
-
//参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
|
|
189
|
-
active: MARKET_ACTIVITY_MAP[e.activity_type],
|
|
190
|
-
price: e.activity_price,
|
|
191
|
-
weight: e.activity_price + 0.0001,
|
|
192
|
-
})
|
|
193
|
-
e.svip_price &&
|
|
194
|
-
arr.push({
|
|
195
|
-
//判断超级会员价
|
|
196
|
-
active: "超级会员",
|
|
197
|
-
price: e.svip_price,
|
|
198
|
-
weight: e.svip_price + 0.0002,
|
|
199
|
-
})
|
|
200
|
-
arr.sort((a, b) => a.weight - b.weight)
|
|
201
|
-
let svipAllFree = e.resource_rights_type === 1
|
|
202
|
-
e.priceShow = arr[0].price //展示的购买价格
|
|
203
|
-
e.priceShowInt = svipAllFree ? priceInt(e.price) : priceInt(e.priceShow) // 展示价格的整数部分
|
|
204
|
-
e.priceShowFlow = svipAllFree ? priceFlow(e.price) : priceFlow(e.priceShow) // 展示是价格的小数部分
|
|
205
|
-
e.preferentialShowInt = priceInt(e.preferential_price) // 展示券后价的整数部分
|
|
206
|
-
e.preferentialShowFlow = priceFlow(e.preferential_price) // 展示券后价的小数部分
|
|
207
|
-
e.currentActive = arr[0].active //当前适用得营销模式;有可能是原价,超级会员,营销活动
|
|
208
|
-
//展示划线价处理;有营销活动、超级会员,划线价是原价;只有原价和原划线价,划线价是原划线价;
|
|
209
|
-
if (e.currentActive !== "") {
|
|
210
|
-
e.priceLine = e.price
|
|
211
|
-
} else {
|
|
212
|
-
e.priceLine = e.line_price || 0 //未设置原划线价的时候不展示划线价
|
|
213
|
-
}
|
|
214
|
-
e.priceLineShowInt = priceInt(e.priceLine) // 展示划线价的整数部分
|
|
215
|
-
e.priceLineShowFlow = priceFlow(e.priceLine) // 展示划线的小数部分
|
|
216
|
-
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
217
|
-
e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
|
|
1
|
+
const priceInt = (val) => {
|
|
2
|
+
val = Number(val);
|
|
3
|
+
return ((val / 100).toFixed(2) + '').split('.')[0];
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
const priceFlow = (val) => {
|
|
7
|
+
val = Number(val);
|
|
8
|
+
return ((val / 100).toFixed(2) + '').split('.')[1] || '00';
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const MARKET_ACTIVITY_MAP = {
|
|
12
|
+
3: '限时折扣',
|
|
13
|
+
4: '好友助力',
|
|
14
|
+
5: '裂变海报',
|
|
15
|
+
6: '拼团',
|
|
16
|
+
7: '涨粉神器',
|
|
17
|
+
8: '秒杀'
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const stuFormatItem = (e) => {
|
|
21
|
+
e.resourceTypeName = e.resource_type_name; // 商品类型
|
|
22
|
+
e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock; // 商品库存,活动中且有活动库存就用活动库存
|
|
23
|
+
// 处理未到活动时间的限时折扣
|
|
24
|
+
if (e.activity_type === 3) {
|
|
25
|
+
let nowTime = new Date().getTime();
|
|
26
|
+
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
|
|
27
|
+
let isStart = !!(nowTime - startTime > 0);
|
|
28
|
+
if (!isStart) {
|
|
29
|
+
e.is_activity = 0; // 未到活动时间的限时折扣 不参与比价
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
// 预热前和活动结束后的秒杀不参与比价
|
|
33
|
+
if (e.activity_type === 8) {
|
|
34
|
+
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime();
|
|
35
|
+
let preHeatTime = startTime - e.sec_kill_preheat_time * 1000; // 预热开始时间
|
|
36
|
+
let nowTime = new Date().getTime();
|
|
37
|
+
let isStartPreHeat = !!(nowTime - preHeatTime > 0); // 预热时间到了
|
|
38
|
+
let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime();
|
|
39
|
+
let isEndSecKill = !!(nowTime - endTime > 0); // 秒杀活动结束了
|
|
40
|
+
if (!isStartPreHeat || isEndSecKill) {
|
|
41
|
+
e.is_activity = 0; // 预热前和活动结束后的秒杀 不参与比价
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
//展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
|
|
45
|
+
let arr = [];
|
|
46
|
+
arr.push({
|
|
47
|
+
active: "",
|
|
48
|
+
price: e.price,
|
|
49
|
+
weight: e.price + 0.0003
|
|
50
|
+
});
|
|
51
|
+
// 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
|
|
52
|
+
let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1;
|
|
53
|
+
e.is_activity &&
|
|
54
|
+
(notExistNowStock || typeof e.now_stock === 'number' || e.activity_type === 6) &&
|
|
55
|
+
arr.push({
|
|
56
|
+
//参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
|
|
57
|
+
active: MARKET_ACTIVITY_MAP[e.activity_type],
|
|
58
|
+
price: e.activity_price,
|
|
59
|
+
weight: e.activity_price + 0.0001
|
|
60
|
+
});
|
|
61
|
+
// 是超级会员 && 是等级会员, 比价取出两者的最小值 否者各取各的价格,这里的权重都是 加上 0.0002
|
|
62
|
+
if (e.is_membership_goods && e.membership_price && e.svip_price) {
|
|
63
|
+
const svip_price = e.svip_price;
|
|
64
|
+
const membership_price = e.membership_price;
|
|
65
|
+
// 等级会员和超级会员的最低价进入数组
|
|
66
|
+
if (svip_price <= membership_price ){
|
|
67
|
+
arr.push({
|
|
68
|
+
active: '超级会员',
|
|
69
|
+
price: svip_price,
|
|
70
|
+
weight: svip_price + 0.0002
|
|
71
|
+
})
|
|
72
|
+
} else {
|
|
73
|
+
arr.push({
|
|
74
|
+
active: '等级会员',
|
|
75
|
+
price: membership_price,
|
|
76
|
+
weight: membership_price + 0.0002
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
} else if (e.is_membership_goods && e.membership_price) {
|
|
80
|
+
// 等级会员的最低价
|
|
81
|
+
arr.push({
|
|
82
|
+
active: '等级会员',
|
|
83
|
+
price: e.membership_price,
|
|
84
|
+
weight: e.membership_price + 0.0002
|
|
85
|
+
});
|
|
86
|
+
} else if (e.svip_price) {
|
|
87
|
+
// 兼容原有的超级会员逻辑
|
|
88
|
+
arr.push({
|
|
89
|
+
//判断超级会员价
|
|
90
|
+
active: '超级会员',
|
|
91
|
+
price: e.svip_price,
|
|
92
|
+
weight: e.svip_price + 0.0002
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
// 为了兼容活动价必须优先于原价,所以重新做一下这个gb排序
|
|
96
|
+
arr.sort((a, b) => {
|
|
97
|
+
if (a.active === "" && b.active !== "") {
|
|
98
|
+
return 1; // 有活动的排前面
|
|
99
|
+
} else if (b.active === "") {
|
|
100
|
+
return -1; // 没活动的排在前面
|
|
101
|
+
} else {
|
|
102
|
+
return 0; // 保持原顺序
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
e.stillShowOriginalPrice = false; // 可能出现划线价小于展示价的情况,这个字段设置为true,前端强制展示原价,保持原始逻辑
|
|
106
|
+
e.currentActive = arr[0].active; //当前适用得营销模式;有可能是原价,超级会员,等级会员(有自己的等级名),营销活动
|
|
107
|
+
e.isMembershipActive = e.currentActive === "等级会员"; // 是否比价后,会员价更优惠
|
|
108
|
+
e.svipAllFree = e.resource_rights_type === 1; // 0-无权益 1-免费权益 2-折扣权益
|
|
109
|
+
if (e.isMembershipActive && e.membership_price >= e.price) {
|
|
110
|
+
console.log("划线价大于展示的会员价,保持原来的显示逻辑, 会员价是:",e.membership_price, "原价是:", e.price);
|
|
111
|
+
e.stillShowOriginalPrice = true;
|
|
112
|
+
}
|
|
113
|
+
if (e.stillShowOriginalPrice) {
|
|
114
|
+
e.priceShow = e.price // 强制显示原来价格逻辑
|
|
115
|
+
} else {
|
|
116
|
+
e.priceShow = arr[0].price; //展示的购买价格,arr 数组取出排序后的最小值
|
|
117
|
+
}
|
|
118
|
+
e.priceShowInt = (e.stillShowOriginalPrice || e.svipAllFree) ? priceInt(e.price) : priceInt(e.priceShow); // 展示价格的整数部分
|
|
119
|
+
e.priceShowFlow = (e.stillShowOriginalPrice || e.svipAllFree) ? priceFlow(e.price) : priceFlow(e.priceShow); // 展示是价格的小数部分
|
|
120
|
+
e.preferentialShowInt = priceInt(e.preferential_price); // 展示券后价的整数部分
|
|
121
|
+
e.preferentialShowFlow = priceFlow(e.preferential_price); // 展示券后价的小数部分
|
|
122
|
+
//展示划线价处理;有营销活动、超级会员、等级会员会员价,划线价是原价;只有原价和原划线价,划线价是原划线价;
|
|
123
|
+
if (e.currentActive !== "" && !e.stillShowOriginalPrice) {
|
|
124
|
+
e.priceLine = e.price;
|
|
125
|
+
} else {
|
|
126
|
+
e.priceLine = e.line_price || 0; //未设置原划线价的时候不展示划线价
|
|
127
|
+
}
|
|
128
|
+
e.priceLineShowInt = priceInt(e.priceLine); // 展示划线价的整数部分
|
|
129
|
+
e.priceLineShowFlow = priceFlow(e.priceLine); // 展示划线的小数部分
|
|
130
|
+
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock; // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
131
|
+
e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock; // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
|
|
132
|
+
// 等级会员相关字段归一到一个对象中
|
|
133
|
+
//! 调试使用,切勿放开注释
|
|
134
|
+
// e.currentActive = "等级会员"
|
|
135
|
+
// e.rank_name = "白银会员"
|
|
136
|
+
//! 调试使用,切勿放开注释
|
|
137
|
+
e.membershipInfo = {
|
|
138
|
+
is_membership: e.isMembershipActive, // 是否当前激活会员价展示
|
|
139
|
+
price: e.priceShow,
|
|
140
|
+
priceLine: e.priceLine,
|
|
141
|
+
membership_price: e.membership_price,
|
|
142
|
+
membership_price_min: e.membership_price,
|
|
143
|
+
membership_price_max: e.membership_price,
|
|
144
|
+
rank_name: e.rank_name,
|
|
145
|
+
rank_id: e.rank_id,
|
|
146
|
+
rank_flag: e.rank_flag,
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export const teaFormatItem = (e) => {
|
|
151
|
+
e.resourceTypeName = e.resource_type_name // 商品类型
|
|
152
|
+
e.leftStock = e.is_activity && e.now_stock ? e.now_stock : e.stock // 商品库存,活动中且有活动库存就用活动库存
|
|
153
|
+
// 处理未到活动时间的限时折扣
|
|
154
|
+
if (e.activity_type === 3) {
|
|
155
|
+
let nowTime = new Date().getTime()
|
|
156
|
+
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
|
|
157
|
+
let isStart = !!(nowTime - startTime > 0)
|
|
158
|
+
if (!isStart) {
|
|
159
|
+
e.is_activity = 0 // 未到活动时间的限时折扣 不参与比价
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
// 预热前和活动结束后的秒杀不参与比价
|
|
163
|
+
if (e.activity_type === 8) {
|
|
164
|
+
let startTime = new Date(e.start_at.replace(/-/g, "/")).getTime()
|
|
165
|
+
let preHeatTime = startTime - e.sec_kill_preheat_time * 1000 // 预热开始时间
|
|
166
|
+
let nowTime = new Date().getTime()
|
|
167
|
+
let isStartPreHeat = !!(nowTime - preHeatTime > 0) // 预热时间到了
|
|
168
|
+
let endTime = new Date(e.end_at.replace(/-/g, "/")).getTime()
|
|
169
|
+
let isEndSecKill = !!(nowTime - endTime > 0) // 秒杀活动结束了
|
|
170
|
+
if (!isStartPreHeat || isEndSecKill) {
|
|
171
|
+
e.is_activity = 0 // 预热前和活动结束后的秒杀 不参与比价
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
//展示购买价处理;取原价、营销活动价、超级会员价到一个数组从小到大排序,最低为购买价。防止价格一样,所以加了权重比较
|
|
175
|
+
let arr = []
|
|
176
|
+
arr.push({
|
|
177
|
+
active: "",
|
|
178
|
+
price: e.price,
|
|
179
|
+
weight: e.price + 0.0003,
|
|
180
|
+
})
|
|
181
|
+
// 活动管理、实物商品、有价优惠券、线下课和课时包不能设置活动库存,其他可以设置活动库存得需要判断是否还剩余活动库存;拼团也不能设置活动库存。
|
|
182
|
+
let notExistNowStock = [9, 21, 41, 29, 42].indexOf(e.resource_type) > -1
|
|
183
|
+
e.is_activity &&
|
|
184
|
+
(notExistNowStock ||
|
|
185
|
+
typeof e.now_stock === "number" ||
|
|
186
|
+
e.activity_type === 6) &&
|
|
187
|
+
arr.push({
|
|
188
|
+
//参与营销活动且有活动库存的时候加入比较 now_stock -""空字符串的时候代表已经买完 -0代表不限量
|
|
189
|
+
active: MARKET_ACTIVITY_MAP[e.activity_type],
|
|
190
|
+
price: e.activity_price,
|
|
191
|
+
weight: e.activity_price + 0.0001,
|
|
192
|
+
})
|
|
193
|
+
e.svip_price &&
|
|
194
|
+
arr.push({
|
|
195
|
+
//判断超级会员价
|
|
196
|
+
active: "超级会员",
|
|
197
|
+
price: e.svip_price,
|
|
198
|
+
weight: e.svip_price + 0.0002,
|
|
199
|
+
})
|
|
200
|
+
arr.sort((a, b) => a.weight - b.weight)
|
|
201
|
+
let svipAllFree = e.resource_rights_type === 1
|
|
202
|
+
e.priceShow = arr[0].price //展示的购买价格
|
|
203
|
+
e.priceShowInt = svipAllFree ? priceInt(e.price) : priceInt(e.priceShow) // 展示价格的整数部分
|
|
204
|
+
e.priceShowFlow = svipAllFree ? priceFlow(e.price) : priceFlow(e.priceShow) // 展示是价格的小数部分
|
|
205
|
+
e.preferentialShowInt = priceInt(e.preferential_price) // 展示券后价的整数部分
|
|
206
|
+
e.preferentialShowFlow = priceFlow(e.preferential_price) // 展示券后价的小数部分
|
|
207
|
+
e.currentActive = arr[0].active //当前适用得营销模式;有可能是原价,超级会员,营销活动
|
|
208
|
+
//展示划线价处理;有营销活动、超级会员,划线价是原价;只有原价和原划线价,划线价是原划线价;
|
|
209
|
+
if (e.currentActive !== "") {
|
|
210
|
+
e.priceLine = e.price
|
|
211
|
+
} else {
|
|
212
|
+
e.priceLine = e.line_price || 0 //未设置原划线价的时候不展示划线价
|
|
213
|
+
}
|
|
214
|
+
e.priceLineShowInt = priceInt(e.priceLine) // 展示划线价的整数部分
|
|
215
|
+
e.priceLineShowFlow = priceFlow(e.priceLine) // 展示划线的小数部分
|
|
216
|
+
e.entityShowStock = (e.resource_type === 21 || e.resource_type === 41 || e.resource_type === 68) && e.show_stock // 实物商品库存依赖 B端店铺设置(show_stock):详情页展示不展示剩余件数
|
|
217
|
+
e.hasStock = [29, 35].indexOf(e.resource_type) > -1 || e.entityShowStock || e.now_stock // 班课、线下课、实物商品、体验课、有活动库存,满足其一即展示库存
|
|
218
218
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// 提货人白名单
|
|
2
|
-
export const PICKER_WHITE_LIST = [
|
|
3
|
-
'appnnbg9jva2395',
|
|
4
|
-
'appwooazuii9244',
|
|
5
|
-
'appmctgbviq8129',
|
|
1
|
+
// 提货人白名单
|
|
2
|
+
export const PICKER_WHITE_LIST = [
|
|
3
|
+
'appnnbg9jva2395',
|
|
4
|
+
'appwooazuii9244',
|
|
5
|
+
'appmctgbviq8129',
|
|
6
6
|
]
|
|
@@ -1,72 +1,72 @@
|
|
|
1
|
-
/*函数节流*/
|
|
2
|
-
function throttle(fn, interval) {
|
|
3
|
-
var enterTime = 0 //触发的时间
|
|
4
|
-
var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
|
|
5
|
-
return function () {
|
|
6
|
-
var context = this
|
|
7
|
-
var backTime = new Date() //第一次函数return即触发的时间
|
|
8
|
-
if (backTime - enterTime > gapTime) {
|
|
9
|
-
fn.call(context, arguments)
|
|
10
|
-
enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
/*函数防抖*/
|
|
16
|
-
function debounce(func, wait, immediate) {
|
|
17
|
-
let timer
|
|
18
|
-
|
|
19
|
-
return function () {
|
|
20
|
-
//this指向debounce
|
|
21
|
-
let context = this
|
|
22
|
-
//即参数,func,wait
|
|
23
|
-
let args = arguments
|
|
24
|
-
|
|
25
|
-
//如果timer不为null, 清除定时器
|
|
26
|
-
if (timer) clearTimeout(timer)
|
|
27
|
-
|
|
28
|
-
//如果是立即执行
|
|
29
|
-
if (immediate) {
|
|
30
|
-
//定义callNow = !timer
|
|
31
|
-
var callNow = !timer
|
|
32
|
-
//定义wait时间后把timer变为null
|
|
33
|
-
//即在wait时间之后事件才会有效
|
|
34
|
-
timer = setTimeout(() => {
|
|
35
|
-
timer = null
|
|
36
|
-
}, wait)
|
|
37
|
-
//如果callNow为true,即原本timer为null
|
|
38
|
-
//那么执行func函数
|
|
39
|
-
if (callNow) func.apply(context, args)
|
|
40
|
-
} else {
|
|
41
|
-
//如果是不立即执行
|
|
42
|
-
//那就是每次重新定时
|
|
43
|
-
timer = setTimeout(function () {
|
|
44
|
-
func.apply(context, args)
|
|
45
|
-
}, wait)
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* 高并发请求打散
|
|
52
|
-
* @param delayHandler 目标并发量获取器
|
|
53
|
-
* @param options 配置项 { defaultDelay: 1000, useScatter: false }
|
|
54
|
-
* @param cb 回调函数
|
|
55
|
-
* @returns {number} 定时器
|
|
56
|
-
*/
|
|
57
|
-
function scatterRequest(delayHandler, options, cb) {
|
|
58
|
-
let timer
|
|
59
|
-
const { defaultDelay = 1000, useScatter = false } = options
|
|
60
|
-
let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
|
|
61
|
-
console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
|
|
62
|
-
timer = setTimeout(() => {
|
|
63
|
-
cb()
|
|
64
|
-
}, delay)
|
|
65
|
-
return timer
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
module.exports = {
|
|
69
|
-
throttle,
|
|
70
|
-
debounce,
|
|
71
|
-
scatterRequest,
|
|
72
|
-
}
|
|
1
|
+
/*函数节流*/
|
|
2
|
+
function throttle(fn, interval) {
|
|
3
|
+
var enterTime = 0 //触发的时间
|
|
4
|
+
var gapTime = interval || 300 //间隔时间,如果interval不传,则默认300ms
|
|
5
|
+
return function () {
|
|
6
|
+
var context = this
|
|
7
|
+
var backTime = new Date() //第一次函数return即触发的时间
|
|
8
|
+
if (backTime - enterTime > gapTime) {
|
|
9
|
+
fn.call(context, arguments)
|
|
10
|
+
enterTime = backTime //赋值给第一次触发的时间,这样就保存了第二次触发的时间
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*函数防抖*/
|
|
16
|
+
function debounce(func, wait, immediate) {
|
|
17
|
+
let timer
|
|
18
|
+
|
|
19
|
+
return function () {
|
|
20
|
+
//this指向debounce
|
|
21
|
+
let context = this
|
|
22
|
+
//即参数,func,wait
|
|
23
|
+
let args = arguments
|
|
24
|
+
|
|
25
|
+
//如果timer不为null, 清除定时器
|
|
26
|
+
if (timer) clearTimeout(timer)
|
|
27
|
+
|
|
28
|
+
//如果是立即执行
|
|
29
|
+
if (immediate) {
|
|
30
|
+
//定义callNow = !timer
|
|
31
|
+
var callNow = !timer
|
|
32
|
+
//定义wait时间后把timer变为null
|
|
33
|
+
//即在wait时间之后事件才会有效
|
|
34
|
+
timer = setTimeout(() => {
|
|
35
|
+
timer = null
|
|
36
|
+
}, wait)
|
|
37
|
+
//如果callNow为true,即原本timer为null
|
|
38
|
+
//那么执行func函数
|
|
39
|
+
if (callNow) func.apply(context, args)
|
|
40
|
+
} else {
|
|
41
|
+
//如果是不立即执行
|
|
42
|
+
//那就是每次重新定时
|
|
43
|
+
timer = setTimeout(function () {
|
|
44
|
+
func.apply(context, args)
|
|
45
|
+
}, wait)
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 高并发请求打散
|
|
52
|
+
* @param delayHandler 目标并发量获取器
|
|
53
|
+
* @param options 配置项 { defaultDelay: 1000, useScatter: false }
|
|
54
|
+
* @param cb 回调函数
|
|
55
|
+
* @returns {number} 定时器
|
|
56
|
+
*/
|
|
57
|
+
function scatterRequest(delayHandler, options, cb) {
|
|
58
|
+
let timer
|
|
59
|
+
const { defaultDelay = 1000, useScatter = false } = options
|
|
60
|
+
let delay = useScatter ? delayHandler() : defaultDelay // 默认并发量为1000
|
|
61
|
+
console.log(useScatter ? `[scatterRequest] High concurrency delay request: ${delay}` : '[scatterRequest] Disabled')
|
|
62
|
+
timer = setTimeout(() => {
|
|
63
|
+
cb()
|
|
64
|
+
}, delay)
|
|
65
|
+
return timer
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
module.exports = {
|
|
69
|
+
throttle,
|
|
70
|
+
debounce,
|
|
71
|
+
scatterRequest,
|
|
72
|
+
}
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* @Descripttion:
|
|
3
|
-
* @version:
|
|
4
|
-
* @Author: conlinchen
|
|
5
|
-
* @Date: 2021-10-29 19:34:24
|
|
6
|
-
* @LastEditors: conlinchen
|
|
7
|
-
* @LastEditTime: 2021-11-01 18:25:37
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
//价格过滤器
|
|
11
|
-
var filter = {
|
|
12
|
-
priceInt: function(val){
|
|
13
|
-
val = Number(val)
|
|
14
|
-
return ((val / 100 ).toFixed(2) + '').split('.')[0]
|
|
15
|
-
},
|
|
16
|
-
priceFlow: function(val){
|
|
17
|
-
val = Number(val)
|
|
18
|
-
return ((val / 100 ).toFixed(2) + '').split('.')[1] || '00'
|
|
19
|
-
},
|
|
20
|
-
toFixed2: function(val){
|
|
21
|
-
val = Number(val)
|
|
22
|
-
return (val / 100 ).toFixed(2)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
module.exports = {
|
|
27
|
-
priceInt: filter.priceInt,
|
|
28
|
-
priceFlow: filter.priceFlow,
|
|
29
|
-
toFixed2: filter.toFixed2
|
|
1
|
+
/*
|
|
2
|
+
* @Descripttion:
|
|
3
|
+
* @version:
|
|
4
|
+
* @Author: conlinchen
|
|
5
|
+
* @Date: 2021-10-29 19:34:24
|
|
6
|
+
* @LastEditors: conlinchen
|
|
7
|
+
* @LastEditTime: 2021-11-01 18:25:37
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
//价格过滤器
|
|
11
|
+
var filter = {
|
|
12
|
+
priceInt: function(val){
|
|
13
|
+
val = Number(val)
|
|
14
|
+
return ((val / 100 ).toFixed(2) + '').split('.')[0]
|
|
15
|
+
},
|
|
16
|
+
priceFlow: function(val){
|
|
17
|
+
val = Number(val)
|
|
18
|
+
return ((val / 100 ).toFixed(2) + '').split('.')[1] || '00'
|
|
19
|
+
},
|
|
20
|
+
toFixed2: function(val){
|
|
21
|
+
val = Number(val)
|
|
22
|
+
return (val / 100 ).toFixed(2)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
module.exports = {
|
|
27
|
+
priceInt: filter.priceInt,
|
|
28
|
+
priceFlow: filter.priceFlow,
|
|
29
|
+
toFixed2: filter.toFixed2
|
|
30
30
|
}
|