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,441 +1,445 @@
|
|
|
1
|
-
import { getSearchGoodsList } from '../common/api/liveGoodsList'
|
|
2
|
-
import { stuFormatItem, teaFormatItem } from '../common/utils/liveGoods'
|
|
3
|
-
|
|
4
|
-
let activityCountdownTimer = null // 活动倒计时计时器
|
|
5
|
-
let hadActivity = false
|
|
6
|
-
let activityList = [] // 参与活动的商品
|
|
7
|
-
|
|
8
|
-
// 预热模块
|
|
9
|
-
let preheatTimer = null // 预热倒计时计时器
|
|
10
|
-
let hadPreheat = false
|
|
11
|
-
let preheatList = [] // 参与活动的商品
|
|
12
|
-
|
|
13
|
-
let hasActivity = false // 是否有参与活动的商品
|
|
14
|
-
let hasPreheat = false // 是否有参与预热的商品
|
|
15
|
-
|
|
16
|
-
Component({
|
|
17
|
-
properties: {
|
|
18
|
-
allSearchList: {
|
|
19
|
-
type: Array,
|
|
20
|
-
value: [],
|
|
21
|
-
},
|
|
22
|
-
aliveInfo: {
|
|
23
|
-
type: Object,
|
|
24
|
-
value: {},
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
type:
|
|
28
|
-
value:
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
type:
|
|
32
|
-
value:
|
|
33
|
-
},
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type:
|
|
46
|
-
value:
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
type:
|
|
50
|
-
value:
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
type:
|
|
54
|
-
value:
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
type:
|
|
58
|
-
value:
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
type:
|
|
62
|
-
value:
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
type:
|
|
66
|
-
value:
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
type:
|
|
70
|
-
value:
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
type:
|
|
79
|
-
value:
|
|
80
|
-
},
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
},
|
|
97
|
-
|
|
98
|
-
type: Boolean,
|
|
99
|
-
value: false,
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
type: Boolean,
|
|
103
|
-
value: false,
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
type: Boolean,
|
|
107
|
-
value: false,
|
|
108
|
-
},
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
const
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
//
|
|
186
|
-
if (
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
type
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
.
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
let
|
|
356
|
-
let
|
|
357
|
-
let
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
1
|
+
import { getSearchGoodsList } from '../common/api/liveGoodsList'
|
|
2
|
+
import { stuFormatItem, teaFormatItem } from '../common/utils/liveGoods'
|
|
3
|
+
|
|
4
|
+
let activityCountdownTimer = null // 活动倒计时计时器
|
|
5
|
+
let hadActivity = false
|
|
6
|
+
let activityList = [] // 参与活动的商品
|
|
7
|
+
|
|
8
|
+
// 预热模块
|
|
9
|
+
let preheatTimer = null // 预热倒计时计时器
|
|
10
|
+
let hadPreheat = false
|
|
11
|
+
let preheatList = [] // 参与活动的商品
|
|
12
|
+
|
|
13
|
+
let hasActivity = false // 是否有参与活动的商品
|
|
14
|
+
let hasPreheat = false // 是否有参与预热的商品
|
|
15
|
+
|
|
16
|
+
Component({
|
|
17
|
+
properties: {
|
|
18
|
+
allSearchList: {
|
|
19
|
+
type: Array,
|
|
20
|
+
value: [],
|
|
21
|
+
},
|
|
22
|
+
aliveInfo: {
|
|
23
|
+
type: Object,
|
|
24
|
+
value: {},
|
|
25
|
+
},
|
|
26
|
+
userInfo: {
|
|
27
|
+
type: Object,
|
|
28
|
+
value: {},
|
|
29
|
+
},
|
|
30
|
+
port: {
|
|
31
|
+
type: Number,
|
|
32
|
+
value: 1,
|
|
33
|
+
},
|
|
34
|
+
aliveInfo: {
|
|
35
|
+
type: Object,
|
|
36
|
+
value: {},
|
|
37
|
+
},
|
|
38
|
+
// 是否去客服内支付
|
|
39
|
+
allContactPay: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
value: false,
|
|
42
|
+
},
|
|
43
|
+
//店铺设置是否展示券后价
|
|
44
|
+
coupon_switch: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
value: false,
|
|
47
|
+
},
|
|
48
|
+
envName: {
|
|
49
|
+
type: String,
|
|
50
|
+
value: '',
|
|
51
|
+
},
|
|
52
|
+
sensorReportParams: {
|
|
53
|
+
type: Object,
|
|
54
|
+
value: {},
|
|
55
|
+
},
|
|
56
|
+
current_role: {
|
|
57
|
+
type: String,
|
|
58
|
+
value: 'student',
|
|
59
|
+
},
|
|
60
|
+
isFullScreen: {
|
|
61
|
+
type: Boolean,
|
|
62
|
+
value: false,
|
|
63
|
+
},
|
|
64
|
+
style: {
|
|
65
|
+
type: String,
|
|
66
|
+
value: '',
|
|
67
|
+
},
|
|
68
|
+
index: {
|
|
69
|
+
type: Number,
|
|
70
|
+
value: -1,
|
|
71
|
+
},
|
|
72
|
+
sendingGoodId: {
|
|
73
|
+
type: String,
|
|
74
|
+
value: '',
|
|
75
|
+
},
|
|
76
|
+
// 是否展示库存
|
|
77
|
+
stockSwitch: {
|
|
78
|
+
type: Number,
|
|
79
|
+
value: 0,
|
|
80
|
+
},
|
|
81
|
+
aliveSubId: {
|
|
82
|
+
type: String,
|
|
83
|
+
value: '',
|
|
84
|
+
},
|
|
85
|
+
// 热卖配置
|
|
86
|
+
hotSalesConf: {
|
|
87
|
+
type: Object,
|
|
88
|
+
value: {
|
|
89
|
+
is_show_stock: 0, // 显示库存开关
|
|
90
|
+
is_hot_sales_on: 0, // 商品热卖开关
|
|
91
|
+
hot_conf: {
|
|
92
|
+
sales: 30, // 热卖销量
|
|
93
|
+
stock: 10, // 热卖库存
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
isShowItem: {
|
|
98
|
+
type: Boolean,
|
|
99
|
+
value: false,
|
|
100
|
+
},
|
|
101
|
+
shopFreightSwitch: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
value: false,
|
|
104
|
+
},
|
|
105
|
+
isManage: {
|
|
106
|
+
type: Boolean,
|
|
107
|
+
value: false,
|
|
108
|
+
},
|
|
109
|
+
visibleSwitchStatusBtn: {
|
|
110
|
+
type: Boolean,
|
|
111
|
+
value: false,
|
|
112
|
+
},
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
data: {
|
|
116
|
+
searchValue: '',
|
|
117
|
+
searchState: true, // 默认进入就是搜索态
|
|
118
|
+
filteredGoodsList: [],
|
|
119
|
+
goodsInfo: [],
|
|
120
|
+
noResults: false,
|
|
121
|
+
refreshing: false,
|
|
122
|
+
loading: false,
|
|
123
|
+
finished: false,
|
|
124
|
+
page_size: 20,
|
|
125
|
+
page_index: 1,
|
|
126
|
+
resource_ids: [],
|
|
127
|
+
total: 0,
|
|
128
|
+
searchFocus: true,
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
observers: {
|
|
132
|
+
visible(val) {
|
|
133
|
+
if (val) {
|
|
134
|
+
this.setData({ searchFocus: true })
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
methods: {
|
|
140
|
+
back(e) {
|
|
141
|
+
this.setData({
|
|
142
|
+
searchState: false,
|
|
143
|
+
searchValue: '',
|
|
144
|
+
goodsInfo: [],
|
|
145
|
+
resource_ids: [],
|
|
146
|
+
page_index: 1,
|
|
147
|
+
finished: false,
|
|
148
|
+
loading: false,
|
|
149
|
+
total: 0,
|
|
150
|
+
})
|
|
151
|
+
this.triggerEvent('back', e.detail)
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
onSearchInput(e) {
|
|
155
|
+
const val = e.detail.value.trim()
|
|
156
|
+
this.setData({
|
|
157
|
+
searchValue: val,
|
|
158
|
+
goodsInfo: [],
|
|
159
|
+
searchState: true,
|
|
160
|
+
})
|
|
161
|
+
|
|
162
|
+
if (!val) {
|
|
163
|
+
this.setData({ filteredGoodsList: [], noResults: false })
|
|
164
|
+
return
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const keyword = val.toLowerCase()
|
|
168
|
+
const originalList = this.data.allSearchList.filter(
|
|
169
|
+
(item) => item.title?.toLowerCase().includes(keyword) || String(item.order_weight || '').includes(keyword),
|
|
170
|
+
)
|
|
171
|
+
|
|
172
|
+
const list = originalList.map((item) => ({
|
|
173
|
+
...item,
|
|
174
|
+
titleParts: this.highlight(item.title, this.data.searchValue),
|
|
175
|
+
weightParts: this.highlight(item.order_weight, this.data.searchValue),
|
|
176
|
+
}))
|
|
177
|
+
|
|
178
|
+
this.setData({
|
|
179
|
+
filteredGoodsList: list,
|
|
180
|
+
noResults: list.length === 0,
|
|
181
|
+
})
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
highlight(text, keyword) {
|
|
185
|
+
// 安全处理:把 null/undefined 转为空字符串,把其他类型转为字符串
|
|
186
|
+
if (text === null || text === undefined) text = ''
|
|
187
|
+
else if (typeof text !== 'string') text = String(text)
|
|
188
|
+
|
|
189
|
+
// 没有关键字时直接返回整个文本(非高亮)
|
|
190
|
+
if (!keyword) return [{ text, highlight: false }]
|
|
191
|
+
|
|
192
|
+
// 转义正则特殊字符并创建不区分大小写的正则
|
|
193
|
+
const safeKeyword = String(keyword).replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&')
|
|
194
|
+
const reg = new RegExp(safeKeyword, 'gi')
|
|
195
|
+
|
|
196
|
+
const result = []
|
|
197
|
+
let lastIndex = 0
|
|
198
|
+
let match
|
|
199
|
+
|
|
200
|
+
while ((match = reg.exec(text)) !== null) {
|
|
201
|
+
const start = match.index
|
|
202
|
+
|
|
203
|
+
if (start > lastIndex) {
|
|
204
|
+
result.push({
|
|
205
|
+
text: text.slice(lastIndex, start),
|
|
206
|
+
highlight: false,
|
|
207
|
+
})
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
result.push({
|
|
211
|
+
text: match[0],
|
|
212
|
+
highlight: true,
|
|
213
|
+
})
|
|
214
|
+
|
|
215
|
+
lastIndex = start + match[0].length
|
|
216
|
+
|
|
217
|
+
// 防止死循环(理论上不用,但保险)
|
|
218
|
+
if (reg.lastIndex === start) reg.lastIndex++
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
if (lastIndex < text.length) {
|
|
222
|
+
result.push({
|
|
223
|
+
text: text.slice(lastIndex),
|
|
224
|
+
highlight: false,
|
|
225
|
+
})
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// 若没有任何匹配,保证返回至少一段
|
|
229
|
+
if (result.length === 0) return [{ text, highlight: false }]
|
|
230
|
+
|
|
231
|
+
return result
|
|
232
|
+
},
|
|
233
|
+
|
|
234
|
+
searchOne(e) {
|
|
235
|
+
const item = e.currentTarget.dataset.item
|
|
236
|
+
this.setData({
|
|
237
|
+
searchState: false,
|
|
238
|
+
resource_ids: [{ type: Number(item.type), ids: [item.resource_id] }],
|
|
239
|
+
page_index: 1,
|
|
240
|
+
loading: true,
|
|
241
|
+
goodsInfo: [],
|
|
242
|
+
})
|
|
243
|
+
this.loadGoods(true)
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
searchGoods() {
|
|
247
|
+
if (!this.data.searchValue) {
|
|
248
|
+
wx.showToast({ title: '请输入关键词', icon: 'none' })
|
|
249
|
+
return
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
const map = {}
|
|
253
|
+
this.data.filteredGoodsList.forEach((item) => {
|
|
254
|
+
if (!map[item.type]) map[item.type] = []
|
|
255
|
+
map[item.type].push(item.resource_id)
|
|
256
|
+
})
|
|
257
|
+
|
|
258
|
+
const resource_ids = Object.keys(map).map((type) => ({
|
|
259
|
+
type: Number(type),
|
|
260
|
+
ids: map[type],
|
|
261
|
+
}))
|
|
262
|
+
|
|
263
|
+
if (resource_ids.length === 0) {
|
|
264
|
+
this.setData({ noResults: true })
|
|
265
|
+
return
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
this.setData({
|
|
269
|
+
searchState: false,
|
|
270
|
+
resource_ids,
|
|
271
|
+
page_index: 1,
|
|
272
|
+
loading: true,
|
|
273
|
+
goodsInfo: [],
|
|
274
|
+
})
|
|
275
|
+
this.loadGoods(true)
|
|
276
|
+
},
|
|
277
|
+
|
|
278
|
+
loadGoods(isRefresh = false) {
|
|
279
|
+
const { aliveInfo, resource_ids, page_size, page_index, port } = this.data
|
|
280
|
+
|
|
281
|
+
getSearchGoodsList({
|
|
282
|
+
alive_id: aliveInfo.alive_id,
|
|
283
|
+
page_size,
|
|
284
|
+
page: page_index,
|
|
285
|
+
port,
|
|
286
|
+
app_id: aliveInfo.app_id,
|
|
287
|
+
user_id: aliveInfo.user_id,
|
|
288
|
+
resource_ids,
|
|
289
|
+
})
|
|
290
|
+
.then((res) => {
|
|
291
|
+
if (res.data.code === 0) {
|
|
292
|
+
const list = res.data.data || []
|
|
293
|
+
const total = list[0]?.total || 0
|
|
294
|
+
|
|
295
|
+
this.formatData(list, isRefresh)
|
|
296
|
+
|
|
297
|
+
this.setData({
|
|
298
|
+
total,
|
|
299
|
+
finished: this.data.goodsInfo.length >= total || list.length < page_size,
|
|
300
|
+
page_index: page_index + 1,
|
|
301
|
+
loading: false,
|
|
302
|
+
refreshing: false,
|
|
303
|
+
noResults: this.data.goodsInfo.length === 0,
|
|
304
|
+
})
|
|
305
|
+
} else {
|
|
306
|
+
this.setData({ loading: false, refreshing: false, finished: true, noResults: true })
|
|
307
|
+
}
|
|
308
|
+
})
|
|
309
|
+
.catch(() => {
|
|
310
|
+
this.setData({ loading: false, refreshing: false, finished: true })
|
|
311
|
+
})
|
|
312
|
+
},
|
|
313
|
+
|
|
314
|
+
onRefresh() {
|
|
315
|
+
this.setData({ refreshing: true, page_index: 1 })
|
|
316
|
+
this.loadGoods(true)
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
onReachBottom() {
|
|
320
|
+
if (this.data.finished || this.data.loading) return
|
|
321
|
+
this.setData({ loading: true })
|
|
322
|
+
this.loadGoods()
|
|
323
|
+
},
|
|
324
|
+
|
|
325
|
+
formatData(data, isRefresh) {
|
|
326
|
+
let goodsInfo = this.data.goodsInfo
|
|
327
|
+
data.forEach((item) => {
|
|
328
|
+
this.data.current_role === 'student' ? stuFormatItem(item) : teaFormatItem(item)
|
|
329
|
+
if (!isRefresh) {
|
|
330
|
+
goodsInfo.push(item)
|
|
331
|
+
}
|
|
332
|
+
})
|
|
333
|
+
if (isRefresh) {
|
|
334
|
+
//下拉刷新的时候直接赋值
|
|
335
|
+
goodsInfo = JSON.parse(JSON.stringify(data))
|
|
336
|
+
}
|
|
337
|
+
this.setData({ goodsInfo }, () => {
|
|
338
|
+
this.getActivityStatus(this.data.goodsInfo)
|
|
339
|
+
})
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
getActivityStatus(data) {
|
|
343
|
+
data.forEach((item, index) => {
|
|
344
|
+
if (item.is_activity && item.end_at) {
|
|
345
|
+
hasActivity = true
|
|
346
|
+
item.activityCountdown = 0
|
|
347
|
+
activityList.push({
|
|
348
|
+
time: item.end_at,
|
|
349
|
+
index,
|
|
350
|
+
})
|
|
351
|
+
}
|
|
352
|
+
// this.data.isSeckill && this.data.preheating
|
|
353
|
+
if (item.activity_type === 8 && item.sec_kill_is_preheat === 1) {
|
|
354
|
+
//预热开始时间
|
|
355
|
+
let startTime = (item.start_at && new Date(item.start_at.replace(/-/g, '/'))) || new Date()
|
|
356
|
+
let times = startTime.getTime() - item.sec_kill_preheat_time * 1000
|
|
357
|
+
let preHeatTime = new Date(times) || new Date()
|
|
358
|
+
|
|
359
|
+
let startTime2 = (item.start_at && new Date(item.start_at.replace(/-/g, '/'))) || new Date()
|
|
360
|
+
let nowTime = new Date().getTime()
|
|
361
|
+
let preheating = nowTime > preHeatTime.getTime() && startTime2.getTime() > nowTime
|
|
362
|
+
|
|
363
|
+
if (preheating) {
|
|
364
|
+
hasPreheat = true
|
|
365
|
+
item.preheatTime = 0
|
|
366
|
+
preheatList.push({
|
|
367
|
+
time: item.start_at,
|
|
368
|
+
index,
|
|
369
|
+
})
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
})
|
|
373
|
+
if (hasActivity) this.startActivityCountdown(activityList) //活动倒计时
|
|
374
|
+
if (hasPreheat) this.startPreheatCountdown(preheatList) // 预热倒计时
|
|
375
|
+
},
|
|
376
|
+
|
|
377
|
+
// 商品总活动倒计时
|
|
378
|
+
startActivityCountdown(list) {
|
|
379
|
+
clearInterval(activityCountdownTimer)
|
|
380
|
+
activityCountdownTimer = setInterval(() => {
|
|
381
|
+
hadActivity = false
|
|
382
|
+
list.forEach((i) => {
|
|
383
|
+
let targetDate = new Date(i.time.replace(/-/g, '/')).getTime() - new Date().getTime()
|
|
384
|
+
if (targetDate <= 0) return
|
|
385
|
+
hadActivity = true
|
|
386
|
+
let temp = `goodsInfo[${i.index}].activityCountdown`
|
|
387
|
+
this.setData({
|
|
388
|
+
[temp]: targetDate,
|
|
389
|
+
})
|
|
390
|
+
})
|
|
391
|
+
if (!hadActivity) {
|
|
392
|
+
clearInterval(activityCountdownTimer)
|
|
393
|
+
activityCountdownTimer = null
|
|
394
|
+
}
|
|
395
|
+
}, 1000)
|
|
396
|
+
},
|
|
397
|
+
|
|
398
|
+
// 预热倒计时
|
|
399
|
+
startPreheatCountdown(list) {
|
|
400
|
+
clearInterval(preheatTimer)
|
|
401
|
+
preheatTimer = setInterval(() => {
|
|
402
|
+
hadPreheat = false
|
|
403
|
+
list.forEach((i) => {
|
|
404
|
+
let targetDate = new Date(i.time.replace(/-/g, '/')).getTime() - new Date().getTime()
|
|
405
|
+
if (targetDate <= 0) {
|
|
406
|
+
activityList.push({
|
|
407
|
+
time: this.data.goodsInfo[i.index].end_at,
|
|
408
|
+
index: i.index,
|
|
409
|
+
})
|
|
410
|
+
this.setData({
|
|
411
|
+
[`goodsInfo[${i.index}].preheatTime`]: 0,
|
|
412
|
+
})
|
|
413
|
+
return
|
|
414
|
+
}
|
|
415
|
+
hadPreheat = true
|
|
416
|
+
let temp = `goodsInfo[${i.index}].preheatTime`
|
|
417
|
+
this.setData({
|
|
418
|
+
[temp]: targetDate,
|
|
419
|
+
})
|
|
420
|
+
})
|
|
421
|
+
if (!hadPreheat) {
|
|
422
|
+
clearInterval(preheatTimer)
|
|
423
|
+
preheatTimer = null
|
|
424
|
+
}
|
|
425
|
+
}, 1000)
|
|
426
|
+
},
|
|
427
|
+
|
|
428
|
+
// 事件透传
|
|
429
|
+
showDialog(e) {
|
|
430
|
+
this.triggerEvent('showDialog', e.detail)
|
|
431
|
+
},
|
|
432
|
+
showConfirmOrder(e) {
|
|
433
|
+
this.triggerEvent('showConfirmOrder', e.detail)
|
|
434
|
+
},
|
|
435
|
+
showSku(e) {
|
|
436
|
+
this.triggerEvent('showSku', e.detail)
|
|
437
|
+
},
|
|
438
|
+
sendNewMsg() {
|
|
439
|
+
this.triggerEvent('sendNewMsg')
|
|
440
|
+
},
|
|
441
|
+
sendGoodsCard(e) {
|
|
442
|
+
this.triggerEvent('sendGoodsCard', e.detail)
|
|
443
|
+
},
|
|
444
|
+
},
|
|
445
|
+
})
|