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,156 +1,336 @@
|
|
|
1
|
-
const TYPE_MAP = {
|
|
2
|
-
BUYING: 1,
|
|
3
|
-
BUY_SUCCESS: 2,
|
|
4
|
-
}
|
|
5
|
-
const INTERVAL_TIME = 3000 // 单次动画间隔时间
|
|
6
|
-
const DURATION_TIME = 2500 // 动画总时间
|
|
7
|
-
const DEFAULT_ANIMATION_TIME = 400 // 动画时间
|
|
8
|
-
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
this.setData({
|
|
85
|
-
|
|
86
|
-
})
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
this.
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
})
|
|
1
|
+
const TYPE_MAP = {
|
|
2
|
+
BUYING: 1,
|
|
3
|
+
BUY_SUCCESS: 2,
|
|
4
|
+
}
|
|
5
|
+
const INTERVAL_TIME = 3000 // 单次动画间隔时间
|
|
6
|
+
const DURATION_TIME = 2500 // 动画总时间
|
|
7
|
+
const DEFAULT_ANIMATION_TIME = 400 // 动画时间
|
|
8
|
+
|
|
9
|
+
import { getGoodsState } from '../common/api/liveGoodsList';
|
|
10
|
+
import { getSensitiveState, rpxToVmin } from '../common/utils/index'
|
|
11
|
+
const { utils } = require("live-mp-tools");
|
|
12
|
+
const computedBehavior = require('miniprogram-computed').behavior
|
|
13
|
+
|
|
14
|
+
Component({
|
|
15
|
+
behaviors: [computedBehavior],
|
|
16
|
+
properties: {
|
|
17
|
+
aliveInfo: {
|
|
18
|
+
type: Object,
|
|
19
|
+
value: {}
|
|
20
|
+
},
|
|
21
|
+
hotSalesConf: {
|
|
22
|
+
type: Object,
|
|
23
|
+
value: {}
|
|
24
|
+
},
|
|
25
|
+
// 是否展示列表弹幕气泡
|
|
26
|
+
showShoppingCart: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
value: false
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
data: {
|
|
32
|
+
goodsAnimationData: {},
|
|
33
|
+
bubbleList: [], // 气泡展示数组
|
|
34
|
+
bubbleObj: {
|
|
35
|
+
'1': { goods_list: [] }, // 正在购买商品数组
|
|
36
|
+
'2': { goods_list: [] }, // 抢购了商品数组
|
|
37
|
+
}, // im数据获取气泡数据(含拼接操作
|
|
38
|
+
bubbleInterval: null,
|
|
39
|
+
animationTimer: null,
|
|
40
|
+
isInit: false,
|
|
41
|
+
bubbleItem: {
|
|
42
|
+
bubble_desc: '', // 描述 正在购买/抢购了
|
|
43
|
+
bubble_sensitive_state: '', // 敏感状态
|
|
44
|
+
resource_id: "",
|
|
45
|
+
spu_id: "",
|
|
46
|
+
target_url: "",
|
|
47
|
+
order_weight: 0,
|
|
48
|
+
goods_name: "",
|
|
49
|
+
img_url: "",
|
|
50
|
+
nums: 0,
|
|
51
|
+
goods_type: 1,
|
|
52
|
+
user_id: "",
|
|
53
|
+
wx_nickname: ""
|
|
54
|
+
},
|
|
55
|
+
imageRadius: rpxToVmin(12),
|
|
56
|
+
},
|
|
57
|
+
computed: {
|
|
58
|
+
filterSrc(data) {
|
|
59
|
+
return utils.replaceCDN(data.bubbleItem.img_url, '?imageMogr2/thumbnail/400x400>/ignore-error/1')
|
|
60
|
+
},
|
|
61
|
+
params_url(data) {
|
|
62
|
+
// 后端规则拼接参数规则:$ => ?、@ => &
|
|
63
|
+
// 商品带货链接需拼接多一个aliveId
|
|
64
|
+
const aliveId = data.aliveInfo.alive_id
|
|
65
|
+
if (!data.bubbleItem.target_url) return
|
|
66
|
+
const url = data?.bubbleItem?.target_url.replaceAll('&', "@")
|
|
67
|
+
const link = url.replaceAll('?', "$")
|
|
68
|
+
const pages = getCurrentPages();
|
|
69
|
+
const currentPage = pages[pages.length - 1];
|
|
70
|
+
const page_path = `/${currentPage.route}`;
|
|
71
|
+
// 判断后端返回链接是否已拼接(如:?type= )参数,兼容 aliveId 拼接符
|
|
72
|
+
const symbol = url.indexOf('?') !== -1 ? '@' : '$'
|
|
73
|
+
return `${page_path}?type=1&link=${link}${symbol}aliveId=${aliveId}&title=${data.bubbleItem.goods_name}`
|
|
74
|
+
},
|
|
75
|
+
},
|
|
76
|
+
lifetimes: {
|
|
77
|
+
attached() {
|
|
78
|
+
// 初始化商品动画数据
|
|
79
|
+
const resetAnimation = wx.createAnimation({
|
|
80
|
+
duration: 0,
|
|
81
|
+
timingFunction: 'ease',
|
|
82
|
+
})
|
|
83
|
+
resetAnimation.translateY(0).opacity(0).step() // 恢复到初始位置
|
|
84
|
+
this.setData({
|
|
85
|
+
goodsAnimationData: resetAnimation.export(),
|
|
86
|
+
})
|
|
87
|
+
this.initEventListener()
|
|
88
|
+
},
|
|
89
|
+
detached() {
|
|
90
|
+
this.resetOptions()
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
methods: {
|
|
94
|
+
// 初始化事件监听
|
|
95
|
+
initEventListener() {
|
|
96
|
+
// 带货列表弹幕监听
|
|
97
|
+
getApp().globalData.$im.on('LIST_BUBBLE_BARRAGE', (res) => {
|
|
98
|
+
if (res.sync_barrage_im && this.data.hotSalesConf.hot_conf.barrage_switch) {
|
|
99
|
+
this.initHandler(res.sync_barrage_im)
|
|
100
|
+
}
|
|
101
|
+
})
|
|
102
|
+
},
|
|
103
|
+
// 点击跳转商品详情页
|
|
104
|
+
cardToDetails() {
|
|
105
|
+
const { app_id, alive_id, user_id, user_type } = this.data.aliveInfo;
|
|
106
|
+
// 讲师点击拦截
|
|
107
|
+
if (user_type === 1) return;
|
|
108
|
+
const { spu_id, resource_id, goods_name, img_url, target_url } = this.data.bubbleItem;
|
|
109
|
+
const toDetail = () => {
|
|
110
|
+
// 直播商品-去详情页,其他商品-拉起客服
|
|
111
|
+
let goodsParams = encodeURIComponent(`img_url=${img_url}&title=${goods_name}¶ms_url=${this.data.params_url}`)
|
|
112
|
+
console.log("urlurlurl", `/page/customerService/customerService?params=${params}`)
|
|
113
|
+
if (this.data.bubbleItem.resource_type === 4) {
|
|
114
|
+
wx && wx.redirectTo({
|
|
115
|
+
url: `/pages/webView/webView?appId=${app_id}&aliveId=${resource_id}&refreshAliveId=${alive_id}`,
|
|
116
|
+
})
|
|
117
|
+
} else {
|
|
118
|
+
// PC 复制链接
|
|
119
|
+
const { isPC, isDevtools } = getApp().globalData.system
|
|
120
|
+
if (isPC || isDevtools) {
|
|
121
|
+
wx.setClipboardData({
|
|
122
|
+
data: target_url,
|
|
123
|
+
success() {
|
|
124
|
+
wx.showToast({
|
|
125
|
+
title: '商品链接已复制,请用浏览器打开',
|
|
126
|
+
icon: 'none',
|
|
127
|
+
})
|
|
128
|
+
},
|
|
129
|
+
})
|
|
130
|
+
return
|
|
131
|
+
}
|
|
132
|
+
// 暂时屏蔽内嵌H5详情页,拉起客服
|
|
133
|
+
wx && wx.navigateTo({
|
|
134
|
+
url: '/page/customerService/customerService' + `?params=${goodsParams}`
|
|
135
|
+
})
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
const params = {
|
|
139
|
+
app_id,
|
|
140
|
+
alive_id,
|
|
141
|
+
user_id,
|
|
142
|
+
spu_id,
|
|
143
|
+
resource_id,
|
|
144
|
+
token: wx.getStorageSync('login_data').token,
|
|
145
|
+
}
|
|
146
|
+
getGoodsState(params).then((res) => {
|
|
147
|
+
console.log("getGoodsState", res);
|
|
148
|
+
const { data, code } = res.data;
|
|
149
|
+
if (code === 0) {
|
|
150
|
+
const { is_sell_out, row_state, auth_state, is_display_package, is_deleted } = data;
|
|
151
|
+
// 商品本身删除
|
|
152
|
+
if (is_deleted) {
|
|
153
|
+
wx.showToast({
|
|
154
|
+
title: '商品消失了',
|
|
155
|
+
icon: 'none'
|
|
156
|
+
});
|
|
157
|
+
return;
|
|
158
|
+
} else if (is_sell_out === 1) {
|
|
159
|
+
// 商品售罄
|
|
160
|
+
wx.showToast({
|
|
161
|
+
title: '商品已抢光',
|
|
162
|
+
icon: 'none'
|
|
163
|
+
});
|
|
164
|
+
return;
|
|
165
|
+
} else if (row_state === 0) {
|
|
166
|
+
// 商品移除
|
|
167
|
+
wx.showToast({
|
|
168
|
+
title: '商品已下架',
|
|
169
|
+
icon: 'none'
|
|
170
|
+
});
|
|
171
|
+
return;
|
|
172
|
+
} else if (auth_state === 1) {
|
|
173
|
+
// 已有权限
|
|
174
|
+
wx.showModal({
|
|
175
|
+
content: '您已拥有该商品,即将前往课程详情页查看',
|
|
176
|
+
showCancel: true,
|
|
177
|
+
confirmText: '确认',
|
|
178
|
+
cancelText: '取消',
|
|
179
|
+
success: (res) => {
|
|
180
|
+
if (res.confirm) {
|
|
181
|
+
toDetail()
|
|
182
|
+
} else if (res.cancel) {
|
|
183
|
+
console.log('用户点击取消')
|
|
184
|
+
}
|
|
185
|
+
},
|
|
186
|
+
})
|
|
187
|
+
return;
|
|
188
|
+
} else if (is_display_package === 0) {
|
|
189
|
+
// 商品隐藏
|
|
190
|
+
wx.showToast({
|
|
191
|
+
title: '商品消失了',
|
|
192
|
+
icon: 'none'
|
|
193
|
+
});
|
|
194
|
+
return;
|
|
195
|
+
} else {
|
|
196
|
+
toDetail()
|
|
197
|
+
}
|
|
198
|
+
} else {
|
|
199
|
+
wx.showToast({
|
|
200
|
+
title: '活动太火爆了,请稍后再试',
|
|
201
|
+
icon: 'none'
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
})
|
|
205
|
+
.catch(() => {
|
|
206
|
+
wx.showToast({
|
|
207
|
+
title: '活动太火爆了,请稍后再试',
|
|
208
|
+
icon: 'none'
|
|
209
|
+
});
|
|
210
|
+
})
|
|
211
|
+
},
|
|
212
|
+
// 处理气泡队列数组
|
|
213
|
+
initHandler(data) {
|
|
214
|
+
// 没有数据不处理
|
|
215
|
+
if (!(data?.['1']?.goods_list?.length > 0 || data?.['2']?.goods_list?.length > 0)) return;
|
|
216
|
+
// 根据batch_tag决定是追加还是替换,1为追加,0为替换
|
|
217
|
+
const batchTag = data.batch_tag || 0;
|
|
218
|
+
const imData = JSON.parse(JSON.stringify(data));
|
|
219
|
+
if (batchTag === 0) {
|
|
220
|
+
// 替换模式:清空现有队列,重新准备
|
|
221
|
+
this.data.bubbleObj = imData;
|
|
222
|
+
} else {
|
|
223
|
+
// 追加模式:将新消息加入队列, 合并2个数组
|
|
224
|
+
this.data.bubbleObj['2'].goods_list = [...this.data.bubbleObj['2']?.goods_list || [], ...imData['2']?.goods_list || []];
|
|
225
|
+
this.data.bubbleObj['1'].goods_list = [...this.data.bubbleObj['1']?.goods_list || [], ...imData['1']?.goods_list || []];
|
|
226
|
+
}
|
|
227
|
+
this.data.bubbleList = [...this.data.bubbleObj['2']?.goods_list || [], ...this.data.bubbleObj['1']?.goods_list || []];
|
|
228
|
+
// 启动气泡轮播
|
|
229
|
+
const needStart = !this.data.bubbleInterval && !this.data.animationTimer
|
|
230
|
+
if (this.data.bubbleList.length > 0 && needStart) {
|
|
231
|
+
this.startBubbleRotation()
|
|
232
|
+
}
|
|
233
|
+
// 通知外面清空数据
|
|
234
|
+
this.triggerEvent('clearData', {})
|
|
235
|
+
},
|
|
236
|
+
/**
|
|
237
|
+
* 启动一个定时器定期更新气泡
|
|
238
|
+
*
|
|
239
|
+
* @method startBubbleRotation
|
|
240
|
+
* @memberof ShoppingCartBubble
|
|
241
|
+
* @instance
|
|
242
|
+
*/
|
|
243
|
+
startBubbleRotation() {
|
|
244
|
+
// 获取第一个气泡数据
|
|
245
|
+
const getCurrentBubbleItem = () => {
|
|
246
|
+
const currentBubble = this.data.bubbleList[0]
|
|
247
|
+
this.data.bubbleList?.shift()
|
|
248
|
+
return currentBubble
|
|
249
|
+
}
|
|
250
|
+
this.displayBubble(getCurrentBubbleItem())
|
|
251
|
+
// 轮询出现气泡弹幕
|
|
252
|
+
this.data.bubbleInterval = setInterval(() => {
|
|
253
|
+
this.displayBubble(getCurrentBubbleItem())
|
|
254
|
+
}, INTERVAL_TIME)
|
|
255
|
+
},
|
|
256
|
+
displayBubble(bubble) {
|
|
257
|
+
// 如果已经没有数据了,重置定时器
|
|
258
|
+
if (!bubble) {
|
|
259
|
+
this.resetOptions()
|
|
260
|
+
return
|
|
261
|
+
}
|
|
262
|
+
const bubbleItem = {
|
|
263
|
+
bubble_desc: bubble.goods_type === TYPE_MAP.BUYING ? '正在购买' : '抢购了', // 描述 正在购买/抢购了
|
|
264
|
+
bubble_sensitive_state: this.handleSensitiveState(bubble.user_id), // 敏感状态
|
|
265
|
+
...bubble
|
|
266
|
+
}
|
|
267
|
+
this.setData({bubbleItem})
|
|
268
|
+
this.handleInitAnimation()
|
|
269
|
+
},
|
|
270
|
+
handleInitAnimation() {
|
|
271
|
+
const animationFunc = () => {
|
|
272
|
+
const animation = wx.createAnimation({
|
|
273
|
+
duration: DEFAULT_ANIMATION_TIME,
|
|
274
|
+
timingFunction: 'ease',
|
|
275
|
+
})
|
|
276
|
+
animation.translateY(-30).opacity(1).step();
|
|
277
|
+
this.setData({
|
|
278
|
+
goodsAnimationData: animation.export(),
|
|
279
|
+
}, () => {
|
|
280
|
+
let animationTimer = setTimeout(() => {
|
|
281
|
+
const slideOutAnimation = wx.createAnimation({
|
|
282
|
+
duration: DEFAULT_ANIMATION_TIME,
|
|
283
|
+
timingFunction: 'ease',
|
|
284
|
+
})
|
|
285
|
+
slideOutAnimation.translateY(-35).opacity(0).step();
|
|
286
|
+
this.setData({
|
|
287
|
+
goodsAnimationData: slideOutAnimation.export(),
|
|
288
|
+
});
|
|
289
|
+
|
|
290
|
+
setTimeout(() => {
|
|
291
|
+
const resetAnimation = wx.createAnimation({
|
|
292
|
+
duration: 0,
|
|
293
|
+
timingFunction: 'ease',
|
|
294
|
+
})
|
|
295
|
+
resetAnimation.translateY(0).opacity(0).step() // 恢复到初始位置
|
|
296
|
+
this.setData({
|
|
297
|
+
goodsAnimationData: resetAnimation.export(),
|
|
298
|
+
})
|
|
299
|
+
}, DEFAULT_ANIMATION_TIME + 20)
|
|
300
|
+
|
|
301
|
+
}, DURATION_TIME);
|
|
302
|
+
|
|
303
|
+
this.setData({
|
|
304
|
+
animationTimer
|
|
305
|
+
})
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
if (!this.data.isInit) {
|
|
309
|
+
this.setData({
|
|
310
|
+
isInit: true,
|
|
311
|
+
}, () => {
|
|
312
|
+
animationFunc();
|
|
313
|
+
})
|
|
314
|
+
} else {
|
|
315
|
+
animationFunc();
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
resetOptions() {
|
|
319
|
+
this.setData({
|
|
320
|
+
isInit: false,
|
|
321
|
+
})
|
|
322
|
+
clearInterval(this.data.bubbleInterval)
|
|
323
|
+
clearTimeout(this.data.animationTimer)
|
|
324
|
+
this.data.bubbleInterval = null
|
|
325
|
+
this.data.animationTimer = null
|
|
326
|
+
console.error('jer======err 动画定时器已经清楚', this.data);
|
|
327
|
+
},
|
|
328
|
+
// 昵称脱敏处理
|
|
329
|
+
handleSensitiveState(id) {
|
|
330
|
+
const userType = this.properties.aliveInfo.user_type
|
|
331
|
+
const isMeOrTeacher = this.properties.aliveInfo.user_id === id || userType
|
|
332
|
+
const isNeedPrivacy = !isMeOrTeacher && getSensitiveState(userType, this.properties.aliveInfo.alive_conf)
|
|
333
|
+
return isNeedPrivacy ? getSensitiveState(userType, this.properties.aliveInfo.alive_conf) : 0
|
|
334
|
+
},
|
|
335
|
+
},
|
|
336
|
+
})
|
|
@@ -1,55 +1,94 @@
|
|
|
1
|
-
$deviceWidth: 750;
|
|
2
|
-
@function vmin($rpx) {
|
|
3
|
-
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
@mixin shopping-cart-bubble {
|
|
7
|
-
position: absolute;
|
|
8
|
-
left: vmin(
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
1
|
+
$deviceWidth: 750;
|
|
2
|
+
@function vmin($rpx) {
|
|
3
|
+
@return #{$rpx * 100 / $deviceWidth}vmin;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
@mixin shopping-cart-bubble {
|
|
7
|
+
position: absolute;
|
|
8
|
+
left: vmin(26);
|
|
9
|
+
top: vmin(-26);
|
|
10
|
+
width: auto;
|
|
11
|
+
opacity: 1;
|
|
12
|
+
transform: translateY(vmin(-56));
|
|
13
|
+
height: vmin(64);
|
|
14
|
+
color: #fff;
|
|
15
|
+
border-radius: vmin(16);
|
|
16
|
+
font-size: vmin(26);
|
|
17
|
+
white-space: nowrap;
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
.shopping-cart-bubble-info {
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
height: 100%;
|
|
25
|
+
padding: vmin(4) vmin(4);
|
|
26
|
+
background: rgba(0, 0, 0, 0.4);
|
|
27
|
+
border-radius: vmin(16);
|
|
28
|
+
line-height: vmin(34);
|
|
29
|
+
image{
|
|
30
|
+
width: vmin(56);
|
|
31
|
+
height: vmin(56);
|
|
32
|
+
}
|
|
33
|
+
view {
|
|
34
|
+
max-width: vmin(200);
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
text-overflow: ellipsis;
|
|
37
|
+
white-space: nowrap;
|
|
38
|
+
}
|
|
39
|
+
.nickname {
|
|
40
|
+
margin-left: vmin(8);
|
|
41
|
+
}
|
|
42
|
+
.desc {
|
|
43
|
+
white-space: nowrap;
|
|
44
|
+
margin: 0 vmin(8);
|
|
45
|
+
}
|
|
46
|
+
.color-orange {
|
|
47
|
+
white-space: nowrap;
|
|
48
|
+
color: #FFD500;
|
|
49
|
+
}
|
|
50
|
+
.color-white {
|
|
51
|
+
color: #FFFFFF;
|
|
52
|
+
}
|
|
53
|
+
.arrow-img {
|
|
54
|
+
width: vmin(32);
|
|
55
|
+
height: vmin(32);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
.special-background {
|
|
59
|
+
background-color: transparent;
|
|
60
|
+
background: linear-gradient(270deg, #ff740266 0%, #ff410266 100%);
|
|
61
|
+
background-size: 100% auto;
|
|
62
|
+
background-repeat: no-repeat;
|
|
63
|
+
/* 不重复图片 */
|
|
64
|
+
background-position: left center;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.shopping-cart-bubble {
|
|
69
|
+
@include shopping-cart-bubble
|
|
70
|
+
}
|
|
71
|
+
// 竖屏pad
|
|
72
|
+
@media screen and (min-width: 768px) and (orientation: portrait) {
|
|
73
|
+
$deviceWidth: 1536 !global;
|
|
74
|
+
|
|
75
|
+
.shopping-cart-bubble {
|
|
76
|
+
@include shopping-cart-bubble
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
// PC 放大适配
|
|
80
|
+
@media screen and (min-height: 630px) and (orientation: landscape) {
|
|
81
|
+
$deviceWidth: 1260 !global;
|
|
82
|
+
|
|
83
|
+
.shopping-cart-bubble {
|
|
84
|
+
@include shopping-cart-bubble;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
// 横屏pad
|
|
88
|
+
@media screen and (min-height: 768px) and (orientation: landscape) {
|
|
89
|
+
$deviceWidth: 1536 !global;
|
|
90
|
+
|
|
91
|
+
.shopping-cart-bubble {
|
|
92
|
+
@include shopping-cart-bubble;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
-
<view
|
|
2
|
-
class="shopping-cart-bubble"
|
|
3
|
-
wx:if="{{ isInit }}"
|
|
4
|
-
animation="{{goodsAnimationData}}"
|
|
5
|
-
>
|
|
6
|
-
<view class="shopping-cart-bubble-info">
|
|
7
|
-
<
|
|
8
|
-
<
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
<view
|
|
2
|
+
class="shopping-cart-bubble"
|
|
3
|
+
wx:if="{{ isInit }}"
|
|
4
|
+
animation="{{goodsAnimationData}}"
|
|
5
|
+
>
|
|
6
|
+
<view class="shopping-cart-bubble-info {{bubbleItem.nums >= 10 && 'special-background'}}" catchtap="cardToDetails">
|
|
7
|
+
<imagePoster borderRadius="{{imageRadius}}" src="{{filterSrc}}" />
|
|
8
|
+
<view wx:if="{{bubbleItem.nums > 1}}" class="nickname">{{bubbleItem.nums}}人</view>
|
|
9
|
+
<nickname wx:else class="nickname" nickname="{{ bubbleItem.wx_nickname }}" sensitiveState="{{ bubbleItem.bubble_sensitive_state }}" />
|
|
10
|
+
<text class="desc">{{ bubbleItem.bubble_desc }}</text>
|
|
11
|
+
<text class="color-orange {{bubbleItem.nums >= 10 && 'color-white'}}">{{ bubbleItem.order_weight }}号商品</text>
|
|
12
|
+
<image class="arrow-img" src="{{bubbleItem.nums >= 10 ? 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/mhnajpp00bbn.svg' : 'https://commonresource-1252524126.cdn.xiaoeknow.com/image/mhllre4x09c5.svg'}}" />
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|