xiaoe_mp_npm 0.0.28-t1206
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 +11 -0
- package/.eslintrc.js +102 -0
- package/.gitlab-ci.yml +42 -0
- package/.prettierrc.js +8 -0
- package/LICENSE +21 -0
- package/README.md +134 -0
- package/gulpfile.js +26 -0
- package/package.json +77 -0
- package/project.config.json +77 -0
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.js +104 -0
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.json +4 -0
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxml +22 -0
- package/src/AliveInvite/LiveRoomVertical/components/friends/friends.wxss +82 -0
- package/src/AliveInvite/LiveRoomVertical/components/invite-poster/invite-poster.js +227 -0
- package/src/AliveInvite/LiveRoomVertical/components/invite-poster/invite-poster.json +4 -0
- package/src/AliveInvite/LiveRoomVertical/components/invite-poster/invite-poster.wxml +64 -0
- package/src/AliveInvite/LiveRoomVertical/components/invite-poster/invite-poster.wxss +167 -0
- package/src/AliveInvite/LiveRoomVertical/components/rewards/rewards.js +116 -0
- package/src/AliveInvite/LiveRoomVertical/components/rewards/rewards.json +4 -0
- package/src/AliveInvite/LiveRoomVertical/components/rewards/rewards.wxml +36 -0
- package/src/AliveInvite/LiveRoomVertical/components/rewards/rewards.wxss +104 -0
- package/src/AliveInvite/LiveRoomVertical/components/rules/rules.js +80 -0
- package/src/AliveInvite/LiveRoomVertical/components/rules/rules.json +4 -0
- package/src/AliveInvite/LiveRoomVertical/components/rules/rules.wxml +14 -0
- package/src/AliveInvite/LiveRoomVertical/components/rules/rules.wxss +41 -0
- package/src/AliveInvite/LiveRoomVertical/index.js +246 -0
- package/src/AliveInvite/LiveRoomVertical/index.json +9 -0
- package/src/AliveInvite/LiveRoomVertical/index.less +276 -0
- package/src/AliveInvite/LiveRoomVertical/index.wxml +142 -0
- package/src/AliveInvite/LiveRoomVertical/index.wxss +276 -0
- package/src/AliveInvite/LiveRoomVertical/libs/base64.js +234 -0
- package/src/AliveInvite/images/copylink.png +0 -0
- package/src/AliveInvite/images/cup.png +0 -0
- package/src/AliveInvite/images/icon_arrow_right_white.png +0 -0
- package/src/AliveInvite/images/icon_arrow_up.png +0 -0
- package/src/AliveInvite/images/invite_entrance/new_crown_blue_pure.svg +29 -0
- package/src/AliveInvite/images/invite_entrance/new_crown_pink_pure.svg +29 -0
- package/src/AliveInvite/images/invite_entrance/new_crown_yellow_pure.svg +27 -0
- package/src/AliveInvite/images/liveClose.png +0 -0
- package/src/AliveInvite/images/new_emptypage.svg +59 -0
- package/src/AliveInvite/images/new_icon_close.png +0 -0
- package/src/AliveInvite/images/new_invite_title.svg +23 -0
- package/src/AliveInvite/images/new_share_icon.png +0 -0
- package/src/AliveInvite/images/rank_first.svg +11 -0
- package/src/AliveInvite/images/rank_second.svg +11 -0
- package/src/AliveInvite/images/rank_third.svg +11 -0
- package/src/AliveInvite/images/wechat.png +0 -0
- package/src/ConfirmOrder/README.md +12 -0
- package/src/ConfirmOrder/components/AddressEdit/index.js +341 -0
- package/src/ConfirmOrder/components/AddressEdit/index.json +11 -0
- package/src/ConfirmOrder/components/AddressEdit/index.less +76 -0
- package/src/ConfirmOrder/components/AddressEdit/index.wxml +39 -0
- package/src/ConfirmOrder/components/AddressEdit/index.wxss +61 -0
- package/src/ConfirmOrder/components/AddressManage/index.js +158 -0
- package/src/ConfirmOrder/components/AddressManage/index.json +8 -0
- package/src/ConfirmOrder/components/AddressManage/index.less +94 -0
- package/src/ConfirmOrder/components/AddressManage/index.wxml +37 -0
- package/src/ConfirmOrder/components/AddressManage/index.wxss +82 -0
- package/src/ConfirmOrder/components/AddressSelect/index.js +160 -0
- package/src/ConfirmOrder/components/AddressSelect/index.json +4 -0
- package/src/ConfirmOrder/components/AddressSelect/index.less +78 -0
- package/src/ConfirmOrder/components/AddressSelect/index.wxml +33 -0
- package/src/ConfirmOrder/components/AddressSelect/index.wxss +65 -0
- package/src/ConfirmOrder/components/ChoosePicker/index.js +110 -0
- package/src/ConfirmOrder/components/ChoosePicker/index.json +6 -0
- package/src/ConfirmOrder/components/ChoosePicker/index.less +21 -0
- package/src/ConfirmOrder/components/ChoosePicker/index.wxml +10 -0
- package/src/ConfirmOrder/components/ChoosePicker/index.wxss +18 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.js +766 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.json +23 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.less +11 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxml +171 -0
- package/src/ConfirmOrder/components/ConfirmOrderContent/index.wxss +9 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.js +72 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.json +6 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.less +45 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxml +18 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityGiftList/index.wxss +39 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/filter.wxs +8 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.js +92 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.json +4 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.less +109 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxml +29 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/components/entityItem/index.wxss +96 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.js +78 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.json +7 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.less +34 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxml +24 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/GoodsCommerce/index.wxss +29 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.js +87 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.json +4 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.less +14 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxml +4 -0
- package/src/ConfirmOrder/components/GoodsInfo/components/ImageData/index.wxss +13 -0
- package/src/ConfirmOrder/components/GoodsInfo/filter.wxs +7 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.js +415 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.json +9 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.less +181 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.wxml +74 -0
- package/src/ConfirmOrder/components/GoodsInfo/index.wxss +155 -0
- package/src/ConfirmOrder/components/Header/index.js +50 -0
- package/src/ConfirmOrder/components/Header/index.json +6 -0
- package/src/ConfirmOrder/components/Header/index.less +20 -0
- package/src/ConfirmOrder/components/Header/index.wxml +10 -0
- package/src/ConfirmOrder/components/Header/index.wxss +19 -0
- package/src/ConfirmOrder/components/InfoCollect/index.js +107 -0
- package/src/ConfirmOrder/components/InfoCollect/index.json +6 -0
- package/src/ConfirmOrder/components/InfoCollect/index.less +0 -0
- package/src/ConfirmOrder/components/InfoCollect/index.wxml +13 -0
- package/src/ConfirmOrder/components/InfoCollect/index.wxss +1 -0
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.js +85 -0
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.json +4 -0
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.less +64 -0
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxml +31 -0
- package/src/ConfirmOrder/components/IntegralSelect/componenets/integralTips/index.wxss +57 -0
- package/src/ConfirmOrder/components/IntegralSelect/filter.wxs +7 -0
- package/src/ConfirmOrder/components/IntegralSelect/index.js +83 -0
- package/src/ConfirmOrder/components/IntegralSelect/index.json +8 -0
- package/src/ConfirmOrder/components/IntegralSelect/index.less +55 -0
- package/src/ConfirmOrder/components/IntegralSelect/index.wxml +27 -0
- package/src/ConfirmOrder/components/IntegralSelect/index.wxss +47 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.js +275 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.json +7 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.less +132 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxml +86 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceSelect/index.wxss +111 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.js +33 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.json +6 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.less +47 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxml +17 -0
- package/src/ConfirmOrder/components/Invoice/components/InvoiceTip/index.wxss +42 -0
- package/src/ConfirmOrder/components/Invoice/index.js +155 -0
- package/src/ConfirmOrder/components/Invoice/index.json +7 -0
- package/src/ConfirmOrder/components/Invoice/index.less +16 -0
- package/src/ConfirmOrder/components/Invoice/index.wxml +22 -0
- package/src/ConfirmOrder/components/Invoice/index.wxss +13 -0
- package/src/ConfirmOrder/components/LeaveWord/index.js +53 -0
- package/src/ConfirmOrder/components/LeaveWord/index.json +6 -0
- package/src/ConfirmOrder/components/LeaveWord/index.less +6 -0
- package/src/ConfirmOrder/components/LeaveWord/index.wxml +11 -0
- package/src/ConfirmOrder/components/LeaveWord/index.wxss +6 -0
- package/src/ConfirmOrder/components/LimitDiscount/index.js +50 -0
- package/src/ConfirmOrder/components/LimitDiscount/index.json +4 -0
- package/src/ConfirmOrder/components/LimitDiscount/index.wxml +1 -0
- package/src/ConfirmOrder/components/LimitDiscount/index.wxss +1 -0
- package/src/ConfirmOrder/components/ModeSelect/index.js +42 -0
- package/src/ConfirmOrder/components/ModeSelect/index.json +7 -0
- package/src/ConfirmOrder/components/ModeSelect/index.less +33 -0
- package/src/ConfirmOrder/components/ModeSelect/index.wxml +7 -0
- package/src/ConfirmOrder/components/ModeSelect/index.wxss +28 -0
- package/src/ConfirmOrder/components/PayBar/index.js +226 -0
- package/src/ConfirmOrder/components/PayBar/index.json +6 -0
- package/src/ConfirmOrder/components/PayBar/index.less +32 -0
- package/src/ConfirmOrder/components/PayBar/index.wxml +24 -0
- package/src/ConfirmOrder/components/PayBar/index.wxss +27 -0
- package/src/ConfirmOrder/components/PayDetail/filter.wxs +16 -0
- package/src/ConfirmOrder/components/PayDetail/index.js +68 -0
- package/src/ConfirmOrder/components/PayDetail/index.json +4 -0
- package/src/ConfirmOrder/components/PayDetail/index.less +16 -0
- package/src/ConfirmOrder/components/PayDetail/index.wxml +18 -0
- package/src/ConfirmOrder/components/PayDetail/index.wxss +14 -0
- package/src/ConfirmOrder/components/PayGifts/index.js +23 -0
- package/src/ConfirmOrder/components/PayGifts/index.json +4 -0
- package/src/ConfirmOrder/components/PayGifts/index.wxml +2 -0
- package/src/ConfirmOrder/components/PayGifts/index.wxss +1 -0
- package/src/ConfirmOrder/components/PickupSelect/index.js +80 -0
- package/src/ConfirmOrder/components/PickupSelect/index.json +8 -0
- package/src/ConfirmOrder/components/PickupSelect/index.less +9 -0
- package/src/ConfirmOrder/components/PickupSelect/index.wxml +12 -0
- package/src/ConfirmOrder/components/PickupSelect/index.wxss +7 -0
- package/src/ConfirmOrder/components/SelectSite/index.js +147 -0
- package/src/ConfirmOrder/components/SelectSite/index.json +7 -0
- package/src/ConfirmOrder/components/SelectSite/index.less +96 -0
- package/src/ConfirmOrder/components/SelectSite/index.wxml +46 -0
- package/src/ConfirmOrder/components/SelectSite/index.wxss +82 -0
- package/src/ConfirmOrder/components/Shipper/index.js +91 -0
- package/src/ConfirmOrder/components/Shipper/index.json +6 -0
- package/src/ConfirmOrder/components/Shipper/index.less +68 -0
- package/src/ConfirmOrder/components/Shipper/index.wxml +16 -0
- package/src/ConfirmOrder/components/Shipper/index.wxss +60 -0
- package/src/ConfirmOrder/components/ShipperEdit/index.js +216 -0
- package/src/ConfirmOrder/components/ShipperEdit/index.json +8 -0
- package/src/ConfirmOrder/components/ShipperEdit/index.less +75 -0
- package/src/ConfirmOrder/components/ShipperEdit/index.wxml +20 -0
- package/src/ConfirmOrder/components/ShipperEdit/index.wxss +62 -0
- package/src/ConfirmOrder/components/WechatAddress/index.js +78 -0
- package/src/ConfirmOrder/components/WechatAddress/index.json +4 -0
- package/src/ConfirmOrder/components/WechatAddress/index.less +25 -0
- package/src/ConfirmOrder/components/WechatAddress/index.wxml +8 -0
- package/src/ConfirmOrder/components/WechatAddress/index.wxss +22 -0
- package/src/ConfirmOrder/index.js +41 -0
- package/src/ConfirmOrder/index.json +8 -0
- package/src/ConfirmOrder/index.less +5 -0
- package/src/ConfirmOrder/index.wxml +13 -0
- package/src/ConfirmOrder/index.wxss +5 -0
- package/src/CouponList/README.md +2 -0
- package/src/CouponList/components/CouponItem/index.js +237 -0
- package/src/CouponList/components/CouponItem/index.json +6 -0
- package/src/CouponList/components/CouponItem/index.less +281 -0
- package/src/CouponList/components/CouponItem/index.wxml +196 -0
- package/src/CouponList/components/CouponItem/index.wxss +268 -0
- package/src/CouponList/couponColumn/index.js +54 -0
- package/src/CouponList/couponColumn/index.json +6 -0
- package/src/CouponList/couponColumn/index.less +32 -0
- package/src/CouponList/couponColumn/index.wxml +20 -0
- package/src/CouponList/couponColumn/index.wxss +31 -0
- package/src/CouponList/couponMsg/index.js +27 -0
- package/src/CouponList/couponMsg/index.json +6 -0
- package/src/CouponList/couponMsg/index.less +3 -0
- package/src/CouponList/couponMsg/index.wxml +10 -0
- package/src/CouponList/couponMsg/index.wxss +3 -0
- package/src/CurrentPay/index.js +56 -0
- package/src/CurrentPay/index.json +9 -0
- package/src/CurrentPay/index.wxml +11 -0
- package/src/CurrentPay/index.wxss +1 -0
- package/src/CurrentPayModule/index.js +256 -0
- package/src/CurrentPayModule/index.json +9 -0
- package/src/CurrentPayModule/index.less +13 -0
- package/src/CurrentPayModule/index.wxml +4 -0
- package/src/CurrentPayModule/index.wxss +13 -0
- package/src/LiveGoodsList/GoodsItem/index.js +439 -0
- package/src/LiveGoodsList/GoodsItem/index.json +6 -0
- package/src/LiveGoodsList/GoodsItem/index.less +221 -0
- package/src/LiveGoodsList/GoodsItem/index.wxml +79 -0
- package/src/LiveGoodsList/GoodsItem/index.wxss +219 -0
- package/src/LiveGoodsList/Header/index.js +36 -0
- package/src/LiveGoodsList/Header/index.json +6 -0
- package/src/LiveGoodsList/Header/index.less +45 -0
- package/src/LiveGoodsList/Header/index.wxml +28 -0
- package/src/LiveGoodsList/Header/index.wxss +44 -0
- package/src/LiveGoodsList/README.md +10 -0
- package/src/LiveGoodsList/index.js +350 -0
- package/src/LiveGoodsList/index.json +10 -0
- package/src/LiveGoodsList/index.less +47 -0
- package/src/LiveGoodsList/index.wxml +68 -0
- package/src/LiveGoodsList/index.wxss +42 -0
- package/src/Lottery/ContactMerchant/index.js +40 -0
- package/src/Lottery/ContactMerchant/index.json +7 -0
- package/src/Lottery/ContactMerchant/index.less +61 -0
- package/src/Lottery/ContactMerchant/index.wxml +19 -0
- package/src/Lottery/ContactMerchant/index.wxss +61 -0
- package/src/Lottery/Countdown.js +73 -0
- package/src/Lottery/LotteryFAB/index.js +94 -0
- package/src/Lottery/LotteryFAB/index.json +5 -0
- package/src/Lottery/LotteryFAB/index.less +35 -0
- package/src/Lottery/LotteryFAB/index.wxml +14 -0
- package/src/Lottery/LotteryFAB/index.wxss +35 -0
- package/src/Lottery/LotteryInfo/LotteryCountdown/index.js +49 -0
- package/src/Lottery/LotteryInfo/LotteryCountdown/index.json +5 -0
- package/src/Lottery/LotteryInfo/LotteryCountdown/index.less +16 -0
- package/src/Lottery/LotteryInfo/LotteryCountdown/index.wxml +9 -0
- package/src/Lottery/LotteryInfo/LotteryCountdown/index.wxss +16 -0
- package/src/Lottery/LotteryInfo/index.js +179 -0
- package/src/Lottery/LotteryInfo/index.json +9 -0
- package/src/Lottery/LotteryInfo/index.less +75 -0
- package/src/Lottery/LotteryInfo/index.wxml +31 -0
- package/src/Lottery/LotteryInfo/index.wxss +75 -0
- package/src/Lottery/LotteryPopup/index.js +46 -0
- package/src/Lottery/LotteryPopup/index.json +9 -0
- package/src/Lottery/LotteryPopup/index.less +50 -0
- package/src/Lottery/LotteryPopup/index.wxml +15 -0
- package/src/Lottery/LotteryPopup/index.wxss +48 -0
- package/src/Lottery/LotteryResult/LosingLottery/index.js +27 -0
- package/src/Lottery/LotteryResult/LosingLottery/index.json +7 -0
- package/src/Lottery/LotteryResult/LosingLottery/index.less +31 -0
- package/src/Lottery/LotteryResult/LosingLottery/index.wxml +14 -0
- package/src/Lottery/LotteryResult/LosingLottery/index.wxss +31 -0
- package/src/Lottery/LotteryResult/WinLottery/index.js +108 -0
- package/src/Lottery/LotteryResult/WinLottery/index.json +8 -0
- package/src/Lottery/LotteryResult/WinLottery/index.less +49 -0
- package/src/Lottery/LotteryResult/WinLottery/index.wxml +20 -0
- package/src/Lottery/LotteryResult/WinLottery/index.wxss +49 -0
- package/src/Lottery/LotteryResult/index.js +63 -0
- package/src/Lottery/LotteryResult/index.json +11 -0
- package/src/Lottery/LotteryResult/index.less +49 -0
- package/src/Lottery/LotteryResult/index.wxml +14 -0
- package/src/Lottery/LotteryResult/index.wxss +49 -0
- package/src/Lottery/MyRewards/RewardItem/index.js +128 -0
- package/src/Lottery/MyRewards/RewardItem/index.json +6 -0
- package/src/Lottery/MyRewards/RewardItem/index.less +56 -0
- package/src/Lottery/MyRewards/RewardItem/index.wxml +14 -0
- package/src/Lottery/MyRewards/RewardItem/index.wxss +56 -0
- package/src/Lottery/MyRewards/index.js +64 -0
- package/src/Lottery/MyRewards/index.json +9 -0
- package/src/Lottery/MyRewards/index.less +60 -0
- package/src/Lottery/MyRewards/index.wxml +28 -0
- package/src/Lottery/MyRewards/index.wxss +60 -0
- package/src/Lottery/NobodyParticipate/index.js +19 -0
- package/src/Lottery/NobodyParticipate/index.json +6 -0
- package/src/Lottery/NobodyParticipate/index.less +29 -0
- package/src/Lottery/NobodyParticipate/index.wxml +9 -0
- package/src/Lottery/NobodyParticipate/index.wxss +29 -0
- package/src/Lottery/ParticipationRecord/RecordItem/index.js +25 -0
- package/src/Lottery/ParticipationRecord/RecordItem/index.json +6 -0
- package/src/Lottery/ParticipationRecord/RecordItem/index.less +29 -0
- package/src/Lottery/ParticipationRecord/RecordItem/index.wxml +6 -0
- package/src/Lottery/ParticipationRecord/RecordItem/index.wxss +29 -0
- package/src/Lottery/ParticipationRecord/index.js +29 -0
- package/src/Lottery/ParticipationRecord/index.json +7 -0
- package/src/Lottery/ParticipationRecord/index.less +46 -0
- package/src/Lottery/ParticipationRecord/index.wxml +23 -0
- package/src/Lottery/ParticipationRecord/index.wxss +46 -0
- package/src/Lottery/PrizeCard/index.js +19 -0
- package/src/Lottery/PrizeCard/index.json +5 -0
- package/src/Lottery/PrizeCard/index.less +35 -0
- package/src/Lottery/PrizeCard/index.wxml +5 -0
- package/src/Lottery/PrizeCard/index.wxss +35 -0
- package/src/Lottery/RewardPopup/index.js +158 -0
- package/src/Lottery/RewardPopup/index.json +11 -0
- package/src/Lottery/RewardPopup/index.less +0 -0
- package/src/Lottery/RewardPopup/index.wxml +36 -0
- package/src/Lottery/RewardPopup/index.wxss +0 -0
- package/src/Lottery/Winners/WinnerItem/index.js +18 -0
- package/src/Lottery/Winners/WinnerItem/index.json +6 -0
- package/src/Lottery/Winners/WinnerItem/index.less +32 -0
- package/src/Lottery/Winners/WinnerItem/index.wxml +8 -0
- package/src/Lottery/Winners/WinnerItem/index.wxss +32 -0
- package/src/Lottery/Winners/index.js +51 -0
- package/src/Lottery/Winners/index.json +7 -0
- package/src/Lottery/Winners/index.less +55 -0
- package/src/Lottery/Winners/index.wxml +25 -0
- package/src/Lottery/Winners/index.wxss +55 -0
- package/src/Lottery/cls.js +46 -0
- package/src/Lottery/constants.js +69 -0
- package/src/Lottery/index.js +149 -0
- package/src/Lottery/index.json +11 -0
- package/src/Lottery/index.wxml +51 -0
- package/src/Lottery/mock.js +724 -0
- package/src/Lottery/remotePic.js +42 -0
- package/src/PayComplete/Components/CouponItem/index.js +51 -0
- package/src/PayComplete/Components/CouponItem/index.json +4 -0
- package/src/PayComplete/Components/CouponItem/index.less +143 -0
- package/src/PayComplete/Components/CouponItem/index.wxml +47 -0
- package/src/PayComplete/Components/CouponItem/index.wxss +122 -0
- package/src/PayComplete/Components/CouponItem/sub.wxs +73 -0
- package/src/PayComplete/Components/LeadGroup/index.js +95 -0
- package/src/PayComplete/Components/LeadGroup/index.json +7 -0
- package/src/PayComplete/Components/LeadGroup/index.wxml +46 -0
- package/src/PayComplete/Components/LeadGroup/index.wxss +113 -0
- package/src/PayComplete/Components/PayGifts/index.js +114 -0
- package/src/PayComplete/Components/PayGifts/index.json +6 -0
- package/src/PayComplete/Components/PayGifts/index.less +162 -0
- package/src/PayComplete/Components/PayGifts/index.wxml +56 -0
- package/src/PayComplete/Components/PayGifts/index.wxss +143 -0
- package/src/PayComplete/Components/PayState/earnIntegral/index.js +62 -0
- package/src/PayComplete/Components/PayState/earnIntegral/index.json +6 -0
- package/src/PayComplete/Components/PayState/earnIntegral/index.less +26 -0
- package/src/PayComplete/Components/PayState/earnIntegral/index.wxml +4 -0
- package/src/PayComplete/Components/PayState/earnIntegral/index.wxss +23 -0
- package/src/PayComplete/Components/PayState/index.js +38 -0
- package/src/PayComplete/Components/PayState/index.json +7 -0
- package/src/PayComplete/Components/PayState/index.less +31 -0
- package/src/PayComplete/Components/PayState/index.wxml +12 -0
- package/src/PayComplete/Components/PayState/index.wxss +27 -0
- package/src/PayComplete/index.js +142 -0
- package/src/PayComplete/index.json +10 -0
- package/src/PayComplete/index.less +39 -0
- package/src/PayComplete/index.wxml +33 -0
- package/src/PayComplete/index.wxss +35 -0
- package/src/PayModule/README.md +0 -0
- package/src/PayModule/button/index.js +44 -0
- package/src/PayModule/button/index.json +6 -0
- package/src/PayModule/button/index.less +14 -0
- package/src/PayModule/button/index.wxml +8 -0
- package/src/PayModule/button/index.wxss +12 -0
- package/src/PayModule/index/index.js +213 -0
- package/src/PayModule/index/index.json +7 -0
- package/src/PayModule/index/index.less +0 -0
- package/src/PayModule/index/index.wxml +12 -0
- package/src/PayModule/index/index.wxss +1 -0
- package/src/PayModule/wechatLoading/index.js +43 -0
- package/src/PayModule/wechatLoading/index.json +4 -0
- package/src/PayModule/wechatLoading/index.less +66 -0
- package/src/PayModule/wechatLoading/index.wxml +12 -0
- package/src/PayModule/wechatLoading/index.wxss +57 -0
- package/src/Recommend/index.js +63 -0
- package/src/Recommend/index.json +4 -0
- package/src/Recommend/index.less +104 -0
- package/src/Recommend/index.wxml +29 -0
- package/src/Recommend/index.wxss +99 -0
- package/src/SharePoster/PosterDom/index.js +1755 -0
- package/src/SharePoster/PosterDom/index.json +5 -0
- package/src/SharePoster/PosterDom/index.less +57 -0
- package/src/SharePoster/PosterDom/index.wxml +13 -0
- package/src/SharePoster/PosterDom/index.wxss +57 -0
- package/src/SharePoster/README.md +10 -0
- package/src/SharePoster/ShareTextPopup/index.js +62 -0
- package/src/SharePoster/ShareTextPopup/index.json +7 -0
- package/src/SharePoster/ShareTextPopup/index.less +68 -0
- package/src/SharePoster/ShareTextPopup/index.wxml +29 -0
- package/src/SharePoster/ShareTextPopup/index.wxss +68 -0
- package/src/SharePoster/createPoster/index.js +201 -0
- package/src/SharePoster/createPoster/utils/drawImage.js +267 -0
- package/src/SharePoster/createPoster/utils/util.js +40 -0
- package/src/SharePoster/libs/constant.js +57 -0
- package/src/SharePoster/libs/positionMap.js +255 -0
- package/src/SharePoster/mockData/mockData.js +591 -0
- package/src/SharePoster/sharePopup/index.js +267 -0
- package/src/SharePoster/sharePopup/index.json +9 -0
- package/src/SharePoster/sharePopup/index.less +174 -0
- package/src/SharePoster/sharePopup/index.wxml +85 -0
- package/src/SharePoster/sharePopup/index.wxss +174 -0
- package/src/Sku/commSelect/index.js +419 -0
- package/src/Sku/commSelect/index.json +8 -0
- package/src/Sku/commSelect/index.less +48 -0
- package/src/Sku/commSelect/index.wxml +41 -0
- package/src/Sku/commSelect/index.wxss +47 -0
- package/src/Sku/goods-info/index.js +52 -0
- package/src/Sku/goods-info/index.json +4 -0
- package/src/Sku/goods-info/index.less +48 -0
- package/src/Sku/goods-info/index.wxml +19 -0
- package/src/Sku/goods-info/index.wxss +48 -0
- package/src/Sku/index/index.js +279 -0
- package/src/Sku/index/index.json +12 -0
- package/src/Sku/index/index.less +78 -0
- package/src/Sku/index/index.wxml +58 -0
- package/src/Sku/index/index.wxss +50 -0
- package/src/Sku/row-item/index.js +61 -0
- package/src/Sku/row-item/index.json +4 -0
- package/src/Sku/row-item/index.less +48 -0
- package/src/Sku/row-item/index.wxml +10 -0
- package/src/Sku/row-item/index.wxss +42 -0
- package/src/Sku/step/index.js +95 -0
- package/src/Sku/step/index.json +6 -0
- package/src/Sku/step/index.less +7 -0
- package/src/Sku/step/index.wxml +12 -0
- package/src/Sku/step/index.wxss +7 -0
- package/src/common/api/confirmOrder.js +218 -0
- package/src/common/api/coupon.js +19 -0
- package/src/common/api/couponlist.js +106 -0
- package/src/common/api/eLiveInvite.js +46 -0
- package/src/common/api/liveGoodsList.js +52 -0
- package/src/common/api/lottery.js +57 -0
- package/src/common/api/pay.js +42 -0
- package/src/common/api/payComplete.js +22 -0
- package/src/common/api/sharePoster.js +68 -0
- package/src/common/api/sku.js +58 -0
- package/src/common/assets/copy.wxss +3 -0
- package/src/common/assets/icon.png +0 -0
- package/src/common/assets/images/activity.png +0 -0
- package/src/common/assets/images/address.png +0 -0
- package/src/common/assets/images/bg_gift@2x.png +0 -0
- package/src/common/assets/images/close.png +0 -0
- package/src/common/assets/images/coupon/coupon_bg.png +0 -0
- package/src/common/assets/images/coupon/coupon_finish.png +0 -0
- package/src/common/assets/images/coupon/coupon_select.png +0 -0
- package/src/common/assets/images/coupon/coupon_style2.png +0 -0
- package/src/common/assets/images/coupon/coupon_style2.svg +30 -0
- package/src/common/assets/images/coupon/coupons_style2.svg +30 -0
- package/src/common/assets/images/coupon/down.svg +22 -0
- package/src/common/assets/images/coupon/emptypage.svg +50 -0
- package/src/common/assets/images/coupon/expand.png +0 -0
- package/src/common/assets/images/coupon/finished.png +0 -0
- package/src/common/assets/images/coupon/has_receive.png +0 -0
- package/src/common/assets/images/coupon/has_recevie_style2.png +0 -0
- package/src/common/assets/images/coupon/hint.png +0 -0
- package/src/common/assets/images/coupon/icon_arrow.png +0 -0
- package/src/common/assets/images/coupon/retract.png +0 -0
- package/src/common/assets/images/coupon/seal_receivingPage_received.png +0 -0
- package/src/common/assets/images/coupon/superposition_logo.png +0 -0
- package/src/common/assets/images/coupon/up.svg +22 -0
- package/src/common/assets/images/fingerprint.png +0 -0
- package/src/common/assets/images/icon-tip.png +0 -0
- package/src/common/assets/images/img_adrr.png +0 -0
- package/src/common/assets/images/liveGoodsList/empty.png +0 -0
- package/src/common/assets/images/liveGoodsList/explaining.png +0 -0
- package/src/common/assets/images/lottery/close-f-new.png +0 -0
- package/src/common/assets/images/lottery/is_not_winner.svg +19 -0
- package/src/common/assets/images/lottery/lottery_v1_back.svg +19 -0
- package/src/common/assets/images/lottery/lottery_v1_close.svg +19 -0
- package/src/common/assets/images/lottery/reward_list_title.svg +19 -0
- package/src/common/assets/images/lottery/winner_list_smile_icon.svg +56 -0
- package/src/common/assets/images/lottery/winner_list_title.svg +19 -0
- package/src/common/assets/images/package.png +0 -0
- package/src/common/assets/images/pay/loading.svg +3 -0
- package/src/common/assets/images/recommend.svg +6 -0
- package/src/common/assets/images/recommend_with_bg.png +0 -0
- package/src/common/assets/images/refresh.svg +10 -0
- package/src/common/assets/images/refresh_white.svg +3 -0
- package/src/common/assets/images/replenish.png +0 -0
- package/src/common/assets/images/search-bg.png +0 -0
- package/src/common/assets/images/shop.png +0 -0
- package/src/common/assets/images/success.png +0 -0
- package/src/common/assets/images/tips.png +0 -0
- package/src/common/assets/images/update.png +0 -0
- package/src/common/assets/images/wechat.svg +4 -0
- package/src/common/assets/images/wx.png +0 -0
- package/src/common/assets/images/zhixiang.png +0 -0
- package/src/common/css/index.less +2 -0
- package/src/common/css/index.wxss +1 -0
- package/src/common/css/theme.less +20 -0
- package/src/common/css/theme.wxss +16 -0
- package/src/common/libs/dataUp/sensorUp.js +92 -0
- package/src/common/libs/playerHttp.js +58 -0
- package/src/common/libs/playerRequestUrl.js +40 -0
- package/src/common/utils/constants.js +249 -0
- package/src/common/utils/currency.js +52 -0
- package/src/common/utils/helper.js +159 -0
- package/src/common/utils/index.js +56 -0
- package/src/common/utils/tool.js +66 -0
- package/src/common/wxs/filter.wxs +30 -0
- package/src/coupon/README.md +12 -0
- package/src/coupon/components/CouponItem/index.js +176 -0
- package/src/coupon/components/CouponItem/index.json +5 -0
- package/src/coupon/components/CouponItem/index.less +208 -0
- package/src/coupon/components/CouponItem/index.wxml +94 -0
- package/src/coupon/components/CouponItem/index.wxss +195 -0
- package/src/coupon/components/CouponSelect/index.js +319 -0
- package/src/coupon/components/CouponSelect/index.json +9 -0
- package/src/coupon/components/CouponSelect/index.less +236 -0
- package/src/coupon/components/CouponSelect/index.wxml +75 -0
- package/src/coupon/components/CouponSelect/index.wxss +233 -0
- package/src/coupon/index.css +50 -0
- package/src/coupon/index.js +187 -0
- package/src/coupon/index.json +7 -0
- package/src/coupon/index.less +51 -0
- package/src/coupon/index.wxml +24 -0
- package/src/coupon/index.wxss +50 -0
- package/src/index.js +23 -0
- package/src/index.json +6 -0
- package/src/index.wxml +2 -0
- package/src/index.wxss +1 -0
- package/src/lib.ts +5 -0
- package/src/project.config.json +69 -0
- package/src/utils.js +5 -0
- package/tsconfig.json +25 -0
package/.babelrc
ADDED
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
'extends': [
|
|
3
|
+
'airbnb-base',
|
|
4
|
+
'plugin:promise/recommended'
|
|
5
|
+
],
|
|
6
|
+
'parser': '@typescript-eslint/parser',
|
|
7
|
+
'plugins': ['@typescript-eslint'],
|
|
8
|
+
'parserOptions': {
|
|
9
|
+
'ecmaVersion': 9,
|
|
10
|
+
'ecmaFeatures': {
|
|
11
|
+
'jsx': false
|
|
12
|
+
},
|
|
13
|
+
'sourceType': 'module'
|
|
14
|
+
},
|
|
15
|
+
'env': {
|
|
16
|
+
'es6': true,
|
|
17
|
+
'node': true,
|
|
18
|
+
'jest': true
|
|
19
|
+
},
|
|
20
|
+
'plugins': [
|
|
21
|
+
'import',
|
|
22
|
+
'node',
|
|
23
|
+
'promise'
|
|
24
|
+
],
|
|
25
|
+
'rules': {
|
|
26
|
+
'arrow-parens': 'off',
|
|
27
|
+
'comma-dangle': [
|
|
28
|
+
'error',
|
|
29
|
+
'only-multiline'
|
|
30
|
+
],
|
|
31
|
+
'complexity': ['error', 20],
|
|
32
|
+
'func-names': 'off',
|
|
33
|
+
'global-require': 'off',
|
|
34
|
+
'handle-callback-err': [
|
|
35
|
+
'error',
|
|
36
|
+
'^(err|error)$'
|
|
37
|
+
],
|
|
38
|
+
'import/no-unresolved': [
|
|
39
|
+
'error',
|
|
40
|
+
{
|
|
41
|
+
'caseSensitive': true,
|
|
42
|
+
'commonjs': true,
|
|
43
|
+
'ignore': ['^[^.]']
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
'import/prefer-default-export': 'off',
|
|
47
|
+
'linebreak-style': 'off',
|
|
48
|
+
'no-catch-shadow': 'error',
|
|
49
|
+
'no-continue': 'off',
|
|
50
|
+
'no-div-regex': 'warn',
|
|
51
|
+
'no-else-return': 'off',
|
|
52
|
+
'no-param-reassign': 'off',
|
|
53
|
+
'no-plusplus': 'off',
|
|
54
|
+
'no-shadow': 'off',
|
|
55
|
+
'no-multi-assign': 'off',
|
|
56
|
+
'no-underscore-dangle': 'off',
|
|
57
|
+
'node/no-deprecated-api': 'error',
|
|
58
|
+
'node/process-exit-as-throw': 'error',
|
|
59
|
+
'object-curly-spacing': [
|
|
60
|
+
'error',
|
|
61
|
+
'never'
|
|
62
|
+
],
|
|
63
|
+
'operator-linebreak': [
|
|
64
|
+
'error',
|
|
65
|
+
'after',
|
|
66
|
+
{
|
|
67
|
+
'overrides': {
|
|
68
|
+
':': 'before',
|
|
69
|
+
'?': 'before'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
'prefer-arrow-callback': 'off',
|
|
74
|
+
'prefer-destructuring': 'off',
|
|
75
|
+
'prefer-template': 'off',
|
|
76
|
+
'quote-props': [
|
|
77
|
+
1,
|
|
78
|
+
'as-needed',
|
|
79
|
+
{
|
|
80
|
+
'unnecessary': true
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
'semi': [
|
|
84
|
+
'error',
|
|
85
|
+
'never'
|
|
86
|
+
],
|
|
87
|
+
'no-await-in-loop': 'off',
|
|
88
|
+
'no-restricted-syntax': 'off',
|
|
89
|
+
'promise/always-return': 'off',
|
|
90
|
+
'max-len': 'off'
|
|
91
|
+
},
|
|
92
|
+
'globals': {
|
|
93
|
+
'window': true,
|
|
94
|
+
'document': true,
|
|
95
|
+
'App': true,
|
|
96
|
+
'Page': true,
|
|
97
|
+
'Component': true,
|
|
98
|
+
'Behavior': true,
|
|
99
|
+
'wx': true,
|
|
100
|
+
'getCurrentPages': true,
|
|
101
|
+
}
|
|
102
|
+
}
|
package/.gitlab-ci.yml
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# 发布测试包
|
|
2
|
+
build_test:
|
|
3
|
+
stage: build
|
|
4
|
+
only:
|
|
5
|
+
- dev
|
|
6
|
+
- dev-gwenniezhou
|
|
7
|
+
tags:
|
|
8
|
+
- fe-group-prod-runner-2
|
|
9
|
+
script:
|
|
10
|
+
- export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
|
|
11
|
+
- export project_name=${project_name:2:$[${#project_name}-4]}
|
|
12
|
+
- export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
|
|
13
|
+
- export version=${version:2:$[${#version}-4]}
|
|
14
|
+
- export message=$(git log --pretty=format:%s -1)
|
|
15
|
+
- export author=$(git log --pretty=format:%an -1)
|
|
16
|
+
- if [ $CI_COMMIT_REF_NAME != "master" ] && [ $(echo $version | grep -E "r|t" ) != "" ]; then echo "正常发包"; else exit 0; fi
|
|
17
|
+
- cnpm i
|
|
18
|
+
- npm run build
|
|
19
|
+
- cnpm publish
|
|
20
|
+
|
|
21
|
+
# 发布正式包
|
|
22
|
+
build_master:
|
|
23
|
+
stage: build
|
|
24
|
+
only:
|
|
25
|
+
- master
|
|
26
|
+
- /^release\/.*$/
|
|
27
|
+
tags:
|
|
28
|
+
- fe-group-prod-runner-2
|
|
29
|
+
script:
|
|
30
|
+
- export project_name=$(cat package.json|awk -F "[:]" '/"name"/{print$2}')
|
|
31
|
+
- export project_name=${project_name:2:$[${#project_name}-4]}
|
|
32
|
+
- export version=`cat package.json|awk -F "[:]" '/"version"/{print$2}'`
|
|
33
|
+
- export version=${version:2:$[${#version}-4]}
|
|
34
|
+
- export message=$(git log --no-merges --pretty=format:%s -1)
|
|
35
|
+
- export author=$(git log --no-merges --pretty=format:%an -1)
|
|
36
|
+
- cnpm i
|
|
37
|
+
- npm run build
|
|
38
|
+
- cnpm publish
|
|
39
|
+
- curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=0ae9c0e9-3e15-49cf-9493-8f880943c6f0' -H 'Content-Type:application/json' -d '{"msgtype":"text","text":{"content":"'${project_name}'发包成功,版本号:'${version}',提交人:'${author}',提交信息:'${message}'"}}'
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
package/.prettierrc.js
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# miniprogram-custom-component
|
|
2
|
+
|
|
3
|
+
**注意事项(一定按照格式来开发):**
|
|
4
|
+
|
|
5
|
+
1. 每次新增业务模块,就在src下建一个文件夹,首字母大写,后面单词以驼峰命名跟着
|
|
6
|
+
2. 要在tools下config.js最后,copy数组加入你新增这个文件夹名字,这样才会对你新加的进行打包
|
|
7
|
+
3. 每个业务模块下,建一个README.md文件,里面写好这个组件的开发或维护者、以及组件的使用注意事项等(参考ConfirmOrder里的readme.md)
|
|
8
|
+
4. 接口api参照src---common---api文件夹,confirmOrder.js,每个组件单独创建一个api的js,以组件名小写来命名
|
|
9
|
+
5. src---common文件,存放公共css、方法、图片资源、请求等
|
|
10
|
+
6. 原生小程序只支持css,不天然支持less,如果要使用less,开发工具vscode、微信开发者工具,这两个的配置不一样,可以参照网上的配置,然后在业务组件的文件夹下创建一个index.less,打包会自动编译成css文件的
|
|
11
|
+
7. 引入图片,过大的图片记得压缩或者使用网络地址
|
|
12
|
+
8. 由于引入了vant-ui,所以再用微信开发者工具打开miniprogram_dev运行时,记得点击左上方工具---npm构建,不然会报找不到文件
|
|
13
|
+
9. 由于这次同时开发这个项目人过多,采取这种方式拉分支,主分支:dev,每个人拉自己的开发分支,命名:dev-自己英文名,最多每两天将自己分支代码合到dev分支
|
|
14
|
+
10. 如果组件的组件目录下还需要分更小的组件,就在自己组件的目录下创建components,写在这下面,组件间的嵌套至多3层
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
小程序自定义组件开发模板:
|
|
19
|
+
|
|
20
|
+
* 支持使用 less 语法编写 wxss 文件
|
|
21
|
+
* 使用 webpack 构建 js
|
|
22
|
+
* 支持自定义组件单元测试
|
|
23
|
+
* 支持 eslint
|
|
24
|
+
* 支持多入口构建
|
|
25
|
+
|
|
26
|
+
## 开发
|
|
27
|
+
|
|
28
|
+
1. 安装依赖:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
npm install
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
2. 执行命令:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
npm run dev
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
默认会在包根目录下生成 miniprogram\_dev 目录,src 中的源代码会被构建并生成到 miniprogram\_dev/components 目录下。如果需要监听文件变化动态构建,则可以执行命令:
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
npm run watch
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
> ps: 如果 minirpogram\_dev 目录下已存在小程序 demo,执行`npm run dev`则不会再将 tools 下的 demo 拷贝到此目录下。而执行`npm run watch`则会监听 tools 目录下的 demo 变动并进行拷贝。
|
|
47
|
+
|
|
48
|
+
3. 生成的 miniprogram\_dev 目录是一个小程序项目目录,以此目录作为小程序项目目录在开发者工具中打开即可查看自定义组件被使用的效果。
|
|
49
|
+
|
|
50
|
+
4. 进阶:
|
|
51
|
+
|
|
52
|
+
* 如果有额外的构建需求,可自行修改 tools 目录中的构建脚本。
|
|
53
|
+
* 内置支持 webpack、less 语法、sourcemap 等功能,默认关闭。如若需要可以自行修改 tools/config.js 配置文件中相关配置。
|
|
54
|
+
* 内置支持多入口构建,如若需要可自行调整 tools/config.js 配置文件的 entry 字段。
|
|
55
|
+
* 默认开启 eslint,可自行调整规则或在 tools/config.js 中注释掉 eslint-loader 行来关闭此功能。
|
|
56
|
+
|
|
57
|
+
## 使用less
|
|
58
|
+
|
|
59
|
+
- 官方框架也配置了使用less的配置,但是这里我用的是另外的一种方案
|
|
60
|
+
- vscode使用less
|
|
61
|
+
- vscode中下载Easy Less插件,并在setting文件中配置
|
|
62
|
+
|
|
63
|
+
```javascript
|
|
64
|
+
// 对EasyLess的配置,此段配置去掉则默认生成一个css文件
|
|
65
|
+
"less.compile": {
|
|
66
|
+
"compress": false, //是否压缩
|
|
67
|
+
"sourceMap": false, //是否生成map文件
|
|
68
|
+
"out": true, // 是否输出文件,false为不输出
|
|
69
|
+
"outExt": ".wxss", // 输出文件的后缀,小程序可以写'wxss'
|
|
70
|
+
},
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
- 然后在对应的目录下新建一个***.less 文件,保存后就自动生成了wxss文件
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
## 目录结构
|
|
78
|
+
|
|
79
|
+
以下为推荐使用的目录结构,如果有必要开发者也可以自行做一些调整:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
|--miniprogram_dev // 开发环境构建目录
|
|
83
|
+
|--miniprogram_dist // 生产环境构建目录
|
|
84
|
+
|--src // 源码
|
|
85
|
+
| |--components // 通用自定义组件
|
|
86
|
+
| |--images // 图片资源
|
|
87
|
+
| |
|
|
88
|
+
| |--xxx.js/xxx.wxml/xxx.json/xxx.wxss // 暴露的 js 模块/自定义组件入口文件
|
|
89
|
+
|
|
|
90
|
+
|--test // 测试用例
|
|
91
|
+
|--tools // 构建相关代码
|
|
92
|
+
| |--demo // demo 小程序目录,开发环境下会被拷贝生成到 miniprogram_dev 目录中
|
|
93
|
+
| |--config.js // 构建相关配置文件
|
|
94
|
+
|
|
|
95
|
+
|--gulpfile.js
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
> PS:对外暴露的 js 模块/自定义组件请放在 src 目录下,不宜放置在过深的目录。另外新增的暴露模块需要在 tools/config.js 的 entry 字段中补充,不然不会进行构建。
|
|
99
|
+
|
|
100
|
+
## 测试
|
|
101
|
+
|
|
102
|
+
* 执行测试用例:
|
|
103
|
+
|
|
104
|
+
```
|
|
105
|
+
npm run test
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
* 执行测试用例并进入 node inspect 调试:
|
|
109
|
+
|
|
110
|
+
```
|
|
111
|
+
npm run test-debug
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
* 检测覆盖率:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
npm run coverage
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
测试用例放在 test 目录下,使用 **miniprogram-simulate** 工具集进行测试,[点击此处查看](https://github.com/wechat-miniprogram/miniprogram-simulate/blob/master/README.md)使用方法。在测试中可能需要变更或调整工具集中的一些方法,可在 test/utils 下自行实现。
|
|
121
|
+
|
|
122
|
+
## 其他命令
|
|
123
|
+
|
|
124
|
+
* 清空 miniprogram_dist 目录:
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
npm run clean
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
* 清空 miniprogam_dev 目录:
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
npm run clean-dev
|
|
134
|
+
```
|
package/gulpfile.js
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
const gulp = require('gulp')
|
|
2
|
+
const clean = require('gulp-clean')
|
|
3
|
+
|
|
4
|
+
const config = require('./tools/config')
|
|
5
|
+
const BuildTask = require('./tools/build')
|
|
6
|
+
const id = require('./package.json').name || 'miniprogram-custom-component'
|
|
7
|
+
|
|
8
|
+
// 构建任务实例
|
|
9
|
+
// eslint-disable-next-line no-new
|
|
10
|
+
new BuildTask(id, config.entry)
|
|
11
|
+
|
|
12
|
+
// 清空生成目录和文件
|
|
13
|
+
gulp.task('clean', gulp.series(() => gulp.src(config.distPath, {read: false, allowEmpty: true}).pipe(clean()), done => {
|
|
14
|
+
if (config.isDev) {
|
|
15
|
+
return gulp.src(config.demoDist, {read: false, allowEmpty: true})
|
|
16
|
+
.pipe(clean())
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
return done()
|
|
20
|
+
}))
|
|
21
|
+
// 监听文件变化并进行开发模式构建
|
|
22
|
+
gulp.task('watch', gulp.series(`${id}-watch`))
|
|
23
|
+
// 开发模式构建
|
|
24
|
+
gulp.task('dev', gulp.series(`${id}-dev`))
|
|
25
|
+
// 生产模式构建
|
|
26
|
+
gulp.task('default', gulp.series(`${id}-default`))
|
package/package.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "xiaoe_mp_npm",
|
|
3
|
+
"version": "0.0.28-t1206",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "miniprogram_dist/index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"dev": "gulp dev --develop",
|
|
8
|
+
"watch": "gulp watch --develop --watch",
|
|
9
|
+
"build": "gulp",
|
|
10
|
+
"dist": "npm run build",
|
|
11
|
+
"clean-dev": "gulp clean --develop",
|
|
12
|
+
"clean": "gulp clean",
|
|
13
|
+
"test": "jest --bail",
|
|
14
|
+
"test-debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --bail",
|
|
15
|
+
"coverage": "jest ./test/* --coverage --bail",
|
|
16
|
+
"lint": "eslint \"src/**/*.js\" --fix",
|
|
17
|
+
"lint-tools": "eslint \"tools/**/*.js\" --rule \"import/no-extraneous-dependencies: false\" --fix"
|
|
18
|
+
},
|
|
19
|
+
"miniprogram": "miniprogram_dist",
|
|
20
|
+
"jest": {
|
|
21
|
+
"testEnvironment": "jsdom",
|
|
22
|
+
"testURL": "https://jest.test",
|
|
23
|
+
"collectCoverageFrom": [
|
|
24
|
+
"miniprogram_dist/**/*.js"
|
|
25
|
+
],
|
|
26
|
+
"moduleDirectories": [
|
|
27
|
+
"node_modules",
|
|
28
|
+
"miniprogram_dist"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": ""
|
|
34
|
+
},
|
|
35
|
+
"author": "",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@typescript-eslint/eslint-plugin": "^2.28.0",
|
|
39
|
+
"@typescript-eslint/parser": "^2.28.0",
|
|
40
|
+
"babel-core": "^6.26.3",
|
|
41
|
+
"babel-loader": "^7.1.5",
|
|
42
|
+
"babel-plugin-module-resolver": "^3.2.0",
|
|
43
|
+
"babel-preset-env": "^1.7.0",
|
|
44
|
+
"colors": "^1.3.1",
|
|
45
|
+
"eslint": "^5.14.1",
|
|
46
|
+
"eslint-config-airbnb-base": "13.1.0",
|
|
47
|
+
"eslint-loader": "^2.1.2",
|
|
48
|
+
"eslint-plugin-import": "^2.16.0",
|
|
49
|
+
"eslint-plugin-node": "^7.0.1",
|
|
50
|
+
"eslint-plugin-promise": "^3.8.0",
|
|
51
|
+
"gulp": "^4.0.0",
|
|
52
|
+
"gulp-clean": "^0.4.0",
|
|
53
|
+
"gulp-if": "^2.0.2",
|
|
54
|
+
"gulp-install": "^1.1.0",
|
|
55
|
+
"gulp-less": "^4.0.1",
|
|
56
|
+
"gulp-rename": "^1.4.0",
|
|
57
|
+
"gulp-sourcemaps": "^2.6.5",
|
|
58
|
+
"jest": "^23.5.0",
|
|
59
|
+
"miniprogram-api-typings": "^2.10.3-1",
|
|
60
|
+
"miniprogram-computed": "^2.0.1",
|
|
61
|
+
"miniprogram-simulate": "^1.2.5",
|
|
62
|
+
"thread-loader": "^2.1.3",
|
|
63
|
+
"through2": "^2.0.3",
|
|
64
|
+
"ts-loader": "^7.0.0",
|
|
65
|
+
"lodash": "4.17.20",
|
|
66
|
+
"typescript": "^3.8.3",
|
|
67
|
+
"vinyl": "^2.2.0",
|
|
68
|
+
"webpack": "^4.29.5",
|
|
69
|
+
"webpack-node-externals": "^1.7.2"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@vant/weapp": "^1.9.2",
|
|
73
|
+
"live-mp-tools": "1.0.9",
|
|
74
|
+
"miniprogram-computed": "^2.0.1",
|
|
75
|
+
"@xiaoe/mp-plugins-info-collection": "0.0.14-t1206"
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "项目配置文件",
|
|
3
|
+
"packOptions": {
|
|
4
|
+
"ignore": []
|
|
5
|
+
},
|
|
6
|
+
"setting": {
|
|
7
|
+
"urlCheck": true,
|
|
8
|
+
"es6": true,
|
|
9
|
+
"enhance": true,
|
|
10
|
+
"postcss": true,
|
|
11
|
+
"preloadBackgroundData": false,
|
|
12
|
+
"minified": true,
|
|
13
|
+
"newFeature": false,
|
|
14
|
+
"coverView": true,
|
|
15
|
+
"nodeModules": true,
|
|
16
|
+
"autoAudits": false,
|
|
17
|
+
"showShadowRootInWxmlPanel": true,
|
|
18
|
+
"scopeDataCheck": false,
|
|
19
|
+
"uglifyFileName": false,
|
|
20
|
+
"checkInvalidKey": true,
|
|
21
|
+
"checkSiteMap": true,
|
|
22
|
+
"uploadWithSourceMap": true,
|
|
23
|
+
"compileHotReLoad": false,
|
|
24
|
+
"lazyloadPlaceholderEnable": false,
|
|
25
|
+
"useMultiFrameRuntime": true,
|
|
26
|
+
"useApiHook": true,
|
|
27
|
+
"useApiHostProcess": true,
|
|
28
|
+
"babelSetting": {
|
|
29
|
+
"ignore": [],
|
|
30
|
+
"disablePlugins": [],
|
|
31
|
+
"outputPath": ""
|
|
32
|
+
},
|
|
33
|
+
"enableEngineNative": false,
|
|
34
|
+
"useIsolateContext": true,
|
|
35
|
+
"userConfirmedBundleSwitch": false,
|
|
36
|
+
"packNpmManually": false,
|
|
37
|
+
"packNpmRelationList": [],
|
|
38
|
+
"minifyWXSS": true,
|
|
39
|
+
"disableUseStrict": false,
|
|
40
|
+
"minifyWXML": true,
|
|
41
|
+
"showES6CompileOption": false,
|
|
42
|
+
"useCompilerPlugins": false
|
|
43
|
+
},
|
|
44
|
+
"compileType": "miniprogram",
|
|
45
|
+
"libVersion": "2.19.2",
|
|
46
|
+
"appid": "wx0c3417205d9852a9",
|
|
47
|
+
"projectname": "live-dev",
|
|
48
|
+
"debugOptions": {
|
|
49
|
+
"hidedInDevtools": []
|
|
50
|
+
},
|
|
51
|
+
"scripts": {},
|
|
52
|
+
"staticServerOptions": {
|
|
53
|
+
"baseURL": "",
|
|
54
|
+
"servePath": ""
|
|
55
|
+
},
|
|
56
|
+
"isGameTourist": false,
|
|
57
|
+
"condition": {
|
|
58
|
+
"search": {
|
|
59
|
+
"list": []
|
|
60
|
+
},
|
|
61
|
+
"conversation": {
|
|
62
|
+
"list": []
|
|
63
|
+
},
|
|
64
|
+
"game": {
|
|
65
|
+
"list": []
|
|
66
|
+
},
|
|
67
|
+
"plugin": {
|
|
68
|
+
"list": []
|
|
69
|
+
},
|
|
70
|
+
"gamePlugin": {
|
|
71
|
+
"list": []
|
|
72
|
+
},
|
|
73
|
+
"miniprogram": {
|
|
74
|
+
"list": []
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// import room from '@/api/room';
|
|
2
|
+
import {
|
|
3
|
+
getInviteDetail
|
|
4
|
+
} from "../../../../common/api/eLiveInvite";
|
|
5
|
+
Component({
|
|
6
|
+
properties: {
|
|
7
|
+
inviteParm: {
|
|
8
|
+
type: String,
|
|
9
|
+
value: ''
|
|
10
|
+
},
|
|
11
|
+
appId: {
|
|
12
|
+
type: String,
|
|
13
|
+
value: ''
|
|
14
|
+
},
|
|
15
|
+
userId: {
|
|
16
|
+
type: String,
|
|
17
|
+
value: ''
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
data: {
|
|
21
|
+
isShowFriends: false,
|
|
22
|
+
count: 0, // 邀请的好友数
|
|
23
|
+
friendList: [
|
|
24
|
+
// {
|
|
25
|
+
// wx_avatar: '/assets/alive_invite/test-moira/1.png',
|
|
26
|
+
// wx_nickname: 'wendy'
|
|
27
|
+
// }, {
|
|
28
|
+
// wx_avatar: '/assets/alive_invite/test-moira/2.jpg',
|
|
29
|
+
// wx_nickname: 'moira1'
|
|
30
|
+
// }, {
|
|
31
|
+
// wx_avatar: '/assets/alive_invite/test-moira/3.jpg',
|
|
32
|
+
// wx_nickname: 'moira2'
|
|
33
|
+
// }
|
|
34
|
+
// , {
|
|
35
|
+
// wx_nickname: 'moira333333'
|
|
36
|
+
// }
|
|
37
|
+
// , {
|
|
38
|
+
// wx_avatar: '/assets/alive_invite/test-moira/4.jpg',
|
|
39
|
+
// wx_nickname: 'moira4'
|
|
40
|
+
// }
|
|
41
|
+
// , {
|
|
42
|
+
// wx_avatar: '/assets/alive_invite/test-moira/5.png',
|
|
43
|
+
// wx_nickname: 'moira5'
|
|
44
|
+
// }
|
|
45
|
+
// , {
|
|
46
|
+
// wx_nickname: 'moira6'
|
|
47
|
+
// }
|
|
48
|
+
|
|
49
|
+
] //邀请的好友列表
|
|
50
|
+
},
|
|
51
|
+
ready() {
|
|
52
|
+
},
|
|
53
|
+
methods: {
|
|
54
|
+
closeFriends() {
|
|
55
|
+
this.setData({
|
|
56
|
+
isShowFriends: false
|
|
57
|
+
})
|
|
58
|
+
},
|
|
59
|
+
showFriends() {
|
|
60
|
+
this.setData({
|
|
61
|
+
isShowFriends: true
|
|
62
|
+
})
|
|
63
|
+
this.getFriendsList()
|
|
64
|
+
},
|
|
65
|
+
getFriendsList() {
|
|
66
|
+
// let params = {
|
|
67
|
+
// "bizData": {
|
|
68
|
+
// "inviteParm": this.data.inviteParm,
|
|
69
|
+
// "page": 0,
|
|
70
|
+
// "count": 10,
|
|
71
|
+
// },
|
|
72
|
+
// "user_id": this.properties.userId,
|
|
73
|
+
// "app_id": this.properties.appId
|
|
74
|
+
// };
|
|
75
|
+
let params = {
|
|
76
|
+
"bizData": {
|
|
77
|
+
"inviteParm": this.data.inviteParm,
|
|
78
|
+
"page": 0,
|
|
79
|
+
"count": 10,
|
|
80
|
+
},
|
|
81
|
+
"user_id": this.properties.userId,
|
|
82
|
+
"app_id": "appmzd7lhrj6214"
|
|
83
|
+
};
|
|
84
|
+
getInviteDetail(params).then(res => {
|
|
85
|
+
let DATA = res.data;
|
|
86
|
+
if (DATA.code === 0) {
|
|
87
|
+
this.setData({
|
|
88
|
+
friendList: DATA.data
|
|
89
|
+
})
|
|
90
|
+
} else {
|
|
91
|
+
wx.showToast({
|
|
92
|
+
title: DATA.msg,
|
|
93
|
+
icon: 'error'
|
|
94
|
+
})
|
|
95
|
+
}
|
|
96
|
+
}).catch(err => {
|
|
97
|
+
wx.showToast({
|
|
98
|
+
title: err.data.msg,
|
|
99
|
+
icon: 'error'
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
},
|
|
103
|
+
}
|
|
104
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<view class="container-friends" wx:if="{{isShowFriends}}">
|
|
2
|
+
<view bindtap="closeFriends" class="header">
|
|
3
|
+
<image
|
|
4
|
+
class="icon-left-back"
|
|
5
|
+
src="../../../images/icon_arrow_up.png"
|
|
6
|
+
/>
|
|
7
|
+
邀请的好友
|
|
8
|
+
<view class="count-style">{{ ' ('+friendList.length+') ' }}</view>
|
|
9
|
+
</view>
|
|
10
|
+
<view class="friend-list">
|
|
11
|
+
<view
|
|
12
|
+
class="friend-item"
|
|
13
|
+
wx:for="{{friendList}}"
|
|
14
|
+
>
|
|
15
|
+
<image wx:if="{{item.wx_avatar}}" class="img-avatar" src="{{item.wx_avatar}}" />
|
|
16
|
+
<image wx:else class="img-avatar" src="//wechatavator-1252524126.cos.ap-shanghai.myqcloud.com/aaa/default.svg" />
|
|
17
|
+
<view class="name">
|
|
18
|
+
{{ item.wx_nickname }}
|
|
19
|
+
</view>
|
|
20
|
+
</view>
|
|
21
|
+
</view>
|
|
22
|
+
</view>
|