From 396f5f32d543dcddce6580794b1fd287131257f6 Mon Sep 17 00:00:00 2001 From: liu Date: Fri, 24 Mar 2023 11:24:28 +0800 Subject: [PATCH] 22 --- .../components/actionsheet/actionsheet.js | 170 ++ .../components/actionsheet/actionsheet.json | 4 + .../components/actionsheet/actionsheet.wxml | 52 + .../components/actionsheet/actionsheet.wxss | 10 + .../components/ad-alert/index.js | 121 ++ .../components/ad-alert/index.json | 4 + .../components/ad-alert/index.wxml | 16 + .../components/ad-alert/index.wxss | 40 + .../components/addCartBtn/index.js | 18 + .../components/addCartBtn/index.json | 4 + .../components/addCartBtn/index.wxml | 3 + .../components/addCartBtn/index.wxss | 11 + .../components/advimg/index.js | 108 ++ .../components/advimg/index.json | 4 + .../components/advimg/index.wxml | 6 + .../components/advimg/index.wxss | 24 + .../components/asideBtn/index.js | 29 + .../components/asideBtn/index.json | 4 + .../components/asideBtn/index.wxml | 14 + .../components/asideBtn/index.wxss | 59 + .../components/auth/index.js | 144 ++ .../components/auth/index.json | 7 + .../components/auth/index.wxml | 14 + .../components/auth/index.wxss | 61 + .../components/behavior/goods.js | 318 ++++ .../components/button/index.js | 81 + .../components/button/index.json | 4 + .../components/button/index.wxml | 6 + .../components/button/index.wxss | 127 ++ .../components/card/index.js | 7 + .../components/card/index.json | 4 + .../components/card/index.wxml | 11 + .../components/card/index.wxss | 9 + .../components/cartBtn/index.js | 21 + .../components/cartBtn/index.json | 4 + .../components/cartBtn/index.wxml | 5 + .../components/cartBtn/index.wxss | 37 + .../components/cashon_delivery/index.js | 40 + .../components/cashon_delivery/index.json | 6 + .../components/cashon_delivery/index.wxml | 25 + .../components/cashon_delivery/index.wxss | 2 + .../components/changeCommunity/index.js | 85 + .../components/changeCommunity/index.json | 6 + .../components/changeCommunity/index.wxml | 39 + .../components/changeCommunity/index.wxss | 112 ++ .../components/chooseImage/index.js | 106 ++ .../components/chooseImage/index.json | 4 + .../components/chooseImage/index.wxml | 15 + .../components/chooseImage/index.wxss | 81 + .../components/comming-spu-disabled/index.js | 43 + .../comming-spu-disabled/index.json | 7 + .../comming-spu-disabled/index.wxml | 20 + .../comming-spu-disabled/index.wxss | 113 ++ .../components/community-item/index.js | 66 + .../components/community-item/index.json | 4 + .../components/community-item/index.wxml | 18 + .../components/community-item/index.wxss | 88 + .../components/count-down/index.js | 81 + .../components/count-down/index.json | 6 + .../components/count-down/index.wxml | 7 + .../components/count-down/index.wxss | 12 + .../datetimepicker/datetimepicker.js | 277 +++ .../datetimepicker/datetimepicker.json | 4 + .../datetimepicker/datetimepicker.wxml | 5 + .../datetimepicker/datetimepicker.wxss | 5 + .../components/dialog/index.js | 29 + .../components/dialog/index.json | 7 + .../components/dialog/index.wxml | 22 + .../components/dialog/index.wxss | 46 + .../components/diy-goods-list/index.js | 64 + .../components/diy-goods-list/index.json | 4 + .../components/diy-goods-list/index.wxml | 3 + .../components/diy-goods-list/index.wxss | 0 .../components/diy-many-goods-list/index.js | 75 + .../components/diy-many-goods-list/index.json | 4 + .../components/diy-many-goods-list/index.wxml | 14 + .../components/diy-many-goods-list/index.wxss | 47 + .../components/diy-nav/index.js | 133 ++ .../components/diy-nav/index.json | 4 + .../components/diy-nav/index.wxml | 31 + .../components/diy-nav/index.wxss | 48 + .../components/diy-pintuan/index.js | 81 + .../components/diy-pintuan/index.json | 6 + .../components/diy-pintuan/index.wxml | 121 ++ .../components/diy-pintuan/index.wxss | 243 +++ .../components/empty/index.js | 23 + .../components/empty/index.json | 4 + .../components/empty/index.wxml | 4 + .../components/empty/index.wxss | 21 + .../components/fetch-coder/index.js | 23 + .../components/fetch-coder/index.json | 6 + .../components/fetch-coder/index.wxml | 15 + .../components/fetch-coder/index.wxss | 65 + .../components/fixed-bottom/index.js | 12 + .../components/fixed-bottom/index.json | 4 + .../components/fixed-bottom/index.wxml | 3 + .../components/fixed-bottom/index.wxss | 13 + .../components/form/apply.js | 118 ++ .../components/form/apply.json | 4 + .../components/form/apply.wxml | 29 + .../components/form/apply.wxss | 70 + .../components/get-phone/index.js | 84 + .../components/get-phone/index.json | 7 + .../components/get-phone/index.wxml | 14 + .../components/get-phone/index.wxss | 66 + .../components/goodsInfo/index.js | 65 + .../components/goodsInfo/index.json | 6 + .../components/goodsInfo/index.wxml | 47 + .../components/goodsInfo/index.wxss | 62 + .../components/guess-like/index.js | 239 +++ .../components/guess-like/index.json | 11 + .../components/guess-like/index.wxml | 22 + .../components/guess-like/index.wxss | 90 + .../components/image/index.js | 65 + .../components/image/index.json | 4 + .../components/image/index.wxml | 4 + .../components/image/index.wxss | 8 + eaterplanet_ecommerce/components/img/index.js | 60 + .../components/img/index.json | 4 + .../components/img/index.wxml | 4 + .../components/img/index.wxss | 16 + .../components/index-item/index.js | 31 + .../components/index-item/index.json | 4 + .../components/index-item/index.wxml | 6 + .../components/index-item/index.wxss | 12 + .../components/index/index.js | 155 ++ .../components/index/index.json | 4 + .../components/index/index.wxml | 16 + .../components/index/index.wxss | 91 + .../components/input-number/index.js | 114 ++ .../components/input-number/index.json | 4 + .../components/input-number/index.wxml | 16 + .../components/input-number/index.wxss | 41 + .../components/load-more/index.js | 16 + .../components/load-more/index.json | 4 + .../components/load-more/index.wxml | 8 + .../components/load-more/index.wxss | 69 + .../components/menutabs/index.js | 113 ++ .../components/menutabs/index.json | 4 + .../components/menutabs/index.wxml | 11 + .../components/menutabs/index.wxss | 85 + .../components/modal-userProfile/index.js | 237 +++ .../components/modal-userProfile/index.json | 7 + .../components/modal-userProfile/index.wxml | 21 + .../components/modal-userProfile/index.wxss | 113 ++ .../components/modal/index.js | 51 + .../components/modal/index.json | 3 + .../components/modal/index.wxml | 4 + .../components/modal/index.wxss | 70 + .../components/mp-dialog/dialog.js | 168 ++ .../components/mp-dialog/dialog.json | 4 + .../components/mp-dialog/dialog.wxml | 21 + .../components/mp-dialog/dialog.wxss | 1 + .../components/navigation-bar/index.js | 255 +++ .../components/navigation-bar/index.json | 6 + .../components/navigation-bar/index.wxml | 54 + .../components/navigation-bar/index.wxss | 260 +++ .../components/new-auth/index.js | 210 +++ .../components/new-auth/index.json | 7 + .../components/new-auth/index.wxml | 18 + .../components/new-auth/index.wxss | 93 + .../components/new-comer/index.js | 94 + .../components/new-comer/index.json | 9 + .../components/new-comer/index.wxml | 38 + .../components/new-comer/index.wxss | 194 ++ .../components/new-rush-spu/index.js | 5 + .../components/new-rush-spu/index.json | 12 + .../components/new-rush-spu/index.wxml | 65 + .../components/new-rush-spu/index.wxss | 364 ++++ .../components/order-notify/index.js | 75 + .../components/order-notify/index.json | 4 + .../components/order-notify/index.wxml | 4 + .../components/order-notify/index.wxss | 52 + .../components/order/orderInfoExpress.js | 74 + .../components/order/orderInfoExpress.json | 6 + .../components/order/orderInfoExpress.wxml | 85 + .../components/order/orderInfoExpress.wxss | 64 + .../components/orderComment/index.js | 10 + .../components/orderComment/index.json | 6 + .../components/orderComment/index.wxml | 10 + .../components/orderComment/index.wxss | 17 + .../components/orderInfo/index.js | 92 + .../components/orderInfo/index.json | 6 + .../components/orderInfo/index.wxml | 134 ++ .../components/orderInfo/index.wxss | 43 + .../components/painter/lib/calc.js | 54 + .../components/painter/lib/downloader.js | 363 ++++ .../components/painter/lib/gradient.js | 102 ++ .../components/painter/lib/pen.js | 903 ++++++++++ .../components/painter/lib/qrcode.js | 784 +++++++++ .../components/painter/lib/sha1.js | 97 + .../components/painter/lib/string-polyfill.js | 46 + .../components/painter/lib/util.js | 78 + .../components/painter/lib/wx-canvas.js | 619 +++++++ .../components/painter/painter.js | 869 +++++++++ .../components/painter/painter.json | 4 + .../components/painter/painter.wxml | 21 + .../components/parser/libs/CssHandler.js | 97 + .../components/parser/libs/MpHtmlParser.js | 526 ++++++ .../components/parser/libs/config.js | 63 + .../components/parser/parser.js | 204 +++ .../components/parser/parser.json | 6 + .../components/parser/parser.wxml | 3 + .../components/parser/parser.wxss | 19 + .../components/parser/trees/trees.js | 122 ++ .../components/parser/trees/trees.json | 6 + .../components/parser/trees/trees.wxml | 65 + .../components/parser/trees/trees.wxss | 184 ++ .../components/router-link/router-link.js | 114 ++ .../components/router-link/router-link.json | 4 + .../components/router-link/router-link.wxml | 3 + .../components/router-link/router-link.wxss | 3 + .../components/rush-spu-big/index.js | 5 + .../components/rush-spu-big/index.json | 11 + .../components/rush-spu-big/index.wxml | 62 + .../components/rush-spu-big/index.wxss | 318 ++++ .../components/rush-spu-col/index.js | 5 + .../components/rush-spu-col/index.json | 11 + .../components/rush-spu-col/index.wxml | 47 + .../components/rush-spu-col/index.wxss | 182 ++ .../components/s-form-show/index.js | 40 + .../components/s-form-show/index.json | 4 + .../components/s-form-show/index.wxml | 10 + .../components/s-form-show/index.wxss | 1 + .../components/s-form/index.js | 345 ++++ .../components/s-form/index.json | 8 + .../components/s-form/index.wxml | 76 + .../components/s-form/index.wxss | 41 + .../components/seckillItem/seckillItem.js | 77 + .../components/seckillItem/seckillItem.json | 8 + .../components/seckillItem/seckillItem.wxml | 37 + .../components/seckillItem/seckillItem.wxss | 153 ++ .../components/skeleton/getSystemInfo.js | 35 + .../components/skeleton/skeleton.js | 88 + .../components/skeleton/skeleton.json | 4 + .../components/skeleton/skeleton.wxml | 5 + .../components/skeleton/skeleton.wxss | 1 + eaterplanet_ecommerce/components/sku/index.js | 431 +++++ .../components/sku/index.json | 10 + .../components/sku/index.wxml | 69 + .../components/sku/index.wxss | 275 +++ .../components/spike/index.js | 112 ++ .../components/spike/index.json | 10 + .../components/spike/index.wxml | 27 + .../components/spike/index.wxss | 36 + .../components/tabbar/index.js | 214 +++ .../components/tabbar/index.json | 4 + .../components/tabbar/index.wxml | 19 + .../components/tabbar/index.wxss | 82 + .../components/tabs/index.js | 113 ++ .../components/tabs/index.json | 4 + .../components/tabs/index.wxml | 9 + .../components/tabs/index.wxss | 89 + .../components/time-range/index.js | 146 ++ .../components/time-range/index.json | 6 + .../components/time-range/index.wxml | 39 + .../components/time-range/index.wxss | 8 + .../components/timePicker/timePicker.js | 572 ++++++ .../components/timePicker/timePicker.json | 4 + .../components/timePicker/timePicker.wxml | 66 + .../components/timePicker/timePicker.wxss | 88 + .../components/topic/topic.js | 97 + .../components/topic/topic.json | 9 + .../components/topic/topic.wxml | 25 + .../components/topic/topic.wxss | 28 + .../components/tworow/index.js | 5 + .../components/tworow/index.json | 11 + .../components/tworow/index.wxml | 53 + .../components/tworow/index.wxss | 216 +++ .../components/vipModal/index.js | 32 + .../components/vipModal/index.json | 6 + .../components/vipModal/index.wxml | 9 + .../components/vipModal/index.wxss | 15 + .../components/vipPrice/vipPrice.js | 23 + .../components/vipPrice/vipPrice.json | 4 + .../components/vipPrice/vipPrice.wxml | 2 + .../components/vipPrice/vipPrice.wxss | 14 + .../distributionCenter/pages/apply.js | 280 +++ .../distributionCenter/pages/apply.json | 7 + .../distributionCenter/pages/apply.wxml | 63 + .../distributionCenter/pages/apply.wxss | 166 ++ .../distributionCenter/pages/details.js | 84 + .../distributionCenter/pages/details.json | 9 + .../distributionCenter/pages/details.wxml | 14 + .../distributionCenter/pages/details.wxss | 37 + .../distributionCenter/pages/excharge.js | 400 +++++ .../distributionCenter/pages/excharge.json | 8 + .../distributionCenter/pages/excharge.wxml | 59 + .../distributionCenter/pages/excharge.wxss | 1 + .../pages/exchargeRecord.js | 120 ++ .../pages/exchargeRecord.json | 7 + .../pages/exchargeRecord.wxml | 22 + .../pages/exchargeRecord.wxss | 63 + .../distributionCenter/pages/fans.js | 172 ++ .../distributionCenter/pages/fans.json | 10 + .../distributionCenter/pages/fans.wxml | 30 + .../distributionCenter/pages/fans.wxss | 146 ++ .../distributionCenter/pages/goodsDetails.js | 177 ++ .../pages/goodsDetails.json | 10 + .../pages/goodsDetails.wxml | 86 + .../pages/goodsDetails.wxss | 267 +++ .../distributionCenter/pages/me.js | 160 ++ .../distributionCenter/pages/me.json | 8 + .../distributionCenter/pages/me.wxml | 50 + .../distributionCenter/pages/me.wxss | 72 + .../distributionCenter/pages/member.js | 174 ++ .../distributionCenter/pages/member.json | 10 + .../distributionCenter/pages/member.wxml | 31 + .../distributionCenter/pages/member.wxss | 151 ++ .../distributionCenter/pages/memberInfo.js | 125 ++ .../distributionCenter/pages/memberInfo.json | 6 + .../distributionCenter/pages/memberInfo.wxml | 23 + .../distributionCenter/pages/memberInfo.wxss | 39 + .../distributionCenter/pages/recruit.js | 261 +++ .../distributionCenter/pages/recruit.json | 9 + .../distributionCenter/pages/recruit.wxml | 27 + .../distributionCenter/pages/recruit.wxss | 48 + .../distributionCenter/pages/share.js | 225 +++ .../distributionCenter/pages/share.json | 8 + .../distributionCenter/pages/share.wxml | 39 + .../distributionCenter/pages/share.wxss | 178 ++ .../moduleA/components/cartModal.js | 165 ++ .../moduleA/components/cartModal.json | 7 + .../moduleA/components/cartModal.wxml | 31 + .../moduleA/components/cartModal.wxss | 18 + .../moduleA/components/img-box/img-box.js | 60 + .../moduleA/components/img-box/img-box.json | 4 + .../moduleA/components/img-box/img-box.wxml | 14 + .../moduleA/components/img-box/img-box.wxss | 75 + .../moduleA/components/masonry/masonry.js | 165 ++ .../moduleA/components/masonry/masonry.json | 6 + .../moduleA/components/masonry/masonry.wxml | 16 + .../moduleA/components/masonry/masonry.wxss | 13 + .../moduleA/components/menuGoodsItem.js | 220 +++ .../moduleA/components/menuGoodsItem.json | 11 + .../moduleA/components/menuGoodsItem.wxml | 44 + .../moduleA/components/menuGoodsItem.wxss | 147 ++ .../moduleA/components/pinGoods.js | 63 + .../moduleA/components/pinGoods.json | 8 + .../moduleA/components/pinGoods.wxml | 41 + .../moduleA/components/pinGoods.wxss | 174 ++ .../moduleA/components/pinGoodsInfo.js | 55 + .../moduleA/components/pinGoodsInfo.json | 6 + .../moduleA/components/pinGoodsInfo.wxml | 15 + .../moduleA/components/pinGoodsInfo.wxss | 79 + .../moduleA/components/rushBig.js | 65 + .../moduleA/components/rushBig.json | 8 + .../moduleA/components/rushBig.wxml | 45 + .../moduleA/components/rushBig.wxss | 275 +++ .../moduleA/components/rushNormal.js | 65 + .../moduleA/components/rushNormal.json | 8 + .../moduleA/components/rushNormal.wxml | 45 + .../moduleA/components/rushNormal.wxss | 272 +++ .../components/score-guess-like/index.js | 92 + .../components/score-guess-like/index.json | 8 + .../components/score-guess-like/index.wxml | 15 + .../components/score-guess-like/index.wxss | 93 + .../moduleA/components/solitaireGood.js | 228 +++ .../moduleA/components/solitaireGood.json | 7 + .../moduleA/components/solitaireGood.wxml | 134 ++ .../moduleA/components/solitaireGood.wxss | 179 ++ .../moduleA/components/solitaireHead.js | 45 + .../moduleA/components/solitaireHead.json | 4 + .../moduleA/components/solitaireHead.wxml | 14 + .../moduleA/components/solitaireHead.wxss | 39 + .../moduleA/coupon/getCoupon.js | 99 ++ .../moduleA/coupon/getCoupon.json | 7 + .../moduleA/coupon/getCoupon.wxml | 34 + .../moduleA/coupon/getCoupon.wxss | 150 ++ .../moduleA/editUser/index.js | 115 ++ .../moduleA/editUser/index.json | 8 + .../moduleA/editUser/index.wxml | 21 + .../moduleA/editUser/index.wxss | 20 + .../moduleA/groupCenter/addHexiao.js | 72 + .../moduleA/groupCenter/addHexiao.json | 7 + .../moduleA/groupCenter/addHexiao.wxml | 10 + .../moduleA/groupCenter/addHexiao.wxss | 27 + .../moduleA/groupCenter/apply.js | 473 +++++ .../moduleA/groupCenter/apply.json | 7 + .../moduleA/groupCenter/apply.wxml | 69 + .../moduleA/groupCenter/apply.wxss | 166 ++ .../moduleA/groupCenter/bind_member_hexiao.js | 130 ++ .../groupCenter/bind_member_hexiao.json | 8 + .../groupCenter/bind_member_hexiao.wxml | 21 + .../groupCenter/bind_member_hexiao.wxss | 42 + .../moduleA/groupCenter/buyHistory.js | 149 ++ .../moduleA/groupCenter/buyHistory.json | 9 + .../moduleA/groupCenter/buyHistory.wxml | 59 + .../moduleA/groupCenter/buyHistory.wxss | 240 +++ .../moduleA/groupCenter/cashList.js | 151 ++ .../moduleA/groupCenter/cashList.json | 9 + .../moduleA/groupCenter/cashList.wxml | 29 + .../moduleA/groupCenter/cashList.wxss | 14 + .../moduleA/groupCenter/closure.js | 84 + .../moduleA/groupCenter/closure.json | 9 + .../moduleA/groupCenter/closure.wxml | 16 + .../moduleA/groupCenter/closure.wxss | 65 + .../moduleA/groupCenter/communityMembers.js | 248 +++ .../moduleA/groupCenter/communityMembers.json | 10 + .../moduleA/groupCenter/communityMembers.wxml | 49 + .../moduleA/groupCenter/communityMembers.wxss | 147 ++ .../moduleA/groupCenter/detailsList.js | 173 ++ .../moduleA/groupCenter/detailsList.json | 9 + .../moduleA/groupCenter/detailsList.wxml | 41 + .../moduleA/groupCenter/detailsList.wxss | 60 + .../groupCenter/distributionInstruct.js | 74 + .../groupCenter/distributionInstruct.json | 8 + .../groupCenter/distributionInstruct.wxml | 1 + .../groupCenter/distributionInstruct.wxss | 57 + .../moduleA/groupCenter/distributionList.js | 291 +++ .../moduleA/groupCenter/distributionList.json | 10 + .../moduleA/groupCenter/distributionList.wxml | 80 + .../moduleA/groupCenter/distributionList.wxss | 280 +++ .../moduleA/groupCenter/editInfo.js | 326 ++++ .../moduleA/groupCenter/editInfo.json | 9 + .../moduleA/groupCenter/editInfo.wxml | 61 + .../moduleA/groupCenter/editInfo.wxss | 139 ++ .../moduleA/groupCenter/goodsManage.js | 125 ++ .../moduleA/groupCenter/goodsManage.json | 8 + .../moduleA/groupCenter/goodsManage.wxml | 54 + .../moduleA/groupCenter/goodsManage.wxss | 202 +++ .../moduleA/groupCenter/groupDetail.js | 196 +++ .../moduleA/groupCenter/groupDetail.json | 16 + .../moduleA/groupCenter/groupDetail.wxml | 115 ++ .../moduleA/groupCenter/groupDetail.wxss | 269 +++ .../moduleA/groupCenter/groupList.js | 288 +++ .../moduleA/groupCenter/groupList.json | 10 + .../moduleA/groupCenter/groupList.wxml | 127 ++ .../moduleA/groupCenter/groupList.wxss | 398 +++++ .../moduleA/groupCenter/gruopInfo.js | 137 ++ .../moduleA/groupCenter/gruopInfo.json | 8 + .../moduleA/groupCenter/gruopInfo.wxml | 70 + .../moduleA/groupCenter/gruopInfo.wxss | 229 +++ .../moduleA/groupCenter/headlist.js | 111 ++ .../moduleA/groupCenter/headlist.json | 8 + .../moduleA/groupCenter/headlist.wxml | 26 + .../moduleA/groupCenter/headlist.wxss | 55 + .../moduleA/groupCenter/index.js | 369 ++++ .../moduleA/groupCenter/index.json | 8 + .../moduleA/groupCenter/index.wxml | 228 +++ .../moduleA/groupCenter/index.wxss | 521 ++++++ .../moduleA/groupCenter/list.js | 243 +++ .../moduleA/groupCenter/list.json | 10 + .../moduleA/groupCenter/list.wxml | 72 + .../moduleA/groupCenter/list.wxss | 171 ++ .../moduleA/groupCenter/listDetails.js | 150 ++ .../moduleA/groupCenter/listDetails.json | 8 + .../moduleA/groupCenter/listDetails.wxml | 30 + .../moduleA/groupCenter/listDetails.wxss | 93 + .../moduleA/groupCenter/memberList.js | 82 + .../moduleA/groupCenter/memberList.json | 10 + .../moduleA/groupCenter/memberList.wxml | 20 + .../moduleA/groupCenter/memberList.wxss | 91 + .../groupCenter/pendingDeliveryOrders.js | 379 ++++ .../groupCenter/pendingDeliveryOrders.json | 12 + .../groupCenter/pendingDeliveryOrders.wxml | 98 ++ .../groupCenter/pendingDeliveryOrders.wxss | 210 +++ .../moduleA/groupCenter/ranking.js | 80 + .../moduleA/groupCenter/ranking.json | 8 + .../moduleA/groupCenter/ranking.wxml | 37 + .../moduleA/groupCenter/ranking.wxss | 83 + .../moduleA/groupCenter/recommend.js | 79 + .../moduleA/groupCenter/recommend.json | 7 + .../moduleA/groupCenter/recommend.wxml | 5 + .../moduleA/groupCenter/recommend.wxss | 10 + .../moduleA/groupCenter/recruit.js | 91 + .../moduleA/groupCenter/recruit.json | 9 + .../moduleA/groupCenter/recruit.wxml | 14 + .../moduleA/groupCenter/recruit.wxss | 20 + .../moduleA/groupCenter/setting.js | 362 ++++ .../moduleA/groupCenter/setting.json | 8 + .../moduleA/groupCenter/setting.wxml | 141 ++ .../moduleA/groupCenter/setting.wxss | 252 +++ .../moduleA/groupCenter/settlementDetail.js | 74 + .../moduleA/groupCenter/settlementDetail.json | 9 + .../moduleA/groupCenter/settlementDetail.wxml | 52 + .../moduleA/groupCenter/settlementDetail.wxss | 232 +++ .../moduleA/groupCenter/settlementList.js | 153 ++ .../moduleA/groupCenter/settlementList.json | 9 + .../moduleA/groupCenter/settlementList.wxml | 52 + .../moduleA/groupCenter/settlementList.wxss | 241 +++ .../moduleA/groupCenter/wallet.js | 124 ++ .../moduleA/groupCenter/wallet.json | 9 + .../moduleA/groupCenter/wallet.wxml | 43 + .../moduleA/groupCenter/wallet.wxss | 85 + eaterplanet_ecommerce/moduleA/menu/details.js | 293 +++ .../moduleA/menu/details.json | 11 + .../moduleA/menu/details.wxml | 151 ++ .../moduleA/menu/details.wxss | 432 +++++ eaterplanet_ecommerce/moduleA/menu/fav.js | 151 ++ eaterplanet_ecommerce/moduleA/menu/fav.json | 13 + eaterplanet_ecommerce/moduleA/menu/fav.wxml | 5 + eaterplanet_ecommerce/moduleA/menu/fav.wxss | 1 + eaterplanet_ecommerce/moduleA/menu/index.js | 396 +++++ eaterplanet_ecommerce/moduleA/menu/index.json | 16 + eaterplanet_ecommerce/moduleA/menu/index.wxml | 45 + eaterplanet_ecommerce/moduleA/menu/index.wxss | 122 ++ eaterplanet_ecommerce/moduleA/menu/list.js | 159 ++ eaterplanet_ecommerce/moduleA/menu/list.json | 10 + eaterplanet_ecommerce/moduleA/menu/list.wxml | 5 + eaterplanet_ecommerce/moduleA/menu/list.wxss | 1 + eaterplanet_ecommerce/moduleA/menu/subcate.js | 58 + .../moduleA/menu/subcate.json | 7 + .../moduleA/menu/subcate.wxml | 13 + .../moduleA/menu/subcate.wxss | 43 + eaterplanet_ecommerce/moduleA/pin/excharge.js | 320 ++++ .../moduleA/pin/excharge.json | 10 + .../moduleA/pin/excharge.wxml | 58 + .../moduleA/pin/excharge.wxss | 1 + .../moduleA/pin/exchargeRecord.js | 120 ++ .../moduleA/pin/exchargeRecord.json | 9 + .../moduleA/pin/exchargeRecord.wxml | 22 + .../moduleA/pin/exchargeRecord.wxss | 63 + .../moduleA/pin/goodsDetail.js | 1414 +++++++++++++++ .../moduleA/pin/goodsDetail.json | 12 + .../moduleA/pin/goodsDetail.wxml | 401 +++++ .../moduleA/pin/goodsDetail.wxss | 1568 +++++++++++++++++ eaterplanet_ecommerce/moduleA/pin/income.js | 163 ++ eaterplanet_ecommerce/moduleA/pin/income.json | 9 + eaterplanet_ecommerce/moduleA/pin/income.wxml | 74 + eaterplanet_ecommerce/moduleA/pin/income.wxss | 210 +++ eaterplanet_ecommerce/moduleA/pin/index.js | 338 ++++ eaterplanet_ecommerce/moduleA/pin/index.json | 14 + eaterplanet_ecommerce/moduleA/pin/index.wxml | 31 + eaterplanet_ecommerce/moduleA/pin/index.wxss | 94 + eaterplanet_ecommerce/moduleA/pin/me.js | 298 ++++ eaterplanet_ecommerce/moduleA/pin/me.json | 13 + eaterplanet_ecommerce/moduleA/pin/me.wxml | 56 + eaterplanet_ecommerce/moduleA/pin/me.wxss | 139 ++ eaterplanet_ecommerce/moduleA/pin/rule.js | 49 + eaterplanet_ecommerce/moduleA/pin/rule.json | 9 + eaterplanet_ecommerce/moduleA/pin/rule.wxml | 6 + eaterplanet_ecommerce/moduleA/pin/rule.wxss | 13 + eaterplanet_ecommerce/moduleA/pin/share.js | 772 ++++++++ eaterplanet_ecommerce/moduleA/pin/share.json | 14 + eaterplanet_ecommerce/moduleA/pin/share.wxml | 229 +++ eaterplanet_ecommerce/moduleA/pin/share.wxss | 274 +++ .../moduleA/score/scoreDetails.js | 123 ++ .../moduleA/score/scoreDetails.json | 11 + .../moduleA/score/scoreDetails.wxml | 27 + .../moduleA/score/scoreDetails.wxss | 76 + eaterplanet_ecommerce/moduleA/score/signin.js | 263 +++ .../moduleA/score/signin.json | 12 + .../moduleA/score/signin.wxml | 70 + .../moduleA/score/signin.wxss | 202 +++ eaterplanet_ecommerce/moduleA/seckill/list.js | 283 +++ .../moduleA/seckill/list.json | 11 + .../moduleA/seckill/list.wxml | 32 + .../moduleA/seckill/list.wxss | 92 + .../moduleA/solitaire/addGood.js | 247 +++ .../moduleA/solitaire/addGood.json | 10 + .../moduleA/solitaire/addGood.wxml | 59 + .../moduleA/solitaire/addGood.wxss | 203 +++ .../moduleA/solitaire/details.js | 1105 ++++++++++++ .../moduleA/solitaire/details.json | 18 + .../moduleA/solitaire/details.wxml | 288 +++ .../moduleA/solitaire/details.wxss | 117 ++ .../moduleA/solitaire/groupDetails.js | 790 +++++++++ .../moduleA/solitaire/groupDetails.json | 14 + .../moduleA/solitaire/groupDetails.wxml | 175 ++ .../moduleA/solitaire/groupDetails.wxss | 169 ++ .../moduleA/solitaire/groupIndex.js | 132 ++ .../moduleA/solitaire/groupIndex.json | 10 + .../moduleA/solitaire/groupIndex.wxml | 41 + .../moduleA/solitaire/groupIndex.wxss | 95 + .../moduleA/solitaire/index.js | 337 ++++ .../moduleA/solitaire/index.json | 13 + .../moduleA/solitaire/index.wxml | 34 + .../moduleA/solitaire/index.wxss | 40 + eaterplanet_ecommerce/moduleA/solitaire/me.js | 156 ++ .../moduleA/solitaire/me.json | 11 + .../moduleA/solitaire/me.wxml | 25 + .../moduleA/solitaire/me.wxss | 28 + .../moduleA/solitaire/order.js | 82 + .../moduleA/solitaire/order.json | 7 + .../moduleA/solitaire/order.wxml | 2 + .../moduleA/solitaire/order.wxss | 1 + .../moduleA/solitaire/pub.js | 188 ++ .../moduleA/solitaire/pub.json | 11 + .../moduleA/solitaire/pub.wxml | 50 + .../moduleA/solitaire/pub.wxss | 179 ++ .../moduleA/solitaire/share.js | 82 + .../moduleA/solitaire/share.json | 7 + .../moduleA/solitaire/share.wxml | 2 + .../moduleA/solitaire/share.wxss | 1 + .../moduleA/solitaire/shareDetails.js | 82 + .../moduleA/solitaire/shareDetails.json | 7 + .../moduleA/solitaire/shareDetails.wxml | 2 + .../moduleA/solitaire/shareDetails.wxss | 1 + .../moduleA/special/index.js | 167 ++ .../moduleA/special/index.json | 15 + .../moduleA/special/index.wxml | 137 ++ .../moduleA/special/index.wxss | 743 ++++++++ eaterplanet_ecommerce/moduleA/special/list.js | 233 +++ .../moduleA/special/list.json | 14 + .../moduleA/special/list.wxml | 34 + .../moduleA/special/list.wxss | 90 + eaterplanet_ecommerce/moduleA/static/1.png | Bin 0 -> 1636 bytes eaterplanet_ecommerce/moduleA/static/2.png | Bin 0 -> 1697 bytes eaterplanet_ecommerce/moduleA/static/3.png | Bin 0 -> 1720 bytes .../moduleA/static/tzph-top.png | Bin 0 -> 4837 bytes eaterplanet_ecommerce/moduleA/video/detail.js | 235 +++ .../moduleA/video/detail.json | 7 + .../moduleA/video/detail.wxml | 24 + .../moduleA/video/detail.wxss | 122 ++ eaterplanet_ecommerce/moduleA/video/index.js | 178 ++ .../moduleA/video/index.json | 12 + .../moduleA/video/index.wxml | 27 + .../moduleA/video/index.wxss | 74 + eaterplanet_ecommerce/moduleA/vip/notice.js | 53 + eaterplanet_ecommerce/moduleA/vip/notice.json | 8 + eaterplanet_ecommerce/moduleA/vip/notice.wxml | 3 + eaterplanet_ecommerce/moduleA/vip/notice.wxss | 1 + eaterplanet_ecommerce/moduleA/vip/upgrade.js | 310 ++++ .../moduleA/vip/upgrade.json | 15 + .../moduleA/vip/upgrade.wxml | 105 ++ .../moduleA/vip/upgrade.wxss | 264 +++ .../moduleB/components/presale-goodsone.js | 5 + .../moduleB/components/presale-goodsone.json | 8 + .../moduleB/components/presale-goodsone.wxml | 48 + .../moduleB/components/presale-goodsone.wxss | 177 ++ .../moduleB/components/presale-goodsrow.js | 5 + .../moduleB/components/presale-goodsrow.json | 8 + .../moduleB/components/presale-goodsrow.wxml | 58 + .../moduleB/components/presale-goodsrow.wxss | 60 + .../moduleB/components/presaleBehavior.js | 93 + .../components/virtualcard-goodsone.js | 5 + .../components/virtualcard-goodsone.json | 8 + .../components/virtualcard-goodsone.wxml | 44 + .../components/virtualcard-goodsone.wxss | 5 + .../components/virtualcard-goodsrow.js | 5 + .../components/virtualcard-goodsrow.json | 8 + .../components/virtualcard-goodsrow.wxml | 43 + .../components/virtualcard-goodsrow.wxss | 1 + .../moduleB/components/virtualcardBehavior.js | 93 + .../moduleB/generalmall/index.js | 954 ++++++++++ .../moduleB/generalmall/index.json | 19 + .../moduleB/generalmall/index.wxml | 161 ++ .../moduleB/generalmall/index.wxss | 8 + .../moduleB/images/authority.png | Bin 0 -> 2320 bytes .../moduleB/images/btn-bg.png | Bin 0 -> 2350 bytes .../moduleB/images/icon-video-started.gif | Bin 0 -> 2252 bytes .../moduleB/images/invite-btn.png | Bin 0 -> 6608 bytes .../moduleB/images/invite.png | Bin 0 -> 28552 bytes .../moduleB/images/live_end.png | Bin 0 -> 2001 bytes .../moduleB/images/live_hot.png | Bin 0 -> 430 bytes .../moduleB/images/live_ing.gif | Bin 0 -> 59689 bytes .../moduleB/images/live_star.png | Bin 0 -> 386 bytes .../moduleB/images/location-green.png | Bin 0 -> 919 bytes .../moduleB/images/location-red.png | Bin 0 -> 915 bytes eaterplanet_ecommerce/moduleB/images/new.png | Bin 0 -> 1002 bytes eaterplanet_ecommerce/moduleB/images/old.png | Bin 0 -> 1734 bytes eaterplanet_ecommerce/moduleB/images/play.png | Bin 0 -> 1126 bytes .../moduleB/images/redbag-bg.png | Bin 0 -> 65241 bytes .../moduleB/images/writeoff.png | Bin 0 -> 1121 bytes eaterplanet_ecommerce/moduleB/index/auth.js | 82 + eaterplanet_ecommerce/moduleB/index/auth.json | 6 + eaterplanet_ecommerce/moduleB/index/auth.wxml | 7 + eaterplanet_ecommerce/moduleB/index/auth.wxss | 1 + eaterplanet_ecommerce/moduleB/index/index.js | 82 + .../moduleB/index/index.json | 6 + .../moduleB/index/index.wxml | 9 + .../moduleB/index/index.wxss | 13 + eaterplanet_ecommerce/moduleB/invite/index.js | 243 +++ .../moduleB/invite/index.json | 13 + .../moduleB/invite/index.wxml | 121 ++ .../moduleB/invite/index.wxss | 138 ++ .../moduleB/invite/record.js | 157 ++ .../moduleB/invite/record.json | 10 + .../moduleB/invite/record.wxml | 45 + .../moduleB/invite/record.wxss | 8 + .../moduleB/invite/reward.js | 142 ++ .../moduleB/invite/reward.json | 10 + .../moduleB/invite/reward.wxml | 71 + .../moduleB/invite/reward.wxss | 332 ++++ .../moduleB/invite/scoreList.js | 126 ++ .../moduleB/invite/scoreList.json | 11 + .../moduleB/invite/scoreList.wxml | 27 + .../moduleB/invite/scoreList.wxss | 76 + eaterplanet_ecommerce/moduleB/invite/share.js | 165 ++ .../moduleB/invite/share.json | 14 + .../moduleB/invite/share.wxml | 89 + .../moduleB/invite/share.wxss | 179 ++ eaterplanet_ecommerce/moduleB/live/index.js | 160 ++ eaterplanet_ecommerce/moduleB/live/index.json | 8 + eaterplanet_ecommerce/moduleB/live/index.wxml | 65 + eaterplanet_ecommerce/moduleB/live/index.wxss | 226 +++ eaterplanet_ecommerce/moduleB/live/replay.js | 108 ++ .../moduleB/live/replay.json | 7 + .../moduleB/live/replay.wxml | 63 + .../moduleB/live/replay.wxss | 284 +++ eaterplanet_ecommerce/moduleB/manage/index.js | 163 ++ .../moduleB/manage/index.json | 12 + .../moduleB/manage/index.wxml | 189 ++ .../moduleB/manage/index.wxss | 85 + .../moduleB/offlineCode/index.js | 81 + .../moduleB/offlineCode/index.json | 9 + .../moduleB/offlineCode/index.wxml | 12 + .../moduleB/offlineCode/index.wxss | 12 + eaterplanet_ecommerce/moduleB/order/share.js | 195 ++ .../moduleB/order/share.json | 13 + .../moduleB/order/share.wxml | 50 + .../moduleB/order/share.wxss | 33 + .../moduleB/presale/index.js | 233 +++ .../moduleB/presale/index.json | 13 + .../moduleB/presale/index.wxml | 42 + .../moduleB/presale/index.wxss | 126 ++ .../moduleB/rider/accountRecord.js | 96 + .../moduleB/rider/accountRecord.json | 10 + .../moduleB/rider/accountRecord.wxml | 27 + .../moduleB/rider/accountRecord.wxss | 78 + eaterplanet_ecommerce/moduleB/rider/census.js | 59 + .../moduleB/rider/census.json | 6 + .../moduleB/rider/census.wxml | 22 + .../moduleB/rider/census.wxss | 12 + .../moduleB/rider/excharge.js | 321 ++++ .../moduleB/rider/excharge.json | 8 + .../moduleB/rider/excharge.wxml | 58 + .../moduleB/rider/excharge.wxss | 5 + .../moduleB/rider/exchargeRecord.js | 120 ++ .../moduleB/rider/exchargeRecord.json | 7 + .../moduleB/rider/exchargeRecord.wxml | 22 + .../moduleB/rider/exchargeRecord.wxss | 61 + eaterplanet_ecommerce/moduleB/rider/grab.js | 168 ++ eaterplanet_ecommerce/moduleB/rider/grab.json | 9 + eaterplanet_ecommerce/moduleB/rider/grab.wxml | 40 + eaterplanet_ecommerce/moduleB/rider/grab.wxss | 13 + eaterplanet_ecommerce/moduleB/rider/index.js | 163 ++ .../moduleB/rider/index.json | 7 + .../moduleB/rider/index.wxml | 50 + .../moduleB/rider/index.wxss | 16 + eaterplanet_ecommerce/moduleB/rider/me.js | 71 + eaterplanet_ecommerce/moduleB/rider/me.json | 6 + eaterplanet_ecommerce/moduleB/rider/me.wxml | 30 + eaterplanet_ecommerce/moduleB/rider/me.wxss | 26 + eaterplanet_ecommerce/moduleB/rider/order.js | 272 +++ .../moduleB/rider/order.json | 11 + .../moduleB/rider/order.wxml | 102 ++ .../moduleB/rider/order.wxss | 50 + .../moduleB/rider/tabbar.wxml | 22 + .../moduleB/rider/tabbar.wxss | 32 + .../moduleB/supply/changePrice.js | 167 ++ .../moduleB/supply/changePrice.json | 10 + .../moduleB/supply/changePrice.wxml | 71 + .../moduleB/supply/changePrice.wxss | 19 + .../moduleB/supply/components/selectRider.js | 117 ++ .../supply/components/selectRider.json | 7 + .../supply/components/selectRider.wxml | 27 + .../supply/components/selectRider.wxss | 33 + .../moduleB/supply/editSku.js | 86 + .../moduleB/supply/editSku.json | 7 + .../moduleB/supply/editSku.wxml | 23 + .../moduleB/supply/editSku.wxss | 15 + .../moduleB/supply/excharge.js | 256 +++ .../moduleB/supply/excharge.json | 7 + .../moduleB/supply/excharge.wxml | 58 + .../moduleB/supply/excharge.wxss | 17 + .../moduleB/supply/exchargeRecord.js | 76 + .../moduleB/supply/exchargeRecord.json | 7 + .../moduleB/supply/exchargeRecord.wxml | 22 + .../moduleB/supply/exchargeRecord.wxss | 60 + .../moduleB/supply/goodsManage.js | 407 +++++ .../moduleB/supply/goodsManage.json | 13 + .../moduleB/supply/goodsManage.wxml | 41 + .../moduleB/supply/goodsManage.wxss | 79 + eaterplanet_ecommerce/moduleB/supply/index.js | 99 ++ .../moduleB/supply/index.json | 8 + .../moduleB/supply/index.wxml | 91 + .../moduleB/supply/index.wxss | 240 +++ .../moduleB/supply/moneyManage.js | 62 + .../moduleB/supply/moneyManage.json | 10 + .../moduleB/supply/moneyManage.wxml | 47 + .../moduleB/supply/moneyManage.wxss | 68 + .../moduleB/supply/orderDetails.js | 121 ++ .../moduleB/supply/orderDetails.json | 11 + .../moduleB/supply/orderDetails.wxml | 339 ++++ .../moduleB/supply/orderDetails.wxss | 205 +++ .../moduleB/supply/orderManage.js | 169 ++ .../moduleB/supply/orderManage.json | 14 + .../moduleB/supply/orderManage.wxml | 103 ++ .../moduleB/supply/orderManage.wxss | 61 + .../moduleB/supply/static/orderMixin.js | 218 +++ .../moduleB/supply/tabbar.wxml | 26 + .../moduleB/supply/tabbar.wxss | 35 + .../moduleB/virtualcard/btn.png | Bin 0 -> 2684 bytes .../moduleB/virtualcard/exchange.js | 147 ++ .../moduleB/virtualcard/exchange.json | 11 + .../moduleB/virtualcard/exchange.wxml | 52 + .../moduleB/virtualcard/exchange.wxss | 200 +++ .../moduleB/virtualcard/index.js | 254 +++ .../moduleB/virtualcard/index.json | 13 + .../moduleB/virtualcard/index.wxml | 36 + .../moduleB/virtualcard/index.wxss | 7 + .../moduleB/writeoff/details.js | 232 +++ .../moduleB/writeoff/details.json | 10 + .../moduleB/writeoff/details.wxml | 88 + .../moduleB/writeoff/details.wxss | 32 + .../moduleB/writeoff/index.js | 121 ++ .../moduleB/writeoff/index.json | 7 + .../moduleB/writeoff/index.wxml | 103 ++ .../moduleB/writeoff/index.wxss | 120 ++ .../moduleB/writeoff/member.js | 82 + .../moduleB/writeoff/member.json | 6 + .../moduleB/writeoff/member.wxml | 12 + .../moduleB/writeoff/member.wxss | 37 + .../resource/css/excharge.wxss | 195 ++ eaterplanet_ecommerce/resource/css/vip.wxss | 22 + eaterplanet_ecommerce/utils/Location.js | 185 ++ eaterplanet_ecommerce/utils/WxValidate.js | 418 +++++ eaterplanet_ecommerce/utils/countDown.js | 59 + eaterplanet_ecommerce/utils/index.js | 417 +++++ eaterplanet_ecommerce/utils/mixins.js | 54 + eaterplanet_ecommerce/utils/public.js | 90 + .../utils/qqmap-wx-jssdk.min.js | 2 + eaterplanet_ecommerce/utils/timeFormat.js | 85 + eaterplanet_ecommerce/utils/timeQueue.js | 43 + eaterplanet_ecommerce/utils/util.js | 707 ++++++++ eaterplanet_ecommerce/utils/wcache.js | 48 + 818 files changed, 71060 insertions(+) create mode 100644 eaterplanet_ecommerce/components/actionsheet/actionsheet.js create mode 100644 eaterplanet_ecommerce/components/actionsheet/actionsheet.json create mode 100644 eaterplanet_ecommerce/components/actionsheet/actionsheet.wxml create mode 100644 eaterplanet_ecommerce/components/actionsheet/actionsheet.wxss create mode 100644 eaterplanet_ecommerce/components/ad-alert/index.js create mode 100644 eaterplanet_ecommerce/components/ad-alert/index.json create mode 100644 eaterplanet_ecommerce/components/ad-alert/index.wxml create mode 100644 eaterplanet_ecommerce/components/ad-alert/index.wxss create mode 100644 eaterplanet_ecommerce/components/addCartBtn/index.js create mode 100644 eaterplanet_ecommerce/components/addCartBtn/index.json create mode 100644 eaterplanet_ecommerce/components/addCartBtn/index.wxml create mode 100644 eaterplanet_ecommerce/components/addCartBtn/index.wxss create mode 100644 eaterplanet_ecommerce/components/advimg/index.js create mode 100644 eaterplanet_ecommerce/components/advimg/index.json create mode 100644 eaterplanet_ecommerce/components/advimg/index.wxml create mode 100644 eaterplanet_ecommerce/components/advimg/index.wxss create mode 100644 eaterplanet_ecommerce/components/asideBtn/index.js create mode 100644 eaterplanet_ecommerce/components/asideBtn/index.json create mode 100644 eaterplanet_ecommerce/components/asideBtn/index.wxml create mode 100644 eaterplanet_ecommerce/components/asideBtn/index.wxss create mode 100644 eaterplanet_ecommerce/components/auth/index.js create mode 100644 eaterplanet_ecommerce/components/auth/index.json create mode 100644 eaterplanet_ecommerce/components/auth/index.wxml create mode 100644 eaterplanet_ecommerce/components/auth/index.wxss create mode 100644 eaterplanet_ecommerce/components/behavior/goods.js create mode 100644 eaterplanet_ecommerce/components/button/index.js create mode 100644 eaterplanet_ecommerce/components/button/index.json create mode 100644 eaterplanet_ecommerce/components/button/index.wxml create mode 100644 eaterplanet_ecommerce/components/button/index.wxss create mode 100644 eaterplanet_ecommerce/components/card/index.js create mode 100644 eaterplanet_ecommerce/components/card/index.json create mode 100644 eaterplanet_ecommerce/components/card/index.wxml create mode 100644 eaterplanet_ecommerce/components/card/index.wxss create mode 100644 eaterplanet_ecommerce/components/cartBtn/index.js create mode 100644 eaterplanet_ecommerce/components/cartBtn/index.json create mode 100644 eaterplanet_ecommerce/components/cartBtn/index.wxml create mode 100644 eaterplanet_ecommerce/components/cartBtn/index.wxss create mode 100644 eaterplanet_ecommerce/components/cashon_delivery/index.js create mode 100644 eaterplanet_ecommerce/components/cashon_delivery/index.json create mode 100644 eaterplanet_ecommerce/components/cashon_delivery/index.wxml create mode 100644 eaterplanet_ecommerce/components/cashon_delivery/index.wxss create mode 100644 eaterplanet_ecommerce/components/changeCommunity/index.js create mode 100644 eaterplanet_ecommerce/components/changeCommunity/index.json create mode 100644 eaterplanet_ecommerce/components/changeCommunity/index.wxml create mode 100644 eaterplanet_ecommerce/components/changeCommunity/index.wxss create mode 100644 eaterplanet_ecommerce/components/chooseImage/index.js create mode 100644 eaterplanet_ecommerce/components/chooseImage/index.json create mode 100644 eaterplanet_ecommerce/components/chooseImage/index.wxml create mode 100644 eaterplanet_ecommerce/components/chooseImage/index.wxss create mode 100644 eaterplanet_ecommerce/components/comming-spu-disabled/index.js create mode 100644 eaterplanet_ecommerce/components/comming-spu-disabled/index.json create mode 100644 eaterplanet_ecommerce/components/comming-spu-disabled/index.wxml create mode 100644 eaterplanet_ecommerce/components/comming-spu-disabled/index.wxss create mode 100644 eaterplanet_ecommerce/components/community-item/index.js create mode 100644 eaterplanet_ecommerce/components/community-item/index.json create mode 100644 eaterplanet_ecommerce/components/community-item/index.wxml create mode 100644 eaterplanet_ecommerce/components/community-item/index.wxss create mode 100644 eaterplanet_ecommerce/components/count-down/index.js create mode 100644 eaterplanet_ecommerce/components/count-down/index.json create mode 100644 eaterplanet_ecommerce/components/count-down/index.wxml create mode 100644 eaterplanet_ecommerce/components/count-down/index.wxss create mode 100644 eaterplanet_ecommerce/components/datetimepicker/datetimepicker.js create mode 100644 eaterplanet_ecommerce/components/datetimepicker/datetimepicker.json create mode 100644 eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxml create mode 100644 eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxss create mode 100644 eaterplanet_ecommerce/components/dialog/index.js create mode 100644 eaterplanet_ecommerce/components/dialog/index.json create mode 100644 eaterplanet_ecommerce/components/dialog/index.wxml create mode 100644 eaterplanet_ecommerce/components/dialog/index.wxss create mode 100644 eaterplanet_ecommerce/components/diy-goods-list/index.js create mode 100644 eaterplanet_ecommerce/components/diy-goods-list/index.json create mode 100644 eaterplanet_ecommerce/components/diy-goods-list/index.wxml create mode 100644 eaterplanet_ecommerce/components/diy-goods-list/index.wxss create mode 100644 eaterplanet_ecommerce/components/diy-many-goods-list/index.js create mode 100644 eaterplanet_ecommerce/components/diy-many-goods-list/index.json create mode 100644 eaterplanet_ecommerce/components/diy-many-goods-list/index.wxml create mode 100644 eaterplanet_ecommerce/components/diy-many-goods-list/index.wxss create mode 100644 eaterplanet_ecommerce/components/diy-nav/index.js create mode 100644 eaterplanet_ecommerce/components/diy-nav/index.json create mode 100644 eaterplanet_ecommerce/components/diy-nav/index.wxml create mode 100644 eaterplanet_ecommerce/components/diy-nav/index.wxss create mode 100644 eaterplanet_ecommerce/components/diy-pintuan/index.js create mode 100644 eaterplanet_ecommerce/components/diy-pintuan/index.json create mode 100644 eaterplanet_ecommerce/components/diy-pintuan/index.wxml create mode 100644 eaterplanet_ecommerce/components/diy-pintuan/index.wxss create mode 100644 eaterplanet_ecommerce/components/empty/index.js create mode 100644 eaterplanet_ecommerce/components/empty/index.json create mode 100644 eaterplanet_ecommerce/components/empty/index.wxml create mode 100644 eaterplanet_ecommerce/components/empty/index.wxss create mode 100644 eaterplanet_ecommerce/components/fetch-coder/index.js create mode 100644 eaterplanet_ecommerce/components/fetch-coder/index.json create mode 100644 eaterplanet_ecommerce/components/fetch-coder/index.wxml create mode 100644 eaterplanet_ecommerce/components/fetch-coder/index.wxss create mode 100644 eaterplanet_ecommerce/components/fixed-bottom/index.js create mode 100644 eaterplanet_ecommerce/components/fixed-bottom/index.json create mode 100644 eaterplanet_ecommerce/components/fixed-bottom/index.wxml create mode 100644 eaterplanet_ecommerce/components/fixed-bottom/index.wxss create mode 100644 eaterplanet_ecommerce/components/form/apply.js create mode 100644 eaterplanet_ecommerce/components/form/apply.json create mode 100644 eaterplanet_ecommerce/components/form/apply.wxml create mode 100644 eaterplanet_ecommerce/components/form/apply.wxss create mode 100644 eaterplanet_ecommerce/components/get-phone/index.js create mode 100644 eaterplanet_ecommerce/components/get-phone/index.json create mode 100644 eaterplanet_ecommerce/components/get-phone/index.wxml create mode 100644 eaterplanet_ecommerce/components/get-phone/index.wxss create mode 100644 eaterplanet_ecommerce/components/goodsInfo/index.js create mode 100644 eaterplanet_ecommerce/components/goodsInfo/index.json create mode 100644 eaterplanet_ecommerce/components/goodsInfo/index.wxml create mode 100644 eaterplanet_ecommerce/components/goodsInfo/index.wxss create mode 100644 eaterplanet_ecommerce/components/guess-like/index.js create mode 100644 eaterplanet_ecommerce/components/guess-like/index.json create mode 100644 eaterplanet_ecommerce/components/guess-like/index.wxml create mode 100644 eaterplanet_ecommerce/components/guess-like/index.wxss create mode 100644 eaterplanet_ecommerce/components/image/index.js create mode 100644 eaterplanet_ecommerce/components/image/index.json create mode 100644 eaterplanet_ecommerce/components/image/index.wxml create mode 100644 eaterplanet_ecommerce/components/image/index.wxss create mode 100644 eaterplanet_ecommerce/components/img/index.js create mode 100644 eaterplanet_ecommerce/components/img/index.json create mode 100644 eaterplanet_ecommerce/components/img/index.wxml create mode 100644 eaterplanet_ecommerce/components/img/index.wxss create mode 100644 eaterplanet_ecommerce/components/index-item/index.js create mode 100644 eaterplanet_ecommerce/components/index-item/index.json create mode 100644 eaterplanet_ecommerce/components/index-item/index.wxml create mode 100644 eaterplanet_ecommerce/components/index-item/index.wxss create mode 100644 eaterplanet_ecommerce/components/index/index.js create mode 100644 eaterplanet_ecommerce/components/index/index.json create mode 100644 eaterplanet_ecommerce/components/index/index.wxml create mode 100644 eaterplanet_ecommerce/components/index/index.wxss create mode 100644 eaterplanet_ecommerce/components/input-number/index.js create mode 100644 eaterplanet_ecommerce/components/input-number/index.json create mode 100644 eaterplanet_ecommerce/components/input-number/index.wxml create mode 100644 eaterplanet_ecommerce/components/input-number/index.wxss create mode 100644 eaterplanet_ecommerce/components/load-more/index.js create mode 100644 eaterplanet_ecommerce/components/load-more/index.json create mode 100644 eaterplanet_ecommerce/components/load-more/index.wxml create mode 100644 eaterplanet_ecommerce/components/load-more/index.wxss create mode 100644 eaterplanet_ecommerce/components/menutabs/index.js create mode 100644 eaterplanet_ecommerce/components/menutabs/index.json create mode 100644 eaterplanet_ecommerce/components/menutabs/index.wxml create mode 100644 eaterplanet_ecommerce/components/menutabs/index.wxss create mode 100644 eaterplanet_ecommerce/components/modal-userProfile/index.js create mode 100644 eaterplanet_ecommerce/components/modal-userProfile/index.json create mode 100644 eaterplanet_ecommerce/components/modal-userProfile/index.wxml create mode 100644 eaterplanet_ecommerce/components/modal-userProfile/index.wxss create mode 100644 eaterplanet_ecommerce/components/modal/index.js create mode 100644 eaterplanet_ecommerce/components/modal/index.json create mode 100644 eaterplanet_ecommerce/components/modal/index.wxml create mode 100644 eaterplanet_ecommerce/components/modal/index.wxss create mode 100644 eaterplanet_ecommerce/components/mp-dialog/dialog.js create mode 100644 eaterplanet_ecommerce/components/mp-dialog/dialog.json create mode 100644 eaterplanet_ecommerce/components/mp-dialog/dialog.wxml create mode 100644 eaterplanet_ecommerce/components/mp-dialog/dialog.wxss create mode 100644 eaterplanet_ecommerce/components/navigation-bar/index.js create mode 100644 eaterplanet_ecommerce/components/navigation-bar/index.json create mode 100644 eaterplanet_ecommerce/components/navigation-bar/index.wxml create mode 100644 eaterplanet_ecommerce/components/navigation-bar/index.wxss create mode 100644 eaterplanet_ecommerce/components/new-auth/index.js create mode 100644 eaterplanet_ecommerce/components/new-auth/index.json create mode 100644 eaterplanet_ecommerce/components/new-auth/index.wxml create mode 100644 eaterplanet_ecommerce/components/new-auth/index.wxss create mode 100644 eaterplanet_ecommerce/components/new-comer/index.js create mode 100644 eaterplanet_ecommerce/components/new-comer/index.json create mode 100644 eaterplanet_ecommerce/components/new-comer/index.wxml create mode 100644 eaterplanet_ecommerce/components/new-comer/index.wxss create mode 100644 eaterplanet_ecommerce/components/new-rush-spu/index.js create mode 100644 eaterplanet_ecommerce/components/new-rush-spu/index.json create mode 100644 eaterplanet_ecommerce/components/new-rush-spu/index.wxml create mode 100644 eaterplanet_ecommerce/components/new-rush-spu/index.wxss create mode 100644 eaterplanet_ecommerce/components/order-notify/index.js create mode 100644 eaterplanet_ecommerce/components/order-notify/index.json create mode 100644 eaterplanet_ecommerce/components/order-notify/index.wxml create mode 100644 eaterplanet_ecommerce/components/order-notify/index.wxss create mode 100644 eaterplanet_ecommerce/components/order/orderInfoExpress.js create mode 100644 eaterplanet_ecommerce/components/order/orderInfoExpress.json create mode 100644 eaterplanet_ecommerce/components/order/orderInfoExpress.wxml create mode 100644 eaterplanet_ecommerce/components/order/orderInfoExpress.wxss create mode 100644 eaterplanet_ecommerce/components/orderComment/index.js create mode 100644 eaterplanet_ecommerce/components/orderComment/index.json create mode 100644 eaterplanet_ecommerce/components/orderComment/index.wxml create mode 100644 eaterplanet_ecommerce/components/orderComment/index.wxss create mode 100644 eaterplanet_ecommerce/components/orderInfo/index.js create mode 100644 eaterplanet_ecommerce/components/orderInfo/index.json create mode 100644 eaterplanet_ecommerce/components/orderInfo/index.wxml create mode 100644 eaterplanet_ecommerce/components/orderInfo/index.wxss create mode 100644 eaterplanet_ecommerce/components/painter/lib/calc.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/downloader.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/gradient.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/pen.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/qrcode.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/sha1.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/string-polyfill.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/util.js create mode 100644 eaterplanet_ecommerce/components/painter/lib/wx-canvas.js create mode 100644 eaterplanet_ecommerce/components/painter/painter.js create mode 100644 eaterplanet_ecommerce/components/painter/painter.json create mode 100644 eaterplanet_ecommerce/components/painter/painter.wxml create mode 100644 eaterplanet_ecommerce/components/parser/libs/CssHandler.js create mode 100644 eaterplanet_ecommerce/components/parser/libs/MpHtmlParser.js create mode 100644 eaterplanet_ecommerce/components/parser/libs/config.js create mode 100644 eaterplanet_ecommerce/components/parser/parser.js create mode 100644 eaterplanet_ecommerce/components/parser/parser.json create mode 100644 eaterplanet_ecommerce/components/parser/parser.wxml create mode 100644 eaterplanet_ecommerce/components/parser/parser.wxss create mode 100644 eaterplanet_ecommerce/components/parser/trees/trees.js create mode 100644 eaterplanet_ecommerce/components/parser/trees/trees.json create mode 100644 eaterplanet_ecommerce/components/parser/trees/trees.wxml create mode 100644 eaterplanet_ecommerce/components/parser/trees/trees.wxss create mode 100644 eaterplanet_ecommerce/components/router-link/router-link.js create mode 100644 eaterplanet_ecommerce/components/router-link/router-link.json create mode 100644 eaterplanet_ecommerce/components/router-link/router-link.wxml create mode 100644 eaterplanet_ecommerce/components/router-link/router-link.wxss create mode 100644 eaterplanet_ecommerce/components/rush-spu-big/index.js create mode 100644 eaterplanet_ecommerce/components/rush-spu-big/index.json create mode 100644 eaterplanet_ecommerce/components/rush-spu-big/index.wxml create mode 100644 eaterplanet_ecommerce/components/rush-spu-big/index.wxss create mode 100644 eaterplanet_ecommerce/components/rush-spu-col/index.js create mode 100644 eaterplanet_ecommerce/components/rush-spu-col/index.json create mode 100644 eaterplanet_ecommerce/components/rush-spu-col/index.wxml create mode 100644 eaterplanet_ecommerce/components/rush-spu-col/index.wxss create mode 100644 eaterplanet_ecommerce/components/s-form-show/index.js create mode 100644 eaterplanet_ecommerce/components/s-form-show/index.json create mode 100644 eaterplanet_ecommerce/components/s-form-show/index.wxml create mode 100644 eaterplanet_ecommerce/components/s-form-show/index.wxss create mode 100644 eaterplanet_ecommerce/components/s-form/index.js create mode 100644 eaterplanet_ecommerce/components/s-form/index.json create mode 100644 eaterplanet_ecommerce/components/s-form/index.wxml create mode 100644 eaterplanet_ecommerce/components/s-form/index.wxss create mode 100644 eaterplanet_ecommerce/components/seckillItem/seckillItem.js create mode 100644 eaterplanet_ecommerce/components/seckillItem/seckillItem.json create mode 100644 eaterplanet_ecommerce/components/seckillItem/seckillItem.wxml create mode 100644 eaterplanet_ecommerce/components/seckillItem/seckillItem.wxss create mode 100644 eaterplanet_ecommerce/components/skeleton/getSystemInfo.js create mode 100644 eaterplanet_ecommerce/components/skeleton/skeleton.js create mode 100644 eaterplanet_ecommerce/components/skeleton/skeleton.json create mode 100644 eaterplanet_ecommerce/components/skeleton/skeleton.wxml create mode 100644 eaterplanet_ecommerce/components/skeleton/skeleton.wxss create mode 100644 eaterplanet_ecommerce/components/sku/index.js create mode 100644 eaterplanet_ecommerce/components/sku/index.json create mode 100644 eaterplanet_ecommerce/components/sku/index.wxml create mode 100644 eaterplanet_ecommerce/components/sku/index.wxss create mode 100644 eaterplanet_ecommerce/components/spike/index.js create mode 100644 eaterplanet_ecommerce/components/spike/index.json create mode 100644 eaterplanet_ecommerce/components/spike/index.wxml create mode 100644 eaterplanet_ecommerce/components/spike/index.wxss create mode 100644 eaterplanet_ecommerce/components/tabbar/index.js create mode 100644 eaterplanet_ecommerce/components/tabbar/index.json create mode 100644 eaterplanet_ecommerce/components/tabbar/index.wxml create mode 100644 eaterplanet_ecommerce/components/tabbar/index.wxss create mode 100644 eaterplanet_ecommerce/components/tabs/index.js create mode 100644 eaterplanet_ecommerce/components/tabs/index.json create mode 100644 eaterplanet_ecommerce/components/tabs/index.wxml create mode 100644 eaterplanet_ecommerce/components/tabs/index.wxss create mode 100644 eaterplanet_ecommerce/components/time-range/index.js create mode 100644 eaterplanet_ecommerce/components/time-range/index.json create mode 100644 eaterplanet_ecommerce/components/time-range/index.wxml create mode 100644 eaterplanet_ecommerce/components/time-range/index.wxss create mode 100644 eaterplanet_ecommerce/components/timePicker/timePicker.js create mode 100644 eaterplanet_ecommerce/components/timePicker/timePicker.json create mode 100644 eaterplanet_ecommerce/components/timePicker/timePicker.wxml create mode 100644 eaterplanet_ecommerce/components/timePicker/timePicker.wxss create mode 100644 eaterplanet_ecommerce/components/topic/topic.js create mode 100644 eaterplanet_ecommerce/components/topic/topic.json create mode 100644 eaterplanet_ecommerce/components/topic/topic.wxml create mode 100644 eaterplanet_ecommerce/components/topic/topic.wxss create mode 100644 eaterplanet_ecommerce/components/tworow/index.js create mode 100644 eaterplanet_ecommerce/components/tworow/index.json create mode 100644 eaterplanet_ecommerce/components/tworow/index.wxml create mode 100644 eaterplanet_ecommerce/components/tworow/index.wxss create mode 100644 eaterplanet_ecommerce/components/vipModal/index.js create mode 100644 eaterplanet_ecommerce/components/vipModal/index.json create mode 100644 eaterplanet_ecommerce/components/vipModal/index.wxml create mode 100644 eaterplanet_ecommerce/components/vipModal/index.wxss create mode 100644 eaterplanet_ecommerce/components/vipPrice/vipPrice.js create mode 100644 eaterplanet_ecommerce/components/vipPrice/vipPrice.json create mode 100644 eaterplanet_ecommerce/components/vipPrice/vipPrice.wxml create mode 100644 eaterplanet_ecommerce/components/vipPrice/vipPrice.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/apply.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/apply.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/apply.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/apply.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/details.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/details.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/details.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/details.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/excharge.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/excharge.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/excharge.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/excharge.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/fans.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/fans.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/fans.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/fans.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/me.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/me.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/me.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/me.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/member.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/member.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/member.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/member.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/memberInfo.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/memberInfo.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/recruit.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/recruit.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/recruit.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/recruit.wxss create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/share.js create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/share.json create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/share.wxml create mode 100644 eaterplanet_ecommerce/distributionCenter/pages/share.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/cartModal.js create mode 100644 eaterplanet_ecommerce/moduleA/components/cartModal.json create mode 100644 eaterplanet_ecommerce/moduleA/components/cartModal.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/cartModal.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/img-box/img-box.js create mode 100644 eaterplanet_ecommerce/moduleA/components/img-box/img-box.json create mode 100644 eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/masonry/masonry.js create mode 100644 eaterplanet_ecommerce/moduleA/components/masonry/masonry.json create mode 100644 eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/menuGoodsItem.js create mode 100644 eaterplanet_ecommerce/moduleA/components/menuGoodsItem.json create mode 100644 eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoods.js create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoods.json create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoods.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoods.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.js create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.json create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/rushBig.js create mode 100644 eaterplanet_ecommerce/moduleA/components/rushBig.json create mode 100644 eaterplanet_ecommerce/moduleA/components/rushBig.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/rushBig.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/rushNormal.js create mode 100644 eaterplanet_ecommerce/moduleA/components/rushNormal.json create mode 100644 eaterplanet_ecommerce/moduleA/components/rushNormal.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/rushNormal.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/score-guess-like/index.js create mode 100644 eaterplanet_ecommerce/moduleA/components/score-guess-like/index.json create mode 100644 eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireGood.js create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireGood.json create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireGood.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireGood.wxss create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireHead.js create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireHead.json create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireHead.wxml create mode 100644 eaterplanet_ecommerce/moduleA/components/solitaireHead.wxss create mode 100644 eaterplanet_ecommerce/moduleA/coupon/getCoupon.js create mode 100644 eaterplanet_ecommerce/moduleA/coupon/getCoupon.json create mode 100644 eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxml create mode 100644 eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxss create mode 100644 eaterplanet_ecommerce/moduleA/editUser/index.js create mode 100644 eaterplanet_ecommerce/moduleA/editUser/index.json create mode 100644 eaterplanet_ecommerce/moduleA/editUser/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/editUser/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/apply.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/apply.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/apply.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/apply.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/cashList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/cashList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/closure.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/closure.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/closure.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/closure.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/detailsList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/detailsList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/editInfo.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/editInfo.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/headlist.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/headlist.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/index.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/index.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/list.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/list.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/list.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/list.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/listDetails.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/listDetails.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/memberList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/memberList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/ranking.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/ranking.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recommend.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recommend.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recruit.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recruit.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/setting.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/setting.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/setting.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/setting.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementList.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementList.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxss create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/wallet.js create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/wallet.json create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxml create mode 100644 eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxss create mode 100644 eaterplanet_ecommerce/moduleA/menu/details.js create mode 100644 eaterplanet_ecommerce/moduleA/menu/details.json create mode 100644 eaterplanet_ecommerce/moduleA/menu/details.wxml create mode 100644 eaterplanet_ecommerce/moduleA/menu/details.wxss create mode 100644 eaterplanet_ecommerce/moduleA/menu/fav.js create mode 100644 eaterplanet_ecommerce/moduleA/menu/fav.json create mode 100644 eaterplanet_ecommerce/moduleA/menu/fav.wxml create mode 100644 eaterplanet_ecommerce/moduleA/menu/fav.wxss create mode 100644 eaterplanet_ecommerce/moduleA/menu/index.js create mode 100644 eaterplanet_ecommerce/moduleA/menu/index.json create mode 100644 eaterplanet_ecommerce/moduleA/menu/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/menu/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/menu/list.js create mode 100644 eaterplanet_ecommerce/moduleA/menu/list.json create mode 100644 eaterplanet_ecommerce/moduleA/menu/list.wxml create mode 100644 eaterplanet_ecommerce/moduleA/menu/list.wxss create mode 100644 eaterplanet_ecommerce/moduleA/menu/subcate.js create mode 100644 eaterplanet_ecommerce/moduleA/menu/subcate.json create mode 100644 eaterplanet_ecommerce/moduleA/menu/subcate.wxml create mode 100644 eaterplanet_ecommerce/moduleA/menu/subcate.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/excharge.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/excharge.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/excharge.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/excharge.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/exchargeRecord.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/exchargeRecord.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/goodsDetail.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/goodsDetail.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/income.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/income.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/income.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/income.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/index.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/index.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/me.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/me.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/me.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/me.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/rule.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/rule.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/rule.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/rule.wxss create mode 100644 eaterplanet_ecommerce/moduleA/pin/share.js create mode 100644 eaterplanet_ecommerce/moduleA/pin/share.json create mode 100644 eaterplanet_ecommerce/moduleA/pin/share.wxml create mode 100644 eaterplanet_ecommerce/moduleA/pin/share.wxss create mode 100644 eaterplanet_ecommerce/moduleA/score/scoreDetails.js create mode 100644 eaterplanet_ecommerce/moduleA/score/scoreDetails.json create mode 100644 eaterplanet_ecommerce/moduleA/score/scoreDetails.wxml create mode 100644 eaterplanet_ecommerce/moduleA/score/scoreDetails.wxss create mode 100644 eaterplanet_ecommerce/moduleA/score/signin.js create mode 100644 eaterplanet_ecommerce/moduleA/score/signin.json create mode 100644 eaterplanet_ecommerce/moduleA/score/signin.wxml create mode 100644 eaterplanet_ecommerce/moduleA/score/signin.wxss create mode 100644 eaterplanet_ecommerce/moduleA/seckill/list.js create mode 100644 eaterplanet_ecommerce/moduleA/seckill/list.json create mode 100644 eaterplanet_ecommerce/moduleA/seckill/list.wxml create mode 100644 eaterplanet_ecommerce/moduleA/seckill/list.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/addGood.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/addGood.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/addGood.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/addGood.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/details.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/details.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/details.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/details.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupDetails.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupDetails.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupIndex.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupIndex.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/index.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/index.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/me.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/me.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/me.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/me.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/order.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/order.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/order.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/order.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/pub.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/pub.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/pub.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/pub.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/share.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/share.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/share.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/share.wxss create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/shareDetails.js create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/shareDetails.json create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxml create mode 100644 eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxss create mode 100644 eaterplanet_ecommerce/moduleA/special/index.js create mode 100644 eaterplanet_ecommerce/moduleA/special/index.json create mode 100644 eaterplanet_ecommerce/moduleA/special/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/special/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/special/list.js create mode 100644 eaterplanet_ecommerce/moduleA/special/list.json create mode 100644 eaterplanet_ecommerce/moduleA/special/list.wxml create mode 100644 eaterplanet_ecommerce/moduleA/special/list.wxss create mode 100644 eaterplanet_ecommerce/moduleA/static/1.png create mode 100644 eaterplanet_ecommerce/moduleA/static/2.png create mode 100644 eaterplanet_ecommerce/moduleA/static/3.png create mode 100644 eaterplanet_ecommerce/moduleA/static/tzph-top.png create mode 100644 eaterplanet_ecommerce/moduleA/video/detail.js create mode 100644 eaterplanet_ecommerce/moduleA/video/detail.json create mode 100644 eaterplanet_ecommerce/moduleA/video/detail.wxml create mode 100644 eaterplanet_ecommerce/moduleA/video/detail.wxss create mode 100644 eaterplanet_ecommerce/moduleA/video/index.js create mode 100644 eaterplanet_ecommerce/moduleA/video/index.json create mode 100644 eaterplanet_ecommerce/moduleA/video/index.wxml create mode 100644 eaterplanet_ecommerce/moduleA/video/index.wxss create mode 100644 eaterplanet_ecommerce/moduleA/vip/notice.js create mode 100644 eaterplanet_ecommerce/moduleA/vip/notice.json create mode 100644 eaterplanet_ecommerce/moduleA/vip/notice.wxml create mode 100644 eaterplanet_ecommerce/moduleA/vip/notice.wxss create mode 100644 eaterplanet_ecommerce/moduleA/vip/upgrade.js create mode 100644 eaterplanet_ecommerce/moduleA/vip/upgrade.json create mode 100644 eaterplanet_ecommerce/moduleA/vip/upgrade.wxml create mode 100644 eaterplanet_ecommerce/moduleA/vip/upgrade.wxss create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsone.js create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsone.json create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxml create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxss create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsrow.js create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsrow.json create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxml create mode 100644 eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxss create mode 100644 eaterplanet_ecommerce/moduleB/components/presaleBehavior.js create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.js create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.json create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxml create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxss create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.js create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.json create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxml create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxss create mode 100644 eaterplanet_ecommerce/moduleB/components/virtualcardBehavior.js create mode 100644 eaterplanet_ecommerce/moduleB/generalmall/index.js create mode 100644 eaterplanet_ecommerce/moduleB/generalmall/index.json create mode 100644 eaterplanet_ecommerce/moduleB/generalmall/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/generalmall/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/images/authority.png create mode 100644 eaterplanet_ecommerce/moduleB/images/btn-bg.png create mode 100644 eaterplanet_ecommerce/moduleB/images/icon-video-started.gif create mode 100644 eaterplanet_ecommerce/moduleB/images/invite-btn.png create mode 100644 eaterplanet_ecommerce/moduleB/images/invite.png create mode 100644 eaterplanet_ecommerce/moduleB/images/live_end.png create mode 100644 eaterplanet_ecommerce/moduleB/images/live_hot.png create mode 100644 eaterplanet_ecommerce/moduleB/images/live_ing.gif create mode 100644 eaterplanet_ecommerce/moduleB/images/live_star.png create mode 100644 eaterplanet_ecommerce/moduleB/images/location-green.png create mode 100644 eaterplanet_ecommerce/moduleB/images/location-red.png create mode 100644 eaterplanet_ecommerce/moduleB/images/new.png create mode 100644 eaterplanet_ecommerce/moduleB/images/old.png create mode 100644 eaterplanet_ecommerce/moduleB/images/play.png create mode 100644 eaterplanet_ecommerce/moduleB/images/redbag-bg.png create mode 100644 eaterplanet_ecommerce/moduleB/images/writeoff.png create mode 100644 eaterplanet_ecommerce/moduleB/index/auth.js create mode 100644 eaterplanet_ecommerce/moduleB/index/auth.json create mode 100644 eaterplanet_ecommerce/moduleB/index/auth.wxml create mode 100644 eaterplanet_ecommerce/moduleB/index/auth.wxss create mode 100644 eaterplanet_ecommerce/moduleB/index/index.js create mode 100644 eaterplanet_ecommerce/moduleB/index/index.json create mode 100644 eaterplanet_ecommerce/moduleB/index/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/index/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/invite/index.js create mode 100644 eaterplanet_ecommerce/moduleB/invite/index.json create mode 100644 eaterplanet_ecommerce/moduleB/invite/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/invite/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/invite/record.js create mode 100644 eaterplanet_ecommerce/moduleB/invite/record.json create mode 100644 eaterplanet_ecommerce/moduleB/invite/record.wxml create mode 100644 eaterplanet_ecommerce/moduleB/invite/record.wxss create mode 100644 eaterplanet_ecommerce/moduleB/invite/reward.js create mode 100644 eaterplanet_ecommerce/moduleB/invite/reward.json create mode 100644 eaterplanet_ecommerce/moduleB/invite/reward.wxml create mode 100644 eaterplanet_ecommerce/moduleB/invite/reward.wxss create mode 100644 eaterplanet_ecommerce/moduleB/invite/scoreList.js create mode 100644 eaterplanet_ecommerce/moduleB/invite/scoreList.json create mode 100644 eaterplanet_ecommerce/moduleB/invite/scoreList.wxml create mode 100644 eaterplanet_ecommerce/moduleB/invite/scoreList.wxss create mode 100644 eaterplanet_ecommerce/moduleB/invite/share.js create mode 100644 eaterplanet_ecommerce/moduleB/invite/share.json create mode 100644 eaterplanet_ecommerce/moduleB/invite/share.wxml create mode 100644 eaterplanet_ecommerce/moduleB/invite/share.wxss create mode 100644 eaterplanet_ecommerce/moduleB/live/index.js create mode 100644 eaterplanet_ecommerce/moduleB/live/index.json create mode 100644 eaterplanet_ecommerce/moduleB/live/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/live/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/live/replay.js create mode 100644 eaterplanet_ecommerce/moduleB/live/replay.json create mode 100644 eaterplanet_ecommerce/moduleB/live/replay.wxml create mode 100644 eaterplanet_ecommerce/moduleB/live/replay.wxss create mode 100644 eaterplanet_ecommerce/moduleB/manage/index.js create mode 100644 eaterplanet_ecommerce/moduleB/manage/index.json create mode 100644 eaterplanet_ecommerce/moduleB/manage/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/manage/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/offlineCode/index.js create mode 100644 eaterplanet_ecommerce/moduleB/offlineCode/index.json create mode 100644 eaterplanet_ecommerce/moduleB/offlineCode/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/offlineCode/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/order/share.js create mode 100644 eaterplanet_ecommerce/moduleB/order/share.json create mode 100644 eaterplanet_ecommerce/moduleB/order/share.wxml create mode 100644 eaterplanet_ecommerce/moduleB/order/share.wxss create mode 100644 eaterplanet_ecommerce/moduleB/presale/index.js create mode 100644 eaterplanet_ecommerce/moduleB/presale/index.json create mode 100644 eaterplanet_ecommerce/moduleB/presale/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/presale/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/accountRecord.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/accountRecord.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/accountRecord.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/accountRecord.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/census.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/census.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/census.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/census.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/excharge.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/excharge.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/excharge.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/excharge.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/exchargeRecord.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/exchargeRecord.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/grab.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/grab.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/grab.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/grab.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/index.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/index.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/me.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/me.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/me.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/me.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/order.js create mode 100644 eaterplanet_ecommerce/moduleB/rider/order.json create mode 100644 eaterplanet_ecommerce/moduleB/rider/order.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/order.wxss create mode 100644 eaterplanet_ecommerce/moduleB/rider/tabbar.wxml create mode 100644 eaterplanet_ecommerce/moduleB/rider/tabbar.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/changePrice.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/changePrice.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/changePrice.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/changePrice.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/components/selectRider.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/components/selectRider.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/editSku.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/editSku.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/editSku.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/editSku.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/excharge.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/excharge.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/excharge.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/excharge.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/exchargeRecord.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/exchargeRecord.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/goodsManage.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/goodsManage.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/goodsManage.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/goodsManage.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/index.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/index.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/moneyManage.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/moneyManage.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/moneyManage.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/moneyManage.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderDetails.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderDetails.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderDetails.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderDetails.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderManage.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderManage.json create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderManage.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/orderManage.wxss create mode 100644 eaterplanet_ecommerce/moduleB/supply/static/orderMixin.js create mode 100644 eaterplanet_ecommerce/moduleB/supply/tabbar.wxml create mode 100644 eaterplanet_ecommerce/moduleB/supply/tabbar.wxss create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/btn.png create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/exchange.js create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/exchange.json create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxml create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxss create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/index.js create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/index.json create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/virtualcard/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/details.js create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/details.json create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/details.wxml create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/details.wxss create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/index.js create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/index.json create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/index.wxml create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/index.wxss create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/member.js create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/member.json create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/member.wxml create mode 100644 eaterplanet_ecommerce/moduleB/writeoff/member.wxss create mode 100644 eaterplanet_ecommerce/resource/css/excharge.wxss create mode 100644 eaterplanet_ecommerce/resource/css/vip.wxss create mode 100644 eaterplanet_ecommerce/utils/Location.js create mode 100644 eaterplanet_ecommerce/utils/WxValidate.js create mode 100644 eaterplanet_ecommerce/utils/countDown.js create mode 100644 eaterplanet_ecommerce/utils/index.js create mode 100644 eaterplanet_ecommerce/utils/mixins.js create mode 100644 eaterplanet_ecommerce/utils/public.js create mode 100644 eaterplanet_ecommerce/utils/qqmap-wx-jssdk.min.js create mode 100644 eaterplanet_ecommerce/utils/timeFormat.js create mode 100644 eaterplanet_ecommerce/utils/timeQueue.js create mode 100644 eaterplanet_ecommerce/utils/util.js create mode 100644 eaterplanet_ecommerce/utils/wcache.js diff --git a/eaterplanet_ecommerce/components/actionsheet/actionsheet.js b/eaterplanet_ecommerce/components/actionsheet/actionsheet.js new file mode 100644 index 0000000..25e9fae --- /dev/null +++ b/eaterplanet_ecommerce/components/actionsheet/actionsheet.js @@ -0,0 +1,170 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 1); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */, +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + title: { + type: String, + value: '' + }, + showCancel: { + type: Boolean, + value: true + }, + cancelText: { + type: String, + value: '取消' + }, + maskClass: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + maskClosable: { + type: Boolean, + value: true + }, + mask: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: false + }, + actions: { + type: Array, + value: [], + observer: '_groupChange' + } + }, + methods: { + _groupChange: function _groupChange(e) { + if (e.length > 0 && typeof e[0] !== 'string' && !(e[0] instanceof Array)) { + this.setData({ + actions: [this.data.actions] + }); + } + }, + buttonTap: function buttonTap(e) { + var _e$currentTarget$data = e.currentTarget.dataset, + value = _e$currentTarget$data.value, + groupindex = _e$currentTarget$data.groupindex, + index = _e$currentTarget$data.index; + + this.triggerEvent('actiontap', { value: value, groupindex: groupindex, index: index }); + }, + closeActionSheet: function closeActionSheet(e) { + var type = e.currentTarget.dataset.type; + + if (this.data.maskClosable || type) { + this.setData({ + show: false + }); + this.triggerEvent('close'); + } + } + } +}); + +/***/ }) +/******/ ]); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/actionsheet/actionsheet.json b/eaterplanet_ecommerce/components/actionsheet/actionsheet.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/actionsheet/actionsheet.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxml b/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxml new file mode 100644 index 0000000..1d3646d --- /dev/null +++ b/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxml @@ -0,0 +1,52 @@ + + var join = function(a,b) { + return a+b + }; + var isNotSlot = function(v) { + return typeof v !== 'string' + } + module.exports = { + join: join, + isNotSlot: isNotSlot + } + + + + + + + + {{title}} + + + + + + {{item.type}} + + + + {{item.text}} + + + + + + + + {{cancelText}} + + diff --git a/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxss b/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxss new file mode 100644 index 0000000..0b4bc62 --- /dev/null +++ b/eaterplanet_ecommerce/components/actionsheet/actionsheet.wxss @@ -0,0 +1,10 @@ +.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-actionsheet{position:fixed;left:0;bottom:0;transform:translate(0, 100%);backface-visibility:hidden;z-index:5000;width:100%;background-color:#EAE7E8;transition:transform .3s;border-top-left-radius:12px;border-top-right-radius:12px;overflow:hidden}.weui-actionsheet__title{position:relative;height:56px;padding:0 24px;display:flex;justify-content:center;flex-direction:column;text-align:center;font-size:12px;color:rgba(0,0,0,0.5);line-height:1.4;background:#FFFFFF}.weui-actionsheet__title:before{content:" ";position:absolute;left:0;bottom:0;right:0;height:1px;border-bottom:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-actionsheet__title .weui-actionsheet__title-text{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.weui-actionsheet__menu{color:rgba(0,0,0,0.9);background-color:#FFFFFF}.weui-actionsheet__action{margin-top:8px;background-color:#FFFFFF;padding-bottom:constant(safe-area-inset-bottom);padding-bottom:env(safe-area-inset-bottom)}.weui-actionsheet__cell{position:relative;padding:16px;text-align:center;font-size:17px;line-height:1.41176471}.weui-actionsheet__cell:before{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-actionsheet__cell:active{background-color:#ECECEC}.weui-actionsheet__cell:first-child:before{display:none}.weui-actionsheet__cell_warn{color:#FA5151}.weui-skin_android .weui-actionsheet{position:fixed;left:50%;top:50%;bottom:auto;transform:translate(-50%, -50%);width:274px;box-sizing:border-box;backface-visibility:hidden;background:transparent;transition:transform .3s;border-radius:2px}.weui-skin_android .weui-actionsheet__action{display:none}.weui-skin_android .weui-actionsheet__menu{border-radius:2px;box-shadow:0 6px 30px 0 rgba(0,0,0,0.1)}.weui-skin_android .weui-actionsheet__cell{padding:16px;font-size:17px;line-height:1.41176471;color:rgba(0,0,0,0.9);text-align:left}.weui-skin_android .weui-actionsheet__cell:first-child{border-top-left-radius:2px;border-top-right-radius:2px}.weui-skin_android .weui-actionsheet__cell:last-child{border-bottom-left-radius:2px;border-bottom-right-radius:2px}.weui-actionsheet_toggle{transform:translate(0, 0)}.weui-mask.weui-mask_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-mask{opacity:1;transform:scale3d(1, 1, 1);transition:all .3s} + +.btn.weui-actionsheet__cell { + background-color: transparent; + color: inherit; +} + +.btn.weui-actionsheet__cell::before { + border: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/ad-alert/index.js b/eaterplanet_ecommerce/components/ad-alert/index.js new file mode 100644 index 0000000..7d7fffe --- /dev/null +++ b/eaterplanet_ecommerce/components/ad-alert/index.js @@ -0,0 +1,121 @@ +// eaterplanet_ecommerce/components/ad-alert/index.js +Component({ + /** + * 组件的属性列表 + * pop_page 投放页面类型:0、商城首页,1、商品分类,2、商城购物车,3、商城个人中心 + */ + properties: { + pop_page: { + type: Number, + value: '' + } + }, + + data: { + imgheights: [],//所有图片的高度 + current:0, + visible: false, + adv_list: [] + }, + + attached: function() { + // this.getData(); + }, + + pageLifetimes: { + show: function () { + this.getData(); + } + }, + + methods: { + getData: function(){ + let token = wx.getStorageSync('token'); + let pop_page = this.data.pop_page; + getApp().util.ProReq('popadv.popadv_list', {token, pop_page}).catch(res=>{ + console.log(res.popadvs) + if(res.popadvs) { + let adv_list = res.popadvs.adv_list || []; + this.setData({ + adv_list, + visible: adv_list.length>0 + }) + } + }) + }, + imageLoad(e){ + //当图片载入完毕时 + var imgwidth = e.detail.width, + imgheight = e.detail.height, + //宽高比 + ratio = imgwidth / imgheight; + console.log(imgwidth, imgheight) + // 计算的高度值 + var viewHeight = 600 / ratio; + var imgheight = viewHeight; + var imgheights = this.data.imgheights; + //把每一张图片的对应的高度记录到数组里 + imgheights[e.target.dataset.id] = imgheight; + console.log('图片的高度:'+imgheights) + this.setData({ + imgheights: imgheights + }) + }, + bindchange: function (e) { + // current 改变时会触发 change 事件 + this.setData({ current: e.detail.current }) + }, + close: function() { + this.setData({ visible: false }) + }, + popclick: function(e){ + let idx = e.currentTarget.dataset.idx; + if(idx!=='') { + let adv_list = this.data.adv_list; + let linktype = adv_list[idx].linktype; + let url = adv_list[idx].link; + let ad_id = adv_list[idx].ad_id; + if (linktype == 0) { + // 跳转webview + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url), + }) + } else if (linktype == 1) { + let tabUrls = ['/eaterplanet_ecommerce/pages/index/index', '/eaterplanet_ecommerce/pages/order/shopCart', '/eaterplanet_ecommerce/pages/user/me', '/eaterplanet_ecommerce/pages/type/index']; + if (tabUrls.indexOf(url) != -1) { + url && wx.switchTab({ url: url }) + } else { + url && wx.navigateTo({ url: url }) + } + } else if (linktype == 2) { + // 跳转小程序 + let appId = adv_list[idx].appid; + appId && wx.navigateToMiniProgram({ + appId, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + console.log(`弹窗广告:打开外链 appId:${appId} url:${url} 成功`) + }, + fail(error) { + console.log(`弹窗广告:打开外链 appId:${appId} url:${url} 失败`) + console.log('失败原因:' + error.errMsg) + if(error.errMsg == 'navigateToMiniProgram:fail invalid appid') { + wx.showToast({ + icon: 'none', + title: 'appid验证失败,请检查!', + }) + } + } + }) + } + //添加点击量 + this.addview(ad_id); + } + }, + addview: function(id){ + getApp().util.ProReq('popadv.popadv_click', {id}) + } + } +}) diff --git a/eaterplanet_ecommerce/components/ad-alert/index.json b/eaterplanet_ecommerce/components/ad-alert/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/ad-alert/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/ad-alert/index.wxml b/eaterplanet_ecommerce/components/ad-alert/index.wxml new file mode 100644 index 0000000..0a75e66 --- /dev/null +++ b/eaterplanet_ecommerce/components/ad-alert/index.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/components/ad-alert/index.wxss b/eaterplanet_ecommerce/components/ad-alert/index.wxss new file mode 100644 index 0000000..64e92c5 --- /dev/null +++ b/eaterplanet_ecommerce/components/ad-alert/index.wxss @@ -0,0 +1,40 @@ +.fixed { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + z-index: 1000; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.mask { + position: fixed; + top: 0; + left: 0; + bottom: 0; + right: 0; + background: rgba(0, 0, 0, 0.6); +} + +.cont { + z-index: 1001; + width: 80%; +} + +.cont .img { + width: 100%; +} + +.close-img { + margin-top: 40rpx; + width: 60rpx; + height: 60rpx; +} + +.swiper { + width: 100%; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/addCartBtn/index.js b/eaterplanet_ecommerce/components/addCartBtn/index.js new file mode 100644 index 0000000..4af3057 --- /dev/null +++ b/eaterplanet_ecommerce/components/addCartBtn/index.js @@ -0,0 +1,18 @@ +Component({ + externalClasses: ['i-class'], + properties: { + fontsize: { + type: Number, + value: 24 + } + }, + data: { + skin: getApp().globalData.skin, + }, + + attached(){ + this.setData({ + skin: getApp().globalData.skin, + }) + } +}) diff --git a/eaterplanet_ecommerce/components/addCartBtn/index.json b/eaterplanet_ecommerce/components/addCartBtn/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/addCartBtn/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/addCartBtn/index.wxml b/eaterplanet_ecommerce/components/addCartBtn/index.wxml new file mode 100644 index 0000000..11fab14 --- /dev/null +++ b/eaterplanet_ecommerce/components/addCartBtn/index.wxml @@ -0,0 +1,3 @@ + + + diff --git a/eaterplanet_ecommerce/components/addCartBtn/index.wxss b/eaterplanet_ecommerce/components/addCartBtn/index.wxss new file mode 100644 index 0000000..b5e1df2 --- /dev/null +++ b/eaterplanet_ecommerce/components/addCartBtn/index.wxss @@ -0,0 +1,11 @@ +@import "/icon.wxss"; + +.btn { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + background: linear-gradient(to top, #ff5345, #ff8379); + display: flex!important; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/advimg/index.js b/eaterplanet_ecommerce/components/advimg/index.js new file mode 100644 index 0000000..1a84838 --- /dev/null +++ b/eaterplanet_ecommerce/components/advimg/index.js @@ -0,0 +1,108 @@ +Component({ + properties: { + pos: { + type: String, + value: 0 + } + }, + data: { + info: '', + ishow: false + }, + + attached: function(){ + this.getData(); + }, + + pageLifetimes: { + show: function() { + console.log('pageLifetimes') + this.getData(); + } + }, + + methods: { + getData: function() { + let that = this; + getApp().util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.get_advimg' + }, + dataType: 'json', + success: function (res) { + if(res.data.code==0) { + let info = res.data.data; + let pos = info.pos || []; + let ishow = pos.includes(that.data.pos); + that.setData({ info, ishow }) + } else { + that.setData({ ishow: false }) + } + } + }) + }, + goNav: function(){ + let info = this.data.info; + let type = info.linktype; + let url = info.link; + if (type == 0) { + // 跳转webview + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url), + }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url }) + } else { + url && wx.navigateTo({ url }) + } + } else if (type == 2) { + // 跳转小程序 + let appId = info.appid; + appId && wx.navigateToMiniProgram({ + appId, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } else if (type == 3) { + if(this.data.pos==0) { + this.triggerEvent("switchType", url); + } else { + getApp().globalData.indexCateId = url; + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }) + } + } else if (type == 4) { + //独立分类 + getApp().globalData.typeCateId = url; + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/type/index' + }) + }else if (type==5){ + // 跳转小程序 + let appId = info.appid; + appId && wx.navigateToMiniProgram({ + appId, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } + } + } +}) diff --git a/eaterplanet_ecommerce/components/advimg/index.json b/eaterplanet_ecommerce/components/advimg/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/advimg/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/advimg/index.wxml b/eaterplanet_ecommerce/components/advimg/index.wxml new file mode 100644 index 0000000..694b18b --- /dev/null +++ b/eaterplanet_ecommerce/components/advimg/index.wxml @@ -0,0 +1,6 @@ + + + + diff --git a/eaterplanet_ecommerce/components/advimg/index.wxss b/eaterplanet_ecommerce/components/advimg/index.wxss new file mode 100644 index 0000000..7e9da23 --- /dev/null +++ b/eaterplanet_ecommerce/components/advimg/index.wxss @@ -0,0 +1,24 @@ +.wrap { + padding: 0 20rpx; + margin: 10rpx 0; + filter: drop-shadow(0 10rpx 15rpx rgb(0, 0, 0, 0.4)); +} + +.wrap .img { + width: 100%; + border-radius: 20rpx; + +} + +.contact { + font-size: inherit; + line-height: inherit; + border-radius: 0; + background: transparent; + color: inherit; + padding: 0; +} + +.contact::after { + content: none; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/asideBtn/index.js b/eaterplanet_ecommerce/components/asideBtn/index.js new file mode 100644 index 0000000..4c94c3f --- /dev/null +++ b/eaterplanet_ecommerce/components/asideBtn/index.js @@ -0,0 +1,29 @@ +// eaterplanet_ecommerce/components/cartBtn/index.js +Component({ + externalClasses: ["i-class", "i-icon"], + properties: { + showHome: { + type: Boolean, + value: false + }, + showShare: { + type: Boolean, + value: false + }, + showContact: { + type: Boolean, + value: false + }, + cartNum: { + type: Number, + value: 0 + } + }, + + methods: { + goLink: function (e) { + let url = e.currentTarget.dataset.link; + wx.switchTab({ url }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/asideBtn/index.json b/eaterplanet_ecommerce/components/asideBtn/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/asideBtn/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/asideBtn/index.wxml b/eaterplanet_ecommerce/components/asideBtn/index.wxml new file mode 100644 index 0000000..947fd0a --- /dev/null +++ b/eaterplanet_ecommerce/components/asideBtn/index.wxml @@ -0,0 +1,14 @@ + + + + + + 首页 + + diff --git a/eaterplanet_ecommerce/components/asideBtn/index.wxss b/eaterplanet_ecommerce/components/asideBtn/index.wxss new file mode 100644 index 0000000..b3f98ab --- /dev/null +++ b/eaterplanet_ecommerce/components/asideBtn/index.wxss @@ -0,0 +1,59 @@ +@import "../../../icon.wxss"; +.cart-btn { + position: fixed; + right: 0rpx; + bottom: 40%; + z-index: 100; +} + +.cart-btn .icon { + position: relative; + margin-bottom: 20rpx; + right: 0rpx; + width: 70rpx; + height: 100rpx; + background: #4facfe86; + border-radius: 30rpx 0rpx 0rpx 30rpx; + text-align: center; + color: #fff; + box-sizing: border-box; + font-size: 20rpx; + padding: 10rpx; + line-height: 1.4; + z-index: 100; +} + +.cart-btn .btn.icon { + line-height: 1.5; + z-index: 100; +} + +.cart-btn .iconfont { + font-size: 30rpx; + color: #fff; +} + + +.cart-btn .none-btn.icon .iconfont { + font-size: 35rpx; +} + +.cart-btn .none-btn.icon .name { + margin-top: -3rpx; +} + +.button::after { +width: 200%; +height: 200%; +position: absolute; +top: 0; +left: 0; +border: 0px solid rgba(0,0,0,.2); +-webkit-transform: scale(.5); +transform: scale(.5); +-webkit-transform-origin: 0 0; +transform-origin: 0 0; +box-sizing: border-box; +border-radius: 10px; + +} diff --git a/eaterplanet_ecommerce/components/auth/index.js b/eaterplanet_ecommerce/components/auth/index.js new file mode 100644 index 0000000..f234d4d --- /dev/null +++ b/eaterplanet_ecommerce/components/auth/index.js @@ -0,0 +1,144 @@ +var util = require('../../utils/util.js'); +var wcache = require('../../utils/wcache.js'); +var app = getApp(); +var flag = true; + +Component({ + properties: { + needAuth: { + type: Boolean, + value: false + }, + needPosition: { + type: Boolean, + value: true + }, + navBackUrl: { + type: String, + value: '', + observer: function (t) { + if (t) app.globalData.navBackUrl = t; + } + } + }, + data: { + btnLoading: false, + isIpx: false, + auth_bg: '', + loaded: false + }, + attached: function() { + this.getBg(); + app.globalData.isIpx && this.setData({ + isIpx: true + }); + }, + methods: { + getBg: function(){ + let that = this; + let auth_bg = wcache.get('auth_bg', false); + if (!auth_bg){ + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_auth_bg' + }, + dataType: 'json', + success: function (res) { + that.setData({ loaded: true }) + if (res.data.code == 0) { + wcache.put('auth_bg', res.data.data, 600); + res.data.data && that.setData({ auth_bg: res.data.data }) + } + } + }) + } else { + that.setData({ auth_bg, loaded: true }) + } + }, + bindGetUserInfo: function (t) { + var that = this; + if (!this.data.btnLoading) { + wx.getUserProfile({ + desc: "获取你的昵称、头像、地区及性别", + success: function (msg) { + var userInfo = msg.userInfo + wx.setStorage({ + key: "userInfo", + data: userInfo + }) + that.setData({ btnLoading: true }); + util.login_prosime(that.data.needPosition, userInfo).then(function () { + console.log("授权成功") + that.setData({ btnLoading: false }); + wx.showToast({ + title: '登录成功', + icon: 'success', + duration: 2000 + }) + that.triggerEvent("authSuccess"); + app.globalData.changedCommunity = true; + //检查获取位置权限 + that.data.needPosition && location.getGps(); + }).catch(function () { + that.triggerEvent("cancel"); + console.log('授权失败'); + }) + }, + fail: ()=>{ + wx.showToast({ + title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。", + icon: "none" + }); + that.triggerEvent("cancel"); + that.setData({ btnLoading: false }); + } + }) + } + }, + bindGetUserInfoTwo: function (t) { + var that = this; + wx.showLoading({ title: '授权中' }); + if (flag) { + flag = false; + var n = t.detail; + if ("getUserInfo:ok" === n.errMsg) { + util.login_prosime().then(function () { + console.log("授权成功") + wx.hideLoading(); + flag = true; + wx.showToast({ + title: '登录成功', + icon: 'success', + duration: 2000 + }) + that.triggerEvent("authSuccess"); + }).catch(function () { + flag = true; + wx.hideLoading(); + console.log('授权失败') + }) + } else { + wx.hideLoading(); + wx.showToast({ + title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。", + icon: "none" + }); + flag = true; + } + } + } + // openSetting: function () { + // location.openSetting().then(function (t) { + // app.globalData.location = { + // lat: t.latitude, + // lng: t.longitude + // }; + // app.globalData.community.communityId || wx.redirectTo({ + // url: "/eaterplanet_ecommerce/pages/position/communities" + // }); + // app.globalData.canGetGPS = true; + // }); + // } + } +}); diff --git a/eaterplanet_ecommerce/components/auth/index.json b/eaterplanet_ecommerce/components/auth/index.json new file mode 100644 index 0000000..67def3c --- /dev/null +++ b/eaterplanet_ecommerce/components/auth/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../button/index", + "i-router-link": "../router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/auth/index.wxml b/eaterplanet_ecommerce/components/auth/index.wxml new file mode 100644 index 0000000..cc5f101 --- /dev/null +++ b/eaterplanet_ecommerce/components/auth/index.wxml @@ -0,0 +1,14 @@ + + + + + 我们的小程序将获取您的以下权限: + ·获取您的公开信息(昵称和头像等) + (如未授权,可能无法正常使用该小程序) + 确认授权 + 请升级微信版本 + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/auth/index.wxss b/eaterplanet_ecommerce/components/auth/index.wxss new file mode 100644 index 0000000..c4f98f7 --- /dev/null +++ b/eaterplanet_ecommerce/components/auth/index.wxss @@ -0,0 +1,61 @@ +.mb20 { + margin-bottom: 40rpx; +} + +.wrap { + position: fixed; + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; +} + +.wrap .auth-login { + margin: 100rpx 0 50rpx; + width: 550rpx; +} + +.auth_bg { + width: 100%; + height: 100%; + border-radius: 0; +} + +.auth_bg::after { + border: 0; +} + +.wrap .line1 { + line-height: 50rpx; + color: #333; + font-size: 30rpx; +} + +.wrap .line2 { + line-height: 50rpx; + color: #999; + font-size: 26rpx; +} + +.wrap .line3 { + line-height: 50rpx; + color: #333; + font-size: 24rpx; +} + +.wrap .confirm { + width: 500rpx; + height: 90rpx; + line-height: 90rpx; + margin-top: 40rpx; + background: #4facfe; + color: #fff; + border-radius: 10rpx; + font-size: 34rpx; + margin-bottom: 40%; +} + +.button-hover { + opacity: 0.8; +} diff --git a/eaterplanet_ecommerce/components/behavior/goods.js b/eaterplanet_ecommerce/components/behavior/goods.js new file mode 100644 index 0000000..f2843ee --- /dev/null +++ b/eaterplanet_ecommerce/components/behavior/goods.js @@ -0,0 +1,318 @@ +var t = require("../../utils/public"); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); +var app = getApp(); + +module.exports = Behavior({ + properties: { + spuItem: { + type: Object, + value: { + spuId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + label_info: "", + car_count: 0 + }, + observer: function (t) { + let url = `/eaterplanet_ecommerce/pages/goods/goodsDetail?id=${t.actId}`; + // if (t && t.is_video) url = `/eaterplanet_ecommerce/moduleA/video/detail?&id=${t.actId}`; + this.setData({ url }); + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + isShowListCount: { + type: Number, + value: 0 + }, + changeCarCount: { + type: Boolean, + value: false, + observer: function (t) { + if (t) this.setData({ number: this.data.spuItem.car_count || 0 }); + } + }, + needAuth: { + type: Boolean, + value: false + }, + is_open_vipcard_buy: { + type: Number, + value: 0 + }, + canLevelBuy: { + type: Boolean, + value: false + }, + isShowListTimer: { + type: Boolean, + value: true + }, + showPickTime: { + type: Boolean, + value: false + }, + skin: { + type: Object + }, + saleUnit: { + type: String + }, + width250: { + type: Boolean, + value: false + }, + diyInfo: { + type: Object, + value: { + goodsTag: 'default' + } + } + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg}) + }, + data: { + disabled: false, + placeholdeImg: '', + number: 0, + url: '', + canClick: true + }, + ready: function () { + this.setData({ + number: this.data.spuItem.car_count || 0 + }); + }, + methods: { + openSku: function() { + if (this.data.needAuth) { + this.triggerEvent("authModal", true); + return; + } + console.log( 'step1'); + this.setData({ + stopClick:true, + disabled:false + }) + let spuItem = this.data.spuItem; + if (this.data.spuItem.skuList.length === void 0) { + this.triggerEvent("openSku", { + actId:spuItem.actId, + skuList: spuItem.skuList, + promotionDTO: spuItem.promotionDTO, + is_take_vipcard: spuItem.is_take_vipcard, + is_mb_level_buy: spuItem.is_mb_level_buy, + allData: { + spuName: spuItem.spuName, + skuImage: spuItem.skuImage, + actPrice: spuItem.actPrice, + canBuyNum: spuItem.spuCanBuyNum, + stock: spuItem.spuCanBuyNum, + marketPrice: spuItem.marketPrice, + oneday_limit_count: spuItem.oneday_limit_count, + total_limit_count: spuItem.total_limit_count, + one_limit_count: spuItem.one_limit_count, + goods_start_count: spuItem.goods_start_count + } + }); + } else { + this.addCart({ value: 1, type: "plus" }); + } + }, + countDownEnd: function() { + this.setData({ + actEnd: true + }); + }, + submit2: function(e) { + (0, t.collectFormIds)(e.detail.formId); + }, + changeNumber: function (t) { + var e = t.detail; + e && this.addCart(e); + }, + outOfMax: function (t) { + var e = t.detail; + let { spuCanBuyNum, one_limit_count } = this.data.spuItem; + let canBuyNum = spuCanBuyNum= canBuyNum) { + wx.showToast({ + title: "不能购买更多啦", + icon: "none" + }) + } + }, + addCart: function (t) { + // {value: 2, type: "plus/minus"} + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + let spuItem = this.data.spuItem; + var goods_id = spuItem.actId; + var community_id = community.communityId; + let { car_count, goods_start_count } = spuItem; + let quantity = 1; + let number = this.data.number || 0; + + let that = this; + if (t.type =='plus'){ + if(number{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + that.triggerEvent("vipModal", { pop_vipmember_buyimage, showVipModal: true, visible: false }); + } else { + if (res.data.code == 3) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: that.data.number }) + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + } else if (res.data.code == 6 || res.data.code == 7) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: that.data.number }) + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + that.triggerEvent("changeCartNum", res.data.total); + that.setData({ number: res.data.cur_count }) + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } else { + console.log('goods_start_count',goods_start_count) + console.log('number',number) + if(number<=goods_start_count) { + quantity = number; + } + + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.reduce_car_goods', + token: token, + goods_id: goods_id, + community_id: community_id, + quantity, + sku_str: '', + buy_type: 'dan', + pin_id: 0, + is_just_addcar: 1 + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if (res.data.code == 3) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + if (that.data.needAuth) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + return; + } + } else { + that.triggerEvent("changeCartNum", res.data.total); + that.setData({ number: res.data.cur_count }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } + + }, + goDetails: function(t){ + if(!this.data.canClick) { + return; + } + let that = this; + this.setData({ + canClick: false + }); + let goodsid = t.currentTarget.dataset.id || ''; + let img = t.currentTarget.dataset.img || ''; + let url = '/eaterplanet_ecommerce/pages/goods/goodsDetail?id='+goodsid; + util.getStorageImage(img).then(res=>{ + wx.navigateTo({ + url, + complete: function () { + setTimeout(function () { + that.setData({ + canClick: true + }); + }, 400); + } + }) + }).catch(err=>{ + wx.navigateTo({ + url, + complete: function () { + setTimeout(function () { + that.setData({ + canClick: true + }); + }, 400); + } + }) + }); + } + } +}); diff --git a/eaterplanet_ecommerce/components/button/index.js b/eaterplanet_ecommerce/components/button/index.js new file mode 100644 index 0000000..fe5c832 --- /dev/null +++ b/eaterplanet_ecommerce/components/button/index.js @@ -0,0 +1,81 @@ +Component({ + externalClasses: ["i-class"], + properties: { + type: { + type: String, + value: "" + }, + inline: { + type: Boolean, + value: false + }, + size: { + type: String, + value: "" + }, + shape: { + type: String, + value: "square" + }, + disabled: { + type: Boolean, + value: false + }, + loading: { + type: Boolean, + value: false + }, + long: { + type: Boolean, + value: false + }, + openType: String, + appParameter: String, + hoverStopPropagation: Boolean, + hoverStartTime: { + type: Number, + value: 20 + }, + hoverStayTime: { + type: Number, + value: 140 + }, + lang: { + type: String, + value: "en" + }, + sessionFrom: { + type: String, + value: "" + }, + sendMessageTitle: String, + sendMessagePath: String, + sendMessageImg: String, + showMessageCard: Boolean, + styleStr: { + type: String, + value: "" + } + }, + methods: { + handleTap: function () { + return !this.data.disabled && (!this.data.loading && void this.triggerEvent("click")); + }, + bindgetuserinfo: function () { + var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e; + this.triggerEvent("getuserinfo", t); + }, + bindcontact: function () { + var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e; + this.triggerEvent("contact", t); + }, + bindgetphonenumber: function () { + var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e; + this.triggerEvent("getphonenumber", t); + }, + binderror: function () { + var e = (arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {}).detail, t = void 0 === e ? {} : e; + this.triggerEvent("error", t); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/button/index.json b/eaterplanet_ecommerce/components/button/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/button/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/button/index.wxml b/eaterplanet_ecommerce/components/button/index.wxml new file mode 100644 index 0000000..526ce13 --- /dev/null +++ b/eaterplanet_ecommerce/components/button/index.wxml @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/button/index.wxss b/eaterplanet_ecommerce/components/button/index.wxss new file mode 100644 index 0000000..c8b9c38 --- /dev/null +++ b/eaterplanet_ecommerce/components/button/index.wxss @@ -0,0 +1,127 @@ +.i-btn { + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + white-space: nowrap; + user-select: none; + font-size: 28rpx; + border-radius: 4rpx; + border: 0 !important; + position: relative; + text-decoration: none; + height: 88rpx; + line-height: 88rpx; + background: #f7f7f7; + color: #495060; + margin: 20rpx; +} + +.i-btn-hover { + opacity: 0.7; +} + +.i-btn-long { + border-radius: 0; + margin: 0; + box-shadow: none; +} + +.i-btn-large { + height: 96rpx; + line-height: 96rpx; +} + +.i-btn-small { + height: 80rpx; + line-height: 80rpx; +} + +.i-btn-primary { + color: #fff; + background: #2d8cf0; +} + +.i-btn-ghost { + background: #fff; + color: #495060; +} + +.i-btn-success { + color: #fff; + background: #19be6b; +} + +.i-btn-warning { + color: #fff; + background: #f90; +} + +.i-btn-error { + color: #fff; + background: #ed3f14; +} + +.i-btn-info { + color: #fff; + background: #2db7f5; +} + +.i-btn-circle { + border-radius: 88rpx; +} + +.i-btn-large.i-btn-circle { + border-radius: 96rpx; +} + +.i-btn-small.i-btn-circle { + border-radius: 80rpx; +} + +.i-btn-loading { + opacity: 0.6; +} + +.i-btn-loading-inner { + display: inline-block; + margin-right: 24rpx; + vertical-align: middle; + width: 28rpx; + height: 28rpx; + background: 0 0; + border: 4rpx solid #e9eaec; + border-color: #e9eaec #e9eaec #e9eaec #2d8cf0; + border-radius: 50%; + animation: btn-spin 0.6s linear; + animation-iteration-count: infinite; +} + +.i-btn-disabled { + opacity: 0.9; +} + +.i-btn-inline { + display: inline-block; +} + +@-webkit-keyframes btn-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(360deg); + } +} + +@keyframes btn-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(360deg); + } +} diff --git a/eaterplanet_ecommerce/components/card/index.js b/eaterplanet_ecommerce/components/card/index.js new file mode 100644 index 0000000..800dc9a --- /dev/null +++ b/eaterplanet_ecommerce/components/card/index.js @@ -0,0 +1,7 @@ +// eaterplanet_ecommerce/components/cart/index.js +Component({ + options: { + multipleSlots: true + }, + externalClasses: ["i-class", "i-card-header", "i-card-body", "i-card-footer"] +}) diff --git a/eaterplanet_ecommerce/components/card/index.json b/eaterplanet_ecommerce/components/card/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/card/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/card/index.wxml b/eaterplanet_ecommerce/components/card/index.wxml new file mode 100644 index 0000000..310fb5a --- /dev/null +++ b/eaterplanet_ecommerce/components/card/index.wxml @@ -0,0 +1,11 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/card/index.wxss b/eaterplanet_ecommerce/components/card/index.wxss new file mode 100644 index 0000000..0b831e8 --- /dev/null +++ b/eaterplanet_ecommerce/components/card/index.wxss @@ -0,0 +1,9 @@ +.i-card { + width: 710rpx; + border-radius: 20rpx; + background: #fff; + display: flex; + flex-direction: column; + overflow: hidden; + box-shadow: 10rpx 10rpx 20rpx 0rpx #afafafa1; +} diff --git a/eaterplanet_ecommerce/components/cartBtn/index.js b/eaterplanet_ecommerce/components/cartBtn/index.js new file mode 100644 index 0000000..5de5a4d --- /dev/null +++ b/eaterplanet_ecommerce/components/cartBtn/index.js @@ -0,0 +1,21 @@ +// eaterplanet_ecommerce/components/fixed-cart/index.js +Component({ + externalClasses: ["i-class"], + properties: { + cartNum: { + type: Number, + default: 0 + } + }, + + /** + * 组件的方法列表 + */ + methods: { + goCart: function () { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/order/shopCart', + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/cartBtn/index.json b/eaterplanet_ecommerce/components/cartBtn/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/cartBtn/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/cartBtn/index.wxml b/eaterplanet_ecommerce/components/cartBtn/index.wxml new file mode 100644 index 0000000..cc93ea5 --- /dev/null +++ b/eaterplanet_ecommerce/components/cartBtn/index.wxml @@ -0,0 +1,5 @@ + + + 购物车 + {{cartNum}} + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/cartBtn/index.wxss b/eaterplanet_ecommerce/components/cartBtn/index.wxss new file mode 100644 index 0000000..8260c9b --- /dev/null +++ b/eaterplanet_ecommerce/components/cartBtn/index.wxss @@ -0,0 +1,37 @@ +.cart { + position: fixed; + left: 0rpx; + bottom: 80rpx; + width: 160rpx; + height: 100rpx; + border-radius: 0rpx 30rpx 30rpx 0rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + line-height: 1.5; + font-size: 24rpx; + background: #4facfe86; + backdrop-filter: blur(40rpx); + color: #fff; + /**box-shadow: 0 0 15rpx rgba(0,0,0,0.2);**/ +} + +.cart .img { + width: 54rpx; + height: 54rpx; +} + +.cart .num { + color: #fff; + background-color: #4facfe; + position: absolute; + top: -15rpx; + right: -15rpx; + min-width: 54rpx; + height: 54rpx; + line-height: 54rpx; + border-radius: 54rpx; + text-align: center; + font-size: 26rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/cashon_delivery/index.js b/eaterplanet_ecommerce/components/cashon_delivery/index.js new file mode 100644 index 0000000..81ee7b7 --- /dev/null +++ b/eaterplanet_ecommerce/components/cashon_delivery/index.js @@ -0,0 +1,40 @@ +// eaterplanet_ecommerce/components/cashon_delivery/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + paymentCode: { + type: String, + value: "" + }, + codeImg: { + type: String, + value: "" + } + }, + + /** + * 组件的初始数据 + */ + data: { + showTipDialog: false, + showImgDialog: false + }, + + /** + * 组件的方法列表 + */ + methods: { + handleTipDialog() { + this.setData({ + showTipDialog: !this.data.showTipDialog + }) + }, + handleImgDialog() { + this.setData({ + showImgDialog: !this.data.showImgDialog + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/cashon_delivery/index.json b/eaterplanet_ecommerce/components/cashon_delivery/index.json new file mode 100644 index 0000000..979d4f5 --- /dev/null +++ b/eaterplanet_ecommerce/components/cashon_delivery/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/cashon_delivery/index.wxml b/eaterplanet_ecommerce/components/cashon_delivery/index.wxml new file mode 100644 index 0000000..f655705 --- /dev/null +++ b/eaterplanet_ecommerce/components/cashon_delivery/index.wxml @@ -0,0 +1,25 @@ + + 出示收款码 + 暂无收款码,请线下收款 + + + + + + 收款码 + + 该订单为 “货到付款” 支付方式,用户订单签收的时候请出示“收款码”进行收款,或者其他方式收款,提前沟通确认,防止订单出错。 + + 知道了 + + + + + + 收款码 + + + + 关闭 + + diff --git a/eaterplanet_ecommerce/components/cashon_delivery/index.wxss b/eaterplanet_ecommerce/components/cashon_delivery/index.wxss new file mode 100644 index 0000000..bf09988 --- /dev/null +++ b/eaterplanet_ecommerce/components/cashon_delivery/index.wxss @@ -0,0 +1,2 @@ +@import "../../../common.wxss"; +@import "../../../icon.wxss"; \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/changeCommunity/index.js b/eaterplanet_ecommerce/components/changeCommunity/index.js new file mode 100644 index 0000000..9dd4c5a --- /dev/null +++ b/eaterplanet_ecommerce/components/changeCommunity/index.js @@ -0,0 +1,85 @@ +Component({ + properties: { + changeCommunity: { + type: Object, + value: {} + }, + community: { + type: Object, + value: {} + }, + visible: { + type: Boolean, + value: false + }, + canChange: { + type: Boolean, + value: true + }, + groupInfo: { + type: Object, + value: { + group_name: '社区', + owner_name: '团长' + } + }, + cancelFn: { + type: Boolean, + value: false + } + }, + + attached() { + this.countDistance() + }, + + methods: { + countDistance: function () { + let that = this; + wx.getLocation({ + type: 'wgs84', + success(res) { + let {changeCommunity, community} = that.data; + const latitude = res.latitude; + const longitude = res.longitude; + let lat1 = community.lat || ''; + let lon1 = community.lon || ''; + let lat2 = changeCommunity.lat || ''; + let lon2 = community.lon || ''; + if(lat1 && lon1 && lat2 && lon2) { + let distance1 = that.getDistance(latitude, longitude, lat1, lon1); + let distance2 = that.getDistance(latitude, longitude, lat2, lon2); + community.distance = "距您"+distance1.toFixed(2)+"km"; + changeCommunity.distance = "距您"+distance2.toFixed(2)+"km"; + that.setData({ community, changeCommunity }) + } + } + }) + }, + getDistance: function (lat1, lng1, lat2, lng2) { + var radLat1 = lat1 * Math.PI / 180.0; + var radLat2 = lat2 * Math.PI / 180.0; + var a = radLat1 - radLat2; + var b = lng1 * Math.PI / 180.0 - lng2 * Math.PI / 180.0; + var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2))); + s = s * 6378.137; + s = Math.round(s * 10000) / 10000; + return s; + }, + switchCommunity: function (e) { + let type = e.currentTarget.dataset.type; + if (type == 0 || !this.data.canChange) { + this.closeModal(); + } else { + this.data.canChange && this.triggerEvent('changeComunity'), getApp().globalData.goodsListCarCount = []; + } + }, + closeModal: function () { + this.data.cancelFn && this.triggerEvent('noChange'); + this.setData({ + visible: false + }) + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/changeCommunity/index.json b/eaterplanet_ecommerce/components/changeCommunity/index.json new file mode 100644 index 0000000..979d4f5 --- /dev/null +++ b/eaterplanet_ecommerce/components/changeCommunity/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/changeCommunity/index.wxml b/eaterplanet_ecommerce/components/changeCommunity/index.wxml new file mode 100644 index 0000000..8b9576c --- /dev/null +++ b/eaterplanet_ecommerce/components/changeCommunity/index.wxml @@ -0,0 +1,39 @@ + + + + + + 分享{{groupInfo.owner_name}}与当前{{groupInfo.owner_name}}不一致,请选择因为设置无法切换{{groupInfo.owner_name}},所以仍绑定之前{{groupInfo.owner_name}}。 + + + + + + 分享{{groupInfo.owner_name}} + + + {{changeCommunity.communityName}} {{changeCommunity.distance}} + {{changeCommunity.fullAddress}} + + + + + + + + + 原{{groupInfo.owner_name}} + + + {{community.communityName}} {{community.distance}} + {{community.fullAddress}} + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/changeCommunity/index.wxss b/eaterplanet_ecommerce/components/changeCommunity/index.wxss new file mode 100644 index 0000000..f65a8dd --- /dev/null +++ b/eaterplanet_ecommerce/components/changeCommunity/index.wxss @@ -0,0 +1,112 @@ +.community-box { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.community-content { + width: 620rpx; + background: #fff; + border-radius: 10rpx; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + margin: 30px auto; + overflow: hidden; + z-index: 1001; +} + +.community-content-title { + position: relative; + font-size: 30rpx; + width: 100%; + box-sizing: border-box; + text-align: center; + padding: 20rpx; +} + +.community-content-change { + color: #4facfe; + margin-left: 15rpx; +} + +.community-content-tip { + color: #666; + font-size: 32rpx; + line-height: 1.6; + padding: 20rpx; +} + +.community-content-tip .item { + border: 1rpx solid #ccc; + padding: 10rpx; + margin-bottom: 20rpx; + border-radius: 10rpx; +} + +.community-content-tip .item-l { + min-width: 110rpx; + max-width: 150rpx; + text-align: center; +} + +.community-content-tip .item-l .type { + font-size: 24rpx; + background-color: #4facfe; + color: #fff; + border-radius: 3px; + padding: 3rpx 5rpx; +} + +.community-content-tip .item-l .type.green { + background-color: green; +} + +.community-content-tip .item-r { + flex: 1; + margin-left: 5px; +} + +.community-content-tip .item-ft { + width: 20rpx; +} + +.community-content-tip .item-ft .img { + width: 20rpx; +} + +.community-content-tip .item { + display: flex; + align-items: center; +} + +.community-content-tip .img { + width: 80rpx; + height: 80rpx; + border-radius: 50%; +} + +.community-content-tip .name { + font-weight: bold; + color: #333; +} + +.community-content-tip .address { + color: #999; + font-size: 28rpx; +} + +.community-box .closeBtn { + width: 80rpx; + height: 80rpx; + margin: 0 auto; +} + +.distance { + font-size: 24rpx; + color: #f75451; + font-weight: normal; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/chooseImage/index.js b/eaterplanet_ecommerce/components/chooseImage/index.js new file mode 100644 index 0000000..3ca6f0b --- /dev/null +++ b/eaterplanet_ecommerce/components/chooseImage/index.js @@ -0,0 +1,106 @@ +function e(e, t, a) { + return t in e ? Object.defineProperty(e, t, { + value: a, + enumerable: !0, + configurable: !0, + writable: !0 + }) : e[t] = a, e; +} + +var t = [], + a = 0, + r = []; + +var app = getApp(); + +Component({ + properties: { + imgMax: { + type: Number, + value: 0 + }, + token: String, + key: { + type: String, + value: "wx-upload" + } + }, + data: { + imgGroup: [], + progressList: [] + }, + methods: { + addImg: function() { + var s = this, + i = this.data.imgGroup; + wx.chooseMedia({ + count: this.data.imgMax - i.length, + success: function(n) { + const tempFiles = n.tempFiles; + s.triggerEvent("on-chooseImage", {key: s.data.key}), (i = i.concat(tempFiles)).length > s.data.imgMax && i.splice(s.data.imgMax), + s.setData({ + imgGroup: i + }); + var o = tempFiles.length; + a = i.length; + for (var g = 0; g < o; g++) ! function(i) { + var g = tempFiles[i].tempFilePath.split(".")[tempFiles[i].tempFilePath.split(".").length - 1], + l = new Date().getTime(), + p = Math.round(1e6 * Math.random()); + r[i + a - o] = wx.uploadFile({ + url: app.util.url('entry/wxapp/index', { + 'm': 'eaterplanet_ecommerce', + 'controller': 'goods.doPageUpload' + }), + filePath: tempFiles[i].tempFilePath, + name: "upfile", + header: { + "Content-Type": "multipart/form-data" + }, + formData: { + token: s.data.token, + key: s.data.key + "-" + l + "-" + p + "." + g + }, + success: function(r) { + t[i + a - o] = JSON.parse(r.data).image_o, s.setData(e({}, "progressList[" + (i + a - o) + "]", 100)), + s.triggerEvent("on-changeImage", { + value: t, + len: a, + key: s.data.key + }); + } + }), r[i + a - o].onProgressUpdate(function(t) { + var r = t.progress; + s.setData(e({}, "progressList[" + (i + a - o) + "]", r)); + }); + }(g); + } + }); + }, + remove: function(e) { + var s = e.currentTarget.dataset.idx, + i = this.data.imgGroup, + n = this.data.progressList; + n[s] < 100 && r[s].abort(), i.splice(s, 1), r.splice(s, 1), n.splice(s, 1), t.splice(s, 1), + a = i.length, this.setData({ + imgGroup: i, + progressList: n + }), this.triggerEvent("on-changeImage", { + value: t, + len: a, + key: this.data.key + }); + }, + bigImg: function(e) { + var t = e.currentTarget.dataset.src, + a = e.currentTarget.dataset.list; + wx.previewImage({ + current: t, + urls: a + }); + } + }, + detached: function() { + console.log("detached"), t = [], a = 0, r = []; + } +}); diff --git a/eaterplanet_ecommerce/components/chooseImage/index.json b/eaterplanet_ecommerce/components/chooseImage/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/chooseImage/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/chooseImage/index.wxml b/eaterplanet_ecommerce/components/chooseImage/index.wxml new file mode 100644 index 0000000..286770a --- /dev/null +++ b/eaterplanet_ecommerce/components/chooseImage/index.wxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + {{imgGroup.length?imgGroup.length+'/'+imgMax:'上传图片'}} + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/chooseImage/index.wxss b/eaterplanet_ecommerce/components/chooseImage/index.wxss new file mode 100644 index 0000000..5ba56b4 --- /dev/null +++ b/eaterplanet_ecommerce/components/chooseImage/index.wxss @@ -0,0 +1,81 @@ +.img-group { + display: flex; + flex-wrap: wrap; + font-size: 24rpx; + margin-top: 30rpx; +} + +.img-group .img-item { + margin: 0 6rpx; + width: 150rpx; + height: 150rpx; + position: relative; + box-sizing: border-box; +} + +.img-group .img-item .img { + width: 150rpx; + height: 150rpx; +} + +.img-group .img-item .progress { + position: absolute; + left: 16rpx; + bottom: 20rpx; + width: 120rpx; + height: 16rpx; + border-radius: 20rpx; + border: 2rpx solid #ddd; + display: flex; + align-items: center; +} + +.img-group .img-item .progress .span { + height: 8rpx; + width: 0; + max-width: 112rpx; + border-radius: 12rpx; + position: absolute; + left: 4rpx; + top: 4rpx; + background: #f5f5f5; +} + +.img-group .img-item .hide-progress { + opacity: 0; +} + +.img-group .img-item .close { + width: 32rpx; + height: 32rpx; + position: absolute; + right: -8rpx; + top: -8rpx; + z-index: 1; +} + +.img-group .img-item .closeImg { + height: 100%; + width: 100%; + font-size: 40rpx; + color: #a0a0a0; +} + +.img-group .img-add { + display: flex; + align-items: center; + justify-content: center; + flex-direction: column; + border: 2rpx dashed #dedede; + color: #bcbcbc; +} + +.img-group .img-add .cameraImg { + width: 44rpx; + height: 44rpx; + color: #cdcdcd; + margin-bottom: 8rpx; + display: flex; + justify-content: center; + align-items: center; +} diff --git a/eaterplanet_ecommerce/components/comming-spu-disabled/index.js b/eaterplanet_ecommerce/components/comming-spu-disabled/index.js new file mode 100644 index 0000000..e22926b --- /dev/null +++ b/eaterplanet_ecommerce/components/comming-spu-disabled/index.js @@ -0,0 +1,43 @@ +var e = require("../../utils/timeFormat"); + +Component({ + properties: { + spuItem: { + type: Object, + value: { + spuImage: "", + spuName: "", + endTime: "", + beginTime: "", + actPrice: [], + marketPrice: [], + desc: "新鲜自然 唇齿留香", + surplusNum: 0, + soldNum: 0, + limitOrderNum: 0, + limitMemberNum: 0, + serverTime: 0, + skuImage: "" + }, + observer: function (m) { + if (m) { + var i = (0, e.formatTime)(new Date(1 * m.endTime)), r = (0, e.getBeginTime)(m.beginTime, m.serverTime), t = (0, + e.formatNumber)(i.month) + "月" + (0, e.formatNumber)(i.day) + "日 " + (0, e.formatNumber)(i.hour) + ":" + (0, + e.formatNumber)(i.minute); + this.setData({ + formatBeginTime: r, + endTime: t + }); + } + } + }, + isPast: { + type: Boolean, + value: false + } + }, + data: { + formatBeginTime: "", + endTime: "" + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/comming-spu-disabled/index.json b/eaterplanet_ecommerce/components/comming-spu-disabled/index.json new file mode 100644 index 0000000..27cb8c9 --- /dev/null +++ b/eaterplanet_ecommerce/components/comming-spu-disabled/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../img/index", + "i-router-link": "../router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxml b/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxml new file mode 100644 index 0000000..c5dd0d5 --- /dev/null +++ b/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxml @@ -0,0 +1,20 @@ + + + + {{spuItem.spuName}} + + 结束时间 {{endTime}} + {{formatBeginTime}}{{spuItem.limitOrderNum>-1||spuItem.limitMemberNum>-1?' | 限购':''}} + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + 已结束 + + + + + diff --git a/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxss b/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxss new file mode 100644 index 0000000..9300a07 --- /dev/null +++ b/eaterplanet_ecommerce/components/comming-spu-disabled/index.wxss @@ -0,0 +1,113 @@ +.icon-shop { + position: absolute; + right: 20rpx; + bottom: 20rpx; + width: 54rpx; + height: 54rpx; +} + +.icon-shop .img { + width: 54rpx; + height: 54rpx; +} + +.mask { + width: 348rpx; + height: 240rpx; + position: absolute; + left: 0; + top: 30rpx; + background: rgba(255, 255, 255, 0.5); + display: flex; + align-items: center; + justify-content: center; +} + +.mask .toast { + width: 196rpx; + height: 60rpx; + background: rgba(0, 0, 0, 0.5); + border-radius: 10rpx; + text-align: center; + line-height: 60rpx; + color: #fff; + font-weight: bold; + font-size: 28rpx; +} + +.spu-img { + width: 240rpx; + height: 240rpx; + border-radius: 10rpx; +} + +.comming-spu-content { + width: 348rpx; + height: 452rpx; + border-radius: 20rpx; + background: #fff; + box-sizing: border-box; + padding: 30rpx 26rpx 30rpx 26rpx; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + position: relative; +} + +.comming-spu-content .spu-img-content { + display: flex; + align-items: center; + justify-content: center; + width: 296rpx; + height: 240rpx; + margin: 0 auto 34rpx; +} + +.comming-spu-content .spu-name { + font-size: 28rpx; + line-height: 28rpx; + height: 36rpx; + color: #444; + margin-bottom: 16rpx; + font-weight: 500; + position: relative; +} + +.comming-spu-content .spu-name .span { + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + position: absolute; + left: 0; + top: -4rpx; + line-height: 36rpx; +} + +.comming-spu-content .spu-desc { + color: #ffab20; + font-size: 24rpx; + line-height: 24rpx; + margin-bottom: 14rpx; +} + +.comming-spu-content .spu-price { + display: flex; + align-items: flex-end; + font-size: 20rpx; +} + +.comming-spu-content .spu-price .sale-price { + color: #ff758c; + margin-right: 8rpx; +} + +.comming-spu-content .spu-price .sale-price .span { + font-size: 40rpx; + line-height: 40rpx; + margin-left: 4rpx; + font-weight: 500; +} + +.comming-spu-content .spu-price .market-price { + text-decoration: line-through; + color: #999; +} diff --git a/eaterplanet_ecommerce/components/community-item/index.js b/eaterplanet_ecommerce/components/community-item/index.js new file mode 100644 index 0000000..156babb --- /dev/null +++ b/eaterplanet_ecommerce/components/community-item/index.js @@ -0,0 +1,66 @@ +var utils = require("../../utils/index"); +var location = require("../../utils/Location"); +var app = getApp(); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + item: { + type: Object, + value: { + rest: 0 + } + }, + city: Object, + isOld: { + type: Boolean, + value: false + }, + groupInfo: { + type: Object, + value: { + group_name: '社区', + owner_name: '团长' + } + }, + hiddenDetails: { + type: Number, + value: 0 + }, + skin: { + type: Object + } + }, + + /** + * 组件的方法列表 + */ + methods: { + chooseCommunity: function (event) { + var community = event.currentTarget.dataset.val; + if ("火星社区" !== community.communityName || community.communityId) { + var disUserHeadImg = community.disUserHeadImg || community.headImg || "", + disUserName = community.disUserName || community.realName || "", + data = { + communityId: community.communityId, + communityName: community.communityName, + disUserName: disUserName, + disUserHeadImg: disUserHeadImg, + communityAddress: community.communityAddress, + distance: community.distance, + fullAddress: community.fullAddress || community.communityAddress, + lat: community.lat, + lon: community.lon + }, + city = this.data.city; + (0, utils.changeCommunity)(data, city); + } else { + location.openSetting(app).then(function () { + location.checkGPS(app, function () { }); + }); + } + } + } +}) diff --git a/eaterplanet_ecommerce/components/community-item/index.json b/eaterplanet_ecommerce/components/community-item/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/community-item/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/community-item/index.wxml b/eaterplanet_ecommerce/components/community-item/index.wxml new file mode 100644 index 0000000..cec97fb --- /dev/null +++ b/eaterplanet_ecommerce/components/community-item/index.wxml @@ -0,0 +1,18 @@ + + + + + 休息中 + + + + {{item.communityName}} + 距离{{item.distance}} + + + {{groupInfo.owner_name}}:{{item.realName||item.disUserName}} + + + {{item.fullAddress||item.communityAddress}} + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/community-item/index.wxss b/eaterplanet_ecommerce/components/community-item/index.wxss new file mode 100644 index 0000000..a25b9f0 --- /dev/null +++ b/eaterplanet_ecommerce/components/community-item/index.wxss @@ -0,0 +1,88 @@ +.community-item { + box-sizing: border-box; + display: flex; + padding: 60rpx 30rpx; + margin: 20rpx 0rpx 20rpx 0rpx; + border-radius: 20rpx; +} + +.community-item .group-head { + width: 80rpx; + height: 80rpx; + border-radius: 80rpx; + margin-right: 20rpx; +} + +.community-item .community-title { + font-size: 32rpx; + line-height: 32rpx; + height: 32rpx; + width: 520rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; + align-items: flex-end; +} + +.community-item .community-title .span { + color: #444; + font-weight: 500; +} + +.community-item .community-title .em { + color: #4facfe; + font-size: 26rpx; + line-height: 26rpx; + white-space: nowrap; +} + +.community-item .community-address { + font-size: 26rpx; + line-height: 34rpx; + color: #666; + width: 520rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.community-item .group-master { + width: 560rpx; + font-size: 26rpx; + line-height: 26rpx; + color: #aaa; + position: relative; + margin-bottom: 6rpx; +} + +.community-item .group-master .right-arrow { + position: absolute; + right: 0; + top: 0; + width: 14rpx; + height: 28rpx; +} + +.group-img { + position: relative; + width: 80rpx; + height: 80rpx; + border-radius: 80rpx; + margin-right: 20rpx; + overflow: hidden; +} + +.rest { + position: absolute; + left: 0; + bottom: 8rpx; + right: 0; + font-size: 18rpx; + background: rgba(255, 83, 68, 0.8); + text-align: center; + color: #fff; + padding: 2rpx 0 3rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/count-down/index.js b/eaterplanet_ecommerce/components/count-down/index.js new file mode 100644 index 0000000..bae330b --- /dev/null +++ b/eaterplanet_ecommerce/components/count-down/index.js @@ -0,0 +1,81 @@ +var t = require("../../utils/timeFormat"); + +Component({ + properties: { + target: { + type: String, + observer: function(t) { + this.init(t); + } + }, + showDay: Boolean, + beginTime: String, + callback: String, + format: Array, + clearTimer: { + type: Boolean, + observer: function (t) { + t&&clearTimeout(this.data.timer); + } + } + }, + externalClasses: ["countdown-class", "item-class"], + data: { + time: { + day: "0", + second: "00", + minute: "00", + hour: "00" + }, + resultFormat: [], + changeFormat: false, + timeStamp: 0, + timer: null + }, + methods: { + init: function(t) { + var e = { + day: "0", + second: "00", + minute: "00", + hour: "00" + }; + if (t - new Date().getTime() <= 0) return this.setData({ + time: e + }), void this.triggerEvent("callback"); + this.interval(t); + }, + interval: function(e) { + var a = this, + i = e - new Date().getTime(); + if (i <= 0) return clearTimeout(this.data.timer), this.triggerEvent("callback"), + void this.setData({ + time: { + day: "0", + second: "00", + minute: "00", + hour: "00" + } + }); + var r = Math.ceil(i / 1000), + n = parseInt(r / 86400), + o = r % 86400, + s = (0, t.formatNumber)(parseInt(o / 3600)); + o %= 3600; + var m = { + day: n, + hour: s, + minute: (0, t.formatNumber)(parseInt(o / 60)), + second: (0, t.formatNumber)(o % 60) + }; + this.setData({ + time: m + }), this.data.timer = setTimeout(function() { + a.interval(e); + }, 1000); + } + }, + detached: function() { + clearTimeout(this.data.timer); + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/count-down/index.json b/eaterplanet_ecommerce/components/count-down/index.json new file mode 100644 index 0000000..590ae39 --- /dev/null +++ b/eaterplanet_ecommerce/components/count-down/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "routerLink": "../router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/count-down/index.wxml b/eaterplanet_ecommerce/components/count-down/index.wxml new file mode 100644 index 0000000..06fe84f --- /dev/null +++ b/eaterplanet_ecommerce/components/count-down/index.wxml @@ -0,0 +1,7 @@ + + + {{time.day}}天 + {{time.hour}}: + {{time.minute}}: + {{time.second}} + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/count-down/index.wxss b/eaterplanet_ecommerce/components/count-down/index.wxss new file mode 100644 index 0000000..7f9e91a --- /dev/null +++ b/eaterplanet_ecommerce/components/count-down/index.wxss @@ -0,0 +1,12 @@ +.i-count-down { + white-space: nowrap; +} + +.em { + margin-right: 12rpx; +} + +.item-class { + display: inline-block; + margin: 0 4rpx; +} diff --git a/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.js b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.js new file mode 100644 index 0000000..5e37eb6 --- /dev/null +++ b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.js @@ -0,0 +1,277 @@ +// components/datatimepicker/datatimepicker.js + +Component({ + behaviors: ['wx://form-field'], + externalClasses: ["i-class"], + properties: { + format: { + type: String + }, + name: { + type: String + }, + placeholder: { + type: String + } + }, + data: {}, + lifetimes: { + attached: function() { + //当前时间 年月日 时分秒 + const date = new Date() + const curYear = date.getFullYear() + const curMonth = date.getMonth() + 1 + const curDay = date.getDate() + const curHour = date.getHours() + const curMinute = date.getMinutes() + const curSecond = date.getSeconds() + + //初始化时间选择轴 + this.setData({ + chooseYear: curYear + }) + this.initColumn(curMonth); + if(curMonth==2) this.setData({ days: this.data.multiArray[2] }) + + //不足两位的前面好补0 因为后面要获取在时间轴上的索引 时间轴初始化的时候都是两位 + var showMonth = curMonth < 10 ? ('0' + curMonth) : curMonth + var showDay = curDay < 10 ? ('0' + curDay) : curDay + var showHour = curHour < 10 ? ('0' + curHour) : curHour + var showMinute = curMinute < 10 ? ('0' + curMinute) : curMinute + var showSecond = curSecond < 10 ? ('0' + curSecond) : curSecond + + //当前时间在picker列上面的索引 为了当打开时间选择轴时选中当前的时间 + var indexYear = this.data.years.indexOf(curYear + '') + var indexMonth = this.data.months.indexOf(showMonth + '') + var indexDay = this.data.days.indexOf(showDay + '') + var indexHour = this.data.hours.indexOf(showHour + '') + var indexMinute = this.data.minutes.indexOf(showMinute + '') + var indexSecond = this.data.seconds.indexOf(showSecond + '') + + var multiIndex = [] + var multiArray = [] + var value = '' + + var format = this.properties.format; + if (format == 'yyyy-MM-dd') { + multiIndex = [indexYear, indexMonth, indexDay] + value = `${curYear}-${showMonth}-${showDay}` + multiArray = [this.data.years, this.data.months, this.data.days] + } + if (format == 'HH:mm:ss') { + multiIndex = [indexHour, indexMinute, indexSecond] + value = `${showHour}:${showMinute}:${showSecond}` + multiArray = [this.data.hours, this.data.minutes, this.data.seconds] + } + if (format == 'yyyy-MM-dd HH:mm') { + multiIndex = [indexYear, indexMonth, indexDay, indexHour, indexMinute] + value = `${curYear}-${showMonth}-${showDay} ${showHour}:${showMinute}` + multiArray = [this.data.years, this.data.months, this.data.days, this.data.hours, this.data.minutes] + } + if (format == 'yyyy-MM-dd HH:mm:ss') { + multiIndex = [indexYear, indexMonth, indexDay, indexHour, indexMinute, indexSecond] + value = `${curYear}-${showMonth}-${showDay} ${showHour}:${showMinute}:${showSecond}` + multiArray = [this.data.years, this.data.months, this.data.days, this.data.hours, this.data.minutes, this.data.seconds] + + } + this.setData({ + // value, // 初始时间 + multiIndex, + multiArray, + curMonth, + chooseYear: curYear, + }) + } + }, + /** + * 组件的方法列表 + */ + methods: { + //获取时间日期 + bindPickerChange: function(e) { + this.setData({ + multiIndex: e.detail.value + }) + const index = this.data.multiIndex + var format = this.properties.format + var showTime = '' + + if (format == 'yyyy-MM-dd') { + const year = this.data.multiArray[0][index[0]] + const month = this.data.multiArray[1][index[1]] + const day = this.data.multiArray[2][index[2]] + showTime = `${year}-${month}-${day}` + } + if (format == 'HH:mm:ss') { + const hour = this.data.multiArray[0][index[0]] + const minute = this.data.multiArray[1][index[1]] + const second = this.data.multiArray[2][index[2]] + showTime = `${hour}:${minute}:${second}` + } + if (format == 'yyyy-MM-dd HH:mm') { + const year = this.data.multiArray[0][index[0]] + const month = this.data.multiArray[1][index[1]] + const day = this.data.multiArray[2][index[2]] + const hour = this.data.multiArray[3][index[3]] + const minute = this.data.multiArray[4][index[4]] + showTime = `${year}-${month}-${day} ${hour}:${minute}` + } + if (format == 'yyyy-MM-dd HH:mm:ss') { + const year = this.data.multiArray[0][index[0]] + const month = this.data.multiArray[1][index[1]] + const day = this.data.multiArray[2][index[2]] + const hour = this.data.multiArray[3][index[3]] + const minute = this.data.multiArray[4][index[4]] + const second = this.data.multiArray[5][index[5]] + showTime = `${year}-${month}-${day} ${hour}:${minute}:${second}` + } + this.setData({ + value: showTime + }) + this.triggerEvent('dateTimePicker', showTime) + }, + //初始化时间选择轴 + initColumn(curMonth) { + const years = [] + const months = [] + const days = [] + const hours = [] + const minutes = [] + const seconds = [] + for (let i = 2019; i <= 2099; i++) { + years.push(i + '') + } + for (let i = 1; i <= 12; i++) { + if (i < 10) { + i = "0" + i; + } + months.push(i + '') + } + + if (curMonth == 1 || curMonth == 3 || curMonth == 5 || curMonth == 7 || curMonth == 8 || curMonth == 10 || curMonth == 12) { + for (let i = 1; i <= 31; i++) { + if (i < 10) { + i = "0" + i; + } + days.push(i + '') + } + } + if (curMonth == 4 || curMonth == 6 || curMonth == 9 || curMonth == 11) { + for (let i = 1; i <= 30; i++) { + if (i < 10) { + i = "0" + i; + } + days.push(i + '') + } + } + if (curMonth == 2) { + this.setFebDays() + } + for (let i = 0; i <= 23; i++) { + if (i < 10) { + i = "0" + i; + } + hours.push(i + '') + } + for (let i = 0; i <= 59; i++) { + if (i < 10) { + i = "0" + i; + } + minutes.push(i + '') + } + for (let i = 0; i <= 59; i++) { + if (i < 10) { + i = "0" + i; + } + seconds.push(i + '') + } + this.setData({ + years, + months, + days, + hours, + minutes, + seconds + }) + }, + + /** + * 列改变时触发 + */ + bindPickerColumnChange: function(e) { + //获取年份 用于计算改年的2月份为平年还是闰年 + if (e.detail.column == 0 && this.properties.format != 'HH:mm:ss') { + var chooseYear = this.data.multiArray[e.detail.column][e.detail.value]; + this.setData({ + chooseYear + }) + if (this.data.curMonth == '02' || this.data.chooseMonth == '02') { + this.setFebDays() + } + } + //当前第二为月份时需要初始化当月的天数 + if (e.detail.column == 1 && this.properties.format != 'HH:mm:ss') { + let num = parseInt(this.data.multiArray[e.detail.column][e.detail.value]); + let temp = []; + if (num == 1 || num == 3 || num == 5 || num == 7 || num == 8 || num == 10 || num == 12) { //31天的月份 + for (let i = 1; i <= 31; i++) { + if (i < 10) { + i = "0" + i; + } + temp.push("" + i); + } + this.setData({ + ['multiArray[2]']: temp + }); + } else if (num == 4 || num == 6 || num == 9 || num == 11) { //30天的月份 + for (let i = 1; i <= 30; i++) { + if (i < 10) { + i = "0" + i; + } + temp.push("" + i); + } + this.setData({ + ['multiArray[2]']: temp + }); + } else if (num == 2) { //2月份天数 + this.setFebDays() + } + } + var data = { + multiArray: this.data.multiArray, + multiIndex: this.data.multiIndex + }; + data.multiIndex[e.detail.column] = e.detail.value; + this.setData(data); + }, + //计算二月份天数 + setFebDays() { + let year = parseInt(this.data.chooseYear); + let temp = []; + if (year % (year % 100 ? 4 : 400) ? false : true) { + for (let i = 1; i <= 29; i++) { + if (i < 10) { + i = "0" + i; + } + temp.push("" + i); + } + this.setData({ + ['multiArray[2]']: temp, + chooseMonth: '02' + + }); + } else { + for (let i = 1; i <= 28; i++) { + if (i < 10) { + i = "0" + i; + } + temp.push("" + i); + } + this.setData({ + ['multiArray[2]']: temp, + chooseMonth: '02' + }); + } + } + }, +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.json b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxml b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxml new file mode 100644 index 0000000..bf37bc8 --- /dev/null +++ b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxss b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxss new file mode 100644 index 0000000..62a3bdb --- /dev/null +++ b/eaterplanet_ecommerce/components/datetimepicker/datetimepicker.wxss @@ -0,0 +1,5 @@ +.item-value { + text-align: right; + font-size: 26rpx; + position: relative; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/dialog/index.js b/eaterplanet_ecommerce/components/dialog/index.js new file mode 100644 index 0000000..431de45 --- /dev/null +++ b/eaterplanet_ecommerce/components/dialog/index.js @@ -0,0 +1,29 @@ +Component({ + externalClasses: ["i-class", "i-btn"], + properties: { + visible: { + type: Boolean, + value: false + }, + text: String, + confirmText: { + type: String, + value: "确定" + }, + showCancel: { + type: Boolean, + value: true + } + }, + methods: { + confirm: function () { + this.triggerEvent("confirm"); + }, + cancel: function () { + this.triggerEvent("cancel"); + }, + close: function () { + this.triggerEvent("cancel"); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/dialog/index.json b/eaterplanet_ecommerce/components/dialog/index.json new file mode 100644 index 0000000..7b873d8 --- /dev/null +++ b/eaterplanet_ecommerce/components/dialog/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index", + "i-button": "../button/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/dialog/index.wxml b/eaterplanet_ecommerce/components/dialog/index.wxml new file mode 100644 index 0000000..71bb52f --- /dev/null +++ b/eaterplanet_ecommerce/components/dialog/index.wxml @@ -0,0 +1,22 @@ + + + {{text}} + + + + + + + 取消 + + + + {{confirmText}} + + + + {{confirmText}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/dialog/index.wxss b/eaterplanet_ecommerce/components/dialog/index.wxss new file mode 100644 index 0000000..7d420c3 --- /dev/null +++ b/eaterplanet_ecommerce/components/dialog/index.wxss @@ -0,0 +1,46 @@ +.dialog-content { + width: 540rpx; + height: 208rpx; + border-radius: 30rpx; + background: #fff; +} + +.dialog-content .text { + height: 120rpx; + display: flex; + justify-content: center; + align-items: center; + border-bottom: 2rpx solid #d2d2d2; +} + +.dialog-content .button-group { + display: flex; +} + +.dialog-content .left-btn, .dialog-content .right-btn { + width: 270rpx; + height: 88rpx; + text-align: center; + line-height: 88rpx; + font-size: 36rpx; + color: #0076ff; + margin: 0; + padding: 0; +} + +.dialog-content .split-line { + width: 0; + height: 88rpx; + border-right: 2rpx solid #d2d2d2; +} + +.dialog-content .r-btn { + width: 540rpx; + height: 88rpx; + text-align: center; + line-height: 88rpx; + font-size: 36rpx; + color: #0076ff; + margin: 0; + padding: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-goods-list/index.js b/eaterplanet_ecommerce/components/diy-goods-list/index.js new file mode 100644 index 0000000..b5e422e --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-goods-list/index.js @@ -0,0 +1,64 @@ +var app = getApp(); + +Component({ + properties: { + value: { + type: Object, + value: {} + }, + idx: { + type: Number, + value: 0 + } + }, + + data: { + // list: [], + _lock: false + }, + + attached: function() { + this.setData({_lock: true },()=>{ + this.getGoodsList(); + }) + }, + + pageLifetimes: { + show: function () { + this.data._lock || this.getGoodsList(); + } + }, + + methods: { + getGoodsList() { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + let value = this.data.value; + let sources = value.sources; + let params = {}; + if(sources=='category') { + params.gid = value.categoryId; + params.is_random = 0; + } else { + params.is_random = 1; + } + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_gps_goodslist', + token, + pageNum: 1, + head_id: cur_community.communityId || '', + per_page: value.goodsCount, + ...params + }, + dataType: 'json', + success: function (res) { + that.setData({ _lock: false }) + that.triggerEvent('diyGoodsList', { id: that.data.idx, data: res.data }); + } + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/diy-goods-list/index.json b/eaterplanet_ecommerce/components/diy-goods-list/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-goods-list/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-goods-list/index.wxml b/eaterplanet_ecommerce/components/diy-goods-list/index.wxml new file mode 100644 index 0000000..355f382 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-goods-list/index.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-goods-list/index.wxss b/eaterplanet_ecommerce/components/diy-goods-list/index.wxss new file mode 100644 index 0000000..e69de29 diff --git a/eaterplanet_ecommerce/components/diy-many-goods-list/index.js b/eaterplanet_ecommerce/components/diy-many-goods-list/index.js new file mode 100644 index 0000000..271872e --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-many-goods-list/index.js @@ -0,0 +1,75 @@ +var app = getApp(); + +Component({ + properties: { + value: { + type: Object, + value: {} + }, + idx: { + type: Number, + value: 0 + } + }, + + data: { + // list: [], + _lock: false, + current: 0 + }, + + attached: function() { + this.setData({_lock: true },()=>{ + this.getGoodsList(); + }) + }, + + pageLifetimes: { + show: function () { + this.data._lock || this.getGoodsList(); + } + }, + + methods: { + getGoodsList() { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + let { current, value } = this.data; + let vlist = value.list; + let sources = vlist[current].sources; + let params = {}; + if(sources=='category') { + params.gid = vlist[current].categoryId; + params.is_random = 0; + } else { + params.is_random = 1; + } + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_gps_goodslist', + token, + pageNum: 1, + head_id: cur_community.communityId || '', + per_page: 20 || value.goodsCount, + ...params + }, + dataType: 'json', + success: function (res) { + console.log('many_goods_list') + that.setData({ _lock: false }) + that.triggerEvent('diyGoodsList', { id: that.data.idx, data: res.data }); + } + }) + }, + changeCate(e) { + let idx = e.currentTarget.dataset.idx; + this.setData({ + current: idx + },()=>{ + this.getGoodsList(); + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/diy-many-goods-list/index.json b/eaterplanet_ecommerce/components/diy-many-goods-list/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-many-goods-list/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxml b/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxml new file mode 100644 index 0000000..f0300ba --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxml @@ -0,0 +1,14 @@ + + + + + + + {{item.title}} + {{item.desc}} + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxss b/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxss new file mode 100644 index 0000000..fa0573f --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-many-goods-list/index.wxss @@ -0,0 +1,47 @@ +.navlist { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + margin-left: 20rpx; + margin-right: 20rpx; + margin-bottom: 20rpx; +} + +.navlist .item { + width: 120rpx; + flex-shrink: 0; + text-align: center; +} + +.navlist .item .name { + font-size: 32rpx; + color: #303133; + line-height: 1; +} + +.navlist .item .tag { + font-size: 24rpx; + color: #909399; + margin-top: 10rpx; + line-height: 36rpx; +} + +.navlist .item.active .name { + font-weight: bold; +} + +.navlist .item.active .tag { + background: rgb(255, 69, 68); + color: #FFFFFF; + border-radius: 20rpx; +} + +.split-line { + width: 1rpx; + height: 30rpx; + background-color: #E5E5E5; + margin-right: calc((100% - 121rpx * 4) / 6); + margin-left: calc((100% - 121rpx * 4) / 6); +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-nav/index.js b/eaterplanet_ecommerce/components/diy-nav/index.js new file mode 100644 index 0000000..8831662 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-nav/index.js @@ -0,0 +1,133 @@ +var util = require('../../utils/util.js'); +var app = getApp(); +Component({ + /** + * 组件的属性列表 + */ + properties: { + list: { + type: Object, + value: {}, + observer: function (t) { + if(t.selectedTemplate=="imageNavigation") { + let num = t.showType*2; + let len = t.list.length; + let number = Math.ceil(len/num); + let isSwiper = false; + if(number>1) { + isSwiper = true; + } + let newlist = this.chunk(t.list, num); + this.setData({ isSwiper, number, newlist }) + } + } + }, + skin: { + type: Object + }, + }, + + /** + * 组件的初始数据 + */ + data: { + isSwiper: false, + number: 0, + newlist: [], + current: 0, + swiperHeight: 0 + }, + + attached() { + this.getCurH() + }, + + /** + * 组件的方法列表 + */ + methods: { + chunk: function(array, size) { + var result = []; + for (var x = 0; x < Math.ceil(array.length / size); x++) { + var start = x * size; + var end = start + size; + result.push(array.slice(start, end)); + } + return result; + }, + getCurH() { + let current = this.data.current; + let that = this; + const query = wx.createSelectorQuery().in(this); + query.select('#nav_'+current).boundingClientRect(function (rect) { + rect&&that.setData({ swiperHeight: rect.height }) + }).exec(); + }, + goDiysliderUrl: function(t) { + let link = t.currentTarget.dataset.link; + let needAuth = this.data.needAuth; + + if (Object.keys(link).length > 0) { + let type = link.parents; + if (util.checkRedirectTo(link.wap_url, needAuth)) { + this.authModal(); + return; + } + switch(type) { + case "WEBVIEW": + let url = link.wap_url; + url && wx.navigateTo({ url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) }); + break; + case "MALL_LINK": + url = link.wap_url; + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url }) + } else { + url && wx.navigateTo({ url }) + } + break; + case "OTHER_APPLET": + // 跳转小程序 + let appId = link.appid; + let path = link.wap_url; + appId && wx.navigateToMiniProgram({ + appId, + path, + extraData: {}, + envVersion: 'release', + success(res) {}, + fail(error) { wx.showModal({ title: "提示", content: error.errMsg, showCancel: false }) } + }) + break; + case "CUSTOM_LINK": + url = link.wap_url; + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url }) + } else { + url && wx.navigateTo({ url }) + } + break; + case "GOODS_CATEGORY": + //独立分类 + let cateId = link.id; + app.globalData.typeCateId = cateId; + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/type/index' + }) + break; + default: + url = link.wap_url; + url && wx.navigateTo({ url }) + break; + } + } + }, + onCurrent(e) { + this.setData({ + current: e.detail.current + }, ()=>{ + this.getCurH() + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/diy-nav/index.json b/eaterplanet_ecommerce/components/diy-nav/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-nav/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-nav/index.wxml b/eaterplanet_ecommerce/components/diy-nav/index.wxml new file mode 100644 index 0000000..876fa2c --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-nav/index.wxml @@ -0,0 +1,31 @@ + + + + + + + + + + + {{navItem.title}} + + + + + + + + + + + + + + + + {{navItem.title}} + + + + diff --git a/eaterplanet_ecommerce/components/diy-nav/index.wxss b/eaterplanet_ecommerce/components/diy-nav/index.wxss new file mode 100644 index 0000000..0b0df71 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-nav/index.wxss @@ -0,0 +1,48 @@ +.ep-icon-group { + display: flex; + flex-wrap: wrap; + padding: 0 5px; +} + +.ep-icon-col { + text-align: center; + display: inline-block; + box-sizing: border-box; + padding: 8px 5px; +} + +.col-3 .ep-icon-col { + width: 33.33%; +} + +.col-4 .ep-icon-col { + width: 25%; +} + +.col-5 .ep-icon-col { + width: 20%; +} + +.ep-icon-col .nav-img { + width: 86rpx; + height: 86rpx; +} + +.ep-icon-group.fillet .nav-img { + border-radius: 50%; +} + +.navigation-indicator { + text-align: center; + display: flex; + align-items: center; + justify-content: center; + margin: 10rpx 0 20rpx; +} + +.navigation-indicator .item { + width: 30rpx; + height: 6rpx; + background: #cccccc; + margin: 0 5rpx; +} diff --git a/eaterplanet_ecommerce/components/diy-pintuan/index.js b/eaterplanet_ecommerce/components/diy-pintuan/index.js new file mode 100644 index 0000000..6fa0c0e --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-pintuan/index.js @@ -0,0 +1,81 @@ +var app = getApp(); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + refresh: { + type: Boolean, + value: false, + observer: function (t) { + if (t) this.setData({ list: [] }), this.getPinList(); + } + }, + diyInfo: { + type: Object, + observer: function (t) { + if (t) { + let list = t.list || []; + list.forEach((item, index)=>{ + if(item.imageUrl.indexOf('http')==-1) { + list[index].imageUrl = t.host + item.imageUrl; + } + }) + this.setData({ style: t.style*1-1, styleList: list }); + } + } + }, + skin: { + type: Object + } + }, + + data: { + style: 0, + list: [], + styleList: [], + placeholdeImg: app.globalData.placeholdeImg + }, + + attached() { + this.getPinList(); + }, + + /** + * 组件的方法列表 + */ + methods: { + getPinList: function () { + let that = this; + var community = wx.getStorageSync('community'); + let head_id = community.communityId || ''; + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'group.get_pintuan_list', + is_index: 1, + head_id, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let pinList = {}; + let { list, pintuan_index_coming_img, pintuan_index_show } = res.data; + pinList.list = list || []; + pinList.img = pintuan_index_coming_img || ''; + pinList.show = pintuan_index_show || 0; + that.setData({ pinList }) + console.log('pinList', pinList) + } + } + }) + }, + goLink: function(event) { + let url = event.currentTarget.dataset.link; + url && wx.navigateTo({ url }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/diy-pintuan/index.json b/eaterplanet_ecommerce/components/diy-pintuan/index.json new file mode 100644 index 0000000..fe5a8d2 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-pintuan/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/diy-pintuan/index.wxml b/eaterplanet_ecommerce/components/diy-pintuan/index.wxml new file mode 100644 index 0000000..1bb61a3 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-pintuan/index.wxml @@ -0,0 +1,121 @@ + + + + + + + + + + {{item.label_info.tagcontent}} + + + 已抢光 + {{item.spuName}} + {{item.pin_count}}人团 + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + ¥{{item.marketPrice[0]}}.{{item.marketPrice[1]}} + + + + + + + + + + + + + 更多拼团 + + + + + + + + + + {{item.label_info.tagcontent}} + + + 已抢光 + + + + {{item.spuName}} + + + + {{item.pin_count}}人团 + + + 已拼{{item.soldNum}}件 + + + + + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + ¥{{item.marketPrice[0]}}.{{item.marketPrice[1]}} + + 去拼团 + + + + + + + + + + + + + + + + + + + {{item.label_info.tagcontent}} + + + 已抢光 + + + + {{item.spuName}} + + + + {{item.pin_count}}人团 + + + 已拼{{item.soldNum}}件 + + + + + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + ¥{{item.marketPrice[0]}}.{{item.marketPrice[1]}} + + 去拼团 + + + + + + 更多拼团 + + + + diff --git a/eaterplanet_ecommerce/components/diy-pintuan/index.wxss b/eaterplanet_ecommerce/components/diy-pintuan/index.wxss new file mode 100644 index 0000000..6d53c08 --- /dev/null +++ b/eaterplanet_ecommerce/components/diy-pintuan/index.wxss @@ -0,0 +1,243 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.pin-spec { + position: relative; + background: #fff; + margin: 20rpx; + border-radius: 10rpx; + overflow: hidden; +} + +.pin-spec-img { + width: 100%; + vertical-align: top; + border-radius: 10rpx 10rpx 0 0; +} + +.pin-spec-scroll { + max-height: 380rpx; +} + +.pin-spec-wrap { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: nowrap; +} + +.pin-spec-item { + position: relative; + width: 240rpx; + box-sizing: border-box; + padding: 20rpx; + font-size: 28rpx; +} + +.pin-spec-item .pin-img { + width: 200rpx; + height: 200rpx; + margin-bottom: 20rpx; +} + +.pin-spec-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.pin-spec-item .new-bot { + margin-top: 10rpx; + display: flex; + align-items: center; +} + +.pin-spec-item .price { + color: #ff5041; +} + +.pin-spec-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.pin-spec-item .market-price { + text-decoration: line-through; + color: #999; + font-size: 22rpx; + margin-left: 10rpx; +} + +.pin-spec-item .pin-tag { + display: inline-block; + font-size: 22rpx; + padding: 0 6rpx; + margin-right: 10rpx; + border: 0.1rpx solid #ff5344; + vertical-align: middle; + color: #ff5344; + border-radius: 4rpx; +} + +/* 标签 */ + +.pin-spec .item-tag { + position: absolute; + left: 20rpx; + top: 20rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.pin-spec .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.pin-spec .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.pin-s2-tit { + width: 240rpx; + height: 70rpx; + line-height: 70rpx; +} + +.pin-s2 .pin-img { + width: 200rpx; + height: 200rpx; + margin-bottom: 0; +} + +.pin-s2 .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 24rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.pin-s2 .title { + height: 64rpx; +} + +.pin-s2 .label { + padding: 4rpx 12rpx 6rpx; + line-height: 1; + font-size: 75%; + font-weight: 700; + color: #fff; + text-align: center; + white-space: nowrap; +} + +.pin-s2 .label .tag { + height: 30rpx; + line-height: 30rpx; + border: 1rpx solid #FF4544; + border-radius: 4rpx; + margin-right: 10rpx; +} + +.pin-s2 .label .tag.label-person .iconfont { + display: inline-block; + width: 30rpx; + height: 30rpx; + background-color: #FF4544; + font-size: 18rpx; + color: #FFFFFF; + text-align: center; +} + +.pin-s2 .label .label-name { + font-size: 20rpx; + padding: 0 10rpx; + color: #FF4544; +} + +.pin-s2 .bot { + line-height: 1; +} + +.pin-s2 .bot .content-price { + display: flex; + align-items: flex-end; + font-size: 24rpx; + color: #FF4544; + margin-top: 20rpx; + height: 32rpx; + font-weight: 600; +} + +.content-num { + font-weight: 500; + margin-top: 0; + font-size: 24rpx; + line-height: 24rpx; + color: #909399; + text-decoration: line-through; +} + +.pin-s2-item-r { + display: flex; + flex-direction: column; + justify-content: space-between; + border-bottom: 1rpx solid #EEEEEE; +} + +.pin-s2 .pin-s2-item:last-child .pin-s2-item-r { + border-bottom: 0; +} + +.pin-s2-btn { + background-color: #FF4544; + width: 160rpx; + height: 50rpx; + line-height: 50rpx; + text-align: center; + border-radius: 50rpx; + font-size: 28rpx; + color: #FFFFFF; +} + +.pin-s3-tit { + width: 348rpx; + height: 74rpx; + text-align: center; + line-height: 74rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/empty/index.js b/eaterplanet_ecommerce/components/empty/index.js new file mode 100644 index 0000000..3b97ab1 --- /dev/null +++ b/eaterplanet_ecommerce/components/empty/index.js @@ -0,0 +1,23 @@ +// eaterplanet_ecommerce/components/empty/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + + } +}) diff --git a/eaterplanet_ecommerce/components/empty/index.json b/eaterplanet_ecommerce/components/empty/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/empty/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/empty/index.wxml b/eaterplanet_ecommerce/components/empty/index.wxml new file mode 100644 index 0000000..9398f6a --- /dev/null +++ b/eaterplanet_ecommerce/components/empty/index.wxml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/empty/index.wxss b/eaterplanet_ecommerce/components/empty/index.wxss new file mode 100644 index 0000000..523e5f5 --- /dev/null +++ b/eaterplanet_ecommerce/components/empty/index.wxss @@ -0,0 +1,21 @@ +.none-rush-list { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 140rpx; + padding-top: 140rpx; +} + +.none-rush-list .img-block { + width: 240rpx; + height: 240rpx; + margin-bottom: 30rpx; +} + +.none-rush-list .h1 { + font-size: 32rpx; + line-height: 32rpx; + color: #444; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fetch-coder/index.js b/eaterplanet_ecommerce/components/fetch-coder/index.js new file mode 100644 index 0000000..8abcd83 --- /dev/null +++ b/eaterplanet_ecommerce/components/fetch-coder/index.js @@ -0,0 +1,23 @@ +Component({ + properties: { + visible: { + type: Boolean, + value: false + }, + coderList: { + type: Array + }, + codeImg: { + type: String, + value: '' + } + }, + data: { + selected: null + }, + methods: { + close: function () { + this.triggerEvent("cancel"); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fetch-coder/index.json b/eaterplanet_ecommerce/components/fetch-coder/index.json new file mode 100644 index 0000000..979d4f5 --- /dev/null +++ b/eaterplanet_ecommerce/components/fetch-coder/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fetch-coder/index.wxml b/eaterplanet_ecommerce/components/fetch-coder/index.wxml new file mode 100644 index 0000000..c0162ff --- /dev/null +++ b/eaterplanet_ecommerce/components/fetch-coder/index.wxml @@ -0,0 +1,15 @@ + + + + + + 您的提货码为 + + + + + 提货时,请出示提货二维码。 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fetch-coder/index.wxss b/eaterplanet_ecommerce/components/fetch-coder/index.wxss new file mode 100644 index 0000000..0d39e80 --- /dev/null +++ b/eaterplanet_ecommerce/components/fetch-coder/index.wxss @@ -0,0 +1,65 @@ +.coder-content { + position: relative; + height: 650rpx; + width: 630rpx; + background: #fff; + border-radius: 20rpx; + text-align: center; + font-family: PingFangSC-Medium; +} + +.coder-content .t1 { + font-size: 36rpx; + font-weight: 500; + color: #444; + line-height: 36rpx; + margin-bottom: 60rpx; + margin-top: 60rpx; +} + +.coder-content .t2 { + font-size: 24rpx; + font-weight: 400; + color: #bababa; + line-height: 24rpx; + margin-top: 40rpx; +} + +.coder-content .item { + display: inline-block; + margin-left: 20rpx; + width: 68rpx; + height: 68rpx; + line-height: 68rpx; + text-align: center; + border-radius: 10rpx; + border: 2rpx solid #444; + font-size: 40rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: #444; +} + +.coder-content .item:first-of-type { + margin-left: 0; +} + +.coder-content .icon-wrap { + height: 60rpx; + width: 60rpx; + position: absolute; + right: 10rpx; + top: 10rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.coder-content .icon-close { + height: 24rpx; + width: 24rpx; +} + +.coder-content .code-img .img { + width: 60%; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fixed-bottom/index.js b/eaterplanet_ecommerce/components/fixed-bottom/index.js new file mode 100644 index 0000000..4569fb2 --- /dev/null +++ b/eaterplanet_ecommerce/components/fixed-bottom/index.js @@ -0,0 +1,12 @@ +var t = getApp(); + +Component({ + data: { + isIpx: false + }, + attached: function () { + t.globalData.isIpx && this.setData({ + isIpx: true + }); + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fixed-bottom/index.json b/eaterplanet_ecommerce/components/fixed-bottom/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/fixed-bottom/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fixed-bottom/index.wxml b/eaterplanet_ecommerce/components/fixed-bottom/index.wxml new file mode 100644 index 0000000..fb23641 --- /dev/null +++ b/eaterplanet_ecommerce/components/fixed-bottom/index.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/fixed-bottom/index.wxss b/eaterplanet_ecommerce/components/fixed-bottom/index.wxss new file mode 100644 index 0000000..6ea088d --- /dev/null +++ b/eaterplanet_ecommerce/components/fixed-bottom/index.wxss @@ -0,0 +1,13 @@ +.fixed-bar { + left: 0; + bottom: 0; + position: fixed; + background: #fff; + width: 100%; + z-index: 2; + padding-bottom: calc(env(safe-area-inset-bottom) - 30rpx); +} + +.pb20 { + padding-bottom: 40rpx; +} diff --git a/eaterplanet_ecommerce/components/form/apply.js b/eaterplanet_ecommerce/components/form/apply.js new file mode 100644 index 0000000..e6f726b --- /dev/null +++ b/eaterplanet_ecommerce/components/form/apply.js @@ -0,0 +1,118 @@ +var app = getApp(); +import WxValidate from '../../utils/WxValidate.js'; +var u = true; + +Component({ + /** + * 组件的属性列表 + */ + properties: { + + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + attached: function() { + this.initValidate(); + }, + + /** + * 组件的方法列表 + */ + methods: { + //资料验证函数 + initValidate() { + const rules = { + form_username: { + required: true, + minlength: 1 + }, + form_mobile: { + required: true, + tel: true + } + } + const messages = { + form_username: { + required: '请填写真实姓名', + minlength: '请输入正确的姓名' + }, + form_mobile: { + required: '请填写手机号', + tel: '请填写正确的手机号' + } + } + this.WxValidate = new WxValidate(rules, messages) + }, + + /** + * 输入框获得焦点 + */ + iptFocus: function (t) { + let name = t.currentTarget.dataset.name; + this.setData({ + currentFocus: name + }) + }, + + /** + * 输入框失去焦点 + */ + iptBlur: function () { + this.setData({ + currentFocus: '' + }) + }, + + //报错 + showModal(error) { + wx.showModal({ + content: error.msg, + showCancel: false, + }) + }, + + /** + * 资料修改表单提交 + */ + formSubmit(e) { + this.setData({ + btnLoading: true + }) + const params = e.detail.value; + //校验表单 + if (!this.WxValidate.checkForm(params)) { + const error = this.WxValidate.errorList[0]; + this.showModal(error); + this.setData({ + btnLoading: false + }) + return false; + } + let token = wx.getStorageSync('token'); + params.token = token; + app.util.ProReq('user.save_formData', params).then(res=>{ + wx.showModal({ + content: res.msg || '提交成功,等待审核后才可查看价格和购买', + showCancel: false, + success: ()=>{ + wx.setStorageSync('isparse_formdata', 0); + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + }) + }).catch(err=>{ + this.setData({ + btnLoading: false + }) + app.util.message(err.msg || '提交失败,请重试', '', 'error'); + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/form/apply.json b/eaterplanet_ecommerce/components/form/apply.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/form/apply.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/form/apply.wxml b/eaterplanet_ecommerce/components/form/apply.wxml new file mode 100644 index 0000000..25e2cc0 --- /dev/null +++ b/eaterplanet_ecommerce/components/form/apply.wxml @@ -0,0 +1,29 @@ + + + +
+ + 会员申请 + + + + 真实姓名 + + + + + + + 手机号 + + + + + + + + + +
+
+
\ No newline at end of file diff --git a/eaterplanet_ecommerce/components/form/apply.wxss b/eaterplanet_ecommerce/components/form/apply.wxss new file mode 100644 index 0000000..02efa00 --- /dev/null +++ b/eaterplanet_ecommerce/components/form/apply.wxss @@ -0,0 +1,70 @@ +page { + background-color: #fff; +} + +.gcs-box { + padding-bottom: 100rpx; +} + +.gcs-box .card { + position: relative; + background: #fff; +} + +.card-header { + display: flex; + padding: 30rpx; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.1); +} + +.card-header .title { + flex: 1; + color: #4d9ee9; + font-size: 30rpx; + font-weight: bold; +} + +.bot-line { + width: 100%; + height: 1rpx; + border-bottom: 1rpx solid #f5f5f5; + transition: 200ms all ease-in-out; +} + +.bot-line.focus { + border-bottom: 2rpx solid #4d9ee9; +} + +.info-item { + margin-top: 54rpx; +} + +.info-item .item-title { + font-size: 22rpx; + color: #7593b4; + margin-bottom: 15rpx; +} + +.info-item .item-content { + font-size: 26rpx; + color: #000; +} + +.card-body { + padding: 0 36rpx; +} + +.edit-btn button { + background-color: #4d9ee9; + text-align: center; + line-height: 90rpx; + margin: 80rpx 36rpx; + color: #fff; + border-radius: 6rpx; + font-size: 38rpx; + font-weight: bold; +} + +.edit-btn button::after { + border: 0; +} diff --git a/eaterplanet_ecommerce/components/get-phone/index.js b/eaterplanet_ecommerce/components/get-phone/index.js new file mode 100644 index 0000000..929a9be --- /dev/null +++ b/eaterplanet_ecommerce/components/get-phone/index.js @@ -0,0 +1,84 @@ +var app = getApp(); + +Component({ + properties: { + visible: { + type: Boolean, + value: false + } + }, + methods: { + close: function() { + this.triggerEvent("cancel"); + }, + getPhoneNumber: function(res) { + var that = this; + wx.checkSession({ + success: function() { + console.log("session:", 1), that.getMobile(res); + }, + fail: function() { + console.log("session:", 2), wx.removeStorageSync("token"); + that.triggerEvent("cancel"); + that.triggerEvent("needAuth"); + } + }); + }, + getMobile: function(e) { + var that = this; + if ("getPhoneNumber:ok" === e.detail.errMsg) { + var token = wx.getStorageSync('token'); + this.setData({ + loading: true + }); + wx.checkSession({ + success() { + console.log("session_key有效"); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.getPhoneNumber', + token: token, + encryptedData: e.detail.encryptedData, + iv: e.detail.iv + }, + method: 'post', + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let phoneNumber = res.data.phoneNumber; + wx.setStorage({ + key: "mobile", + data: phoneNumber + }); + that.triggerEvent("confirm", phoneNumber); + } else { + that.setData({ + visible: false + }); + wx.showToast({ + title: "授权失败", + icon: "none" + }); + } + } + }) + }, + fail() { + console.log("session_key 已经失效"); + wx.removeStorageSync("token"); + that.triggerEvent("needAuth"); + } + }) + } else { + that.setData({ + visible: false + }); + wx.showToast({ + title: "授权失败", + icon: "none" + }); + } + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/get-phone/index.json b/eaterplanet_ecommerce/components/get-phone/index.json new file mode 100644 index 0000000..7b873d8 --- /dev/null +++ b/eaterplanet_ecommerce/components/get-phone/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index", + "i-button": "../button/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/get-phone/index.wxml b/eaterplanet_ecommerce/components/get-phone/index.wxml new file mode 100644 index 0000000..e5c000e --- /dev/null +++ b/eaterplanet_ecommerce/components/get-phone/index.wxml @@ -0,0 +1,14 @@ + + + + + + + 需要您的同意 + + 需要您的手机授权 + 授权后可享受更多优质服务 + + 确认授权 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/get-phone/index.wxss b/eaterplanet_ecommerce/components/get-phone/index.wxss new file mode 100644 index 0000000..a24f1fe --- /dev/null +++ b/eaterplanet_ecommerce/components/get-phone/index.wxss @@ -0,0 +1,66 @@ +.auth-content { + width: 520rpx; + height: 660rpx; + background: #fff; + border-radius: 24rpx; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; +} + +.auth-content .bg { + width: 520rpx; + height: 354rpx; + position: absolute; + top: 0; + left: 0; +} + +.auth-content .h1 { + color: #444; + font-size: 32rpx; + margin-bottom: 20rpx; +} + +.auth-content .h2 { + font-size: 24rpx; + line-height: 36rpx; + color: #999; + width: 408rpx; + margin-bottom: 44rpx; +} + +.auth-content .h2 .p { + text-align: center; + display: block; +} + +.auth-content .confirm { + width: 432rpx; + height: 72rpx; + color: #fff; + background: linear-gradient(100deg,#4facfe 0%,#00f2fe 100%); + font-size: 32rpx; + line-height: 72rpx; + border-radius: 12rpx; + margin: 0 0 30rpx; +} + +.auth-content .close { + position: absolute; + right: 28rpx; + top: 28rpx; + width: 40rpx; + height: 40rpx; + display: flex; + align-items: center; + justify-content: center; + z-index: 9; +} + +.auth-content .close .close-img { + width: 26rpx; + height: 26rpx; +} diff --git a/eaterplanet_ecommerce/components/goodsInfo/index.js b/eaterplanet_ecommerce/components/goodsInfo/index.js new file mode 100644 index 0000000..2860a7d --- /dev/null +++ b/eaterplanet_ecommerce/components/goodsInfo/index.js @@ -0,0 +1,65 @@ +// eaterplanet_ecommerce/components/goodsInfo/index.js +Component({ + properties: { + order: { + type: Object, + observer: function (t) { + let real_total = t.order_info.real_total * 1; + let shipping_tel = t && t.order_info && t.order_info.shipping_tel || ''; + var goodsTotal = parseFloat(real_total) - parseFloat(t.order_info.shipping_fare); + let h = {}; + h.goodsTotal = goodsTotal; + if(shipping_tel) { + shipping_tel = "" + shipping_tel; + var pat=/(\d{3})\d*(\d{4})/; + let tel = shipping_tel.replace(pat,'$1****$2'); + h.tel = tel; + } + this.setData(h); + } + }, + showNickname: { + type: Boolean, + default: false + }, + hidePhone: { + type: Number, + default: 0 + }, + groupInfo: { + type: Object, + default: { + group_name: '社区', + owner_name: '团长', + delivery_ziti_name: '社区自提', + delivery_tuanzshipping_name: '团长配送', + delivery_express_name: '快递配送' + } + }, + hideInfo: { + type: Boolean, + default: false + }, + goodsTot: { + type: Number, + default: 0 + }, + goods_sale_unit: { + type: String + } + }, + data: { + isCalling: false + }, + methods: { + callTelphone: function(t) { + var e = this; + this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({ + phoneNumber: t.currentTarget.dataset.phone, + complete: function() { + e.data.isCalling = false; + } + })); + } + } +}) diff --git a/eaterplanet_ecommerce/components/goodsInfo/index.json b/eaterplanet_ecommerce/components/goodsInfo/index.json new file mode 100644 index 0000000..2000c46 --- /dev/null +++ b/eaterplanet_ecommerce/components/goodsInfo/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-card": "../card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/goodsInfo/index.wxml b/eaterplanet_ecommerce/components/goodsInfo/index.wxml new file mode 100644 index 0000000..735ecb1 --- /dev/null +++ b/eaterplanet_ecommerce/components/goodsInfo/index.wxml @@ -0,0 +1,47 @@ + + + 提货信息 + + + + + 提货人 + {{order.order_info.shipping_name}} {{hideInfo?tel:order.order_info.shipping_tel}} + + + {{order.order_info.order_note_name}} + {{order.order_info.note_content}} + + + 昵称 + {{order.order_info.name}} + + + 提货地点 + {{hideInfo?'***':order.order_info.shipping_address}} + + + 配送方式 + {{order.order_info.delivery_name}} + + + {{groupInfo.owner_name}}信息 + + {{order.order_info.ziti_name}} + + + 联系{{groupInfo.owner_name}} + + + + + + + + 共{{order.goods_count}}{{goods_sale_unit}}商品 小计: + + ¥{{goodsTotal}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/goodsInfo/index.wxss b/eaterplanet_ecommerce/components/goodsInfo/index.wxss new file mode 100644 index 0000000..aab2228 --- /dev/null +++ b/eaterplanet_ecommerce/components/goodsInfo/index.wxss @@ -0,0 +1,62 @@ +.header { + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + font-weight: 500; +} + +.content-wrap { + border-top: 0.1rpx solid #efefef; + padding-bottom: 20rpx; +} + +.content-wrap .item { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 24rpx; + padding: 16rpx 30rpx 0; +} + +.content-wrap .item .title { + word-break: keep-all; + color: #aaa; +} + +.content-wrap .item .detail { + color: #444; + text-align: right; + display: flex; + align-items: center; +} + +.content-wrap .item .detail .phone { + margin-left: 20rpx; + padding: 0 20rpx; + height: 44rpx; + display: flex; + align-items: center; + border: 0.1rpx solid #efefef; + border-radius: 26rpx; +} + +.content-wrap .item .detail .phone .icon-phone { + width: 20rpx; + height: 20rpx; + margin-right: 10rpx; +} + +.footer { + border-top: 0.1rpx solid #efefef; + padding: 42rpx 30rpx 32rpx 0; + display: flex; + justify-content: flex-end; + align-items: center; + font-size: 30rpx; + font-weight: 500; +} + +.footer .money { + color: #4facfe; + font-size: 40rpx; +} diff --git a/eaterplanet_ecommerce/components/guess-like/index.js b/eaterplanet_ecommerce/components/guess-like/index.js new file mode 100644 index 0000000..dc128ac --- /dev/null +++ b/eaterplanet_ecommerce/components/guess-like/index.js @@ -0,0 +1,239 @@ +var app = getApp(); +var status = require('../../utils/index.js'); +var util = require('../../utils/util.js'); + +Component({ + externalClasses: ["i-class"], + properties: { + updateCart: { + type: Number, + value: 0, + observer: function (val) { + if (val>0) { + this.updateCartNum(); + } + } + }, + likeTitle: { + type: String, + value: '大家常买' + }, + controller: { + type: String, + value: 'index.load_gps_goodslist' + }, + gid: { + type: Number, + value: 0 + } + }, + + data: { + disabled: false, + list: [], + show_goods_guess_like: 1, + _lock: false + }, + + attached: function() { + console.log('guess like attached'); + this.setData({_lock: true },()=>{ + this.initFn(); + }) + }, + + pageLifetimes: { + show: function () { + this.data._lock || this.initFn(); + console.log('guess like show'); + } + }, + + methods: { + initFn: function(){ + let that = this; + this.setData({list: []}, ()=>{ + that.getData(); + that.updateCartNum(); + }) + }, + getData: function () { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + let { controller, gid }= this.data; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller, + token: token, + pageNum: 1, + is_random: 1, + head_id: cur_community.communityId || '', + id: gid + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let oldList = that.data.list; + let list = res.data.list || []; + list = oldList.concat(list); + let show_goods_guess_like = 1; + if (gid) show_goods_guess_like = res.data.show_goods_guess_like || 0; + that.setData({ list, show_goods_guess_like, _lock: false }) + } else { + that.setData({ noMore: true, _lock: false }) + } + } + }) + }, + openSku: function (e) { + let idx = e.currentTarget.dataset.idx; + this.setData({ disabled: false }) + let spuItem = this.data.list[idx]; + if (spuItem.skuList.length === void 0) { + this.triggerEvent("openSku", { + actId: spuItem.actId, + skuList: spuItem.skuList, + promotionDTO: spuItem.promotionDTO || '', + allData: { + spuName: spuItem.spuName, + skuImage: spuItem.skuImage, + actPrice: spuItem.actPrice, + canBuyNum: spuItem.spuCanBuyNum, + stock: spuItem.spuCanBuyNum, + marketPrice: spuItem.marketPrice, + oneday_limit_count: spuItem.oneday_limit_count, + total_limit_count: spuItem.total_limit_count, + one_limit_count: spuItem.one_limit_count, + goods_start_count: spuItem.goods_start_count + } + }) + } else { + this.addCart({ value: 1, type: "plus", idx }); + } + }, + changeNumber: function (t) { + var e = t.detail; + e && this.addCart(e); + }, + outOfMax: function (t) { + var e = t.detail, idx = t.idx, list = this.data.list, spuItem = list[idx], canBuyNum = spuItem.spuCanBuyNum; + if (list[idx].car_count >= canBuyNum) { + wx.showToast({ + title: "不能购买更多啦", + icon: "none" + }) + } + }, + addCart: function (t) { + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + let idx = t.idx; + let list = this.data.list; + let spuItem = list[idx]; + var goods_id = spuItem.actId; + var community_id = community.communityId; + let goods_start_count = spuItem.goods_start_count; + let number = spuItem.car_count || 0; + let quantity = 1; + + let that = this; + if (t.type == 'plus') { + if(number{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + that.triggerEvent("vipModal", { pop_vipmember_buyimage, showVipModal: true, visible: false }); + } else { + if (res.data.code == 3 || res.data.code == 7) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 6) { + let max_quantity = res.data.max_quantity || ''; + list[idx].car_count = res.data.max_quantity || 0; + (max_quantity > 0) && that.setData({ list }) + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + that.triggerEvent("changeCartNum", res.data.total); + list[idx].car_count = res.data.cur_count || 0; + that.setData({ list }) + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } else { + if(number<=goods_start_count) { + quantity = number; + } + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.reduce_car_goods', + token: token, + goods_id: goods_id, + community_id: community_id, + quantity, + sku_str: '', + buy_type: 'dan', + pin_id: 0, + is_just_addcar: 1 + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if (res.data.code == 3) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else { + that.triggerEvent("changeCartNum", res.data.total); + list[idx].car_count = res.data.cur_count || 0; + that.setData({ list }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } + }, + updateCartNum: function () { + let goodsListCarCount = app.globalData.goodsListCarCount; //[{ actId: 84, num: 2}] + let list = this.data.list; + if (goodsListCarCount.length > 0 && list.length > 0) { + goodsListCarCount.forEach(function (item) { + let k = list.findIndex((n) => n.actId == item.actId); + if (k != -1 && list[k].skuList.length === 0) { + let newNum = item.num * 1; + list[k].car_count = newNum >= 0 ? newNum : 0; + } + }) + this.setData({ list }) + } + } + } +}) diff --git a/eaterplanet_ecommerce/components/guess-like/index.json b/eaterplanet_ecommerce/components/guess-like/index.json new file mode 100644 index 0000000..70b4e42 --- /dev/null +++ b/eaterplanet_ecommerce/components/guess-like/index.json @@ -0,0 +1,11 @@ +{ + "component": true, + "usingComponents": { + "comming-spu": "../comming-spu-disabled/index", + "i-img": "../img/index", + "i-button": "../button/index", + "i-router-link": "../router-link/router-link", + "i-input-number": "../input-number/index", + "i-addcart": "../addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/guess-like/index.wxml b/eaterplanet_ecommerce/components/guess-like/index.wxml new file mode 100644 index 0000000..a0301cb --- /dev/null +++ b/eaterplanet_ecommerce/components/guess-like/index.wxml @@ -0,0 +1,22 @@ + diff --git a/eaterplanet_ecommerce/components/guess-like/index.wxss b/eaterplanet_ecommerce/components/guess-like/index.wxss new file mode 100644 index 0000000..9bb87cb --- /dev/null +++ b/eaterplanet_ecommerce/components/guess-like/index.wxss @@ -0,0 +1,90 @@ +.like { + margin-bottom: 100rpx; +} + +.like-title { + font-size: 30rpx; + text-align: center; + font-weight: bold; + margin-bottom: 20rpx; +} + +.like-list { + position: relative; + padding: 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + z-index: 0; +} + +.new-comers-item { + background-color: #fff; + width: 345rpx; + box-sizing: border-box; + padding: 30rpx; + border-radius: 10px; + font-size: 28rpx; + margin-bottom: 20rpx; + box-shadow: 10rpx 10rpx 20rpx 0rpx #afafafa1; +} + +.new-comers-item .new-img { + width: 285rpx; + height: 240rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.new-comers-item .add-cart { + width: 44rpx; + height: 44rpx; + padding: 0; + margin: 0; +} + +.new-comers-item .add-cart .img { + width: 44rpx; + height: 44rpx; + display: block; +} + +.new-comers-item .price { + font-family: DIN; + color: #ff758c; +} + +.new-comers-item { + position: relative; +} + +.new-comers-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 120rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.i-number-img { + font-size: 44rpx!important; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/image/index.js b/eaterplanet_ecommerce/components/image/index.js new file mode 100644 index 0000000..9c1a3e8 --- /dev/null +++ b/eaterplanet_ecommerce/components/image/index.js @@ -0,0 +1,65 @@ +Component({ + properties: { + defaultImage: String, + imgType: { + type: Number, + value: 2 + }, + loadImage: { + type: String, + observer: function (t) { + if (t) { + var e = Math.ceil(wx.getSystemInfoSync().pixelRatio), i = t + "?imageView2/" + this.data.imgType + "/w/" + this.getPx(this.data.width) * e + "/h/" + this.getPx(this.data.height) * e + "/ignore-error/1"; + this.setData({ + img: i, + w: this.getPx(this.data.width), + h: this.getPx(this.data.height) + }); + } + } + }, + width: String, + height: String, + canPreview: { + type: Boolean, + value: false + }, + isLazy: { + type: Boolean, + value: false + }, + isCircle: { + type: Boolean, + value: false + } + }, + data: { + isLoad: false, + img: "", + systemInfo: {}, + w: 0, + h: 0 + }, + methods: { + imageLoad: function () { + this.setData({ + isLoad: true + }); + }, + getPx: function (t) { + var e = wx.getSystemInfoSync(); + return Math.round(e.windowWidth / 375 * t); + }, + preview: function () { + this.data.canPreview && wx.previewImage({ + urls: [this.data.loadImage], + fail: function (t) { + wx.showToast({ + title: "预览图片失败,请重试", + icon: "none" + }), console.log(t); + } + }); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/image/index.json b/eaterplanet_ecommerce/components/image/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/image/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/image/index.wxml b/eaterplanet_ecommerce/components/image/index.wxml new file mode 100644 index 0000000..40c6cff --- /dev/null +++ b/eaterplanet_ecommerce/components/image/index.wxml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/image/index.wxss b/eaterplanet_ecommerce/components/image/index.wxss new file mode 100644 index 0000000..ea0abb3 --- /dev/null +++ b/eaterplanet_ecommerce/components/image/index.wxss @@ -0,0 +1,8 @@ +.img-view { + display: inline-block; + position: relative; +} + +.img-view .img-image { + position: absolute; +} diff --git a/eaterplanet_ecommerce/components/img/index.js b/eaterplanet_ecommerce/components/img/index.js new file mode 100644 index 0000000..4c3e1a2 --- /dev/null +++ b/eaterplanet_ecommerce/components/img/index.js @@ -0,0 +1,60 @@ +var app = getApp(); + +Component({ + externalClasses: ["i-class"], + properties: { + defaultImage: String, + imgType: { + type: Number, + value: 2 + }, + loadImage: { + type: String, + observer: function (val) { + if (val) { + var pixelRatio = Math.ceil(app.globalData.systemInfo.pixelRatio), + img = val + "?imageView2/" + this.data.imgType + "/w/" + this.getPx(this.data.width) * pixelRatio + "/h/" + this.getPx(this.data.height) * pixelRatio + "/ignore-error/1"; + this.setData({ + img: img + }); + } + } + }, + width: String, + height: String, + canPreview: { + type: Boolean, + value: false + }, + isLazy: { + type: Boolean, + value: false + } + }, + methods: { + imageLoad: function () { + this.setData({ + isLoad: true + }); + }, + bindError: function (error) { + console.log(error); + }, + getPx: function (e) { + var sysInfo = wx.getSystemInfoSync(); + console.log() + return Math.round(sysInfo.windowWidth / 375 * e); + }, + preview: function () { + this.data.canPreview && wx.previewImage({ + urls: [this.data.loadImage], + fail: function (error) { + wx.showToast({ + title: "预览图片失败,请重试", + icon: "none" + }), console.log(error); + } + }); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/img/index.json b/eaterplanet_ecommerce/components/img/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/img/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/img/index.wxml b/eaterplanet_ecommerce/components/img/index.wxml new file mode 100644 index 0000000..a0f50e8 --- /dev/null +++ b/eaterplanet_ecommerce/components/img/index.wxml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/img/index.wxss b/eaterplanet_ecommerce/components/img/index.wxss new file mode 100644 index 0000000..b63b5a1 --- /dev/null +++ b/eaterplanet_ecommerce/components/img/index.wxss @@ -0,0 +1,16 @@ +.img-content { + position: relative; +} + +.img-def { + position: absolute !important; + transition: opacity 0.1s; +} + +.opacity { + opacity: 0; +} + +.show-img { + opacity: 1; +} diff --git a/eaterplanet_ecommerce/components/index-item/index.js b/eaterplanet_ecommerce/components/index-item/index.js new file mode 100644 index 0000000..5025ca4 --- /dev/null +++ b/eaterplanet_ecommerce/components/index-item/index.js @@ -0,0 +1,31 @@ +Component({ + externalClasses: ["i-class"], + properties: { + name: { + type: String, + value: "" + } + }, + relations: { + "../index/index": { + type: "parent" + } + }, + data: { + top: 0, + height: 0, + currentName: "" + }, + methods: { + updateDataChange: function () { + var that = this; + wx.createSelectorQuery().in(this).select(".i-index-item").boundingClientRect(function (t) { + that.setData({ + top: t.top, + height: t.height, + currentName: that.data.name + }); + }).exec(); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index-item/index.json b/eaterplanet_ecommerce/components/index-item/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/index-item/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index-item/index.wxml b/eaterplanet_ecommerce/components/index-item/index.wxml new file mode 100644 index 0000000..64e532d --- /dev/null +++ b/eaterplanet_ecommerce/components/index-item/index.wxml @@ -0,0 +1,6 @@ + + {{name}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index-item/index.wxss b/eaterplanet_ecommerce/components/index-item/index.wxss new file mode 100644 index 0000000..141b65f --- /dev/null +++ b/eaterplanet_ecommerce/components/index-item/index.wxss @@ -0,0 +1,12 @@ +.i-index-item-header { + height: 70rpx; + line-height: 70rpx; + font-size: 26rpx; + padding-left: 40rpx; + color: #999; + background: #f6f6f6; +} + +.i-index-item-content { + background: #fff; +} diff --git a/eaterplanet_ecommerce/components/index/index.js b/eaterplanet_ecommerce/components/index/index.js new file mode 100644 index 0000000..2fec2eb --- /dev/null +++ b/eaterplanet_ecommerce/components/index/index.js @@ -0,0 +1,155 @@ +var t = getApp(); + +Component({ + externalClasses: ["i-class"], + properties: { + height: { + type: String, + value: "300", + observer: function (val) { + if (val) { + var sHeight = this.setScrollStyle(val); + this.setData({ + scrollHeight: sHeight + }); + } + } + }, + itemHeight: { + type: Number, + value: 18 + }, + localCity: { + type: Object, + }, + skin: { + type: Object + } + }, + relations: { + "../index-item/index": { + type: "child", + linked: function () { + this._updateDataChange(); + }, + linkChanged: function () { + this._updateDataChange(); + }, + unlinked: function () { + this._updateDataChange(); + } + } + }, + data: { + scrollTop: 0, + fixedData: [], + current: 0, + timer: null, + startTop: 0, + itemLength: 0, + currentName: "", + isTouches: false, + localCity: {}, + scrollHeight: "" + }, + attached: function () { + // let city = wx.getStorageSync('city'); + // this.setData({ + // localCity: city + // }); + }, + methods: { + changeGPSCommunity: function () { + wx.setStorage({ + key: "city_id", + data: 0 + }) + var e = getCurrentPages(), a = 1; + e[e.length - 2].route.indexOf("/position/search") > -1 && (a = 2), t.globalData.changeCity = this.data.localCity, + wx.navigateBack({ + delta: a + }); + }, + setScrollStyle: function (t) { + for (var e = ["%", "px", "rem", "rpx", "em", "rem"], a = !1, i = 0; i < e.length; i++) { + var n = e[i]; + if (t.indexOf(n) > -1) { + a = !0; + break; + } + } + return "height:" + (a ? t : t + "px"); + }, + loop: function () { }, + _updateDataChange: function () { + var t = this, e = this.getRelationNodes("../index-item/index"), a = e.length, i = this.data.fixedData; + a > 0 && (this.data.timer && (clearTimeout(this.data.timer), this.setData({ + timer: null + })), this.data.timer = setTimeout(function () { + var a = []; + e.forEach(function (t) { + t.data.name && -1 === i.indexOf(t.data.name) && (a.push(t.data.name), t.updateDataChange()); + }), t.setData({ + fixedData: a, + itemLength: e.length + }), t.setTouchStartVal(); + }, 0), this.setData({ + timer: this.data.timer + })); + }, + handlerScroll: function (t) { + var e = this, a = t.detail.scrollTop; + this.getRelationNodes("../index-item/index").forEach(function (t, i) { + var n = t.data, r = n.top + n.height; + a < r && a >= n.top && e.setData({ + current: i, + currentName: n.currentName + }); + }); + }, + getCurrentItem: function (t) { + var e = this.getRelationNodes("../index-item/index"), a = {}; + return t < 0 && (t = 0), a = e[t].data, a.total = e.length, a; + }, + triggerCallback: function (t) { + this.triggerEvent("change", t); + }, + handlerFixedTap: function (t) { + var e = t.currentTarget.dataset.index, a = this.getCurrentItem(e); + this.setData({ + scrollTop: a.top, + currentName: a.currentName, + isTouches: !0 + }), this.triggerCallback({ + index: e, + current: a.currentName + }); + }, + handlerTouchMove: function (t) { + var e = this.data, a = (t.touches[0] || {}).pageY - e.startTop, i = Math.ceil(a / e.itemHeight); + i = i >= e.itemLength ? e.itemLength - 1 : i; + var n = this.getCurrentItem(i); + n.name !== this.data.currentName && wx.vibrateShort(), this.setData({ + scrollTop: n.top, + currentName: n.name, + isTouches: !0 + }), this.triggerCallback({ + index: i, + current: n.name + }); + }, + handlerTouchEnd: function () { + this.setData({ + isTouches: !1 + }); + }, + setTouchStartVal: function () { + var t = this; + wx.createSelectorQuery().in(this).select(".i-index-fixed").boundingClientRect(function (e) { + t.setData({ + startTop: e.top + }); + }).exec(); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index/index.json b/eaterplanet_ecommerce/components/index/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/index/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index/index.wxml b/eaterplanet_ecommerce/components/index/index.wxml new file mode 100644 index 0000000..fd529e6 --- /dev/null +++ b/eaterplanet_ecommerce/components/index/index.wxml @@ -0,0 +1,16 @@ + + + 当前定位 + + {{localCity.districtName}} + GPS定位 + + + + + {{item}} + + + {{currentName}} + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/index/index.wxss b/eaterplanet_ecommerce/components/index/index.wxss new file mode 100644 index 0000000..03747c8 --- /dev/null +++ b/eaterplanet_ecommerce/components/index/index.wxss @@ -0,0 +1,91 @@ +.i-index { + width: 100%; + height: 100%; +} + +.i-index-line { + position: absolute; + left: 0; + width: 100%; + height: 2rpx; + background-color: #f7f7f7; + top: 50%; +} + +.i-index-content { + background: #fff; + position: relative; + z-index: 1; + display: inline-block; + padding: 0 20rpx; +} + +.i-index-fixed { + position: fixed; + right: 0; + top: 50%; + z-index: 10; + padding-left: 20rpx; + transform: translateY(-50%); +} + +.i-index-fixed-item { + display: block; + height: 36rpx; + line-height: 36rpx; + padding: 0 10rpx; + text-align: center; + color: #595959; + font-size: 24rpx; + border-radius: 50%; +} + +.i-index-fixed-item-current { + background: #2d8cf0; + color: #fff; +} + +.i-index-tooltip { + position: fixed; + left: 50%; + top: 50%; + transform: translate3d(-50%, -50%, 0); + background: rgba(0, 0, 0, 0.7); + color: #fff; + font-size: 48rpx; + border-radius: 50%; + width: 160rpx; + height: 160rpx; + line-height: 160rpx; + text-align: center; +} + +.local-position-content { + height: 160rpx; + padding-left: 40rpx; + display: flex; + align-items: center; + color: #999; + background: #fff; + font-size: 24rpx; +} + +.local-position-content span { + font-size: 40rpx; + font-weight: bold; + color: #9F99AA; + margin-right: 8rpx; +} + +.index-title { + height: 70rpx; + line-height: 70rpx; + font-size: 26rpx; + padding-left: 40rpx; + color: #999; + background: #f6f6f6; +} + +.router-hover { + opacity: 1; +} diff --git a/eaterplanet_ecommerce/components/input-number/index.js b/eaterplanet_ecommerce/components/input-number/index.js new file mode 100644 index 0000000..ea85dc0 --- /dev/null +++ b/eaterplanet_ecommerce/components/input-number/index.js @@ -0,0 +1,114 @@ +function t(t, a) { + var e = void 0, + i = void 0, + n = void 0; + try { + e = t.toString().split(".")[1].length; + } catch (t) { + e = 0; + } + try { + i = a.toString().split(".")[1].length; + } catch (t) { + i = 0; + } + return n = Math.pow(10, Math.max(e, i)), (Math.round(t * n) + Math.round(a * n)) / n; +} + +Component({ + externalClasses: ["i-class", "i-class-number-text", "i-number-view", "i-number-img"], + properties: { + size: String, + value: { + type: Number, + value: 1 + }, + min: { + type: Number, + value: -1 / 0 + }, + max: { + type: Number, + value: 1 / 0 + }, + step: { + type: Number, + value: 1 + }, + reduceImage: { + type: String, + value: "../../images/icon-input-reduce.png" + }, + addImage: { + type: String, + value: "../../images/icon-input-add.png" + }, + idx: { + type: Number, + value: 0 + } + }, + data: { + canChange: true, + skin: getApp().globalData.skin, + }, + attached(){ + this.setData({ + skin: getApp().globalData.skin, + }) + }, + methods: { + handleChangeStep: function(a, e, i) { + var n = this.data.value, + s = a.currentTarget.dataset, + h = (void 0 === s ? {} : s).disabled, + u = this.data.step; + if (h) return null; + "minus" === e ? n = t(n, -u) : "plus" === e && (n = t(n, u)), this.handleEmit(n, e, i); + }, + handleMinus: function(t) { + this.data.canChange && this.handleChangeStep(t, "minus", true); + }, + handlePlus: function(t) { + this.data.canChange && this.handleChangeStep(t, "plus", true); + }, + handleFocus: function() { + this.data.canChange = false, this.triggerEvent("focus"); + }, + getType: function(t) { + return t > this.data.value ? "plus" : t < this.data.value ? "minus" : ""; + }, + handleBlur: function(t) { + this.data.canChange = true; + var oldValue = this.data.value; + var a = t.detail.value, + e = ""; + "" === a && (a = 1); + a = (a - oldValue); + (a<=0) && (a=1); + var i = this.data.min; + // e = this.getType(a) + if (!(a *= 1)) return a = 0 === a ? i : 1, e = 'plus', void this.handleEmit(a, e, this.data.value !== a); + a = +a, e = this.getType(a); + var n = this.data.value !== a; + this.handleEmit(a, e, n); + }, + handleEmit: function(t, a) { + t < this.data.min && this.triggerEvent("outOfMin", t), t > this.data.max && this.triggerEvent("outOfMax", t); + var e = this.data, + i = e.min, + n = e.max; + t > n ? t = n : t < i ? t = i : t || (t = i); + var s = t !== this.data.value, + h = { + value: t, + type: a, + idx: this.data.idx + }; + a && (h.type = a), s ? this.triggerEvent("change", h) : (this.setData({ + value: t + }), this.triggerEvent("change")); + }, + returnTap: function(){} + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/input-number/index.json b/eaterplanet_ecommerce/components/input-number/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/input-number/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/input-number/index.wxml b/eaterplanet_ecommerce/components/input-number/index.wxml new file mode 100644 index 0000000..bf320b9 --- /dev/null +++ b/eaterplanet_ecommerce/components/input-number/index.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/input-number/index.wxss b/eaterplanet_ecommerce/components/input-number/index.wxss new file mode 100644 index 0000000..40c3056 --- /dev/null +++ b/eaterplanet_ecommerce/components/input-number/index.wxss @@ -0,0 +1,41 @@ +@import "/icon.wxss"; + +.i-input-number { + color: #495060; + display: flex; + align-items: center; + position: relative; +} + +.i-input-number .i-input-number-view { + width: 48rpx; + height: 48rpx; + display: inline-block; + vertical-align: middle; +} + +.i-input-number .i-input-number-view .img { + width: 48rpx; + height: 48rpx; + font-size: 48rpx; +} + +.i-input-number-minus { + border-right: none; + border-radius: 4rpx 0 0 4rpx; +} + +.i-input-number-plus { + border-left: none; + border-radius: 0 4rpx 4rpx 0; +} + +.i-input-number .i-input-number-text { + position: relative; + text-align: center; + height: 48rpx; + width: 66rpx; + font-size: 24rpx; + line-height: 48rpx; + z-index: 0; +} diff --git a/eaterplanet_ecommerce/components/load-more/index.js b/eaterplanet_ecommerce/components/load-more/index.js new file mode 100644 index 0000000..8eed444 --- /dev/null +++ b/eaterplanet_ecommerce/components/load-more/index.js @@ -0,0 +1,16 @@ +// eaterplanet_ecommerce/components/load-more/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + loading: { + type: Boolean, + value: true + }, + tip: { + type: String, + value: "" + } + } +}) diff --git a/eaterplanet_ecommerce/components/load-more/index.json b/eaterplanet_ecommerce/components/load-more/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/load-more/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/load-more/index.wxml b/eaterplanet_ecommerce/components/load-more/index.wxml new file mode 100644 index 0000000..256db41 --- /dev/null +++ b/eaterplanet_ecommerce/components/load-more/index.wxml @@ -0,0 +1,8 @@ + + + + {{tip}} + 正在加载 + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/load-more/index.wxss b/eaterplanet_ecommerce/components/load-more/index.wxss new file mode 100644 index 0000000..1d1b45f --- /dev/null +++ b/eaterplanet_ecommerce/components/load-more/index.wxss @@ -0,0 +1,69 @@ +.i-load-more { + width: 65%; + font-size: 24rpx; + display: flex; + align-items: center; + justify-content: center; + padding: 60rpx 0; + margin: 0 auto; +} + +.i-load-more-loading { + display: inline-block; + margin-right: 24rpx; + vertical-align: middle; + width: 28rpx; + height: 28rpx; + background: 0 0; + border-radius: 50%; + border: 4rpx solid #e9eaec; + border-color: #e9eaec #e9eaec #e9eaec #2d8cf0; + animation: btn-spin 0.6s linear; + animation-iteration-count: infinite; +} + +.i-load-more-tip { + display: inline-block; + vertical-align: middle; + color: #fff; +} + +.i-load-more-line { + display: flex; + border-top: 0; +} + +.i-load-more-line .i-load-more-tip { + position: relative; + top: -.1em; + padding: 0 0.55em; +} + +.i-load-more-empty { + border-radius: 50%; + background-color: #e5e5e5; + display: inline-block; + position: relative; + vertical-align: 0; + top: -.16em; +} + +@-webkit-keyframes btn-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(360deg); + } +} + +@keyframes btn-spin { + 0% { + transform: rotate(0); + } + + 100% { + transform: rotate(360deg); + } +} diff --git a/eaterplanet_ecommerce/components/menutabs/index.js b/eaterplanet_ecommerce/components/menutabs/index.js new file mode 100644 index 0000000..926257e --- /dev/null +++ b/eaterplanet_ecommerce/components/menutabs/index.js @@ -0,0 +1,113 @@ +var t = require("../../utils/index"); + +Component({ + externalClasses: ["i-class"], + properties: { + lineBgColor: { + type: String + }, + fontColor: { + type: String + }, + tabs: { + type: Array, + value: [] + }, + activeIndex: { + type: Number, + value: 0, + observer: function (e) { + if(-1 === this.properties.activeIndex) { + this.resetIndicator(); + } else { + this.executeAnimcation(e) + } + } + } + }, + data: { + out_link: "", + indicatorAnamationData: {}, + scrollLeft: 0 + }, + ready: function () { + this.tabsWidth = [], this.tabsLeft = [], this.screenWidth = wx.getSystemInfoSync().screenWidth, + this.setData({ + fontColor: this.data.fontColor ? this.data.fontColor : "#fff!important" + }), this.data.lineColor && this.setData({ + lineBgColor: this.data.lineBgColor + }); + }, + methods: { + handleTabItemTap: function (t) { + var e = t.target.dataset.index, a = t.target.dataset.id; + e !== this.data.activeIndex && (this.setData({ + activeIndex: e + }), this.triggerEvent("activeIndexChange", {a,e})); + }, + goLink: function () { + wx.switchTab({ + url: "/eaterplanet_ecommerce/pages/type/index", + }); + }, + executeAnimcation: function (t) { + var e = this; + this.getLeftAndWidth(t).then(function (a) { + var i = e.generateAnimationData(a.left, a.width, a.firstTabLeft); + e.centerTheTab(t, a), e.setData({ + indicatorAnamationData: i + }); + }); + }, + centerTheTab: function (t, e) { + var a = e.width, i = (e.left, this.tabsWidth.slice(0, t).reduce(function (t, e) { + return t + e + 25; + }, 15)); + this.setData({ + scrollLeft: i - (this.screenWidth - a) / 2 + }); + }, + getLeftAndWidth: function (e) { + var a = this; + return new Promise(function (i) { + (0, t.getRect)(a, ".tabs__nav", !0).then(function (t) { + a.tabsWidth = t.map(function (t) { + return t.width; + }), a.tabsLeft = t.map(function (t) { + return t.left; + }), i({ + width: a.tabsWidth[e], + left: a.tabsLeft[e], + firstTabLeft: a.tabsLeft[0] + }); + }); + }); + }, + generateAnimationData: function (t, e) { + var a = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : 0, i = wx.createAnimation({ + duration: 200, + timingFunction: "ease" + }); + return [{ + width: e, + left: t - a + }].forEach(function (t) { + var e = t.width, a = t.left; + i.translateX(a).width(e).step(); + }), i.export(); + }, + resetIndicator: function () { + let tabs = this.data.tabs || []; + let initWidth = 28; + if (tabs.length) initWidth = (tabs[0].name && tabs[0].name.length*14); + var t = wx.createAnimation({ + duration: 200, + timingFunction: "ease" + }); + t.translateX(0).width(initWidth).step(), this.setData({ + scrollLeft: 0, + indicatorAnamationData: t.export() + }); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/menutabs/index.json b/eaterplanet_ecommerce/components/menutabs/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/menutabs/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/menutabs/index.wxml b/eaterplanet_ecommerce/components/menutabs/index.wxml new file mode 100644 index 0000000..3a413cd --- /dev/null +++ b/eaterplanet_ecommerce/components/menutabs/index.wxml @@ -0,0 +1,11 @@ + + + + {{tabItem.name}} + + + + + + + diff --git a/eaterplanet_ecommerce/components/menutabs/index.wxss b/eaterplanet_ecommerce/components/menutabs/index.wxss new file mode 100644 index 0000000..bce5a1d --- /dev/null +++ b/eaterplanet_ecommerce/components/menutabs/index.wxss @@ -0,0 +1,85 @@ +.tabs { + position: relative; + padding-left: 0rpx; + padding-right:0rpx; + padding-bottom: -5rpx; + margin-right: 10rpx; + display: flex; +} + +.tabs__nav { + position: relative; + padding-bottom: 16rpx; + padding-right: 16rpx; + margin-right: 50rpx; + font-size: 28rpx; + font-weight: bold; + line-height: 58rpx; + flex-shrink: 0; + transition: all 0.6s ease; + color: #fff; + padding-top: 10rpx; +} + +.tabs__nav.active { + font-weight: bold; + font-size: 35rpx; + color: #42add5; +} + +.tabs__nav:first-child { + margin-left: 20rpx; +} + +.tabs__navs__wrap { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: nowrap; +} + +.tabs__navs__wrap .activeIndicator { + width: 80rpx!important; + height: 6rpx; + margin-left: 20rpx; + margin-right: 20rpx; + position: absolute; + vertical-align:baseline ; + bottom: 10rpx; + left: 0rpx; + /**border-radius: 24rpx;**/ + background: linear-gradient(to right,#fff,#4d9ee9)!; + /**box-shadow: 0rpx 4rpx 4rpx 0rpx rgba(0, 26, 255, 0.39);**/ + transition: all 1s ease-in-out; +} + +.gototype { + position: relative; + padding-bottom: 16rpx; +display: flex; + flex-shrink: 0; + color: #fff!important; + padding-top: 10rpx; + font-size: 28rpx; + font-weight: bold; + line-height: 58rpx; + + height: 100%; + padding-left:10rpx; +padding-right:0rpx; +margin-right: 0rpx; + + box-shadow: -12rpx 0rpx 10rpx -10rpx rgba(27, 27, 27, 0.39); +} +.gototype .image{ + position: relative; + margin-right: 0rpx; +margin: 12rpx 10rpx 0rpx 10rpx; + width:36rpx; + height: 36rpx; +background-repeat: no-repeat; + background-size: 100%; +background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAVzklEQVR4Xu1dDbCtVVl+nmGoNIv+ICjEMA3lT8zkMlnEnwaCAdLgCAqTgMXlR1BoADMwjcsIKsK9FxOowMCRIiBBMu9FwijALJE/GfGaZAOBWZSZDsM8zcv9zmGfc/Y++32/71vf+fbe75r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yzOGJfmwEz+1MEk7VT8uWzgH+QDJXZ3YZ2GpTYSt57BNtVlskMiNjEURFrreMPtdK/jltcGEb6SDDwBSm+or01SbxQaxs6FvC34d3S+8gu1OBDx4RPPcmPYj+bnIACWlNhHCNmfdyPnyQ7VZYJAqld8NYM9gLGYqeyrzeLDexMIlbVs9WdovOIh7SK4K1pm7zEptHMS1qc0wgxwD4CpHHIshTwM4juTHa9SdqCqS3grgSgBb1gj8WJJX16hnv4ipzRji2tZmiUGqLLIBwP51RATwDQAPVTetXwTwWM12+lTtJQBeAcBuxl8G4IU1g9tI8oCadeeySBNt/hXAVwDYg5V7ATzSJJae1N0OwKuqh0svB/CimnEN1WaUQew1+w01O8pqoxk4nKS9sKpdJKU2tdlbtuJQbYYapMoi6wCsLhPLTLa6nuRJbYxcUmrTBpHPtTFSm5EGqUxiT1r2aTeWmWxtfnZoW6OXlNq0Q+ay2ixrkMokTwDYup1YZrKVJ0luU2LkklKbZsSO1WasQSqTbAKwY7NYZrL210l652bVIkhSalOLObi0cRmkMsnlAI6vF8tM1rqC5AldjFxSahMj2q2N2yCVSc4HcHYslplEryF5Tpcjl5Ta+AgPaRMySGUSe8xoM1frvifxDWMyURsBrG36KLfu0KtHwKnNcAJraRM2yFzf1Vtde2wZnZZSV/8+17sHwLq6b8jbHlhqs4DRRtrUNsiAUQ4CMPexN86zUr4E4LP2IWl/e1ckvRbA3GeP3gVYLiCbIXCrfUja39qlsUEGe5a0GwB73b/DwGer2tH1p6I9Tn104PNFkt/sT3jjI5G0fTUlY1CbIo+fx0fTKuKpRdo8RPK+tnpo1SBtBZXtJAN9YSAN0hclMo5eMvD/Vzc/jKAc1v4AAAAASUVORK5CYII=); + + +} diff --git a/eaterplanet_ecommerce/components/modal-userProfile/index.js b/eaterplanet_ecommerce/components/modal-userProfile/index.js new file mode 100644 index 0000000..cf7a482 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal-userProfile/index.js @@ -0,0 +1,237 @@ +var util = require('../../utils/util.js'); +var location = require('../../utils/Location.js'); + +var app = getApp(); +const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0' +const defaultAvatarUrl2 = 'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132' + +Component({ + properties: { + showUserProfile: { + type: Boolean, + value: false + }, + navBackUrl: { + type: String, + value: '', + observer: function (t) { + if (t) app.globalData.navBackUrl = t; + } + }, + nickName: { + type: String, + value: '', + }, + avatar: { + type: String, + value: '', + } + }, + + attached: function () { + this.setData({ + skin: getApp().globalData.skin, + }) + this.getBg(); + let member_info = wx.getStorageSync('member_info'); + if (member_info!==null) { + this.setData({ + nickname: member_info.username, + avatarUrl: member_info.avatar + }) + } + }, + data: { + nickname: '微信用户', + avatarUrl: defaultAvatarUrl2, + image_o: '', + btnLoading: false, + loginSuccess: false, + canIUse: wx.canIUse('button.open-type.getUserInfo') + }, + methods: { + onChooseAvatar(e) { + this.setData({ + avatarUrl: e.detail.avatarUrl + }) + }, + nicknameInput(e){ + const {value}= e.detail; + console.log(value); + this.setData({ + nickname:value + }) + }, + getBg: function () { + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_newauth_bg' + }, + dataType: 'json', + success: function (res) { + that.setData({ + loaded: true + }) + if (res.data.code == 0) { + let { + newauth_bg_image, + newauth_confirm_image, + newauth_cancel_image + } = res.data.data; + that.setData({ + newauth_bg_image, + newauth_confirm_image, + newauth_cancel_image + }) + } + } + }) + }, + close: function () { + this.triggerEvent("cancel"); + }, + noCover: function () { + this.triggerEvent("cancel"); + }, + getMemberInfo: function () { + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.get_user_info', + token: token + }, + + dataType: 'json', + success: function (res) { + if (!res.data.needAuth) { + that.setData({ + nickname: res.data.data.username, + avatarUrl: res.data.data.avatar + }) + } + } + }) + }, + uploaduserInfo: function () { + + console.log(1111) + console.log(this.data.avatarUrl) + console.log( app.util.url ) + var that = this; + var token = wx.getStorageSync('token'); + wx.uploadFile({ + url: app.util.url('entry/wxapp/index', { + 'm': 'eaterplanet_ecommerce', + 'controller': 'goods.doPageUpload' + }), + filePath: that.data.avatarUrl, + name: 'upfile', + formData: { + 'name': that.data.avatarUrl + }, + header: { + 'content-type': 'multipart/form-data' + }, + success: function (res) { + console.log(res.data) + var data = JSON.parse(res.data); + that.setData({ + avatarUrl: data.image_o + }) + } + }) + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.get_user_info', + token: token + }, + dataType: 'json', + success: function (res) { + let member_info = res.data.data; + wx.getUserProfile({ + desc: "获取你的昵称、头像、地区及性别", + + success: function (msg) { + wx.getStorageSync(member_info) + var userInfo = msg.userInfo + userInfo['nickName'] = that.data.nickname + userInfo['avatarUrl'] = that.data.avatarUrl + member_info['username'] = that.data.nickname + member_info['avatar'] = that.data.avatarUrl + that.setData({ + avatarUrl: that.data.avatarUrl, + nickname: that.data.nickname, + }); + let invalidAvatars = [defaultAvatarUrl, defaultAvatarUrl2, "", "undefined"]; + let invalidUsernames = ["微信用户", "", "undefined"]; + if (invalidAvatars.includes(member_info.avatar)) { + wx.showToast({ + title: "请选择头像", + icon: "none" + }); + return false; + } + if (invalidUsernames.includes(member_info.username)) { + wx.showToast({ + title: "请修改昵称", + icon: "none" + }); + return false; + } + wx.setStorage({ + key: "userInfo", + data: userInfo + }) + wx.setStorage({ + key: "member_info", + data: member_info + }) + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.applogin_do', + token, + member_info, + nickName: member_info.username, + avatarUrl: member_info.avatar, + }, + method: 'post', + dataType: 'json', + success: function (res) { + let isblack = res.data.isblack || 0; + if (isblack == 1) { + app.globalData.isblack = 1; + wx.removeStorageSync('token'); + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } else { + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + } + that.setData({ + btnLoading: false, + loginSuccess: true + }); + wx.showToast({ + title: '修改成功', + duration: 2000 + }) + that.triggerEvent("authSuccess",res); + console.log("下一步刷新页面") + }, + }) + } + }) + } + }) + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal-userProfile/index.json b/eaterplanet_ecommerce/components/modal-userProfile/index.json new file mode 100644 index 0000000..6478ceb --- /dev/null +++ b/eaterplanet_ecommerce/components/modal-userProfile/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index", + "i-button": "../button/index" + } + } \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal-userProfile/index.wxml b/eaterplanet_ecommerce/components/modal-userProfile/index.wxml new file mode 100644 index 0000000..0c63bc4 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal-userProfile/index.wxml @@ -0,0 +1,21 @@ + + + + + + 昵称 + + + + + + + 暂不修改 + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal-userProfile/index.wxss b/eaterplanet_ecommerce/components/modal-userProfile/index.wxss new file mode 100644 index 0000000..4887da3 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal-userProfile/index.wxss @@ -0,0 +1,113 @@ +.auth-content { + width: 400rpx; + min-height: 200rpx; + max-height: 500rpx; + border-radius: 24rpx; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; +} + +.auth-content .bg { + width: 400rpx; + margin-top: -100rpx; +} + +.auth-content .h1 { + color: #000; + font-size: 32rpx; + margin-bottom: 20rpx; + font-weight: bold; +} + +.auth-content .h2 { + font-size: 24rpx; + line-height: 36rpx; + color: #999; + width: 408rpx; + margin-bottom: 44rpx; +} + +.auth-content .btn { + position: absolute; + left: 0; + right: 0; + bottom: -200rpx; + align-items: center; + justify-content: center; + font-size: 28rpx; +} + +.auth-content .btn .close-btn { + color: #fff; + border: 1rpx solid #fff; + border-radius: 36rpx; + margin: 0 15rpx; + text-align: center; + height: 64rpx; + line-height: 64rpx; +} + +.auth-content .btn .close-img { + margin: 0 15rpx; +} + +.auth-content .btn .img { + width: 180rpx; +} + +.auth-content .confirm { + height: 64rpx; + line-height: 64rpx; + font-size: 29rpx; + background: #fff; + border-radius: 36rpx; + margin: 20rpx 15rpx; +} + +.auth-content .avatar { + width: 400rpx; + margin-top: -100rpx; + margin-bottom: 20rpx; + font-size: 32rpx; +} + +.avatar-wrapper { + margin: auto auto 40rpx; + height: 160rpx; + width: 160rpx; +} + +.avatar-img { +border-radius: 20rpx; + height: 160rpx; + width: 160rpx; +} + +.nickname { + margin: auto; + font-size: 32rpx; + display: flex; + justify-content: center; +} + +.nickname-wrapper { + font-size: 32rpx; + max-width: 240rpx; + height: 50rpx; + border-radius: 10rpx; + background-color: #bfbfbf; +} + +.nickname .title { + width: 80rpx; + color: #bfbfbf; +} + +.nickname-wrapper .input { + text-align: center; + font-weight: bold; + color: #1d252f; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal/index.js b/eaterplanet_ecommerce/components/modal/index.js new file mode 100644 index 0000000..ed6a0b5 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal/index.js @@ -0,0 +1,51 @@ +var app = getApp(); + +Component({ + externalClasses: ["i-class", "i-class-mask"], + properties: { + visible: { + type: Boolean, + value: !1, + observer: function(e) { + var that = this; + this.data.closeDelay ? setTimeout(function() { + that.setData({ + isShow: e + }); + }, this.data.closeDelay) : this.setData({ + isShow: e + }); + } + }, + maskClosable: { + type: Boolean, + value: true + }, + scrollUp: { + type: Boolean, + value: true + }, + closeDelay: { + type: Number, + value: 0 + } + }, + data: { + isIpx: false, + isShow: false + }, + attached: function() { + this.setData({ + isIpx: app.globalData.isIpx + }); + }, + methods: { + stopMove: function() {}, + handleClickMask: function() { + this.data.maskClosable && this.handleClickCancel(); + }, + handleClickCancel: function() { + this.triggerEvent("cancel"); + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal/index.json b/eaterplanet_ecommerce/components/modal/index.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal/index.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal/index.wxml b/eaterplanet_ecommerce/components/modal/index.wxml new file mode 100644 index 0000000..8434ec7 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal/index.wxml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/modal/index.wxss b/eaterplanet_ecommerce/components/modal/index.wxss new file mode 100644 index 0000000..8af6d06 --- /dev/null +++ b/eaterplanet_ecommerce/components/modal/index.wxss @@ -0,0 +1,70 @@ +.i-as { + position: fixed; + width: 100%; + box-sizing: border-box; + left: 0; + right: 0; + bottom: 0; + background: #fff; + transform: translate3d(0,100%,0); + transform-origin: center; + transition: all 0.2s ease-in-out; + z-index: 9001; + visibility: hidden; + border-radius: 30rpx 30rpx 0 0; +} + +.i-as-mask { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0,0,0,0.7); + backdrop-filter: blur(30rpx); + transition: all 0.2s ease-in-out; + opacity: 0; + visibility: hidden; + z-index: 9000; +} + +.i-as-mask-show { + opacity: 1; + visibility: visible; +} + +.i-as-show { + transform: translate3d(0, 0, 0); + visibility: visible; +} + +.i-modal-content { + position: fixed; + overflow: auto; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 9001; + display: flex; + width: auto; + height: auto; + outline: 0; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + transform: translateZ(2rpx); + opacity: 0; + visibility: hidden; + -webkit-overflow-scrolling: touch; +} + +.i-modal-show { + visibility: visible; + opacity: 1; +} + +.ipx { + padding-bottom: calc(env(safe-area-inset-bottom) - 30rpx); +} diff --git a/eaterplanet_ecommerce/components/mp-dialog/dialog.js b/eaterplanet_ecommerce/components/mp-dialog/dialog.js new file mode 100644 index 0000000..a105076 --- /dev/null +++ b/eaterplanet_ecommerce/components/mp-dialog/dialog.js @@ -0,0 +1,168 @@ +module.exports = +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = 20); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ 20: +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +Component({ + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + title: { + type: String, + value: '' + }, + extClass: { + type: String, + value: '' + }, + maskClosable: { + type: Boolean, + value: true + }, + mask: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: false, + observer: '_showChange' + }, + buttons: { + type: Array, + value: [] + } + }, + data: { + innerShow: false + }, + ready: function ready() { + var buttons = this.data.buttons; + var len = buttons.length; + buttons.forEach(function (btn, index) { + if (len === 1) { + btn.className = 'weui-dialog__btn_primary'; + } else if (index === 0) { + btn.className = 'weui-dialog__btn_default'; + } else { + btn.className = 'weui-dialog__btn_primary'; + } + }); + this.setData({ + buttons: buttons + }); + }, + + methods: { + buttonTap: function buttonTap(e) { + var index = e.currentTarget.dataset.index; + + this.triggerEvent('buttontap', { index: index, item: this.data.buttons[index] }, {}); + }, + close: function close() { + var data = this.data; + if (!data.maskClosable) return; + this.setData({ + show: false + }); + this.triggerEvent('close', {}, {}); + }, + stopEvent: function stopEvent() {} + } +}); + +/***/ }) + +/******/ }); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/mp-dialog/dialog.json b/eaterplanet_ecommerce/components/mp-dialog/dialog.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/mp-dialog/dialog.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/mp-dialog/dialog.wxml b/eaterplanet_ecommerce/components/mp-dialog/dialog.wxml new file mode 100644 index 0000000..a74c219 --- /dev/null +++ b/eaterplanet_ecommerce/components/mp-dialog/dialog.wxml @@ -0,0 +1,21 @@ + + + + + {{title}} + + + + + + + + + {{item.text}} + + + + + + + diff --git a/eaterplanet_ecommerce/components/mp-dialog/dialog.wxss b/eaterplanet_ecommerce/components/mp-dialog/dialog.wxss new file mode 100644 index 0000000..6dae715 --- /dev/null +++ b/eaterplanet_ecommerce/components/mp-dialog/dialog.wxss @@ -0,0 +1 @@ +.weui-mask{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0;background:rgba(0,0,0,0.6)}.weui-mask_transparent{position:fixed;z-index:1000;top:0;right:0;left:0;bottom:0}.weui-dialog__wrp{position:fixed;z-index:5000;top:16px;bottom:16px;left:16px;right:16px;text-align:center;font-size:0;display:-webkit-box;display:-webkit-flex;display:flex;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__wrp .weui-dialog{max-height:100%}.weui-dialog{background-color:#FFFFFF;text-align:center;border-radius:12px;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;max-height:90%}.weui-dialog__hd{padding:24px 24px 16px}.weui-dialog__title{font-weight:700;font-size:17px;line-height:1.4}.weui-dialog__bd{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:0 24px;min-height:40px;font-size:17px;line-height:1.4;overflow-wrap:break-word;-webkit-hyphens:auto;hyphens:auto;color:rgba(0,0,0,0.5)}.weui-dialog__bd:first-child{padding:32px 24px 0;font-weight:700;color:rgba(0,0,0,0.9);display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.weui-dialog__ft{position:relative;line-height:54px;min-height:54px;font-size:17px;display:flex}.weui-dialog__ft:after{content:" ";position:absolute;left:0;top:0;right:0;height:1px;border-top:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-dialog__btn{display:block;flex:1;color:#576B95;font-weight:700;text-decoration:none;-webkit-tap-highlight-color:rgba(0,0,0,0);position:relative}.weui-dialog__btn:active{background-color:#ECECEC}.weui-dialog__btn:after{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid rgba(0,0,0,0.1);color:rgba(0,0,0,0.1)}.weui-dialog__btn:first-child:after{display:none}.weui-dialog__btn_default{color:rgba(0,0,0,0.9)}@media screen and (min-width:352px){.weui-dialog{width:320px;margin:0 auto}}.weui-dialog.weui-dialog_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-dialog{opacity:1;-webkit-transform:scale3d(1, 1, 1);transform:scale3d(1, 1, 1);transition:all .3s ease-in}.weui-mask.weui-mask_hidden{opacity:0;transform:scale3d(1, 1, 0)}.weui-mask{opacity:1;transform:scale3d(1, 1, 1);transition:all .3s ease-in} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/navigation-bar/index.js b/eaterplanet_ecommerce/components/navigation-bar/index.js new file mode 100644 index 0000000..35f692a --- /dev/null +++ b/eaterplanet_ecommerce/components/navigation-bar/index.js @@ -0,0 +1,255 @@ +module.exports = +Component({ + onHide: function () { }, + onUnload: function () { }, + options: { + multipleSlots: true, + addGlobalClass: true + }, + properties: { + extClass: { + type: String, + value: '' + }, + background: { + type: String, + value: '', + observer: '_showChange' + }, + backgroundColorTop: { + type: String, + value: 'rgba(44, 44, 44, 0)', + observer: '_showChangeBackgroundColorTop' + }, + color: { + type: String, + value: 'rgba(0, 0, 0, 1)' + }, + title: { + type: String, + value: '' + }, + searchText: { + type: String, + value: '点我搜索' + }, + titleimg: { + type: Boolean, + value: false + }, + titleimgplus: { + type: Boolean, + value: false + }, + weather: { + type: Boolean, + value: false + }, + filter: { + type: Boolean, + value: false + }, + group: { + type: Boolean, + value: false + }, + searchBar: { + type: Boolean, + value: false + }, + back: { + type: Boolean, + value: false + }, + home: { + type: Boolean, + value: false + }, + iconTheme: { + type: String, + value: 'black' + }, + /* animated: { + type: Boolean, + value: true + }, + show: { + type: Boolean, + value: true, + observer: '_showChange' + }, */ + delta: { + type: Number, + value: 1 + } + }, + created: function created() { + this.getSystemInfo(); + }, + attached: function attached() { + this.setStyle(); // 设置样式 + }, + + data: {}, + pageLifetimes: { + show: function show() { + if (getApp().globalSystemInfo.ios) { + this.getSystemInfo(); + this.setStyle(); // 设置样式1 + } + }, + hide: function hide() {} + }, + methods: { + goResult: function (t) { + var a = t.detail.value.replace(/\s+/g, ""); + a ? wx.navigateTo({ + url: "/eaterplanet_ecommerce/pages/type/result?keyword=" + a + }) : wx.showToast({ + title: "请输入关键词", + icon: "none" + }); + }, + setStyle: function setStyle(life) { + var _getApp$globalSystemI = getApp().globalSystemInfo, + statusBarHeight = _getApp$globalSystemI.statusBarHeight, + navBarHeight = _getApp$globalSystemI.navBarHeight, + capsulePosition = _getApp$globalSystemI.capsulePosition, + navBarExtendHeight = _getApp$globalSystemI.navBarExtendHeight, + ios = _getApp$globalSystemI.ios, + windowWidth = _getApp$globalSystemI.windowWidth; + var _data = this.data, + back = _data.back, + home = _data.home, + title = _data.title; + + var rightDistance = windowWidth - capsulePosition.right; // 胶囊按钮右侧到屏幕右侧的边距 + var leftWidth = windowWidth - capsulePosition.left; // 胶囊按钮左侧到屏幕右侧的边距 + + var navigationbarinnerStyle = ['color: ' + this.data.color, 'background: ' + this.data.background, 'height:' + (navBarHeight + navBarExtendHeight) + 'px', 'padding-top:' + statusBarHeight + 'px', 'padding-right:' + leftWidth + 'px', 'padding-bottom:' + navBarExtendHeight + 'px'].join(';'); + var navBarLeft = []; + if (back && !home || !back && home) { + navBarLeft = ['width:' + capsulePosition.width + 'px', 'height:' + capsulePosition.height + 'px'].join(';'); + } else if (back && home || title) { + navBarLeft = ['width:' + capsulePosition.width + 'px', 'height:' + capsulePosition.height + 'px', 'margin-left:' + rightDistance + 'px'].join(';'); + } else { + navBarLeft = ['width:auto', 'margin-left:0px'].join(';'); + } + if (life === 'created') { + this.data = { + navigationbarinnerStyle: navigationbarinnerStyle, + navBarLeft: navBarLeft, + navBarHeight: navBarHeight, + capsulePosition: capsulePosition, + navBarExtendHeight: navBarExtendHeight, + ios: ios + }; + } else { + this.setData({ + navigationbarinnerStyle: navigationbarinnerStyle, + navBarLeft: navBarLeft, + navBarHeight: navBarHeight, + capsulePosition: capsulePosition, + navBarExtendHeight: navBarExtendHeight, + ios: ios + }); + } + }, + _showChange: function _showChange() { + this.setStyle(); + }, + + // 返回事件 + back: function back() { + this.triggerEvent('back', { delta: this.data.delta }); + }, + home: function home() { + this.triggerEvent('home', { delta: this.data.delta }); + }, + search: function search() { + this.triggerEvent('search', {}); + }, + getMenuButtonBoundingClientRect: function getMenuButtonBoundingClientRect(systemInfo) { + var ios = !!(systemInfo.system.toLowerCase().search('ios') + 1); + var rect = void 0; + try { + rect = wx.getMenuButtonBoundingClientRect ? wx.getMenuButtonBoundingClientRect() : null; + if (rect === null) { + throw new Error('getMenuButtonBoundingClientRect error'); + } + } catch (error) { + var gap = ''; // 胶囊按钮上下间距 使导航内容居中 + var width = 96; // 胶囊的宽度 + if (systemInfo.platform === 'android') { + gap = 8; + width = 96; + } else if (systemInfo.platform === 'devtools') { + if (ios) { + gap = 5.5; // 开发工具中ios手机 + } else { + gap = 7.5; // 开发工具中android和其他手机 + } + } else { + gap = 4; + width = 88; + } + if (!systemInfo.statusBarHeight) { + // 开启wifi的情况下修复statusBarHeight值获取不到 + systemInfo.statusBarHeight = systemInfo.screenHeight - systemInfo.windowHeight - 20; + } + rect = { + // 获取不到胶囊信息就自定义重置一个 + bottom: systemInfo.statusBarHeight + gap + 32, + height: 32, + left: systemInfo.windowWidth - width - 10, + right: systemInfo.windowWidth - 10, + top: systemInfo.statusBarHeight + gap, + width: width + }; + } + return rect; + }, + getSystemInfo: function getSystemInfo() { + var app = getApp(); + if (app.globalSystemInfo && !app.globalSystemInfo.ios) { + return app.globalSystemInfo; + } else { + var systemInfo = wx.getSystemInfoSync(); + var ios = !!(systemInfo.system.toLowerCase().search('ios') + 1); + var rect = this.getMenuButtonBoundingClientRect(systemInfo); + + var navBarHeight = ''; + if (!systemInfo.statusBarHeight) { + systemInfo.statusBarHeight = systemInfo.screenHeight - systemInfo.windowHeight - 20; + navBarHeight = function () { + var gap = rect.top - systemInfo.statusBarHeight; + return 2 * gap + rect.height; + }(); + + systemInfo.statusBarHeight = 0; + systemInfo.navBarExtendHeight = 0; // 下方扩展4像素高度 防止下方边距太小 + } else { + navBarHeight = function () { + var gap = rect.top - systemInfo.statusBarHeight; + return systemInfo.statusBarHeight + 2 * gap + rect.height; + }(); + if (ios) { + systemInfo.navBarExtendHeight = 4; // 下方扩展4像素高度 防止下方边距太小 + } else { + systemInfo.navBarExtendHeight = 0; + } + } + systemInfo.navBarHeight = navBarHeight; // 导航栏高度不包括statusBarHeight + systemInfo.capsulePosition = rect; + systemInfo.ios = ios; // 是否ios + + app.globalSystemInfo = systemInfo; // 将信息保存到全局变量中,后边再用就不用重新异步获取了 + + // console.log('systemInfo', systemInfo); + return systemInfo; + } + } + + } +}); + diff --git a/eaterplanet_ecommerce/components/navigation-bar/index.json b/eaterplanet_ecommerce/components/navigation-bar/index.json new file mode 100644 index 0000000..9c90020 --- /dev/null +++ b/eaterplanet_ecommerce/components/navigation-bar/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + + } +} diff --git a/eaterplanet_ecommerce/components/navigation-bar/index.wxml b/eaterplanet_ecommerce/components/navigation-bar/index.wxml new file mode 100644 index 0000000..8b63c66 --- /dev/null +++ b/eaterplanet_ecommerce/components/navigation-bar/index.wxml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{title}} + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/navigation-bar/index.wxss b/eaterplanet_ecommerce/components/navigation-bar/index.wxss new file mode 100644 index 0000000..831070b --- /dev/null +++ b/eaterplanet_ecommerce/components/navigation-bar/index.wxss @@ -0,0 +1,260 @@ +.page { + --height: 44px; /* 4*2+32 */ + --right: 97px; /* 10+87 */ + --navBarExtendHeight: 4px; + box-sizing: border-box; +} +.page-group{ + + background-color: rgba(00, 00, 00, 1); + width: 100%; + + position: absolute; + top: 50rpx; + left: 0; + z-index: 23; + +} +.group{ + + background-color: rgba(77, 158, 233, 1); + width: 100%; + display: block; + position: fixed; + top: 0; + left: 0; + z-index: 1000; + +} + .filter { + background: #4d9ee986; + display: flex; + flex-direction: row; + justify-content: space-around; + position: fixed; + top: 0; + left: 0; + z-index: 899; + width: 100%; + height: calc(var(--height) + var(--navBarExtendHeight)); + backdrop-filter: blur(40rpx) ; + overflow: hidden; +} +.filter .ios { + --height: 90px; + box-sizing: border-box; /* 8*2+32 */ +} +.filter .android { + --height: 48px; + box-sizing: border-box; /* 8*2+32 */ +} +.filter .devtools { + --height: 42px; + box-sizing: border-box;/* 5*2+32 */ +} + +.navbar { + + position:relative; + opacity: 1; + +} + +.navbar .android { + --height: 48px; + box-sizing: border-box; /* 8*2+32 */ +} +.navbar .devtools { + --height: 42px; + box-sizing: border-box;/* 5*2+32 */ +} +.navbar-inner { + position: fixed; + top: 0; + left: 0; + z-index: 5001; + height: var(--height); + display: flex; + align-items: center; + padding-right: var(--right); + width: 100%; + padding-bottom: var(--navBarExtendHeight); + box-sizing: border-box; +} +.navbar-inner .navbar-left { + position: relative; + width: var(--right); + height: 32px; + /* padding-left: 10px; */ + display: flex; + align-items: center; + box-sizing: border-box; +} +.navbar-buttons { + height: 100%; + width: 100%; + display: flex; + align-items: center; + border-radius: 15px; + border: 1rpx solid rgba(204, 204, 204, 0.6); + position: relative; + box-sizing: border-box; +} +.navbar-buttons.android { + border: 1rpx solid rgba(234, 234, 234, 0.6); + box-sizing: border-box; +} +.navbar-buttons::after { + position: absolute; + content: ''; + width: 1rpx; + height: 18.4px; + background: rgba(204, 204, 204, 0.6); + left: 50%; + top: 50%; + transform: translate(-50%, -50%); + box-sizing: border-box; +} +.navbar-buttons.android::after { + background: rgba(234, 234, 234, 0.6); +} +.navbar-button { + width: 50%; + height: 100%; + display: flex; + font-size: 12px; + background-repeat: no-repeat; + background-position: center center; + background-size: 1em 2em; +} + +.navbar-inner .navbar-left .navbar-btn_goback:active, +.navbar-inner .navbar-left .navbar-btn_gohome:active { + opacity: 1; +} +.navbar-inner .navbar-center { + font-size: 34rpx; + line-height: 34rpx; + text-align: center; + position: relative; + flex: 1; + display: -webkit-box; + display: -webkit-flex; + display: flex; + align-items: center; + justify-content: center; + padding-left: 20rpx; +} +.navbar-inner .navbar-center { + margin-top: -2px; +} +.navbar-inner .navbar-loading { + font-size: 0; +} +.navbar-inner .navbar-loading .navbar-loading { + margin-left: 0; +} +.navbar-inner .navbar-right { + margin-right: 10px; +} +.navbar-placeholder { + height: var(--height); + background: #f8f8f8; + position: relative; + z-index: 50; +} + +.navbar-search { + width: 520rpx; + display: flex; + align-content: center; + align-items: center; + height: 60rpx; + border-radius: 30rpx; + position: relative; + background: #f6f6f6; +} + +.navbar-search-input { + width: 100%; + height: 100%; + display: flex; + align-items: center; + align-content: center; + color: #999; + font-size: 15px; + line-height: 15px; +} +.navbar-inner .navbar-left .navbar-btn_goback { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z'/%3E%3C/svg%3E"); +} +.navbar-inner .navbar-left .navbar-btn_goback.white { + background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='24' viewBox='0 0 12 24'%3E %3Cpath fill-opacity='.9' fill-rule='evenodd' d='M10 19.438L8.955 20.5l-7.666-7.79a1.02 1.02 0 0 1 0-1.42L8.955 3.5 10 4.563 2.682 12 10 19.438z' fill='%23ffffff'/%3E%3C/svg%3E"); +} +.navbar-inner .navbar-left .navbar-btn_gohome { + background-image: url("data:image/svg+xml,%3Csvg t='1565752242401' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4326' width='48' height='48'%3E%3Cpath d='M931.148 451.25L591.505 97.654c-21.106-21.953-49.313-34.034-79.551-34.034-30.235 0-58.448 12.081-79.554 34.034L92.76 451.25c-35.049 36.498-30.536 68.044-24.742 81.222 4.13 9.35 18.07 35.05 58.231 35.05h49.78v272.016c0 61.756 44.342 119.906 107.357 119.906h144.587v-287.87c0-30.866-4.675-48.062 26.848-48.062h114.268c31.52 0 26.845 17.196 26.845 48.061v287.872h144.588c63.013 0 107.358-58.15 107.358-119.906V567.523h49.782c40.16 0 54.1-25.7 58.229-35.05 5.793-13.18 10.306-44.726-24.743-81.224z m-33.486 60.28h-105.77v328.007c0 30.865-19.877 63.917-51.37 63.917h-88.6V671.572c0-61.761-19.79-104.05-82.832-104.05H454.821c-63.045 0-82.836 42.289-82.836 104.05v231.883h-88.599c-31.495 0-51.37-33.052-51.37-63.917V511.529H126.25c-0.984 0-1.888-3.852-2.708-3.907 1.94-3.388 5.276-11.975 10.825-17.743l339.671-353.35c10.142-10.578 24.467-17.057 38.353-16.924 13.888-0.133 27.342 6.346 37.483 16.923L889.54 489.88c5.549 5.768 8.885 14.355 10.825 17.743-0.818 0.055-1.72 3.907-2.704 3.907z' fill='%23000000' p-id='4327'%3E%3C/path%3E%3C/svg%3E"); + background-size: 22px 22px; +} +.navbar-inner .navbar-left .navbar-btn_gohome.white { + background-image: url("data:image/svg+xml,%3Csvg t='1565752242401' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='4326' width='48' height='48'%3E%3Cpath d='M931.148 451.25L591.505 97.654c-21.106-21.953-49.313-34.034-79.551-34.034-30.235 0-58.448 12.081-79.554 34.034L92.76 451.25c-35.049 36.498-30.536 68.044-24.742 81.222 4.13 9.35 18.07 35.05 58.231 35.05h49.78v272.016c0 61.756 44.342 119.906 107.357 119.906h144.587v-287.87c0-30.866-4.675-48.062 26.848-48.062h114.268c31.52 0 26.845 17.196 26.845 48.061v287.872h144.588c63.013 0 107.358-58.15 107.358-119.906V567.523h49.782c40.16 0 54.1-25.7 58.229-35.05 5.793-13.18 10.306-44.726-24.743-81.224z m-33.486 60.28h-105.77v328.007c0 30.865-19.877 63.917-51.37 63.917h-88.6V671.572c0-61.761-19.79-104.05-82.832-104.05H454.821c-63.045 0-82.836 42.289-82.836 104.05v231.883h-88.599c-31.495 0-51.37-33.052-51.37-63.917V511.529H126.25c-0.984 0-1.888-3.852-2.708-3.907 1.94-3.388 5.276-11.975 10.825-17.743l339.671-353.35c10.142-10.578 24.467-17.057 38.353-16.924 13.888-0.133 27.342 6.346 37.483 16.923L889.54 489.88c5.549 5.768 8.885 14.355 10.825 17.743-0.818 0.055-1.72 3.907-2.704 3.907z' fill='%23ffffff' p-id='4327'%3E%3C/path%3E%3C/svg%3E"); + background-size: 22px 22px; +} +.navbar-search-icon { + position: absolute; + left: 20rpx; + margin-left: rpx; + margin-right: 12rpx; + width: 28px; + + height: 28px; + display: flex; + align-items: center; + justify-content: center; + background-image: url("data:image/svg+xml,%3Csvg t='1565691512239' class='icon' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='1240' width='48' height='48'%3E%3Cpath d='M819.2 798.254545L674.909091 653.963636c46.545455-48.872727 74.472727-114.036364 74.472727-186.181818 0-151.272727-123.345455-274.618182-274.618182-274.618182-151.272727 0-274.618182 123.345455-274.618181 274.618182 0 151.272727 123.345455 274.618182 274.618181 274.618182 65.163636 0 128-23.272727 174.545455-62.836364l144.290909 144.290909c2.327273 2.327273 6.981818 4.654545 11.636364 4.654546s9.309091-2.327273 11.636363-4.654546c6.981818-6.981818 6.981818-18.618182 2.327273-25.6zM235.054545 467.781818c0-132.654545 107.054545-239.709091 239.709091-239.709091 132.654545 0 239.709091 107.054545 239.709091 239.709091 0 132.654545-107.054545 239.709091-239.709091 239.709091-132.654545 0-239.709091-107.054545-239.709091-239.709091z' fill='%23999999' p-id='1241'%3E%3C/path%3E%3C/svg%3E"); + background-repeat: no-repeat; + background-size: cover; +} + +.navbar-img-icon { + position: absolute; + left: 20rpx; + width: 64rpx; + height: 64rpx; + display: flex; + filter: drop-shadow(0 0rpx 5rpx rgba(0,0,0,0.3)); + align-items: center; + justify-content: center; + background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAAArlBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8tivQqAAAAOXRSTlMADAMGvy4ioAj0MujU0IzemoNOPigZ7+O4tKqVY1VFQjbaxXZaFfr3rkvsyqSQe3FoOh0SDtZuEH8l89QcAAADU0lEQVRYw7WX55LqMAyFj9MIJZTQQ91AqLu0pfn9X+wOkCIbJ8DO3O8XIJBlSUcKSEGz3E21uz5VKqd1t7pxGzo+QK9fjSIXWPm1kY33aO6MGVcw88+Hd36++eKpVK6vXGj9Es/ka5eZDHPBX9ItIJVpm79BsZ8W/pW/SVlX1q7K3ybH8ISd4x/gPXnQqvwjvuVb1PiHlKX8848RatEocgWtktH1vK5xyiutBZKALn+m0zeP2t36aw7KDn/CSMTVV1iXGigX9/mQLUKCypPwakzRpye5JSNlXblsGUCFtVBXotmWf1+HGrsnTRkLN85cJL9EKlK7be5u18rA1DCfU0q3VNVnUgAmMqjPOeUWbFkeW0dkIWquB+i+LFXg/RAchkaLvq/6uSYyYUJPzseYite38YoOp+wEHc+2eE1XLJmYFA8xb2ZxIUbUGVoBY0FjXB8VfqFm3OIEH47Uxo7jVFbzGc+XegUo2QmthC9h7/T6gySk1fb1JSpok9MntxJuibkGysUO1UcObRMH/iPkCScMaAeY0SQeUAfxMDGa4fd6JXJFkkrTQoRHruBErxLz77cqBFbXEVHIJ0k04gGXMKRqiWjUVXn0EZ7WauDO0Tro+g9Z5omKaFX387iRamEo2uOY4XjvfvOEKiKWDboJo8B/IjFV7v6boyMQkFbgQ0QMTNUq3MEM81HsMWDcfPjftuIDYtwRCMtQfnvo66gLL0AsgGG12nFKxlYjGpgKipjHQ7EcCQkIdgFCmgXNPmogsH4gOIhTNIqmiZcrrawkzyNIDF1ExM14+8h2lDtbG8hitKcHRITVP13k5jeSqH+nDCKTRWx150RsB/pwQMKsm9IV2rzKwpdF2n3CWPTtpHeH4vn5+9ZngLVpiUU+tIV1F2HRHRlXa73oRF8vxik/09EeZ98U67CfcYlJbNMNOtbCi2lmAEogP8WvSZLNFjVYD6/HzI3C83sQ+tTkjNJmKeUMgbK4r1T8SHtZRCdDwNNeO1jYkGDe42a5mjeGEvqA1FXsLXaLoeUiFY+cf4ECvZz1dEFr3WNQ089nOChMwpZfnZHKaMOQxrJwvLeSsUcGmp7+b9a+DeD2hOFvmEPo5dWPhT+iu5Y2npj4M7YFranhP/APIKuEh5ZCRwQAAAAASUVORK5CYII='); + + + background-repeat: no-repeat; + background-size: contain; +} +.navbar-img-plus { + position: absolute; + margin-top: 14rpx; + left: 92rpx; + width: 168rpx; + height: 32rpx; + display: flex; + filter: drop-shadow(0 0rpx 5rpx rgba(0,0,0,0.3)); + align-items: center; + justify-content: center; + background-image:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVMAAABBCAMAAABb/LdiAAAAM1BMVEUAAAD///////////////////////////////////////////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z38+0/HXzYOpLaCzr/JJcjynceD/Rg26FZgXJXKgk6n16/mzT3KYUfgMiLs6L5j6d2gAAAABJRU5ErkJggg=='); + overflow: visible; + background-repeat: no-repeat; + background-size: contain; +} + +.navbar-img { + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + width: 100%; + height: 32px; + border-radius: 16px; + position: relative; + +} diff --git a/eaterplanet_ecommerce/components/new-auth/index.js b/eaterplanet_ecommerce/components/new-auth/index.js new file mode 100644 index 0000000..b963394 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-auth/index.js @@ -0,0 +1,210 @@ +var util = require('../../utils/util.js'); +var location = require('../../utils/Location.js'); + +var app = getApp(); +const defaultAvatarUrl = 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0' +const defaultAvatarUrl2 = 'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132' + +Component({ + properties: { + needAuth: { + type: Boolean, + value: false + }, + needPosition: { + type: Boolean, + value: true + }, + navBackUrl: { + type: String, + value: '', + observer: function (t) { + if (t) app.globalData.navBackUrl = t; + } + }, + nickName: { + type: String, + value: '', + } + }, + attached: function () { + this.setData({ + skin: getApp().globalData.skin, + }) + this.getBg(); + }, + data: { + nickname: '微信用户', + avatarUrl: defaultAvatarUrl2, + image_o: '', + btnLoading: false, + loginSuccess: false, + canIUse: wx.canIUse('button.open-type.getUserInfo') + }, + methods: { + onChooseAvatar(e) { + this.setData({ + avatarUrl: e.detail.avatarUrl + }) + }, + getBg: function () { + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_newauth_bg' + }, + dataType: 'json', + success: function (res) { + that.setData({ + loaded: true + }) + if (res.data.code == 0) { + let { + newauth_bg_image, + newauth_confirm_image, + newauth_cancel_image + } = res.data.data; + that.setData({ + newauth_bg_image, + newauth_confirm_image, + newauth_cancel_image + }) + } + } + }) + }, + close: function () { + this.triggerEvent("cancel"); + }, + bindGetUserInfo: function (t) { + var that = this; + if (!this.data.btnLoading) { + var n = t.detail; + if (this.setData({ + btnLoading: true + }), "getUserInfo:ok" === n.errMsg) { + util.login_prosime(that.data.needPosition).then(function () { + console.log("授权成功") + that.setData({ + btnLoading: false + }); + wx.showToast({ + title: '登录成功', + icon: 'success', + duration: 2000 + }) + that.triggerEvent("authSuccess"); + app.globalData.changedCommunity = true; + //检查获取位置权限 + that.data.needPosition && location.getGps(); + }).catch(function () { + that.triggerEvent("cancel"); + console.log('授权失败'); + }) + } else { + wx.showToast({ + title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。", + icon: "none" + }); + this.triggerEvent("cancel"); + this.setData({ + btnLoading: false + }); + } + } + }, + getProfile: function () { + wx.removeStorageSync('token'); + var that = this; + if (!that.data.btnLoading) { + wx.getUserProfile({ + desc: "获取你的昵称、头像、地区及性别", + success: function (msg) { + var userInfo = msg.userInfo + wx.setStorage({ + key: "userInfo", + data: userInfo + }) + that.setData({ + btnLoading: true, + }); + util.login_promise(that.data.needPosition, userInfo).then(res => { + userInfo.nickName = that.data.nickname + userInfo.avatarUrl = that.data.avatarUrl + var member_info = wx.getStorageSync('member_info'); + if (member_info!==null) { + member_info.username = that.data.nickname + member_info.avatar = that.data.avatarUrl + } + wx.showToast({ + title: '登录成功', + icon: 'success', + duration: 2000 + }) + console.log("查询用户数据", that) + that.triggerEvent("authSuccess", res); + console.log("授权成功") + app.globalData.changedCommunity = true; + //检查获取位置权限 + that.data.needPosition && location.getGps(); + }).catch(function () { + that.triggerEvent("cancel"); + console.log('授权失败'); + }) + }, + fail: () => { + wx.showToast({ + title: "授权失败,为了完整体验,获取更多优惠活动,需要您的授权。", + icon: "none" + }); + that.triggerEvent("cancel"); + that.setData({ + btnLoading: false + }); + } + }); + } + }, + + checkWxLogin: function () { + return new Promise((resolve, reject) => { + wx.getSetting({ + success(res) { + if (!res.authSetting['scope.userInfo']) { + return reject({ + authSetting: false + }); + } else { + wx.getStorage({ + key: 'token', + success(token) { + util.check_login_new().then(isLogin => { + if (isLogin) { + // 已登录未过期 + return resolve(false); + console.log('已登录未过期') + } else { + console.log('过期') + if (token) { + return resolve(token); + } else { + return reject(res); + } + } + }) + }, + fail(res) { + return reject(res); + } + }) + } + }, + fail(res) { + return reject(res); + } + }) + }) + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-auth/index.json b/eaterplanet_ecommerce/components/new-auth/index.json new file mode 100644 index 0000000..7b873d8 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-auth/index.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-modal": "../modal/index", + "i-button": "../button/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-auth/index.wxml b/eaterplanet_ecommerce/components/new-auth/index.wxml new file mode 100644 index 0000000..a907586 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-auth/index.wxml @@ -0,0 +1,18 @@ + + + + + + + + 暂不登录 + + + + 请升级微信版本 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-auth/index.wxss b/eaterplanet_ecommerce/components/new-auth/index.wxss new file mode 100644 index 0000000..f39b2a8 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-auth/index.wxss @@ -0,0 +1,93 @@ +.auth-content { + width: 400rpx; + min-height: 200rpx; + max-height: 500rpx; + border-radius: 24rpx; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-end; +} + +.auth-content .bg { + width: 400rpx; + margin-top: -100rpx; +} + +.auth-content .h1 { + color: #000; + font-size: 32rpx; + margin-bottom: 20rpx; + font-weight: bold; +} + +.auth-content .h2 { + font-size: 24rpx; + line-height: 36rpx; + color: #999; + width: 408rpx; + margin-bottom: 44rpx; +} + +.auth-content .h2 { + text-align: center; + display: block; +} + +.auth-content .btn { + position: absolute; + left: 0; + right: 0; + bottom: -200rpx; + + align-items: center; + justify-content: center; + font-size: 28rpx; +} + +.auth-content .btn .close-btn { + color: #fff; + border: 1rpx solid #fff; + border-radius: 36rpx; + margin: 0 15rpx; + text-align: center; + height: 64rpx; + line-height: 64rpx; +} + +.auth-content .btn .close-img { + margin: 0 15rpx; +} + +.auth-content .btn .img { + width: 180rpx; +} + +.auth-content .confirm { + height: 64rpx; + line-height: 64rpx; + font-size: 29rpx; + background: #fff; + border-radius: 36rpx; + margin: 20rpx 15rpx; +} + +.auth-content .confirm-img { + width: 180rpx; + height: 64rpx; + line-height: 64rpx; + margin: 0 15rpx; + padding: 0; +} + +.updateWx { + width: 425rpx; + height: 64rpx; + line-height: 64rpx; + color: #fff; + background: #4facfe; + border-radius: 36rpx; + margin: 0 0 30rpx; + text-align: center; +} diff --git a/eaterplanet_ecommerce/components/new-comer/index.js b/eaterplanet_ecommerce/components/new-comer/index.js new file mode 100644 index 0000000..5bd7abb --- /dev/null +++ b/eaterplanet_ecommerce/components/new-comer/index.js @@ -0,0 +1,94 @@ +// eaterplanet_ecommerce/components/new-comer/index.js +var app = getApp(); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + refresh: { + type: Boolean, + value: false, + observer: function (t) { + let that = this; + if (t) this.setData({ pageNum: 1, noMore: false, list: [] }, () => { that.getData() }) + } + }, + skin: { + type: Object + }, + diyData: { + type: Object + }, + }, + + /** + * 组件的初始数据 + */ + data: { + disabled: false, + list: [], + pageNum: 1, + noMore: false + }, + + /** + * 组件的方法列表 + */ + methods: { + getData: function() { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.load_new_buy_goodslist', + token: token, + pageNum: that.data.pageNum, + head_id: cur_community.communityId + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let oldList = that.data.list; + let list = oldList.concat(res.data.list); + that.setData({ list }) + } else { + that.setData({ noMore: true }) + } + } + }) + }, + getMore: function(){ + if(this.data.noMore) return; + let that = this; + let pageNum = that.data.pageNum+1; + console.log(pageNum) + this.setData({ pageNum }, + ()=>{ + that.getData(); + }) + }, + openSku: function (e) { + let idx = e.currentTarget.dataset.idx; + this.setData({ disabled: false }) + let spuItem = this.data.list[idx]; + this.triggerEvent("openSku", { + actId: spuItem.actId, + skuList: spuItem.skuList, + promotionDTO: spuItem.promotionDTO || '', + is_take_vipcard: spuItem.is_take_vipcard, + is_mb_level_buy: spuItem.is_mb_level_buy, + allData: { + spuName: spuItem.spuName, + skuImage: spuItem.skuImage, + actPrice: spuItem.actPrice, + canBuyNum: spuItem.spuCanBuyNum, + stock: spuItem.spuCanBuyNum, + marketPrice: spuItem.marketPrice + } + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/new-comer/index.json b/eaterplanet_ecommerce/components/new-comer/index.json new file mode 100644 index 0000000..af994ed --- /dev/null +++ b/eaterplanet_ecommerce/components/new-comer/index.json @@ -0,0 +1,9 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../img/index", + "i-button": "../button/index", + "i-router-link": "../router-link/router-link", + "i-addcart": "../addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-comer/index.wxml b/eaterplanet_ecommerce/components/new-comer/index.wxml new file mode 100644 index 0000000..0411b9c --- /dev/null +++ b/eaterplanet_ecommerce/components/new-comer/index.wxml @@ -0,0 +1,38 @@ + + + + + + + + {{diyData.list[0].title}} + + + + + 新人专享 + + + + + + + + {{item.label_info.tagcontent}} + + + 已抢光 + {{item.spuName}} + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/components/new-comer/index.wxss b/eaterplanet_ecommerce/components/new-comer/index.wxss new file mode 100644 index 0000000..fb060fc --- /dev/null +++ b/eaterplanet_ecommerce/components/new-comer/index.wxss @@ -0,0 +1,194 @@ +/* 新人专享 */ +.new-comers { + position: relative; + padding: 20rpx 0; + margin: 20rpx; + background: #fff; + border-radius: 10rpx; + overflow: hidden; + z-index: 0; +} + +.new-comers-title { + position: relative; + margin-bottom: 20rpx; + font-size: 30rpx; + font-weight: bold; + color: #333; + padding-left: 20rpx; +} + +.leftBorder { + position: absolute; + left: 0; + top: 0; + bottom: 0; + border-left: 8rpx solid #4facfe; +} + +.new-comers-scroll { + max-height: 340rpx; +} + +.new-comers-wrap { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: nowrap; +} + +.new-comers-item { + width: 240rpx; + box-sizing: border-box; + padding: 20rpx; + font-size: 28rpx; +} + +.new-comers-item .new-img { + width: 200rpx; + height: 180rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.new-comers-item .add-cart { + width: 44rpx; + height: 44rpx; + padding: 0; + margin: 0; +} + +.new-comers-item .add-cart .img { + width: 44rpx; + height: 44rpx; + display: block; +} + +.new-comers-item .price { + color: #ff758c; +} + +.new-comers-item { + position: relative; +} + +.new-comers-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +/* 标签 */ +.new-comers-item .item-tag { + position: absolute; + left: 20rpx; + top: 20rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.new-comers-item .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.new-comers-item .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.onlyThree .new-comers-item { + width: 236rpx!important; +} + +.onlyThree .new-comers-item .new-img { + width: 196rpx!important; + height: 196rpx!important; +} + +/* diy */ +.diylist-theme-bg { + position: absolute; + left: 0; + right: 0; + top: 0; + height: 160rpx; +} + +.diylist-theme-red { + background: linear-gradient(180deg, #FFD8D8, transparent); +} + +.diylist-theme-blue { + background: linear-gradient(180deg, #D7FAFF, transparent); +} + +.diylist-theme-yellow { + background: linear-gradient(180deg, #FFF4E0, transparent); +} + +.diylist-theme-violet { + background: linear-gradient(180deg, #F9E5FF, transparent); +} + +.diylist-head { + position: relative; + line-height: 30rpx; + height: 30rpx; + padding: 30rpx 20rpx 10rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.diylist-s1-lefticon { + width: 125rpx; + height: 30rpx; + flex-shrink: 0; + margin-right: 20rpx; +} + +.diylist-s1-name { + color: #909399; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + flex: 1; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-rush-spu/index.js b/eaterplanet_ecommerce/components/new-rush-spu/index.js new file mode 100644 index 0000000..14a267c --- /dev/null +++ b/eaterplanet_ecommerce/components/new-rush-spu/index.js @@ -0,0 +1,5 @@ +var goodsBehavior = require('../behavior/goods.js'); + +Component({ + behaviors: [goodsBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-rush-spu/index.json b/eaterplanet_ecommerce/components/new-rush-spu/index.json new file mode 100644 index 0000000..8c65565 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-rush-spu/index.json @@ -0,0 +1,12 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../button/index", + "i-img": "../img/index", + "i-sku": "../sku/index", + "i-router-link": "../router-link/router-link", + "i-input-number": "../input-number/index", + "i-vip-price": "../vipPrice/vipPrice", + "i-addcart": "../addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-rush-spu/index.wxml b/eaterplanet_ecommerce/components/new-rush-spu/index.wxml new file mode 100644 index 0000000..d33af50 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-rush-spu/index.wxml @@ -0,0 +1,65 @@ + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/new-rush-spu/index.wxss b/eaterplanet_ecommerce/components/new-rush-spu/index.wxss new file mode 100644 index 0000000..c25b0c6 --- /dev/null +++ b/eaterplanet_ecommerce/components/new-rush-spu/index.wxss @@ -0,0 +1,364 @@ +.i-btn { + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + white-space: nowrap; + user-select: none; + font-size: 28rpx; + border: 0 !important; + position: relative; + text-decoration: none; + height: 88rpx; + line-height: 88rpx; + background: none; + color: #495060; + border-radius: 0; + margin: 0; + box-shadow: none; +} + +.i-btn::after { + border: none; +} + +.spu { + width: 100%; + display: block; +} + +.spu .img-class { + width: 285rpx; + height: 285rpx; + box-shadow:inset 0 0 10rpx rgba(0,0,0,0.1); + border-radius: 20rpx 0rpx 0rpx 20rpx; +} + +.spu .mask { + background: rgba(255,255,255,0.5); + width: 285rpx; + height: 285rpx; + position: absolute; + left: 0rpx; + top: 0rpx; + border-radius: 20rpx 0rpx 0rpx 20rpx; +} + +.spu .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.6); + color: #fff; + font-size: 30rpx; + text-align: center; + line-height: 60rpx; + left: 142rpx; + top: 122rpx; + padding: 0 30rpx; + transform: translateX(-50%); +} + +.spu .act-end.act-out { + left: 140rpx; +} + +.spu .spu-content { + background:linear-gradient(100deg, #cbebfd 0%, #cbebfd 1%, #e5e8eb 100%); + width: 710rpx; + border-radius: 20rpx; + overflow: hidden; + position: relative; + box-shadow: -10rpx -10rpx 30rpx 5rpx #ffffff,10rpx 10rpx 20rpx 0rpx #4571a1a1; + margin: 0 auto 20rpx; + display: flex; + + box-sizing: border-box; +} + +.spu .spu-content.disabled { + opacity: 0.6; +} + +.spu .spu-content .item-left { + width: 285rpx; + height: 285rpx; + position: relative; + border-radius: 20rpx 20rpx 20rpx 20rpx; +} + +.spu .spu-content .item-right { + box-sizing: border-box; + + padding: 20rpx 20rpx 20rpx 20rpx; + display: flex; + flex-direction: column; + justify-content: space-between; + box-shadow: -12rpx 0rpx 10rpx -10rpx rgba(27, 27, 27, 0.39); +} + +.spu .spu-content .item-right .spu-title { + color: #222; + font-size: 30rpx; + height: 32rpx; + width: 400rpx; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: bold; + position: relative; +} + +.spu .spu-content .item-right .spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin: 0; +} + +.spu .spu-content .item-right .spu-tag { + padding-left: 196rpx; + margin-bottom: 6rpx; + display: flex; + height: 28rpx; +} + +.spu .spu-content .item-right .spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + width: 400rpx; + height: 26rpx; + margin-bottom: 5rpx; +} + +.spu .spu-content .item-right .spu-desc .em { + font-size: 20rpx; + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .item-right .spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; +} + +.spu .spu-content .item-right .spu-price .sale-price { + font-family: 'DIN'; + color: #ff758c; + margin-right: 14rpx; + font-weight: bold; +} + +.spu .spu-content .item-right .spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + +} + +.spu .spu-content .item-right .spu-price .market-price { + font-family: DIN; + font-size: 30rpx; + text-decoration: line-through; + color: #999; + margin-right: 30rpx; +} + +.spu .spu-content .item-right .spu-count { + font-size: 22rpx; + height: 22rpx; + color: #999; + margin-bottom: 16rpx; +} + +.spu .spu-content .item-right .spu-count .spu-count-border { + display: inline-block; + border: 1rpx solid #42ADD5; + border-radius: 20rpx; + overflow: hidden; + height: 30rpx; + line-height: 32rpx; +} + +.spu .spu-content .item-right .spu-count .spu-count-border .txt { + padding: 0 15rpx; + color: #007FAF; + height: 32rpx; + line-height: 32rpx; +} + +.spu .spu-content .item-right .spu-count .spu-count-border .spu-count-num { + background-color: #42ADD5; + color: #fff; +} + +.spu .spu-content .add-cart { + width: 68rpx; + height: 68rpx; + padding: 0; + margin: 0; + position: absolute; + right: 28rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.spu .spu-content .add-cart .img { + width: 54rpx; + height: 54rpx; + display: block; +} + +.spu .spu-content .spu-active { + position: absolute; + left: 0; + bottom: 0; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu .spu-content .spu-active .tag { + background: linear-gradient(to right,#4facfe,#00f2fe); + border-radius: 0 14rpx 14rpx 0; + padding: 0 12rpx; + height: 30rpx; + font-size: 22rpx; + line-height: 30rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +/* 标签 */ + +.spu .item-tag { + position: absolute; + left: 10rpx; + top: 0; + width: 70rpx; + height: 70rpx; + z-index: 1; + color: #fff; + text-align: center; + filter: drop-shadow(5rpx 5rpx 10rpx rgba(23, 81, 129, 0.5)); +} + +.item-tag-bg { + position: absolute; + left: 8rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu .item-tag .tag-name { + position: relative; + font-size: 20rpx; + line-height: 1; + z-index: 1; +} + +.spu .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.spu .index-input-number { + position: absolute; + right: 20rpx; + bottom: 0rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view { + width: 80rpx; + height: 80rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view .img{ + width: 40rpx; + height: 40rpx; +} + +.spu .index-input-number .i-input-number-minus { + justify-content: flex-end; +} + +.spu .index-input-number .i-input-number-plus { + justify-content: flex-start; +} + +.spu .index-input-number .input-number-text { + height: 88rpx; + line-height: 88rpx; + font-size: 24rpx; + color: #333; + width: 58rpx; +} + +.spu-play { + position: absolute; + left: 50%; + top: 50%; + width: 100rpx; + height: 100rpx; + margin-top: -50rpx; + margin-left: -50rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.picktime { + display: flex; + align-items: center; + justify-content: space-between; + font-size: 24rpx; + font-weight: bold; + margin-top: 20rpx; + color: #ed7b3a; + border-top: 0.1rpx solid #e5e5e5; + padding: 20rpx 20rpx 0; + +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order-notify/index.js b/eaterplanet_ecommerce/components/order-notify/index.js new file mode 100644 index 0000000..d34e381 --- /dev/null +++ b/eaterplanet_ecommerce/components/order-notify/index.js @@ -0,0 +1,75 @@ +let app = getApp(); +var ctime = null; + +Component({ + externalClasses: ["i-class"], + properties: { + stopNotify: { + type: Boolean, + value: true, + observer: function(t){ + t ? (clearInterval(ctime), ctime = null) : this._startReq(); + } + } + }, + + /** + * 组件的初始数据 + */ + data: { + userInfo: '', + hide: false, + order_id: 0 + }, + + pageLifetimes: { + hide: function() { + console.log('notify hide') + clearInterval(ctime), ctime = null; + } + }, + + /** + * 组件的方法列表 + */ + methods: { + _startReq: function(){ + var that = this; + ctime = setInterval(function(){ + that.getOrderNotify(); + }, 3000); + }, + getOrderNotify: function (){ + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'goods.notify_order' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let username = res.data.username; + let avatar = res.data.avatar; + let order_id = res.data.order_id; + let userInfo = { username, avatar } + if (that.data.order_id != order_id){ + that.setData({ + hide: false, + userInfo, + order_id + }) + setTimeout(() => { + that.setData({ hide: true }); + }, 5000) + } else { + !that.data.hide && setTimeout(() => { + that.setData({ hide: true }); + }, 5000) + } + } + } + }) + } + } +}) diff --git a/eaterplanet_ecommerce/components/order-notify/index.json b/eaterplanet_ecommerce/components/order-notify/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/order-notify/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order-notify/index.wxml b/eaterplanet_ecommerce/components/order-notify/index.wxml new file mode 100644 index 0000000..f91cf2c --- /dev/null +++ b/eaterplanet_ecommerce/components/order-notify/index.wxml @@ -0,0 +1,4 @@ + + + {{userInfo.username}}刚刚下单啦 + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order-notify/index.wxss b/eaterplanet_ecommerce/components/order-notify/index.wxss new file mode 100644 index 0000000..47c1911 --- /dev/null +++ b/eaterplanet_ecommerce/components/order-notify/index.wxss @@ -0,0 +1,52 @@ +.orderNotify { + background-color: rgba(0,0,0,.6); + color: #fff; + border-radius: 30rpx; + line-height: 60rpx; + padding: 0 20rpx; + display: flex; + align-content: center; + align-items: center; + transform: translateX(-100%); +} + +.orderNotify.ani-in { + animation: aniIn 400ms ease-in forwards; +} + +.orderNotify.ani-out { + animation: aniOut 400ms ease-out forwards; +} + +.orderNotifyAvatar { + width: 40rpx; + height: 40rpx; + border-radius: 50%; + margin-right: 8rpx; +} + +.orderNotifyName { + display: inline-block; + max-width: 200rpx; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +@keyframes aniIn { + from { + transform: translateX(-100%); + } + to { + transform: translateX(0%); + } +} + +@keyframes aniOut { + from { + transform: translateX(0%); + } + to { + transform: translateX(-100%); + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order/orderInfoExpress.js b/eaterplanet_ecommerce/components/order/orderInfoExpress.js new file mode 100644 index 0000000..2869e18 --- /dev/null +++ b/eaterplanet_ecommerce/components/order/orderInfoExpress.js @@ -0,0 +1,74 @@ +Component({ + properties: { + order: { + type: Object, + observer: function (t) { + let real_total = t.order_info.real_total * 1; + var goodsTotal = parseFloat(real_total) - parseFloat(t.order_info.shipping_fare); + let h = {}; + h.goodsTotal = goodsTotal.toFixed(2); + + let shipping_tel = t && t.order_info.shipping_tel || ''; + if(!shipping_tel) shipping_tel = t && t.order_info.ziti_mobile || ''; + if(shipping_tel) { + var pat=/(\d{7})\d*(\d{0})/; + let tel = shipping_tel.replace(pat,'$1****$2'); + h.tel = tel; + } + this.setData(h); + } + }, + showNickname: { + type: Boolean, + default: false + }, + hidePhone: { + type: Number, + default: 0 + }, + groupInfo: { + type: Object, + default: { + group_name: '社区', + owner_name: '团长', + diyshipname: '快递费', + delivery_ziti_name: '社区自提', + delivery_tuanzshipping_name: '团长配送', + delivery_express_name: '快递配送' + } + }, + hideInfo: { + type: Boolean, + default: false + }, + goodsTot: { + type: Number, + default: 0 + }, + goods_sale_unit: String, + presale: { + type: Object, + default: {} + } + }, + data: { + isCalling: false + }, + methods: { + callTelphone: function (t) { + var e = this; + this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({ + phoneNumber: t.currentTarget.dataset.phone, + complete: function () { + e.data.isCalling = false; + } + })); + }, + goExpress: function(){ + let order_id = this.data.order.order_info.order_id; + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/order/goods_express?id=' + order_id, + }) + } + } +}); diff --git a/eaterplanet_ecommerce/components/order/orderInfoExpress.json b/eaterplanet_ecommerce/components/order/orderInfoExpress.json new file mode 100644 index 0000000..2000c46 --- /dev/null +++ b/eaterplanet_ecommerce/components/order/orderInfoExpress.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-card": "../card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order/orderInfoExpress.wxml b/eaterplanet_ecommerce/components/order/orderInfoExpress.wxml new file mode 100644 index 0000000..3df97c0 --- /dev/null +++ b/eaterplanet_ecommerce/components/order/orderInfoExpress.wxml @@ -0,0 +1,85 @@ + + + 收货信息 + + + + + 收货人 + {{order.order_info.shipping_name}} {{hideInfo?tel:order.order_info.shipping_tel}} + + + {{order.order_info.order_note_name}} + {{order.order_info.note_content}} + + + 昵称 + {{order.order_info.name}} + + + 收货地址 + {{order.shipping_province.name}}{{order.shipping_city.name}}{{order.shipping_country.name}}{{hideInfo?'***':order.order_info.shipping_address}} + + + 收货地址 + {{order.shipping_province.name}}{{order.shipping_city.name}}{{order.shipping_country.name}}{{hideInfo?'***':order.order_info.shipping_address}} + + + 收货地址 + {{hideInfo?'***':order.order_info.tuan_send_address}} + + + + 配送方式 + {{groupInfo.delivery_express_name}}({{order.order_info.dispatchname}}) + + 查看物流 + + + + + 快递单号 + {{order.order_info.shipping_no}} + + + {{groupInfo.delivery_express_name}} + {{presale.presale_sendorder_date}}开始发货 + + + + 配送方式 + 同城配送 + + + 配送方式 + {{groupInfo.delivery_tuanzshipping_name}} + + + 预计送达时间 + {{order.order_info.expected_delivery_time}} + + + {{groupInfo.owner_name}}信息 + + {{order.order_info.ziti_name}} + + + 联系{{groupInfo.owner_name}} + + + + + + + + 共{{order.goods_count}}{{goods_sale_unit}}商品 实付: + + ¥{{order.order_info.shipping_fare}} + {{order.order_info.score}}积分 + + + + 共{{order.goods_count}}{{goods_sale_unit}}商品 小计: + {{goodsTot>0 ? goodsTot : goodsTotal}} + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/order/orderInfoExpress.wxss b/eaterplanet_ecommerce/components/order/orderInfoExpress.wxss new file mode 100644 index 0000000..76f9409 --- /dev/null +++ b/eaterplanet_ecommerce/components/order/orderInfoExpress.wxss @@ -0,0 +1,64 @@ +.header { + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + font-weight: 500; +} + +.content-wrap { + border-top: 0.1rpx solid #efefef; + padding-bottom: 20rpx; +} + +.content-wrap .item { + display: flex; + justify-content: space-between; + align-items: center; + font-size: 24rpx; + padding: 16rpx 30rpx 0; +} + +.content-wrap .item .title { + word-break: keep-all; + color: #aaa; +} + +.content-wrap .item .detail { + color: #444; + text-align: right; + display: flex; + align-items: center; +} + +.content-wrap .item .detail .phone { + margin-left: 20rpx; + padding: 0 20rpx; + height: 44rpx; + display: flex; + align-items: center; + border: 0.1rpx solid #efefef; + border-radius: 26rpx; +} + +.content-wrap .item .detail .phone .icon-phone { + width: 20rpx; + height: 20rpx; + margin-right: 10rpx; +} + +.footer { + border-top: 0.1rpx solid #efefef; + padding: 32rpx; + display: flex; + justify-content: flex-end; + align-items: center; + font-size: 30rpx; + font-weight: 500; +} + +.footer .money { + font-family: DIN; + color: #ff758c; + font-size: 40rpx; + font-weight: bold; +} diff --git a/eaterplanet_ecommerce/components/orderComment/index.js b/eaterplanet_ecommerce/components/orderComment/index.js new file mode 100644 index 0000000..b17f97a --- /dev/null +++ b/eaterplanet_ecommerce/components/orderComment/index.js @@ -0,0 +1,10 @@ +Component({ + /** + * 组件的属性列表 + */ + properties: { + comment: { + type: String + } + } +}) diff --git a/eaterplanet_ecommerce/components/orderComment/index.json b/eaterplanet_ecommerce/components/orderComment/index.json new file mode 100644 index 0000000..2000c46 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderComment/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-card": "../card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/orderComment/index.wxml b/eaterplanet_ecommerce/components/orderComment/index.wxml new file mode 100644 index 0000000..2245849 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderComment/index.wxml @@ -0,0 +1,10 @@ + + + + 订单备注 + + + {{comment}} + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/orderComment/index.wxss b/eaterplanet_ecommerce/components/orderComment/index.wxss new file mode 100644 index 0000000..322c85d --- /dev/null +++ b/eaterplanet_ecommerce/components/orderComment/index.wxss @@ -0,0 +1,17 @@ +.comment-card { + margin: 0 auto 20rpx; +} + +.comment-card .header { + padding:20rpx 30rpx; + color:#444; + font-size:28rpx; + font-weight:500; +} + +.comment-card .content-wrap { + padding: 16rpx 30rpx; + font-size: 26rpx; + color: #444; + border-top:0.1rpx solid #efefef; +} diff --git a/eaterplanet_ecommerce/components/orderInfo/index.js b/eaterplanet_ecommerce/components/orderInfo/index.js new file mode 100644 index 0000000..cb947c9 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderInfo/index.js @@ -0,0 +1,92 @@ +// eaterplanet_ecommerce/components/orderInfo/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + orderInfo: { + type: Object, + observer: function (t) { + let real_total = t.real_total * 1; + var goodsTotal = parseFloat(real_total) - parseFloat(t.shipping_fare); + + let disAmount = parseFloat(t.voucher_credit) + parseFloat(t.fullreduction_money); + disAmount = (disAmount > goodsTotal) ? goodsTotal : disAmount; + + let diyshipname = ''; + let groupInfo = this.data.groupInfo; + if(t.delivery=='express') { + diyshipname = groupInfo.placeorder_trans_name; + } else { + diyshipname = groupInfo.placeorder_tuan_name; + } + + let changePrice = 0; + if(t.is_change_price==1) { + changePrice = Math.abs(t.admin_change_price); + } + + this.setData({ + goodsTotal: goodsTotal.toFixed(2), + disAmount: disAmount.toFixed(2), + diyshipname, + changePrice: changePrice.toFixed(2) + }); + } + }, + order_goods_list: { + type: Array, + observer: function (t) { + let levelAmount = 0; + let is_vipcard_buy = 0; + let is_level_buy = 0; + if(t&&t.length) { + t.forEach(function(item){ + let total = item.total * 1; + let old_total = item.old_total * 1; + if (item.is_level_buy==1 || item.is_vipcard_buy==1) { + levelAmount += old_total - total; + is_vipcard_buy = item.is_vipcard_buy; + is_level_buy = item.is_level_buy; + } + }) + } + this.setData({ + levelAmount: levelAmount.toFixed(2), + is_level_buy, + is_vipcard_buy + }); + } + }, + ordername: { + type: String, + value: "订单" + }, + groupInfo: { + type: Object, + value: { + group_name: '社区', + owner_name: '团长', + delivery_ziti_name: '社区自提', + delivery_tuanzshipping_name: '团长配送', + delivery_express_name: '快递配送', + placeorder_trans_name: '配送费', + placeorder_tuan_name: '配送费', + localtown_modifypickingname: '包装费' + } + }, + goodsTot: { + type: Number, + default: 0 + } + }, + + /** + * 组件的初始数据 + */ + data: { + disAmount: 0, + goodsTotal: 0, + changePrice: 0 + } +}) diff --git a/eaterplanet_ecommerce/components/orderInfo/index.json b/eaterplanet_ecommerce/components/orderInfo/index.json new file mode 100644 index 0000000..2000c46 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderInfo/index.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-card": "../card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/orderInfo/index.wxml b/eaterplanet_ecommerce/components/orderInfo/index.wxml new file mode 100644 index 0000000..f026b94 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderInfo/index.wxml @@ -0,0 +1,134 @@ + +var getPrice = function(a, b) { + b = b?b:0; + var c = a*1+b*1; + return c.toFixed(2); +} +module.exports.getPrice = getPrice; + + + + + {{ordername}}信息 + + + + + {{ordername}}编号 + {{orderInfo.order_num_alias}} + + + 下单时间 + + {{orderInfo.date_added}} + + + + 支付时间 + + {{orderInfo.pay_date}} + + + + 送达时间 + + {{orderInfo.express_tuanz_date}} + + + + 收货时间 + + {{orderInfo.receive_date}} + + + + + 同城配送费 + + + {{groupInfo.placeorder_trans_name}} + {{diyshipname}} + + + + ¥{{orderInfo.shipping_fare}} + + + + + + 满金额免{{diyshipname}} + + - ¥{{orderInfo.fare_shipping_free}} + + + + + 积分抵扣 + + - ¥{{orderInfo.score_for_money}} + + + + 会员优惠 + + - ¥{{m1.getPrice(levelAmount, orderInfo.admin_change_price)}} + + + + 等级折扣 + + - ¥{{m1.getPrice(levelAmount, orderInfo.admin_change_price)}} + + + + 优惠券 + + - ¥{{orderInfo.voucher_credit}} + + + + 满减 + + - ¥{{orderInfo.fullreduction_money}} + + + + {{groupInfo.localtown_modifypickingname}} + + ¥{{orderInfo.packing_fare}} + + + 加价配送费 + + ¥{{orderInfo.localtown_add_shipping_fare}} + + + 商家改价 + {{orderInfo.total>orderInfo.old_price?'+':'-'}} ¥{{changePrice}} + + + 商品金额 + + + ¥{{goodsTotal}}积分 + + + + + + + 实付: + + ¥{{orderInfo.shipping_fare}} + {{orderInfo.score}}积分 + + + + 合计: + + ¥{{orderInfo.total}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/orderInfo/index.wxss b/eaterplanet_ecommerce/components/orderInfo/index.wxss new file mode 100644 index 0000000..8006ca8 --- /dev/null +++ b/eaterplanet_ecommerce/components/orderInfo/index.wxss @@ -0,0 +1,43 @@ +.header { + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + font-weight: 500; +} + +.content-wrap { + border-top: 0.1rpx solid #efefef; + padding-bottom: 20rpx; +} + +.content-wrap .item { + display: flex; + justify-content: space-between; + font-size: 26rpx; + padding: 16rpx 30rpx; + padding-bottom: 0; +} + +.content-wrap .item .title { + color: #aaa; +} + +.content-wrap .item .detail { + color: #444; +} + +.footer { + border-top: 0.1rpx solid #efefef; + padding: 32rpx; + display: flex; + justify-content: flex-end; + align-items: center; + font-size: 28rpx; +} + +.footer .money { + font-family: DIN; + color: #ff758c; + font-weight: bold; + font-size: 40rpx; +} diff --git a/eaterplanet_ecommerce/components/painter/lib/calc.js b/eaterplanet_ecommerce/components/painter/lib/calc.js new file mode 100644 index 0000000..e6788de --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/calc.js @@ -0,0 +1,54 @@ +/* eslint-disable */ +// 四则运算 + +!(function () { + var calculate = function (s) { + s = s.trim(); + const stack = new Array(); + let preSign = '+'; + let numStr = ''; + const n = s.length; + for (let i = 0; i < n; ++i) { + if (s[i] === '.' || (!isNaN(Number(s[i])) && s[i] !== ' ')) { + numStr += s[i]; + } else if (s[i] === '(') { + let isClose = 1; + let j = i; + while (isClose > 0) { + j += 1; + if (s[j] === '(') isClose += 1; + if (s[j] === ')') isClose -= 1; + } + numStr = `${calculate(s.slice(i + 1, j))}`; + i = j; + } + if ((isNaN(Number(s[i])) && s[i] !== '.') || i === n - 1) { + let num = parseFloat(numStr); + switch (preSign) { + case '+': + stack.push(num); + break; + case '-': + stack.push(-num); + break; + case '*': + stack.push(stack.pop() * num); + break; + case '/': + stack.push(stack.pop() / num); + break; + default: + break; + } + preSign = s[i]; + numStr = ''; + } + } + let ans = 0; + while (stack.length) { + ans += stack.pop(); + } + return ans; + }; + module.exports = calculate; +})(); diff --git a/eaterplanet_ecommerce/components/painter/lib/downloader.js b/eaterplanet_ecommerce/components/painter/lib/downloader.js new file mode 100644 index 0000000..73a894e --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/downloader.js @@ -0,0 +1,363 @@ +/** + * LRU 文件存储,使用该 downloader 可以让下载的文件存储在本地,下次进入小程序后可以直接使用 + * 详细设计文档可查看 https://juejin.im/post/5b42d3ede51d4519277b6ce3 + */ +const util = require('./util'); +const sha1 = require('./sha1'); + +const SAVED_FILES_KEY = 'savedFiles'; +const KEY_TOTAL_SIZE = 'totalSize'; +const KEY_PATH = 'path'; +const KEY_TIME = 'time'; +const KEY_SIZE = 'size'; + +// 可存储总共为 6M,目前小程序可允许的最大本地存储为 10M +let MAX_SPACE_IN_B = 6 * 1024 * 1024; +let savedFiles = {}; + +export default class Dowloader { + constructor() { + // app 如果设置了最大存储空间,则使用 app 中的 + if (getApp().PAINTER_MAX_LRU_SPACE) { + MAX_SPACE_IN_B = getApp().PAINTER_MAX_LRU_SPACE; + } + wx.getStorage({ + key: SAVED_FILES_KEY, + success: function (res) { + if (res.data) { + savedFiles = res.data; + } + }, + }); + } + + /** + * 下载文件,会用 lru 方式来缓存文件到本地 + * @param {String} url 文件的 url + */ + download(url, lru) { + return new Promise((resolve, reject) => { + if (!(url && util.isValidUrl(url))) { + resolve(url); + return; + } + const fileName = getFileName(url); + if (!lru) { + // 无 lru 情况下直接判断 临时文件是否存在,不存在重新下载 + wx.getFileInfo({ + filePath: fileName, + success: () => { + resolve(url); + }, + fail: () => { + if (util.isOnlineUrl(url)) { + downloadFile(url, lru).then((path) => { + resolve(path); + }, () => { + reject(); + }); + } else if (util.isDataUrl(url)) { + transformBase64File(url, lru).then(path => { + resolve(path); + }, () => { + reject(); + }); + } + }, + }) + return + } + + const file = getFile(fileName); + + if (file) { + if (file[KEY_PATH].indexOf('//usr/') !== -1) { + wx.getFileInfo({ + filePath: file[KEY_PATH], + success() { + resolve(file[KEY_PATH]); + }, + fail(error) { + console.error(`base64 file broken, ${JSON.stringify(error)}`); + transformBase64File(url, lru).then(path => { + resolve(path); + }, () => { + reject(); + }); + } + }) + } else { + // 检查文件是否正常,不正常需要重新下载 + wx.getSavedFileInfo({ + filePath: file[KEY_PATH], + success: (res) => { + resolve(file[KEY_PATH]); + }, + fail: (error) => { + console.error(`the file is broken, redownload it, ${JSON.stringify(error)}`); + downloadFile(url, lru).then((path) => { + resolve(path); + }, () => { + reject(); + }); + }, + }); + } + } else { + if (util.isOnlineUrl(url)) { + downloadFile(url, lru).then((path) => { + resolve(path); + }, () => { + reject(); + }); + } else if (util.isDataUrl(url)) { + transformBase64File(url, lru).then(path => { + resolve(path); + }, () => { + reject(); + }); + } + } + }); + } +} + +function getFileName(url) { + if (util.isDataUrl(url)) { + const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(url) || []; + const fileName = `${sha1.hex_sha1(bodyData)}.${format}`; + return fileName; + } else { + return url; + } +} + +function transformBase64File(base64data, lru) { + return new Promise((resolve, reject) => { + const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []; + if (!format) { + console.error('base parse failed'); + reject(); + return; + } + const fileName = `${sha1.hex_sha1(bodyData)}.${format}`; + const path = `${wx.env.USER_DATA_PATH}/${fileName}`; + const buffer = wx.base64ToArrayBuffer(bodyData.replace(/[\r\n]/g, "")); + wx.getFileSystemManager().writeFile({ + filePath: path, + data: buffer, + encoding: 'binary', + success() { + wx.getFileInfo({ + filePath: path, + success: (tmpRes) => { + const newFileSize = tmpRes.size; + lru ? doLru(newFileSize).then(() => { + saveFile(fileName, newFileSize, path, true).then((filePath) => { + resolve(filePath); + }); + }, () => { + resolve(path); + }) : resolve(path); + }, + fail: (error) => { + // 文件大小信息获取失败,则此文件也不要进行存储 + console.error(`getFileInfo ${path} failed, ${JSON.stringify(error)}`); + resolve(path); + }, + }); + }, + fail(err) { + console.log(err) + } + }) + }); +} + +function downloadFile(url, lru) { + return new Promise((resolve, reject) => { + const downloader = url.startsWith('cloud://')?wx.cloud.downloadFile:wx.downloadFile + downloader({ + url: url, + fileID: url, + success: function (res) { + if (res.statusCode !== 200) { + console.error(`downloadFile ${url} failed res.statusCode is not 200`); + reject(); + return; + } + const { + tempFilePath + } = res; + wx.getFileInfo({ + filePath: tempFilePath, + success: (tmpRes) => { + const newFileSize = tmpRes.size; + lru ? doLru(newFileSize).then(() => { + saveFile(url, newFileSize, tempFilePath).then((filePath) => { + resolve(filePath); + }); + }, () => { + resolve(tempFilePath); + }) : resolve(tempFilePath); + }, + fail: (error) => { + // 文件大小信息获取失败,则此文件也不要进行存储 + console.error(`getFileInfo ${res.tempFilePath} failed, ${JSON.stringify(error)}`); + resolve(res.tempFilePath); + }, + }); + }, + fail: function (error) { + console.error(`downloadFile failed, ${JSON.stringify(error)} `); + reject(); + }, + }); + }); +} + +function saveFile(key, newFileSize, tempFilePath, isDataUrl = false) { + return new Promise((resolve, reject) => { + if (isDataUrl) { + const totalSize = savedFiles[KEY_TOTAL_SIZE] ? savedFiles[KEY_TOTAL_SIZE] : 0; + savedFiles[key] = {}; + savedFiles[key][KEY_PATH] = tempFilePath; + savedFiles[key][KEY_TIME] = new Date().getTime(); + savedFiles[key][KEY_SIZE] = newFileSize; + savedFiles['totalSize'] = newFileSize + totalSize; + wx.setStorage({ + key: SAVED_FILES_KEY, + data: savedFiles, + }); + resolve(tempFilePath); + return; + } + wx.saveFile({ + tempFilePath: tempFilePath, + success: (fileRes) => { + const totalSize = savedFiles[KEY_TOTAL_SIZE] ? savedFiles[KEY_TOTAL_SIZE] : 0; + savedFiles[key] = {}; + savedFiles[key][KEY_PATH] = fileRes.savedFilePath; + savedFiles[key][KEY_TIME] = new Date().getTime(); + savedFiles[key][KEY_SIZE] = newFileSize; + savedFiles['totalSize'] = newFileSize + totalSize; + wx.setStorage({ + key: SAVED_FILES_KEY, + data: savedFiles, + }); + resolve(fileRes.savedFilePath); + }, + fail: (error) => { + console.error(`saveFile ${key} failed, then we delete all files, ${JSON.stringify(error)}`); + // 由于 saveFile 成功后,res.tempFilePath 处的文件会被移除,所以在存储未成功时,我们还是继续使用临时文件 + resolve(tempFilePath); + // 如果出现错误,就直接情况本地的所有文件,因为你不知道是不是因为哪次lru的某个文件未删除成功 + reset(); + }, + }); + }); +} + +/** + * 清空所有下载相关内容 + */ +function reset() { + wx.removeStorage({ + key: SAVED_FILES_KEY, + success: () => { + wx.getSavedFileList({ + success: (listRes) => { + removeFiles(listRes.fileList); + }, + fail: (getError) => { + console.error(`getSavedFileList failed, ${JSON.stringify(getError)}`); + }, + }); + }, + }); +} + +function doLru(size) { + if (size > MAX_SPACE_IN_B) { + return Promise.reject() + } + return new Promise((resolve, reject) => { + let totalSize = savedFiles[KEY_TOTAL_SIZE] ? savedFiles[KEY_TOTAL_SIZE] : 0; + + if (size + totalSize <= MAX_SPACE_IN_B) { + resolve(); + return; + } + // 如果加上新文件后大小超过最大限制,则进行 lru + const pathsShouldDelete = []; + // 按照最后一次的访问时间,从小到大排序 + const allFiles = JSON.parse(JSON.stringify(savedFiles)); + delete allFiles[KEY_TOTAL_SIZE]; + const sortedKeys = Object.keys(allFiles).sort((a, b) => { + return allFiles[a][KEY_TIME] - allFiles[b][KEY_TIME]; + }); + + for (const sortedKey of sortedKeys) { + totalSize -= savedFiles[sortedKey].size; + pathsShouldDelete.push(savedFiles[sortedKey][KEY_PATH]); + delete savedFiles[sortedKey]; + if (totalSize + size < MAX_SPACE_IN_B) { + break; + } + } + + savedFiles['totalSize'] = totalSize; + + wx.setStorage({ + key: SAVED_FILES_KEY, + data: savedFiles, + success: () => { + // 保证 storage 中不会存在不存在的文件数据 + if (pathsShouldDelete.length > 0) { + removeFiles(pathsShouldDelete); + } + resolve(); + }, + fail: (error) => { + console.error(`doLru setStorage failed, ${JSON.stringify(error)}`); + reject(); + }, + }); + }); +} + +function removeFiles(pathsShouldDelete) { + for (const pathDel of pathsShouldDelete) { + let delPath = pathDel; + if (typeof pathDel === 'object') { + delPath = pathDel.filePath; + } + if (delPath.indexOf('//usr/') !== -1) { + wx.getFileSystemManager().unlink({ + filePath: delPath, + fail(error) { + console.error(`removeSavedFile ${pathDel} failed, ${JSON.stringify(error)}`); + } + }) + } else { + wx.removeSavedFile({ + filePath: delPath, + fail: (error) => { + console.error(`removeSavedFile ${pathDel} failed, ${JSON.stringify(error)}`); + }, + }); + } + } +} + +function getFile(key) { + if (!savedFiles[key]) { + return; + } + savedFiles[key]['time'] = new Date().getTime(); + wx.setStorage({ + key: SAVED_FILES_KEY, + data: savedFiles, + }); + return savedFiles[key]; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/painter/lib/gradient.js b/eaterplanet_ecommerce/components/painter/lib/gradient.js new file mode 100644 index 0000000..13c7258 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/gradient.js @@ -0,0 +1,102 @@ +/* eslint-disable */ +// 当ctx传入当前文件,const grd = ctx.createCircularGradient() 和 +// const grd = this.ctx.createLinearGradient() 无效,因此只能分开处理 +// 先分析,在外部创建grd,再传入使用就可以 + +!(function () { + + var api = { + isGradient: function(bg) { + if (bg && (bg.startsWith('linear') || bg.startsWith('radial'))) { + return true; + } + return false; + }, + + doGradient: function(bg, width, height, ctx) { + if (bg.startsWith('linear')) { + linearEffect(width, height, bg, ctx); + } else if (bg.startsWith('radial')) { + radialEffect(width, height, bg, ctx); + } + }, + } + + function analizeGrad(string) { + const colorPercents = string.substring(0, string.length - 1).split("%,"); + const colors = []; + const percents = []; + for (let colorPercent of colorPercents) { + colors.push(colorPercent.substring(0, colorPercent.lastIndexOf(" ")).trim()); + percents.push(colorPercent.substring(colorPercent.lastIndexOf(" "), colorPercent.length) / 100); + } + return {colors: colors, percents: percents}; + } + + function radialEffect(width, height, bg, ctx) { + const colorPer = analizeGrad(bg.match(/radial-gradient\((.+)\)/)[1]); + const grd = ctx.createRadialGradient(0, 0, 0, 0, 0, width < height ? height / 2 : width / 2); + for (let i = 0; i < colorPer.colors.length; i++) { + grd.addColorStop(colorPer.percents[i], colorPer.colors[i]); + } + ctx.fillStyle = grd; + //ctx.fillRect(-(width / 2), -(height / 2), width, height); + } + + function analizeLinear(bg, width, height) { + const direction = bg.match(/([-]?\d{1,3})deg/); + const dir = direction && direction[1] ? parseFloat(direction[1]) : 0; + let coordinate; + switch (dir) { + case 0: coordinate = [0, -height / 2, 0, height / 2]; break; + case 90: coordinate = [width / 2, 0, -width / 2, 0]; break; + case -90: coordinate = [-width / 2, 0, width / 2, 0]; break; + case 180: coordinate = [0, height / 2, 0, -height / 2]; break; + case -180: coordinate = [0, -height / 2, 0, height / 2]; break; + default: + let x1 = 0; + let y1 = 0; + let x2 = 0; + let y2 = 0; + if (direction[1] > 0 && direction[1] < 90) { + x1 = (width / 2) - ((width / 2) * Math.tan((90 - direction[1]) * Math.PI * 2 / 360) - height / 2) * Math.sin(2 * (90 - direction[1]) * Math.PI * 2 / 360) / 2; + y2 = Math.tan((90 - direction[1]) * Math.PI * 2 / 360) * x1; + x2 = -x1; + y1 = -y2; + } else if (direction[1] > -180 && direction[1] < -90) { + x1 = -(width / 2) + ((width / 2) * Math.tan((90 - direction[1]) * Math.PI * 2 / 360) - height / 2) * Math.sin(2 * (90 - direction[1]) * Math.PI * 2 / 360) / 2; + y2 = Math.tan((90 - direction[1]) * Math.PI * 2 / 360) * x1; + x2 = -x1; + y1 = -y2; + } else if (direction[1] > 90 && direction[1] < 180) { + x1 = (width / 2) + (-(width / 2) * Math.tan((90 - direction[1]) * Math.PI * 2 / 360) - height / 2) * Math.sin(2 * (90 - direction[1]) * Math.PI * 2 / 360) / 2; + y2 = Math.tan((90 - direction[1]) * Math.PI * 2 / 360) * x1; + x2 = -x1; + y1 = -y2; + } else { + x1 = -(width / 2) - (-(width / 2) * Math.tan((90 - direction[1]) * Math.PI * 2 / 360) - height / 2) * Math.sin(2 * (90 - direction[1]) * Math.PI * 2 / 360) / 2; + y2 = Math.tan((90 - direction[1]) * Math.PI * 2 / 360) * x1; + x2 = -x1; + y1 = -y2; + } + coordinate = [x1, y1, x2, y2]; + break; + } + return coordinate; + } + + function linearEffect(width, height, bg, ctx) { + const param = analizeLinear(bg, width, height); + const grd = ctx.createLinearGradient(param[0], param[1], param[2], param[3]); + const content = bg.match(/linear-gradient\((.+)\)/)[1]; + const colorPer = analizeGrad(content.substring(content.indexOf(',') + 1)); + for (let i = 0; i < colorPer.colors.length; i++) { + grd.addColorStop(colorPer.percents[i], colorPer.colors[i]); + } + ctx.fillStyle = grd + //ctx.fillRect(-(width / 2), -(height / 2), width, height); + } + + module.exports = { api } + +})(); diff --git a/eaterplanet_ecommerce/components/painter/lib/pen.js b/eaterplanet_ecommerce/components/painter/lib/pen.js new file mode 100644 index 0000000..d0f099b --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/pen.js @@ -0,0 +1,903 @@ +const QR = require('./qrcode.js'); +const GD = require('./gradient.js'); +require('./string-polyfill.js'); + +export const penCache = { + // 用于存储带 id 的 view 的 rect 信息 + viewRect: {}, + textLines: {}, +}; +export const clearPenCache = id => { + if (id) { + penCache.viewRect[id] = null; + penCache.textLines[id] = null; + } else { + penCache.viewRect = {}; + penCache.textLines = {}; + } +}; +export default class Painter { + constructor(ctx, data) { + this.ctx = ctx; + this.data = data; + } + + paint(callback) { + this.style = { + width: this.data.width.toPx(), + height: this.data.height.toPx(), + }; + + this._background(); + for (const view of this.data.views) { + this._drawAbsolute(view); + } + this.ctx.draw(false, () => { + callback && callback(); + }); + } + + _background() { + this.ctx.save(); + const { width, height } = this.style; + const bg = this.data.background; + this.ctx.translate(width / 2, height / 2); + + this._doClip(this.data.borderRadius, width, height); + if (!bg) { + // 如果未设置背景,则默认使用透明色 + this.ctx.fillStyle = 'transparent'; + this.ctx.fillRect(-(width / 2), -(height / 2), width, height); + } else if (bg.startsWith('#') || bg.startsWith('rgba') || bg.toLowerCase() === 'transparent') { + // 背景填充颜色 + this.ctx.fillStyle = bg; + this.ctx.fillRect(-(width / 2), -(height / 2), width, height); + } else if (GD.api.isGradient(bg)) { + GD.api.doGradient(bg, width, height, this.ctx); + this.ctx.fillRect(-(width / 2), -(height / 2), width, height); + } else { + // 背景填充图片 + this.ctx.drawImage(bg, -(width / 2), -(height / 2), width, height); + } + this.ctx.restore(); + } + + _drawAbsolute(view) { + if (!(view && view.type)) { + // 过滤无效 view + return; + } + // 证明 css 为数组形式,需要合并 + if (view.css && view.css.length) { + /* eslint-disable no-param-reassign */ + view.css = Object.assign(...view.css); + } + switch (view.type) { + case 'image': + this._drawAbsImage(view); + break; + case 'text': + this._fillAbsText(view); + break; + case 'inlineText': + this._fillAbsInlineText(view); + break; + case 'rect': + this._drawAbsRect(view); + break; + case 'qrcode': + this._drawQRCode(view); + break; + default: + break; + } + } + + _border({ borderRadius = 0, width, height, borderWidth = 0, borderStyle = 'solid' }) { + let r1 = 0, + r2 = 0, + r3 = 0, + r4 = 0; + const minSize = Math.min(width, height); + if (borderRadius) { + const border = borderRadius.split(/\s+/); + if (border.length === 4) { + r1 = Math.min(border[0].toPx(false, minSize), width / 2, height / 2); + r2 = Math.min(border[1].toPx(false, minSize), width / 2, height / 2); + r3 = Math.min(border[2].toPx(false, minSize), width / 2, height / 2); + r4 = Math.min(border[3].toPx(false, minSize), width / 2, height / 2); + } else { + r1 = r2 = r3 = r4 = Math.min(borderRadius && borderRadius.toPx(false, minSize), width / 2, height / 2); + } + } + const lineWidth = borderWidth && borderWidth.toPx(false, minSize); + this.ctx.lineWidth = lineWidth; + if (borderStyle === 'dashed') { + this.ctx.setLineDash([(lineWidth * 4) / 3, (lineWidth * 4) / 3]); + // this.ctx.lineDashOffset = 2 * lineWidth + } else if (borderStyle === 'dotted') { + this.ctx.setLineDash([lineWidth, lineWidth]); + } + const notSolid = borderStyle !== 'solid'; + this.ctx.beginPath(); + + notSolid && r1 === 0 && this.ctx.moveTo(-width / 2 - lineWidth, -height / 2 - lineWidth / 2); // 顶边虚线规避重叠规则 + r1 !== 0 && this.ctx.arc(-width / 2 + r1, -height / 2 + r1, r1 + lineWidth / 2, 1 * Math.PI, 1.5 * Math.PI); //左上角圆弧 + this.ctx.lineTo( + r2 === 0 ? (notSolid ? width / 2 : width / 2 + lineWidth / 2) : width / 2 - r2, + -height / 2 - lineWidth / 2, + ); // 顶边线 + + notSolid && r2 === 0 && this.ctx.moveTo(width / 2 + lineWidth / 2, -height / 2 - lineWidth); // 右边虚线规避重叠规则 + r2 !== 0 && this.ctx.arc(width / 2 - r2, -height / 2 + r2, r2 + lineWidth / 2, 1.5 * Math.PI, 2 * Math.PI); // 右上角圆弧 + this.ctx.lineTo( + width / 2 + lineWidth / 2, + r3 === 0 ? (notSolid ? height / 2 : height / 2 + lineWidth / 2) : height / 2 - r3, + ); // 右边线 + + notSolid && r3 === 0 && this.ctx.moveTo(width / 2 + lineWidth, height / 2 + lineWidth / 2); // 底边虚线规避重叠规则 + r3 !== 0 && this.ctx.arc(width / 2 - r3, height / 2 - r3, r3 + lineWidth / 2, 0, 0.5 * Math.PI); // 右下角圆弧 + this.ctx.lineTo( + r4 === 0 ? (notSolid ? -width / 2 : -width / 2 - lineWidth / 2) : -width / 2 + r4, + height / 2 + lineWidth / 2, + ); // 底边线 + + notSolid && r4 === 0 && this.ctx.moveTo(-width / 2 - lineWidth / 2, height / 2 + lineWidth); // 左边虚线规避重叠规则 + r4 !== 0 && this.ctx.arc(-width / 2 + r4, height / 2 - r4, r4 + lineWidth / 2, 0.5 * Math.PI, 1 * Math.PI); // 左下角圆弧 + this.ctx.lineTo( + -width / 2 - lineWidth / 2, + r1 === 0 ? (notSolid ? -height / 2 : -height / 2 - lineWidth / 2) : -height / 2 + r1, + ); // 左边线 + notSolid && r1 === 0 && this.ctx.moveTo(-width / 2 - lineWidth, -height / 2 - lineWidth / 2); // 顶边虚线规避重叠规则 + + if (!notSolid) { + this.ctx.closePath(); + } + } + + /** + * 根据 borderRadius 进行裁减 + */ + _doClip(borderRadius, width, height, borderStyle) { + if (borderRadius && width && height) { + // 防止在某些机型上周边有黑框现象,此处如果直接设置 fillStyle 为透明,在 Android 机型上会导致被裁减的图片也变为透明, iOS 和 IDE 上不会 + // globalAlpha 在 1.9.90 起支持,低版本下无效,但把 fillStyle 设为了 white,相对默认的 black 要好点 + this.ctx.globalAlpha = 0; + this.ctx.fillStyle = 'white'; + this._border({ + borderRadius, + width, + height, + borderStyle, + }); + this.ctx.fill(); + // 在 ios 的 6.6.6 版本上 clip 有 bug,禁掉此类型上的 clip,也就意味着,在此版本微信的 ios 设备下无法使用 border 属性 + if (!(getApp().systemInfo && getApp().systemInfo.version <= '6.6.6' && getApp().systemInfo.platform === 'ios')) { + this.ctx.clip(); + } + this.ctx.globalAlpha = 1; + } + } + + /** + * 画边框 + */ + _doBorder(view, width, height) { + if (!view.css) { + return; + } + const { borderRadius, borderWidth, borderColor, borderStyle } = view.css; + if (!borderWidth) { + return; + } + this.ctx.save(); + this._preProcess(view, true); + this.ctx.strokeStyle = borderColor || 'black'; + this._border({ + borderRadius, + width, + height, + borderWidth, + borderStyle, + }); + this.ctx.stroke(); + this.ctx.restore(); + } + + _preProcess(view, notClip) { + let width = 0; + let height; + let extra; + const paddings = this._doPaddings(view); + switch (view.type) { + case 'inlineText': { + { + // 计算行数 + let lines = 0; + // 文字总长度 + let textLength = 0; + // 行高 + let lineHeight = 0; + const textList = view.textList || []; + for (let i = 0; i < textList.length; i++) { + let subView = textList[i]; + const fontWeight = subView.css.fontWeight || '400'; + const textStyle = subView.css.textStyle || 'normal'; + if (!subView.css.fontSize) { + subView.css.fontSize = '20rpx'; + } + this.ctx.font = `${textStyle} ${fontWeight} ${subView.css.fontSize.toPx()}px "${subView.css.fontFamily || 'sans-serif'}"`; + textLength += this.ctx.measureText(subView.text).width; + let tempLineHeight = subView.css.lineHeight ? subView.css.lineHeight.toPx() : subView.css.fontSize.toPx(); + lineHeight = Math.max(lineHeight, tempLineHeight); + } + width = view.css.width ? view.css.width.toPx(false, this.style.width) - paddings[1] - paddings[3] : textLength;; + const calLines = Math.ceil(textLength / width); + + lines += calLines; + // lines = view.css.maxLines < lines ? view.css.maxLines : lines; + height = lineHeight * lines; + extra = { + lines: lines, + lineHeight: lineHeight, + // textArray: textArray, + // linesArray: linesArray, + }; + } + break; + } + case 'text': { + const textArray = String(view.text).split('\n'); + // 处理多个连续的'\n' + for (let i = 0; i < textArray.length; ++i) { + if (textArray[i] === '') { + textArray[i] = ' '; + } + } + const fontWeight = view.css.fontWeight || '400'; + const textStyle = view.css.textStyle || 'normal'; + if (!view.css.fontSize) { + view.css.fontSize = '20rpx'; + } + this.ctx.font = `${textStyle} ${fontWeight} ${view.css.fontSize.toPx()}px "${ + view.css.fontFamily || 'sans-serif' + }"`; + // 计算行数 + let lines = 0; + const linesArray = []; + for (let i = 0; i < textArray.length; ++i) { + const textLength = this.ctx.measureText(textArray[i]).width; + const minWidth = view.css.fontSize.toPx() + paddings[1] + paddings[3]; + let partWidth = view.css.width + ? view.css.width.toPx(false, this.style.width) - paddings[1] - paddings[3] + : textLength; + if (partWidth < minWidth) { + partWidth = minWidth; + } + const calLines = Math.ceil(textLength / partWidth); + // 取最长的作为 width + width = partWidth > width ? partWidth : width; + lines += calLines; + linesArray[i] = calLines; + } + lines = view.css.maxLines < lines ? view.css.maxLines : lines; + const lineHeight = view.css.lineHeight ? view.css.lineHeight.toPx() : view.css.fontSize.toPx(); + height = lineHeight * lines; + extra = { + lines: lines, + lineHeight: lineHeight, + textArray: textArray, + linesArray: linesArray, + }; + break; + } + case 'image': { + // image的长宽设置成auto的逻辑处理 + const ratio = getApp().systemInfo.pixelRatio ? getApp().systemInfo.pixelRatio : 2; + // 有css却未设置width或height,则默认为auto + if (view.css) { + if (!view.css.width) { + view.css.width = 'auto'; + } + if (!view.css.height) { + view.css.height = 'auto'; + } + } + if (!view.css || (view.css.width === 'auto' && view.css.height === 'auto')) { + width = Math.round(view.sWidth / ratio); + height = Math.round(view.sHeight / ratio); + } else if (view.css.width === 'auto') { + height = view.css.height.toPx(false, this.style.height); + width = (view.sWidth / view.sHeight) * height; + } else if (view.css.height === 'auto') { + width = view.css.width.toPx(false, this.style.width); + height = (view.sHeight / view.sWidth) * width; + } else { + width = view.css.width.toPx(false, this.style.width); + height = view.css.height.toPx(false, this.style.height); + } + break; + } + default: + if (!(view.css.width && view.css.height)) { + console.error('You should set width and height'); + return; + } + width = view.css.width.toPx(false, this.style.width); + height = view.css.height.toPx(false, this.style.height); + break; + } + let x; + if (view.css && view.css.right) { + if (typeof view.css.right === 'string') { + x = this.style.width - view.css.right.toPx(true, this.style.width); + } else { + // 可以用数组方式,把文字长度计算进去 + // [right, 文字id, 乘数(默认 1)] + const rights = view.css.right; + x = + this.style.width - + rights[0].toPx(true, this.style.width) - + penCache.viewRect[rights[1]].width * (rights[2] || 1); + } + } else if (view.css && view.css.left) { + if (typeof view.css.left === 'string') { + x = view.css.left.toPx(true, this.style.width); + } else { + const lefts = view.css.left; + x = lefts[0].toPx(true, this.style.width) + penCache.viewRect[lefts[1]].width * (lefts[2] || 1); + } + } else { + x = 0; + } + //const y = view.css && view.css.bottom ? this.style.height - height - view.css.bottom.toPx(true) : (view.css && view.css.top ? view.css.top.toPx(true) : 0); + let y; + if (view.css && view.css.bottom) { + y = this.style.height - height - view.css.bottom.toPx(true, this.style.height); + } else { + if (view.css && view.css.top) { + if (typeof view.css.top === 'string') { + y = view.css.top.toPx(true, this.style.height); + } else { + const tops = view.css.top; + y = tops[0].toPx(true, this.style.height) + penCache.viewRect[tops[1]].height * (tops[2] || 1); + } + } else { + y = 0; + } + } + + const angle = view.css && view.css.rotate ? this._getAngle(view.css.rotate) : 0; + // 当设置了 right 时,默认 align 用 right,反之用 left + const align = view.css && view.css.align ? view.css.align : view.css && view.css.right ? 'right' : 'left'; + const verticalAlign = view.css && view.css.verticalAlign ? view.css.verticalAlign : 'top'; + // 记录绘制时的画布 + let xa = 0; + switch (align) { + case 'center': + xa = x; + break; + case 'right': + xa = x - width / 2; + break; + default: + xa = x + width / 2; + break; + } + let ya = 0; + switch (verticalAlign) { + case 'center': + ya = y; + break; + case 'bottom': + ya = y - height / 2; + break; + default: + ya = y + height / 2; + break; + } + this.ctx.translate(xa, ya); + // 记录该 view 的有效点击区域 + // TODO ,旋转和裁剪的判断 + // 记录在真实画布上的左侧 + let left = x; + if (align === 'center') { + left = x - width / 2; + } else if (align === 'right') { + left = x - width; + } + var top = y; + if (verticalAlign === 'center') { + top = y - height / 2; + } else if (verticalAlign === 'bottom') { + top = y - height; + } + if (view.rect) { + view.rect.left = left; + view.rect.top = top; + view.rect.right = left + width; + view.rect.bottom = top + height; + view.rect.x = view.css && view.css.right ? x - width : x; + view.rect.y = y; + } else { + view.rect = { + left: left, + top: top, + right: left + width, + bottom: top + height, + x: view.css && view.css.right ? x - width : x, + y: y, + }; + } + + view.rect.left = view.rect.left - paddings[3]; + view.rect.top = view.rect.top - paddings[0]; + view.rect.right = view.rect.right + paddings[1]; + view.rect.bottom = view.rect.bottom + paddings[2]; + if (view.type === 'text') { + view.rect.minWidth = view.css.fontSize.toPx() + paddings[1] + paddings[3]; + } + + this.ctx.rotate(angle); + if (!notClip && view.css && view.css.borderRadius && view.type !== 'rect') { + this._doClip(view.css.borderRadius, width, height, view.css.borderStyle); + } + this._doShadow(view); + if (view.id) { + penCache.viewRect[view.id] = { + width, + height, + left: view.rect.left, + top: view.rect.top, + right: view.rect.right, + bottom: view.rect.bottom, + }; + } + return { + width: width, + height: height, + x: x, + y: y, + extra: extra, + }; + } + + _doPaddings(view) { + const { padding } = view.css ? view.css : {}; + let pd = [0, 0, 0, 0]; + if (padding) { + const pdg = padding.split(/\s+/); + if (pdg.length === 1) { + const x = pdg[0].toPx(); + pd = [x, x, x, x]; + } + if (pdg.length === 2) { + const x = pdg[0].toPx(); + const y = pdg[1].toPx(); + pd = [x, y, x, y]; + } + if (pdg.length === 3) { + const x = pdg[0].toPx(); + const y = pdg[1].toPx(); + const z = pdg[2].toPx(); + pd = [x, y, z, y]; + } + if (pdg.length === 4) { + const x = pdg[0].toPx(); + const y = pdg[1].toPx(); + const z = pdg[2].toPx(); + const a = pdg[3].toPx(); + pd = [x, y, z, a]; + } + } + return pd; + } + + // 画文字的背景图片 + _doBackground(view) { + this.ctx.save(); + const { width: rawWidth, height: rawHeight } = this._preProcess(view, true); + + const { background } = view.css; + let pd = this._doPaddings(view); + const width = rawWidth + pd[1] + pd[3]; + const height = rawHeight + pd[0] + pd[2]; + + this._doClip(view.css.borderRadius, width, height, view.css.borderStyle); + if (GD.api.isGradient(background)) { + GD.api.doGradient(background, width, height, this.ctx); + } else { + this.ctx.fillStyle = background; + } + this.ctx.fillRect(-(width / 2), -(height / 2), width, height); + + this.ctx.restore(); + } + + _drawQRCode(view) { + this.ctx.save(); + const { width, height } = this._preProcess(view); + QR.api.draw(view.content, this.ctx, -width / 2, -height / 2, width, height, view.css.background, view.css.color); + this.ctx.restore(); + this._doBorder(view, width, height); + } + + _drawAbsImage(view) { + if (!view.url) { + return; + } + this.ctx.save(); + const { width, height } = this._preProcess(view); + // 获得缩放到图片大小级别的裁减框 + let rWidth = view.sWidth; + let rHeight = view.sHeight; + let startX = 0; + let startY = 0; + // 绘画区域比例 + const cp = width / height; + // 原图比例 + const op = view.sWidth / view.sHeight; + if (cp >= op) { + rHeight = rWidth / cp; + startY = Math.round((view.sHeight - rHeight) / 2); + } else { + rWidth = rHeight * cp; + startX = Math.round((view.sWidth - rWidth) / 2); + } + if (view.css && view.css.mode === 'scaleToFill') { + this.ctx.drawImage(view.url, -(width / 2), -(height / 2), width, height); + } else { + this.ctx.drawImage(view.url, startX, startY, rWidth, rHeight, -(width / 2), -(height / 2), width, height); + view.rect.startX = startX / view.sWidth; + view.rect.startY = startY / view.sHeight; + view.rect.endX = (startX + rWidth) / view.sWidth; + view.rect.endY = (startY + rHeight) / view.sHeight; + } + this.ctx.restore(); + this._doBorder(view, width, height); + } + /** + * + * @param {*} view + * @description 一行内文字多样式的方法 + * + * 暂不支持配置 text-align,默认left + * 暂不支持配置 maxLines + */ + _fillAbsInlineText(view) { + if (!view.textList) { + return; + } + if (view.css.background) { + // 生成背景 + this._doBackground(view); + } + this.ctx.save(); + const { width, height, extra } = this._preProcess(view, view.css.background && view.css.borderRadius); + const { lines, lineHeight } = extra; + let staticX = -(width / 2); + let lineIndex = 0; // 第几行 + let x = staticX; // 开始x位置 + let leftWidth = width; // 当前行剩余多少宽度可以使用 + + let getStyle = css => { + const fontWeight = css.fontWeight || '400'; + const textStyle = css.textStyle || 'normal'; + if (!css.fontSize) { + css.fontSize = '20rpx'; + } + return `${textStyle} ${fontWeight} ${css.fontSize.toPx()}px "${css.fontFamily || 'sans-serif'}"`; + } + + // 遍历行内的文字数组 + for (let j = 0; j < view.textList.length; j++) { + const subView = view.textList[j]; + + // 某个文字开始位置 + let start = 0; + // 文字已使用的数量 + let alreadyCount = 0; + // 文字总长度 + let textLength = subView.text.length; + // 文字总宽度 + let textWidth = this.ctx.measureText(subView.text).width; + // 每个文字的平均宽度 + let preWidth = Math.ceil(textWidth / textLength); + + // 循环写文字 + while (alreadyCount < textLength) { + // alreadyCount - start + 1 -> 当前摘取出来的文字 + // 比较可用宽度,寻找最大可写文字长度 + while ((alreadyCount - start + 1) * preWidth < leftWidth && alreadyCount < textLength) { + alreadyCount++; + } + + // 取出文字 + let text = subView.text.substr(start, alreadyCount - start); + + const y = -(height / 2) + subView.css.fontSize.toPx() + lineIndex * lineHeight; + + // 设置文字样式 + this.ctx.font = getStyle(subView.css); + + this.ctx.fillStyle = subView.css.color || 'black'; + this.ctx.textAlign = 'left'; + + // 执行画布操作 + if (subView.css.textStyle === 'stroke') { + this.ctx.strokeText(text, x, y); + } else { + this.ctx.fillText(text, x, y); + } + + // 当次已使用宽度 + let currentUsedWidth = this.ctx.measureText(text).width; + + const fontSize = subView.css.fontSize.toPx(); + + // 画 textDecoration + let textDecoration; + if (subView.css.textDecoration) { + this.ctx.lineWidth = fontSize / 13; + this.ctx.beginPath(); + if (/\bunderline\b/.test(subView.css.textDecoration)) { + this.ctx.moveTo(x, y); + this.ctx.lineTo(x + currentUsedWidth, y); + textDecoration = { + moveTo: [x, y], + lineTo: [x + currentUsedWidth, y], + }; + } + if (/\boverline\b/.test(subView.css.textDecoration)) { + this.ctx.moveTo(x, y - fontSize); + this.ctx.lineTo(x + currentUsedWidth, y - fontSize); + textDecoration = { + moveTo: [x, y - fontSize], + lineTo: [x + currentUsedWidth, y - fontSize], + }; + } + if (/\bline-through\b/.test(subView.css.textDecoration)) { + this.ctx.moveTo(x, y - fontSize / 3); + this.ctx.lineTo(x + currentUsedWidth, y - fontSize / 3); + textDecoration = { + moveTo: [x, y - fontSize / 3], + lineTo: [x + currentUsedWidth, y - fontSize / 3], + }; + } + this.ctx.closePath(); + this.ctx.strokeStyle = subView.css.color; + this.ctx.stroke(); + } + + // 重置数据 + start = alreadyCount; + leftWidth -= currentUsedWidth; + x += currentUsedWidth; + // 如果剩余宽度 小于等于0 或者小于一个字的平均宽度,换行 + if (leftWidth <= 0 || leftWidth < preWidth) { + leftWidth = width; + x = staticX; + lineIndex++; + } + } + } + + this.ctx.restore(); + this._doBorder(view, width, height); + } + + _fillAbsText(view) { + if (!view.text) { + return; + } + if (view.css.background) { + // 生成背景 + this._doBackground(view); + } + this.ctx.save(); + const { width, height, extra } = this._preProcess(view, view.css.background && view.css.borderRadius); + this.ctx.fillStyle = view.css.color || 'black'; + if (view.id && penCache.textLines[view.id]) { + this.ctx.textAlign = view.css.textAlign ? view.css.textAlign : 'left'; + for (const i of penCache.textLines[view.id]) { + const { measuredWith, text, x, y, textDecoration } = i; + if (view.css.textStyle === 'stroke') { + this.ctx.strokeText(text, x, y, measuredWith); + } else { + this.ctx.fillText(text, x, y, measuredWith); + } + if (textDecoration) { + const fontSize = view.css.fontSize.toPx(); + this.ctx.lineWidth = fontSize / 13; + this.ctx.beginPath(); + this.ctx.moveTo(...textDecoration.moveTo); + this.ctx.lineTo(...textDecoration.lineTo); + this.ctx.closePath(); + this.ctx.strokeStyle = view.css.color; + this.ctx.stroke(); + } + } + } else { + const { lines, lineHeight, textArray, linesArray } = extra; + // 如果设置了id,则保留 text 的长度 + if (view.id) { + let textWidth = 0; + for (let i = 0; i < textArray.length; ++i) { + const _w = this.ctx.measureText(textArray[i]).width; + textWidth = _w > textWidth ? _w : textWidth; + } + penCache.viewRect[view.id].width = width ? (textWidth < width ? textWidth : width) : textWidth; + } + let lineIndex = 0; + for (let j = 0; j < textArray.length; ++j) { + const preLineLength = Math.ceil(textArray[j].length / linesArray[j]); + let start = 0; + let alreadyCount = 0; + + for (let i = 0; i < linesArray[j]; ++i) { + // 绘制行数大于最大行数,则直接跳出循环 + if (lineIndex >= lines) { + break; + } + alreadyCount = preLineLength; + let text = textArray[j].substr(start, alreadyCount); + let measuredWith = this.ctx.measureText(text).width; + // 如果测量大小小于width一个字符的大小,则进行补齐,如果测量大小超出 width,则进行减除 + // 如果已经到文本末尾,也不要进行该循环 + while ( + start + alreadyCount <= textArray[j].length && + (width - measuredWith > view.css.fontSize.toPx() || measuredWith - width > view.css.fontSize.toPx()) + ) { + if (measuredWith < width) { + text = textArray[j].substr(start, ++alreadyCount); + } else { + if (text.length <= 1) { + // 如果只有一个字符时,直接跳出循环 + break; + } + text = textArray[j].substr(start, --alreadyCount); + // break; + } + measuredWith = this.ctx.measureText(text).width; + } + start += text.length; + // 如果是最后一行了,发现还有未绘制完的内容,则加... + if (lineIndex === lines - 1 && (j < textArray.length - 1 || start < textArray[j].length)) { + while (this.ctx.measureText(`${text}...`).width > width) { + if (text.length <= 1) { + // 如果只有一个字符时,直接跳出循环 + break; + } + text = text.substring(0, text.length - 1); + } + text += '...'; + measuredWith = this.ctx.measureText(text).width; + } + this.ctx.textAlign = view.css.textAlign ? view.css.textAlign : 'left'; + let x; + let lineX; + switch (view.css.textAlign) { + case 'center': + x = 0; + lineX = x - measuredWith / 2; + break; + case 'right': + x = width / 2; + lineX = x - measuredWith; + break; + default: + x = -(width / 2); + lineX = x; + break; + } + + const y = + -(height / 2) + + (lineIndex === 0 ? view.css.fontSize.toPx() : view.css.fontSize.toPx() + lineIndex * lineHeight); + lineIndex++; + if (view.css.textStyle === 'stroke') { + this.ctx.strokeText(text, x, y, measuredWith); + } else { + this.ctx.fillText(text, x, y, measuredWith); + } + const fontSize = view.css.fontSize.toPx(); + let textDecoration; + if (view.css.textDecoration) { + this.ctx.lineWidth = fontSize / 13; + this.ctx.beginPath(); + if (/\bunderline\b/.test(view.css.textDecoration)) { + this.ctx.moveTo(lineX, y); + this.ctx.lineTo(lineX + measuredWith, y); + textDecoration = { + moveTo: [lineX, y], + lineTo: [lineX + measuredWith, y], + }; + } + if (/\boverline\b/.test(view.css.textDecoration)) { + this.ctx.moveTo(lineX, y - fontSize); + this.ctx.lineTo(lineX + measuredWith, y - fontSize); + textDecoration = { + moveTo: [lineX, y - fontSize], + lineTo: [lineX + measuredWith, y - fontSize], + }; + } + if (/\bline-through\b/.test(view.css.textDecoration)) { + this.ctx.moveTo(lineX, y - fontSize / 3); + this.ctx.lineTo(lineX + measuredWith, y - fontSize / 3); + textDecoration = { + moveTo: [lineX, y - fontSize / 3], + lineTo: [lineX + measuredWith, y - fontSize / 3], + }; + } + this.ctx.closePath(); + this.ctx.strokeStyle = view.css.color; + this.ctx.stroke(); + } + if (view.id) { + penCache.textLines[view.id] + ? penCache.textLines[view.id].push({ + text, + x, + y, + measuredWith, + textDecoration, + }) + : (penCache.textLines[view.id] = [ + { + text, + x, + y, + measuredWith, + textDecoration, + }, + ]); + } + } + } + } + this.ctx.restore(); + this._doBorder(view, width, height); + } + + _drawAbsRect(view) { + this.ctx.save(); + const { width, height } = this._preProcess(view); + if (GD.api.isGradient(view.css.color)) { + GD.api.doGradient(view.css.color, width, height, this.ctx); + } else { + this.ctx.fillStyle = view.css.color; + } + const { borderRadius, borderStyle, borderWidth } = view.css; + this._border({ + borderRadius, + width, + height, + borderWidth, + borderStyle, + }); + this.ctx.fill(); + this.ctx.restore(); + this._doBorder(view, width, height); + } + + // shadow 支持 (x, y, blur, color), 不支持 spread + // shadow:0px 0px 10px rgba(0,0,0,0.1); + _doShadow(view) { + if (!view.css || !view.css.shadow) { + return; + } + const box = view.css.shadow.replace(/,\s+/g, ',').split(/\s+/); + if (box.length > 4) { + console.error("shadow don't spread option"); + return; + } + this.ctx.shadowOffsetX = parseInt(box[0], 10); + this.ctx.shadowOffsetY = parseInt(box[1], 10); + this.ctx.shadowBlur = parseInt(box[2], 10); + this.ctx.shadowColor = box[3]; + } + + _getAngle(angle) { + return (Number(angle) * Math.PI) / 180; + } +} diff --git a/eaterplanet_ecommerce/components/painter/lib/qrcode.js b/eaterplanet_ecommerce/components/painter/lib/qrcode.js new file mode 100644 index 0000000..adf1b64 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/qrcode.js @@ -0,0 +1,784 @@ +/* eslint-disable */ +!(function () { + + // alignment pattern + var adelta = [ + 0, 11, 15, 19, 23, 27, 31, + 16, 18, 20, 22, 24, 26, 28, 20, 22, 24, 24, 26, 28, 28, 22, 24, 24, + 26, 26, 28, 28, 24, 24, 26, 26, 26, 28, 28, 24, 26, 26, 26, 28, 28 + ]; + + // version block + var vpat = [ + 0xc94, 0x5bc, 0xa99, 0x4d3, 0xbf6, 0x762, 0x847, 0x60d, + 0x928, 0xb78, 0x45d, 0xa17, 0x532, 0x9a6, 0x683, 0x8c9, + 0x7ec, 0xec4, 0x1e1, 0xfab, 0x08e, 0xc1a, 0x33f, 0xd75, + 0x250, 0x9d5, 0x6f0, 0x8ba, 0x79f, 0xb0b, 0x42e, 0xa64, + 0x541, 0xc69 + ]; + + // final format bits with mask: level << 3 | mask + var fmtword = [ + 0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976, //L + 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, //M + 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed, //Q + 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b //H + ]; + + // 4 per version: number of blocks 1,2; data width; ecc width + var eccblocks = [ + 1, 0, 19, 7, 1, 0, 16, 10, 1, 0, 13, 13, 1, 0, 9, 17, + 1, 0, 34, 10, 1, 0, 28, 16, 1, 0, 22, 22, 1, 0, 16, 28, + 1, 0, 55, 15, 1, 0, 44, 26, 2, 0, 17, 18, 2, 0, 13, 22, + 1, 0, 80, 20, 2, 0, 32, 18, 2, 0, 24, 26, 4, 0, 9, 16, + 1, 0, 108, 26, 2, 0, 43, 24, 2, 2, 15, 18, 2, 2, 11, 22, + 2, 0, 68, 18, 4, 0, 27, 16, 4, 0, 19, 24, 4, 0, 15, 28, + 2, 0, 78, 20, 4, 0, 31, 18, 2, 4, 14, 18, 4, 1, 13, 26, + 2, 0, 97, 24, 2, 2, 38, 22, 4, 2, 18, 22, 4, 2, 14, 26, + 2, 0, 116, 30, 3, 2, 36, 22, 4, 4, 16, 20, 4, 4, 12, 24, + 2, 2, 68, 18, 4, 1, 43, 26, 6, 2, 19, 24, 6, 2, 15, 28, + 4, 0, 81, 20, 1, 4, 50, 30, 4, 4, 22, 28, 3, 8, 12, 24, + 2, 2, 92, 24, 6, 2, 36, 22, 4, 6, 20, 26, 7, 4, 14, 28, + 4, 0, 107, 26, 8, 1, 37, 22, 8, 4, 20, 24, 12, 4, 11, 22, + 3, 1, 115, 30, 4, 5, 40, 24, 11, 5, 16, 20, 11, 5, 12, 24, + 5, 1, 87, 22, 5, 5, 41, 24, 5, 7, 24, 30, 11, 7, 12, 24, + 5, 1, 98, 24, 7, 3, 45, 28, 15, 2, 19, 24, 3, 13, 15, 30, + 1, 5, 107, 28, 10, 1, 46, 28, 1, 15, 22, 28, 2, 17, 14, 28, + 5, 1, 120, 30, 9, 4, 43, 26, 17, 1, 22, 28, 2, 19, 14, 28, + 3, 4, 113, 28, 3, 11, 44, 26, 17, 4, 21, 26, 9, 16, 13, 26, + 3, 5, 107, 28, 3, 13, 41, 26, 15, 5, 24, 30, 15, 10, 15, 28, + 4, 4, 116, 28, 17, 0, 42, 26, 17, 6, 22, 28, 19, 6, 16, 30, + 2, 7, 111, 28, 17, 0, 46, 28, 7, 16, 24, 30, 34, 0, 13, 24, + 4, 5, 121, 30, 4, 14, 47, 28, 11, 14, 24, 30, 16, 14, 15, 30, + 6, 4, 117, 30, 6, 14, 45, 28, 11, 16, 24, 30, 30, 2, 16, 30, + 8, 4, 106, 26, 8, 13, 47, 28, 7, 22, 24, 30, 22, 13, 15, 30, + 10, 2, 114, 28, 19, 4, 46, 28, 28, 6, 22, 28, 33, 4, 16, 30, + 8, 4, 122, 30, 22, 3, 45, 28, 8, 26, 23, 30, 12, 28, 15, 30, + 3, 10, 117, 30, 3, 23, 45, 28, 4, 31, 24, 30, 11, 31, 15, 30, + 7, 7, 116, 30, 21, 7, 45, 28, 1, 37, 23, 30, 19, 26, 15, 30, + 5, 10, 115, 30, 19, 10, 47, 28, 15, 25, 24, 30, 23, 25, 15, 30, + 13, 3, 115, 30, 2, 29, 46, 28, 42, 1, 24, 30, 23, 28, 15, 30, + 17, 0, 115, 30, 10, 23, 46, 28, 10, 35, 24, 30, 19, 35, 15, 30, + 17, 1, 115, 30, 14, 21, 46, 28, 29, 19, 24, 30, 11, 46, 15, 30, + 13, 6, 115, 30, 14, 23, 46, 28, 44, 7, 24, 30, 59, 1, 16, 30, + 12, 7, 121, 30, 12, 26, 47, 28, 39, 14, 24, 30, 22, 41, 15, 30, + 6, 14, 121, 30, 6, 34, 47, 28, 46, 10, 24, 30, 2, 64, 15, 30, + 17, 4, 122, 30, 29, 14, 46, 28, 49, 10, 24, 30, 24, 46, 15, 30, + 4, 18, 122, 30, 13, 32, 46, 28, 48, 14, 24, 30, 42, 32, 15, 30, + 20, 4, 117, 30, 40, 7, 47, 28, 43, 22, 24, 30, 10, 67, 15, 30, + 19, 6, 118, 30, 18, 31, 47, 28, 34, 34, 24, 30, 20, 61, 15, 30 + ]; + + // Galois field log table + var glog = [ + 0xff, 0x00, 0x01, 0x19, 0x02, 0x32, 0x1a, 0xc6, 0x03, 0xdf, 0x33, 0xee, 0x1b, 0x68, 0xc7, 0x4b, + 0x04, 0x64, 0xe0, 0x0e, 0x34, 0x8d, 0xef, 0x81, 0x1c, 0xc1, 0x69, 0xf8, 0xc8, 0x08, 0x4c, 0x71, + 0x05, 0x8a, 0x65, 0x2f, 0xe1, 0x24, 0x0f, 0x21, 0x35, 0x93, 0x8e, 0xda, 0xf0, 0x12, 0x82, 0x45, + 0x1d, 0xb5, 0xc2, 0x7d, 0x6a, 0x27, 0xf9, 0xb9, 0xc9, 0x9a, 0x09, 0x78, 0x4d, 0xe4, 0x72, 0xa6, + 0x06, 0xbf, 0x8b, 0x62, 0x66, 0xdd, 0x30, 0xfd, 0xe2, 0x98, 0x25, 0xb3, 0x10, 0x91, 0x22, 0x88, + 0x36, 0xd0, 0x94, 0xce, 0x8f, 0x96, 0xdb, 0xbd, 0xf1, 0xd2, 0x13, 0x5c, 0x83, 0x38, 0x46, 0x40, + 0x1e, 0x42, 0xb6, 0xa3, 0xc3, 0x48, 0x7e, 0x6e, 0x6b, 0x3a, 0x28, 0x54, 0xfa, 0x85, 0xba, 0x3d, + 0xca, 0x5e, 0x9b, 0x9f, 0x0a, 0x15, 0x79, 0x2b, 0x4e, 0xd4, 0xe5, 0xac, 0x73, 0xf3, 0xa7, 0x57, + 0x07, 0x70, 0xc0, 0xf7, 0x8c, 0x80, 0x63, 0x0d, 0x67, 0x4a, 0xde, 0xed, 0x31, 0xc5, 0xfe, 0x18, + 0xe3, 0xa5, 0x99, 0x77, 0x26, 0xb8, 0xb4, 0x7c, 0x11, 0x44, 0x92, 0xd9, 0x23, 0x20, 0x89, 0x2e, + 0x37, 0x3f, 0xd1, 0x5b, 0x95, 0xbc, 0xcf, 0xcd, 0x90, 0x87, 0x97, 0xb2, 0xdc, 0xfc, 0xbe, 0x61, + 0xf2, 0x56, 0xd3, 0xab, 0x14, 0x2a, 0x5d, 0x9e, 0x84, 0x3c, 0x39, 0x53, 0x47, 0x6d, 0x41, 0xa2, + 0x1f, 0x2d, 0x43, 0xd8, 0xb7, 0x7b, 0xa4, 0x76, 0xc4, 0x17, 0x49, 0xec, 0x7f, 0x0c, 0x6f, 0xf6, + 0x6c, 0xa1, 0x3b, 0x52, 0x29, 0x9d, 0x55, 0xaa, 0xfb, 0x60, 0x86, 0xb1, 0xbb, 0xcc, 0x3e, 0x5a, + 0xcb, 0x59, 0x5f, 0xb0, 0x9c, 0xa9, 0xa0, 0x51, 0x0b, 0xf5, 0x16, 0xeb, 0x7a, 0x75, 0x2c, 0xd7, + 0x4f, 0xae, 0xd5, 0xe9, 0xe6, 0xe7, 0xad, 0xe8, 0x74, 0xd6, 0xf4, 0xea, 0xa8, 0x50, 0x58, 0xaf + ]; + + // Galios field exponent table + var gexp = [ + 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1d, 0x3a, 0x74, 0xe8, 0xcd, 0x87, 0x13, 0x26, + 0x4c, 0x98, 0x2d, 0x5a, 0xb4, 0x75, 0xea, 0xc9, 0x8f, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, + 0x9d, 0x27, 0x4e, 0x9c, 0x25, 0x4a, 0x94, 0x35, 0x6a, 0xd4, 0xb5, 0x77, 0xee, 0xc1, 0x9f, 0x23, + 0x46, 0x8c, 0x05, 0x0a, 0x14, 0x28, 0x50, 0xa0, 0x5d, 0xba, 0x69, 0xd2, 0xb9, 0x6f, 0xde, 0xa1, + 0x5f, 0xbe, 0x61, 0xc2, 0x99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0x6c, 0xd8, 0xad, 0x47, 0x8e, 0x00 + ]; + + // Working buffers: + // data input and ecc append, image working buffer, fixed part of image, run lengths for badness + var strinbuf = [], eccbuf = [], qrframe = [], framask = [], rlens = []; + // Control values - width is based on version, last 4 are from table. + var version, width, neccblk1, neccblk2, datablkw, eccblkwid; + var ecclevel = 2; + // set bit to indicate cell in qrframe is immutable. symmetric around diagonal + function setmask(x, y) { + var bt; + if (x > y) { + bt = x; + x = y; + y = bt; + } + // y*y = 1+3+5... + bt = y; + bt *= y; + bt += y; + bt >>= 1; + bt += x; + framask[bt] = 1; + } + + // enter alignment pattern - black to qrframe, white to mask (later black frame merged to mask) + function putalign(x, y) { + var j; + + qrframe[x + width * y] = 1; + for (j = -2; j < 2; j++) { + qrframe[(x + j) + width * (y - 2)] = 1; + qrframe[(x - 2) + width * (y + j + 1)] = 1; + qrframe[(x + 2) + width * (y + j)] = 1; + qrframe[(x + j + 1) + width * (y + 2)] = 1; + } + for (j = 0; j < 2; j++) { + setmask(x - 1, y + j); + setmask(x + 1, y - j); + setmask(x - j, y - 1); + setmask(x + j, y + 1); + } + } + + //======================================================================== + // Reed Solomon error correction + // exponentiation mod N + function modnn(x) { + while (x >= 255) { + x -= 255; + x = (x >> 8) + (x & 255); + } + return x; + } + + var genpoly = []; + + // Calculate and append ECC data to data block. Block is in strinbuf, indexes to buffers given. + function appendrs(data, dlen, ecbuf, eclen) { + var i, j, fb; + + for (i = 0; i < eclen; i++) + strinbuf[ecbuf + i] = 0; + for (i = 0; i < dlen; i++) { + fb = glog[strinbuf[data + i] ^ strinbuf[ecbuf]]; + if (fb != 255) /* fb term is non-zero */ + for (j = 1; j < eclen; j++) + strinbuf[ecbuf + j - 1] = strinbuf[ecbuf + j] ^ gexp[modnn(fb + genpoly[eclen - j])]; + else + for (j = ecbuf; j < ecbuf + eclen; j++) + strinbuf[j] = strinbuf[j + 1]; + strinbuf[ecbuf + eclen - 1] = fb == 255 ? 0 : gexp[modnn(fb + genpoly[0])]; + } + } + + //======================================================================== + // Frame data insert following the path rules + + // check mask - since symmetrical use half. + function ismasked(x, y) { + var bt; + if (x > y) { + bt = x; + x = y; + y = bt; + } + bt = y; + bt += y * y; + bt >>= 1; + bt += x; + return framask[bt]; + } + + //======================================================================== + // Apply the selected mask out of the 8. + function applymask(m) { + var x, y, r3x, r3y; + + switch (m) { + case 0: + for (y = 0; y < width; y++) + for (x = 0; x < width; x++) + if (!((x + y) & 1) && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + break; + case 1: + for (y = 0; y < width; y++) + for (x = 0; x < width; x++) + if (!(y & 1) && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + break; + case 2: + for (y = 0; y < width; y++) + for (r3x = 0, x = 0; x < width; x++ , r3x++) { + if (r3x == 3) + r3x = 0; + if (!r3x && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + break; + case 3: + for (r3y = 0, y = 0; y < width; y++ , r3y++) { + if (r3y == 3) + r3y = 0; + for (r3x = r3y, x = 0; x < width; x++ , r3x++) { + if (r3x == 3) + r3x = 0; + if (!r3x && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + } + break; + case 4: + for (y = 0; y < width; y++) + for (r3x = 0, r3y = ((y >> 1) & 1), x = 0; x < width; x++ , r3x++) { + if (r3x == 3) { + r3x = 0; + r3y = !r3y; + } + if (!r3y && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + break; + case 5: + for (r3y = 0, y = 0; y < width; y++ , r3y++) { + if (r3y == 3) + r3y = 0; + for (r3x = 0, x = 0; x < width; x++ , r3x++) { + if (r3x == 3) + r3x = 0; + if (!((x & y & 1) + !(!r3x | !r3y)) && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + } + break; + case 6: + for (r3y = 0, y = 0; y < width; y++ , r3y++) { + if (r3y == 3) + r3y = 0; + for (r3x = 0, x = 0; x < width; x++ , r3x++) { + if (r3x == 3) + r3x = 0; + if (!(((x & y & 1) + (r3x && (r3x == r3y))) & 1) && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + } + break; + case 7: + for (r3y = 0, y = 0; y < width; y++ , r3y++) { + if (r3y == 3) + r3y = 0; + for (r3x = 0, x = 0; x < width; x++ , r3x++) { + if (r3x == 3) + r3x = 0; + if (!(((r3x && (r3x == r3y)) + ((x + y) & 1)) & 1) && !ismasked(x, y)) + qrframe[x + y * width] ^= 1; + } + } + break; + } + return; + } + + // Badness coefficients. + var N1 = 3, N2 = 3, N3 = 40, N4 = 10; + + // Using the table of the length of each run, calculate the amount of bad image + // - long runs or those that look like finders; called twice, once each for X and Y + function badruns(length) { + var i; + var runsbad = 0; + for (i = 0; i <= length; i++) + if (rlens[i] >= 5) + runsbad += N1 + rlens[i] - 5; + // BwBBBwB as in finder + for (i = 3; i < length - 1; i += 2) + if (rlens[i - 2] == rlens[i + 2] + && rlens[i + 2] == rlens[i - 1] + && rlens[i - 1] == rlens[i + 1] + && rlens[i - 1] * 3 == rlens[i] + // white around the black pattern? Not part of spec + && (rlens[i - 3] == 0 // beginning + || i + 3 > length // end + || rlens[i - 3] * 3 >= rlens[i] * 4 || rlens[i + 3] * 3 >= rlens[i] * 4) + ) + runsbad += N3; + return runsbad; + } + + // Calculate how bad the masked image is - blocks, imbalance, runs, or finders. + function badcheck() { + var x, y, h, b, b1; + var thisbad = 0; + var bw = 0; + + // blocks of same color. + for (y = 0; y < width - 1; y++) + for (x = 0; x < width - 1; x++) + if ((qrframe[x + width * y] && qrframe[(x + 1) + width * y] + && qrframe[x + width * (y + 1)] && qrframe[(x + 1) + width * (y + 1)]) // all black + || !(qrframe[x + width * y] || qrframe[(x + 1) + width * y] + || qrframe[x + width * (y + 1)] || qrframe[(x + 1) + width * (y + 1)])) // all white + thisbad += N2; + + // X runs + for (y = 0; y < width; y++) { + rlens[0] = 0; + for (h = b = x = 0; x < width; x++) { + if ((b1 = qrframe[x + width * y]) == b) + rlens[h]++; + else + rlens[++h] = 1; + b = b1; + bw += b ? 1 : -1; + } + thisbad += badruns(h); + } + + // black/white imbalance + if (bw < 0) + bw = -bw; + + var big = bw; + var count = 0; + big += big << 2; + big <<= 1; + while (big > width * width) + big -= width * width, count++; + thisbad += count * N4; + + // Y runs + for (x = 0; x < width; x++) { + rlens[0] = 0; + for (h = b = y = 0; y < width; y++) { + if ((b1 = qrframe[x + width * y]) == b) + rlens[h]++; + else + rlens[++h] = 1; + b = b1; + } + thisbad += badruns(h); + } + return thisbad; + } + + function genframe(instring) { + var x, y, k, t, v, i, j, m; + + // find the smallest version that fits the string + t = instring.length; + version = 0; + do { + version++; + k = (ecclevel - 1) * 4 + (version - 1) * 16; + neccblk1 = eccblocks[k++]; + neccblk2 = eccblocks[k++]; + datablkw = eccblocks[k++]; + eccblkwid = eccblocks[k]; + k = datablkw * (neccblk1 + neccblk2) + neccblk2 - 3 + (version <= 9); + if (t <= k) + break; + } while (version < 40); + + // FIXME - insure that it fits insted of being truncated + width = 17 + 4 * version; + + // allocate, clear and setup data structures + v = datablkw + (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2; + for (t = 0; t < v; t++) + eccbuf[t] = 0; + strinbuf = instring.slice(0); + + for (t = 0; t < width * width; t++) + qrframe[t] = 0; + + for (t = 0; t < (width * (width + 1) + 1) / 2; t++) + framask[t] = 0; + + // insert finders - black to frame, white to mask + for (t = 0; t < 3; t++) { + k = 0; + y = 0; + if (t == 1) + k = (width - 7); + if (t == 2) + y = (width - 7); + qrframe[(y + 3) + width * (k + 3)] = 1; + for (x = 0; x < 6; x++) { + qrframe[(y + x) + width * k] = 1; + qrframe[y + width * (k + x + 1)] = 1; + qrframe[(y + 6) + width * (k + x)] = 1; + qrframe[(y + x + 1) + width * (k + 6)] = 1; + } + for (x = 1; x < 5; x++) { + setmask(y + x, k + 1); + setmask(y + 1, k + x + 1); + setmask(y + 5, k + x); + setmask(y + x + 1, k + 5); + } + for (x = 2; x < 4; x++) { + qrframe[(y + x) + width * (k + 2)] = 1; + qrframe[(y + 2) + width * (k + x + 1)] = 1; + qrframe[(y + 4) + width * (k + x)] = 1; + qrframe[(y + x + 1) + width * (k + 4)] = 1; + } + } + + // alignment blocks + if (version > 1) { + t = adelta[version]; + y = width - 7; + for (; ;) { + x = width - 7; + while (x > t - 3) { + putalign(x, y); + if (x < t) + break; + x -= t; + } + if (y <= t + 9) + break; + y -= t; + putalign(6, y); + putalign(y, 6); + } + } + + // single black + qrframe[8 + width * (width - 8)] = 1; + + // timing gap - mask only + for (y = 0; y < 7; y++) { + setmask(7, y); + setmask(width - 8, y); + setmask(7, y + width - 7); + } + for (x = 0; x < 8; x++) { + setmask(x, 7); + setmask(x + width - 8, 7); + setmask(x, width - 8); + } + + // reserve mask-format area + for (x = 0; x < 9; x++) + setmask(x, 8); + for (x = 0; x < 8; x++) { + setmask(x + width - 8, 8); + setmask(8, x); + } + for (y = 0; y < 7; y++) + setmask(8, y + width - 7); + + // timing row/col + for (x = 0; x < width - 14; x++) + if (x & 1) { + setmask(8 + x, 6); + setmask(6, 8 + x); + } + else { + qrframe[(8 + x) + width * 6] = 1; + qrframe[6 + width * (8 + x)] = 1; + } + + // version block + if (version > 6) { + t = vpat[version - 7]; + k = 17; + for (x = 0; x < 6; x++) + for (y = 0; y < 3; y++ , k--) + if (1 & (k > 11 ? version >> (k - 12) : t >> k)) { + qrframe[(5 - x) + width * (2 - y + width - 11)] = 1; + qrframe[(2 - y + width - 11) + width * (5 - x)] = 1; + } + else { + setmask(5 - x, 2 - y + width - 11); + setmask(2 - y + width - 11, 5 - x); + } + } + + // sync mask bits - only set above for white spaces, so add in black bits + for (y = 0; y < width; y++) + for (x = 0; x <= y; x++) + if (qrframe[x + width * y]) + setmask(x, y); + + // convert string to bitstream + // 8 bit data to QR-coded 8 bit data (numeric or alphanum, or kanji not supported) + v = strinbuf.length; + + // string to array + for (i = 0; i < v; i++) + eccbuf[i] = strinbuf.charCodeAt(i); + strinbuf = eccbuf.slice(0); + + // calculate max string length + x = datablkw * (neccblk1 + neccblk2) + neccblk2; + if (v >= x - 2) { + v = x - 2; + if (version > 9) + v--; + } + + // shift and repack to insert length prefix + i = v; + if (version > 9) { + strinbuf[i + 2] = 0; + strinbuf[i + 3] = 0; + while (i--) { + t = strinbuf[i]; + strinbuf[i + 3] |= 255 & (t << 4); + strinbuf[i + 2] = t >> 4; + } + strinbuf[2] |= 255 & (v << 4); + strinbuf[1] = v >> 4; + strinbuf[0] = 0x40 | (v >> 12); + } + else { + strinbuf[i + 1] = 0; + strinbuf[i + 2] = 0; + while (i--) { + t = strinbuf[i]; + strinbuf[i + 2] |= 255 & (t << 4); + strinbuf[i + 1] = t >> 4; + } + strinbuf[1] |= 255 & (v << 4); + strinbuf[0] = 0x40 | (v >> 4); + } + // fill to end with pad pattern + i = v + 3 - (version < 10); + while (i < x) { + strinbuf[i++] = 0xec; + // buffer has room if (i == x) break; + strinbuf[i++] = 0x11; + } + + // calculate and append ECC + + // calculate generator polynomial + genpoly[0] = 1; + for (i = 0; i < eccblkwid; i++) { + genpoly[i + 1] = 1; + for (j = i; j > 0; j--) + genpoly[j] = genpoly[j] + ? genpoly[j - 1] ^ gexp[modnn(glog[genpoly[j]] + i)] : genpoly[j - 1]; + genpoly[0] = gexp[modnn(glog[genpoly[0]] + i)]; + } + for (i = 0; i <= eccblkwid; i++) + genpoly[i] = glog[genpoly[i]]; // use logs for genpoly[] to save calc step + + // append ecc to data buffer + k = x; + y = 0; + for (i = 0; i < neccblk1; i++) { + appendrs(y, datablkw, k, eccblkwid); + y += datablkw; + k += eccblkwid; + } + for (i = 0; i < neccblk2; i++) { + appendrs(y, datablkw + 1, k, eccblkwid); + y += datablkw + 1; + k += eccblkwid; + } + // interleave blocks + y = 0; + for (i = 0; i < datablkw; i++) { + for (j = 0; j < neccblk1; j++) + eccbuf[y++] = strinbuf[i + j * datablkw]; + for (j = 0; j < neccblk2; j++) + eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))]; + } + for (j = 0; j < neccblk2; j++) + eccbuf[y++] = strinbuf[(neccblk1 * datablkw) + i + (j * (datablkw + 1))]; + for (i = 0; i < eccblkwid; i++) + for (j = 0; j < neccblk1 + neccblk2; j++) + eccbuf[y++] = strinbuf[x + i + j * eccblkwid]; + strinbuf = eccbuf; + + // pack bits into frame avoiding masked area. + x = y = width - 1; + k = v = 1; // up, minus + /* inteleaved data and ecc codes */ + m = (datablkw + eccblkwid) * (neccblk1 + neccblk2) + neccblk2; + for (i = 0; i < m; i++) { + t = strinbuf[i]; + for (j = 0; j < 8; j++ , t <<= 1) { + if (0x80 & t) + qrframe[x + width * y] = 1; + do { // find next fill position + if (v) + x--; + else { + x++; + if (k) { + if (y != 0) + y--; + else { + x -= 2; + k = !k; + if (x == 6) { + x--; + y = 9; + } + } + } + else { + if (y != width - 1) + y++; + else { + x -= 2; + k = !k; + if (x == 6) { + x--; + y -= 8; + } + } + } + } + v = !v; + } while (ismasked(x, y)); + } + } + + // save pre-mask copy of frame + strinbuf = qrframe.slice(0); + t = 0; // best + y = 30000; // demerit + // for instead of while since in original arduino code + // if an early mask was "good enough" it wouldn't try for a better one + // since they get more complex and take longer. + for (k = 0; k < 8; k++) { + applymask(k); // returns black-white imbalance + x = badcheck(); + if (x < y) { // current mask better than previous best? + y = x; + t = k; + } + if (t == 7) + break; // don't increment i to a void redoing mask + qrframe = strinbuf.slice(0); // reset for next pass + } + if (t != k) // redo best mask - none good enough, last wasn't t + applymask(t); + + // add in final mask/ecclevel bytes + y = fmtword[t + ((ecclevel - 1) << 3)]; + // low byte + for (k = 0; k < 8; k++ , y >>= 1) + if (y & 1) { + qrframe[(width - 1 - k) + width * 8] = 1; + if (k < 6) + qrframe[8 + width * k] = 1; + else + qrframe[8 + width * (k + 1)] = 1; + } + // high byte + for (k = 0; k < 7; k++ , y >>= 1) + if (y & 1) { + qrframe[8 + width * (width - 7 + k)] = 1; + if (k) + qrframe[(6 - k) + width * 8] = 1; + else + qrframe[7 + width * 8] = 1; + } + return qrframe; + } + + + + + var _canvas = null; + + var api = { + + get ecclevel() { + return ecclevel; + }, + + set ecclevel(val) { + ecclevel = val; + }, + + get size() { + return _size; + }, + + set size(val) { + _size = val + }, + + get canvas() { + return _canvas; + }, + + set canvas(el) { + _canvas = el; + }, + + getFrame: function (string) { + return genframe(string); + }, + //这里的utf16to8(str)是对Text中的字符串进行转码,让其支持中文 + utf16to8: function (str) { + var out, i, len, c; + + out = ""; + len = str.length; + for (i = 0; i < len; i++) { + c = str.charCodeAt(i); + if ((c >= 0x0001) && (c <= 0x007F)) { + out += str.charAt(i); + } else if (c > 0x07FF) { + out += String.fromCharCode(0xE0 | ((c >> 12) & 0x0F)); + out += String.fromCharCode(0x80 | ((c >> 6) & 0x3F)); + out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); + } else { + out += String.fromCharCode(0xC0 | ((c >> 6) & 0x1F)); + out += String.fromCharCode(0x80 | ((c >> 0) & 0x3F)); + } + } + return out; + }, + /** + * 新增$this参数,传入组件的this,兼容在组件中生成 + * @param bg 目前只能设置颜色值 + */ + draw: function (str, ctx, startX, startY, cavW, cavH, bg, color, $this, ecc) { + var that = this; + ecclevel = ecc || ecclevel; + if (!ctx) { + console.warn('No canvas provided to draw QR code in!') + return; + } + var size = Math.min(cavW, cavH); + str = that.utf16to8(str);//增加中文显示 + + var frame = that.getFrame(str); + var px = size / width; + if (bg) { + ctx.fillStyle = bg; + ctx.fillRect(startX, startY, cavW, cavW); + } + ctx.fillStyle = color || 'black'; + for (var i = 0; i < width; i++) { + for (var j = 0; j < width; j++) { + if (frame[j * width + i]) { + ctx.fillRect(startX + px * i, startY + px * j, px, px); + } + } + } + } + } + module.exports = { api } + // exports.draw = api; + +})(); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/painter/lib/sha1.js b/eaterplanet_ecommerce/components/painter/lib/sha1.js new file mode 100644 index 0000000..e743ec1 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/sha1.js @@ -0,0 +1,97 @@ +var hexcase = 0; +var chrsz = 8; + +function hex_sha1(s) { + return binb2hex(core_sha1(str2binb(s), s.length * chrsz)); +} + +function core_sha1(x, len) { + x[len >> 5] |= 0x80 << (24 - (len % 32)); + x[(((len + 64) >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for (var i = 0; i < x.length; i += 16) { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for (var j = 0; j < 80; j++) { + if (j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j - 3] ^ w[j - 8] ^ w[j - 14] ^ w[j - 16], 1); + var t = safe_add( + safe_add(rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j)) + ); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); +} + +function sha1_ft(t, b, c, d) { + if (t < 20) return (b & c) | (~b & d); + if (t < 40) return b ^ c ^ d; + if (t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +function sha1_kt(t) { + return t < 20 + ? 1518500249 + : t < 40 + ? 1859775393 + : t < 60 + ? -1894007588 + : -899497514; +} + +function safe_add(x, y) { + var lsw = (x & 0xffff) + (y & 0xffff); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xffff); +} + +function rol(num, cnt) { + return (num << cnt) | (num >>> (32 - cnt)); +} + +function str2binb(str) { + var bin = Array(); + var mask = (1 << chrsz) - 1; + for (var i = 0; i < str.length * chrsz; i += chrsz) + bin[i >> 5] |= (str.charCodeAt(i / chrsz) & mask) << (24 - (i % 32)); + return bin; +} + +function binb2hex(binarray) { + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for (var i = 0; i < binarray.length * 4; i++) { + str += + hex_tab.charAt((binarray[i >> 2] >> ((3 - (i % 4)) * 8 + 4)) & 0xf) + + hex_tab.charAt((binarray[i >> 2] >> ((3 - (i % 4)) * 8)) & 0xf); + } + return str; +} + +module.exports = { + hex_sha1, +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/painter/lib/string-polyfill.js b/eaterplanet_ecommerce/components/painter/lib/string-polyfill.js new file mode 100644 index 0000000..1d13f53 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/string-polyfill.js @@ -0,0 +1,46 @@ +String.prototype.substr = function (start, length) { + if (start === undefined) { + return this.toString() + } + if (typeof start !== 'number' || (typeof length !== 'number' && length !== undefined) ) { + return '' + } + const strArr = [...this] + const _length = strArr.length + if (_length + start < 0) { + start = 0 + } + if (length === undefined || (start < 0 && start + length > 0)) { + return strArr.slice(start).join('') + } else { + return strArr.slice(start, start + length).join('') + } +} + + +String.prototype.substring = function (start, end) { + if (start === undefined) { + return this.toString() + } + if (typeof start !== 'number' || (typeof end !== 'number' && end !== undefined) ) { + return '' + } + if (!(start > 0)) { + start = 0 + } + if (!(end > 0) && end !== undefined) { + end = 0 + } + const strArr = [...this] + const _length = strArr.length + if (start > _length) { + start = _length + } + if (end > _length) { + end = _length + } + if (end < start) { + [start, end] = [end, start] + } + return strArr.slice(start, end).join('') +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/painter/lib/util.js b/eaterplanet_ecommerce/components/painter/lib/util.js new file mode 100644 index 0000000..fb1476a --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/util.js @@ -0,0 +1,78 @@ + +function isValidUrl(url) { + return isOnlineUrl(url) || isDataUrl(url); +} + +function isOnlineUrl(url) { + return /((ht|f)tp(s?)|cloud):\/\/([^ \\/]*\.)+[^ \\/]*(:[0-9]+)?\/?/.test(url) +} + +function isDataUrl(url) { + return /data:image\/(\w+);base64,(.*)/.test(url); +} + +/** + * 深度对比两个对象是否一致 + * from: https://github.com/epoberezkin/fast-deep-equal + * @param {Object} a 对象a + * @param {Object} b 对象b + * @return {Boolean} 是否相同 + */ +/* eslint-disable */ +function equal(a, b) { + if (a === b) return true; + + if (a && b && typeof a == 'object' && typeof b == 'object') { + var arrA = Array.isArray(a) + , arrB = Array.isArray(b) + , i + , length + , key; + + if (arrA && arrB) { + length = a.length; + if (length != b.length) return false; + for (i = length; i-- !== 0;) + if (!equal(a[i], b[i])) return false; + return true; + } + + if (arrA != arrB) return false; + + var dateA = a instanceof Date + , dateB = b instanceof Date; + if (dateA != dateB) return false; + if (dateA && dateB) return a.getTime() == b.getTime(); + + var regexpA = a instanceof RegExp + , regexpB = b instanceof RegExp; + if (regexpA != regexpB) return false; + if (regexpA && regexpB) return a.toString() == b.toString(); + + var keys = Object.keys(a); + length = keys.length; + + if (length !== Object.keys(b).length) + return false; + + for (i = length; i-- !== 0;) + if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false; + + for (i = length; i-- !== 0;) { + key = keys[i]; + if (!equal(a[key], b[key])) return false; + } + + return true; + } + + return a!==a && b!==b; +} + +module.exports = { + isValidUrl, + isOnlineUrl, + isDataUrl, + equal +}; + diff --git a/eaterplanet_ecommerce/components/painter/lib/wx-canvas.js b/eaterplanet_ecommerce/components/painter/lib/wx-canvas.js new file mode 100644 index 0000000..42c8474 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/lib/wx-canvas.js @@ -0,0 +1,619 @@ +// @ts-check +export default class WxCanvas { + ctx; + type; + canvasId; + canvasNode; + stepList = []; + canvasPrototype = {}; + + constructor(type, ctx, canvasId, isNew, canvasNode) { + this.ctx = ctx; + this.canvasId = canvasId; + this.type = type; + if (isNew) { + this.canvasNode = canvasNode || {}; + } + } + + set width(w) { + if (this.canvasNode) { + this.canvasNode.width = w; + // 经测试,在 2d 接口中如果不设置这个值,IOS 端有一定几率会出现图片显示不全的情况。 + this.canvasNode._width = w; + } + } + + get width() { + if (this.canvasNode) return this.canvasNode.width; + return 0; + } + + set height(h) { + if (this.canvasNode) { + this.canvasNode.height = h; + // 经测试,在 2d 接口中如果不设置这个值,IOS 端有一定几率会出现图片显示不全的情况。 + this.canvasNode._height = h; + } + } + + get height() { + if (this.canvasNode) return this.canvasNode.height; + return 0; + } + + set lineWidth(args) { + this.canvasPrototype.lineWidth = args; + this.stepList.push({ + action: "lineWidth", + args, + actionType: "set", + }); + } + + get lineWidth() { + return this.canvasPrototype.lineWidth; + } + + set lineCap(args) { + this.canvasPrototype.lineCap = args; + this.stepList.push({ + action: "lineCap", + args, + actionType: "set", + }); + } + + get lineCap() { + return this.canvasPrototype.lineCap; + } + + set lineJoin(args) { + this.canvasPrototype.lineJoin = args; + this.stepList.push({ + action: "lineJoin", + args, + actionType: "set", + }); + } + + get lineJoin() { + return this.canvasPrototype.lineJoin; + } + + set miterLimit(args) { + this.canvasPrototype.miterLimit = args; + this.stepList.push({ + action: "miterLimit", + args, + actionType: "set", + }); + } + + get miterLimit() { + return this.canvasPrototype.miterLimit; + } + + set lineDashOffset(args) { + this.canvasPrototype.lineDashOffset = args; + this.stepList.push({ + action: "lineDashOffset", + args, + actionType: "set", + }); + } + + get lineDashOffset() { + return this.canvasPrototype.lineDashOffset; + } + + set font(args) { + this.canvasPrototype.font = args; + this.ctx.font = args; + this.stepList.push({ + action: "font", + args, + actionType: "set", + }); + } + + get font() { + return this.canvasPrototype.font; + } + + set textAlign(args) { + this.canvasPrototype.textAlign = args; + this.stepList.push({ + action: "textAlign", + args, + actionType: "set", + }); + } + + get textAlign() { + return this.canvasPrototype.textAlign; + } + + set textBaseline(args) { + this.canvasPrototype.textBaseline = args; + this.stepList.push({ + action: "textBaseline", + args, + actionType: "set", + }); + } + + get textBaseline() { + return this.canvasPrototype.textBaseline; + } + + set fillStyle(args) { + this.canvasPrototype.fillStyle = args; + this.stepList.push({ + action: "fillStyle", + args, + actionType: "set", + }); + } + + get fillStyle() { + return this.canvasPrototype.fillStyle; + } + + set strokeStyle(args) { + this.canvasPrototype.strokeStyle = args; + this.stepList.push({ + action: "strokeStyle", + args, + actionType: "set", + }); + } + + get strokeStyle() { + return this.canvasPrototype.strokeStyle; + } + + set globalAlpha(args) { + this.canvasPrototype.globalAlpha = args; + this.stepList.push({ + action: "globalAlpha", + args, + actionType: "set", + }); + } + + get globalAlpha() { + return this.canvasPrototype.globalAlpha; + } + + set globalCompositeOperation(args) { + this.canvasPrototype.globalCompositeOperation = args; + this.stepList.push({ + action: "globalCompositeOperation", + args, + actionType: "set", + }); + } + + get globalCompositeOperation() { + return this.canvasPrototype.globalCompositeOperation; + } + + set shadowColor(args) { + this.canvasPrototype.shadowColor = args; + this.stepList.push({ + action: "shadowColor", + args, + actionType: "set", + }); + } + + get shadowColor() { + return this.canvasPrototype.shadowColor; + } + + set shadowOffsetX(args) { + this.canvasPrototype.shadowOffsetX = args; + this.stepList.push({ + action: "shadowOffsetX", + args, + actionType: "set", + }); + } + + get shadowOffsetX() { + return this.canvasPrototype.shadowOffsetX; + } + + set shadowOffsetY(args) { + this.canvasPrototype.shadowOffsetY = args; + this.stepList.push({ + action: "shadowOffsetY", + args, + actionType: "set", + }); + } + + get shadowOffsetY() { + return this.canvasPrototype.shadowOffsetY; + } + + set shadowBlur(args) { + this.canvasPrototype.shadowBlur = args; + this.stepList.push({ + action: "shadowBlur", + args, + actionType: "set", + }); + } + + get shadowBlur() { + return this.canvasPrototype.shadowBlur; + } + + save() { + this.stepList.push({ + action: "save", + args: null, + actionType: "func", + }); + } + + restore() { + this.stepList.push({ + action: "restore", + args: null, + actionType: "func", + }); + } + + setLineDash(...args) { + this.canvasPrototype.lineDash = args; + this.stepList.push({ + action: "setLineDash", + args, + actionType: "func", + }); + } + + moveTo(...args) { + this.stepList.push({ + action: "moveTo", + args, + actionType: "func", + }); + } + + closePath() { + this.stepList.push({ + action: "closePath", + args: null, + actionType: "func", + }); + } + + lineTo(...args) { + this.stepList.push({ + action: "lineTo", + args, + actionType: "func", + }); + } + + quadraticCurveTo(...args) { + this.stepList.push({ + action: "quadraticCurveTo", + args, + actionType: "func", + }); + } + + bezierCurveTo(...args) { + this.stepList.push({ + action: "bezierCurveTo", + args, + actionType: "func", + }); + } + + arcTo(...args) { + this.stepList.push({ + action: "arcTo", + args, + actionType: "func", + }); + } + + arc(...args) { + this.stepList.push({ + action: "arc", + args, + actionType: "func", + }); + } + + rect(...args) { + this.stepList.push({ + action: "rect", + args, + actionType: "func", + }); + } + + scale(...args) { + this.stepList.push({ + action: "scale", + args, + actionType: "func", + }); + } + + rotate(...args) { + this.stepList.push({ + action: "rotate", + args, + actionType: "func", + }); + } + + translate(...args) { + this.stepList.push({ + action: "translate", + args, + actionType: "func", + }); + } + + transform(...args) { + this.stepList.push({ + action: "transform", + args, + actionType: "func", + }); + } + + setTransform(...args) { + this.stepList.push({ + action: "setTransform", + args, + actionType: "func", + }); + } + + clearRect(...args) { + this.stepList.push({ + action: "clearRect", + args, + actionType: "func", + }); + } + + fillRect(...args) { + this.stepList.push({ + action: "fillRect", + args, + actionType: "func", + }); + } + + strokeRect(...args) { + this.stepList.push({ + action: "strokeRect", + args, + actionType: "func", + }); + } + + fillText(...args) { + this.stepList.push({ + action: "fillText", + args, + actionType: "func", + }); + } + + strokeText(...args) { + this.stepList.push({ + action: "strokeText", + args, + actionType: "func", + }); + } + + beginPath() { + this.stepList.push({ + action: "beginPath", + args: null, + actionType: "func", + }); + } + + fill() { + this.stepList.push({ + action: "fill", + args: null, + actionType: "func", + }); + } + + stroke() { + this.stepList.push({ + action: "stroke", + args: null, + actionType: "func", + }); + } + + drawFocusIfNeeded(...args) { + this.stepList.push({ + action: "drawFocusIfNeeded", + args, + actionType: "func", + }); + } + + clip() { + this.stepList.push({ + action: "clip", + args: null, + actionType: "func", + }); + } + + isPointInPath(...args) { + this.stepList.push({ + action: "isPointInPath", + args, + actionType: "func", + }); + } + + drawImage(...args) { + this.stepList.push({ + action: "drawImage", + args, + actionType: "func", + }); + } + + addHitRegion(...args) { + this.stepList.push({ + action: "addHitRegion", + args, + actionType: "func", + }); + } + + removeHitRegion(...args) { + this.stepList.push({ + action: "removeHitRegion", + args, + actionType: "func", + }); + } + + clearHitRegions(...args) { + this.stepList.push({ + action: "clearHitRegions", + args, + actionType: "func", + }); + } + + putImageData(...args) { + this.stepList.push({ + action: "putImageData", + args, + actionType: "func", + }); + } + + getLineDash() { + return this.canvasPrototype.lineDash; + } + + createLinearGradient(...args) { + return this.ctx.createLinearGradient(...args); + } + + createRadialGradient(...args) { + if (this.type === "2d") { + return this.ctx.createRadialGradient(...args); + } else { + return this.ctx.createCircularGradient(...args.slice(3, 6)); + } + } + + createPattern(...args) { + return this.ctx.createPattern(...args); + } + + measureText(...args) { + return this.ctx.measureText(...args); + } + + createImageData(...args) { + return this.ctx.createImageData(...args); + } + + getImageData(...args) { + return this.ctx.getImageData(...args); + } + + async draw(reserve, func) { + const realstepList = this.stepList.slice(); + this.stepList.length = 0; + if (this.type === "mina") { + if (realstepList.length > 0) { + for (const step of realstepList) { + this.implementMinaStep(step); + } + realstepList.length = 0; + } + this.ctx.draw(reserve, func); + } else if (this.type === "2d") { + if (!reserve) { + this.ctx.clearRect(0, 0, this.canvasNode.width, this.canvasNode.height); + } + if (realstepList.length > 0) { + for (const step of realstepList) { + await this.implement2DStep(step); + } + realstepList.length = 0; + } + if (func) { + func(); + } + } + realstepList.length = 0; + } + + implementMinaStep(step) { + switch (step.action) { + case "textAlign": { + this.ctx.setTextAlign(step.args); + break; + } + case "textBaseline": { + this.ctx.setTextBaseline(step.args); + break; + } + default: { + if (step.actionType === "set") { + this.ctx[step.action] = step.args; + } else if (step.actionType === "func") { + if (step.args) { + this.ctx[step.action](...step.args); + } else { + this.ctx[step.action](); + } + } + break; + } + } + } + + implement2DStep(step) { + return new Promise((resolve) => { + if (step.action === "drawImage") { + const img = this.canvasNode.createImage(); + img.src = step.args[0]; + img.onload = () => { + this.ctx.drawImage(img, ...step.args.slice(1)); + resolve(); + }; + } else { + if (step.actionType === "set") { + this.ctx[step.action] = step.args; + } else if (step.actionType === "func") { + if (step.args) { + this.ctx[step.action](...step.args); + } else { + this.ctx[step.action](); + } + } + resolve(); + } + }); + } +} diff --git a/eaterplanet_ecommerce/components/painter/painter.js b/eaterplanet_ecommerce/components/painter/painter.js new file mode 100644 index 0000000..7ee9764 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/painter.js @@ -0,0 +1,869 @@ +import Pen, { penCache, clearPenCache } from './lib/pen'; +import Downloader from './lib/downloader'; +import WxCanvas from './lib/wx-canvas'; + +const util = require('./lib/util'); +const calc = require('./lib/calc'); + +const downloader = new Downloader(); + +// 最大尝试的绘制次数 +const MAX_PAINT_COUNT = 5; +const ACTION_DEFAULT_SIZE = 24; +const ACTION_OFFSET = '2rpx'; +Component({ + canvasWidthInPx: 0, + canvasHeightInPx: 0, + canvasNode: null, + paintCount: 0, + currentPalette: {}, + outterDisabled: false, + isDisabled: false, + needClear: false, + /** + * 组件的属性列表 + */ + properties: { + use2D: { + type: Boolean, + }, + customStyle: { + type: String, + }, + // 运行自定义选择框和删除缩放按钮 + customActionStyle: { + type: Object, + }, + palette: { + type: Object, + observer: function (newVal, oldVal) { + if (this.isNeedRefresh(newVal, oldVal)) { + this.paintCount = 0; + clearPenCache(); + this.startPaint(); + } + }, + }, + dancePalette: { + type: Object, + observer: function (newVal, oldVal) { + if (!this.isEmpty(newVal) && !this.properties.use2D) { + clearPenCache(); + this.initDancePalette(newVal); + } + }, + }, + // 缩放比,会在传入的 palette 中统一乘以该缩放比 + scaleRatio: { + type: Number, + value: 1, + }, + widthPixels: { + type: Number, + value: 0, + }, + // 启用脏检查,默认 false + dirty: { + type: Boolean, + value: false, + }, + LRU: { + type: Boolean, + value: false, + }, + action: { + type: Object, + observer: function (newVal, oldVal) { + if (newVal && !this.isEmpty(newVal) && !this.properties.use2D) { + this.doAction(newVal, null, false, true); + } + }, + }, + disableAction: { + type: Boolean, + observer: function (isDisabled) { + this.outterDisabled = isDisabled; + this.isDisabled = isDisabled; + }, + }, + clearActionBox: { + type: Boolean, + observer: function (needClear) { + if (needClear && !this.needClear) { + if (this.frontContext) { + setTimeout(() => { + this.frontContext.draw(); + }, 100); + this.touchedView = {}; + this.prevFindedIndex = this.findedIndex; + this.findedIndex = -1; + } + } + this.needClear = needClear; + }, + }, + }, + + data: { + picURL: '', + showCanvas: true, + painterStyle: '', + }, + + methods: { + /** + * 判断一个 object 是否为 空 + * @param {object} object + */ + isEmpty(object) { + for (const i in object) { + return false; + } + return true; + }, + + isNeedRefresh(newVal, oldVal) { + if (!newVal || this.isEmpty(newVal) || (this.data.dirty && util.equal(newVal, oldVal))) { + return false; + } + return true; + }, + + getBox(rect, type) { + const boxArea = { + type: 'rect', + css: { + height: `${rect.bottom - rect.top}px`, + width: `${rect.right - rect.left}px`, + left: `${rect.left}px`, + top: `${rect.top}px`, + borderWidth: '4rpx', + borderColor: '#1A7AF8', + color: 'transparent', + }, + }; + if (type === 'text') { + boxArea.css = Object.assign({}, boxArea.css, { + borderStyle: 'dashed', + }); + } + if (this.properties.customActionStyle && this.properties.customActionStyle.border) { + boxArea.css = Object.assign({}, boxArea.css, this.properties.customActionStyle.border); + } + Object.assign(boxArea, { + id: 'box', + }); + return boxArea; + }, + + getScaleIcon(rect, type) { + let scaleArea = {}; + const { customActionStyle } = this.properties; + if (customActionStyle && customActionStyle.scale) { + scaleArea = { + type: 'image', + url: type === 'text' ? customActionStyle.scale.textIcon : customActionStyle.scale.imageIcon, + css: { + height: `${2 * ACTION_DEFAULT_SIZE}rpx`, + width: `${2 * ACTION_DEFAULT_SIZE}rpx`, + borderRadius: `${ACTION_DEFAULT_SIZE}rpx`, + }, + }; + } else { + scaleArea = { + type: 'rect', + css: { + height: `${2 * ACTION_DEFAULT_SIZE}rpx`, + width: `${2 * ACTION_DEFAULT_SIZE}rpx`, + borderRadius: `${ACTION_DEFAULT_SIZE}rpx`, + color: '#0000ff', + }, + }; + } + scaleArea.css = Object.assign({}, scaleArea.css, { + align: 'center', + left: `${rect.right + ACTION_OFFSET.toPx()}px`, + top: + type === 'text' + ? `${rect.top - ACTION_OFFSET.toPx() - scaleArea.css.height.toPx() / 2}px` + : `${rect.bottom - ACTION_OFFSET.toPx() - scaleArea.css.height.toPx() / 2}px`, + }); + Object.assign(scaleArea, { + id: 'scale', + }); + return scaleArea; + }, + + getDeleteIcon(rect) { + let deleteArea = {}; + const { customActionStyle } = this.properties; + if (customActionStyle && customActionStyle.scale) { + deleteArea = { + type: 'image', + url: customActionStyle.delete.icon, + css: { + height: `${2 * ACTION_DEFAULT_SIZE}rpx`, + width: `${2 * ACTION_DEFAULT_SIZE}rpx`, + borderRadius: `${ACTION_DEFAULT_SIZE}rpx`, + }, + }; + } else { + deleteArea = { + type: 'rect', + css: { + height: `${2 * ACTION_DEFAULT_SIZE}rpx`, + width: `${2 * ACTION_DEFAULT_SIZE}rpx`, + borderRadius: `${ACTION_DEFAULT_SIZE}rpx`, + color: '#0000ff', + }, + }; + } + deleteArea.css = Object.assign({}, deleteArea.css, { + align: 'center', + left: `${rect.left - ACTION_OFFSET.toPx()}px`, + top: `${rect.top - ACTION_OFFSET.toPx() - deleteArea.css.height.toPx() / 2}px`, + }); + Object.assign(deleteArea, { + id: 'delete', + }); + return deleteArea; + }, + + doAction(action, callback, isMoving, overwrite) { + if (this.properties.use2D) { + return; + } + let newVal = null; + if (action) { + newVal = action.view; + } + if (newVal && newVal.id && this.touchedView.id !== newVal.id) { + // 带 id 的动作给撤回时使用,不带 id,表示对当前选中对象进行操作 + const { views } = this.currentPalette; + for (let i = 0; i < views.length; i++) { + if (views[i].id === newVal.id) { + // 跨层回撤,需要重新构建三层关系 + this.touchedView = views[i]; + this.findedIndex = i; + this.sliceLayers(); + break; + } + } + } + + const doView = this.touchedView; + + if (!doView || this.isEmpty(doView)) { + return; + } + if (newVal && newVal.css) { + if (overwrite) { + doView.css = newVal.css; + } else if (Array.isArray(doView.css) && Array.isArray(newVal.css)) { + doView.css = Object.assign({}, ...doView.css, ...newVal.css); + } else if (Array.isArray(doView.css)) { + doView.css = Object.assign({}, ...doView.css, newVal.css); + } else if (Array.isArray(newVal.css)) { + doView.css = Object.assign({}, doView.css, ...newVal.css); + } else { + doView.css = Object.assign({}, doView.css, newVal.css); + } + } + if (newVal && newVal.rect) { + doView.rect = newVal.rect; + } + if (newVal && newVal.url && doView.url && newVal.url !== doView.url) { + downloader + .download(newVal.url, this.properties.LRU) + .then(path => { + if (newVal.url.startsWith('https')) { + doView.originUrl = newVal.url; + } + doView.url = path; + wx.getImageInfo({ + src: path, + success: res => { + doView.sHeight = res.height; + doView.sWidth = res.width; + this.reDraw(doView, callback, isMoving); + }, + fail: () => { + this.reDraw(doView, callback, isMoving); + }, + }); + }) + .catch(error => { + // 未下载成功,直接绘制 + console.error(error); + this.reDraw(doView, callback, isMoving); + }); + } else { + newVal && newVal.text && doView.text && newVal.text !== doView.text && (doView.text = newVal.text); + newVal && + newVal.content && + doView.content && + newVal.content !== doView.content && + (doView.content = newVal.content); + this.reDraw(doView, callback, isMoving); + } + }, + + reDraw(doView, callback, isMoving) { + const draw = { + width: this.currentPalette.width, + height: this.currentPalette.height, + views: this.isEmpty(doView) ? [] : [doView], + }; + const pen = new Pen(this.globalContext, draw); + + pen.paint(callbackInfo => { + callback && callback(callbackInfo); + this.triggerEvent('viewUpdate', { + view: this.touchedView, + }); + }); + + const { rect, css, type } = doView; + + this.block = { + width: this.currentPalette.width, + height: this.currentPalette.height, + views: this.isEmpty(doView) ? [] : [this.getBox(rect, doView.type)], + }; + if (css && css.scalable) { + this.block.views.push(this.getScaleIcon(rect, type)); + } + if (css && css.deletable) { + this.block.views.push(this.getDeleteIcon(rect)); + } + const topBlock = new Pen(this.frontContext, this.block); + topBlock.paint(); + }, + + isInView(x, y, rect) { + return x > rect.left && y > rect.top && x < rect.right && y < rect.bottom; + }, + + isInDelete(x, y) { + for (const view of this.block.views) { + if (view.id === 'delete') { + return x > view.rect.left && y > view.rect.top && x < view.rect.right && y < view.rect.bottom; + } + } + return false; + }, + + isInScale(x, y) { + for (const view of this.block.views) { + if (view.id === 'scale') { + return x > view.rect.left && y > view.rect.top && x < view.rect.right && y < view.rect.bottom; + } + } + return false; + }, + + touchedView: {}, + findedIndex: -1, + onClick() { + const x = this.startX; + const y = this.startY; + const totalLayerCount = this.currentPalette.views.length; + let canBeTouched = []; + let isDelete = false; + let deleteIndex = -1; + for (let i = totalLayerCount - 1; i >= 0; i--) { + const view = this.currentPalette.views[i]; + const { rect } = view; + if (this.touchedView && this.touchedView.id && this.touchedView.id === view.id && this.isInDelete(x, y, rect)) { + canBeTouched.length = 0; + deleteIndex = i; + isDelete = true; + break; + } + if (this.isInView(x, y, rect)) { + canBeTouched.push({ + view, + index: i, + }); + } + } + this.touchedView = {}; + if (canBeTouched.length === 0) { + this.findedIndex = -1; + } else { + let i = 0; + const touchAble = canBeTouched.filter(item => Boolean(item.view.id)); + if (touchAble.length === 0) { + this.findedIndex = canBeTouched[0].index; + } else { + for (i = 0; i < touchAble.length; i++) { + if (this.findedIndex === touchAble[i].index) { + i++; + break; + } + } + if (i === touchAble.length) { + i = 0; + } + this.touchedView = touchAble[i].view; + this.findedIndex = touchAble[i].index; + this.triggerEvent('viewClicked', { + view: this.touchedView, + }); + } + } + if (this.findedIndex < 0 || (this.touchedView && !this.touchedView.id)) { + // 证明点击了背景 或无法移动的view + this.frontContext.draw(); + if (isDelete) { + this.triggerEvent('touchEnd', { + view: this.currentPalette.views[deleteIndex], + index: deleteIndex, + type: 'delete', + }); + this.doAction(); + } else if (this.findedIndex < 0) { + this.triggerEvent('viewClicked', {}); + } + this.findedIndex = -1; + this.prevFindedIndex = -1; + } else if (this.touchedView && this.touchedView.id) { + this.sliceLayers(); + } + }, + + sliceLayers() { + const bottomLayers = this.currentPalette.views.slice(0, this.findedIndex); + const topLayers = this.currentPalette.views.slice(this.findedIndex + 1); + const bottomDraw = { + width: this.currentPalette.width, + height: this.currentPalette.height, + background: this.currentPalette.background, + views: bottomLayers, + }; + const topDraw = { + width: this.currentPalette.width, + height: this.currentPalette.height, + views: topLayers, + }; + if (this.prevFindedIndex < this.findedIndex) { + new Pen(this.bottomContext, bottomDraw).paint(); + this.doAction(); + new Pen(this.topContext, topDraw).paint(); + } else { + new Pen(this.topContext, topDraw).paint(); + this.doAction(); + new Pen(this.bottomContext, bottomDraw).paint(); + } + this.prevFindedIndex = this.findedIndex; + }, + + startX: 0, + startY: 0, + startH: 0, + startW: 0, + isScale: false, + startTimeStamp: 0, + onTouchStart(event) { + if (this.isDisabled) { + return; + } + const { x, y } = event.touches[0]; + this.startX = x; + this.startY = y; + this.startTimeStamp = new Date().getTime(); + if (this.touchedView && !this.isEmpty(this.touchedView)) { + const { rect } = this.touchedView; + if (this.isInScale(x, y, rect)) { + this.isScale = true; + this.startH = rect.bottom - rect.top; + this.startW = rect.right - rect.left; + } else { + this.isScale = false; + } + } else { + this.isScale = false; + } + }, + + onTouchEnd(e) { + if (this.isDisabled) { + return; + } + const current = new Date().getTime(); + if (current - this.startTimeStamp <= 500 && !this.hasMove) { + !this.isScale && this.onClick(e); + } else if (this.touchedView && !this.isEmpty(this.touchedView)) { + this.triggerEvent('touchEnd', { + view: this.touchedView, + }); + } + this.hasMove = false; + }, + + onTouchCancel(e) { + if (this.isDisabled) { + return; + } + this.onTouchEnd(e); + }, + + hasMove: false, + onTouchMove(event) { + if (this.isDisabled) { + return; + } + this.hasMove = true; + if (!this.touchedView || (this.touchedView && !this.touchedView.id)) { + return; + } + const { x, y } = event.touches[0]; + const offsetX = x - this.startX; + const offsetY = y - this.startY; + const { rect, type } = this.touchedView; + let css = {}; + if (this.isScale) { + clearPenCache(this.touchedView.id); + const newW = this.startW + offsetX > 1 ? this.startW + offsetX : 1; + if (this.touchedView.css && this.touchedView.css.minWidth) { + if (newW < this.touchedView.css.minWidth.toPx()) { + return; + } + } + if (this.touchedView.rect && this.touchedView.rect.minWidth) { + if (newW < this.touchedView.rect.minWidth) { + return; + } + } + const newH = this.startH + offsetY > 1 ? this.startH + offsetY : 1; + css = { + width: `${newW}px`, + }; + if (type !== 'text') { + if (type === 'image') { + css.height = `${(newW * this.startH) / this.startW}px`; + } else { + css.height = `${newH}px`; + } + } + } else { + this.startX = x; + this.startY = y; + css = { + left: `${rect.x + offsetX}px`, + top: `${rect.y + offsetY}px`, + right: undefined, + bottom: undefined, + }; + } + this.doAction( + { + view: { + css, + }, + }, + null, + !this.isScale, + ); + }, + + initScreenK() { + if (!(getApp() && getApp().systemInfo && getApp().systemInfo.screenWidth)) { + try { + getApp().systemInfo = wx.getSystemInfoSync(); + } catch (e) { + console.error(`Painter get system info failed, ${JSON.stringify(e)}`); + return; + } + } + this.screenK = 0.5; + if (getApp() && getApp().systemInfo && getApp().systemInfo.screenWidth) { + this.screenK = getApp().systemInfo.screenWidth / 750; + } + setStringPrototype(this.screenK, this.properties.scaleRatio); + }, + + initDancePalette() { + if (this.properties.use2D) { + return; + } + this.isDisabled = true; + this.initScreenK(); + this.downloadImages(this.properties.dancePalette).then(async palette => { + this.currentPalette = palette; + const { width, height } = palette; + + if (!width || !height) { + console.error(`You should set width and height correctly for painter, width: ${width}, height: ${height}`); + return; + } + this.setData({ + painterStyle: `width:${width.toPx()}px;height:${height.toPx()}px;`, + }); + this.frontContext || (this.frontContext = await this.getCanvasContext(this.properties.use2D, 'front')); + this.bottomContext || (this.bottomContext = await this.getCanvasContext(this.properties.use2D, 'bottom')); + this.topContext || (this.topContext = await this.getCanvasContext(this.properties.use2D, 'top')); + this.globalContext || (this.globalContext = await this.getCanvasContext(this.properties.use2D, 'k-canvas')); + new Pen(this.bottomContext, palette, this.properties.use2D).paint(() => { + this.isDisabled = false; + this.isDisabled = this.outterDisabled; + this.triggerEvent('didShow'); + }); + this.globalContext.draw(); + this.frontContext.draw(); + this.topContext.draw(); + }); + this.touchedView = {}; + }, + + startPaint() { + this.initScreenK(); + const { width, height } = this.properties.palette; + + if (!width || !height) { + console.error(`You should set width and height correctly for painter, width: ${width}, height: ${height}`); + return; + } + + let needScale = false; + // 生成图片时,根据设置的像素值重新绘制 + if (width.toPx() !== this.canvasWidthInPx) { + this.canvasWidthInPx = width.toPx(); + needScale = this.properties.use2D; + } + if (this.properties.widthPixels) { + setStringPrototype(this.screenK, this.properties.widthPixels / this.canvasWidthInPx); + this.canvasWidthInPx = this.properties.widthPixels; + } + + if (this.canvasHeightInPx !== height.toPx()) { + this.canvasHeightInPx = height.toPx(); + needScale = needScale || this.properties.use2D; + } + this.setData( + { + photoStyle: `width:${this.canvasWidthInPx}px;height:${this.canvasHeightInPx}px;`, + }, + function () { + this.downloadImages(this.properties.palette).then(async palette => { + if (!this.photoContext) { + this.photoContext = await this.getCanvasContext(this.properties.use2D, 'photo'); + } + if (needScale) { + const scale = getApp().systemInfo.pixelRatio; + this.photoContext.width = this.canvasWidthInPx * scale; + this.photoContext.height = this.canvasHeightInPx * scale; + this.photoContext.scale(scale, scale); + } + new Pen(this.photoContext, palette).paint(() => { + this.saveImgToLocal(); + }); + setStringPrototype(this.screenK, this.properties.scaleRatio); + }); + }, + ); + }, + + downloadImages(palette) { + return new Promise((resolve, reject) => { + let preCount = 0; + let completeCount = 0; + const paletteCopy = JSON.parse(JSON.stringify(palette)); + if (paletteCopy.background) { + preCount++; + downloader.download(paletteCopy.background, this.properties.LRU).then( + path => { + paletteCopy.background = path; + completeCount++; + if (preCount === completeCount) { + resolve(paletteCopy); + } + }, + () => { + completeCount++; + if (preCount === completeCount) { + resolve(paletteCopy); + } + }, + ); + } + if (paletteCopy.views) { + for (const view of paletteCopy.views) { + if (view && view.type === 'image' && view.url) { + preCount++; + /* eslint-disable no-loop-func */ + downloader.download(view.url, this.properties.LRU).then( + path => { + view.originUrl = view.url; + view.url = path; + wx.getImageInfo({ + src: path, + success: res => { + // 获得一下图片信息,供后续裁减使用 + view.sWidth = res.width; + view.sHeight = res.height; + }, + fail: error => { + // 如果图片坏了,则直接置空,防止坑爹的 canvas 画崩溃了 + console.warn(`getImageInfo ${view.originUrl} failed, ${JSON.stringify(error)}`); + view.url = ''; + }, + complete: () => { + completeCount++; + if (preCount === completeCount) { + resolve(paletteCopy); + } + }, + }); + }, + () => { + completeCount++; + if (preCount === completeCount) { + resolve(paletteCopy); + } + }, + ); + } + } + } + if (preCount === 0) { + resolve(paletteCopy); + } + }); + }, + + saveImgToLocal() { + const that = this; + const optionsOf2d = { + canvas: that.canvasNode, + } + const optionsOfOld = { + canvasId: 'photo', + destWidth: that.canvasWidthInPx, + destHeight: that.canvasHeightInPx, + } + setTimeout(() => { + wx.canvasToTempFilePath( + { + ...(that.properties.use2D ? optionsOf2d : optionsOfOld), + success: function (res) { + that.getImageInfo(res.tempFilePath); + }, + fail: function (error) { + console.error(`canvasToTempFilePath failed, ${JSON.stringify(error)}`); + that.triggerEvent('imgErr', { + error: error, + }); + }, + }, + this, + ); + }, 300); + }, + + getCanvasContext(use2D, id) { + const that = this; + return new Promise(resolve => { + if (use2D) { + const query = wx.createSelectorQuery().in(that); + const selectId = `#${id}`; + query + .select(selectId) + .fields({ node: true, size: true }) + .exec(res => { + that.canvasNode = res[0].node; + const ctx = that.canvasNode.getContext('2d'); + const wxCanvas = new WxCanvas('2d', ctx, id, true, that.canvasNode); + resolve(wxCanvas); + }); + } else { + const temp = wx.createCanvasContext(id, that); + resolve(new WxCanvas('mina', temp, id, true)); + } + }); + }, + + getImageInfo(filePath) { + const that = this; + wx.getImageInfo({ + src: filePath, + success: infoRes => { + if (that.paintCount > MAX_PAINT_COUNT) { + const error = `The result is always fault, even we tried ${MAX_PAINT_COUNT} times`; + console.error(error); + that.triggerEvent('imgErr', { + error: error, + }); + return; + } + // 比例相符时才证明绘制成功,否则进行强制重绘制 + if ( + Math.abs( + (infoRes.width * that.canvasHeightInPx - that.canvasWidthInPx * infoRes.height) / + (infoRes.height * that.canvasHeightInPx), + ) < 0.01 + ) { + that.triggerEvent('imgOK', { + path: filePath, + }); + } else { + that.startPaint(); + } + that.paintCount++; + }, + fail: error => { + console.error(`getImageInfo failed, ${JSON.stringify(error)}`); + that.triggerEvent('imgErr', { + error: error, + }); + }, + }); + }, + }, +}); + +function setStringPrototype(screenK, scale) { + /* eslint-disable no-extend-native */ + /** + * string 到对应的 px + * @param {Number} baseSize 当设置了 % 号时,设置的基准值 + */ + String.prototype.toPx = function toPx(_, baseSize) { + if (this === '0') { + return 0; + } + const REG = /-?[0-9]+(\.[0-9]+)?(rpx|px|%)/; + + const parsePx = origin => { + const results = new RegExp(REG).exec(origin); + if (!origin || !results) { + console.error(`The size: ${origin} is illegal`); + return 0; + } + const unit = results[2]; + const value = parseFloat(origin); + + let res = 0; + if (unit === 'rpx') { + res = Math.round(value * (screenK || 0.5) * (scale || 1)); + } else if (unit === 'px') { + res = Math.round(value * (scale || 1)); + } else if (unit === '%') { + res = Math.round((value * baseSize) / 100); + } + return res; + }; + const formula = /^calc\((.+)\)$/.exec(this); + if (formula && formula[1]) { + // 进行 calc 计算 + const afterOne = formula[1].replace(/([^\s\(\+\-\*\/]+)\.(left|right|bottom|top|width|height)/g, word => { + const [id, attr] = word.split('.'); + return penCache.viewRect[id][attr]; + }); + const afterTwo = afterOne.replace(new RegExp(REG, 'g'), parsePx); + return calc(afterTwo); + } else { + return parsePx(this); + } + }; +} diff --git a/eaterplanet_ecommerce/components/painter/painter.json b/eaterplanet_ecommerce/components/painter/painter.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/painter.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/painter/painter.wxml b/eaterplanet_ecommerce/components/painter/painter.wxml new file mode 100644 index 0000000..369e169 --- /dev/null +++ b/eaterplanet_ecommerce/components/painter/painter.wxml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/components/parser/libs/CssHandler.js b/eaterplanet_ecommerce/components/parser/libs/CssHandler.js new file mode 100644 index 0000000..a238794 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/libs/CssHandler.js @@ -0,0 +1,97 @@ +const cfg = require('./config.js'), + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + +function CssHandler(tagStyle) { + var styles = Object.assign(Object.create(null), cfg.userAgentStyles); + for (var item in tagStyle) + styles[item] = (styles[item] ? styles[item] + ';' : '') + tagStyle[item]; + this.styles = styles; +} +CssHandler.prototype.getStyle = function (data) { + this.styles = new parser(data, this.styles).parse(); +} +CssHandler.prototype.match = function (name, attrs) { + var tmp, matched = (tmp = this.styles[name]) ? tmp + ';' : ''; + if (attrs.class) { + var items = attrs.class.split(' '); + for (var i = 0, item; item = items[i]; i++) + if (tmp = this.styles['.' + item]) + matched += tmp + ';'; + } + if (tmp = this.styles['#' + attrs.id]) + matched += tmp + ';'; + return matched; +} +module.exports = CssHandler; + +function parser(data, init) { + this.data = data; + this.floor = 0; + this.i = 0; + this.list = []; + this.res = init; + this.state = this.Space; +} +parser.prototype.parse = function () { + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + return this.res; +} +parser.prototype.section = function () { + return this.data.substring(this.start, this.i); +} +// 状态机 +parser.prototype.Space = function (c) { + if (c == '.' || c == '#' || isLetter(c)) { + this.start = this.i; + this.state = this.Name; + } else if (c == '/' && this.data[this.i + 1] == '*') + this.Comment(); + else if (!cfg.blankChar[c] && c != ';') + this.state = this.Ignore; +} +parser.prototype.Comment = function () { + this.i = this.data.indexOf('*/', this.i) + 1; + if (!this.i) this.i = this.data.length; + this.state = this.Space; +} +parser.prototype.Ignore = function (c) { + if (c == '{') this.floor++; + else if (c == '}' && !--this.floor) this.state = this.Space; +} +parser.prototype.Name = function (c) { + if (cfg.blankChar[c]) { + this.list.push(this.section()); + this.state = this.NameSpace; + } else if (c == '{') { + this.list.push(this.section()); + this.Content(); + } else if (c == ',') { + this.list.push(this.section()); + this.Comma(); + } else if (!isLetter(c) && (c < '0' || c > '9') && c != '-' && c != '_') + this.state = this.Ignore; +} +parser.prototype.NameSpace = function (c) { + if (c == '{') this.Content(); + else if (c == ',') this.Comma(); + else if (!cfg.blankChar[c]) this.state = this.Ignore; +} +parser.prototype.Comma = function () { + while (cfg.blankChar[this.data[++this.i]]); + if (this.data[this.i] == '{') this.Content(); + else { + this.start = this.i--; + this.state = this.Name; + } +} +parser.prototype.Content = function () { + this.start = ++this.i; + if ((this.i = this.data.indexOf('}', this.i)) == -1) this.i = this.data.length; + var content = this.section(); + for (var i = 0, item; item = this.list[i++];) + if (this.res[item]) this.res[item] += ';' + content; + else this.res[item] = content; + this.list = []; + this.state = this.Space; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/libs/MpHtmlParser.js b/eaterplanet_ecommerce/components/parser/libs/MpHtmlParser.js new file mode 100644 index 0000000..0b83cf8 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/libs/MpHtmlParser.js @@ -0,0 +1,526 @@ +/** + * html 解析器 + * @tutorial https://github.com/jin-yufeng/Parser + * @version 20200630 + * @author JinYufeng + * @listens MIT + */ +const cfg = require('./config.js'), + blankChar = cfg.blankChar, + CssHandler = require('./CssHandler.js'), + windowWidth = wx.getSystemInfoSync().windowWidth; +var emoji; + +function MpHtmlParser(data, options = {}) { + this.attrs = {}; + this.CssHandler = new CssHandler(options.tagStyle, windowWidth); + this.data = data; + this.domain = options.domain; + this.DOM = []; + this.i = this.start = this.audioNum = this.imgNum = this.videoNum = 0; + options.prot = (this.domain || '').includes('://') ? this.domain.split('://')[0] : 'http'; + this.options = options; + this.state = this.Text; + this.STACK = []; + // 工具函数 + this.bubble = () => { + for (var i = this.STACK.length, item; item = this.STACK[--i];) { + if (cfg.richOnlyTags[item.name]) { + if (item.name == 'table' && !Object.hasOwnProperty.call(item, 'c')) item.c = 1; + return false; + } + item.c = 1; + } + return true; + } + this.decode = (val, amp) => { + var i = -1, + j, en; + while (1) { + if ((i = val.indexOf('&', i + 1)) == -1) break; + if ((j = val.indexOf(';', i + 2)) == -1) break; + if (val[i + 1] == '#') { + en = parseInt((val[i + 2] == 'x' ? '0' : '') + val.substring(i + 2, j)); + if (!isNaN(en)) val = val.substr(0, i) + String.fromCharCode(en) + val.substr(j + 1); + } else { + en = val.substring(i + 1, j); + if (cfg.entities[en] || en == amp) + val = val.substr(0, i) + (cfg.entities[en] || '&') + val.substr(j + 1); + } + } + return val; + } + this.getUrl = url => { + if (url[0] == '/') { + if (url[1] == '/') url = this.options.prot + ':' + url; + else if (this.domain) url = this.domain + url; + } else if (this.domain && url.indexOf('data:') != 0 && !url.includes('://')) + url = this.domain + '/' + url; + return url; + } + this.isClose = () => this.data[this.i] == '>' || (this.data[this.i] == '/' && this.data[this.i + 1] == '>'); + this.section = () => this.data.substring(this.start, this.i); + this.parent = () => this.STACK[this.STACK.length - 1]; + this.siblings = () => this.STACK.length ? this.parent().children : this.DOM; +} +MpHtmlParser.prototype.parse = function () { + if (emoji) this.data = emoji.parseEmoji(this.data); + for (var c; c = this.data[this.i]; this.i++) + this.state(c); + if (this.state == this.Text) this.setText(); + while (this.STACK.length) this.popNode(this.STACK.pop()); + return this.DOM; +} +// 设置属性 +MpHtmlParser.prototype.setAttr = function () { + var name = this.attrName.toLowerCase(), + val = this.attrVal; + if (cfg.boolAttrs[name]) this.attrs[name] = 'T'; + else if (val) { + if (name == 'src' || (name == 'data-src' && !this.attrs.src)) this.attrs.src = this.getUrl(this.decode(val, 'amp')); + else if (name == 'href' || name == 'style') this.attrs[name] = this.decode(val, 'amp'); + else if (name.substr(0, 5) != 'data-') this.attrs[name] = val; + } + this.attrVal = ''; + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } +} +// 设置文本节点 +MpHtmlParser.prototype.setText = function () { + var back, text = this.section(); + if (!text) return; + text = (cfg.onText && cfg.onText(text, () => back = true)) || text; + if (back) { + this.data = this.data.substr(0, this.start) + text + this.data.substr(this.i); + let j = this.start + text.length; + for (this.i = this.start; this.i < j; this.i++) this.state(this.data[this.i]); + return; + } + if (!this.pre) { + // 合并空白符 + var tmp = []; + for (let i = text.length, c; c = text[--i];) + if (!blankChar[c] || (!blankChar[tmp[0]] && (c = ' '))) tmp.unshift(c); + text = tmp.join(''); + } + this.siblings().push({ + type: 'text', + text: this.decode(text) + }); +} +// 设置元素节点 +MpHtmlParser.prototype.setNode = function () { + var node = { + name: this.tagName.toLowerCase(), + attrs: this.attrs + }, + close = cfg.selfClosingTags[node.name]; + this.attrs = {}; + if (!cfg.ignoreTags[node.name]) { + // 处理属性 + var attrs = node.attrs, + style = this.CssHandler.match(node.name, attrs, node) + (attrs.style || ''), + styleObj = {}; + if (attrs.id) { + if (this.options.compress & 1) attrs.id = void 0; + else if (this.options.useAnchor) this.bubble(); + } + if ((this.options.compress & 2) && attrs.class) attrs.class = void 0; + switch (node.name) { + case 'a': + case 'ad': + this.bubble(); + break; + case 'font': + if (attrs.color) { + styleObj['color'] = attrs.color; + attrs.color = void 0; + } + if (attrs.face) { + styleObj['font-family'] = attrs.face; + attrs.face = void 0; + } + if (attrs.size) { + var size = parseInt(attrs.size); + if (size < 1) size = 1; + else if (size > 7) size = 7; + var map = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large']; + styleObj['font-size'] = map[size - 1]; + attrs.size = void 0; + } + break; + case 'embed': + var src = node.attrs.src || '', + type = node.attrs.type || ''; + if (type.includes('video') || src.includes('.mp4') || src.includes('.3gp') || src.includes('.m3u8')) + node.name = 'video'; + else if (type.includes('audio') || src.includes('.m4a') || src.includes('.wav') || src.includes('.mp3') || src.includes('.aac')) + node.name = 'audio'; + else break; + if (node.attrs.autostart) + node.attrs.autoplay = 'T'; + node.attrs.controls = 'T'; + // falls through + case 'video': + case 'audio': + if (!attrs.id) attrs.id = node.name + (++this[`${node.name}Num`]); + else this[`${node.name}Num`]++; + if (node.name == 'video') { + if (this.videoNum > 3) + node.lazyLoad = 1; + if (attrs.width) { + styleObj.width = parseFloat(attrs.width) + (attrs.width.includes('%') ? '%' : 'px'); + attrs.width = void 0; + } + if (attrs.height) { + styleObj.height = parseFloat(attrs.height) + (attrs.height.includes('%') ? '%' : 'px'); + attrs.height = void 0; + } + } + attrs.source = []; + if (attrs.src) { + attrs.source.push(attrs.src); + attrs.src = void 0; + } + this.bubble(); + break; + case 'td': + case 'th': + if (attrs.colspan || attrs.rowspan) + for (var k = this.STACK.length, item; item = this.STACK[--k];) + if (item.name == 'table') { + item.c = void 0; + break; + } + } + if (attrs.align) { + styleObj['text-align'] = attrs.align; + attrs.align = void 0; + } + // 压缩 style + var styles = style.split(';'); + style = ''; + for (var i = 0, len = styles.length; i < len; i++) { + var info = styles[i].split(':'); + if (info.length < 2) continue; + let key = info[0].trim().toLowerCase(), + value = info.slice(1).join(':').trim(); + if (value.includes('-webkit') || value.includes('-moz') || value.includes('-ms') || value.includes('-o') || value.includes('safe')) + style += `;${key}:${value}`; + else if (!styleObj[key] || value.includes('import') || !styleObj[key].includes('import')) + styleObj[key] = value; + } + if (node.name == 'img') { + if (attrs.src && !attrs.ignore) { + if (this.bubble()) + attrs.i = (this.imgNum++).toString(); + else attrs.ignore = 'T'; + } + if (attrs.ignore) { + style += ';-webkit-touch-callout:none'; + styleObj['max-width'] = '100%'; + } + if (!styleObj.position) + styleObj.top = styleObj.bottom = styleObj.left = styleObj.right = styleObj['z-index'] = void 0; + var width; + if (styleObj.width) width = styleObj.width; + else if (attrs.width) width = attrs.width.includes('%') ? attrs.width : attrs.width + 'px'; + if (width) { + styleObj.width = width; + attrs.width = '100%'; + if (parseInt(width) > windowWidth) { + styleObj.height = ''; + if (attrs.height) attrs.height = void 0; + } + } + if (styleObj.height) { + attrs.height = styleObj.height; + styleObj.height = ''; + } else if (attrs.height && !attrs.height.includes('%')) + attrs.height += 'px'; + } + for (var key in styleObj) { + var value = styleObj[key]; + if (!value) continue; + if (key.includes('flex') || key == 'order' || key == 'self-align') node.c = 1; + // 填充链接 + if (value.includes('url')) { + var j = value.indexOf('('); + if (j++ != -1) { + while (value[j] == '"' || value[j] == "'" || blankChar[value[j]]) j++; + value = value.substr(0, j) + this.getUrl(value.substr(j)); + } + } + // 转换 rpx + else if (value.includes('rpx')) + value = value.replace(/[0-9.]+\s*rpx/g, $ => parseFloat($) * windowWidth / 750 + 'px'); + else if (key == 'white-space' && value.includes('pre') && !close) + this.pre = node.pre = true; + style += `;${key}:${value}`; + } + style = style.substr(1); + if (style) attrs.style = style; + if (!close) { + node.children = []; + if (node.name == 'pre' && cfg.highlight) { + this.remove(node); + this.pre = node.pre = true; + } + this.siblings().push(node); + this.STACK.push(node); + } else if (!cfg.filter || cfg.filter(node, this) != false) + this.siblings().push(node); + } else { + if (!close) this.remove(node); + else if (node.name == 'source') { + var parent = this.parent(); + if (parent && (parent.name == 'video' || parent.name == 'audio') && node.attrs.src) + parent.attrs.source.push(node.attrs.src); + } else if (node.name == 'base' && !this.domain) this.domain = node.attrs.href; + } + if (this.data[this.i] == '/') this.i++; + this.start = this.i + 1; + this.state = this.Text; +} +// 移除标签 +MpHtmlParser.prototype.remove = function (node) { + var name = node.name, + j = this.i; + // 处理 svg + var handleSvg = () => { + var src = this.data.substring(j, this.i + 1); + if (!node.attrs.xmlns) src = ' xmlns="http://www.w3.org/2000/svg"' + src; + var i = j; + while (this.data[j] != '<') j--; + src = this.data.substring(j, i) + src; + var parent = this.parent(); + if (node.attrs.width == '100%' && parent && (parent.attrs.style || '').includes('inline')) + parent.attrs.style = 'width:300px;max-width:100%;' + parent.attrs.style; + this.siblings().push({ + name: 'img', + attrs: { + src: 'data:image/svg+xml;utf8,' + src.replace(/#/g, '%23'), + style: (/vertical[^;]+/.exec(node.attrs.style) || []).shift(), + ignore: 'T' + } + }) + } + if (node.name == 'svg' && this.data[j] == '/') return handleSvg(this.i++); + while (1) { + if ((this.i = this.data.indexOf('', this.i)) == -1) this.i = this.data.length; + if (name == 'svg') handleSvg(); + return; + } + } +} +// 节点出栈处理 +MpHtmlParser.prototype.popNode = function (node) { + // 空白符处理 + if (node.pre) { + node.pre = this.pre = void 0; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].pre) + this.pre = true; + } + var siblings = this.siblings(), + len = siblings.length, + childs = node.children; + if (node.name == 'head' || (cfg.filter && cfg.filter(node, this) == false)) + return siblings.pop(); + var attrs = node.attrs; + // 替换一些标签名 + if (cfg.blockTags[node.name]) node.name = 'div'; + else if (!cfg.trustTags[node.name]) node.name = 'span'; + // 去除块标签前后空串 + if (node.name == 'div' || node.name == 'p' || node.name[0] == 't') { + if (len > 1 && siblings[len - 2].text == ' ') + siblings.splice(--len - 1, 1); + if (childs.length && childs[childs.length - 1].text == ' ') + childs.pop(); + } + // 处理列表 + if (node.c && (node.name == 'ul' || node.name == 'ol')) { + if ((node.attrs.style || '').includes('list-style:none')) { + for (let i = 0, child; child = childs[i++];) + if (child.name == 'li') + child.name = 'div'; + } else if (node.name == 'ul') { + var floor = 1; + for (let i = this.STACK.length; i--;) + if (this.STACK[i].name == 'ul') floor++; + if (floor != 1) + for (let i = childs.length; i--;) + childs[i].floor = floor; + } else { + for (let i = 0, num = 1, child; child = childs[i++];) + if (child.name == 'li') { + child.type = 'ol'; + child.num = ((num, type) => { + if (type == 'a') return String.fromCharCode(97 + (num - 1) % 26); + if (type == 'A') return String.fromCharCode(65 + (num - 1) % 26); + if (type == 'i' || type == 'I') { + num = (num - 1) % 99 + 1; + var one = ['I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX'], + ten = ['X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC'], + res = (ten[Math.floor(num / 10) - 1] || '') + (one[num % 10 - 1] || ''); + if (type == 'i') return res.toLowerCase(); + return res; + } + return num; + })(num++, attrs.type) + '.'; + } + } + } + // 处理表格的边框 + if (node.name == 'table') { + var padding = attrs.cellpadding, + spacing = attrs.cellspacing, + border = attrs.border; + if (node.c) { + this.bubble(); + attrs.style = (attrs.style || '') + ';display:table'; + if (!padding) padding = 2; + if (!spacing) spacing = 2; + } + if (border) attrs.style = `border:${border}px solid gray;${attrs.style || ''}`; + if (spacing) attrs.style = `border-spacing:${spacing}px;${attrs.style || ''}`; + if (border || padding || node.c) + (function f(ns) { + for (var i = 0, n; n = ns[i]; i++) { + if (n.type == 'text') continue; + var style = n.attrs.style || ''; + if (node.c && n.name[0] == 't') { + n.c = 1; + style += ';display:table-' + (n.name == 'th' || n.name == 'td' ? 'cell' : (n.name == 'tr' ? 'row' : 'row-group')); + } + if (n.name == 'th' || n.name == 'td') { + if (border) style = `border:${border}px solid gray;${style}`; + if (padding) style = `padding:${padding}px;${style}`; + } else f(n.children || []); + if (style) n.attrs.style = style; + } + })(childs) + if (this.options.autoscroll) { + var table = Object.assign({}, node); + node.name = 'div'; + node.attrs = { + style: 'overflow:scroll' + } + node.children = [table]; + } + } + this.CssHandler.pop && this.CssHandler.pop(node); + // 自动压缩 + if (node.name == 'div' && !Object.keys(attrs).length && childs.length == 1 && childs[0].name == 'div') + siblings[len - 1] = childs[0]; +} +// 状态机 +MpHtmlParser.prototype.Text = function (c) { + if (c == '<') { + var next = this.data[this.i + 1], + isLetter = c => (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'); + if (isLetter(next)) { + this.setText(); + this.start = this.i + 1; + this.state = this.TagName; + } else if (next == '/') { + this.setText(); + if (isLetter(this.data[++this.i + 1])) { + this.start = this.i + 1; + this.state = this.EndTag; + } else this.Comment(); + } else if (next == '!') { + this.setText(); + this.Comment(); + } + } +} +MpHtmlParser.prototype.Comment = function () { + var key; + if (this.data.substring(this.i + 2, this.i + 4) == '--') key = '-->'; + else if (this.data.substring(this.i + 2, this.i + 9) == '[CDATA[') key = ']]>'; + else key = '>'; + if ((this.i = this.data.indexOf(key, this.i + 2)) == -1) this.i = this.data.length; + else this.i += key.length - 1; + this.start = this.i + 1; + this.state = this.Text; +} +MpHtmlParser.prototype.TagName = function (c) { + if (blankChar[c]) { + this.tagName = this.section(); + while (blankChar[this.data[this.i]]) this.i++; + if (this.isClose()) this.setNode(); + else { + this.start = this.i; + this.state = this.AttrName; + } + } else if (this.isClose()) { + this.tagName = this.section(); + this.setNode(); + } +} +MpHtmlParser.prototype.AttrName = function (c) { + if (c == '=' || blankChar[c] || this.isClose()) { + this.attrName = this.section(); + if (blankChar[c]) + while (blankChar[this.data[++this.i]]); + if (this.data[this.i] == '=') { + while (blankChar[this.data[++this.i]]); + this.start = this.i--; + this.state = this.AttrValue; + } else this.setAttr(); + } +} +MpHtmlParser.prototype.AttrValue = function (c) { + if (c == '"' || c == "'") { + this.start++; + if ((this.i = this.data.indexOf(c, this.i + 1)) == -1) return this.i = this.data.length; + this.attrVal = this.section(); + this.i++; + } else { + for (; !blankChar[this.data[this.i]] && !this.isClose(); this.i++); + this.attrVal = this.section(); + } + this.setAttr(); +} +MpHtmlParser.prototype.EndTag = function (c) { + if (blankChar[c] || c == '>' || c == '/') { + var name = this.section().toLowerCase(); + for (var i = this.STACK.length; i--;) + if (this.STACK[i].name == name) break; + if (i != -1) { + var node; + while ((node = this.STACK.pop()).name != name) this.popNode(node); + this.popNode(node); + } else if (name == 'p' || name == 'br') + this.siblings().push({ + name, + attrs: {} + }); + this.i = this.data.indexOf('>', this.i); + this.start = this.i + 1; + if (this.i == -1) this.i = this.data.length; + else this.state = this.Text; + } +} +module.exports = MpHtmlParser; \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/libs/config.js b/eaterplanet_ecommerce/components/parser/libs/config.js new file mode 100644 index 0000000..fbb0666 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/libs/config.js @@ -0,0 +1,63 @@ +/* 配置文件 */ +const canIUse = wx.canIUse('editor'); // 高基础库标识,用于兼容 +module.exports = { + // 出错占位图 + errorImg: null, + // 过滤器函数 + filter: null, + // 代码高亮函数 + highlight: null, + // 文本处理函数 + onText: null, + // 实体编码列表 + entities: { + quot: '"', + apos: "'", + semi: ';', + nbsp: '\xA0', + ndash: '–', + mdash: '—', + middot: '·', + lsquo: '‘', + rsquo: '’', + ldquo: '“', + rdquo: '”', + bull: '•', + hellip: '…' + }, + blankChar: makeMap(' ,\xA0,\t,\r,\n,\f'), + boolAttrs: makeMap('autoplay,autostart,controls,ignore,loop,muted'), + // 块级标签,将被转为 div + blockTags: makeMap('address,article,aside,body,caption,center,cite,footer,header,html,nav,section' + (canIUse ? '' : ',pre')), + // 将被移除的标签 + ignoreTags: makeMap('area,base,canvas,frame,iframe,input,link,map,meta,param,script,source,style,svg,textarea,title,track,wbr' + (canIUse ? ',rp' : '')), + // 只能被 rich-text 显示的标签 + richOnlyTags: makeMap('a,colgroup,fieldset,legend,table' + (canIUse ? ',bdi,bdo,rt,ruby' : '')), + // 自闭合的标签 + selfClosingTags: makeMap('area,base,br,col,circle,ellipse,embed,frame,hr,img,input,line,link,meta,param,path,polygon,rect,source,track,use,wbr'), + // 信任的标签 + trustTags: makeMap('a,abbr,ad,audio,b,blockquote,br,code,col,colgroup,dd,del,dl,dt,div,em,fieldset,h1,h2,h3,h4,h5,h6,hr,i,img,ins,label,legend,li,ol,p,q,source,span,strong,sub,sup,table,tbody,td,tfoot,th,thead,tr,title,ul,video' + (canIUse ? ',bdi,bdo,caption,pre,rt,ruby' : '')), + // 默认的标签样式 + userAgentStyles: { + address: 'font-style:italic', + big: 'display:inline;font-size:1.2em', + blockquote: 'background-color:#f6f6f6;border-left:3px solid #dbdbdb;color:#6c6c6c;padding:5px 0 5px 10px', + caption: 'display:table-caption;text-align:center', + center: 'text-align:center', + cite: 'font-style:italic', + dd: 'margin-left:40px', + mark: 'background-color:yellow', + pre: 'font-family:monospace;white-space:pre;overflow:scroll', + s: 'text-decoration:line-through', + small: 'display:inline;font-size:0.8em', + u: 'text-decoration:underline' + } +} + +function makeMap(str) { + var map = Object.create(null), + list = str.split(','); + for (var i = list.length; i--;) + map[list[i]] = true; + return map; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/parser.js b/eaterplanet_ecommerce/components/parser/parser.js new file mode 100644 index 0000000..d4e6e87 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/parser.js @@ -0,0 +1,204 @@ +/** + * Parser 富文本组件 + * @tutorial https://github.com/jin-yufeng/Parser + * @version 20200630 + * @author JinYufeng + * @listens MIT + */ +var cache = {}, + Parser = require('./libs/MpHtmlParser.js'), + fs = wx.getFileSystemManager && wx.getFileSystemManager(); +var dom; +// 计算 cache 的 key +function hash(str) { + for (var i = str.length, val = 5381; i--;) + val += (val << 5) + str.charCodeAt(i); + return val; +} +Component({ + options: { + pureDataPattern: /^[acdgtu]|W/ + }, + data: { + nodes: [] + }, + properties: { + html: { + type: String, + observer(html) { + this.setContent(html); + } + }, + autopause: { + type: Boolean, + value: true + }, + autoscroll: Boolean, + autosetTitle: { + type: Boolean, + value: true + }, + compress: Number, + domain: String, + lazyLoad: Boolean, + loadingImg: String, + selectable: Boolean, + tagStyle: Object, + showWithAnimation: Boolean, + useAnchor: Boolean, + useCache: Boolean + }, + relations: { + '../parser-group/parser-group': { + type: 'ancestor' + } + }, + created() { + // 图片数组 + this.imgList = []; + this.imgList.setItem = function(i, src) { + if (!i || !src) return; + // 去重 + if (src.indexOf('http') == 0 && this.includes(src)) { + var newSrc = ''; + for (var j = 0, c; c = src[j]; j++) { + if (c == '/' && src[j - 1] != '/' && src[j + 1] != '/') break; + newSrc += Math.random() > 0.5 ? c.toUpperCase() : c; + } + newSrc += src.substr(j); + return this[i] = newSrc; + } + this[i] = src; + // 暂存 data src + if (src.includes('data:image')) { + var info = src.match(/data:image\/(\S+?);(\S+?),(.+)/); + if (!info) return; + var filePath = `${wx.env.USER_DATA_PATH}/${Date.now()}.${info[1]}`; + fs && fs.writeFile({ + filePath, + data: info[3], + encoding: info[2], + success: () => this[i] = filePath + }) + } + } + this.imgList.each = function(f) { + for (var i = 0, len = this.length; i < len; i++) + this.setItem(i, f(this[i], i, this)); + } + if (dom) this.document = new dom(this); + }, + detached() { + // 删除暂存 + this.imgList.each(src => { + if (src && src.includes(wx.env.USER_DATA_PATH) && fs) + fs.unlink({ + filePath: src + }) + }) + clearInterval(this._timer); + }, + methods: { + // 锚点跳转 + navigateTo(obj) { + if (!this.data.useAnchor) + return obj.fail && obj.fail({ + errMsg: 'Anchor is disabled' + }) + this.createSelectorQuery() + .select('.top' + (obj.id ? '>>>#' + obj.id : '')).boundingClientRect() + .selectViewport().scrollOffset().exec(res => { + if (!res[0]) + return this.group ? this.group.navigateTo(this.i, obj) : + obj.fail && obj.fail({ + errMsg: 'Label not found' + }); + obj.scrollTop = res[1].scrollTop + res[0].top + (obj.offset || 0); + wx.pageScrollTo(obj); + }) + }, + // 获取文本 + getText(ns = this.data.html) { + var txt = ''; + for (var i = 0, n; n = ns[i++];) { + if (n.type == 'text') txt += n.text.replace(/ /g, '\u00A0').replace(/</g, '<').replace(/>/g, '>').replace(/&/g, '&'); + else if (n.type == 'br') txt += '\n'; + else { + // 块级标签前后加换行 + var br = n.name == 'p' || n.name == 'div' || n.name == 'tr' || n.name == 'li' || (n.name[0] == 'h' && n.name[1] > '0' && n.name[1] < '7'); + if (br && txt && txt[txt.length - 1] != '\n') txt += '\n'; + if (n.children) txt += this.getText(n.children); + if (br && txt[txt.length - 1] != '\n') txt += '\n'; + else if (n.name == 'td' || n.name == 'th') txt += '\t'; + } + } + return txt; + }, + // 获取视频 context + getVideoContext(id) { + if (!id) return this.videoContexts; + for (var i = this.videoContexts.length; i--;) + if (this.videoContexts[i].id == id) return this.videoContexts[i]; + }, + // 渲染富文本 + setContent(html, append) { + var nodes, parser = new Parser(html, this.data); + // 缓存读取 + if (this.data.useCache) { + var hashVal = hash(html); + if (cache[hashVal]) nodes = cache[hashVal]; + else cache[hashVal] = nodes = parser.parse(); + } else nodes = parser.parse(); + this.triggerEvent('parse', nodes); + var data = {}; + if (append) + for (let i = this.data.nodes.length, j = nodes.length; j--;) + data[`nodes[${i + j}]`] = nodes[j]; + else data.nodes = nodes; + if (this.showWithAnimation) data.showAm = 'animation: show .5s'; + this.setData(data, () => { + this.triggerEvent('load') + }); + // 设置标题 + if (nodes.title && this.data.autosetTitle) + wx.setNavigationBarTitle({ + title: nodes.title + }) + this.imgList.length = 0; + this.videoContexts = []; + var ns = this.selectAllComponents('.top,.top>>>._node'); + for (let i = 0, n; n = ns[i++];) { + n.top = this; + for (let j = 0, item; item = n.data.nodes[j++];) { + if (item.c) continue; + // 获取图片列表 + if (item.name == 'img') + this.imgList.setItem(item.attrs.i, item.attrs.src); + // 音视频控制 + else if (item.name == 'video' || item.name == 'audio') { + var ctx; + if (item.name == 'video') ctx = wx.createVideoContext(item.attrs.id, n); + else ctx = n.selectComponent('#' + item.attrs.id); + if (ctx) { + ctx.id = item.attrs.id; + this.videoContexts.push(ctx); + } + } + } + } + var height; + clearInterval(this._timer); + this._timer = setInterval(() => { + this.createSelectorQuery().select('.top').boundingClientRect(res => { + if (!res) return; + this.rect = res; + if (res.height == height) { + this.triggerEvent('ready', res) + clearInterval(this._timer); + } + height = res.height; + }).exec(); + }, 350) + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/parser.json b/eaterplanet_ecommerce/components/parser/parser.json new file mode 100644 index 0000000..85e49c9 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/parser.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "trees": "./trees/trees" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/parser.wxml b/eaterplanet_ecommerce/components/parser/parser.wxml new file mode 100644 index 0000000..aeeca92 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/parser.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/parser.wxss b/eaterplanet_ecommerce/components/parser/parser.wxss new file mode 100644 index 0000000..b24180f --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/parser.wxss @@ -0,0 +1,19 @@ +:host { + display: block; + overflow: scroll; + -webkit-overflow-scrolling: touch; +} + +.top { + display: inherit; +} + +@keyframes show { + 0% { + opacity: 0; + } + + 100% { + opacity: 1; + } +} diff --git a/eaterplanet_ecommerce/components/parser/trees/trees.js b/eaterplanet_ecommerce/components/parser/trees/trees.js new file mode 100644 index 0000000..1758b5b --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/trees/trees.js @@ -0,0 +1,122 @@ +const errorImg = require('../libs/config.js').errorImg; +Component({ + data: { + canIUse: !!wx.chooseMessageFile, + placeholder: "data:image/svg+xml;utf8," + }, + properties: { + nodes: Array, + lazyLoad: Boolean, + loading: String + }, + methods: { + // 视频播放事件 + play(e) { + this.top.group && this.top.group.pause(this.top.i); + if (this.top.videoContexts.length > 1 && this.top.data.autopause) + for (var i = this.top.videoContexts.length; i--;) + if (this.top.videoContexts[i].id != e.currentTarget.id) + this.top.videoContexts[i].pause(); + }, + // 图片事件 + imgtap(e) { + var attrs = e.currentTarget.dataset.attrs; + if (!attrs.ignore) { + var preview = true; + this.top.triggerEvent('imgtap', { + id: e.currentTarget.id, + src: attrs.src, + ignore: () => preview = false + }) + if (preview) { + if (this.top.group) return this.top.group.preview(this.top.i, attrs.i); + var urls = this.top.imgList, + current = urls[attrs.i] ? urls[attrs.i] : (urls = [attrs.src], attrs.src); + wx.previewImage({ + current, + urls + }) + } + } + }, + loadImg(e) { + var i = e.target.dataset.i; + if (this.data.lazyLoad && !this.data.nodes[i].load) + this.setData({ + [`nodes[${i}].load`]: 1 + }) + else if (this.data.loading && this.data.nodes[i].load != 2) + this.setData({ + [`nodes[${i}].load`]: 2 + }) + }, + // 链接点击事件 + linkpress(e) { + var jump = true, + attrs = e.currentTarget.dataset.attrs; + attrs.ignore = () => jump = false; + this.top.triggerEvent('linkpress', attrs); + if (jump) { + if (attrs['app-id']) + wx.navigateToMiniProgram({ + appId: attrs['app-id'], + path: attrs.path + }) + else if (attrs.href) { + if (attrs.href[0] == '#') + this.top.navigateTo({ + id: attrs.href.substring(1) + }) + else if (attrs.href.indexOf('http') == 0 || attrs.href.indexOf('//') == 0) + wx.setClipboardData({ + data: attrs.href, + success: () => + wx.showToast({ + title: '链接已复制' + }) + }) + else + wx.navigateTo({ + url: attrs.href, + fail() { + wx.switchTab({ + url: attrs.href, + }) + } + }) + } + } + }, + // 错误事件 + error(e) { + var source = e.target.dataset.source, + i = e.target.dataset.i, + node = this.data.nodes[i]; + if (source == 'video' || source == 'audio') { + // 加载其他 source + var index = (node.i || 0) + 1; + if (index < node.attrs.source.length) + return this.setData({ + [`nodes[${i}].i`]: index + }) + } else if (source == 'img' && errorImg) { + this.top.imgList.setItem(e.target.dataset.index, errorImg); + this.setData({ + [`nodes[${i}].attrs.src`]: errorImg + }) + } + this.top && this.top.triggerEvent('error', { + source, + target: e.target, + errMsg: e.detail.errMsg + }) + }, + // 加载视频 + loadVideo(e) { + var i = e.target.dataset.i; + this.setData({ + [`nodes[${i}].attrs.autoplay`]: true + }) + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/trees/trees.json b/eaterplanet_ecommerce/components/parser/trees/trees.json new file mode 100644 index 0000000..07cb773 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/trees/trees.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "trees": "./trees" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/trees/trees.wxml b/eaterplanet_ecommerce/components/parser/trees/trees.wxml new file mode 100644 index 0000000..d534f7b --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/trees/trees.wxml @@ -0,0 +1,65 @@ + + +var inline = { + abbr: 1, + b: 1, + big: 1, + code: 1, + del: 1, + em: 1, + i: 1, + ins: 1, + label: 1, + q: 1, + small: 1, + span: 1, + strong: 1 +} +module.exports = { + visited: function (e, owner) { + if (!e.instance.hasClass('_visited')) + e.instance.addClass('_visited') + owner.callMethod('linkpress', e) + }, + use: function (item) { + return !item.c && !inline[item.name] && (item.attrs.style || '').indexOf('display:inline') == -1 + } +} + + + + + + + + + {{n.text}} + \n + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/parser/trees/trees.wxss b/eaterplanet_ecommerce/components/parser/trees/trees.wxss new file mode 100644 index 0000000..043dd46 --- /dev/null +++ b/eaterplanet_ecommerce/components/parser/trees/trees.wxss @@ -0,0 +1,184 @@ +/* 在这里引入自定义样式 */ + +/* 链接和图片效果 */ +._a { + display: inline; + padding: 1.5px 0 1.5px 0; + color: #366092; + word-break: break-all; +} + +._hover { + text-decoration: underline; + opacity: 0.7; +} + +._visited { + color: #551a8b; +} + +._img { + position: relative; + display: inline-block; + max-width: 100%; +} + +/* 内部样式 */ +:host { + display: inline; +} + +._blockquote, +._div, +._p, +._ul, +._ol, +._li { + display: block; +} + +._b, +._strong { + font-weight: bold; +} + +._code { + font-family: monospace; +} + +._del { + text-decoration: line-through; +} + +._em, +._i { + font-style: italic; +} + +._h1 { + font-size: 2em; +} + +._h2 { + font-size: 1.5em; +} + +._h3 { + font-size: 1.17em; +} + +._h5 { + font-size: 0.83em; +} + +._h6 { + font-size: 0.67em; +} + +._h1, +._h2, +._h3, +._h4, +._h5, +._h6 { + display: block; + font-weight: bold; +} + +._image { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + opacity: 0; +} + +._ins { + text-decoration: underline; +} + +._li { + flex: 1; + width: 0; +} + +._ol-bef { + width: 36px; + margin-right: 5px; + text-align: right; +} + +._ul-bef { + margin: 0 12px 0 23px; + line-height: normal; +} + +._ol-bef, +._ul_bef { + flex: none; + user-select: none; +} + +._ul-p1 { + display: inline-block; + width: 0.3em; + height: 0.3em; + overflow: hidden; + line-height: 0.3em; +} + +._ul-p2 { + display: inline-block; + width: 0.23em; + height: 0.23em; + border: 0.05em solid black; + border-radius: 50%; +} + +._q::before { + content: '"'; +} + +._q::after { + content: '"'; +} + +._sub { + font-size: smaller; + vertical-align: sub; +} + +._sup { + font-size: smaller; + vertical-align: super; +} + +.__bdi, +.__bdo, +.__ruby, +.__rt { + display: inline-block; +} + +._video { + position: relative; + display: inline-block; + width: 300px; + height: 225px; + background-color: black; +} + +._video::after { + position: absolute; + top: 50%; + left: 50%; + margin: -15px 0 0 -15px; + content: ''; + border-color: transparent transparent transparent white; + border-style: solid; + border-width: 15px 0 15px 30px; +} +._img { + vertical-align: top; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/router-link/router-link.js b/eaterplanet_ecommerce/components/router-link/router-link.js new file mode 100644 index 0000000..90b4e16 --- /dev/null +++ b/eaterplanet_ecommerce/components/router-link/router-link.js @@ -0,0 +1,114 @@ +// eaterplanet_ecommerce/components/router-link/router-link.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + url: String, + type: String, + disabled: { + type: Boolean, + value: false + }, + delta: { + type: Number, + value: 1 + } + }, + externalClasses: ["router-class"], + /** + * 组件的初始数据 + */ + data: { + canClick: true + }, + + /** + * 组件的方法列表 + */ + methods: { + routerLink: function () { + var that = this; + if (!this.data.disabled && this.data.canClick) + if (this.data.url) { + this.setData({ + canClick: false + }); + var data = { + url: this.data.url, + success: function (e) { + that.triggerEvent("on-success", e); + }, + fail: function (e) { + console.warn("routerLink Error:", e), that.triggerEvent("on-error", e); + }, + complete: function () { + setTimeout(function () { + that.setData({ + canClick: true + }); + }, 400); + } + }; + + let surl = this.data.url; + if (surl.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || surl.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || surl.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || surl.indexOf('eaterplanet_ecommerce/pages/type/index') != -1 ) { this.setData({ type: 'switch' })} + + switch (this.data.type) { + case "redirect": + wx.redirectTo(data); + break; + + case "switch": + wx.switchTab(data); + break; + + case "navigateback": + wx.navigateBack({ + delta: this.data.delta, + success: function (e) { + that.triggerEvent("on-success", e); + }, + fail: function (t) { + console.warn("routerLink Error:", t); + }, + complete: function () { + that.setData({ + canClick: false + }); + } + }); + break; + + case "relaunch": + wx.reLaunch(data); + break; + + default: + let urlArr = that.queryParam(surl); + wx.$route(urlArr[0], urlArr[1]); + setTimeout(function () { + that.setData({ + canClick: true + }); + }, 400); + // wx.navigateTo(data); + } + } else console.warn("url 不能为空"); + }, + queryParam: function(surl){ + if (surl.indexOf("?") != -1) { + let urlArr = surl.split('?'); + let urls = urlArr[1]; + let strs = urls.split("&"); + var obj = new Object(); + for(var i = 0; i < strs.length; i++) { + var tmp_arr = strs[i].split("="); + obj[decodeURIComponent(tmp_arr[0])] = decodeURIComponent(tmp_arr[1]); + } + return [urlArr[0], obj] + } + return [surl, {}] + } + } +}) diff --git a/eaterplanet_ecommerce/components/router-link/router-link.json b/eaterplanet_ecommerce/components/router-link/router-link.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/router-link/router-link.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/router-link/router-link.wxml b/eaterplanet_ecommerce/components/router-link/router-link.wxml new file mode 100644 index 0000000..1bf02ae --- /dev/null +++ b/eaterplanet_ecommerce/components/router-link/router-link.wxml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/router-link/router-link.wxss b/eaterplanet_ecommerce/components/router-link/router-link.wxss new file mode 100644 index 0000000..58ccb5f --- /dev/null +++ b/eaterplanet_ecommerce/components/router-link/router-link.wxss @@ -0,0 +1,3 @@ +.i-router-hover { + opacity: 1; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-big/index.js b/eaterplanet_ecommerce/components/rush-spu-big/index.js new file mode 100644 index 0000000..14a267c --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-big/index.js @@ -0,0 +1,5 @@ +var goodsBehavior = require('../behavior/goods.js'); + +Component({ + behaviors: [goodsBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-big/index.json b/eaterplanet_ecommerce/components/rush-spu-big/index.json new file mode 100644 index 0000000..6c6c2c2 --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-big/index.json @@ -0,0 +1,11 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../button/index", + "i-img": "../img/index", + "i-sku": "../sku/index", + "i-router-link": "../router-link/router-link", + "i-input-number": "../input-number/index", + "i-vip-price": "../vipPrice/vipPrice" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-big/index.wxml b/eaterplanet_ecommerce/components/rush-spu-big/index.wxml new file mode 100644 index 0000000..2449a46 --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-big/index.wxml @@ -0,0 +1,62 @@ + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-big/index.wxss b/eaterplanet_ecommerce/components/rush-spu-big/index.wxss new file mode 100644 index 0000000..39e9aef --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-big/index.wxss @@ -0,0 +1,318 @@ +.spu { + width: 100%; + display: block; +} + +.spu .img-class { + width: 710rpx; + height: 400rpx; + border-radius: 10rpx 10rpx 0 0; + image-rendering: crisp-edges; +} + +.spu .mask { + background: rgba(255, 255, 255, 0.5); + width: 710rpx; + height: 400rpx; + position: absolute; + left: 0; + top: 0; +} + +.spu .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 170rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.spu .spu-content { + background: #fff; + width: 710rpx; + border-radius: 20rpx; + overflow: hidden; + position: relative; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + margin: 0 auto 20rpx; + display: flex; + flex-direction: column; + box-sizing: border-box; +} + +.spu .spu-content.disabled { + opacity: 0.6; +} + +.spu .spu-content .item-top { + width: 100%; + height: 400rpx; + position: relative; +} + +.spu .spu-content .item-bottom { + box-sizing: border-box; + padding: 20rpx; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.spu .spu-content .item-bottom .spu-title { + color: #222; + font-size: 30rpx; + height: 32rpx; + width: 100%; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: 500; + position: relative; +} + +.spu .spu-content .item-bottom .spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .item-bottom .spu-tag { + padding-left: 196rpx; + margin-bottom: 20rpx; + display: flex; + height: 28rpx; +} + +.spu .spu-content .item-bottom .spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + width: 100%; + height: 26rpx; + margin-bottom: 12rpx; +} + +.spu .spu-content .item-bottom .spu-desc .em { + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .item-bottom .spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price { + color: #ff758c; + margin-right: 12rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu .spu-content .item-bottom .spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-right: 20rpx; +} + +.spu .spu-content .item-bottom .spu-count { + font-size: 24rpx; + line-height: 24rpx; + color: #999; +} + +.spu .spu-content .add-cart,.spu .spu-content .add-cart-disabled { + width: 160rpx; + height: 60rpx; + padding: 0; + margin: 0; + position: absolute; + right: 28rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; + background: #4facfe; + color: #fff; + border-radius: 30rpx; +} + +.spu .spu-content .add-cart-disabled { + background: #ccc; +} + +.spu .item-top .spu-active { + position: absolute; + left: 0; + bottom: 0; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu .item-top .spu-active .tag { + background: linear-gradient(100deg,#4facfe 0%,#00f2fe 100%); + border-radius: 0 25rpx 25rpx 0; + padding: 0 15rpx; + height: 50rpx; + font-size: 26rpx; + line-height: 50rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 220rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .item-top .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +.spu .spu-content .time-tip { + position: absolute; + background: #4facfe; + left: 0; + bottom: 0; + width: 250rpx; + height: 40rpx; + border-radius: 0 8rpx 0 0; +} + +.spu .spu-content .time-tip.notip { + display: none; +} + +/* 标签 */ + +.spu .item-tag { + position: absolute; + left: 22rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + + +.spu .index-input-number { + position: absolute; + right: 0; + bottom: 10rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view { + width: 80rpx; + height: 80rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view .img{ + width: 40rpx; + height: 40rpx; +} + +.spu .index-input-number .i-input-number-minus { + justify-content: flex-end; +} + +.spu .index-input-number .i-input-number-plus { + justify-content: flex-start; +} + +.spu .index-input-number .input-number-text { + height: 88rpx; + line-height: 88rpx; + font-size: 24rpx; + color: #333; + width: 58rpx; +} + +.spu-play { + position: absolute; + left: 50%; + top: 50%; + width: 160rpx; + height: 160rpx; + margin-top: -80rpx; + margin-left: -80rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.picktime { + font-size: 24rpx; + font-weight: bold; + margin: 15rpx 0 10rpx; + color: #ed7b3a; + display: flex; + align-items: center; + justify-content: space-between; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-col/index.js b/eaterplanet_ecommerce/components/rush-spu-col/index.js new file mode 100644 index 0000000..14a267c --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-col/index.js @@ -0,0 +1,5 @@ +var goodsBehavior = require('../behavior/goods.js'); + +Component({ + behaviors: [goodsBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-col/index.json b/eaterplanet_ecommerce/components/rush-spu-col/index.json new file mode 100644 index 0000000..095de47 --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-col/index.json @@ -0,0 +1,11 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../img/index", + "i-button": "../button/index", + "i-router-link": "../router-link/router-link", + "i-input-number": "../input-number/index", + "i-vip-price": "../vipPrice/vipPrice", + "i-addcart": "../addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-col/index.wxml b/eaterplanet_ecommerce/components/rush-spu-col/index.wxml new file mode 100644 index 0000000..b19dfa7 --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-col/index.wxml @@ -0,0 +1,47 @@ + + + + + + + {{spuItem.label_info.tagcontent}} + + + + + + + + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + 已抢光 + 已结束 + {{spuItem.spuName}} + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/rush-spu-col/index.wxss b/eaterplanet_ecommerce/components/rush-spu-col/index.wxss new file mode 100644 index 0000000..5a5e188 --- /dev/null +++ b/eaterplanet_ecommerce/components/rush-spu-col/index.wxss @@ -0,0 +1,182 @@ +.new-comers-item, .w250 { + position: relative; + width: 237rpx; + box-sizing: border-box; + padding: 20rpx 10rpx; + font-size: 28rpx; +} + +.w250 { + width: 250rpx; +} + +.new-comers-item .new-img { + width: 217rpx; + height: 217rpx; + margin-bottom: 20rpx; + overflow: hidden; +} + +.w250 .new-img { + width: 230rpx; + height: 230rpx; + margin-bottom: 20rpx; + overflow: hidden; +} + +.new-comers-item .title, +.w250 .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot, +.w250 .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.new-comers-item .add-cart, +.w250 .add-cart { + width: 44rpx; + height: 44rpx; + padding: 0; + margin: 0; +} + +.new-comers-item .add-cart .img, +.w250 .add-cart .img { + width: 44rpx; + height: 44rpx; + display: block; +} + +.new-comers-item .price, +.w250 .price { + color: #ff5041; +} + +.new-comers-item .act-end, +.w250 .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.col-input-number .input-number-view { + width: 32rpx !important; + height: 32rpx !important; +} + +.col-input-number .input-number-img{ + width: 32rpx !important; + height: 32rpx !important; + font-size: 32rpx !important; +} + +.col-input-number .input-number-input { + height: 32rpx !important; + width: 40rpx !important; + font-size: 20rpx; + line-height: 32rpx !important; +} + +.vip { + position: absolute; + left: 10rpx; + top: 20rpx; +} + +/* 标签 */ + +.spu .item-tag { + position: absolute; + right: 10rpx; + top: 20rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.spu .spu-active { + position: absolute; + left: 10rpx; + top: 180rpx; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu .spu-active .tag { + background: linear-gradient(to right, #ff5041, #ff994b); + border-radius: 0 14rpx 14rpx 0; + padding: 0 12rpx; + height: 30rpx; + font-size: 22rpx; + line-height: 30rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +.spu-play { + position: absolute; + left: 50%; + top: 20%; + width: 100rpx; + height: 100rpx; + margin-left: -50rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form-show/index.js b/eaterplanet_ecommerce/components/s-form-show/index.js new file mode 100644 index 0000000..c71b48c --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form-show/index.js @@ -0,0 +1,40 @@ +// eaterplanet_ecommerce/s-form-show/index.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + formData: { + type: Object, + value: {} + } + }, + + /** + * 组件的初始数据 + */ + data: { + formList: [] + }, + + attached() { + let formList = this.data.formData.form_list || []; + this.setData({ + formList + }) + }, + + /** + * 组件的方法列表 + */ + methods: { + prevImg: function(e){ + let current = e.currentTarget.dataset.current; + let urls = e.currentTarget.dataset.urls; + wx.previewImage({ + current, // 当前显示图片的http链接 + urls // 需要预览的图片http链接列表 + }) + }, + } +}) diff --git a/eaterplanet_ecommerce/components/s-form-show/index.json b/eaterplanet_ecommerce/components/s-form-show/index.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form-show/index.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form-show/index.wxml b/eaterplanet_ecommerce/components/s-form-show/index.wxml new file mode 100644 index 0000000..b03aa52 --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form-show/index.wxml @@ -0,0 +1,10 @@ + + {{item.item_name}}: + + {{item.item_val}} + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form-show/index.wxss b/eaterplanet_ecommerce/components/s-form-show/index.wxss new file mode 100644 index 0000000..5ad9d13 --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form-show/index.wxss @@ -0,0 +1 @@ +@import "/common.wxss"; \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form/index.js b/eaterplanet_ecommerce/components/s-form/index.js new file mode 100644 index 0000000..019c98d --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form/index.js @@ -0,0 +1,345 @@ +import WxValidate from '../../utils/WxValidate.js'; + +Component({ + /** + * 组件的属性列表 + */ + properties: { + formData: { + type: Object, + value: {} + } + }, + + /** + * 组件的初始数据 + */ + data: { + form: {}, + formList: [], + dateParams: { + year: true, + month: true, + day: true, + hour: false, + minute: false, + second: false + }, + rules: {}, + time: "12:00", + }, + + attached() { + let formList = this.data.formData.form_list || []; + let form = {}; + let fileList = []; + let rules = {}; + let messages = {}; + Object.keys(formList).length && Object.keys(formList).forEach((index) => { + let item = formList[index]; + let formKey = item.type + '_' + item.random_code; + form[formKey] = ''; + fileList.push([]); + + let message = "请填写正确的" + item.title; + if(item.type=='image') { + message = "请上传"+item.title; + } + if(item.type=='select') { + item.index = -1; + message = "请选择"+item.title; + } + if(item.type=='area') { + item.region = [ item.province_id, item.city_id, item.country_id]; + form[formKey] = item.region.join(","); + message = "请选择"+item.title; + } + if(item.type=='date') { + if(item.date_type=="appoint_date") { + item.default_time = item.appoint_date; + form[formKey] = item.appoint_date; + } else if(item.date_type=="same_day") { + item.default_time = new Date().toLocaleDateString(); + form[formKey] = item.default_time; + } + message = "请选择"+item.title; + } + if(item.type=='date_range') { + if(item.begin_date_type=="appoint_date") { + item.default_begin_date = item.begin_appoint_date; + } else if(item.begin_date_type=="same_day") { + let cur_date = this.getDate(); + item.default_begin_date = cur_date; + } + if(item.end_date_type=="appoint_date") { + item.default_end_date = item.end_appoint_date; + } else if(item.end_date_type=="same_day") { + let cur_date = this.getDate(); + item.default_end_date = cur_date; + } + if(item.default_begin_date&&item.default_end_date) { + form[formKey] = item.default_begin_date+'~'+item.default_end_date; + } + item.pickerConfig = { + endDate: true, + column: "day", + dateLimit: true, + initStartTime: item.default_begin_date, + initEndTime: item.default_end_date, + limitStartTime: "2015-05-06", + limitEndTime: "2065-05-06" + } + message = "请选择"+item.title; + } + if(item.type=='time') { + let myDate = new Date(); + if(item.time_type=="appoint_time") { + item.default_time = item.appoint_time; + form[item.type+'_'+item.random_code] = item.appoint_time; + } else if(item.time_type=="same_time") { + item.default_time = myDate.getHours()+':'+myDate.getMinutes()+':'+myDate.getSeconds(); + form[item.type+'_'+item.random_code] = item.default_time; + } + message = "请选择"+item.title; + } + if(item.type=='time_range') { + let myDate = new Date(); + item.beginTime = ""; + item.endTime = ""; + if(item.begin_time_type=="appoint_time") { + item.beginTime = item.begin_appoint_time; + } else if(item.begin_time_type=="same_time") { + item.beginTime = myDate.getHours()+':'+myDate.getMinutes()+':'+myDate.getSeconds(); + } + if(item.end_time_type=="appoint_time") { + item.endTime = item.end_appoint_time; + } else if(item.end_time_type=="same_time") { + let timestamp = Date.parse(new Date()); + let nextDate = new Date(timestamp+1000); + item.endTime = nextDate.getHours()+':'+nextDate.getMinutes()+':'+nextDate.getSeconds(); + } + if(item.beginTime&&item.endTime) form[item.type+'_'+item.random_code] = item.beginTime+'~'+item.endTime; + message = "请选择"+item.title; + } + + //手机格式验证 + if(item.type=='telephone'&&item.required==1) { + rules[formKey] = { + required: Boolean(item.required), + tel: true + } + messages[formKey] = { + required: message, + tel: message + } + } else if (item.type=='idcard'&&item.required==1) { + rules[formKey] = { + required: Boolean(item.required), + idcard: true + } + messages[formKey] = { + required: message, + idcard: message + } + } else { + rules[formKey] = { + required: Boolean(item.required) + } + messages[formKey] = { + required: message + } + } + + item.show = false; + }) + + this.setData({ + form, + formList, + fileList, + formList, + rules + }) + console.log(rules) + this.WxValidate = new WxValidate(rules, messages) + }, + + /** + * 组件的方法列表 + */ + methods: { + getDate() { + let myDate = new Date(); + let y = myDate.getFullYear(); + let m = myDate.getMonth()+1; + let d = myDate.getDate(); + m = m>10?m:'0'+m; + d = d>10?d:'0'+d; + return y+'-'+m+'-'+d; + }, + changeImg: function (e) { + // console.log(e.detail) + let key = e.detail.key; + let form = this.data.form; + form[key] = e.detail.value.join(","); + this.setData({ + form + }) + }, + bindPickerChange(e) { + // console.log(e) + let idx = e.currentTarget.dataset.idx || ""; + let value = e.detail.value; + let { form, formList } = this.data; + let item = formList[idx]; + let key = item.type+'_'+item.random_code; + item.index = value; + formList[idx] = item; + form[key] = item.option_val[value]; + this.setData({ + form, + formList + }) + }, + radioChange(e) { + // console.log(e) + let key = e.currentTarget.dataset.idx || ""; + let value = e.detail.value; + let form = this.data.form; + form[key] = value; + // console.log(form) + this.setData({ + form + }) + }, + checkboxChange(e) { + // console.log(e) + let key = e.currentTarget.dataset.idx || ""; + let value = e.detail.value; + let form = this.data.form; + form[key] = value.join(","); + // console.log(form) + this.setData({ + form + }) + }, + bindRegionChange(e) { + // console.log(e) + let idx = e.currentTarget.dataset.idx || ""; + let value = e.detail.value; + let { form, formList } = this.data; + let item = formList[idx]; + let key = item.type+'_'+item.random_code; + item.region = value; + formList[idx] = item; + form[key] = value.join(","); + this.setData({ + form, + formList + }) + }, + bindDateChange(e) { + // console.log(e) + let key = e.currentTarget.dataset.idx || ""; + let form = this.data.form; + form[key] = e.detail.value; + // console.log(form) + this.setData({ + form + }) + }, + bindKeyInput(e) { + // console.log(e) + let key = e.currentTarget.dataset.idx || ""; + let form = this.data.form; + form[key] = e.detail.value; + // console.log(form) + this.setData({ + form + }) + }, + showDateRange(e) { + let idx = e.currentTarget.dataset.idx || ""; + let formList = this.data.formList; + formList[idx].show = !formList[idx].show; + this.setData({ + formList + }) + }, + pickerHide(e) { + // console.log(e) + let idx = e.currentTarget.dataset.idx || ""; + let formList = this.data.formList; + formList[idx].show = !formList[idx].show; + this.setData({ + formList + }) + }, + setPickerTime(e) { + // console.log(e) + let key = e.currentTarget.id || ""; + let form = this.data.form; + let startTime = e.detail.startTime.slice(0, -9); + let endTime = e.detail.endTime.slice(0, -9); + form[key] = startTime + '~' + endTime; + this.setData({ + form + }) + }, + showTimeRange(e) { + let idx = e.currentTarget.dataset.idx || ""; + let formList = this.data.formList; + formList[idx].show = !formList[idx].show; + this.setData({ + formList + }) + }, + timeRangeConfirm(e) { + // console.log(e) + let idx = e.currentTarget.dataset.idx || ""; + let value = e.detail.time; + let { form, formList } = this.data; + let item = formList[idx]; + let key = item.type+'_'+item.random_code; + item.show = false; + formList[idx] = item; + form[key] = value; + this.setData({ + form, + formList + }) + }, + formSubmit(e) { + const form = this.data.form + console.log('form发生了submit事件,携带数据为:', form) + //校验表单 + if (!this.WxValidate.checkForm(form)) { + const error = this.WxValidate.errorList[0]; + wx.showToast({ + title: error.msg, + icon: "none" + }) + return false; + } else { + console.log('验证成功'); + let {formData, form, formList} = this.data; + let allform_list = []; + formList.forEach(item=>{ + let params = { + title: item.title, + type: item.type, + item_value: form[item.type+'_'+item.random_code], + random_code: item.random_code + } + allform_list.push(params); + }) + console.log(allform_list); + let formParams = { + allform_id: formData.order_allform_id, + allform_list: JSON.stringify(allform_list) + }; + this.triggerEvent('success', formParams) + } + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form/index.json b/eaterplanet_ecommerce/components/s-form/index.json new file mode 100644 index 0000000..24270d8 --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "chooseImage": "../chooseImage/index", + "timePicker": "../../components/timePicker/timePicker", + "time-range": "../../components/time-range/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/components/s-form/index.wxml b/eaterplanet_ecommerce/components/s-form/index.wxml new file mode 100644 index 0000000..3d74037 --- /dev/null +++ b/eaterplanet_ecommerce/components/s-form/index.wxml @@ -0,0 +1,76 @@ +
+ + {{item.title}} * + {{item.remark}} + + + + + + + + + + + + + {{item.title}} + + + + + + + + + + {{item.value[formArr[index].index].text}} + + + + + + + + + + +
+
+ + + 恭喜您申请成功! + 平台将尽快审核! + + + + + 您已经是{{commiss_diy_name}}会员 + + + + + 恭喜您申请成功! + + + + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/apply.wxss b/eaterplanet_ecommerce/distributionCenter/pages/apply.wxss new file mode 100644 index 0000000..cc443a4 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/apply.wxss @@ -0,0 +1,166 @@ +.status { + padding: 360rpx 30rpx 0; + text-align: center; +} + +.p { + font-size: 32rpx; + margin-bottom: 20rpx; +} + +.status-btn { + margin-top: 60rpx; + background-color: #4facfe!important; + +} + +.gcs-box { + padding-bottom: 100rpx; + background: #fff; +} + +.gcs-box .card { + position: relative; +} + +.card-header { + display: flex; + padding: 30rpx; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.1); +} + +.card-header .title { + flex: 1; + color: #4facfe; + font-size: 30rpx; + font-weight: bold; +} + +.bot-line { + width: 100%; + height: 1rpx; + border-bottom: 1rpx solid #f5f5f5; + transition: 200ms all ease-in-out; +} + +.bot-line.focus { + border-bottom: 2rpx solid #4facfe; +} + +.info-item { + display: flex; + align-items: center; + /* justify-content: center; + min-height: 102rpx; */ + font-size: 30rpx; + width: 100%; + box-sizing: border-box; + padding: 30rpx 0; +} + +.info-item.textarea-item { + align-items: flex-start; +} + +.info-item .item-title { + color: #333; + margin-right: 30rpx; + min-width: 60rpx; +} + +.info-item .item-content { + color: #000; + flex: 1; +} + +.info-item .item-content textarea { + width: 100%; +} + +.card-body { + padding: 30rpx 36rpx 0; +} + +.edit-btn button { + background-color: #4facfe; + text-align: center; + line-height: 90rpx; + margin: 80rpx 36rpx; + color: #fff; + border-radius: 6rpx; + font-size: 38rpx; + font-weight: bold; +} + +.edit-btn button::after { + border: 0; +} + +textarea { + min-height: 1.1rem; +} + +.radio-group .radio { + margin-right: 20rpx; +} + +.radio-group .radio text, .checkbox text { + display: inline-block; + vertical-align: middle; +} + +.checkbox { + margin-right: 20rpx; +} + +radio { + width: 38rpx; +} + +radio .wx-radio-input { + border-radius: 50%; + width: 28rpx; + height: 28rpx; +} + +radio .wx-radio-input.wx-radio-input-checked::before { + border-radius: 50%; + width: 44rpx; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + background: #2facff; + border-color: #2facff; +} + +/* 未选中的 背景样式 */ +checkbox .wx-checkbox-input { + display: inline-block; + width: 40rpx; + height: 40rpx; +} + +checkbox .wx-checkbox-input.wx-checkbox-input-checked { + background: #2facff; + border-color: #2facff; +} + +checkbox .wx-checkbox-input.wx-checkbox-input-checked::before { + border-radius: 50%; + width: 46rpx; + height: 46rpx; + line-height: 46rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + background: transparent; + transform: translate(-50%, -50%) scale(1); + -webkit-transform: translate(-50%, -50%) scale(1); +} + +.status-img { + width: 160rpx; + margin-bottom: 20rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/details.js b/eaterplanet_ecommerce/distributionCenter/pages/details.js new file mode 100644 index 0000000..fbb0a88 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/details.js @@ -0,0 +1,84 @@ +// eaterplanet_ecommerce/pages/distribution/details.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [{},{}], + isHideLoadMore: true, + tip: '正在加载' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/details.json b/eaterplanet_ecommerce/distributionCenter/pages/details.json new file mode 100644 index 0000000..471b1a7 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/details.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "推广明细", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/details.wxml b/eaterplanet_ecommerce/distributionCenter/pages/details.wxml new file mode 100644 index 0000000..d914705 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/details.wxml @@ -0,0 +1,14 @@ + + + + + + 推广订单收益 + 2019-01-06 12:26:36 + + +0.3 + + + + 暂无明细 + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/details.wxss b/eaterplanet_ecommerce/distributionCenter/pages/details.wxss new file mode 100644 index 0000000..e4f6b01 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/details.wxss @@ -0,0 +1,37 @@ +.list { + background: #fff; +} + +.list-item { + position: relative; + padding: 20rpx 30rpx; +} + +.list-item::after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + transform: scaleY(.5); + border-bottom: 1px solid #c8c7cc; +} + +.list-item .list-item-r { + font-size: 30rpx; + color: #4facfe; + font-weight: bold; +} + +.list-item .time { + color: #999; + font-size: 24rpx; +} + +.none-list { + text-align: center; + background: #fff; + height: 116rpx; + line-height: 116rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/excharge.js b/eaterplanet_ecommerce/distributionCenter/pages/excharge.js new file mode 100644 index 0000000..9cf98a9 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/excharge.js @@ -0,0 +1,400 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/commonMixin.js')], + /** + * 页面的初始数据 + */ + data: { + type: 1, + items: [{ + name: '1', + value: '系统余额', + show: true, + checked: false + }, + { + name: '2', + value: '微信零钱', + show: true, + checked: false + }, + { + name: '3', + value: '支付宝', + show: true, + checked: false + }, + { + name: '4', + value: '银行卡', + show: true, + checked: false + } + ], + info: [], + tixian_money: '', + final_money: 0 + }, + canTixian: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + wx.showLoading(); + this.getData(); + }, + + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ + needAuth: false + }) + } else { + that.setData({ + needAuth: true + }) + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + wx.showLoading(); + that.getData(); + }) + }, + + getData: function() { + var token = wx.getStorageSync('token'); + let that = this; + //Todo + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.get_commission_info', + token: token + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let commiss_tixian_publish = res.data.data.commiss_tixian_publish; + let items = that.data.items; + let rdata = res.data.data; + if (rdata.commiss_tixianway_yuer == 0) items[0].show = false; + if (rdata.commiss_tixianway_weixin == 0) items[1].show = false; + if (rdata.commiss_tixianway_alipay == 0) items[2].show = false; + if (rdata.commiss_tixianway_bank == 0) items[3].show = false; + + let type = that.data.type; + for (let i = 0; i < items.length; i++) { + if (items[i].show) { + items[i].checked = true; + type = items[i].name; + break + } + } + + let { is_need_subscript, need_subscript_template } = res.data; + + that.setData({ + info: res.data.data, + items, + type, + is_need_subscript, + need_subscript_template, + commiss_tixian_publish + }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + formSubmit: function(event) { + let that = this; + let is_need_subscript = this.data.is_need_subscript; + if(is_need_subscript==1) { + //弹出订阅消息 + this.subscriptionNotice().then(()=>{ + that.resSubmit(event); + }).catch(()=>{ + that.resSubmit(event); + }); + } else { + that.resSubmit(event); + } + }, + + resSubmit: function(e) { + const params = e.detail.value; + let isNull = 0; + let type = this.data.type; + let errortip = [{}, {}, { + bankusername: '微信真实姓名' + }, { + bankusername: '支付宝真实姓名', + bankaccount: '支付宝账户' + }, { + bankname: '银行卡名称', + bankusername: '持卡人姓名', + bankaccount: '银行卡账户' + }]; + for (let item in params) { + params[item] = params[item].replace(/(^\s*)|(\s*$)/g, ""); + if (!params[item]) { + const itemTip = errortip[type][item]; + wx.showToast({ + title: '请输入' + (itemTip || '正确的表单内容'), + icon: 'none' + }) + isNull = 1; + break; + } + if (item == 'money' && params[item] * 1 <= 0) { + wx.showToast({ + title: '请输入正确的金额', + icon: 'none' + }) + return; + } + } + + if (isNull == 1) return; + params.type = type; + + let tdata = this.data; + let tixian_money = parseFloat(tdata.tixian_money); + let max_tixian_money = tdata.info.money; + let community_min_money = parseFloat(tdata.info.commiss_min_tixian_money); + + if (tixian_money == '' || community_min_money > tixian_money) { + wx.showToast({ + title: '最小提现' + community_min_money + '元', + icon: "none", + }) + return false; + } + + if (tixian_money > max_tixian_money) { + wx.showToast({ + title: '本次最大可提现' + max_tixian_money + '元', + icon: "none", + }) + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money + }) + return false; + } + + if (!this.canTixian) return; + this.canTixian = false; + + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.tixian_sub', + token: token, + ...params + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + wx.showToast({ + title: '已提交申请', + icon: 'none', + duration: 2000, + success: function(){ + that.setData({ + canPay: false, + tixian_money: '', + final_money: 0 + }) + that.getData(); + } + }) + } else { + wx.showToast({ + title: res.data.msg ? res.data.msg : '提交失败,请重试', + icon: 'none' + }) + } + that.canTixian = true; + } + }) + }, + + /** + * 订阅消息 + */ + subscriptionNotice: function() { + let that = this; + return new Promise((resolve, reject)=>{ + let obj = that.data.need_subscript_template; + let tmplIds = Object.keys(obj).map(key => obj[key]); // 订阅消息模版id + if (wx.requestSubscribeMessage) { + tmplIds.length && wx.requestSubscribeMessage({ + tmplIds: tmplIds, + success(res) { + let is_need_subscript = 1; + let acceptId = []; + tmplIds.forEach(item=>{ + if (res[item] == 'accept') { + //用户同意了订阅,添加进数据库 + acceptId.push(item); + } else { + //用户拒绝了订阅或当前游戏被禁用订阅消息 + is_need_subscript = 0; + } + }) + + if(acceptId.length) { + that.addAccept(acceptId); + } + that.setData({ is_need_subscript }) + resolve(); + }, + fail(err) { + console.log(err) + reject(); + } + }) + } else { + // 兼容处理 + reject(); + } + }) + }, + + // 用户点击订阅添加到数据库 + addAccept: function (acceptId) { + let token = wx.getStorageSync('token'); + let type = acceptId.join(','); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.collect_subscriptmsg', + token, + type + }, + dataType: 'json', + method: 'POST', + success: function () {} + }) + }, + + /** + * 获得焦点 + */ + bindIptFocus: function() { + this.setData({ + onFocus: true + }) + }, + + /** + * 失去焦点 + */ + bindIptBlur: function() { + this.setData({ + onFocus: false + }) + }, + + radioChange(e) { + this.setData({ + type: e.detail.value + }) + }, + + bindTixianMoneyInput: function(t) { + let max_val = this.data.info.money; + var value = t.detail.value; + if (!(/^(\d?)+(\.\d{0,2})?$/.test(value))) { + value = value.substring(0, value.length - 1); + value = parseFloat(value); + } + + if (value > max_val) { + wx.showToast({ + title: '本次最大可提现' + max_val + '元', + icon: "none", + }) + } + let fee = this.data.info.commiss_tixian_bili; + let val = parseFloat(value) > 0 ? parseFloat(value) : 0; + let final_money = (val * (100 - fee) / 100).toFixed(2); + + let canPay = false; + value ? canPay = true : canPay = false; + + this.setData({ + tixian_money: value, + final_money: final_money, + canPay + }) + return value; + }, + + getAll: function() { + const tdata = this.data; + var max_tixian_money = tdata.info.money * 1; + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + + let canPay = false; + max_tixian_money ? canPay = true : canPay = false; + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + canPay + }) + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/excharge.json b/eaterplanet_ecommerce/distributionCenter/pages/excharge.json new file mode 100644 index 0000000..9b72cdd --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/excharge.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "提现", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxml b/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxml new file mode 100644 index 0000000..39fc67c --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxml @@ -0,0 +1,59 @@ + + + + + {{info.money}} + 可提现金额(元) + + 提现记录 + +
+ + + + 全部提现 + + + 手续费:{{info.commiss_tixian_bili+'%'}} 最终到账:{{final_money}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提现规则: + + + + +
+ + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxss b/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxss new file mode 100644 index 0000000..4849b5f --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/excharge.wxss @@ -0,0 +1 @@ +@import "/eaterplanet_ecommerce/resource/css/excharge.wxss"; diff --git a/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.js b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.js new file mode 100644 index 0000000..957e043 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.js @@ -0,0 +1,120 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + loadText: '加载中', + loadMore: false, + noData: false, + state: ['提现中', '提现成功', '提现失败'] + }, + page: 1, + noMore: false, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.getData(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getData(); + }) + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + getData: function() { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.tixian_record', + token: token, + page: this.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.data; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list }) + } else { + // 无数据 + if (that.page == 1) that.setData({ noData: true }) + that.noMore = true; + that.setData({ loadMore: false }) + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + wx.showModal({ + title: '提示', + content: '您还未登录', + showCancel: false, + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + this.noMore || (this.setData({ loadMore: true }), this.getData()); + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.json b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.json new file mode 100644 index 0000000..f2a60e0 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "提现记录", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxml b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxml new file mode 100644 index 0000000..11517cb --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxml @@ -0,0 +1,22 @@ + + + + + 申请时间 + 状态 + 金额(元) + + + + {{item.addtime}} + {{state[item.state]}} + {{item.money}} + + + + + + 暂无任何明细记录 + + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxss b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxss new file mode 100644 index 0000000..0d4a5e2 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/exchargeRecord.wxss @@ -0,0 +1,63 @@ + +.title { + position: fixed; + top: 0; + left: 0; + right: 0; + display: flex; + align-items: center; + background-color: #fff; + color: #333; + line-height: 80rpx; + font-size: 28rpx; + text-align: center; + box-shadow: 1px 2px 3px rgba(0, 0, 0, .3); + font-weight: bold; +} + +.time { + flex: 3; +} + +.status { + flex: 1; +} + +.money { + flex: 2; +} + +.list { + padding-top: 80rpx; + text-align: center; + background-color: #fff; + font-size: 24rpx; +} + +.list-item { + position: relative; + display: flex; + align-items: center; + line-height: 76rpx; + border-bottom: 1rpx solid #efefef; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/fans.js b/eaterplanet_ecommerce/distributionCenter/pages/fans.js new file mode 100644 index 0000000..81ae60d --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/fans.js @@ -0,0 +1,172 @@ +var page = 1; +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + queryData: { + createTime: null, + communityId: null, + order: [], + page: page, + pageSize: 20 + }, + searchKey: "", + containerHeight: 0, + showLoadMore: false, + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight - Math.round(sysInfo.windowWidth / 375 * 125) + }); + page = 1; + this.data.queryData.communityId = app.globalData.disUserInfo.communityId; + this.data.queryData.createTime = null; + + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var is_show_on = this.data.is_show_on; + if (is_show_on > 0) { + this.setData({ + page: 1, + order: [] + }) + this.getData(); + } else { + this.setData({ + is_show_on: is_show_on + 1 + }) + } + }, + + /** + * 获取数据 + */ + getData: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }); + + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'distribution.get_member_fanslist', + keyword: that.data.searchKey, + token: token, + page: that.data.page + }, + dataType: 'json', + success: function (res) { + + if (res.data.code == 0) { + let rushList = that.data.order.concat(res.data.data); + that.setData({ + order: rushList, + hide_tip: true, + no_order: 0 + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + + }, + + /** + * 监控输入框 + */ + bindSearchChange: function (e) { + this.setData({ + searchKey: e.detail.value + }); + }, + + /** + * 搜索 + */ + searchByKey: function () { + page = 1; + this.setData({ + order: [], + no_order: 0, + page: 1 + }); + this.data.queryData.memberNickName = this.data.searchKey; + this.getData(); + }, + + /** + * 取消 + */ + cancel: function () { + page = 1; + this.setData({ + searchKey: "", + order: [] + }); + this.data.queryData.memberNickName = null; + this.getData(); + }, + + /** + * 获取更多 + */ + getMore: function () { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/fans.json b/eaterplanet_ecommerce/distributionCenter/pages/fans.json new file mode 100644 index 0000000..19de877 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/fans.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "我的粉丝", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-img": "../../components/image/index", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/fans.wxml b/eaterplanet_ecommerce/distributionCenter/pages/fans.wxml new file mode 100644 index 0000000..e0856ed --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/fans.wxml @@ -0,0 +1,30 @@ + + + + + + + + + 粉丝关注时间 + + + + + + + + {{item.username}} + + + + {{item.create_time}} + + + + + + + 暂无粉丝 + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/fans.wxss b/eaterplanet_ecommerce/distributionCenter/pages/fans.wxss new file mode 100644 index 0000000..66eacfd --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/fans.wxss @@ -0,0 +1,146 @@ +.search { + background: #fff; + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; + align-items: center; + position: relative; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.search .icon-search { + position: absolute; + left: 54rpx; +} + +.search input { + flex: 1; + padding-left: 68rpx; + /* width: 520rpx; */ + height: 56rpx; + background: #f8f8f8; + border-radius: 28rpx; + color: #999; + box-sizing: border-box; + line-height: 40rpx; +} + +.search text { + color: #4facfe; + margin-left: 28rpx; +} + +.date { + padding: 0 30rpx; + background: #fff; + height: 90rpx; + line-height: 90rpx; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: #9b9b9b; +} + +.date .date-value { + margin-left: 12rpx; + color: #4facfe; +} + +.date .icon-date { + height: 36rpx; + width: 36rpx; + float: right; + margin: 6rpx 0 0 0; +} + +.date .icon-date image { + height: 36rpx; + width: 36rpx; +} + +.date .icon-clear { + height: 32rpx; + float: right; + color: #4facfe; + margin: 0 28rpx 0 0; + font-size: 24rpx; +} + +.list-content { + width: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.list-header, .list-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 30rpx; +} + +.list-header { + height: 84rpx; +} + +.list-item { + background: #fff; + height: 116rpx; + margin-bottom: 2rpx; +} + +.list-item .item-left { + display: flex; + align-items: center; +} + +.list-item .item-left text { + margin-left: 12rpx; + font-size: 28rpx; + width: 400rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.list-item .item-left .phone { + margin-left: 12rpx; + display: flex; + align-items: center; +} + +.list-item .item-left .icon-phone { + width: 28rpx; + height: 32rpx; + margin-left: 10rpx; +} + +.list-item .item-right { + height: 100%; + display: flex; + align-items: center; + text-align: right; +} + +.list-item .item-right .text { + font-size: 26rpx; + margin-right: 18rpx; +} + +.list-item .item-right .rightArrowImg { + width: 12rpx; + height: 22rpx; +} + +.navigator-hover { + background-color: rgba(0, 0, 0, 0); +} + +.none-member { + text-align: center; + background: #fff; + height: 116rpx; + line-height: 116rpx; +} diff --git a/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.js b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.js new file mode 100644 index 0000000..dee7e7d --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.js @@ -0,0 +1,177 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + currentTab: 0, + pageSize: 10, + navList: [{ + name: "全部", + status: "-1" + }, { + name: "待结算", + status: "0" + }, { + name: "已结算", + status: "1" + }, { + name: "已失效", + status: "2" + }], + list: [], + loadText: "加载中...", + info: {}, + noData: 0, + loadMore: true, + stateArr: ["待结算", "已结算", "已失效"] + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + wx.setNavigationBarTitle({ + title: '推广收益', + }) + this.getInfo(); + this.getData(); + }, + + getInfo: function () { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.get_commission_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + // Todo + that.setData({ info: res.data.data }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + getData: function(){ + let that = this; + let token = wx.getStorageSync('token'); + let currentTab = this.data.currentTab; + let state = this.data.navList[currentTab].status; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'distribution.listorder_list', + token: token, + state: state, + page: this.page + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 6) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else { + // 无数据 + if (that.page == 1) that.setData({ noData: 1 }) + that.setData({ loadMore: false, noMore: false, loadText: "没有更多记录了~" }) + } + wx.hideLoading(); + } + }) + }, + + getCurrentList: function () { + if (!this.data.loadMore) return false; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + }, + + onReachBottom: function () { + this.getCurrentList(); + }, + + bindChange: function (t) { + this.page = 1; + this.setData({ + // currentTab: 1 * t.detail.current, + currentTab: t, + list: [], + noData: 0, + loadMore: true, + loadText: "加载中..." + }, () => { + console.log('我变啦'); + this.getData(); + }); + }, + + /** + * 切换导航 + */ + switchNav: function (e) { + const that = this; + if (this.data.currentTab === 1 * e.target.dataset.current) return false; + let currentTab = 1 * e.target.dataset.current; + this.setData({ + currentTab + },()=>{ + that.bindChange(currentTab) + }); + }, + + handleTipDialog: function(){ + this.setData({ + showTipDialog: !this.data.showTipDialog + }) + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.json b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.json new file mode 100644 index 0000000..ae01e48 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "推广收益", + "navigationBarBackgroundColor": "#4facfe", + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-dialog": "../../components/dialog/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxml b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxml new file mode 100644 index 0000000..6f5d3ec --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxml @@ -0,0 +1,86 @@ + + + + + + + 推荐二维码 + + + 可提现(元) + {{info.money}} + 提现 + + + + + 订单数 + {{info.order_count}} + + + + 粉丝数量 + + {{info.member_count}} + + + + + + + {{item.name}} + + + + + 还没有记录 快去分享吧~ + + + + + 订单编号:{{item.order_num_alias}} + {{stateArr[item.state]}} + + + + + + {{item.name}} + + + ¥{{item.price}} x {{item.quantity}} {{item.option_str}} + + + + + 会员名称 + {{item.uname}} + + + 粉丝等级 + {{item.level}} + + + 下单时间 + {{item.addtime}} + + + 订单状态 + {{item.status_name}} + + + 预估佣金变化 + {{item.money}} + + + 预估佣金 + {{item.money}} + + + + + + + + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxss b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxss new file mode 100644 index 0000000..687a404 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/goodsDetails.wxss @@ -0,0 +1,267 @@ +.zr { + background: #fff; + width: 100%; + position: relative; + overflow: hidden; + padding-bottom: 30rpx; + margin-bottom: 20rpx; +} + +.top_box { + color: #333; + font-size: 24rpx; + line-height: 1; +} + +.total { + text-align: center; + padding-bottom: 40rpx; +} + +.total-money { + font-weight: bold; + font-size: 58rpx; + margin-top: 15rpx; + padding-left: 80rpx; +} + +.three { + display: flex; + justify-content: center; + align-items: center; +} + +.three-item { + position: relative; + flex: 1; + text-align: center; +} + +.three-item::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 1rpx; + border-left: 1rpx solid #4facfe; +} + +.three-item:first-child::before { + content: none; +} + +.three-title { + color: #999; + font-size: 24rpx; +} + +.three-money { + margin-top: 15rpx; + font-size: 28rpx; + font-weight: bold; +} + +.rightArrowImg { + width: 12rpx; + height: 22rpx; + margin-left: 8rpx; +} + +.qrcode { + display: inline-block; + width: 80rpx; + font-size: 22rpx; + text-align: center; + padding: 8rpx 0; + border-radius: 5rpx; + background: #4facfe; + color: #fff; + vertical-align: middle; +} + +.nav { + position: sticky; + position: -webkit-sticky; + top: 0; + transition: top 0.3s; + z-index: 10; + background: #fff; + height: 92rpx; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .on { + position: relative; + color: #4facfe; + border-bottom: 4rpx solid #4facfe; +} + +.nav .on::after { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-bottom: 2rpx solid #4facfe; +} + +.noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 30%; +} + +.noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.list-item { + padding: 30rpx; + background-color: #fff; + margin-bottom: 20rpx; + font-size: 26rpx; +} + +.item-head { + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #ececec; + padding-bottom: 20rpx; +} + +.item-head .status { + color: #4facfe; +} + +.list-item .line { + display: flex; + justify-content: space-between; + align-items: center; + line-height: 2; +} + +.line-tit { + color: #999; +} + +.top_box_head { + padding: 30rpx; +} + +.tx-btn { + color: #4facfe; +} + +.goodsInfo { + padding: 0 !important; +} + +.goodsInfo .identity { + left: 0 !important; +} + +.spu { + padding: 30rpx 30rpx 20rpx; + display: flex; + justify-content: flex-start; +} + +.spu .goodsImg { + width: 140rpx; + height: 140rpx; +} + +.spu .detail { + margin-left: 20rpx; + font-size: 24rpx; + color: #aaa; +} + +.spu .detail .spuName { + color: #444; + font-size: 28rpx; + font-weight: 500; + overflow: hidden; +} + +.spu .detail .tips { + line-height: 1; + width: 530rpx; + margin-top: 16rpx; + position: relative; +} + +.spu .detail .tips .last { + float: right; +} + +.spu .detail .tips .price { + color: #ff758c; + font-size: 32rpx; +} + +.rightArrow { + font-size: 24rpx; +} + +.dialogText { + box-sizing: border-box; + padding: 20rpx; + height: 140rpx!important; + text-align: justify; +} + +.dialogBtn { + font-size: 30rpx!important; + height: 68rpx!important; + line-height: 68rpx!important; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/me.js b/eaterplanet_ecommerce/distributionCenter/pages/me.js new file mode 100644 index 0000000..0645203 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/me.js @@ -0,0 +1,160 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/commonMixin.js')], + /** + * 页面的初始数据 + */ + data: { + info: [], + member_info: { + username: '', + member_id: 1, + avatar: "../../images/head-bitmap.png" + }, + info: { + total_money: 0, + share_name: '无' + } + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let commiss_diy_name = wx.getStorageSync('commiss_diy_name') || '分销'; + wx.setNavigationBarTitle({ + title: `${commiss_diy_name}中心`, + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ + needAuth: false + }) + that.getUser(); + that.getData(); + } else { + that.setData({ + needAuth: true + }) + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getUser(); + that.getData(); + }) + }, + + getData: function () { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.get_commission_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let parent_info = res.data.parent_info; + that.setData({ info: res.data.data, parent_info }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + getUser: function(){ + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.get_user_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + // let commiss_diy_name = res.data.commiss_diy_name || '分销'; + // wx.setNavigationBarTitle({ + // title: `${commiss_diy_name}中心`, + // }) + that.setData({ member_info: res.data.data }) + } else { + //is_login + that.setData({ needAuth: true }) + wx.setStorage({ + key: "member_id", + data: null + }) + } + } + }) + }, + + goLink: function (event) { + if (!this.authModal()) return; + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/me.json b/eaterplanet_ecommerce/distributionCenter/pages/me.json new file mode 100644 index 0000000..7523c02 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/me.json @@ -0,0 +1,8 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar/index", + "i-new-auth": "../../components/new-auth/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/me.wxml b/eaterplanet_ecommerce/distributionCenter/pages/me.wxml new file mode 100644 index 0000000..47bc96b --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/me.wxml @@ -0,0 +1,50 @@ + + + + + + {{info.money}} + 可提现金额(元) + + + + + + + + + 我的粉丝 + + + + + + + + 推广收益 + + + + + + + + 我的二维码 + + + + + + + + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/me.wxss b/eaterplanet_ecommerce/distributionCenter/pages/me.wxss new file mode 100644 index 0000000..63b4ade --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/me.wxss @@ -0,0 +1,72 @@ +.wrap { + background-color: #fff; +} + +.user-info { + padding: 30rpx; +} + +.user-info .avatar { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; + border-radius: 50%; +} + +.nickname { + font-size: 32rpx; + font-weight: bold; + color: #000; +} + +.userid, invote { + font-size: 26rpx; + margin-top: 10rpx; +} + +.money { + padding: 20rpx 30rpx; +} + +.bor-bottom { + position: relative; +} + +.bor-bottom::after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + transform: scaleY(.5); + border-bottom: 1rpx solid #efefef; +} + +.item-main { + padding: 32rpx 40rpx; +} + +.item-title { + height: 40rpx; + width: 400rpx; + color: #444; + font-size: 28rpx; + display: flex; + align-items: center; +} + +.icon-right { + width: 12rpx; + height: 22rpx; +} + +.recharge-money { + color: #4facfe; + font-size: 50rpx; +} + +.recharge-tip { + color: #999; + font-size: 24rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/member.js b/eaterplanet_ecommerce/distributionCenter/pages/member.js new file mode 100644 index 0000000..897efd0 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/member.js @@ -0,0 +1,174 @@ +var page = 1; +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + queryData: { + createTime: null, + communityId: null, + order: [], + page: page, + pageSize: 20 + }, + searchKey: "", + containerHeight: 0, + showLoadMore: false, + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + levelName: ['', '1级粉丝', '2级粉丝', '3级粉丝'] + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight - Math.round(sysInfo.windowWidth / 375 * 125) + }); + page = 1; + this.data.queryData.communityId = app.globalData.disUserInfo.communityId; + this.data.queryData.createTime = null; + wx.setNavigationBarTitle({ + title: '我的粉丝', + }) + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var is_show_on = this.data.is_show_on; + if (is_show_on > 0) { + this.setData({ + page: 1, + order: [] + }) + this.getData(); + } else { + this.setData({ + is_show_on: is_show_on + 1 + }) + } + }, + + /** + * 获取数据 + */ + getData: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }); + + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'distribution.get_head_child_headlist', + keyword: that.data.searchKey, + token: token, + page: that.data.page + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let rushList = that.data.order.concat(res.data.data); + that.setData({ + order: rushList, + hide_tip: true, + no_order: 0 + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + + }, + + /** + * 监控输入框 + */ + bindSearchChange: function (e) { + this.setData({ + searchKey: e.detail.value + }); + }, + + /** + * 搜索 + */ + searchByKey: function () { + page = 1; + this.setData({ + order: [], + no_order: 0, + page: 1 + }); + this.data.queryData.memberNickName = this.data.searchKey; + this.getData(); + }, + + /** + * 取消 + */ + cancel: function () { + page = 1; + this.setData({ + searchKey: "", + order: [] + }); + this.data.queryData.memberNickName = null; + this.getData(); + }, + + /** + * 获取更多 + */ + getMore: function () { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/member.json b/eaterplanet_ecommerce/distributionCenter/pages/member.json new file mode 100644 index 0000000..d3fd5c1 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/member.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-img": "../../components/image/index", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/member.wxml b/eaterplanet_ecommerce/distributionCenter/pages/member.wxml new file mode 100644 index 0000000..4d5aa8e --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/member.wxml @@ -0,0 +1,31 @@ + + + + + + + + + 粉丝关注时间 + + + + + + + + {{item.username}} + {{levelName[item.child_level]}} + + + + {{item.create_time}} + + + + + + + 暂无粉丝 + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/member.wxss b/eaterplanet_ecommerce/distributionCenter/pages/member.wxss new file mode 100644 index 0000000..e687f6c --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/member.wxss @@ -0,0 +1,151 @@ +.search { + background: #fff; + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; + align-items: center; + position: relative; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.search .icon-search { + position: absolute; + left: 54rpx; +} + +.search input { + flex: 1; + padding-left: 68rpx; + /* width: 520rpx; */ + height: 56rpx; + background: #f8f8f8; + border-radius: 28rpx; + color: #999; + box-sizing: border-box; + line-height: 40rpx; +} + +.search text { + color: #4facfe; + margin-left: 28rpx; +} + +.date { + padding: 0 30rpx; + background: #fff; + height: 90rpx; + line-height: 90rpx; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: #9b9b9b; +} + +.date .date-value { + margin-left: 12rpx; + color: #4facfe; +} + +.date .icon-date { + height: 36rpx; + width: 36rpx; + float: right; + margin: 6rpx 0 0 0; +} + +.date .icon-date image { + height: 36rpx; + width: 36rpx; +} + +.date .icon-clear { + height: 32rpx; + float: right; + color: #4facfe; + margin: 0 28rpx 0 0; + font-size: 24rpx; +} + +.list-content { + width: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.list-header, .list-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 30rpx; +} + +.list-header { + height: 84rpx; +} + +.list-item { + background: #fff; + height: 116rpx; + margin-bottom: 2rpx; +} + +.list-item .item-left { + display: flex; + align-items: center; +} + +.list-item .item-left text { + margin-left: 12rpx; + font-size: 28rpx; + width: 400rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.list-item .item-left .phone { + margin-left: 12rpx; + display: flex; + align-items: center; +} + +.list-item .item-left .icon-phone { + width: 28rpx; + height: 32rpx; + margin-left: 10rpx; +} + +.list-item .item-right { + height: 100%; + display: flex; + align-items: center; + text-align: right; +} + +.list-item .item-right .text { + font-size: 26rpx; + margin-right: 18rpx; +} + +.list-item .item-right .rightArrowImg { + width: 12rpx; + height: 22rpx; +} + +.list-item .level { + margin-left: 5px; + color: #999; +} + +.navigator-hover { + background-color: rgba(0, 0, 0, 0); +} + +.none-member { + text-align: center; + background: #fff; + height: 116rpx; + line-height: 116rpx; +} diff --git a/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.js b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.js new file mode 100644 index 0000000..4b3676a --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.js @@ -0,0 +1,125 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + member_id: 0, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var that = this; + let member_id = options.memberId || 0; + if (!member_id) { + wx.showToast({ + title: '参数错误', + icon: 'none' + }) + setTimeout(()=>{ + wx.redirectTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/member', + }) + }, 1000) + return; + } + this.member_id = member_id; + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + wx.showModal({ + title: '提示', + content: '您还未登录', + showCancel: false, + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } else { + that.getData(); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getData(); + }) + }, + + getData: function(){ + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.get_parent_agent_info_bymemberid', + token: token, + member_id: that.member_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + console.log(res.data.data) + that.setData({ + info: res.data.data + }) + }else{ + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.json b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.json new file mode 100644 index 0000000..5c8a929 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "个人信息", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxml b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxml new file mode 100644 index 0000000..cfa167e --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxml @@ -0,0 +1,23 @@ + + + + + 上级姓名 + {{info.parent_username}} + + + 上级电话 + {{info.parent_telephone}} + + + 推荐人姓名 + {{info.share_username}} + + + 推荐人电话 + {{info.share_telephone}} + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxss b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxss new file mode 100644 index 0000000..a76ecd6 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/memberInfo.wxss @@ -0,0 +1,39 @@ +.wrap { + padding: 30rpx; + background-color: #fff; +} + +.cell { + position: relative; + margin-bottom: 30rpx; + padding-bottom: 10rpx; +} + +.cell::after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + transform: scaleY(.5); + border-bottom: 1px solid #c8c7cc; +} + +.cell-title { + color: #000; + margin-bottom: 20rpx; + font-weight: bold; + font-size: 24rpx; +} + +.cell .img { + width: 120rpx; + height: 120rpx; + border-radius: 5px; +} + +.cell-content { + font-size: 34rpx; + color: #666; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/recruit.js b/eaterplanet_ecommerce/distributionCenter/pages/recruit.js new file mode 100644 index 0000000..502e590 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/recruit.js @@ -0,0 +1,261 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + attached: function() { + var e = wx.getSystemInfoSync().model; + (-1 < e.indexOf("iPhone X") || -1 < e.indexOf("unknown= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { + let commiss_diy_name = groupInfo && groupInfo.commiss_diy_name || '分销'; + wx.setNavigationBarTitle({ + title: `会员${commiss_diy_name}`, + }) + }); + this.get_instruct(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ + needAuth: false + }) + that.getData(); + } else { + that.setData({ + needAuth: true + }) + } + }) + }, + + get_instruct: function() { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'distribution.get_instruct' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let article = res.data.content || ''; + that.setData({article}) + } + } + }) + }, + + getData: function() { + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.get_user_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let member_info = res.data.data; + let { comsiss_flag, comsiss_state } = member_info; + let { + commiss_level, + commiss_sharemember_need, + commiss_biaodan_need, + commiss_share_member_update, + share_member_count, + commiss_become_condition + } = res.data; + + let commiss_diy_name = res.data.commiss_diy_name || '分销'; + wx.setNavigationBarTitle({ + title: `会员${commiss_diy_name}`, + }) + + let params = {}; + let formStatus = 0; //未填写 1 已填写未审核 2 已审核 + let need_num_update = 0; //还差多少人升级 + //开启分销 + if (commiss_level > 0) { + //分销会员状态 + let comsissStatus = 0; // 1已成为分销会员 2需要分享未达人数 3需要分享已达人数 4需要表单 5等待审核 6不需要审核 + let canApply = false; //可申请 + if (comsiss_flag == 1 && comsiss_state == 1){ + comsissStatus = 1; + } else { + //需要分享 + if (commiss_sharemember_need==1){ + need_num_update = commiss_share_member_update * 1 - share_member_count * 1; + comsissStatus = 2; + if (need_num_update <= 0) { + comsissStatus = 3; + canApply = true; + } + } else { + canApply = true; + } + } + + params = { + formStatus, + need_num_update, + comsissStatus, + canApply + }; + } + + that.setData({ + ...params, + commiss_diy_name: res.data.commiss_diy_name || '分销' + }); + } else { + //is_login + that.setData({ + needAuth: true + }) + wx.setStorage({ + key: "member_id", + data: null + }) + } + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + },()=>{ + that.get_instruct(); + that.getData(); + }) + }, + + subCommis: function() { + if (!this.authModal()) return; + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'distribution.sub_commission_info', + token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + if (res.data.msg == "申请成功,平台将尽快审核"){ + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/apply', + }) + } else { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/me', + }) + } + } else { + if (res.data.msg=="请先登录"){ + that.setData({ needAuth: true }) + return; + } + if (res.data.msg == "您未填写表单!") { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/apply', + }) + return; + } + wx.showToast({ + title: res.data.msg ? res.data.msg:'申请失败,请重试!', + icon: 'none' + }) + } + } + }) + }, + + goNext: function (e) { + if (!this.authModal()) return; + let status = 0; + let member_info = this.data.member_info || {}; + let comsiss_flag = member_info.comsiss_flag || 0; + let comsiss_state = member_info.comsiss_state || 0; + if (comsiss_flag == 1) { + comsiss_state == 0 ? status = 1 : status = 2; + } + let type = e.currentTarget.dataset.type; + if (type == 'share') { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/share', + }) + } else if (type == 'commiss') { + if (this.data.comsissStatus == 1) { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/me', + }) + } else if (status == 2) { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/me', + }) + } else { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/recruit', + }) + } + } else if (type == 'form') { + if (status == 2) { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/me', + }) + } else { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/distributionCenter/pages/apply', + }) + } + } + } + +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/recruit.json b/eaterplanet_ecommerce/distributionCenter/pages/recruit.json new file mode 100644 index 0000000..64b61c6 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/recruit.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "会员分销", + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxml b/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxml new file mode 100644 index 0000000..579baa6 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxml @@ -0,0 +1,27 @@ + + + + + + + + + + + 分享{{need_num_update}}位新粉丝可升级为{{commiss_diy_name}} + + + 立即分享> + + + + 进入{{commiss_diy_name}} + + + 点击申请 + + 点击申请 + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxss b/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxss new file mode 100644 index 0000000..be819a1 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/recruit.wxss @@ -0,0 +1,48 @@ +.section { + background: #fff; + margin-bottom: 20rpx; + padding: 0 10rpx 150rpx; +} + +.wxParse-img { + width: 100%; + vertical-align: top; +} + +.wxParse-inline { + padding: 8rpx 0; +} + +.fixed-bottom { + position: fixed; + bottom: 0; + left: 0; + right: 0; +} + +.apply-btn { + height: 96rpx; + background: #4facfe; + color: #fff; + font-size: 30rpx; + line-height: 96rpx; + text-align: center; + display: block; +} + +.apply-btn.disabled { + background: #ccc; +} + +.tip { + display: flex; + align-items: center; + justify-content: space-between; + padding: 15rpx 20rpx; + background: #fff; + box-shadow: 0 -2px 3px -1px #ccc; +} + +.tip .btn,.tot { + color: #4facfe; +} diff --git a/eaterplanet_ecommerce/distributionCenter/pages/share.js b/eaterplanet_ecommerce/distributionCenter/pages/share.js new file mode 100644 index 0000000..db67f2f --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/share.js @@ -0,0 +1,225 @@ +var util = require('../../utils/util.js'); +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + poster: '', + imageSize: { + imageWidth: "100%", + imageHeight: 600 + }, + is_share_html: true, + member_info: {} + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + wx.setNavigationBarTitle({ + title: '我的二维码' + }) + util.check_login_new().then((res) => { + if (!res) { + wx.showModal({ + title: '提示', + content: '您还未登录', + showCancel: false, + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } else { + that.getMemberInfo(); + that.getData(); + } + }) + }, + + onLoad: function(e) { + var t = this; + util.check_login_new().then(function(e) { + e ? (t.getMemberInfo(), t.getData()) : wx.showModal({ + title: "提示", + content: "您还未登录", + showCancel: !1, + success: function(e) { + e.confirm && wx.switchTab({ + url: "/eaterplanet_ecommerce/pages/user/me" + }); + } + }); + }); + }, + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getMemberInfo(); + that.getData(); + }) + }, + + /** + * 图片信息 + */ + imageLoad: function (e) { + var imageSize = util.imageUtil(e) + this.setData({ + imageSize + }) + }, + + getMemberInfo: function () { + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.get_user_info', + token: token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let member_info = res.data.data; + //开启分销 + if (res.data.commiss_level > 0) { + //还差多少人升级 + let commiss_share_member_update = res.data.commiss_share_member_update * 1; + let share_member_count = res.data.share_member_count * 1; + let need_num_update = res.data.commiss_share_member_update * 1 - res.data.share_member_count * 1; + let commiss_diy_name = res.data.commiss_diy_name || '分销'; + // wx.setNavigationBarTitle({ + // title: '会员' + commiss_diy_name, + // }) + + that.setData({ + member_info, + commiss_level: res.data.commiss_level, + commiss_sharemember_need: res.data.commiss_sharemember_need, + commiss_share_member_update, + share_member_count, + need_num_update, + commiss_diy_name + }); + } else { + wx.showModal({ + title: '提示', + content: '未开启分销', + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } else { + //is_login + that.setData({ + is_login: false + }) + wx.setStorage({ + key: "member_id", + data: null + }) + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + getData: function(){ + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'distribution.get_haibao', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + that.setData({ poster: res.data.commiss_qrcode }) + } else { + that.setData({ + needAuth: true + }) + } + } + }) + }, + + toggleShare: function(){ + let is_share_html = this.data.is_share_html; + this.setData({ is_share_html: !is_share_html }) + }, + + prevImg: function(e){ + let image_path = e.currentTarget.dataset.src; + wx.previewImage({ + current: image_path, // 当前显示图片的http链接 + urls: [image_path] // 需要预览的图片http链接列表 + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + this.setData({ is_share_html: true }) + var community = wx.getStorageSync('community'); + var community_id = community.communityId; + var member_id = wx.getStorageSync('member_id'); + console.log(community_id, member_id); + return { + title: '', + path: "eaterplanet_ecommerce/pages/index/index?community_id=" + community_id + '&share_id=' + member_id, + imageUrl: '', + success: function () { }, + fail: function () { } + }; + } +}) diff --git a/eaterplanet_ecommerce/distributionCenter/pages/share.json b/eaterplanet_ecommerce/distributionCenter/pages/share.json new file mode 100644 index 0000000..06c2522 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/share.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "", + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/distributionCenter/pages/share.wxml b/eaterplanet_ecommerce/distributionCenter/pages/share.wxml new file mode 100644 index 0000000..3306ca7 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/share.wxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/distributionCenter/pages/share.wxss b/eaterplanet_ecommerce/distributionCenter/pages/share.wxss new file mode 100644 index 0000000..b66eaf8 --- /dev/null +++ b/eaterplanet_ecommerce/distributionCenter/pages/share.wxss @@ -0,0 +1,178 @@ +.wrap { + padding-bottom: 250rpx; +} + +.swipe { + width: 100%; +} + +.swiper-content { + height: auto; +} + +.banner-img { + width: 100%; +} + +.share-foot { + padding: 20rpx 30rpx; + text-align: center; + box-shadow: 0 0 5rpx rgba(0, 0, 0, .3); +} + +.share-tip { + font-size: 32rpx; + color: #000; + font-weight: bold; + margin-bottom: 20rpx; +} + +.tot { + color: #4facfe; +} + +.foot-btn button { + background-color: #4facfe; +} + +button.primary-btn { + background-color: #00f2fe; + color: #fff; + margin-left: 40rpx; +} + +/*分享begin*/ + +.ui-mask { + position: fixed; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background: rgba(0, 0, 0, 0.6); +} + +.model-services { + width: 100%; + position: fixed; + background-color: #fff; + bottom: 0; + z-index: 1000; + color: #333; + -webkit-transition: all 0.3s; + transition: all 0.3s; + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%); +} + +.model-services.show { + -webkit-transform: translate(0); + transform: translate(0); +} + +.model-services .model-services-title { + font-size: 36rpx; + text-align: center; + height: 80rpx; + line-height: 80rpx; + border-bottom: 1px solid #f2f5f8; +} + +.model-services .model-services-content { + padding: 40rpx; +} + +.model-services .model-services-content .service-item { + margin-bottom: 20rpx; + width: 50%; + float: left; + text-align: center; +} + +.model-services .model-services-content .service-icon { + font-size: 80rpx; + color: #4facfe; +} + +.service-name { + padding-left: 10rpx; +} + +.cube-text { + position: relative; + width: 100%; + height: 32rpx; + line-height: 32rpx; + color: #777; + margin-top: 5rpx; + font-size: 24rpx; +} + +.none_btn { + border: none; + line-height: 1.1; + padding: 0px; +} + +button[plain] { + border: none; +} + +.share-modal { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 101; + transition: all 400ms ease-in; +} + +.share-modal-content { + position: relative; + width: 70%; + top: 50%; + left: 15%; + transform: translateY(-50%); + z-index: 110; +} + +.share-modal-img { + width: 100%; + height: 956rpx; + background: #f7f7f7; +} + +.share-modal-img image { + width: 100%; +} + +.share-modal-btn-list { + display: flex; + margin-top: 30rpx; +} + +.share-modal-btn-item { + text-align: center; + flex: 1; +} + +.share-modal .btn-icon { + width: 70rpx; + margin: 0 auto; +} + +.share-modal .btn-text { + position: relative; + width: 100%; + height: 32rpx; + line-height: 32rpx; + color: #fff; + margin-top: 5rpx; + font-size: 24rpx; +} + +/*分享end*/ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/cartModal.js b/eaterplanet_ecommerce/moduleA/components/cartModal.js new file mode 100644 index 0000000..005738b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/cartModal.js @@ -0,0 +1,165 @@ +var app = getApp(); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + show: { + type: Boolean, + value: false + }, + carts: { + type: Object || Array, + value: {} + }, + soliId: { + type: Number, + value: 0 + }, + stitle: { + type: String, + value: '已选商品' + } + }, + + /** + * 组件的初始数据 + */ + data: { + token: '', + community: '' + }, + + attached: function(){ + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + this.setData({ + token, + community + }) + }, + + /** + * 组件的方法列表 + */ + methods: { + changeNumber: function(e){ + let that = this; + let cartId = e.currentTarget.dataset.cartid; //购物车商家索引 + let gidx = e.currentTarget.dataset.gidx; //商品索引 + let num = e.detail.value; //改变后数量 + if (num==0) { + this.cofirm_del(cartId, gidx); + } else { + let carts = that.data.carts; + let lastGoodsNum = carts[cartId].shopcarts[gidx].goodsnum; //记录上次数量 + carts[cartId].shopcarts[gidx].goodsnum = num; + this.setData({ carts },()=>{ + that.go_record().then(() => { + that.triggerEvent('changeCart', carts); + }).catch(() => { + carts[cartId].shopcarts[gidx].goodsnum = lastGoodsNum; + that.setData({ carts }) + }); + }) + } + }, + handleModal: function(){ + console.log('关闭购物车弹窗') + this.triggerEvent('hideModal'); + }, + /** + * 确认删除提示框 + */ + cofirm_del: function (parentid, index) { + let that = this; + wx.showModal({ + title: '提示', + content: '确定删除这件商品吗?', + confirmColor: '#FF0000', + success: function (res) { + if (res.confirm) { + let carts = that.data.carts; + let goodsItem = carts[parentid].shopcarts[index]; + let del_car_keys = goodsItem.key; + carts[parentid].shopcarts.splice(index, 1); + that.setData({ carts }) + that.del_car_goods(del_car_keys); + } else { + console.log('取消删除') + } + } + }) + }, + + /** + * 删除商品 + */ + del_car_goods: function (carkey) { + var that = this; + console.log('del_car_goods:开始'); + let { token, community } = this.data; + let community_id = community.communityId; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'car.del_car_goods', + carkey, + community_id, + token + }, + method: 'POST', + dataType: 'json', + success: function (msg) { + if (msg.data.code == 0) { + that.triggerEvent('changeCart', that.data.carts); + } + } + }) + }, + + //记录购物车状态值,为了下次进来还是和上次一样 + go_record: function () { + var that = this; + return new Promise(function (resolve, reject) { + let { carts, token, community, soliId } = that.data; + var keys_arr = []; + var all_keys_arr = []; + let community_id = community.communityId; + for (var i in carts) { + for (var j in carts[i]['shopcarts']) { + keys_arr.push(carts[i]['shopcarts'][j]['key']); + all_keys_arr.push(carts[i]['shopcarts'][j]['key'] + '_' + carts[i]['shopcarts'][j]['goodsnum']); + } + } + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'car.checkout_flushall', + token, + car_key: keys_arr, + community_id, + all_keys_arr, + buy_type: 'soitaire', + soli_id: soliId + }, + method: 'POST', + dataType: 'json', + success: function (msg) { + if (msg.data.code == 0) { + resolve(); + } else { + wx.showToast({ + title: msg.data.msg, + icon: 'none', + duration: 2000 + }) + reject(); + } + } + }) + }) + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/cartModal.json b/eaterplanet_ecommerce/moduleA/components/cartModal.json new file mode 100644 index 0000000..c218cf8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/cartModal.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-input-number": "../../components/input-number/index", + "i-modal": "../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/cartModal.wxml b/eaterplanet_ecommerce/moduleA/components/cartModal.wxml new file mode 100644 index 0000000..41d5fec --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/cartModal.wxml @@ -0,0 +1,31 @@ + + + + {{stitle}} + + + + + + + + + + + + + {{item.title}} + {{item.goodstype}} + ¥{{item.currntprice}} + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/cartModal.wxss b/eaterplanet_ecommerce/moduleA/components/cartModal.wxss new file mode 100644 index 0000000..16deb54 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/cartModal.wxss @@ -0,0 +1,18 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.cart .list .item { + position: relative; + padding: 30rpx 30rpx 30rpx 0; + margin-left: 30rpx; + align-items: center; +} + +.cart .list .item .img { + width: 120rpx; + height: 120rpx; +} + +.zmodal { + z-index: 799!important; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/img-box/img-box.js b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.js new file mode 100644 index 0000000..900ebd1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.js @@ -0,0 +1,60 @@ +var app = getApp(); + +Component({ + properties: { + item: { + type: Object + } + }, + methods: { + agree: function() { + let that = this; + let item = this.data.item; + let token = wx.getStorageSync('token'); + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.fav_recipe_do', + token: token, + id: item.id + }, + dataType: 'json', + success: function (res) { + if(res.data.code == 0) { + //成功 + wx.showToast({ + title: '已喜欢~', + icon: 'none' + }) + item.fav_count = res.data.fav_count; + item.has_fav = 1; + that.setData({ item }) + } else if (res.data.code == 1) { + //未登录 + that.triggerEvent('needAuth'); + } else if (res.data.code == 2) { + //取消收藏 + item.fav_count = res.data.fav_count; + item.has_fav = 0; + that.setData({ item }) + wx.showToast({ + title: '取消喜欢~', + icon: 'none' + }) + } + } + }) + }, + goDetails: function(e){ + let id = e.currentTarget.dataset.id || ''; + let url = `/eaterplanet_ecommerce/moduleA/menu/details?id=${id}` + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + id && wx.redirectTo({ url }) + } else { + id && wx.navigateTo({ url }) + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/img-box/img-box.json b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.json new file mode 100644 index 0000000..7a23245 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.json @@ -0,0 +1,4 @@ +{ + "component": true +} + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxml b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxml new file mode 100644 index 0000000..9a72683 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxml @@ -0,0 +1,14 @@ + + + + + {{item.recipe_name}} + + + {{item.username}} + + {{item.fav_count}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxss b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxss new file mode 100644 index 0000000..abddae8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/img-box/img-box.wxss @@ -0,0 +1,75 @@ +@import "../../../../icon.wxss"; + +.img-box { + position: relative; + width: 100%; + margin-bottom: 20rpx; + background: #fff; + border-radius: 10rpx; + overflow: hidden; + box-shadow: 0 0 3px #ccc; +} + +.img-box .img { + display: block; + width: 100%; + border-radius: 10rpx 10rpx 0 0; + overflow: hidden; +} + +.img-box .play { + position: absolute; + font-size: 42rpx; + right: 10rpx; + top: 10rpx; + color: rgba(0, 0, 0, .6); + z-index: 10; +} + +.img-box .title { + font-size: 28rpx; + font-weight: bold; + line-height: 1.4; + margin-bottom: 15rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + word-break: break-all; +} + +.img-box .cont { + padding: 20rpx; +} + +.img-box .user { + display: flex; + align-items: center; + color: #666; + font-size: 22rpx; +} + +.img-box .user .avatar { + width: 40rpx; + height: 40rpx; + border-radius: 50%; + margin-right: 10rpx; +} + +.img-box .user .nickname { + max-width: 130rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.img-box .user .iconfont { + margin-right: 5rpx; + color: rgb(186, 194, 202); + font-size: 34rpx; + transition: all 200ms ease-in; +} + +.img-box .user .iconfont.active { + color: #ff758c; +} diff --git a/eaterplanet_ecommerce/moduleA/components/masonry/masonry.js b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.js new file mode 100644 index 0000000..db0b90d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.js @@ -0,0 +1,165 @@ +/** + * 瀑布流组件 + */ +Component({ + properties: { + intervalWidth: { + type: String, + value: "20rpx" + } + }, + data: { + items: [], + stopMasonry: false + }, + methods: { + /** + * 批量添加元素 + * + * @param {Array} items - 新增的元素数组 + */ + append(items) { + if (Object.prototype.toString.call(items) !=='[object Array]') { + console.error("[masonry]参数类型错误,渲染失败"); + return false; + } + + this.setData({ + stopMasonry: false + }) + + return this._refresh(items); + }, + + /** + * 批量删除瀑布流中的元素 + * + * @param {Number} start - 开始下标 + * @param {Number} end - 结束下标 + */ + delete(start, end) { + const { items } = this.data; + if (start < end && start < items.length - 1) { + let len = end- start; + let newItems = items.splice(start, len); + this._refresh(newItems) + } else { + console.error("[masonry]初始下标异常,删除失败!"); + } + }, + + /** + * 更新数组中的某个元素 + * + * @param {Object} newItem - 修改后的元素 + * @param {Number} index - 需要更新的数组下标 + */ + updateItem(newItem, index) { + const { items } = this.data; + if (index <= items.length - 1) { + this.setData({ + items: [ + ...items.slice(0, index), + Object.assign(items[index], newItem), + ...items.slice(index + 1) + ] + }) + } else { + console.error("[masonry]下标越界,修改失败!"); + } + }, + + /** + * 删除瀑布流中的某个元素 + * + * @param {Number} index - 数组下标 + */ + deleteItem(index) { + const { items } = this.data; + if (index <= items.length - 1) { + let newItems = items.splice(index, 1); + this._refresh(newItems) + } else { + console.error("[masonry]下标越界,删除失败!"); + } + }, + + /** + * 刷新瀑布流 + * + * @param {Array} items - 参与渲染的元素数组 + */ + start(items) { + if (Object.prototype.toString.call(items) !=='[object Array]') { + console.error("[masonry]参数类型错误,渲染失败"); + return false; + } + + this.setData({ + items: [], + stopMasonry: false + }) + + return this._refresh(items); + }, + + /** + * 停止渲染瀑布流 + */ + stop() { + this.setData({ + stopMasonry: true, + items: [] + }) + }, + + /** + * 刷新瀑布流 + * + * @param {Array} items - 参与渲染的元素数组 + */ + _refresh(items) { + const query = wx.createSelectorQuery().in(this) + this.columnNodes = query.selectAll('#left-col-inner, #right-col-inner') + + return new Promise((resolve, reject) => { + this._render(items, 0, () => { + resolve() + }) + }) + }, + + /** + * 渲染函数 + * + * @param {Array} items - 正在渲染的数组 + * @param {Number} i - 当前渲染元素的下标 + * @param {Function} onComplete - 完成后的回调函数 + */ + _render (items, i, onComplete) { + if (items.length > i && !this.data.stopMasonry) { + this.columnNodes.boundingClientRect().exec(arr => { + const item = items[i] + const rects = arr[0] + const leftColHeight = rects[0].height + const rightColHeight = rects[1].height + + this.setData({ + items: [...this.data.items, { + ...item, + columnPosition: leftColHeight <= rightColHeight ? 'left' : 'right' + }] + }, () => { + this._render(items, ++i, onComplete) + }) + }) + } else { + onComplete && onComplete() + } + }, + + needAuth: function () { + this.triggerEvent('needAuth'); + } + } +}); diff --git a/eaterplanet_ecommerce/moduleA/components/masonry/masonry.json b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.json new file mode 100644 index 0000000..d0edcae --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.json @@ -0,0 +1,6 @@ +{ + "component": true, + "componentGenerics": { + "masonry-item": true + } +} diff --git a/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxml b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxml new file mode 100644 index 0000000..d04cb71 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxss b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxss new file mode 100644 index 0000000..34537a9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/masonry/masonry.wxss @@ -0,0 +1,13 @@ +.masonry-list { + width: 100%; + display: flex; + box-sizing: border-box; + padding: 20rpx; +} + +.masonry-list-left, .masonry-list-right { + flex: 1; + display: flex; + flex-direction: column; + width: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.js b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.js new file mode 100644 index 0000000..23cf626 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.js @@ -0,0 +1,220 @@ +var t = require("../../utils/public"); +var app = getApp(); +var status = require('../../utils/index.js'); +var util = require('../../utils/util.js'); + +Component({ + properties: { + spuItem: { + type: Object, + value: { + spuId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + isShowListCount: { + type: Number, + value: 0 + }, + changeCarCount: { + type: Boolean, + value: false, + observer: function (t) { + if (t) this.setData({ number: this.data.spuItem.car_count || 0 }); + } + }, + needAuth: { + type: Boolean, + value: false + }, + is_open_vipcard_buy: { + type: Number, + value: 0 + } + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '', + number: 0 + }, + ready: function () { + this.setData({ + number: this.data.spuItem.car_count || 0 + }); + }, + methods: { + openSku: function () { + if (this.data.needAuth) { + this.triggerEvent("authModal", true); + return; + } + this.setData({ + stopClick: true, + disabled: false + }) + if (this.data.spuItem.skuList.length === void 0) { + this.triggerEvent("openSku", { + actId: this.data.spuItem.actId, + skuList: this.data.spuItem.skuList, + promotionDTO: this.data.spuItem.promotionDTO, + allData: { + spuName: this.data.spuItem.spuName, + skuImage: this.data.spuItem.skuImage, + actPrice: this.data.spuItem.actPrice, + canBuyNum: this.data.spuItem.spuCanBuyNum, + stock: this.data.spuItem.spuCanBuyNum, + marketPrice: this.data.spuItem.marketPrice + } + }); + } else { + this.addCart({ value: 1, type: "plus" }); + } + }, + countDownEnd: function () { + this.setData({ + actEnd: true + }); + }, + submit2: function (e) { + (0, t.collectFormIds)(e.detail.formId); + }, + changeNumber: function (t) { + var e = t.detail; + e && this.addCart(e); + }, + outOfMax: function (t) { + var e = t.detail, canBuyNum = this.data.spuItem.spuCanBuyNum; + if (this.data.number >= canBuyNum) { + wx.showToast({ + title: "不能购买更多啦", + icon: "none" + }) + } + }, + addCart: function (t) { + // {value: 2, type: "plus/minus"} + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + var goods_id = this.data.spuItem.actId; + var community_id = community.communityId; + let that = this; + if (t.type == 'plus') { + let data = { + goods_id, + community_id, + quantity: 1, + sku_str: '', + buy_type: 'dan', + pin_id: 0, + is_just_addcar: 1 + } + util.addCart(data).then(res=>{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + that.triggerEvent("vipModal", { pop_vipmember_buyimage, showVipModal: true, visible: false }); + } else { + if (res.data.code == 3) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: max_quantity }) + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + } else if (res.data.code == 6 || res.data.code == 7) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: max_quantity }) + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + that.triggerEvent("changeCartNum", res.data.total); + that.setData({ number: res.data.cur_count }) + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } else { + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.reduce_car_goods', + token: token, + goods_id: goods_id, + community_id: community_id, + quantity: 1, + sku_str: '', + buy_type: 'dan', + pin_id: 0, + is_just_addcar: 1 + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if (res.data.code == 3) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + } else { + that.triggerEvent("changeCartNum", res.data.total); + that.setData({ number: res.data.cur_count }) + status.indexListCarCount(goods_id, res.data.cur_count); + } + } + }) + } + } + } +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.json b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.json new file mode 100644 index 0000000..d16f037 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.json @@ -0,0 +1,11 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link", + "i-input-number": "../../components/input-number/index", + "i-vip-price": "../../components/vipPrice/vipPrice", + "i-addcart": "../../components/addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxml b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxml new file mode 100644 index 0000000..820f414 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxml @@ -0,0 +1,44 @@ +
+ +
+ diff --git a/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxss b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxss new file mode 100644 index 0000000..616c6e7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/menuGoodsItem.wxss @@ -0,0 +1,147 @@ +.spu { + position: relative; + width: 580rpx; + box-sizing: border-box; + display: block; + border: .1rpx solid #eee; + border-radius: 10rpx; + margin-left: 20rpx; + padding: 20rpx 10rpx; +} + +.spu .spu-content { + display: flex; +} + +.spu .img-class { + width: 160rpx; + height: 160rpx; + border-radius: 10rpx; + image-rendering: crisp-edges; + margin-right: 20rpx; + overflow: hidden; +} + +.spu-title { + font-size: 30rpx; + font-weight: bold; + color: #333; +} + +.spu-desc { + font-size: 26rpx; + color: #666; +} + +.item-bottom { + flex: 1; + width: 0; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.spu .spu-content .item-bottom .spu-price { + font-family: DIN; + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price { + color: #ff758c; + margin-right: 12rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu .spu-content .item-bottom .spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-right: 20rpx; +} + +.spu .spu-content .add-cart { + width: 68rpx; + height: 68rpx; + padding: 0; + margin: 0; + position: absolute; + right: 20rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.spu .spu-content .add-cart .img { + width: 54rpx; + height: 54rpx; + display: block; +} + +.spu .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 30rpx; + top: 60rpx; + padding: 0 12rpx; +} + +.spu-play { + position: absolute; + left: 55rpx; + top: 50%; + width: 60rpx; + height: 60rpx; + margin-top: -30rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.col-input-number { + position: absolute; + right: 20rpx; + bottom: 20rpx; +} + +.col-input-number .input-number-view { + width: 40rpx !important; + height: 40rpx !important; +} + +.col-input-number .input-number-img{ + width: 40rpx !important; + height: 40rpx !important; +} + +.col-input-number .input-number-input { + height: 40rpx !important; + width: 60rpx !important; + font-size: 26rpx; + line-height: 40rpx !important; +} + +.text-overflow1 { + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoods.js b/eaterplanet_ecommerce/moduleA/components/pinGoods.js new file mode 100644 index 0000000..43d0fa6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoods.js @@ -0,0 +1,63 @@ +let app = getApp(); +Component({ + properties: { + spuItem: { + type: Object, + value: { + actId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + skin: Object, + goods_sale_unit: String + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '' + }, + methods: { + goLink: function () { + let id = this.data.spuItem.actId; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/pin/goodsDetail?&id=${id}`, + }) + } + } +}); diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoods.json b/eaterplanet_ecommerce/moduleA/components/pinGoods.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoods.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoods.wxml b/eaterplanet_ecommerce/moduleA/components/pinGoods.wxml new file mode 100644 index 0000000..131c3c2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoods.wxml @@ -0,0 +1,41 @@ + + + + + {{spuItem.label_info.tagcontent}} + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + {{spuItem.spuName}} + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + {{spuItem.pin_count}}人团 已拼{{spuItem.soldNum}}{{goods_sale_unit}} + + + + + 已抢光 + + + 已结束 + + 去开团 + + + 已抢光 + 已结束 + diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoods.wxss b/eaterplanet_ecommerce/moduleA/components/pinGoods.wxss new file mode 100644 index 0000000..6e38fc2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoods.wxss @@ -0,0 +1,174 @@ +.spu-content { + width: 350rpx; + height: 506rpx; + border-radius: 20rpx; + background: #fff; + box-sizing: border-box; + padding: 30rpx 25rpx; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + position: relative; + margin-bottom: 10rpx; +} + +.spu-img { + width: 300rpx; + height: 300rpx; + border-radius: 10rpx; +} + +.spu-content .spu-title { + font-size: 28rpx; + line-height: 36rpx; + height: 36rpx; + color: #444; + margin-bottom: 16rpx; + font-weight: 500; + position: relative; + margin-top: 16rpx; +} + +.spu-content .spu-title .span { + display: block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .spu-price { + display: flex; + align-items: flex-end; + font-size: 20rpx; +} + +.spu-content .spu-price .sale-price { + color: #ff758c; + margin-right: 8rpx; +} + +.spu-content .spu-price .sale-price .span { + font-size: 40rpx; + line-height: 40rpx; + margin-left: 4rpx; + font-weight: 500; +} + +.spu-content .spu-price .market-price { + text-decoration: line-through; + color: #999; +} + +.spu-content .spu-count { + display: flex; + align-items: flex-end; + font-size: 20rpx; + color: #999; + margin-top: 10rpx; +} + +.spu-content .add-cart,.spu .spu-content .add-cart-disabled { + width: 100rpx; + height: 50rpx; + padding: 0; + margin: 0; + position: absolute; + right: 20rpx; + bottom: 25rpx; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(100deg,#4facfe 0%,#00f2fe 100%); + color: #fff; + border-radius: 25rpx; + font-size: 26rpx; + font-weight: bold; +} + +.spu-content .add-cart-disabled { + background: #ccc; +} + +.spu-content .pin-tag { + display: inline-block; + font-size: 20rpx; + padding: 4rpx 6rpx; + margin-right: 10rpx; + border: 0.1rpx solid #4facfe; + line-height: 1; + vertical-align: middle; + color: #ff5344; + border-radius: 4rpx; +} + +.spu-play { + position: absolute; + left: 50%; + top: 95rpx; + width: 100rpx; + height: 100rpx; + margin-left: -50rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.mask { + background: rgba(255, 255, 255, 0.5); + width: 300rpx; + height: 240rpx; + position: absolute; + left: 25rpx; + top: 30rpx; +} + +.act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 120rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +/* 标签 */ +.spu-content .item-tag { + position: absolute; + left: -1rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu-content .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu-content .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.js b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.js new file mode 100644 index 0000000..5101118 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.js @@ -0,0 +1,55 @@ +// eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.js +Component({ + externalClasses: ["i-class", "i-class-identity"], + properties: { + isOrder: { + type: Boolean, + value: false + }, + goodsInfo: { + type: Object, + value: { + danprice: "0.00", + goods_images: "", + name: "", + pin_count: "2", + pinprice: "0.00", + productprice: "0.00", + seller_count: 0, + subtitle: "", + me_is_head: 1 + }, + observer: function (m) { + let price = 0; + price = ((m && m.price) && (m.price*1).toFixed(2)) || 0; + this.setData({ price }) + } + }, + me_is_head: { + type: Boolean, + value: false + }, + skin: { + type: Object + } + }, + + /** + * 组件的方法列表 + */ + methods: { + goDetail: function(){ + let { isOrder, goodsInfo } = this.data; + let goods_id = goodsInfo.goods_id || ''; + if (goods_id && !isOrder) { + var pages_all = getCurrentPages(); + var url = `/eaterplanet_ecommerce/moduleA/pin/goodsDetail?id=${goods_id}`; + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.json b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.json new file mode 100644 index 0000000..d8200c2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.json @@ -0,0 +1,6 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../../components/img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxml b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxml new file mode 100644 index 0000000..b109bd7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxml @@ -0,0 +1,15 @@ + + + 我是{{(goodsInfo.me_is_head==1||me_is_head)?'团长':'团员'}} + + {{goodsInfo.name}} + + ¥{{price}} x{{goodsInfo.quantity}} {{goodsInfo.need_count||goodsInfo.pin_count}}人拼团 + ¥{{goodsInfo.orign_price}} + + + {{goodsInfo.pin_count}}人拼团 + ¥{{goodsInfo.pinprice}} ¥{{goodsInfo.danprice}} + + + diff --git a/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxss b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxss new file mode 100644 index 0000000..8611aa8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/pinGoodsInfo.wxss @@ -0,0 +1,79 @@ +.goodsBox { + position: relative; + display: flex; + align-items: center; + padding: 30rpx; + margin-bottom: 10rpx; + background-color: #fff; +} + +.goodsImg { + width: 185rpx; + height: 185rpx; + border-radius: 5px; + margin-right: 20rpx; +} + +.goodsInfo { + flex: 1; +} + +.goodsInfo .title { + color: #333; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + margin-bottom: 20rpx; +} + +.goodsInfo .price { + font-size: 24rpx; + color: #ff5344; + font-weight: bold; + margin-top: 20rpx; +} + +.goodsInfo .price .big { + font-size: 32rpx; + margin-left: 2px; +} + +.goodsInfo .tag, +.identity { + color: #fff; + font-weight: normal; + background-color: #ff5344; + padding: 2rpx 15rpx 2rpx 10rpx; + border-radius: 0 20rpx 20rpx 0; + line-height: 1; + font-size: 20rpx; +} + +.goodsInfo .marked-price { + font-size: 24rpx; + color: #999; + margin-top: 10rpx; + text-decoration: line-through; + font-weight: normal; + margin-left: 6rpx; +} + +.goodsInfo .price .num { + font-weight: normal; + color: #999; +} + +.goodsInfo .price .tag { + margin-left: 20rpx; +} + +.identity { + position: absolute; + left: 30rpx; + top: 50rpx; + padding: 4rpx 10rpx 4rpx 8rpx; + width: 45rpx; + line-height: 1.1; + border-radius: 0 40rpx 40rpx 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/rushBig.js b/eaterplanet_ecommerce/moduleA/components/rushBig.js new file mode 100644 index 0000000..955ebc4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushBig.js @@ -0,0 +1,65 @@ +var app = getApp(); +Component({ + properties: { + spuItem: { + type: Object, + value: { + actId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + skin: { + type: Object + }, + goods_sale_unit: String + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '' + }, + methods: { + goLink: function() { + let id = this.data.spuItem.actId; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/pin/goodsDetail?&id=${id}`, + }) + } + } +}); diff --git a/eaterplanet_ecommerce/moduleA/components/rushBig.json b/eaterplanet_ecommerce/moduleA/components/rushBig.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushBig.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/rushBig.wxml b/eaterplanet_ecommerce/moduleA/components/rushBig.wxml new file mode 100644 index 0000000..5442f9f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushBig.wxml @@ -0,0 +1,45 @@ + + + + + {{spuItem.label_info.tagcontent}} + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + + {{spuItem.spuName}} + + + {{spuItem.spuDescribe}} + + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + {{spuItem.pin_count}}人团 + + 已拼{{spuItem.soldNum}}{{goods_sale_unit}} + + + + 去开团 + + + 去开团 + + 去开团 + + + 已抢光 + 已结束 + diff --git a/eaterplanet_ecommerce/moduleA/components/rushBig.wxss b/eaterplanet_ecommerce/moduleA/components/rushBig.wxss new file mode 100644 index 0000000..a37de5e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushBig.wxss @@ -0,0 +1,275 @@ +.img-class { + width: 710rpx; + height: 400rpx; + border-radius: 10rpx 10rpx 0 0; + image-rendering: crisp-edges; +} + +.mask { + background: rgba(255, 255, 255, 0.5); + width: 710rpx; + height: 400rpx; + position: absolute; + left: 0; + top: 0; +} + +.act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 170rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.spu-content { + background: #fff; + width: 710rpx; + border-radius: 20rpx; + overflow: hidden; + position: relative; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + margin: 20rpx auto 20rpx; + display: flex; + flex-direction: column; + box-sizing: border-box; +} + +.spu-content.disabled { + opacity: 0.6; +} + +.spu-content .item-top { + width: 100%; + height: 400rpx; + position: relative; +} + +.spu-content .item-bottom { + box-sizing: border-box; + padding: 20rpx; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.spu-content .item-bottom .spu-title { + color: #222; + font-size: 30rpx; + height: 32rpx; + width: 100%; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: 500; + position: relative; +} + +.spu-content .item-bottom .spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-bottom .spu-tag { + padding-left: 196rpx; + margin-bottom: 20rpx; + display: flex; + height: 28rpx; +} + +.spu-content .item-bottom .spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + width: 100%; + height: 26rpx; + margin-bottom: 12rpx; +} + +.spu-content .item-bottom .spu-desc .em { + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-bottom .spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.spu-content .item-bottom .spu-price .sale-price { + color: #ff758c; + margin-right: 12rpx; +} + +.spu-content .item-bottom .spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu-content .item-bottom .spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-right: 20rpx; +} + +.spu-content .item-bottom .spu-count { + font-size: 24rpx; + line-height: 24rpx; + color: #999; +} + +.spu-content .add-cart,.spu-content .add-cart-disabled { + width: 160rpx; + height: 60rpx; + padding: 0; + margin: 0; + position: absolute; + right: 28rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; + background: #4facfe; + color: #fff; + border-radius: 30rpx; +} + +.spu-content .add-cart-disabled { + background: #ccc; +} + +.spu-content .item-top .spu-active { + position: absolute; + left: 0; + bottom: 0; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu-content .item-top .spu-active .tag { + background: linear-gradient(to right,#4facfe, #00f2fe); + border-radius: 0 25rpx 25rpx 0; + padding: 0 15rpx; + height: 50rpx; + font-size: 26rpx; + line-height: 50rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 220rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-top .spu-active .tag-green { + background: linear-gradient(to left,#4facfe, #00f2fe); +} + +.spu-content .spu-content .time-tip { + position: absolute; + background: #4facfe; + left: 0; + bottom: 0; + width: 250rpx; + height: 40rpx; + border-radius: 0 8rpx 0 0; +} + +.spu-content .spu-content .time-tip.notip { + display: none; +} + +/* 标签 */ +.spu-content .item-tag { + position: absolute; + left: 22rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu-content .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu-content .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.spu-play { + position: absolute; + left: 50%; + top: 50%; + width: 160rpx; + height: 160rpx; + margin-top: -80rpx; + margin-left: -80rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.pin-tag { + display: inline-block; + font-size: 22rpx; + padding: 4rpx 6rpx; + margin-right: 10rpx; + border: 0.1rpx solid #ff758c; + line-height: 1; + vertical-align: middle; + color: #ff758c; + border-radius: 4rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/rushNormal.js b/eaterplanet_ecommerce/moduleA/components/rushNormal.js new file mode 100644 index 0000000..0beab95 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushNormal.js @@ -0,0 +1,65 @@ +var app = getApp(); +Component({ + properties: { + spuItem: { + type: Object, + value: { + actId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + skin: { + type: Object + }, + goods_sale_unit: String + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '' + }, + methods: { + goLink: function () { + let id = this.data.spuItem.actId; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/pin/goodsDetail?&id=${id}`, + }) + } + } +}); diff --git a/eaterplanet_ecommerce/moduleA/components/rushNormal.json b/eaterplanet_ecommerce/moduleA/components/rushNormal.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushNormal.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/rushNormal.wxml b/eaterplanet_ecommerce/moduleA/components/rushNormal.wxml new file mode 100644 index 0000000..25fbb7a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushNormal.wxml @@ -0,0 +1,45 @@ + + + + + {{spuItem.label_info.tagcontent}} + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + + {{spuItem.spuName}} + + + {{spuItem.spuDescribe}} + + + ¥{{spuItem.danPrice}} + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + {{spuItem.pin_count}}人团 + + 已拼{{spuItem.soldNum}}{{goods_sale_unit}} + + + + 已抢光 + + + 已结束 + + 去开团 + + + 已抢光 + 已结束 + diff --git a/eaterplanet_ecommerce/moduleA/components/rushNormal.wxss b/eaterplanet_ecommerce/moduleA/components/rushNormal.wxss new file mode 100644 index 0000000..b697b84 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/rushNormal.wxss @@ -0,0 +1,272 @@ +.img-class { + width: 200rpx; + height: 200rpx; + border-radius: 10rpx 10rpx 0 0; + image-rendering: crisp-edges; +} + +.mask { + background: rgba(255, 255, 255, 0.5); + width: 200rpx; + height: 200rpx; + position: absolute; + left: 0; + top: 0; +} + +.act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 170rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.spu-content { + width: 690rpx; + overflow: hidden; + position: relative; + margin: 0 auto; + display: flex; + box-sizing: border-box; + padding: 30rpx 0; + border-bottom: 0.1rpx solid #e5e5e5; +} + +.spu-content.disabled { + opacity: 0.6; +} + +.spu-content .item-top { + position: relative; +} + +.spu-content .item-bottom { + flex: 1; + box-sizing: border-box; + display: flex; + flex-direction: column; + justify-content: space-between; + margin-left: 20rpx; +} + +.spu-content .item-bottom .spu-title { + color: #222; + font-size: 30rpx; + height: 32rpx; + width: 100%; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: 500; + position: relative; +} + +.spu-content .item-bottom .spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-bottom .spu-tag { + padding-left: 196rpx; + margin-bottom: 20rpx; + display: flex; + height: 28rpx; +} + +.spu-content .item-bottom .spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + width: 100%; + height: 26rpx; + margin-bottom: 12rpx; +} + +.spu-content .item-bottom .spu-desc .em { + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-bottom .spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.spu-content .item-bottom .spu-price .sale-price { + color: #ff758c; + margin-right: 12rpx; +} + +.spu-content .item-bottom .spu-price .sale-price .span { + font-size: 36rpx; + line-height: 36rpx; + margin: 0; + font-weight: bold; +} + +.spu-content .item-bottom .market-price { + text-decoration: line-through; + color: #999; + font-size: 22rpx; +} + +.spu-content .item-bottom .spu-count { + font-size: 24rpx; + line-height: 22rpx; + color: #999; +} + +.spu-content .add-cart,.spu .spu-content .add-cart-disabled { + width: 160rpx; + height: 60rpx; + padding: 0; + margin: 0; + position: absolute; + right: 0; + bottom: 30rpx; + display: flex; + align-items: center; + justify-content: center; + background: #4facfe; + color: #fff; + border-radius: 30rpx; +} + +.spu-content .add-cart-disabled { + background: #ccc; +} + +.spu-content .item-top .spu-active { + position: absolute; + left: 0; + bottom: 0; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu-content .item-top .spu-active .tag { + background: linear-gradient(to right,#4facfe 0%,#00f2fe); + border-radius: 0 25rpx 25rpx 0; + padding: 0 15rpx; + height: 50rpx; + font-size: 26rpx; + line-height: 50rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 220rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .item-top .spu-active .tag-green { + background: linear-gradient(to left,#4facfe 0%,#00f2fe); +} + +.spu-content .spu-content .time-tip { + position: absolute; + background: #4facfe; + left: 0; + bottom: 0; + width: 250rpx; + height: 40rpx; + border-radius: 0 8rpx 0 0; +} + +.spu-content .spu-content .time-tip.notip { + display: none; +} + +/* 标签 */ +.spu-content .item-tag { + position: absolute; + left: 22rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu-content .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu-content .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.spu-play { + position: absolute; + left: 50%; + top: 50%; + width: 160rpx; + height: 160rpx; + margin-top: -80rpx; + margin-left: -80rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.pin-tag { + display: inline-block; + font-size: 22rpx; + padding: 4rpx 6rpx; + margin-right: 10rpx; + border: 0.1rpx solid #4facfe; + line-height: 1; + vertical-align: middle; + color: #4facfe; + border-radius: 4rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.js b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.js new file mode 100644 index 0000000..7c7c4dd --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.js @@ -0,0 +1,92 @@ +var util = require('../../../utils/util.js'); + +Component({ + externalClasses: ["i-class"], + properties: { + item: { + type: Object, + value: {} + } + }, + + /** + * 组件的初始数据 + */ + data: { + disabled: false + }, + + /** + * 组件的方法列表 + */ + methods: { + openSku: function () { + this.setData({ disabled: false }) + let spuItem = this.data.item; + if (spuItem.skuList.length === void 0) { + this.triggerEvent("openSku", { + actId: spuItem.actId, + skuList: spuItem.skuList, + promotionDTO: spuItem.promotionDTO || '', + allData: { + spuName: spuItem.spuName, + skuImage: spuItem.skuImage, + actPrice: spuItem.actPrice, + canBuyNum: spuItem.spuCanBuyNum, + stock: spuItem.spuCanBuyNum, + marketPrice: spuItem.marketPrice + } + }) + } else { + this.addCart({ value: 1, type: "plus" }); + } + }, + addCart: function (t) { + wx.showLoading(); + var community = wx.getStorageSync('community'); + let spuItem = this.data.item; + var goods_id = spuItem.actId; + var community_id = community.communityId; + if (t.type == 'plus') { + let data = { + goods_id, + community_id, + quantity: 1, + sku_str: '', + buy_type: 'dan', + pin_id: 0, + is_just_addcar: 1, + buy_type: 'integral' + } + util.addCart(data).then(res=>{ + wx.hideLoading(); + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + that.triggerEvent("vipModal", { pop_vipmember_buyimage, showVipModal: true, visible: false }); + } else { + if (res.data.code == 3 || res.data.code == 7) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 6) { + // 积分不足 + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + //跳转结算页面 + wx.navigateTo({ + url: `/eaterplanet_ecommerce/pages/order/placeOrder?type=integral`, + }) + } + } + }) + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.json b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.json new file mode 100644 index 0000000..6b71cd5 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../../../components/img/index", + "i-button": "../../../components/button/index", + "i-router-link": "../../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxml b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxml new file mode 100644 index 0000000..0356fb3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxml @@ -0,0 +1,15 @@ + + + + 已抢光 + {{item.spuName}} + + {{item.actPrice[0]}}积分 + + 已抢光 + + + 立即兑换 + + + diff --git a/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxss b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxss new file mode 100644 index 0000000..515c596 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/score-guess-like/index.wxss @@ -0,0 +1,93 @@ +.like { + margin-bottom: 100rpx; +} + +.like-title { + font-size: 30rpx; + text-align: center; + font-weight: bold; + color: #666; + margin-bottom: 20rpx; +} + +.like-list { + position: relative; + padding: 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + z-index: 0; +} + +.new-comers-item { + background-color: #fff; + width: 345rpx; + box-sizing: border-box; + padding: 30rpx; + border-radius: 10px; + font-size: 28rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .new-img { + width: 285rpx; + height: 285rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.new-comers-item .add-cart { + width: 140rpx; + height: 44rpx; + padding: 0; + margin: 0; + position: absolute; + right: 20rpx; + bottom: 30rpx; + display: flex; + align-items: center; + justify-content: center; + background: #ff5344; + color: #fff; + border-radius: 30rpx; + font-size: 24rpx; +} + +.new-comers-item .add-cart.disabled { + background: #ccc; +} + +.new-comers-item .price { + color: #ff758c; +} + +.new-comers-item { + position: relative; +} + +.new-comers-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 120rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireGood.js b/eaterplanet_ecommerce/moduleA/components/solitaireGood.js new file mode 100644 index 0000000..d8529ab --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireGood.js @@ -0,0 +1,228 @@ +var app = getApp(); +var status = require('../../utils/index.js'); +var util = require('../../utils/util.js'); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + spuItem: { + type: Object, + value: { + skuList: [] + }, + observer: function (t) { + let skuList = t.skuList || []; + let specs = 0; + if (Object.prototype.toString.call(skuList) === '[object Array]') { + if (skuList.length) specs = 1; + } else { + if (Object.keys(skuList).length) specs = 1; + } + this.setData({ specs, number: t.goods_total_count || 0 }) + } + }, + idx: { + type: Number, + value: -1 + }, + type: { + type: Number, + value: 0 + }, + hasIpt: { + type: Boolean, + value: true + }, + state: { + type: Boolean, + value: false + }, + needAuth: { + type: Boolean, + value: false + }, + soliId: { + type: Number, + value: 0 + } + }, + + /** + * 组件的初始数据 + */ + data: { + number: 0, + placeholdeImg: app.globalData.placeholdeImg, + specs: 0 // 0单规格 1多规格 + }, + + /** + * 组件的方法列表 + */ + methods: { + handleSelect: function(){ + this.triggerEvent("onSelect", this.data.spuItem); + }, + handleDelete: function(){ + this.triggerEvent("onSelect", this.data.idx); + }, + showTip: function(){ + let that = this; + wx.showToast({ + title: '多规格商品只能去购物车删除', + icon: 'none', + complete: () => { + that.triggerEvent("showCart"); + } + }) + }, + openSku: function () { + if (this.data.needAuth) { + this.triggerEvent("authModal", true); + return; + } + this.setData({ + stopClick: true, + disabled: false + }) + if (this.data.spuItem.skuList.length === void 0) { + console.log('多规格') + this.triggerEvent("openSku", { + actId: this.data.spuItem.actId, + skuList: this.data.spuItem.skuList, + promotionDTO: this.data.spuItem.promotionDTO, + is_take_vipcard: this.data.spuItem.is_take_vipcard, + is_mb_level_buy: this.data.spuItem.is_mb_level_buy, + allData: { + spuName: this.data.spuItem.spuName, + skuImage: this.data.spuItem.skuImage, + actPrice: this.data.spuItem.actPrice, + canBuyNum: this.data.spuItem.spuCanBuyNum, + stock: this.data.spuItem.spuCanBuyNum, + marketPrice: this.data.spuItem.marketPrice + } + }); + } else { + this.addCart({ value: 1, type: "plus" }); + } + }, + changeNumber: function (t) { + var e = t.detail; + e && this.addCart(e); + }, + outOfMax: function (t) { + var e = t.detail, canBuyNum = this.data.spuItem.spuCanBuyNum; + if (this.data.number >= canBuyNum) { + wx.showToast({ + title: "不能购买更多啦", + icon: "none" + }) + } + }, + addCart: function (t) { + // {value: 2, type: "plus/minus"} + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let goods_id = this.data.spuItem.actId; + let soli_id = this.data.soliId; + let community_id = community.communityId; + let that = this; + if (t.type == 'plus') { + let quantity = 1 + if(t.value==1&&this.data.spuItem.goods_start_count>1) { + quantity = this.data.spuItem.goods_start_count; + } + let data = { + goods_id: goods_id, + community_id: community_id, + quantity, + sku_str: '', + buy_type: 'soitaire', + pin_id: 0, + is_just_addcar: 1, + soli_id + } + util.addCart(data).then(res=>{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + that.triggerEvent("vipModal", { pop_vipmember_buyimage, showVipModal: true, visible: false }); + } else { + if (res.data.code == 3) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: that.data.number }) + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + } else if (res.data.code == 6 || res.data.code == 7) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ number: that.data.number }) + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + let { goods_total_count, total, cur_count } = res.data; + that.setData({ number: cur_count }) + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + that.triggerEvent("changeCartNum", { goods_total_count, total, goods_id }); + } + } + }) + } else { + console.log(t) + let quantity = 1 + if(t.value>=1&&this.data.spuItem.goods_start_count==(t.value+1)) { + quantity = this.data.spuItem.goods_start_count; + } + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.reduce_car_goods', + token: token, + goods_id: goods_id, + community_id: community_id, + quantity, + sku_str: '', + buy_type: 'soitaire', + pin_id: 0, + is_just_addcar: 1, + soli_id + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if (res.data.code == 3) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + if (that.data.needAuth) { + that.setData({ needAuth: true }) + that.triggerEvent("authModal", true); + return; + } + } else { + let { goods_total_count, total, cur_count } = res.data; + that.setData({ number: cur_count }) + that.triggerEvent("changeCartNum", { goods_total_count, total, goods_id }); + } + } + }) + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireGood.json b/eaterplanet_ecommerce/moduleA/components/solitaireGood.json new file mode 100644 index 0000000..4fb5525 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireGood.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-img": "../../components/img/index", + "i-input-number": "../../components/input-number/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxml b/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxml new file mode 100644 index 0000000..8ccdb8f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxml @@ -0,0 +1,134 @@ + + + + + 已抢光 + 已结束 + + + + {{spuItem.spuName}} + + + {{spuItem.spuDescribe}} + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + 已售{{spuItem.soldNum}} + + + + + + + + + + + + + + + {{number|0}} + + + + + + + + + 选购 + 选购 + + + + + + + + + + + + + {{spuItem.name}} + + + {{spuItem.option_str}} x{{spuItem.quantity}} + + + + ¥{{spuItem.price}} + + ¥{{spuItem.orign_price}} + + + + 已售{{spuItem.soldNum}} + + + + + + + + + + + + + + + + + {{number|0}} + + + + + + + + + + + + + + + + + + 已抢光 + 已结束 + + + + {{spuItem.goodsname}} + + + {{spuItem.subtitle}} + + + + ¥{{spuItem.price}} + + ¥{{spuItem.productprice}} + + + + 选择 + 删除 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxss b/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxss new file mode 100644 index 0000000..cfcd321 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireGood.wxss @@ -0,0 +1,179 @@ +.spu { + display: flex; +} + +.img-class { + width: 160rpx; + height: 160rpx; + border-radius: 10rpx; + overflow: hidden; +} + +.item-m { + display: flex; + flex-direction: column; + flex: 2; + margin-left: 20rpx; + width: 0; +} + +.item-r { + display: flex; + flex-direction: column; + margin-left: 15rpx; + align-items: flex-end; + justify-content: center; +} + +.spu-title { + color: #333; + font-size: 30rpx; + height: 32rpx; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: bold; + position: relative; +} + +.spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + margin: 0; +} + +.spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + height: 26rpx; + margin-bottom: 12rpx; +} + +.spu-desc .em { + display: block; + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-price { + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-top: auto; +} + +.spu-price .sale-price { + color: #ff5344; + margin-right: 12rpx; +} + +.spu-price .sale-price .span { + font-size: 40rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-top: 10rpx; +} + +.btn { + display: inline-block; + color: #fff; + border-radius: 8rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + padding: 8rpx 30rpx; + font-size: 24rpx; +} + +.count { + width: 100%; + font-size: 28rpx; + color: #999; + text-align: right; +} + +.addBtn .img { + width: 48rpx; + height: 48rpx; +} + +.input-number-text { + font-size: 26rpx!important; +} + +.i-flex-center { + display: flex; + align-items: center; + justify-content: center; +} + +.cartNum { + position: relative; + text-align: center; + height: 48rpx; + width: 66rpx; + font-size: 26rpx; + line-height: 48rpx; + z-index: 0; +} + +.optBtn { + display: inline-block; + color: #fff; + border-radius: 30rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + padding: 8rpx 30rpx; + font-size: 24rpx; + font-weight: bold; +} + +.optBtn.disabled { + background: #ccc; +} + +.thumb { + position: relative; +} + +.spu .mask { + background: rgba(255, 255, 255, 0.5); + width: 160rpx; + height: 160rpx; + position: absolute; + left: 0; + top: 0; +} + +.spu .act-end { + position: absolute; + height: 50rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 24rpx; + text-align: center; + line-height: 50rpx; + left: 50%; + top: 50%; + width: 100rpx; + transform: translate(-50%, -50%); +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireHead.js b/eaterplanet_ecommerce/moduleA/components/solitaireHead.js new file mode 100644 index 0000000..f65e13e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireHead.js @@ -0,0 +1,45 @@ +var status = require('../../utils/index.js'); + +Component({ + /** + * 组件的属性列表 + */ + properties: { + community: { + type: Object, + value: { + "head_id": 0, + "community_name": "团长", + "head_name": "社区", + "avatar": "" + } + }, + showShare: { + type: Boolean, + value: false + } + }, + + /** + * 组件的初始数据 + */ + data: { + groupInfo: { + group_name: '社区', + owner_name: '团长' + } + }, + + attached() { + let that = this; + status.setGroupInfo().then((groupInfo) => { + that.setData({ groupInfo }) + }); + }, + + methods: { + shareQuan: function(){ + this.triggerEvent('share'); + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireHead.json b/eaterplanet_ecommerce/moduleA/components/solitaireHead.json new file mode 100644 index 0000000..e8cfaaf --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireHead.json @@ -0,0 +1,4 @@ +{ + "component": true, + "usingComponents": {} +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxml b/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxml new file mode 100644 index 0000000..c24869f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxml @@ -0,0 +1,14 @@ + + + + {{community.head_name}} + + 绑定{{groupInfo.group_name}}:{{community.community_name}} + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxss b/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxss new file mode 100644 index 0000000..aa5f7c4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/components/solitaireHead.wxss @@ -0,0 +1,39 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.headinfo { + position: relative; + padding: 30rpx; +} + +.headinfo .avatar { + width: 100rpx; + height: 100rpx; + border-radius: 50%; + margin-right: 20rpx; +} + +.headinfo .share { + position: absolute; + top: 30rpx; + right: 30rpx; +} + +.headinfo .share .iconfont { + font-size: 50rpx; + margin-left: 30rpx; + color: rgb(233, 169, 68); +} + +.headinfo .share .btn { + display: inline-block; + line-height: inherit; + background: transparent; + width: auto; + padding: 0; + font-size: 0; +} + +.headinfo .share .btn::after { + content: none; +} diff --git a/eaterplanet_ecommerce/moduleA/coupon/getCoupon.js b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.js new file mode 100644 index 0000000..3d01356 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.js @@ -0,0 +1,99 @@ +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + data: { + list: [] + }, + coupon_id: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + status.setNavBgColor(); + let coupon_id = options.id || ''; + this.coupon_id = coupon_id; + }, + + onShow: function () { + this.getData(); + }, + + getData: function () { + let coupon_id = this.coupon_id; + let token = wx.getStorageSync('token'); + app.util.ProReq('user.collect_voucher', { + token, + coupon_id, + }).then(res => { + let list = res.list; + this.setData({ list }) + }) + .catch(err => {}) + }, + + receiveCoupon: function (event) { + let idx = event.currentTarget.dataset.idx; + var token = wx.getStorageSync('token'); + var list = this.data.list; + var that = this; + + app.util.request({ + url: 'entry/wxapp/index', + data: { controller: 'goods.getQuan', token, quan_id: list[idx].id }, + dataType: 'json', + success: function (msg) { + //1 被抢光了 2 已领过 3 领取成功 + if (msg.data.code == 0) { + wx.showToast({ + title: msg.data.msg || '被抢光了', + icon: 'none' + }) + } else if (msg.data.code == 1) { + list[idx].is_nomore = 1; + list[idx].is_use = 1; + that.setData({ list }) + wx.showToast({ + title: '被抢光了', + icon: 'none' + }) + } else if (msg.data.code == 2) { + wx.showToast({ + title: '已领取', + icon: 'none' + }) + that.getData(); + } + else if (msg.data.code == 4) { + wx.showToast({ + title: '新人专享', + icon: 'none' + }) + } + else if (msg.data.code == 3) { + that.getData(); + wx.showToast({ + title: '领取成功', + }) + } else if (msg.data.code == 4) { + // 未登录 + app.util.message('请先登录', '/eaterplanet_ecommerce/pages/user/me', 'error'); + } + } + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/coupon/getCoupon.json b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.json new file mode 100644 index 0000000..74a7858 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "领券中心", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxml b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxml new file mode 100644 index 0000000..f08368f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxml @@ -0,0 +1,34 @@ + + + + + + + {{item.credit}} + + {{item.limit_money >0.01 ?'满'+item.limit_money+'元可用':'不限制'}} + + + {{item.tag}} + {{item.voucher_title}} + 使用范围:所有商品 + 使用范围:指定商品 + 使用范围:指定分类 + + + 去使用 + + + + + + 领取 + + + + + 有效期:{{item.begin_time}}~{{item.end_time}} + + 暂无记录~ + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxss b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxss new file mode 100644 index 0000000..bb734f8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/coupon/getCoupon.wxss @@ -0,0 +1,150 @@ + +/* 新优惠券 */ +.list { + padding: 10rpx 30rpx 20rpx; +} + +/* 新优惠券 */ + +.coupon { + background-color: #fefefe; + position: relative; + padding: 0 20rpx; + border-radius: 6rpx; + margin-top: 24rpx; +} + +.coupon:before, .coupon:after { + content: ''; + position: absolute; + width: 20rpx; + height: 40rpx; + background: #f6f6f6; + top: 70rpx; + z-index: 1; +} + +.coupon:before { + border-radius: 0 40rpx 40rpx 0; + left: 0; +} + +.coupon:after { + border-radius: 40rpx 0 0 40rpx; + right: 0; +} + +.coupon .header { + display: flex; + padding: 15rpx 0; + border-bottom: 2rpx dashed #dbdbdb; + height: 140rpx; +} + +.coupon .footer { + color: #747474; + font-size: 24rpx; + padding: 22rpx 0 20rpx 35rpx; +} + +.coupon .price { + color: #333; + width: 175rpx; + text-align: center; + border-right: 2rpx dashed #dbdbdb; +} + +.coupon .price .reduce-price { + color: #000; + font-size: 38rpx; + font-weight: bold; + padding-top: 30rpx; +} + +.coupon .price .reduce-price text { + font-size: 24rpx; +} + +.coupon .price .reduce-desc { + font-size: 20rpx; + margin-top: 10rpx; +} + +.coupon .info { + padding-left: 30rpx; + flex: 1; +} + +.coupon .info .reduce-title { + color: #000; + font-size: 28rpx; + font-weight: bold; + padding-top: 20rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.coupon .info .reduce-type { + color: #fff; + font-weight: normal; + font-size: 20rpx; + background: #4facfe; + padding: 2rpx 8rpx; + border-radius: 4rpx; +} + +.coupon .status { + width: 130rpx; + text-align: center; +} + +.coupon .status image { + width: 90rpx; + height: 90rpx; + margin-top: 20rpx; +} + +.coupon.used, +.coupon.expired { + background: #fafafa; +} + +.coupon.used .price, +.coupon.expired .price { + color: #949494; +} + +.coupon.used .reduce-price, +.coupon.expired .reduce-price, +.coupon.used .reduce-title, +.coupon.expired .reduce-title { + color: #7a7a7a; +} + +.coupon.used .reduce-type, +.coupon.expired .reduce-type { + background: #b7ddff; +} + +.coupon.used .footer, +.coupon.expired .footer { + color: #b6b6b6; +} + +.reduce-area { + font-size: 24rpx; + color: #666; + margin-top: 10rpx; +} + +.go-shop { + border: 1rpx solid #4facfe; + border-radius: 30rpx; + color: #4facfe; + font-size: 24rpx; + margin-top: 60rpx; + margin-right: 12rpx; + line-height: 38rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/editUser/index.js b/eaterplanet_ecommerce/moduleA/editUser/index.js new file mode 100644 index 0000000..1b726bf --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/editUser/index.js @@ -0,0 +1,115 @@ +import WxValidate from '../../utils/WxValidate.js'; +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + realname: "", + telephone: "" + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + this.initValidate(); + }, + + getData: function() { + let token = wx.getStorageSync('token'); + app.util.ProReq('user.get_realname_tel', { token }).then(res => { + this.setData({ + realname: res.data.realname, + telephone: res.data.telephone + }) + }).catch(err => { + app.util.message(err.message || '请先登录', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + //报错 + showModal(error) { + wx.showModal({ + content: error.msg, + showCancel: false, + }) + }, + + //资料验证函数 + initValidate() { + const rules = { + realname: { + minlength: 1 + }, + telephone: { + tel: true + } + } + const messages = { + realname: { + minlength: '请输入正确的姓名' + }, + telephone: { + tel: '请填写正确的手机号' + } + } + this.WxValidate = new WxValidate(rules, messages) + }, + + /** + * 资料修改表单提交 + */ + formSubmit(e) { + const params = e.detail.value; + //校验表单 + if (!this.WxValidate.checkForm(params)) { + const error = this.WxValidate.errorList[0]; + this.showModal(error); + return false; + } + this.setData({ + btnLoading: true + }) + let token = wx.getStorageSync('token'); + params.token = token; + app.util.ProReq('user.update_realname_tel', params).then(res => { + this.setData({ btnLoading: false }); + wx.showModal({ + title: "提示", + content: res.message || '更改成功', + showCancel: false + }) + }).catch(err => { + this.setData({ + btnLoading: false + }) + app.util.message(err.msg || '提交失败,请重试', '', 'error'); + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/editUser/index.json b/eaterplanet_ecommerce/moduleA/editUser/index.json new file mode 100644 index 0000000..14cd9e4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/editUser/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "修改资料", + "navigationBarBackgroundColor": "#F8F8F8", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/editUser/index.wxml b/eaterplanet_ecommerce/moduleA/editUser/index.wxml new file mode 100644 index 0000000..667a4e0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/editUser/index.wxml @@ -0,0 +1,21 @@ + +
+ + + 真实姓名 + + + + + + 手机号码 + + + + + + + + + +
\ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/editUser/index.wxss b/eaterplanet_ecommerce/moduleA/editUser/index.wxss new file mode 100644 index 0000000..887d344 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/editUser/index.wxss @@ -0,0 +1,20 @@ +.ipt { + width: 100%; +} + +.ipt-hold { + color: #969799; +} + +.edit-btn button { + background-color: #4facfe; + font-size: 28rpx; + line-height: 100rpx; + border-radius: 0; + font-weight: bold; + color: #fff; +} + +.edit-btn button::after { + border: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.js b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.js new file mode 100644 index 0000000..becf018 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.js @@ -0,0 +1,72 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + qrcode: '' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + if (!util.check_login()) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + this.get_hx_qrcode(); + }, + + get_hx_qrcode: function () { + var that = this; + var token = wx.getStorageSync('token'); + wx.showLoading(); + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_community_bind_member_qrcode', + token: token + }, + dataType: 'json', + success: function (res) { + console.log(res) + if (res.data.code == 0) { + console.log(res) + that.setData({ qrcode: res.data.qrcode }) + } else { + // todo + } + wx.hideLoading(); + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.json b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.json new file mode 100644 index 0000000..9a79ff7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "添加核销人员", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxml new file mode 100644 index 0000000..62ebb11 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxml @@ -0,0 +1,10 @@ + + + + 邀请员工扫码,完成添加 + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxss new file mode 100644 index 0000000..6e27b04 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao.wxss @@ -0,0 +1,27 @@ +.top { + background-color: #fff; +} + +.tip { + font-size: 26rpx; + color: #000; + text-align: center; + padding: 30rpx 0; +} + +.qrcode { + text-align: center; + padding-top: 10rpx; + padding-bottom: 30rpx; +} + +.qrcode image { + width: 300rpx; + height: 300rpx; +} + +.qrcode .name { + font-size: 24rpx; + margin-top: 20rpx; + color: #666; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/apply.js b/eaterplanet_ecommerce/moduleA/groupCenter/apply.js new file mode 100644 index 0000000..30a9617 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/apply.js @@ -0,0 +1,473 @@ +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); +var locat = require('../../utils/Location.js'); +var app = getApp() +var clearTime = null; +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + pass: -2, + canSubmit: false, + region: ['选择地址', '', ''], + addr_detail: '', + lon_lat: '', + focus_mobile: false, + showCountDown: true, + timeStamp: 60, + apply_complete: false, + wechat: '', + needAuth: false, + member_info: { + is_head: 0 + }, + groupInfo: { + group_name: '社区', + owner_name: '团长' + } + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + community_id: '', + cansub: true, + + bindRegionChange: function(e) { + this.setData({ + region: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + inputAddress: function(e) { + this.setData({ + addr_detail: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + inputCommunity: function(e) { + this.setData({ + community_name: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + inputMobile: function(e) { + this.setData({ + mobile_detail: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + inputRealName: function(e) { + this.setData({ + head_name: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + inputWechat: function(e) { + this.setData({ + wechat: e.detail.value.replace(/^\s*|\s*$/g, "") + }) + }, + + chose_location: function() { + var that = this; + wx.chooseLocation({ + success: function(e) { + var lon_lat = e.longitude + ',' + e.latitude; + var path = e.address; + var s_region = that.data.region; + var dol_path = ''; + + var str = path; + var patt = new RegExp("(.*?省)(.*?市)(.*?区)", "g"); + var result = patt.exec(str); + if (result == null) { + patt = new RegExp("(.*?省)(.*?市)(.*?市)", "g"); + result = patt.exec(str); + if (result == null) { + patt = new RegExp("(.*?省)(.*?市)(.*县)", "g"); + result = patt.exec(str); + if (result != null) { + s_region[0] = result[1]; + s_region[1] = result[2]; + s_region[2] = result[3]; + dol_path = path.replace(result[0], ''); + } + } else { + s_region[0] = result[1]; + s_region[1] = result[2]; + s_region[2] = result[3]; + dol_path = path.replace(result[0], ''); + } + } else { + s_region[0] = result[1]; + s_region[1] = result[2]; + s_region[2] = result[3]; + dol_path = path.replace(result[0], ''); + } + var filename = dol_path + e.name; + let addr_detail = filename; + + let address_component = ''; + locat.getGpsLocation(e.latitude, e.longitude).then((res) => { + console.log(res) + address_component = res; + if (address_component) { + s_region[0] = address_component.province; + s_region[1] = address_component.city; + s_region[2] = address_component.district; + s_region[3] = address_component.town; + addr_detail = filename || address_component.street; + } + that.setData({ + region: s_region, + lon_lat: lon_lat, + addr_detail + }) + }); + + if (s_region[0] == '省') { + wx.showToast({ + title: '请重新选择省市区', + icon: 'none', + }) + } + }, + fail: function(e) { + console.log('地址获取失败', e) + } + }) + }, + + /** + * 订阅消息 + */ + subscriptionNotice: function() { + console.log('subscriptionNotice') + let that = this; + return new Promise((resolve, reject)=>{ + let obj = that.data.need_subscript_template; + let tmplIds = Object.keys(obj).map(key => obj[key]); // 订阅消息模版id + if (wx.requestSubscribeMessage) { + tmplIds.length && wx.requestSubscribeMessage({ + tmplIds: tmplIds, + success(res) { + let is_need_subscript = 1; + let acceptId = []; + tmplIds.forEach(item=>{ + if (res[item] == 'accept') { + //用户同意了订阅,添加进数据库 + acceptId.push(item); + } else { + //用户拒绝了订阅或当前游戏被禁用订阅消息 + is_need_subscript = 0; + } + }) + + if(acceptId.length) { + that.addAccept(acceptId); + } + that.setData({ is_need_subscript }) + resolve(); + }, + fail() { + reject(); + } + }) + } else { + // 兼容处理 + reject(); + } + }) + }, + + // 用户点击订阅添加到数据库 + addAccept: function (acceptId) { + let token = wx.getStorageSync('token'); + let type = acceptId.join(','); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.collect_subscriptmsg', + token, + type + }, + dataType: 'json', + method: 'POST', + success: function () {} + }) + }, + + submit: function() { + if (!this.authModal()) return; + + let that = this; + var token = wx.getStorageSync('token'); + var province_name = this.data.region[0]; + var city_name = this.data.region[1]; + var area_name = this.data.region[2]; + let country_name = this.data.region[3] || ''; + var addr_detail = this.data.addr_detail; + var community_name = this.data.community_name; + var mobile = this.data.mobile_detail; + var lon_lat = this.data.lon_lat; + var head_name = this.data.head_name; + var wechat = this.data.wechat; + let member_info = this.data.member_info; + + if (head_name == '' || head_name === void 0) { + wx.showToast({ + title: '请填写姓名', + icon: 'none' + }) + return false; + } + + if (mobile == '' || !(/^1(3|4|5|6|7|8|9)\d{9}$/.test(mobile))) { + this.setData({ + focus_mobile: true + }) + wx.showToast({ + title: '手机号码有误', + icon: 'none' + }) + return false; + } + + if (wechat == '' || wechat === void 0) { + wx.showToast({ + title: '请填写' + (member_info.wechat_div?member_info.wechat_div:'微信号'), + icon: 'none' + }) + return false; + } + + if (community_name == '' || community_name === void 0) { + wx.showToast({ + title: '请填写小区名称', + icon: 'none' + }) + return false; + } + + if (province_name == '省' && city_name == '市' && area_name == '区') { + wx.showToast({ + title: '请选择地区', + icon: 'none' + }) + return false; + } + + if (lon_lat == '' || lon_lat === void 0) { + wx.showToast({ + title: '请选择地图位置', + icon: 'none' + }) + return false; + } + + if (addr_detail == '' || addr_detail === void 0) { + wx.showToast({ + title: '请填写详细地址', + icon: 'none' + }) + return false; + } + + var s_data = { + province_name, + city_name, + area_name, + lon_lat, + addr_detail, + community_name, + mobile, + head_name, + wechat, + controller: 'community.sub_community_head', + token: token, + community_id: this.community_id, + country_name + }; + + let is_need_subscript = this.data.is_need_subscript; + if(is_need_subscript==1) { + //弹出订阅消息 + this.subscriptionNotice().then(()=>{ + that.preSubmit(s_data); + }).catch(()=>{ + that.preSubmit(s_data); + }); + } else { + that.preSubmit(s_data); + } + }, + + preSubmit: function(s_data) { + if(!this.cansub) return; + this.cansub = false; + var that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: s_data, + method: 'post', + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + wx.showToast({ + title: '提交成功,等待审核', + icon: 'none', + duration: 2000 + }) + that.setData({ + apply_complete: true + }) + } else { + that.setData({ + needAuth: true + }) + } + that.cansub = true; + } + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + let that = this; + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + that.setData({ groupInfo }) + wx.setNavigationBarTitle({ + title: `${owner_name}申请`, + }) + }); + + var scene = decodeURIComponent(options.scene); + if (scene != 'undefined') { + this.community_id = scene; + } + this.getUserInfo(); + this.checkSubscript(); + }, + + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ needAuth: false }); + } else { + that.setData({ needAuth: true }); + } + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getUserInfo(); + }) + }, + + getUserInfo: function() { + let that = this; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.get_user_info', + token: token + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let member_info = res.data.data || { is_head: 0 }; + if(member_info.is_head==1){ + app.util.message('您已通过审核', '/eaterplanet_ecommerce/moduleA/groupCenter/index', 'error'); + } + that.setData({ + member_info + }); + } else { + //is_login + that.setData({ + needAuth: true + }) + } + } + }) + }, + + applyAgain: function() { + var member_info = this.data.member_info; + member_info.is_head = 0; + + this.setData({ + member_info: member_info + }); + }, + + countDown: function() { + var that = this; + clearInterval(clearTime), + clearTime = setInterval(function() { + var ts = that.data.timeStamp, + ct = that.data.showCountDown; + ts > 0 ? ts-- : (ct = true, clearInterval(clearTime), ts = 60), + that.setData({ + showCountDown: ct, + timeStamp: ts + }); + }, 1000); + }, + + checkSubscript: function() { + let that = this; + var token = wx.getStorageSync('token'); + token && app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'community.check_head_subscriptapply', + token: token + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let { is_need_subscript,need_subscript_template } = res.data; + that.setData({ + is_need_subscript, + need_subscript_template + }); + } + } + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/apply.json b/eaterplanet_ecommerce/moduleA/groupCenter/apply.json new file mode 100644 index 0000000..8c7ab35 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/apply.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxml new file mode 100644 index 0000000..1050b62 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxml @@ -0,0 +1,69 @@ + + + + 请填写姓名、手机号等相关信息 +
+ + + + + + + + + + + + + + + + + + + + + {{region[0] || "选择地址"}}{{region[1]}}{{region[2]}} + + + + + + + + + + +
+
+ + + 申请通过 + 恭喜您,您的申请已通过 + + + + + 申请未通过 + 很抱歉,您的申请未通过 + 再次申请 + + + + 申请审核中 + 您的申请在处理中,请等待结果… + 返回首页 + +
+ + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxss new file mode 100644 index 0000000..bf20c52 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/apply.wxss @@ -0,0 +1,166 @@ +.header { + background: #4facfe; + height: 160rpx; + color: #fff; + font-size: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.form-group { + padding: 12rpx 56rpx 0; + display: flex; + flex-direction: column; + align-items: center; +} + +.form-group .form-item { + width: 640rpx; + display: flex; + align-items: center; + border-bottom: 2rpx solid #e4e4e4; + font-size: 30rpx; + transition: all 0.3s; + position: relative; +} + +.form-group .form-item:last-child { + border: none; +} + +.form-group .form-item.error { + border-color: #4facfe; +} + +.form-group .form-item .form-item-control { + width: 160rpx; + height: 100rpx; + display: flex; + align-items: center; +} + +.form-group .form-item .form-item-input { + flex: 1; + height: 100rpx; + line-height: 100rpx; +} + +.weui-cell__hd { + position:relative; + font-size:28rpx; + text-align:left; +} + +.weui-pos { + width: 40rpx; + height: 50rpx; + background: url(https://wxapp.ch871.com/Common/image/order_checkout_icon.png) no-repeat; + background-position: 0rpx 0; + background-size: 132rpx 142rpx; +} + +.form-group .form-item .form-item-input .picker { + height: 100rpx; + line-height: 100rpx; +} + +.form-group .form-item .captcha { + color: #666; + border-left: 4rpx solid #ddd; + padding-left: 20rpx; + width: 160rpx; + height: 100%; + text-align: center; +} + +.form-group .form-item .placeholder { + color: #ccc; +} + +.form-group .form-item .input-placeholder { + color: #ccc; +} + +.form-group .form-item .submit { + width: 640rpx; + height: 94rpx; + margin-top: 46rpx; + border-radius: 94rpx; + font-size: 36rpx; + background: #4facfe; + color: #fff; + display: flex; + justify-content: center; + align-items: center; +} + +.form-group .form-item .submit.disabled { + background: #dcdcdc; +} + +.apply-pass { + width: 100%; + height: 100%; + display: flex; + flex-direction: column; + align-items: center; + background: #fff; + position: fixed; + left: 0; + top: 0; + z-index: 9; +} + +.apply-pass image { + width: 156rpx; + height: 156rpx; + padding-top: 150rpx; + margin-bottom: 28rpx; +} + +.apply-pass .applyPassImg { + width: 186rpx; + height: 186rpx; + font-size: 230rpx; + color: #4facfe; + margin-bottom: 40rpx; + margin-top: 106rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.apply-pass .h1 { + font-size: 32rpx; + margin-bottom: 20rpx; + color: #555; +} + +.apply-pass .p { + font-size: 28rpx; + color: #999; + margin-bottom: 30rpx; +} + +.apply-pass .link-btn { + width: 310rpx; + height: 98rpx; + border-radius: 20rpx; + background: #4facfe; + color: #fff; + font-size: 32rpx; + display: flex; + justify-content: center; + align-items: center; + font-weight: bold; +} + +.icon-right { + position: absolute; + right: 10rpx; + top: 50%; + width: 18rpx; + height: 28rpx; + margin-top: -12rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.js b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.js new file mode 100644 index 0000000..ad73b39 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.js @@ -0,0 +1,130 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + community_id: '', + name: '', + mobile: '', + is_login: true + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + util.check_login() ? this.setData({ is_login: true }) : this.setData({ is_login: false }); + var scene = decodeURIComponent(options.scene); + if (scene != 'undefined') { + let community_id = scene; + this.setData({ community_id }) + } else { + wx.showModal({ + title: '提示', + content: '无效二维码,请重新获取!', + showCancel: false, + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + } + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + this.setData({ is_login: true }) + }, + + bindInfo: function(){ + var that = this; + var token = wx.getStorageSync('token'); + + let name = this.data.name; + let mobile = this.data.mobile; + let community_id = this.data.community_id; + + if (name == '') { + wx.showToast({ + title: '请输入姓名!', + icon: 'none' + }) + return false; + } + if (mobile == '' || !(/^1(3|4|5|6|7|8|9)\d{9}$/.test(mobile))) { + wx.showToast({ + title: '手机号码有误', + icon: 'none' + }) + return false; + } + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.bind_community_member_do', + token: token, + community_id: community_id, + name, + mobile + }, + dataType: 'json', + success: function (res) { + if(res.data.code==0) { + wx.showToast({ + title: '绑定成功', + icon: 'none' + },()=>{ + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + }) + } + } + }) + }, + + getName: function(e){ + console.log(e) + let name = e.detail.value; + this.setData({ name }) + }, + + getMobile: function (e) { + console.log(e) + let mobile = e.detail.value; + this.setData({ mobile }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.json b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.json new file mode 100644 index 0000000..0bafbaa --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "员工信息", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxml new file mode 100644 index 0000000..35957ee --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxml @@ -0,0 +1,21 @@ + + + + 邀请你成为会员 + + + 你的姓名 + + + + + 联系电话 + + + + + 提交 + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxss new file mode 100644 index 0000000..116985e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/bind_member_hexiao.wxss @@ -0,0 +1,42 @@ +.content { + background-color: #fff; +} + +.tip { + color: #000; + font-size: 36rpx; + font-weight: bold; + text-align: center; + padding: 30rpx 0 120rpx; +} + +.form { + padding: 20rpx; +} + +.form-group { + display: flex; + align-content: center; + align-items: center; + line-height: 80rpx; + border-top: 1rpx solid #ececec; + font-size: 28rpx; +} + +.form-group .label { + color: #000; + margin-right: 20rpx; +} + +.form-btn { + border-top: 1rpx solid #ececec; +} + +.sub-btn { + color: #fff; + line-height: 80rpx; + background-color: #4facfe; + border-radius: 10rpx; + text-align: center; + margin-top: 50rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.js b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.js new file mode 100644 index 0000000..651ae66 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.js @@ -0,0 +1,149 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + recordList: [{ + memberHeadPic: "../../images/head-bitmap.png", + receiverName: "名字", + orderNum: "111", + createTime: "2018-09-12" + }], + refundList: [{ + userAvatar: "", + orderUserName: "吃货星球", + returnOrderCount: "222", + createTime: "2018-09-12" + }], + currentTab: 0, + navList: [{ + name: "购买记录", + status: "0" + }, { + name: "退单记录", + status: "1" + }], + LoadingComplete: !1, + loadText: "没有更多了~", + groupOrderStatus: "", + containerHeight: 0, + scrollTop: 0 + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.setData({ + recordList: this.data.recordList.map(function (t) { + return t.isHide = false, t; + }), + groupOrderNo: options.groupOrderNo, + skuId: options.skuId, + containerHeight: app.globalData.systemInfo.windowHeight - Math.round(app.globalData.systemInfo.windowHeight / 375 * 10), + groupOrderStatus: options.groupOrderStatus + }), this.getList(this.data.currentTab); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 监控切换 + */ + bindChange: function (t) { + this.setData({ + currentTab: 1 * t.detail.current + }), this.getList(this.data.currentTab); + }, + + /** + * 获取数据 + */ + getList: function (currentTab) { + var a = this; + wx.showLoading({ + title: "加载中...", + mask: true + }) + if ( 0 === currentTab ){ + console.log(222) + wx.hideLoading() + } + }, + + /** + * 导航切换 + */ + switchNav: function (t) { + if (this.data.currentTab === 1 * t.currentTarget.dataset.current) return !1; + this.setData({ + currentTab: 1 * t.currentTarget.dataset.current + }); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.json b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.json new file mode 100644 index 0000000..b597dfd --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "购买记录", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxml new file mode 100644 index 0000000..47fd437 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxml @@ -0,0 +1,59 @@ + + + + + + {{item.name}} + + + + + + + + + 暂时还没有记录~ + + + + + + + + {{item.receiverName}}买了 + {{item.orderNum}} 份 + + {{item.createTime}} + + + + + + + + + + + + 暂时还没有记录~ + + + + + + + + {{item.orderUserName}}退了 + {{item.returnOrderCount}} 份 + + {{item.createTime}} + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxss new file mode 100644 index 0000000..d0ccd6d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/buyHistory.wxss @@ -0,0 +1,240 @@ +.nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 92rpx; + border-top: 2rpx solid #f2f2f2; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .orderList_item .line { + position: absolute; + bottom: 0; + height: 6rpx; + width: 100%; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.nav .on { + color: #4facfe; +} + +.swiper-box { + width: 100%; + margin-top: 90rpx; +} + +.swiper-box .order-scroll-view { + width: 750rpx; + height: 100%; +} + +.swiper-box .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.swiper-box .noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.swiper-box .noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.swiper-box .item { + width: 710rpx; + height: 266rpx; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx auto 0; + background: #fff; +} + +.swiper-box .item:last-of-type { + margin: 20rpx auto; +} + +.refresh { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 1rpx solid #999; + position: fixed; + right: 50rpx; + bottom: 200rpx; + font-size: 20rpx; + color: #fff; + background: #000; + opacity: 0.5; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.refresh image { + width: 32rpx; + height: 32rpx; + margin-bottom: 4rpx; +} + +.buyRecord { + width: 100%; +} + +.buyRecord .nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 80rpx; + line-height: 80rpx; + border-top: 1rpx solid #f2f2f2; + border-bottom: 1rpx solid #f2f2f2; + padding: 0 130rpx; + font-weight: 500; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.buyRecord .nav .on { + color: #4facfe; +} + +.buyRecord .nav .orderList_item { + height: 80rpx; + line-height: 80rpx; + margin-bottom: 4rpx; +} + +.buyRecord .nav .line { + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(229,185,131,0.5); + border-radius: 24rpx; +} + +.buyRecord .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.buyRecord .noRecordCon .noRecordImg { + width: 218rpx; + height: 218rpx; + margin-top: 328rpx; +} + +.buyRecord .noRecordCon .noRecord { + padding-top: 18rpx; + font-size: 28rpx; + color: #999; +} + +.buyRecord .record { + margin: 20rpx; + background: #fff; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + position: relative; + overflow: hidden; +} + +.buyRecord .record .recordList { + background: #fff; + padding: 24rpx 30rpx; + font-size: 28rpx; + color: #333; + border-bottom: 1rpx solid #efefef; + display: flex; + align-items: center; + justify-content: space-between; +} + +.buyRecord .record .recordList:last-of-type { + border: none; +} + +.buyRecord .record .recordList .buyer { + display: flex; + justify-content: flex-start; + align-items: center; + font-size: 28rpx; +} + +.buyRecord .record .recordList .buyer .memAvatarUrl { + width: 72rpx; + height: 72rpx; + border-radius: 36rpx; +} + +.buyRecord .record .recordList .buyer .receiverName { + color: #666; + margin-left: 20rpx; +} + +.buyRecord .record .recordList .buyer .receiverName .buyNum { + color: #4facfe; + width: 70rpx; +} + +.buyRecord .record .recordList .buyer span:last-of-type { + margin-left: 20rpx; + color: #aaa; + font-size: 22rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/cashList.js b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.js new file mode 100644 index 0000000..417e138 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.js @@ -0,0 +1,151 @@ +var app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + loadText: "正在加载", + LoadingComplete: true, + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.setData({ + page:1, + no_order:0, + order:[], + }) + this.getData(); + }, + /** + * 获取数据 + */ + getData: function () { + + wx.showLoading({ + title: "加载中...", + mask: true + }); + + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var token = wx.getStorageSync('token'); + + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.cashlist', + token: token, + page: that.data.page + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + console.log(that.data.page); + let rushList = that.data.order.concat(res.data.data); + + that.setData({ + order: rushList, + hide_tip: true, + 'no_order': 0 + }); + wx.hideLoading(); + } else { + that.setData({ + LoadingComplete:true, + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + + + }, + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/cashList.json b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.json new file mode 100644 index 0000000..35359dc --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "提现记录", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxml new file mode 100644 index 0000000..8430e98 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxml @@ -0,0 +1,29 @@ + + + + + + 提现单号({{item.id}}) + + + + + 提现状态: + 成功 + 审核中 + 拒绝 + + + 提现金额: + ¥{{item.money}} + + + 申请日期: + {{item.addtime}} + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxss new file mode 100644 index 0000000..426dd03 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/cashList.wxss @@ -0,0 +1,14 @@ +.list-item { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 20rpx; + margin: 20rpx 20rpx; + line-height: 2; + font-size: 24rpx; +} + +.list-item .title { + border-bottom: 2rpx solid #f2f2f2; + font-size: 28rpx; + margin-bottom: 5px; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/closure.js b/eaterplanet_ecommerce/moduleA/groupCenter/closure.js new file mode 100644 index 0000000..5ab7a3b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/closure.js @@ -0,0 +1,84 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [] + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + if(!util.check_login()){ + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + this.getList(); + }, + + getList: function(){ + wx.showLoading(); + var that = this; + var token = wx.getStorageSync('token'); + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_community_hexiao_memberlist', + token: token + }, + dataType: 'json', + success: function (res) { + console.log(res) + if(res.data.code==0){ + that.setData({ list: res.data.member_list }) + } else { + console.log(res.data.log) + } + wx.hideLoading(); + } + }) + }, + + goQrcode: function(){ + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/addHexiao' + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/closure.json b/eaterplanet_ecommerce/moduleA/groupCenter/closure.json new file mode 100644 index 0000000..b04d1fc --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/closure.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "核销管理", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxml new file mode 100644 index 0000000..bc85cf3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxml @@ -0,0 +1,16 @@ + + + + +添加核销人员 + + + + {{item.username}} + 已核销订单:{{item.member_record_count}} + + + + 暂时没有核销人员 + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxss new file mode 100644 index 0000000..6a5f16a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/closure.wxss @@ -0,0 +1,65 @@ + +.list { + padding: 30rpx; + background-color: #fff; +} + +.list .item { + display: flex; + justify-content: space-between; + line-height: 100rpx; + border-bottom: 2rpx solid #ececec; +} + +.list .item .avatar { + width: 50rpx; + height: 50rpx; + border-radius: 50%; + vertical-align: middle; + margin-right: 10rpx; +} + +.list .item text { + display: inline-block; + line-height: 50rpx; +} + +.list .item .num { + font-weight: bold; + color: #4facfe; +} + +.add-btn { + text-align: center; + padding: 10rpx 0; + background-color: #fff; +} + +.add-btn .btn { + border-bottom: 1px solid #ececec; + border-top: 1px solid #ececec; + border-radius: 5px; + margin: 30rpx; + padding: 30rpx 0; + color: #000; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin: 100rpx 0; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.js b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.js new file mode 100644 index 0000000..e5a76f3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.js @@ -0,0 +1,248 @@ +var page = 1; +var app = getApp(); +var timeFormat = require("../../utils/timeFormat"); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isCalling: false, + queryData: { + createTime: null, + communityId: null, + order: [], + page: page, + pageSize: 20 + }, + maxDate: (0, timeFormat.formatYMD)(new Date()), + searchKey: "", + date: "", + containerHeight: 0, + showLoadMore: false, + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight - Math.round(sysInfo.windowWidth / 375 * 125) + }); + page = 1; + this.data.queryData.communityId = app.globalData.disUserInfo.communityId; + this.data.queryData.createTime = null; + + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + var is_show_on = this.data.is_show_on; + if (is_show_on > 0) { + this.setData({ + page: 1, + order: [] + }) + this.getData(); + } else { + this.setData({ + is_show_on: is_show_on + 1 + }) + } + + }, + + /** + * 获取数据 + */ + getData: function() { + wx.showLoading({ + title: "加载中...", + mask: true + }); + + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var token = wx.getStorageSync('token'); + //currentTab + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_community_member_orderlist', + date: that.data.date, + searchKey: that.data.searchKey, + token: token, + page: that.data.page + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let close_community_delivery_orders = res.data.close_community_delivery_orders || 0; + let rushList = that.data.order.concat(res.data.data); + + that.setData({ + order: rushList, + hide_tip: true, + no_order: 0, + close_community_delivery_orders + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + + }, + + /** + * 获取时间 + */ + getTodayMs: function() { + var t = new Date(); + return t.setHours(0), t.setMinutes(0), t.setSeconds(0), t.setMilliseconds(0), Date.parse(t); + }, + + /** + * 监控输入框 + */ + bindSearchChange: function(e) { + this.setData({ + searchKey: e.detail.value + }); + }, + + /** + * 搜索 + */ + searchByKey: function() { + page = 1; + this.setData({ + order: [], + no_order: 0, + page: 1 + }); + this.data.queryData.memberNickName = this.data.searchKey; + this.getData(); + }, + + /** + * 取消 + */ + cancel: function() { + page = 1; + this.setData({ + searchKey: "", + order: [] + }); + this.data.queryData.memberNickName = null; + this.getData(); + }, + + /** + * 监控日期 + */ + bindDateChange: function(e) { + page = 1; + this.setData({ + date: e.detail.value, + order: [], + no_order: 0, + page: 1 + }); + this.data.queryData.createTime = new Date(e.detail.value).getTime() - 28800000; + this.getData(); + }, + + /** + * 清除日期 + */ + clearDate: function() { + page = 1; + this.setData({ + date: "", + order: [], + no_order: 0, + page: 1 + }); + this.data.queryData.createTime = null; + this.getData(); + }, + + /** + * 拨打电话 + */ + callTelphone: function(e) { + var that = this; + var phoneNumber = e.currentTarget.dataset.phone; + if (phoneNumber!="未下单"){ + this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({ + phoneNumber: phoneNumber, + complete: function() { + that.data.isCalling = false; + } + })); + } + }, + + /** + * 获取更多 + */ + getMore: function() { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + }, + + goLink: function (e) { + let close_community_delivery_orders = this.data.close_community_delivery_orders; + if (close_community_delivery_orders!=1) { + var pages_all = getCurrentPages(); + var url = e.currentTarget.dataset.link; + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + } + }, +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.json b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.json new file mode 100644 index 0000000..690e20c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "社区用户", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-img": "../../components/image/index", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxml new file mode 100644 index 0000000..e41ddff --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxml @@ -0,0 +1,49 @@ + + + + + + 搜索 + 取消 + + + + 社区用户 + 待核销订单 + + + + + + + + {{item.username}} + + {{item.shipping_name}} + + {{item.mobile}} + + + + {{item.mobile}} + + + + + + {{item.order_count}}个 + + + + + + + 暂无社区用户 + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxss new file mode 100644 index 0000000..9d2cf1a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/communityMembers.wxss @@ -0,0 +1,147 @@ +.search { + background: #fff; + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; + align-items: center; + position: relative; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.search .icon-search { + position: absolute; +} + +.search .icon-search { + left: 54rpx; +} + +.search input { + padding-left: 68rpx; + width: 520rpx; + height: 56rpx; + background: #f8f8f8; + border-radius: 28rpx; + color: #999; + box-sizing: border-box; + line-height: 40rpx; +} + +.search text { + color: #4facfe; + margin-left: 28rpx; +} + +.date { + padding: 0 30rpx; + background: #fff; + height: 90rpx; + line-height: 90rpx; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: #9b9b9b; +} + +.date .date-value { + margin-left: 12rpx; + color: #4facfe; +} + +.date .icon-date { + height: 36rpx; + width: 36rpx; + float: right; + margin: 6rpx 0 0 0; +} + +.date .icon-date image { + height: 36rpx; + width: 36rpx; +} + +.date .icon-clear { + height: 32rpx; + float: right; + color: #4facfe; + margin: 0 28rpx 0 0; + font-size: 24rpx; +} + +.list-content { + width: 100%; + overflow: auto; + -webkit-overflow-scrolling: touch; +} + +.list-header, .list-item { + display: flex; + align-items: center; + justify-content: space-between; + padding: 0 30rpx; +} + +.list-header { + height: 84rpx; +} + +.list-item { + background: #fff; + height: 116rpx; + margin-bottom: 2rpx; +} + +.list-item .item-left { + display: flex; + align-items: center; +} + +.list-item .item-left text { + margin-left: 12rpx; + font-size: 28rpx; + width: 400rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.list-item .item-left .phone { + margin-left: 12rpx; + display: flex; + align-items: center; +} + +.list-item .item-left .icon-phone { + width: 28rpx; + height: 32rpx; + margin-left: 10rpx; +} + +.list-item .item-right { + height: 100%; + display: flex; + align-items: center; +} + +.list-item .item-right .text { + font-size: 26rpx; + margin-right: 18rpx; +} + +.list-item .item-right .rightArrowImg { + width: 12rpx; + height: 22rpx; +} + +.navigator-hover { + background-color: rgba(0, 0, 0, 0); +} + +.none-member { + text-align: center; + background: #fff; + height: 116rpx; + line-height: 116rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.js b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.js new file mode 100644 index 0000000..c592962 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.js @@ -0,0 +1,173 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + loadText: "正在加载", + LoadingComplete: true, + currentTab: 1, + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var s_type = options.type; + this.setData({ + currentTab: s_type + }) + this.getData(); + }, + getData: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }); + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + + var chooseDate = this.data.chooseDate; + var token = wx.getStorageSync('token'); + + var currentTab = this.data.currentTab; + + var order_status = 1; + + if (currentTab == 1) { + order_status = 1; + } else if (currentTab == 2) { + order_status = 2; + } + + //currentTab + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.headorderlist', + token: token, + page: that.data.page, + order_status: order_status + }, + method: 'post', + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + console.log(that.data.page); + let rushList = that.data.order.concat(res.data.data); + + that.setData({ + order: rushList, + hide_tip: true, + 'no_order': 0 + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 导航切换 + */ + switchTab: function(e){ + let currentTab = e.currentTarget.dataset.type || 1; + this.setData({ + currentTab: currentTab, + page:1, + order:[] + }) + + this.getData(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.json b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.json new file mode 100644 index 0000000..e3fa0ae --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "订单明细", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxml new file mode 100644 index 0000000..6ad9e34 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxml @@ -0,0 +1,41 @@ + + + + + + 待确认收入 + + + 可提现金额 + + + + + + + 订单单号({{item.order_num_alias}}) + + + + + 订单标题: + {{item.name}} + + + 订单金额: + ¥{{item.total}} + + + 佣金金额: + ¥{{item.money}} + + + 下单日期: + {{item.addtime}} + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxss new file mode 100644 index 0000000..f8aabab --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/detailsList.wxss @@ -0,0 +1,60 @@ +.nav-bar { + width: 100%; + position: fixed; + left: 0; + top: 0; + z-index: 10; +} + +.nav-bar .nav-bar-inner { + display: flex; + justify-content: space-between; + background-color: white; +} + +.nav-bar .nav-bar-item { + flex: 1; + text-align: center; +} + +.nav-bar .nav-bar-item .nav-bar-item-inner { + position: relative; + display: inline-block; + word-break: keep-all; + font-size: 28rpx; + font-weight: 500; + color: #666; + padding: 20rpx 0; +} + +.nav-bar .current.nav-bar-item .nav-bar-item-inner::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; + transition: all 400ms ease-in; +} + +.cash-list { + margin-top: 100rpx; +} + +.list-item { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 20rpx; + margin: 20rpx 20rpx; + line-height: 2; + font-size: 24rpx; +} + +.list-item .title { + border-bottom: 2rpx solid #f2f2f2; + font-size: 28rpx; + margin-bottom: 5px; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.js b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.js new file mode 100644 index 0000000..ba49a06 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.js @@ -0,0 +1,74 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.json b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.json new file mode 100644 index 0000000..64fed5c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.json @@ -0,0 +1,8 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "分销说明", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxml new file mode 100644 index 0000000..b89d93d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxss new file mode 100644 index 0000000..634db4d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionInstruct.wxss @@ -0,0 +1,57 @@ +page { + height: 100%; +} + +.instruction { + width: 100%; + background: #f36e4f; +} + +.instruction image { + display: block; +} + +.instruction .headImg { + width: 100%; + height: 540rpx; +} + +.instruction .content { + padding: 0 30rpx 40rpx; +} + +.instruction .content .imgOne, .instruction .content .imgTwo, +.instruction .content .imgThree, .instruction .content .imgFour, +.instruction .content .imgFive, .instruction .content .imgSix, +.instruction .content .imgSeven, .instruction .content .imgEight { + width: 100%; + height: 908rpx; +} + +.instruction .content .imgTwo { + height: 712rpx; +} + +.instruction .content .imgThree { + height: 1128rpx; +} + +.instruction .content .imgFour { + height: 824rpx; +} + +.instruction .content .imgFive { + height: 866rpx; +} + +.instruction .content .imgSix { + height: 954rpx; +} + +.instruction .content .imgSeven { + height: 878rpx; +} + +.instruction .content .imgEight { + height: 1140rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.js b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.js new file mode 100644 index 0000000..a63bf77 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.js @@ -0,0 +1,291 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + currentTab: 0, + pageSize: 10, + navList: [{ + name: "全部", + status: "0" + }, { + name: "待确认", + status: "1" + }, { + name: "已确认", + status: "2" + }, + { + name: "无效", + status: "3" + } + ], + distributionList: [], + loadText: "没有更多记录了~", + containerHeight: 0, + chooseDate: "", + chooseDateTime: "", + data: "", + estimate: "", + permoney: 0, + communnityId: "", + loadText: "", + disUserId: "", + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight - Math.round(sysInfo.windowHeight / 375 * 55) + }); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + var dayTime = new Date(), + year = dayTime.getFullYear(), + mon = dayTime.getMonth() + 1, + dateTime = Date.parse(dayTime); + this.setData({ + page: 1, + order: [], + chooseDate: year + "年" + mon + "月", + chooseDateTime: dateTime + }), this.getData(); + + this.get_month_money(); + }, + + get_month_money: function() { + var chooseDate = this.data.chooseDate; + var that = this; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'order.order_commission', + token: token, + chooseDate: chooseDate + }, + method: 'post', + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + that.setData({ + permoney: res.data.money + }) + } else { + that.setData({ + permoney: 0 + }) + } + } + }) + + }, + /** + * 获取数据 + */ + getData: function() { + wx.showLoading({ + title: "加载中...", + mask: true + }); + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var chooseDate = this.data.chooseDate; + var token = wx.getStorageSync('token'); + var currentTab = this.data.currentTab; + + var order_status = -1; + if (currentTab == 0) { + order_status = -1; + } else if (currentTab == 1) { + order_status = 22; + } else if (currentTab == 2) { + order_status = 6; + } else if (currentTab == 3) { + order_status = 357; + } + + //currentTab + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'order.orderlist', + is_tuanz: 1, + token: token, + chooseDate: chooseDate, + page: that.data.page, + order_status: order_status + }, + method: 'post', + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + console.log(that.data.page); + let data = res.data.data; + let rushList = that.data.order.concat(data); + that.setData({ + order: rushList, + hide_tip: true, + 'no_order': 0 + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + + } + }) + }, + + /** + * 刷新 + */ + refresh: function() { + this.setData({ + page: 1, + order: [], + }, ()=>{ + this.getData(); + }); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + bindChange: function(t) { + this.setData({ + currentTab: 1 * t.detail.current + }); + this.setData({ + order: [], + page: 1, + no_order: 0 + }, () => { + console.log('我变啦'); + this.getData(); + }) + }, + + /** + * 切换导航 + */ + switchNav: function(e) { + if (this.data.currentTab === 1 * e.target.dataset.current) return false; + this.setData({ + currentTab: 1 * e.target.dataset.current + }); + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + this.getData(); + }, + + /** + * 监控日期改变 + */ + bindDateChange: function(t) { + console.log("picker发送选择改变,携带值为", t.detail.value), this.setData({ + date: t.detail.value + }); + var a = this.data.date.split("-"), + e = Date.parse(this.data.date); + this.setData({ + chooseDate: a[0] + "年" + a[1] + "月", + chooseDateTime: e, + order: [], + page: 1, + no_order: 0 + }), this.getData(); + this.get_month_money(); + }, + getCurrentList: function() { + console.log(this.data.no_order); + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + }, + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + console.log(this.data.no_order); + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + }, + + handleTipDialog: function(){ + this.setData({ + showTipDialog: !this.data.showTipDialog + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.json b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.json new file mode 100644 index 0000000..701a45e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "分销记录", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-load-more": "../../components/load-more/index", + "i-dialog": "../../components/dialog/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxml new file mode 100644 index 0000000..965c8d6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxml @@ -0,0 +1,80 @@ + + + + + + + + {{chooseDate}} + + + + + + 预计佣金:¥{{permoney}} + + + + + {{item.name}} + + + + + + + 还没有记录 快去分享吧~ + + + + + {{item.order_num_alias}} + {{item.status_name}} + + + + + + {{goods.name}} + 团单金额 ¥{{goods.total}} | + 预估佣金 ¥{{goods.commision}} + + + 佣金变化:¥{{goods.del_commision}} + + + + + + + + 已退款 + + 退款金额:¥{{goods.refund_info.ref_money}} + {{goods.refund_info.real_refund_quantity}}个 申请中 + {{goods.refund_info.real_refund_quantity}}个 退款成功 + {{goods.refund_info.real_refund_quantity}}个 退款失败 + + + + + 配送收入: ¥{{item.shipping_fare}} + 合计佣金: ¥{{item.total_commision}}(含配送) + + + 合计佣金: ¥{{item.total_commision}} + + + + + + + + + + + 刷新 + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxss new file mode 100644 index 0000000..e38f2e7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/distributionList.wxss @@ -0,0 +1,280 @@ +.nav { + position: relative; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 92rpx; + border-top: 2rpx solid #f2f2f2; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .orderList_item .line { + position: absolute; + bottom: 0; + height: 6rpx; + width: 100%; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.nav .on { + color: #4facfe; +} + +.swiper-box { + width: 100%; + margin-top: 90rpx; +} + +.swiper-box .order-scroll-view { + width: 750rpx; + height: 100%; +} + +.swiper-box .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.swiper-box .noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.swiper-box .noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.swiper-box .item { + width: 710rpx; + /**height: 266rpx;**/ + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx auto 0; + background: #fff; +} + +.swiper-box .item:last-of-type { + margin: 20rpx auto; +} + +.refresh { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 2rpx solid #999; + box-shadow: 2rpx 2rpx 4rpx #999; + position: fixed; + right: 50rpx; + bottom: 200rpx; + font-size: 20rpx; + color: #666; + background: #fff; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.refresh .refreshImg { + font-size: 32rpx; + color: #000; + margin-bottom: 4rpx; +} + +swiper-item { + height: auto; +} + +.section { + + width: 690rpx; + + display: flex; + font-size: 28rpx; + color: #666; + padding: 20rpx 30rpx; + background-color: #fff; +} + +.section .groupDay { + width: 36rpx; + height: 36rpx; +} + +.section .picker { + margin-left: 20rpx; + display: flex; + flex: 1; +} + +.section .picker .choose-day .iconfont { + font-size: 12rpx; + margin-left: 6rpx; + vertical-align: middle; + color: #999; +} + +.distributionList { + width: 100%; + position: fixed; +} + +.distributionList .nav { + top: 80rpx; +} + +.distributionList .on { + color: #4facfe; + border-bottom: 4rpx solid #4facfe; + margin: 0; +} + +.distributionList .swiper-box { + margin-top: 170rpx; +} + +.item { + background: #fff; + overflow: hidden; + border-top-left-radius: 20rpx; + border-top-right-radius: 20rpx; +} + +.distributionNum { + height: 80rpx; + font-size: 26rpx; + color: #333; + padding: 0 30rpx; + border-top-left-radius: 20rpx; + border-top-right-radius: 20rpx; + border-bottom: 2rpx solid #e4e4e4; + display: flex; + align-items: center; + justify-content: space-between; +} + +.distributionNum .distributionTime { + font-size: 24rpx; + color: #666; +} + +.distributionNum .statusName { + font-size: 26rpx; + color: #4facfe; +} + +.spu { + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; +} + +.spu .goodsImg { + height: 120rpx; + margin-right: 30rpx; +} + +.spu .detail { + font-size: 28rpx; + color: #333; +} + +.spu .detail .goodsName { + color: #333; + font-size: 28rpx; + line-height: 40rpx; + height: 80rpx; + width: 540rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.spu .detail .commission { + font-size: 24rpx; + color: #999; + line-height: 40rpx; +} + +.distributionCommision { + border-top: 2rpx solid #e4e4e4; + display: flex; + align-items: center; + justify-content: flex-end; + height: 80rpx; + font-size: 26rpx; + color: #777; + padding: 0 30rpx; +} + +.distributionCommision text { + margin-left: 30rpx; +} + +.dialogText { + box-sizing: border-box; + padding: 20rpx; + height: 140rpx!important; + text-align: justify; +} + +.dialogBtn { + font-size: 30rpx!important; + height: 68rpx!important; + line-height: 68rpx!important; +} + +.tips .tag { + font-size: 20rpx; + padding: 4rpx 8rpx; + border-radius: 5rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.js b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.js new file mode 100644 index 0000000..e2f0eef --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.js @@ -0,0 +1,326 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + tixian_money: '', + final_money: 0, + sxfee: 0, + type: 1, + items: [ + { name: '1', value: '系统余额', show: true, checked: false }, + { name: '2', value: '微信零钱', show: true, checked: false }, + { name: '3', value: '支付宝', show: true, checked: false }, + { name: '4', value: '银行卡', show: true, checked: false } + ] + }, + canTixian: true, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'community.get_community_info', + token: token + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let rdata = res.data; + + let items = that.data.items; + let community_info = rdata.community_info; + if (community_info.head_commiss_tixianway_yuer == 0) items[0].show = false; + if (community_info.head_commiss_tixianway_weixin == 0) items[1].show = false; + if (community_info.head_commiss_tixianway_alipay == 0) items[2].show = false; + if (community_info.head_commiss_tixianway_bank == 0) items[3].show = false; + + let type = that.data.type; + for (let i = 0; i < items.length; i++){ + if(items[i].show){ + items[i].checked = true; + type = items[i].name; + break + } + } + + let head_commiss_tixian_publish = rdata.head_commiss_tixian_publish; + let hasTixianPublish = head_commiss_tixian_publish!=''; + let { is_need_subscript, need_subscript_template } = res.data; + + that.setData({ + head_commiss_tixian_publish, + member_info: rdata.member_info, + community_info: rdata.community_info, + commission_info: rdata.commission_info, + community_tixian_fee: rdata.community_tixian_fee, + community_min_money: rdata.community_min_money, + items, + type, + hasTixianPublish, + is_need_subscript, + need_subscript_template + }); + + } else { + //is_login + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + + } + } + }) + }, + + bindTixianMoneyInput: function(t) { + let max_val = this.data.commission_info.money; + var value = t.detail.value; + if (value > max_val) { + wx.showToast({ + title: '本次最大可提现' + max_val + '元', + icon: "none", + }) + } + let fee = this.data.community_tixian_fee; + let final_money = (value * (100 - fee) / 100).toFixed(2); + let sxfee = (value - final_money).toFixed(2); + + this.setData({ + tixian_money: value, + final_money: final_money, + sxfee + }) + }, + + getAll: function() { + var max_tixian_money = this.data.commission_info.money; + let fee = this.data.community_tixian_fee; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + let sxfee = (max_tixian_money - final_money).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + sxfee + }) + }, + + /** + * 提交 + */ + resSubmit: function(e) { + const params = e.detail.value; + let isNull = 0; + let type = this.data.type; + let errortip = [{}, {}, { + bankusername: '微信真实姓名' + }, { + bankusername: '支付宝真实姓名', + bankaccount: '支付宝账户' + }, { + bankname: '银行卡名称', + bankusername: '持卡人姓名', + bankaccount: '银行卡账户' + }]; + + for (let item in params) { + params[item] = params[item].replace(/(^\s*)|(\s*$)/g, ""); + if (!params[item]) { + const itemTip = errortip[type][item]; + wx.showToast({ + title: '请输入' + (itemTip || '正确的表单内容'), + icon: 'none' + }) + isNull = 1; + break; + } + if (item == 'money' && params[item] * 1 <= 0) { + wx.showToast({ + title: '请输入正确的金额', + icon: 'none' + }) + return; + } + } + console.log(isNull) + if (isNull == 1) return; + params.type = type; + console.log(params); + + let tdata = this.data; + let tixian_money = parseFloat(tdata.tixian_money); + let max_tixian_money = tdata.commission_info.money; + let community_min_money = parseFloat(tdata.community_min_money); + + if (tixian_money == '' || community_min_money > tixian_money) { + wx.showToast({ + title: '最小提现' + community_min_money + '元', + icon: "none", + }) + return false; + } + + if (tixian_money > max_tixian_money) { + wx.showToast({ + title: '本次最大可提现' + max_tixian_money + '元', + icon: "none", + }) + let fee = tdata.community_tixian_fee; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + let sxfee = (max_tixian_money - final_money).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + sxfee + }) + return false; + } + + if (!this.canTixian) return; + this.canTixian = false; + var token = wx.getStorageSync('token'); + var that = this; + + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'community.tixian_community_info', + token: token, + ...params + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + wx.showToast({ + title: "提现成功,等待审核", + icon: "none", + duration: 2000, + mask: true, + success: function () { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/cashList', + }) + } + }); + } else { + wx.showToast({ + title: "提现失败", + icon: "none", + duration: 2000, + mask: true + }); + } + setTimeout(()=>{ + that.canTixian = true; + }, 500); + } + }) + }, + + formSubmit: function(event) { + let that = this; + let is_need_subscript = this.data.is_need_subscript; + if(is_need_subscript==1) { + //弹出订阅消息 + this.subscriptionNotice().then(()=>{ + that.resSubmit(event); + }).catch(()=>{ + that.resSubmit(event); + }); + } else { + that.resSubmit(event); + } + }, + + /** + * 订阅消息 + */ + subscriptionNotice: function() { + let that = this; + return new Promise((resolve, reject)=>{ + let obj = that.data.need_subscript_template; + let tmplIds = Object.keys(obj).map(key => obj[key]); // 订阅消息模版id + if (wx.requestSubscribeMessage) { + tmplIds.length && wx.requestSubscribeMessage({ + tmplIds: tmplIds, + success(res) { + let is_need_subscript = 1; + let acceptId = []; + tmplIds.forEach(item=>{ + if (res[item] == 'accept') { + //用户同意了订阅,添加进数据库 + acceptId.push(item); + } else { + //用户拒绝了订阅或当前游戏被禁用订阅消息 + is_need_subscript = 0; + } + }) + + if(acceptId.length) { + that.addAccept(acceptId); + } + that.setData({ is_need_subscript }) + resolve(); + }, + fail(err) { + console.log(err) + reject(); + } + }) + } else { + // 兼容处理 + reject(); + } + }) + }, + + // 用户点击订阅添加到数据库 + addAccept: function (acceptId) { + let token = wx.getStorageSync('token'); + let type = acceptId.join(','); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.collect_subscriptmsg', + token, + type + }, + dataType: 'json', + method: 'POST', + success: function () {} + }) + }, + + /** + * 切换类型 + */ + radioChange(e) { + this.setData({ type: e.detail.value }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.json b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.json new file mode 100644 index 0000000..11d1f23 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "申请提现", + "navigationBarBackgroundColor": "#4facfe", + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxml new file mode 100644 index 0000000..f0da725 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxml @@ -0,0 +1,61 @@ + + +
+ + + 提现金额 + + + + + + 最多可提现{{commission_info.money}}元,最小提现{{community_min_money}}元全部提现 + + + 提现手续费为:{{community_tixian_fee+'%'}} ({{sxfee}}元) + + + 最终到账金额:{{final_money}}元 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提现规则: + + + + +
\ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxss new file mode 100644 index 0000000..7983f81 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/editInfo.wxss @@ -0,0 +1,139 @@ +view { + box-sizing: border-box; +} + +.edit-info { + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.edit-info .main { + font-size: 28rpx; +} + +.edit-info .main .li { + height: 88rpx; + border-bottom: 2rpx solid #efefef; + display: flex; + justify-content: space-between; + align-items: center; + color: #333; + padding: 0 30rpx; + background-color: #fff; +} + +.edit-info .main .li .left { + width: 160rpx; +} + +.edit-info .main .li .right { + flex:1; + align-items: center; +} + +.edit-info .main .li input { + text-align: right; +} + +.edit-info .main .li .placeholder-text { + color: #999; +} + +.edit-info .btn-submit { + margin: 40rpx 20rpx; + width: 710rpx; + height: 88rpx; + border-radius: 8rpx; + background: #4facfe; + font-size: 30rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: white; + text-align: center; + line-height: 88rpx; +} + +.edit-info .btn-submit::after { + border: none; +} + +.edit-info .btn-submit-disabled { + background: #dcdcdc; +} + +.li-tip { + display: flex; + padding: 10rpx 30rpx 24rpx; + color: #999; +} + +.li-tip .left { + flex: 1; +} + +.get-all { + color: #4facfe; +} + +.type-wrap { + padding: 30rpx; + background-color: #fff; +} + +.radio { + position: relative; + margin-right: 20rpx; + width: 38rpx; +} + +.radio text { + display: inline-block; + vertical-align: middle; +} + +radio { + width: 38rpx; +} + +radio .wx-radio-input { + border-radius: 50%; + width: 24rpx; + height: 24rpx; +} + +radio .wx-radio-input.wx-radio-input-checked::before { + border-radius: 50%; + width: 44rpx; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + background: #4facfe; + border-color: #4facfe; +} + +.form-box { + margin-top: 30rpx; +} + +.form-group { + margin-bottom: 20rpx; +} + +.form-ipt { + border: 1rpx solid #e5e5e5; + padding: 0 10rpx; +} + +.desc { + padding: 0 30rpx; + line-height: 1.6; + font-size: 26rpx; + color: #666; +} + +.desc .h2 { + font-size: 30rpx; + margin-bottom: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.js b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.js new file mode 100644 index 0000000..8a2f60c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.js @@ -0,0 +1,125 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIpx: false, + goods: [{ + name: '', + image: '', + status_name: '上架', + checked: false + }], + checkedAll: false, + checkedCount: 0 + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + if (!util.check_login()) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + app.globalData.isIpx && this.setData({ + isIpx: true + }); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + + }, + + /** + * 勾选 + */ + checkboxChange: function(e) { + var type = e.currentTarget.dataset.type, + idx = e.currentTarget.dataset.index, + goods = this.data.goods, + checkedAll = this.data.checkedAll; + + + if ("all" === type) { + let ck = 0; + if (checkedAll) { + goods.forEach(function(item) { + item.checked = 0; + }) + } else { + goods.forEach(function (item) { + item.checked = 1; + }) + ck = goods.length; + } + this.setData({ + checkedCount: ck, + goods: goods, + checkedAll: !checkedAll + }) + } else if ("item" === type) { + goods.forEach(function (item, t) { + if (idx == t) { + if (item.checked) { + item.checked = 0 + } else { + item.checked = 1 + } + } + }) + + var ck = 0; + goods.forEach(function (item) { + if (item.checked) { + ck++; + } + }) + + this.setData({ + checkedCount: ck, + goods: goods, + checkedAll: ck == goods.length ? true : false + }) + } + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.json b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.json new file mode 100644 index 0000000..6adb743 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "商品管理", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-img": "../../components/image/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxml new file mode 100644 index 0000000..3fb235e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + {{item.name}} + + + {{item.status_name}} + + + + + 暂无数据 + + + + + + + + + 合计: + {{checkedCount}}条 + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxss new file mode 100644 index 0000000..d8a3ffa --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/goodsManage.wxss @@ -0,0 +1,202 @@ +.pb80 { + padding-bottom: 160rpx; +} + +.no-list { + text-align: center; + width: 100%; + height: 100rpx; + line-height: 100rpx; + background: #fff; +} + +.check-box { + box-sizing: border-box; + width: 50rpx; + height: 50rpx; + display: flex; + justify-content: center; +} + +.check-box .checkbox-checked { + width: 48rpx; + height: 48rpx; +} + +.check-box .checkbox-disabled { + width: 48rpx; + height: 48rpx; + margin-top: 2rpx; +} + +.check-box-content { + width: 84rpx; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +} + +.order-item { + border-bottom: 1rpx solid #e5e5e5; +} + +.order-item .order-title { + display: flex; + align-items: center; + background: #fff; + height: 188rpx; +} + +.order-item .order-title .order-status { + color: #4facfe; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; +} + +.order-item .goods-item { + display: flex; + align-items: center; + background: #fff; + height: 188rpx; + position: relative; +} + +.goods-item .goods-img { + width: 120rpx; + height: 120rpx; + margin-right: 30rpx; +} + +.order-item .goods-item .goods-detail { + width: 492rpx; + height: 100%; + display: flex; + justify-content: center; + flex-direction: column; +} + +.order-item .goods-item .goods-detail .goods-title { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: initial; + white-space: normal; + font-size: 28rpx; + height: 80rpx; + margin-bottom: 12rpx; +} + +.order-item .goods-item .goods-detail .goods-desc { + color: #999; + font-size: 26rpx; + width: 360rpx; +} + +.order-item .goods-item .goods-sign-btn { + height: 52rpx; + padding: 0 24rpx; + border: 2rpx solid #4facfe; + border-radius: 52rpx; + text-align: center; + line-height: 52rpx; + color: #4facfe; + position: absolute; + right: 24rpx; + bottom: 20rpx; +} + +.order-item .goods-item .goods-sign-btn.goods-sign-btn-disabled { + border-color: #ccc; + color: #ccc; +} + +/* 底部 */ +.bottom-bar { + width: 100%; + height: 104rpx; + display: flex; + justify-content: space-between; + align-items: center; + background: #fff; + position: fixed; + bottom: 0; + left: 0; + z-index: 9; +} + +.bottom-bar .check-box-content { + width: 140rpx; +} + +.bottom-bar .check-box-content .check-box { + margin-right: 20rpx; +} + +.bottom-bar .flex { + display: flex; + align-items: center; + justify-content: flex-end; +} + +.bottom-bar .total { + margin-right: 20rpx; + text-align: right; +} + +.bottom-bar .total span { + color: #4facfe; +} + +.bottom-bar .btn { + flex: 3; + padding: 0 40rpx; + height: 80rpx; + border-radius: 80rpx; + line-height: 80rpx; + text-align: center; + color: #fff; + font-size: 30rpx; + margin-right: 20rpx; + background: #4facfe; + white-space: nowrap; +} + +.bottom-bar .btn.gray { + background: #ff758c; +} + +.bottom-bar .btn.btn-disabled { + flex: 1; + padding: 0 40rpx; + background: #e3e3e3; +} + +.check-box { + box-sizing: border-box; + width: 50rpx; + height: 50rpx; + display: flex; + justify-content: center; +} + +.check-box .checkbox-checked { + width: 48rpx; + height: 48rpx; +} + +.check-box .checkbox-disabled { + width: 48rpx; + height: 48rpx; + margin-top: 2rpx; +} + +.check-box-content { + width: 84rpx; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.js b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.js new file mode 100644 index 0000000..4a017f0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.js @@ -0,0 +1,196 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + order: {}, + groupInfo: { + group_name: '社区', + owner_name: '团长', + localtown_modifypickingname: '包装费' + } + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + status.setGroupInfo().then((groupInfo) => { + that.setData({ groupInfo }) + }); + + let is_share = options.is_share || 0; + + this.setData({ + orderId: options.groupOrderId, + is_share:is_share + }); + + if (util.check_login()) { + this.setData({ needAuth: false }) + } else { + this.setData({ needAuth: true }); + } + wx.showLoading({ + title: "加载中...", + mask: true + }); + this.getData(); + }, + + authSuccess: function () { + let that = this; + this.setData({ + needAuth: false + }, ()=>{ + that.getData(); + }) + }, + + /** + * 获取数据 + */ + getData: function(){ + var that = this; + var token = wx.getStorageSync('token'); + + if (this.data.orderId){ + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.order_head_info', + token: token, + is_share:this.data.is_share, + id: this.data.orderId + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let order = res.data.data; + let commision = 0; + + //计算合计佣金和结算状态 + let is_statements_state = 0; + let statements_end_date = ''; + let head_shipping_fare = 0; // 配送费 + order && order.order_goods_list && order.order_goods_list.forEach(function (item) { + commision += parseFloat(item.commision); + head_shipping_fare += parseFloat(item.head_shipping_fare); + if(item.is_statements_state==1) { + is_statements_state = 1; + statements_end_date = item.statements_end_date; + } + }) + let { open_aftersale, open_aftersale_time } = res.data; + that.setData({ + order: res.data.data, + commision: commision.toFixed(2), + is_statements_state, + statements_end_date, + head_shipping_fare, + open_aftersale, + open_aftersale_time + }); + that.caclGoodsTot(res.data.data); + } + } + }) + } else { + wx.showModal({ + title: '提示', + content: '订单不存在', + showCancel: false, + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/groupList', + }) + } + } + }) + } + }, + + caclGoodsTot: function(order){ + if(order && order.order_goods_list) { + let order_goods_list = order.order_goods_list; + let goodsTot = 0; + Object.keys(order_goods_list).forEach(k=>{ + if(order_goods_list[k].is_vipcard_buy==1 || order_goods_list[k].is_level_buy) { + goodsTot += order_goods_list[k].total; + } else { + goodsTot += order_goods_list[k].real_total; + } + }) + this.setData({ goodsTot: goodsTot.toFixed(2) }) + } + }, + + /** + * 状态判断 + */ + swithState: function (e) { + switch (e) { + case "-1": + break; + case "0": + this.setData({ + orderStatusName: "待成团" + }); + break; + case "1": + this.setData({ + orderStatusName: "待配送" + }); + break; + case "2": + this.setData({ + orderStatusName: "待收货" + }); + break; + case "3": + this.setData({ + orderStatusName: "待提货" + }); + break; + case "4": + this.setData({ + orderStatusName: "已完成" + }); + break; + case "6": + this.setData({ + orderStatusName: "待采购" + }); + } + }, + + handleTipDialog: function(){ + this.setData({ + showTipDialog: !this.data.showTipDialog + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.json b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.json new file mode 100644 index 0000000..81d9fa3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.json @@ -0,0 +1,16 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "团单详情", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "i-img": "../../components/img/index", + "i-goods-info": "../../components/goodsInfo/index", + "i-order-info-express": "../../components/order/orderInfoExpress", + "i-orderComment": "../../components/orderComment/index", + "i-order-info": "../../components/orderInfo/index", + "i-modal": "../../components/modal/index", + "i-cashon_delivery": "../../components/cashon_delivery/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxml new file mode 100644 index 0000000..e3700f4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxml @@ -0,0 +1,115 @@ + + + + + + + + + + + + + + + 商品详情(共计{{order.goods_count?order.goods_count:0}}件商品) + {{order.order_status_info.name}} + + + + + + + {{goodsInfo.name}} + + + + + 规格:{{goodsInfo.option_str}} 数量:{{goodsInfo.quantity}} + + + + ¥{{goodsInfo.price}} + + + + + + 商品金额: ¥{{goodsInfo.old_total}} + 退款金额: ¥{{goodsInfo.has_refund_money}} + + {{goodsInfo.refund_info.real_refund_quantity}}个 申请中 + {{goodsInfo.refund_info.real_refund_quantity}}个 退款成功 + {{goodsInfo.refund_info.real_refund_quantity}}个 退款失败 + + + + + 有效金额: ¥{{goodsInfo.order_jishu}} + 佣金比例: {{goodsInfo.fen_bili+'%'}} + 佣金固定金额: {{goodsInfo.fen_gumoney}} + + + + + + 货到付款 + + + + 团长配送费:¥{{head_shipping_fare}} (归团长收入) + + + 实际佣金:¥{{commision}} + + ({{is_statements_state==1?'已结算':'待结算'}} {{statements_end_date}}) + + + + + + + + + + + + + + + + + 佣金计算规则 + + 佣金结算前:有效金额=商品金额-退款金额 + 佣金结算后:有效金额=商品金额 + + 佣金固定金额: + 实际佣金(有效金额-退款金额)/有效金额*佣金固定金额 + + + 商品配送费: + 商品配送费收入=有效金额/订单总金额*总配送费 + + + + 商品配送费: + + 1. 商品配送费收入=有效金额/订单总金额*总配送费 + 2. 退商品配送费=退款金额/有效金额*配送费 + + + + 配送费结算时间: + 从确认收货或核销后开始,直到售后期{{open_aftersale_time||0}}天结束,系统自动结算 + + + + 佣金结算时间: + 从确认收货或核销后开始,直到售后期{{open_aftersale_time||0}}天结束,系统自动结算 + + 最终可得佣金以实际计算结果为准 + + 知道了 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxss new file mode 100644 index 0000000..884fe2e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail.wxss @@ -0,0 +1,269 @@ +.groupDetail { + width: 100%; + overflow: hidden; +} + +.groupDetail .orderStatus { + height: 200rpx; + background: #4facfe; + padding-left: 60rpx; + padding-right: 120rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupDetail .orderStatus .orderStatusName { + font-size: 34rpx; + color: #fff; +} + +.groupDetail .orderStatus .toBeGroupImg { + width: 126rpx; + height: 126rpx; +} + +.groupDetail .orderStatus .forShippingImg { + width: 126rpx; + height: 126rpx; +} + +.groupDetail .orderStatus .toSignImg { + width: 126rpx; + height: 126rpx; +} + +.groupDetail .orderStatus .toPickUpImg { + width: 126rpx; + height: 126rpx; +} + +.groupDetail .orderStatus .successfulDealImg { + width: 126rpx; + height: 126rpx; +} + +.groupDetail .orderStatus .purchaseImg { + width: 122rpx; + height: 108rpx; +} + +.groupDetail .goodsDetail { + background: #fff; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx 20rpx; +} + +.groupDetail .goodsDetail .title { + height: 80rpx; + padding: 0 30rpx; + display: flex; + align-items: center; + font-size: 28rpx; + color: #444; + border-bottom: 1rpx solid #efefef; + font-weight: 500; +} + +.groupDetail .goodsDetail .title span:first-of-type { + flex: 1; +} + +.groupDetail .goodsDetail .title span:last-of-type { + color: #be965a; +} + +.groupDetail .goodsDetail .title .black { + color: #aaa !important; +} + +.groupDetail .goodsDetail .goodsList { + padding: 30rpx; + /* border-bottom: 1rpx solid #efefef; */ + display: flex; + justify-content: flex-start; +} + +.groupDetail .goodsDetail .goodsList .goodsImg { + width: 120rpx; + margin-right: 20rpx; +} + +.groupDetail .goodsDetail .goodsList .goodsImg .img-class { + width: 120rpx; + height: 120rpx; +} + +.groupDetail .goodsDetail .goodsList .goos-item { + width: 510rpx; + line-height: 40rpx; +} + +.groupDetail .goodsDetail .goodsList .goos-item .goodsTitle { + font-size: 28rpx; + color: #444; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.groupDetail .goodsDetail .goodsList .goos-item .attribute { + font-size: 24rpx; + line-height: 42rpx; + color: #999; + display: flex; +} + +.groupDetail .goodsDetail .goodsList .goos-item .attribute span:first-of-type { + flex: 1; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.groupDetail .goodsDetail .goodsList .goos-item .attribute .checkRecord { + display: inline-block; +} + +.groupDetail .goodsDetail .goodsList .goos-item .attribute .checkRecord .checkRecordList { + width: 144rpx; + height: 48rpx; + border: 1rpx solid #b6b6b6; + border-radius: 24rpx; + font-size: 26rpx; + color: #333; + display: flex; + justify-content: center; + align-items: center; +} + +.groupDetail .goodsDetail .goodsList .goos-item .time { + color: #aaa; + font-size: 24rpx; + line-height: 28rpx; + position: relative; + width: 400rpx; +} + +.groupDetail .goodsDetail .goodsList .goos-item .time .last { + position: absolute; + left: 190rpx; +} + +.groupDetail .goodsDetail .end { + padding: 0 30rpx; + font-size: 28rpx; + height: 90rpx; + line-height: 90rpx; + color: #444; + font-weight: 500; +} + +.groupDetail .goodsDetail .end span:first-of-type { + float: right; +} + +.groupDetail .goodsDetail .end span:first-of-type text { + color: #4facfe; +} + +.groupDetail .goodsDetail .end span:last-of-type { + float: right; + margin-right: 20rpx; +} + +.groupDetail .total { + padding: 24rpx 20rpx; + background: #fff; + margin-bottom: 20rpx; + font-size: 26rpx; + display: flex; + justify-content: space-between; + flex-direction: column; +} + +.groupDetail .total .totalList { + font-size: 24rpx; + color: #999; + margin-bottom: 10rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupDetail .total .totalList:last-child { + margin: 0; +} + +.groupDetail .total .totalList .mark { + font-size: 28rpx; + color: #333; +} + +.groupDetail .total .totalList .realPayPrice { + font-size: 28rpx; + color: #ff758c; +} + +.groupDetail .orderInfor { + background: #fff; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0,0,0,0.05); + border-radius: 20rpx; + margin: 0rpx 20rpx; +} + +.groupDetail .orderInfor .for-title { + height: 80rpx; + padding: 0 30rpx; + display: flex; + font-weight: 500; + align-items: center; + font-size: 28rpx; + color: #444; + border-bottom: 1rpx solid #efefef; +} + +.groupDetail .orderInfor .for-content { + font-size: 24rpx; + color: #444; + display: flex; + flex-direction: column; + line-height: 46rpx; + margin-bottom: 20rpx; + padding: 30rpx; +} + +.groupDetail .orderInfor .for-content view { + display: flex; + align-items: center; +} + +.groupDetail .orderInfor .for-content view span { + flex: 1; + color: #aaa; +} + +.price-text { + margin-top: 4rpx; + font-size: 28rpx; + font-weight: 600; + color: #4facfe; +} + +.orderComment { + margin: 0 20rpx; +} + +.tips .tag { + font-size: 20rpx; + padding: 4rpx 8rpx; + border-radius: 5rpx; + margin-left: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupList.js b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.js new file mode 100644 index 0000000..5134015 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.js @@ -0,0 +1,288 @@ +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + data: { + currentTab: 0, + pageSize: 10, + navList: [{ + name: "全部", + id: "0" + }, { + name: "待配送", + id: "1" + }, + { + name: "待签收", + id: "2" + }, + { + name: "待提货", + id: "3" + }, { + name: "已完成", + id: "4" + } + ], + loadText: "", + disUserId: "", + no_order: 0, + page: 1, + hide_tip: true, + order: [], + tip: '正在加载', + searchfield: [ + { + field: 'ordersn', + name: '订单号' + }, + { + field: 'member', + name: '会员昵称' + }, + { + field: 'address', + name: '配送联系人' + }, + { + field: 'mobile', + name: '下单手机号' + }, + { + field: 'location', + name: '配送地址' + }, + { + field: 'goodstitle', + name: '商品标题' + } + ], + fieldIdx: 0, + groupInfo: { + group_name: '社区', + owner_name: '团长' + } + }, + searchOBj: {}, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + status.setGroupInfo().then((groupInfo) => { + that.setData({ groupInfo }) + }); + var currentTab = 0; + if (options != undefined) { + currentTab = options.tab; + } + this.setData({ + currentTab: currentTab + }); + this.getData(currentTab); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + // todo + }, + + bindFiledChange: function (e) { + this.setData({ + fieldIdx: e.detail.value + }) + }, + + searchByKey: function (e) { + let that = this; + let { searchfield, fieldIdx } = this.data; + let field = searchfield[fieldIdx].field; + let keyword = e.detail.value || ''; + this.searchOBj = { keyword, searchfield: field }; + this.setData({ + page: 1, + order: [] + },()=>{ + that.getData(); + }); + }, + + callPhone: function(e){ + var that = this; + var phoneNumber = e.currentTarget.dataset.phone; + phoneNumber && wx.makePhoneCall({ + phoneNumber: phoneNumber + }); + }, + + /** + * 导航切换 + */ + switchNav: function (t) { + if (this.data.currentTab === 1 * t.currentTarget.dataset.id) return false; + this.setData({ + currentTab: 1 * t.currentTarget.dataset.id, + page: 1, + order: [] + }); + this.getData(); + }, + + /** + * 获取数据 + */ + getData: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }); + this.setData({ + isHideLoadMore: true + }) + + this.data.no_order = 1 + let that = this; + var token = wx.getStorageSync('token'); + + var currentTab = this.data.currentTab; + var order_status = -1; + if (currentTab == 1) { + order_status = 1; + } else if (currentTab == 2) { + order_status = 14; + } else if (currentTab == 3) { + order_status = 4; + } else if (currentTab == 4) { + order_status = 6; + } + + //currentTab + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.orderlist', + is_tuanz: 1, + token: token, + page: that.data.page, + order_status: order_status, + ...this.searchOBj + }, + dataType: 'json', + success: function (res) { + let { open_aftersale, open_aftersale_time } = res.data; + let h = { open_aftersale, open_aftersale_time }; + if (res.data.code == 0) { + console.log(that.data.page); + let data = res.data.data; + let rushList = that.data.order.concat(data); + + that.setData({ + order: rushList, + hide_tip: true, + no_order: 0, + ...h + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true, + ...h + }) + wx.hideLoading(); + return false; + } + + } + }) + }, + + sign_one: function (e) { + var that = this; + var order_id = e.currentTarget.dataset.order_id; + var token = wx.getStorageSync('token'); + wx.showModal({ + title: '提示', + content: '确认提货', + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'order.sign_dan_order', + token: token, + order_id: order_id + }, + dataType: 'json', + success: function (res) { + wx.showToast({ + title: '签收成功', + duration: 1000 + }) + + var order = that.data.order; + var new_order = []; + for (var i in order) { + if (order[i].order_id != order_id) { + new_order.push(order[i]); + } + } + that.setData({ + order: new_order + }) + } + }) + } + } + }) + }, + + /** + * 跳转订单详情 + */ + goOrderDetail: function (t) { + var a = t.currentTarget.dataset.order_id; + wx.navigateTo({ + url: "/eaterplanet_ecommerce/moduleA/groupCenter/groupDetail?groupOrderId=" + a + }); + }, + + onReachBottom: function () { + if (this.data.no_order == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + + }, + + handleTipDialog: function(e){ + let fen_type = e.currentTarget.dataset.type || 0; + this.setData({ + showTipDialog: !this.data.showTipDialog, + fen_type + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupList.json b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.json new file mode 100644 index 0000000..fb02a72 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTextStyle": "black", + "navigationBarTitleText": "我的团单", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-modal": "../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxml new file mode 100644 index 0000000..be7eeb4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxml @@ -0,0 +1,127 @@ + + + + + + + {{item.name}} + + + + + + {{searchfield[fieldIdx].name}} + + + + + + + + + + + + 您还没有相关的订单~ + + 去购物 + + + + + + + 团单日期:{{item.createTime}} + {{item.status_name}} + + + + + + {{goods.name}} + 货到付款 + + + 商品数量:{{goods.quantity}} + 规格:{{goods.option_str}} + + + 商品金额:¥{{goods.total}} + + + 有效金额: ¥{{goods.order_jishu}} + 佣金固定金额: {{goods.fen_gumoney}} + 佣金比例: {{goods.fen_bili+'%'}} + + + 团长配送费: ¥{{goods.head_shipping_fare||0.00}} + + 实际佣金: ¥{{goods.commision}} + + + + + + 已退款 + + 退款金额:¥{{goods.refund_info.ref_money}} + {{goods.refund_info.real_refund_quantity}}个 申请中 + {{goods.refund_info.real_refund_quantity}}个 退款成功 + {{goods.refund_info.real_refund_quantity}}个 退款失败 + + + + + + + + {{item.shipping_name}} + + + 确认签收 + 查看详情 + + + + + + + + + + + 佣金计算规则 + + 佣金结算前:有效金额=商品金额-退款金额 + 佣金结算后:有效金额=商品金额 + + 佣金固定金额: + 实际佣金(有效金额-退款金额)/有效金额*佣金固定金额 + + + 商品配送费: + 商品配送费收入=有效金额/订单总金额*总配送费 + + + + 商品配送费: + + 1. 商品配送费收入=有效金额/订单总金额*总配送费 + 2. 退商品配送费=退款金额/有效金额*配送费 + + + + 配送费结算时间: + 从确认收货或核销后开始,直到售后期{{open_aftersale_time||0}}天结束,系统自动结算 + + + + 佣金结算时间: + 从确认收货或核销后开始,直到售后期{{open_aftersale_time||0}}天结束,系统自动结算 + + 最终可得佣金以实际计算结果为准 + + 知道了 + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxss new file mode 100644 index 0000000..2b3429a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/groupList.wxss @@ -0,0 +1,398 @@ +.fixed-top { + width: 100%; + position: relative; + left: 0; + top: 0; + z-index: 10; +} + +.nav-bar .nav-bar-inner { + display: flex; + justify-content: space-between; + padding: 0 60rpx; + background-color: #fff; +} + +.nav-bar .nav-bar-item { + position: relative; + word-break: keep-all; + font-size: 28rpx; + font-weight: 500; + color: #666; + padding: 20rpx 0; +} + +.nav-bar .current.nav-bar-item::after { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: 0; + height: 3px; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.content-list { + background-color: #f6f6f6; + padding-top: 100rpx; + height: 100%; +} + +.order-scroll-view { + width: 750rpx; + height: 100%; +} + +.noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.refresh { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 1rpx solid #999; + position: fixed; + right: 50rpx; + bottom: 200rpx; + font-size: 20rpx; + color: #fff; + background: #000; + opacity: 0.5; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.refresh image { + width: 32rpx; + height: 32rpx; + margin-bottom: 4rpx; +} + +.groupList { + width: 100%; +} + +.groupList .nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 90rpx; + border-top: 1rpx solid #f2f2f2; + border-bottom: 1rpx solid #f2f2f2; + padding: 0 100rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupList .nav .on { + color: #be965a; +} + +.groupList .nav .line { + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(229,185,131,0.5); + border-radius: 24rpx; +} + +.groupList .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupList .noRecordCon .noRecordImg { + width: 218rpx; + height: 218rpx; + margin-top: 200rpx; +} + +.groupList .noRecordCon .noRefundImg { + width: 158rpx; + height: 140rpx; + margin-top: 200rpx; +} + +.groupList .noRecordCon .noRecord { + padding-top: 18rpx; + font-size: 28rpx; + color: #999; +} + +.groupList .noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.groupList .item { + margin-bottom: 20rpx; + overflow: hidden; +} + +.song_button{ + position: relative; + /* height:60rpx; */ + padding: 20rpx 30rpx; + display: flex; + justify-content: space-between; + border-top: 1rpx solid #efefef; +} + +.goods-sign-btn { + display: inline-block; + height: 52rpx; + padding: 0 24rpx; + border: 2rpx solid #4facfe; + border-radius: 52rpx; + text-align: center; + line-height: 52rpx; + color: #4facfe; +} + +.goods-sign-btn.gray { + color: #666; + border: 2rpx solid #efefef; + margin-left: 14rpx; +} + +.goods-sign-btn image { + width: 24rpx; + height: 24rpx; +} + +swiper-item { + height: auto; +} + + +/** 订单列表begin **/ +.item { + background: #fff; + overflow: hidden; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 0rpx 20rpx; +} + +.orderNum { + height: 80rpx; + font-size: 26rpx; + color: #333; + padding: 0 30rpx; + border-bottom: 1rpx solid #efefef; + display: flex; + align-items: center; + justify-content: space-between; +} + +.orderNum .statusName { + color: #be965a; + font-weight: 500; +} + +.orderNum .black { + color: #aaa; +} + +.spu { + padding: 30rpx 30rpx 20rpx; + display: flex; + justify-content: flex-start; +} + +.spu .goodsImg { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; +} + +.spu .goodsImg .img-class { + width: 120rpx; + height: 120rpx; +} + +.spu .detail { + margin-left: 20rpx; + font-size: 24rpx; + color: #aaa; +} + +.spu .detail .spuName { + color: #444; + font-size: 28rpx; + font-weight: 500; + overflow: hidden; +} + +.spu .detail .tips { + line-height: 1; + width: 530rpx; + margin-top: 16rpx; + position: relative; +} + +.spu .detail .tips .last { + float:right; +} + +.spu .detail .tips .price { + color: #4facfe; + font-size: 32rpx; +} + +.gold { + color: gold; +} + +/**订单列表end ***/ + +.commision-box { + display: flex; + flex-direction: row-reverse; + align-items: center; + justify-content: space-between; + font-size: 26rpx; + color: #777; + margin-bottom: 30rpx; + padding-left: 140rpx; + padding-right: 30rpx; +} + +/* 搜索 */ +.search-box { + background: #fff; + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; + align-items: center; + position: relative; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.filed { + width: 190rpx; + margin-right: 20rpx; + border: 1rpx solid #ececec; + box-sizing: border-box; + height: 56rpx; + line-height: 56rpx; + padding: 0 15rpx; + font-size: 24rpx; + border-radius: 6rpx; +} + +.filed .picker { + display: flex; + align-items: center; + justify-content: space-between; +} + +.filed .iconfont { + font-size: 14rpx; + color: #ccc; +} + +.search { + position: relative; + display: flex; + justify-content: flex-start; + align-items: center; + flex: 1; +} + +.search .icon-search { + position: absolute; + left: 20rpx; +} + +.search input { + padding-left: 60rpx; + width: 100%; + height: 56rpx; + background: #f8f8f8; + border-radius: 6rpx; + color: #999; + box-sizing: border-box; + line-height: 40rpx; +} + +.search text { + color: #ff673f; + margin-left: 28rpx; +} + +.dialogText { + box-sizing: border-box; + padding: 20rpx; + height: 140rpx!important; + text-align: justify; +} + +.dialogBtn { + font-size: 30rpx!important; + height: 68rpx!important; + line-height: 68rpx!important; +} + +.tips .tag { + font-size: 20rpx; + padding: 4rpx 8rpx; + border-radius: 5rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.js b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.js new file mode 100644 index 0000000..84cd92b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.js @@ -0,0 +1,137 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + distributeInfo: {}, + list: [], + stateName: ["未结算", "已结算", "已取消"], + typeName: { commiss: "订单分佣", tuijian: "推荐下级奖励" }, + noData: 0, + tip: '加载中', + isHideLoadMore: true + }, + page: 1, + hasMore: true, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + let commiss_diy_name = wx.getStorageSync('commiss_diy_name') || '分销'; + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + wx.setNavigationBarTitle({ + title: owner_name + commiss_diy_name, + }) + that.setData({ groupInfo }) + }); + this.setData({ commiss_diy_name }) + + if (!util.check_login()) { + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + wx.showLoading(); + this.getList(); + }, + + getData(){ + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_head_distribute_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + that.setData({ + distributeInfo: res.data.data + }) + } else { + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + }, + + getList() { + var token = wx.getStorageSync('token'); + var that = this; + if(!that.hasMore) { return; } + this.setData({ isHideLoadMore: false }) + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_head_distribute_order', + token: token, + page: that.page, + type: '', + level: '' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let oldList = that.data.list; + let list = oldList.concat(res.data.data); + that.setData({ list, isHideLoadMore: true }) + } else { + if (that.data.list.length==0 && that.page==1) that.setData({ noData: 1 }) + that.hasMore = false; + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData(); + console.log(this.page) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.page++; + this.getList(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.json b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.json new file mode 100644 index 0000000..5b6a5df --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#4facfe", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxml new file mode 100644 index 0000000..26c839e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxml @@ -0,0 +1,70 @@ + + + + + + 总收入 + {{distributeInfo.total_money}} + 推荐二维码 + + + + 待结算 + {{distributeInfo.wait_money}} + + + 已确认 + {{distributeInfo.success_money}} + + + {{groupInfo.owner_name}}数量 + {{distributeInfo.level_count1}} + {{distributeInfo.level_count2}} + {{distributeInfo.level_count3}} + + + + + + 佣金明细 + + + + {{item.order_num_alias}} + {{stateName[item.state]}} + + + + 类型 + {{typeName[item.type]}} + + + {{commiss_diy_name}}等级 + {{item.level}}级 + + + 订单状态 + {{item.order_status}} + + + 下级团长名称 + {{item.child_head_name}} + + + 下级团长社区名称 + {{item.community_name}} + + + + {{item.addtime}} + 奖励金额: ¥{{item.money}} + + + + + + + 暂无任何明细记录 + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxss new file mode 100644 index 0000000..a7fe89f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/gruopInfo.wxss @@ -0,0 +1,229 @@ +.zr { + background: #4facfe; + width: 100%; + height: 130px; + position: relative; + overflow: hidden; +} + +.water { + position: absolute; + left: 0; + bottom: -10px; + height: 30px; + width: 100%; + z-index: 1; +} + +.water-c { + position: relative; +} + +.water-1 { + background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjYwMHB4IiBoZWlnaHQ9IjYwcHgiIHZpZXdCb3g9IjAgMCA2MDAgNjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCAzLjQgKDE1NTc1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT53YXRlci0xPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IuaIkSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Ii0iIHNrZXRjaDp0eXBlPSJNU0FydGJvYXJkR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjEuMDAwMDAwLCAtMTMzLjAwMDAwMCkiIGZpbGwtb3BhY2l0eT0iMC4zIiBmaWxsPSIjRkZGRkZGIj4KICAgICAgICAgICAgPGcgaWQ9IndhdGVyLTEiIHNrZXRjaDp0eXBlPSJNU0xheWVyR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEyMS4wMDAwMDAsIDEzMy4wMDAwMDApIj4KICAgICAgICAgICAgICAgIDxwYXRoIGQ9Ik0wLDcuNjk4NTczOTUgTDQuNjcwNzE5NjJlLTE1LDYwIEw2MDAsNjAgTDYwMCw3LjM1MjMwNDYxIEM2MDAsNy4zNTIzMDQ2MSA0MzIuNzIxMDUyLDI0LjEwNjUxMzggMjkwLjQ4NDA0LDcuMzU2NzQxODcgQzE0OC4yNDcwMjcsLTkuMzkzMDMwMDggMCw3LjY5ODU3Mzk1IDAsNy42OTg1NzM5NSBaIiBpZD0iUGF0aC0xIiBza2V0Y2g6dHlwZT0iTVNTaGFwZUdyb3VwIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") repeat-x; + background-size: 600px; + -webkit-animation: wave-animation-1 3.5s infinite linear; + animation: wave-animation-1 3.5s infinite linear; +} + +.water-2 { + top: 5px; + background: url("data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+Cjxzdmcgd2lkdGg9IjYwMHB4IiBoZWlnaHQ9IjYwcHgiIHZpZXdCb3g9IjAgMCA2MDAgNjAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiPgogICAgPCEtLSBHZW5lcmF0b3I6IFNrZXRjaCAzLjQgKDE1NTc1KSAtIGh0dHA6Ly93d3cuYm9oZW1pYW5jb2RpbmcuY29tL3NrZXRjaCAtLT4KICAgIDx0aXRsZT53YXRlci0yPC90aXRsZT4KICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPgogICAgPGRlZnM+PC9kZWZzPgogICAgPGcgaWQ9IuaIkSIgc3Ryb2tlPSJub25lIiBzdHJva2Utd2lkdGg9IjEiIGZpbGw9Im5vbmUiIGZpbGwtcnVsZT0iZXZlbm9kZCIgc2tldGNoOnR5cGU9Ik1TUGFnZSI+CiAgICAgICAgPGcgaWQ9Ii0iIHNrZXRjaDp0eXBlPSJNU0FydGJvYXJkR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjEuMDAwMDAwLCAtMjQ2LjAwMDAwMCkiIGZpbGw9IiNGRkZGRkYiPgogICAgICAgICAgICA8ZyBpZD0id2F0ZXItMiIgc2tldGNoOnR5cGU9Ik1TTGF5ZXJHcm91cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTIxLjAwMDAwMCwgMjQ2LjAwMDAwMCkiPgogICAgICAgICAgICAgICAgPHBhdGggZD0iTTAsNy42OTg1NzM5NSBMNC42NzA3MTk2MmUtMTUsNjAgTDYwMCw2MCBMNjAwLDcuMzUyMzA0NjEgQzYwMCw3LjM1MjMwNDYxIDQzMi43MjEwNTIsMjQuMTA2NTEzOCAyOTAuNDg0MDQsNy4zNTY3NDE4NyBDMTQ4LjI0NzAyNywtOS4zOTMwMzAwOCAwLDcuNjk4NTczOTUgMCw3LjY5ODU3Mzk1IFoiIGlkPSJQYXRoLTIiIHNrZXRjaDp0eXBlPSJNU1NoYXBlR3JvdXAiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDMwMC4wMDAwMDAsIDMwLjAwMDAwMCkgc2NhbGUoLTEsIDEpIHRyYW5zbGF0ZSgtMzAwLjAwMDAwMCwgLTMwLjAwMDAwMCkgIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==") repeat-x; + background-size: 600px; + -webkit-animation: wave-animation-2 6s infinite linear; + animation: wave-animation-2 6s infinite linear; +} + +.water-1, .water-2 { + position: absolute; + width: 100%; + height: 60px; +} + +.back-white { + background: #f6f6f6; +} + +@keyframes wave-animation-1 { + 0% { + background-position: 0 top; + } + + 100% { + background-position: 600px top; + } +} + +@keyframes wave-animation-2 { + 0% { + background-position: 0 top; + } + + 100% { + background-position: 600px top; + } +} + +.top_box { + color: #fff; + font-size: 28rpx; + line-height: 1; +} + +.total { + text-align: center; + padding-top: 10rpx; + padding-bottom: 40rpx; +} + +.total-money { + font-weight: bold; + font-size: 50rpx; + margin-top: 18rpx; +} + +.three { + display: flex; + justify-content: center; + align-items: center; +} + +.three-item { + position: relative; + flex: 1; + text-align: center; +} + +.three-item::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 1rpx; + border-left: 1rpx solid #ffb193; +} + +.three-item:first-child::before { + content: none; +} + +.three-money { + margin-top: 15rpx; +} + +.list { + position: relative; +} + +.list-title { + position: relative; + font-size: 30rpx; + color: #333; + margin: 30rpx; + padding-left: 15rpx; +} + +.list .list-item { + width: 710rpx; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx auto 0; + background: #fff; +} + +.list .list-item:last-of-type { + margin: 20rpx auto; +} + +.list-title::before { + content: ''; + position: absolute; + left: 0; + top: 4rpx; + bottom: 4rpx; + border-left: 6rpx solid #4facfe; +} + +.distributionNum { + height: 80rpx; + font-size: 26rpx; + color: #333; + padding: 0 30rpx; + border-top-left-radius: 20rpx; + border-top-right-radius: 20rpx; + border-bottom: 2rpx solid #e4e4e4; + display: flex; + align-items: center; + justify-content: space-between; +} + +.distributionNum .distributionTime { + font-size: 24rpx; + color: #666; +} + +.distributionNum .statusName { + font-size: 26rpx; + color: #4facfe; +} + +.distributionCommision { + border-top: 2rpx solid #e4e4e4; + display: flex; + align-items: center; + justify-content: space-between; + height: 80rpx; + font-size: 26rpx; + color: #777; + padding: 0 30rpx; +} + +.details { + padding: 10rpx 30rpx; + line-height: 1.6; + font-size: 24rpx; + color: #666; +} + +.details-item { + display: flex; + justify-content: space-between; + align-content: center; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 150rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} + +.rightArrowImg { + width: 12rpx; + height: 22rpx; + margin-left: 8rpx; +} + +.qrcode { + position: absolute; + right: 30rpx; + font-size: 24rpx; + top: 20rpx; + border: 1rpx solid #fff; + padding: 5rpx 10rpx; + border-radius: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/headlist.js b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.js new file mode 100644 index 0000000..055e46a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.js @@ -0,0 +1,111 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + noData: 0, + tip: '加载中', + isHideLoadMore: true, + level: '', + groupInfo: { + owner_name: '团长' + } + }, + page: 1, + hasMore: true, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let level = options.level || ''; + this.setData({ level }); + let that = this; + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + wx.setNavigationBarTitle({ + title: `${owner_name}列表`, + }) + that.setData({ groupInfo }) + }); + if (!util.check_login()) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + wx.showLoading(); + this.getList(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + getList() { + var token = wx.getStorageSync('token'); + var that = this; + if (!that.hasMore) { return; } + this.setData({ isHideLoadMore: false }) + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_head_child_headlist', + token: token, + page: that.page, + level: that.data.level + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let oldList = that.data.list; + let list = oldList.concat(res.data.data); + that.setData({ list, isHideLoadMore: true }) + } else { + if (that.data.list.length == 0 && that.page == 1) that.setData({ noData: 1 }) + that.hasMore = false; + } + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.page++; + this.getList(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/headlist.json b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.json new file mode 100644 index 0000000..c84de7d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "团长列表", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxml new file mode 100644 index 0000000..99af75e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxml @@ -0,0 +1,26 @@ + + + + + + + + + {{item.username}} + {{item.level_name}} + + + {{item.community_name}} + {{item.head_name}} + + + {{item.apptime}} + + + + + + + 暂无下级{{owner_name}} + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxss new file mode 100644 index 0000000..9a1231f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/headlist.wxss @@ -0,0 +1,55 @@ +.list-item { + display: flex; + padding: 30rpx; + background-color: #fff; + font-size: 28rpx; + border-bottom: 1rpx solid #e5e5e5; +} + +.list-item .left { + width: 80rpx; + margin-right: 20rpx; +} + +.list-item .left image { + width: 80rpx; + height: 80rpx; + border-radius: 50%; +} + + +.list-item .right { + flex: 1; +} + +.list-item .right .ll { + display: flex; + justify-content: space-between; + align-items: center; + line-height: 50rpx; +} + +.time { + font-size: 26rpx; + color: #999; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 150rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/index.js b/eaterplanet_ecommerce/moduleA/groupCenter/index.js new file mode 100644 index 0000000..565c899 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/index.js @@ -0,0 +1,369 @@ +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + waitSendNum: 0, + waitSignNum: 0, + waitPickNum: 0, + completeNum: 0, + disUserId: "", + communityName: "", + communityId: "", + distribution: "", + estimate: "", + lastMonth: "", + isShow: true, + currentTab: 0, + show_on_one:0, + dialogShow: 0, + effectValidOrderNum: 0, + groupInfo: { + group_name: '社区', + owner_name: '团长' + }, + showActionsheet: false, + shareActionsheet: [ + { text: '发送给朋友', value: 1, share: true }, + { text: '生成二维码', value: 2, type: 'warn' } + ] + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + wx.setNavigationBarTitle({ + title: `${owner_name}中心`, + }) + that.setData({ groupInfo }) + }); + this.loadPage(); + }, + + loadPage: function () { + let that = this; + status.loadStatus().then(function () { + let appLoadStatus = app.globalData.appLoadStatus; + if (appLoadStatus == 0) { + //未登录 + wx.redirectTo({ + url: "/eaterplanet_ecommerce/pages/user/me" + }) + } else if (appLoadStatus == 2) { + // wx.redirectTo({ + // url: "/eaterplanet_ecommerce/pages/position/community" + // }) + } + that.setData({ + appLoadStatus: appLoadStatus, + community: app.globalData.community + }) + }); + this.load_community_data(); + }, + load_community_data:function(){ + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_community_info', + 'token': token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let communityData = res.data; + let commission_info = communityData.commission_info; + commission_info.mix_total_money = commission_info.mix_total_money.toFixed(2); + let { head_today_pay_money, today_add_head_member, today_after_sale_order_count, today_invite_head_member,is_open_solitaire,is_show_community_ranking } = res.data; + that.setData({ + member_info: communityData.member_info, + community_info: communityData.community_info, + commission_info: commission_info, + total_order_count: communityData.total_order_count || 0, + total_member_count: communityData.total_member_count || 0, + today_order_count: communityData.today_order_count || 0, + today_effect_order_count: communityData.today_effect_order_count || 0, + today_pay_order_count: communityData.today_pay_order_count || 0, + today_pre_total_money: communityData.today_pre_total_money || 0, + waitSendNum: communityData.wait_send_count || 0, + waitSignNum: communityData.wait_qianshou_count || 0, + waitPickNum: communityData.wait_tihuo_count || 0, + completeNum: communityData.has_success_count || 0, + open_community_addhexiaomember: communityData.open_community_addhexiaomember, + open_community_head_leve: communityData.open_community_head_leve, + head_today_pay_money, + today_add_head_member, + today_after_sale_order_count, + today_invite_head_member, + is_open_solitaire, + shop_index_share_title: communityData.shop_index_share_title, + shop_index_share_image: communityData.shop_index_share_image, + is_show_community_ranking: is_show_community_ranking || 0 + }); + } else { + //is_login + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + }, + + /** + * 扫描 + */ + goScan: function(){ + wx.scanCode({ + success(res) { + console.log(res) + if (res.scanType == 'WX_CODE' && res.path != '') + { + wx.navigateTo({ + url: "/" + res.path + }); + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var that = this; + var show_on_one = this.data.show_on_one; + let commiss_diy_name = wx.getStorageSync('commiss_diy_name') || '分销'; + if (show_on_one > 0) { + this.load_community_data(); + } + this.setData({ + show_on_one: 1, + commiss_diy_name + }) + }, + + /** + * 跳转订单 + */ + goOrder: function (e) { + let status = e.currentTarget.dataset.status; + wx.navigateTo({ + url: "/eaterplanet_ecommerce/moduleA/groupCenter/groupList?tab=" + status + }); + }, + + /** + * 跳转编辑 + */ + goEdit: function () { + wx.navigateTo({ + url: "/eaterplanet_ecommerce/moduleA/groupCenter/setting?id=" + this.data.community_info.id + }); + }, + + /** + * 导航切换 + */ + switchNav: function (e) { + if (this.data.currentTab === 1 * e.target.dataset.current) return false; + this.setData({ + currentTab: 1 * e.target.dataset.current + }); + }, + + /** + * 导航切换监控 + */ + bindChange: function (e) { + this.setData({ + currentTab: 1 * e.detail.current + }); + for (var i = 0; i < 4; i++) { + if (this.data.currentTab === i) { + this.setData({ + effectEstimate: this.data.effectList[i].estimate, + effectSettle: this.data.effectList[i].settle, + effectValidOrderNum: this.data.effectList[i].validOrderNum + }); + } + } + }, + + changeMycommunion: function () { + let community_info = this.data.community_info; + let community_id = community_info.id; + console.log(community_id) + var token = wx.getStorageSync('token'); + let that = this; + community_id !== void 0 && app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.addhistory_community', + community_id: community_id, + token: token + }, + dataType: 'json', + success: function (res) { + console.log('s1') + that.getCommunityInfo().then(() => { + console.log('s2') + app.globalData.changedCommunity = true; + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + }); + } + }) + }, + + getCommunityInfo: function(){ + return new Promise(function (resolve, reject) { + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_history_community', + token: token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let history_communities = res.data.list; + if (Object.keys(history_communities).length > 0 || history_communities.communityId != 0) { + wx.setStorageSync('community', history_communities); + app.globalData.community = history_communities; + resolve(history_communities); + } else { + resolve(''); + } + } + } + }) + }) + }, + + handleShareActionsheet: function(){ + // this.setData({ showActionsheet: true }) + this.getShareCode(); + }, + + closeQrcodeModal: function(){ + this.setData({ showQrcodeModal: !this.data.showQrcodeModal }) + }, + + getShareCode(){ + wx.showLoading(); + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'community.community_index_shareqrcode', + token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let qrcode = res.data.qrcode; + if(!qrcode) { + return wx.showToast({ + title: '暂未生成二维码', + icon: 'none' + }) + } + that.setData({ qrcode, showQrcodeModal: true }) + } + } + }) + }, + + btnClick(e){ + let type = e.detail.value; + if(type==2) { + this.setData({showActionsheet: false}) + this.getShareCode(); + } + }, + + saveImgToThumb: function(){ + let image_path = this.data.qrcode; + let that = this; + wx.getImageInfo({ + src: image_path, + success: function(res) { + var real_path = res.path; + wx.saveImageToPhotosAlbum({ + filePath: real_path, + success(res) { + wx.showToast({ + title: '图片保存成功,可以分享了', + icon: 'none', + duration: 2000 + }) + that.setData({ + showQrcodeModal: false + }); + } + }) + } + }) + }, + + confirmMessage: function(){ + this.setData({ + dialogShow: !this.data.dialogShow + }) + }, + + goLink: function(event){ + let url = event.currentTarget.dataset.link; + url && wx.navigateTo({ url }) + }, + + onShareAppMessage: function(res) { + this.setData({ is_share_html: true }); + let community_info = this.data.community_info || ''; + let { id, community_name } = community_info; + let shopname = wx.getStorageSync('shopname') || ''; + this.setData({ showActionsheet: false }); + let shop_index_share_title = this.data.shop_index_share_title || ''; + let shop_index_share_image = this.data.shop_index_share_image || ''; + let title = shop_index_share_title ? shop_index_share_title : (shopname + ' ' +community_name || ''); + if(!id) return; + return { + title, + path: "eaterplanet_ecommerce/pages/index/index?community_id=" + id, + imageUrl: shop_index_share_image, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/index.json b/eaterplanet_ecommerce/moduleA/groupCenter/index.json new file mode 100644 index 0000000..6f4cbcf --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "团长中心", + "navigationBarBackgroundColor": "#4facfe", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-modal": "../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/index.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/index.wxml new file mode 100644 index 0000000..7bc8af7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/index.wxml @@ -0,0 +1,228 @@ + + + + + + + + + + {{community_info.head_name}} + + + 编辑 + + + + ID:{{community_info.re_id}} + + + + + + 绑定{{groupInfo.group_name}}:{{community_info.community_name}} + + + {{groupInfo.owner_name}}等级:{{community_info.head_level_info.levelname}}(分佣比例:{{community_info.head_level_info.commission+'%'}}) + + + + + + + {{groupInfo.owner_name}}概况 + + 打印二维码 + + + + + {{commission_info.mix_total_money}} + 总收入(元) + + + {{total_order_count}} + 总订单 + + + {{total_member_count}} + 会员数 + + + + + + + + 今日详情 + + {{groupInfo.owner_name}}排行 + + + + + {{today_order_count}} + + 订单总数(笔) + + + + {{today_effect_order_count}} + + 有效订单(笔) + + + + {{today_pay_order_count}} + + 付款人数 + + + + {{head_today_pay_money}} + + 销售额(元) + + + + + + {{today_add_head_member}} + + 新增会员数 + + + + {{today_after_sale_order_count}} + + 售后订单(笔) + + + + {{today_pre_total_money}} + + 预估收入 + + + + {{today_invite_head_member}} + + 今日访客 + + + + + + + + + + 我的团单 + + 查看全部 + + + + + + {{waitSendNum}} + + 待配送 + + + {{waitSignNum}} + + 待签收 + + + {{waitPickNum}} + + 待提货 + + + {{completeNum}} + + 已完成 + + + + + + + {{groupInfo.group_name}}用户 + 待核销 + + + + + 接龙中心 + + + + + + 结算记录 + + + + + + 我的钱包 + + + + + + 结算记录 + + + + + + 配送单 + + + + + + 核销管理 + + + + + + {{groupInfo.owner_name}}{{commiss_diy_name}} + + + + + + + + + + 总订单 + + + 总订单包含{{groupInfo.group_name}}用户已取消订单、退款订单、部分退款订单 + + + + + + + + + + + + + 打印二维码 + + + + 保存图片 + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/index.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/index.wxss new file mode 100644 index 0000000..f0f7717 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/index.wxss @@ -0,0 +1,521 @@ +.groupCenter { + width: 100%; + position: relative; + overflow: hidden; +} + +.groupCenter .basicInform { + width: 100%; + height: 226rpx; + background: #4facfe; + display: flex; + justify-content: flex-start; +} + +.groupCenter .basicInform .user-avatar { + width: 144rpx; + height: 144rpx; + margin: 10rpx 30rpx 0; + display: flex; + justify-content: center; +} + +.groupCenter .basicInform .user-avatar .userAvatarUrl { + border-radius: 50%; + width: 140rpx; + height: 140rpx; + border: 2rpx solid rgba(255, 255, 255, 0.24); + overflow: hidden; + display: flex; +} + +.groupCenter .basicInform .userInfo { + display: flex; + flex-direction: column; + padding-top: 10rpx; + width: 100%; +} + +.groupCenter .basicInform .userInfo .user-name { + height: 40rpx; + line-height: 40rpx; + color: #fff; + font-size: 40rpx; +} + +.groupCenter .basicInform .userInfo .user-name .edit-name { + float: right; + margin-top: 10rpx; + font-size: 24rpx; + line-height: 34rpx; + padding-right: 20rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .basicInform .userInfo .user-name .icon-edit { + margin-right: 10rpx; + font-size: 24rpx; +} + +.groupCenter .basicInform .userInfo .userId, +.groupCenter .basicInform .userInfo .address { + position: relative; + font-size: 26rpx; + color: #fff; + z-index: 1; + margin-top: 10rpx; +} + +.groupCenter .basicInform .userInfo .address { + width: 520rpx; + line-height: 32rpx; +} + +.groupCenter .basicInform .userInfo .address .iconfont { + font-size: 24rpx; +} + +.groupCenter .distributionCon { + width: 100%; + margin-top: -30rpx; + z-index: 9; +} + +.groupCenter .distributionCon .distribution { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 0; + margin: 0 20rpx; +} + +.groupCenter .distributionCon .distribution .myDistribution { + position: relative; + display: flex; + justify-content: center; + align-items: center; + font-size: 30rpx; + color: #333; + font-weight: 500; +} + +.groupCenter .distributionCon .distribution .incomeCon { + margin-top: 30rpx; + display: flex; + justify-content: flex-start; +} + +.groupCenter .distributionCon .distribution .incomeCon .income { + width: 33.3%; + padding: 20rpx 0; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .distributionCon .distribution .incomeCon .income:last-child { + border: none; +} + +.groupCenter .distributionCon .distribution .incomeCon .income .incomeTop { + font-size: 36rpx; + color: #4facfe; + margin-bottom: 16rpx; + font-weight: 500; +} + +.groupCenter .distributionCon .distribution .incomeCon .income .incomeBottom { + font-size: 24rpx; + color: #999; +} + +.groupCenter .effectData { + width: 100%; + margin-top: 30rpx; +} + +.groupCenter .effectData .nav { + z-index: 10; + background: #fff; + height: 90rpx; + border-bottom: 0.1rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .effectData .nav .orderList_item { + font-size: 30rpx; + color: #333; + padding: 22rpx 0; + margin-bottom: 4rpx; +} + +.groupCenter .effectData .nav .on { + color: #4facfe; + border-bottom: 4rpx solid #4facfe; + margin: 0; +} + +.groupCenter .effectData .swiper-box { + width: 100%; + height: 140rpx; +} + +.groupCenter .effectData .swiper-box .item { + margin-bottom: 20rpx; + background: #fff; + overflow: hidden; +} + +.groupCenter .effectData .swiper-box .item:last-child { + margin: 0; +} + +.groupCenter .effectData .effect { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 0; + margin: 0 20rpx; +} + +.groupCenter .effectData .effect .myEffect { + position: relative; + display: flex; + justify-content: center; + align-items: center; + font-size: 30rpx; + color: #333; + font-weight: 500; +} + +.groupCenter .effectData .effect .incomeCon { + margin-top: 30rpx; + display: flex; + justify-content: flex-start; +} + +.groupCenter .effectData .effect .incomeCon .income { + width: 33.3%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .effectData .effect .incomeCon .income:last-child { + border: none; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeTop { + font-size: 36rpx; + color: #333; + margin-bottom: 16rpx; + font-weight: 500; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeBottom { + font-size: 24rpx; + color: #999; + display: flex; + justify-content: center; + align-items: center; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeBottom .distributionInstrIcon { + width: 28rpx; + height: 28rpx; + margin-right: 8rpx; +} + +.groupCenter .groupCenterCon { + margin-top: 30rpx; +} + +.groupCenter .groupCenterCon .order, .groupCenter .groupCenterCon .record { + border-radius: 10rpx; + background: #fff; + margin: 20rpx; +} + +.groupCenter .groupCenterCon .order .myOrders, +.groupCenter .groupCenterCon .record .myOrders { + height: 90rpx; + border-top-right-radius: 10rpx; + border-top-left-radius: 10rpx; + background: #fff; + border-bottom: 0.1rpx solid #e4e4e4; + padding: 0 30rpx; + font-size: 30rpx; + color: #333; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .groupCenterCon .order .myOrders .allGroupOrder, +.groupCenter .groupCenterCon .record .myOrders .allGroupOrder { + font-size: 26rpx; + color: #999; +} + +.groupCenter .groupCenterCon .order .myOrders .allGroupOrder .rightArrowImg, +.groupCenter .groupCenterCon .record .myOrders .allGroupOrder .rightArrowImg { + width: 12rpx; + height: 22rpx; + color: #a7a7a7; + margin-left: 14rpx; + margin-bottom: -2rpx; +} + +.groupCenter .groupCenterCon .order .orderTab, +.groupCenter .groupCenterCon .record .orderTab { + padding: 30rpx 52rpx; + background-color: #fff; + overflow: hidden; + border-radius: 10rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status, +.groupCenter .groupCenterCon .record .orderTab .order_status { + position: relative; + color: #58595b; + font-size: 26rpx; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .num, +.groupCenter .groupCenterCon .record .orderTab .order_status .num { + width: 34rpx; + height: 34rpx; + background: #fff; + font-size: 22rpx; + color: #4facfe; + + /* border: 2rpx solid #f1283b; */ + border-radius: 50%; + position: absolute; + right: 0; + top: -14rpx; + display: flex; + justify-content: center; + align-items: center; + border: 2rpx solid #4facfe; + z-index: 1; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .distributionIcon, +.groupCenter .groupCenterCon .record .orderTab .order_status .distributionIcon { + width: 60rpx; + height: 50rpx; + margin-bottom: 16rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .receiveIcon, +.groupCenter .groupCenterCon .record .orderTab .order_status .receiveIcon { + margin-bottom: 16rpx; + width: 54rpx; + height: 50rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .completeIcon, +.groupCenter .groupCenterCon .record .orderTab .order_status .completeIcon { + margin-bottom: 16rpx; + width: 50rpx; + height: 50rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .needPickIcon, +.groupCenter .groupCenterCon .record .orderTab .order_status .needPickIcon { + margin-bottom: 16rpx; + margin-left: 10rpx; + width: 58rpx; + height: 54rpx; +} + +.groupCenter .groupCenterCon .record { + margin-top: 20rpx; +} + +.groupCenter .groupCenterCon .record .recordList { + padding: 0 30rpx; + height: 100rpx; + line-height: 100rpx; + border-bottom: 0.1rpx solid #e4e4e4; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .groupCenterCon .record .recordList .recordListTit { + height: 100rpx; + font-size: 30rpx; + color: #333; +} + +.groupCenter .groupCenterCon .record .recordList .rightText { + color: #999; +} + +.groupCenter .groupCenterCon .record .recordList .rightArrowImg { + width: 12rpx; + height: 22rpx; + color: #a7a7a7; + margin-left: 30rpx; +} + +.groupCenter .groupCenterCon .record .borNone { + border: none; +} + +.groupCenter .groupCenterCon .distributionInstr { + margin: 40rpx 0 68rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.groupCenter .groupCenterCon .distributionInstr .disInstr { + width: 244rpx; + height: 76rpx; + background: #fff; + border-radius: 38rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.groupCenter .groupCenterCon .distributionInstr .disInstr .distributionInstrIcon { + width: 28rpx; + height: 28rpx; + margin-right: 8rpx; +} + +.hide-dialog { + height: 100%; + width: 100%; + bottom: 0; + left: 0; + z-index: 19; + background: rgba(0, 0, 0, 0.3); + position: fixed; +} + +.dialog-tips { + width: 520rpx; + height: 412rpx; + border-radius: 24rpx; + top: 0rpx; + left: 0rpx; + right: 0rpx; + bottom: 0rpx; + margin: auto; + position: absolute; + background: #fff; + z-index: 20; +} + +.dialog-tips .dialog-title { + padding: 30rpx 0; + font-size: 32rpx; + color: #333; + text-align: center; + font-weight: 500; +} + +.dialog-tips .dialog-content { + font-size: 28rpx; + padding: 0 50rpx; + color: #999; +} + +.dialog-tips .dialog-btn { + margin: 0 44rpx 0 44rpx; + bottom: 30rpx; + position: absolute; + text-align: center; + color: #fff; + background: #4facfe; + font-size: 32rpx; + height: 72rpx; + width: 432rpx; + line-height: 72rpx; + border-radius: 60rpx; +} + +.scan-code { + position: absolute; + width: 120rpx; + height: 100rpx; + padding: 10rpx 40rpx 0 0; + right: 0; + top: 0; + z-index: 1000; + text-align: right; +} + +.scan-code .icon-scan { + font-size: 70rpx; +} + +.shareGroup { + position: absolute; + right: 30rpx; + bottom: 8rpx; +} + +/* 推广码 */ +.coder-content { + position: relative; + height: 650rpx; + width: 630rpx; + background: #fff; + border-radius: 20rpx; + text-align: center; + font-family: PingFangSC-Medium; +} + +.coder-content .t1 { + font-size: 36rpx; + font-weight: 500; + color: #444; + line-height: 36rpx; + margin-bottom: 50rpx; + margin-top: 60rpx; +} + +.coder-content .t2 { + font-weight: 400; + margin-top: 28rpx; +} + +.coder-content .icon-wrap { + height: 60rpx; + width: 60rpx; + position: absolute; + right: 10rpx; + top: 10rpx; + display: flex; + align-items: center; + justify-content: center; +} + +.coder-content .icon-close { + height: 24rpx; + width: 24rpx; +} + +.coder-content .code-img .img { + width: 380rpx; + height: 380rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/list.js b/eaterplanet_ecommerce/moduleA/groupCenter/list.js new file mode 100644 index 0000000..7418eb6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/list.js @@ -0,0 +1,243 @@ +var page = 1; +var app= getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + needAuth: false, + isHideLoadMore: true, + loadText: '正在加载', + list: [], + queryData: { + createTime: null, + communityId: null, + page: page, + pageSize: 20 + }, + status: ['待配送', '配送中', '已送达团长'], + page: 1, + searchKey: "" + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.data.queryData.createTime = null; + this.getData(); + }, + + /** + * 获取数据 + */ + getData: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }); + + this.setData({ + isHideLoadMore: true + }) + + this.data.no_list = 1 + let that = this; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_head_deliverylist', + date: that.data.date, + searchKey: that.data.searchKey, + token: token, + page: that.data.page + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + console.log(that.data.page); + let rushList = that.data.list.concat(res.data.data); + that.setData({ + list: rushList, + hide_tip: true, + no_list: 0 + }); + wx.hideLoading(); + } else { + that.setData({ + isHideLoadMore: true + }) + wx.hideLoading(); + return false; + } + } + }) + }, + + /** + * 监控输入框 + */ + bindSearchChange: function (e) { + this.setData({ + searchKey: e.detail.value + }); + }, + + /** + * 搜索 + */ + searchByKey: function () { + page = 1; + this.setData({ + list: [], + no_list: 0, + page: 1 + }); + this.data.queryData.memberNickName = this.data.searchKey; + this.getData(); + }, + + /** + * 取消 + */ + cancel: function () { + page = 1; + this.setData({ + searchKey: "", + list: [] + }); + this.data.queryData.memberNickName = null; + this.getData(); + }, + + /** + * 监控日期 + */ + bindDateChange: function (e) { + page = 1; + this.setData({ + date: e.detail.value, + list: [], + no_list: 0, + page: 1 + }); + this.data.queryData.createTime = new Date(e.detail.value).getTime() - 28800000; + this.getData(); + }, + + /** + * 清除日期 + */ + clearDate: function () { + page = 1; + this.setData({ + date: "", + list: [], + no_list: 0, + page: 1 + }); + this.data.queryData.createTime = null; + this.getData(); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 拨打电话 + */ + callTelphone: function (e) { + var that = this; + var phoneNumber = e.currentTarget.dataset.phone; + if (phoneNumber != "未下单") { + this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({ + phoneNumber: phoneNumber, + complete: function () { + that.data.isCalling = false; + } + })); + } + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + // todo + }, + + /** + * 跳转详情 + */ + goDetails: function (e) { + let state = e.currentTarget.dataset.state; + let list_id = e.currentTarget.dataset.id; + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/listDetails?id=' + list_id + '&state=' + state, + }) + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_list == 1) return false; + this.data.page += 1; + this.getData(); + + this.setData({ + isHideLoadMore: false + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/list.json b/eaterplanet_ecommerce/moduleA/groupCenter/list.json new file mode 100644 index 0000000..a464bdf --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/list.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "配送单", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/list.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/list.wxml new file mode 100644 index 0000000..ee49cd2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/list.wxml @@ -0,0 +1,72 @@ + + + + + + + 您还没有相关的清单~ + + + + + 配送单:{{item.list_sn}} + + + + + + 配送员 + {{item.clerk_name}} 联系配送员 + + + 配送状态 + + {{status[item.state]}} + + + + 商品数量 + + {{item.goods_count}} + + + + 开始配送时间 + + {{item.express_time}} + + + + 团长取货时间 + + {{item.head_get_time}} + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/list.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/list.wxss new file mode 100644 index 0000000..f36e653 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/list.wxss @@ -0,0 +1,171 @@ +.search { + background: #fff; + padding: 20rpx 30rpx; + display: flex; + justify-content: flex-start; + align-items: center; + position: relative; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; +} + +.search .icon-search { + position: absolute; +} + +.search .icon-search { + left: 54rpx; +} + +.search input { + padding-left: 68rpx; + width: 520rpx; + height: 56rpx; + background: #f8f8f8; + border-radius: 28rpx; + color: #999; + box-sizing: border-box; + line-height: 40rpx; +} + +.search text { + color: #4facfe; + margin-left: 28rpx; +} + +.date { + padding: 0 30rpx; + background: #fff; + height: 90rpx; + line-height: 90rpx; + font-size: 28rpx; + font-family: PingFangSC-Regular; + font-weight: 400; + color: #9b9b9b; +} + +.date .date-value { + margin-left: 12rpx; + color: #4facfe; +} + +.date .icon-date { + height: 36rpx; + width: 36rpx; + float: right; + margin: 6rpx 0 0 0; +} + +.date .icon-date image { + height: 36rpx; + width: 36rpx; +} + +.date .icon-clear { + height: 32rpx; + float: right; + color: #4facfe; + margin: 0 28rpx 0 0; + font-size: 24rpx; +} + +.list-box { + padding: 20rpx 20rpx 30rpx; +} + +.list-info { + margin-bottom: 20rpx; +} + +.i-card { + width: 710rpx; + border-radius: 20rpx; + background: #fff; + box-shadow: 0 0 40rpx 0 rgba(0, 0, 0, 0.05); + display: flex; + flex-direction: column; + overflow: hidden; + margin-bottom: 20rpx; +} + +.header { + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + font-weight: 500; + display: flex; + align-items: center; + justify-content: space-between; +} + +.header .rightArrowImg { + width: 12rpx; + height: 22rpx; + color: #a7a7a7; + margin-left: 30rpx; +} + +.content-wrap { + border-top: 0.1rpx solid #efefef; + padding-bottom: 20rpx; +} + +.content-wrap .item { + display: flex; + justify-content: space-between; + font-size: 24rpx; + padding: 16rpx 30rpx; + padding-bottom: 0; +} + +.content-wrap .item .title { + color: #aaa; +} + +.content-wrap .item .detail { + color: #444; +} + +.noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.item-phone { + display: inline-block; + padding: 5rpx 16rpx; + border: 2rpx solid #4facfe; + border-radius: 22rpx; + margin-left: 10rpx; + color: #4facfe; +} + +.icon-phone { + width: 18rpx; + height: 22rpx; + margin-right: 2px; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.js b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.js new file mode 100644 index 0000000..cce319c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.js @@ -0,0 +1,150 @@ +var app =getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIpx: app.globalData.isIpx, + list: [], + state: 0, + loadText: "加载中...", + noData: 0, + loadMore: true + }, + list_id: '', + page: 1, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let list_id = options.id || ''; + let state = options.state || 0; + if (list_id) { + this.setData({ state }); + wx.showLoading(); + this.list_id = list_id; + this.getData(); + } else { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/list', + }) + } + }, + + getData: function () { + let that = this; + let list_id = this.list_id; + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'community.get_head_deliverygoods', + token, + list_id, + page: this.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else { + // 无数据 + if (that.page == 1) that.setData({ + noData: 1 + }) + that.setData({ + loadMore: false, + noMore: false, + loadText: "没有更多记录了~" + }) + } + }, + fail: (err)=> { + console.log(err); + wx.hideLoading(); + } + }) + }, + + signAll: function () { + let that = this; + let token = wx.getStorageSync('token'); + let list_id = this.list_id; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.sub_head_delivery', + token: token, + list_id: list_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + console.log(res); + if (res.data.code == 0) { + wx.showToast({ + title: '收货成功', + icon: false + }) + setTimeout(()=>{ + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/list', + }) + }, 2000); + } else { + wx.showToast({ + title: '签收失败,请重试!', + icon: false + }) + } + }, + fail: (err) => { + console.log(err); + wx.hideLoading(); + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.json b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.json new file mode 100644 index 0000000..18b60e8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.json @@ -0,0 +1,8 @@ +{ + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { +"ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxml new file mode 100644 index 0000000..e97a749 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxml @@ -0,0 +1,30 @@ + + + + + + + + {{item.goods_name}} + + + 商品数量:{{item.goods_count}} + 规格:{{item.sku_str}} + + + + + + +暂无记录~ + + + + + 待配送 + 已送达 + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxss new file mode 100644 index 0000000..7115a59 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/listDetails.wxss @@ -0,0 +1,93 @@ +.list-box { + padding-bottom: 100rpx; +} + +.bottom-bar { + width: 100%; + height: 104rpx; + display: flex; + justify-content: flex-end; + align-items: center; + background: #fff; + position: fixed; + bottom: 0; + left: 0; + z-index: 9; +} + +.flex { + display:flex; +} + +.bottom-bar .btn { + flex: 1; + padding: 0 40rpx; + height: 80rpx; + border-radius: 80rpx; + line-height: 80rpx; + text-align: center; + color: #fff; + font-size: 30rpx; + margin-right: 20rpx; + background: #f75451; + white-space: nowrap; +} + +.bottom-bar .btn.btn-disabled { + background: #e3e3e3; +} + +.item { + background: #fff; + overflow: hidden; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx; +} + +.spu { + padding: 30rpx; + display: flex; + justify-content: flex-start; + align-content: center; +} + +.spu .goodsImg { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; +} + +.spu .goodsImg .img-class { + width: 120rpx; + height: 120rpx; +} + +.spu .detail { + width: 0; + margin-left: 20rpx; + font-size: 24rpx; + color: #aaa; +} + +.spu .detail .spuName { + color: #444; + font-size: 28rpx; + font-weight: 500; + overflow: hidden; +} + +.spu .detail .tips { + line-height: 1; + margin-top: 16rpx; + position: relative; +} + +.spu .detail .tips .last { + float: right; +} + +.spu .detail .tips .price { + color: #ff5344; + font-size: 32rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/memberList.js b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.js new file mode 100644 index 0000000..2d135d4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.js @@ -0,0 +1,82 @@ +Page({ + + /** + * 页面的初始数据 + */ + data: { + isHideLoadMore: false, + loadText: '正在加载' + }, +handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/memberList.json b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.json new file mode 100644 index 0000000..ef08823 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.json @@ -0,0 +1,10 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "查看会员", + "navigationBarTextStyle": "black", + "usingComponents": { +"ep-navBar": "../../components/navigation-bar", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxml new file mode 100644 index 0000000..38f17e2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxml @@ -0,0 +1,20 @@ + + + + + + + + 贺佳. + 最近成交:2018-12-06 + + + 付款订单数:5 + 消费总金额:¥63.30 + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxss new file mode 100644 index 0000000..18ad386 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/memberList.wxss @@ -0,0 +1,91 @@ +.member-list { + background-color: #fff; + margin-top: 20rpx; +} + +.member-list .list-item { + font-size: 24rpx; + display: flex; + padding: 24rpx; + min-height: 130rpx; + position: relative; + align-items: center; + justify-content: space-between; +} + +.member-list .list-item:after { + content: ''; + position: absolute; + left: 0.16rem; + right: 0.16rem; + top: auto; + bottom: 0; + background-color: #e9e9e9; + height: 0.02667rem; + transform: scaleY(0.5); +} + +image { + width: 100%; + height: 80rpx; +} + +.member-list .list-item .list-item-img { + width: 80rpx; + height: 80rpx; + flex-shrink: 0; + border-radius: 100%; + margin-right: 16rpx; + overflow: hidden; +} + +.member-list .list-item .list-item-mes { + width: 100%; + flex-shrink: 1; + overflow: hidden; +} + +.flex-items { + display: flex; +} + +.member-list .list-item .list-item-name { + color: #747474; + height: 40rpx; + line-height: 40rpx; + margin-bottom: 8rpx; + justify-content: space-between; +} + +.member-list .list-item .list-item-name .name { + font-size: 26rpx; + color: #212121; + width: 100%; + flex-shrink: 1; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.member-list .list-item .list-item-mes .text-right { + flex-shrink: 0; + text-align: right; +} + +.member-list .list-item .list-item-submes { + height: 32rpx; + line-height: 32rpx; + color: #424242; + justify-content: space-between; +} + +.member-list .list-item .icon-right { + flex-shrink: 0; + color: #bdbdbd; + margin-left: 24rpx; +} + +.member-list .list-item .icon-right image { + width: 12rpx; + height: 22rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.js b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.js new file mode 100644 index 0000000..83c58c3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.js @@ -0,0 +1,379 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var memberId = ""; +Page({ + + /** + * 页面的初始数据 + */ + data: { + checkedAll: true, + checkedCount: 0, + is_check_all: false, + needAuth: false, + memberId: 0, + order: [], + param: [], + isIpx: false + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + app.globalData.isIpx && this.setData({ + isIpx: true + }); + if (options.scene != undefined) { + var scene = decodeURIComponent(options.scene); + if (scene != 'undefined') { + options.memberId = scene; + } + } + + memberId = options.memberId; + this.setData({ + memberId: memberId + }) + + if (!util.check_login()) { + this.setData({ + needAuth: true + }) + } else { + console.log('peding login in '); + this.getData(); + } + + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + this.setData({ + needAuth: false + }) + this.getData(); + }, + + /** + * 获取数据 + */ + getData: function() { + wx.showLoading({ + title: "加载中...", + mask: true + }); + var that = this; + var token = wx.getStorageSync('token'); + + //currentTab + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_member_ziti_order', + memberId: that.data.memberId, + token: token + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let rushList = that.data.order.concat(res.data.data); + var order = rushList.filter(function (item) { + return item.delivery != 'express'; + }); + if (order.length>0){ + that.setData({ + order: order, + checkedCount: order.length, + checkedAll: true, + is_check_all: true + }); + } + } else if (res.data.code == 1) { + that.setData({ + order: [] + }); + } else if (res.data.code == 2) { + // no login + } + wx.hideLoading(); + } + }) + // 成功 + + }, + + /** + * 状态改变 + */ + transformOrderStatus: function(e) { + switch (Number(e)) { + case 1: + return "待提货"; + case 4: + return "待配送"; + default: + return ""; + } + }, + + /** + * 勾选 + */ + checkboxChange: function(e) { + var t = e.currentTarget.dataset.type, + o = e.currentTarget.dataset.index, + n = this.data.order, + a = [], + i = e.detail.value, + r = this.data.checkedAll, + s = false, + c = 0; + var is_check_all = this.data.is_check_all; + + + if ("all" === t) { + if (is_check_all) { + n.forEach(function(e) { + e.checked = 0; + }) + } else { + n.forEach(function(e) { + e.checked = 1; + }) + } + this.setData({ + checkedCount: n.length, + order: n, + is_check_all: !is_check_all, + checkedAll: !is_check_all + }) + } else if ("order" === t) { + n.forEach(function(e, t) { + // e.checked = 0; + + if (o == t) { + if (e.checked) { + e.checked = 0 + } else { + e.checked = 1 + } + } + }) + + var ck = 0; + n.forEach(function(e) { + if (e.checked) { + ck++; + } + }) + + this.setData({ + checkedCount: ck, + order: n, + is_check_all: ck == n.length ? true : false, + checkedAll: ck == n.length ? true : false + }) + } + + }, + + /** + * 商品提货确认 + */ + sign: function(e) { + var t = this; + var orderno = e.target.dataset.orderno, + orderskuid = e.target.dataset.orderskuid; + wx.showModal({ + title: "商品提货确认", + content: "请确认买家已收到货,再进行提货确认哦!", + confirmText: "确定", + confirmColor: "#FF673F", + success: function(e) { + if (e.confirm) { + wx.showLoading({ + title: "加载中...", + mask: true + }); + var data = { + orderNo: orderno, + orderSkuId: orderskuid + } + // 发送请求 + //成功 + t.getData(); + wx.showToast({ + title: "商品提货成功", + icon: "none" + }); + } else { + wx.hideLoading(); + } + } + }); + }, + + /** + * 订单提货确认 + */ + signOrder: function(e) { + var t = this; + wx.showLoading({ + title: "加载中...", + mask: true + }); + var that = this; + var orderid = e.target.dataset.orderid; + wx.showModal({ + title: "订单提货确认", + content: "请确认买家已收改订单的所有商品,再进行提货确认哦!", + confirmText: "确定", + confirmColor: "#FF673F", + success: function(e) { + if (e.confirm) { + wx.hideLoading(); + let data = { + orderId: orderid + } + // 发送请求 + // 成功 + that.getData(); + wx.showToast({ + title: "订单提货成功", + icon: "none" + }); + } else { + wx.hideLoading(); + } + } + }); + }, + + /** + * 批量订单提货确认 + */ + signAll: function() { + var that = this; + var n = this.data.order; + + var sub_order_arr = []; + let is_cashon_delivery = false; + + n.forEach(function(e) { + if (e.checked) { + sub_order_arr.push(e.order_id) + } + if(e.payment_code=="cashon_delivery") { + is_cashon_delivery = true; + } + }) + + if (sub_order_arr.length <= 0) { + wx.showToast({ + title: '请选择签收商品', + }) + return false; + } + + var token = wx.getStorageSync('token'); + wx.showModal({ + title: "订单提货确认", + content: is_cashon_delivery?"所选商品含货到付款,请再次确认是否已收款":"请确认买家已收选中的商品,再进行提货确认哦!", + confirmText: "确定", + confirmColor: "#FF673F", + success: function(t) { + if (t.confirm) { + wx.showLoading({ + title: "加载中...", + mask: true + }); + + // 请求成功 + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'order.receive_order_list', + order_data: sub_order_arr, + token: token + }, + method: 'post', + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + that.setData({ + order: [] + }) + that.getData(); + + console.log('iniinin'); + wx.showToast({ + title: "订单提货成功", + icon: "none" + }); + } else { + wx.showToast({ + title: "订单提货失败", + icon: "none" + }); + } + } + }) + } + } + }); + }, + + /** + * 复制信息 + */ + copyGoodsMsg: function() { + if (0 !== this.data.checkedCount) { + var info = ""; + this.data.list.forEach(function(items) { + items.skuRspS.forEach(function(item) { + item.checked && (info += ",【" + item.skuName + "】" + item.spec + "*" + item.skuNum); + }); + }), + wx.setClipboardData({ + data: info.substring(1), + success: function() { + wx.showToast({ + title: "复制成功", + icon: "none" + }); + }, + fail: function(error) { + wx.showToast({ + title: "复制失败,请重试", + icon: "none" + }), console.log(error); + } + }); + } else { + wx.showToast({ + title: "请选择商品", + icon: "none" + }); + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.json b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.json new file mode 100644 index 0000000..fa8c405 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.json @@ -0,0 +1,12 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "用户待核销订单", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "component-img": "../../components/image/index", + "i-aside-btn": "../../components/asideBtn/index", + "i-cashon_delivery": "../../components/cashon_delivery/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxml new file mode 100644 index 0000000..04b6392 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxml @@ -0,0 +1,98 @@ + + + + + + + + + + + 订单编号:{{item.order_num_alias}} + + 提货人:{{item.shipping_name}}手机号:{{item.shipping_tel}} + {{item.createTime}} + + + {{item.status_name}} + + + + + + + + + + {{skuItem.name}} + 货到付款 + {{skuItem.option_str}}; 共{{skuItem.quantity}}件 + + + + 已签 + + + + + 已退款 + + 退款金额:¥{{skuItem.refund_info.ref_money}} + {{skuItem.refund_info.real_refund_quantity}}个 申请中 + {{skuItem.refund_info.real_refund_quantity}}个 退款成功 + {{skuItem.refund_info.real_refund_quantity}}个 退款失败 + + + + + + + + 暂无数据 + + + + + + + 合计: + {{checkedCount}}条 + + + + 确认签收 + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxss new file mode 100644 index 0000000..c7af764 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/pendingDeliveryOrders.wxss @@ -0,0 +1,210 @@ +.container { + padding-bottom: 120rpx; +} + +.container.pb80 { + padding-bottom: 160rpx; +} + +.no-list { + text-align: center; + width: 100%; + height: 100rpx; + line-height: 100rpx; + background: #fff; +} + +.check-box { + box-sizing: border-box; + width: 50rpx; + height: 50rpx; + display: flex; + justify-content: center; +} + +.check-box .checkbox-checked { + width: 48rpx; + height: 48rpx; +} + +.check-box .checkbox-disabled { + width: 48rpx; + height: 48rpx; + margin-top: 2rpx; +} + +.check-box-content { + width: 84rpx; + height: 100%; + display: flex; + justify-content: center; + align-items: center; +} + +.order-item { + margin-top: 20rpx; +} + +.order-item .order-title { + display: flex; + align-items: center; + background: #fff; + margin-bottom: 2rpx; + /* height: 145rpx; */ +} + +.order-item .order-title .order-msg { + width: 550rpx; + /* height: 145rpx; */ + display: flex; + flex-direction: column; + justify-content: center; +} + +.order-item .order-title .order-msg span { + font-size: 26rpx; + margin-bottom: 12rpx; +} + +.order-item .order-title .order-msg em { + color: #666; +} + +.order-item .order-title .order-status { + color: #4facfe; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; +} + +.order-item .order-title .order-sign-btn { + width: 160rpx; + height: 60rpx; + border-radius: 60rpx; + background: #4facfe; + color: #fff; + display: block; + text-align: center; + line-height: 60rpx; + font-size: 26rpx; +} + +.order-item .goods-item { + display: flex; + align-items: center; + background: #fff; + height: 188rpx; + position: relative; +} + +.order-item .goods-item .goods-img { + width: 120rpx; + height: 120rpx; + margin-right: 30rpx; +} + +.order-item .goods-item .goods-detail { + width: 492rpx; + height: 100%; + display: flex; + justify-content: center; + flex-direction: column; +} + +.order-item .goods-item .goods-detail .goods-title { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: initial; + white-space: normal; + font-size: 28rpx; + /* height: 80rpx; */ + margin-bottom: 12rpx; +} + +.order-item .goods-item .goods-detail .goods-desc { + color: #999; + font-size: 26rpx; + width: 360rpx; +} + +.order-item .goods-item .goods-sign-btn { + height: 52rpx; + padding: 0 24rpx; + border: 2rpx solid #4facfe; + border-radius: 52rpx; + text-align: center; + line-height: 52rpx; + color: #4facfe; + position: absolute; + right: 24rpx; + bottom: 20rpx; +} + +.order-item .goods-item .goods-sign-btn.goods-sign-btn-disabled { + border-color: #ccc; + color: #ccc; +} + +.bottom-bar { + width: 100%; + height: 104rpx; + display: flex; + justify-content: space-between; + align-items: center; + background: #fff; + position: fixed; + bottom: 0; + left: 0; + z-index: 9; +} + +.bottom-bar .check-box-content { + width: 140rpx; +} + +.bottom-bar .check-box-content .check-box { + margin-right: 20rpx; +} + +.bottom-bar .flex { + display: flex; + align-items: center; + justify-content: flex-end; +} + +.bottom-bar .total { + margin-right: 20rpx; + text-align: right; +} + +.bottom-bar .total span { + color: #4facfe; +} + +.bottom-bar .btn { + flex: 3; + padding: 0 40rpx; + height: 80rpx; + border-radius: 80rpx; + line-height: 80rpx; + text-align: center; + color: #fff; + font-size: 30rpx; + margin-right: 20rpx; + background: #4facfe; + white-space: nowrap; +} + +.bottom-bar .btn.btn-disabled { + flex: 1; + padding: 0 40rpx; + background: #e3e3e3; +} + +.tips .tag { + font-size: 20rpx; + padding: 4rpx 8rpx; + border-radius: 5rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/ranking.js b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.js new file mode 100644 index 0000000..89c0a80 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.js @@ -0,0 +1,80 @@ +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + type: 1, // 1:今日,2:昨日,3:上周,4:上月 + list: [] + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + wx.setNavigationBarTitle({ + title: `${owner_name}排行`, + }) + that.setData({ groupInfo }) + }); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData(); + }, + + getData: function () { + let token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.ProReq('community.community_ranking_list', { token, type: this.data.type }).then(res => { + wx.hideLoading(); + if(res.is_show_community_ranking!=1) { + return app.util.message('访问页面不存在或已关闭', 'redirect:/eaterplanet_ecommerce/moduleA/groupCenter/index', 'error'); + } + this.setData({ + list: res.data + }) + }) + }, + + changeType: function(e) { + let type = e.currentTarget.dataset.type || 1; + this.setData({ + type + }, ()=>{ + this.getData(); + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/ranking.json b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.json new file mode 100644 index 0000000..75754a7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "团长排行", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxml new file mode 100644 index 0000000..5a2a7ac --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxml @@ -0,0 +1,37 @@ + + + + + + 今日 + 昨日 + 上周 + 上月 + + + + + 排名 + 社区信息 + 订单数 + 收入金额 + + + + + + + {{index<9?'0':''}}{{index+1}} + + + + {{item.community_name}} + + {{item.order_count}} + ¥ {{item.money}} + + + + + 暂无记录~ + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxss new file mode 100644 index 0000000..b0549b4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/ranking.wxss @@ -0,0 +1,83 @@ +page { + background: #FF7256; +} + +.nav { + position: relative; + margin: -88rpx 36rpx 0; + text-align: center; + border: 2rpx solid #FA853E; + border-radius: 5rpx; + overflow: hidden; +} + +.nav .item { + line-height: 66rpx; + background-color: #ffffff; + color: #FA853E; + border-left: 2rpx solid #FA853E; +} + +.nav .item:first-child { + border: 0; +} + +.nav .item.active { + background: linear-gradient(0deg, #FD6F3D 0%, #FE8E4A 100%); + color: #ffffff; +} + +.list { + margin: 20rpx 20rpx 80rpx; + border-radius: 20rpx; +} + +.th { + font-weight: 400; + color: #4D4D4D; + font-size: 30rpx; +} + +.th .item { + padding: 30rpx 0; +} + +.td { + padding: 25rpx 0; +} + +.num { + font-size: 32rpx; + color: #AFB9D7; + font-weight: bold; +} + +.icon { + width:58rpx; + height:58rpx; +} + +.avatar { + width:72rpx; + height:72rpx; + border-radius: 50%; + margin-right: 10rpx; +} + +.name { + color: #333333; + font-size: 30rpx; +} + +.order { + font-size: 32rpx; + font-weight: bold; + color: #FFB847; +} + +.empty { + font-size: 28rpx; + font-weight: bold; + line-height: 300rpx; + color: #666666; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recommend.js b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.js new file mode 100644 index 0000000..c3b72e3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.js @@ -0,0 +1,79 @@ +var util = require('../../utils/util.js'); +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + qrcode: '' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + if (!util.check_login()) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + wx.showLoading(); + }, + + getData(){ + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_community_zhitui_qrcode', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + that.setData({ qrcode: res.data.qrcode }) + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + }, + + preImg: function (event) { + var goodShareImg = this.data.qrcode; + //图片预览 + wx.previewImage({ + current: goodShareImg, // 当前显示图片的http链接 + urls: [goodShareImg] // 需要预览的图片http链接列表 + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recommend.json b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.json new file mode 100644 index 0000000..8cafc3a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.json @@ -0,0 +1,7 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "推荐二维码", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxml new file mode 100644 index 0000000..c16f3b8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxml @@ -0,0 +1,5 @@ + + + + 点击二维码图片预览,长按保存图片,发送至群。 + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxss new file mode 100644 index 0000000..24b1708 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recommend.wxss @@ -0,0 +1,10 @@ +.content { + background-color: #fff; + padding: 50rpx 30rpx; + text-align: center; +} + +.img image { + width: 300rpx; + height: 300rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recruit.js b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.js new file mode 100644 index 0000000..fdfff65 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.js @@ -0,0 +1,91 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + onLoad: function (options) { + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { + wx.setNavigationBarTitle({ + title: groupInfo.owner_name || '团长', + }) + }); + + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'community.get_apply_page' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let article = res.data.data || ''; + that.setData({ article }) + } + } + }) + }, + + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + that.setData({ needAuth: !res }); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + authSuccess: function () { + this.setData({ + needAuth: false, + showAuthModal: false + }) + }, + + goLink: function (event) { + if (!this.authModal()) return; + let url = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recruit.json b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.json new file mode 100644 index 0000000..f75bcd9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "团长", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-aside-btn": "../../components/asideBtn/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxml new file mode 100644 index 0000000..c19562d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxml @@ -0,0 +1,14 @@ + + + + + + + + 点击申请 + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxss new file mode 100644 index 0000000..7cec1ee --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/recruit.wxss @@ -0,0 +1,20 @@ +.section { + background: #fff; + margin-bottom: 20rpx; + padding: 0 0rpx 20rpx; +} + +.section .apply-btn { + width: 710rpx; + height: 96rpx; + background: #4facfe; + border-radius: 20rpx; + color: #fff; + font-size: 30rpx; + line-height: 96rpx; + text-align: center; + display: block; + margin: 16rpx auto 16rpx; +} + +/* share-modal end */ diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/setting.js b/eaterplanet_ecommerce/moduleA/groupCenter/setting.js new file mode 100644 index 0000000..72aa75b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/setting.js @@ -0,0 +1,362 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +import WxValidate from '../../utils/WxValidate.js'; +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + showEditAvatar: false, + showEditUserInfo: false, + showEditFinance: false, + currentFocus: '', + rest: 0, // 1休息 0营业 + headInfo: '', + btnLoading: false, + tuanItems: [ + { name: 0, value: '跟随系统' }, + { name: 1, value: '开启' }, + { name: 2, value: '关闭' } + ], + tuanType: ['跟随系统','开启','关闭'], + fareItems: [ + { name: 0, value: '跟随系统' }, + { name: 1, value: '自定义' } + ], + groupInfo: { + group_name: '社区', + owner_name: '团长' + }, + image_o: '' + }, + is_modify_shipping_method: 0, + is_modify_shipping_fare: 0, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let that = this; + status.setGroupInfo().then((groupInfo) => { + let owner_name = groupInfo && groupInfo.owner_name || '团长'; + wx.setNavigationBarTitle({ + title: `${owner_name}中心`, + }) + that.setData({ groupInfo }) + }); + + let id = options && (options.id || 0); + if (!util.check_login()) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + if (!id) wx.switchTab({ url: '/eaterplanet_ecommerce/pages/user/me' }); + this.initValidate(); //验证规则函数 + this.getData(id); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + radioChange(e) { + console.log(e) + let name = e.currentTarget.dataset.name; + if (name =='method'){ + this.is_modify_shipping_method = e.detail.value; + } else if (name == 'fare'){ + this.is_modify_shipping_fare = e.detail.value; + let showFare = false; + if(e.detail.value == 1) showFare = true; + this.setData({ showFare }) + } + }, + + //资料验证函数 + initValidate() { + const rules = { + head_name: { + required: true, + minlength: 1 + }, + head_mobile: { + required: true, + tel: true + } + } + const messages = { + head_name: { + required: '请填写团长名称', + minlength: '请输入正确的团长名称' + }, + head_mobile: { + required: '请填写手机号', + tel: '请填写正确的手机号' + } + } + this.WxValidate = new WxValidate(rules, messages) + }, + + /** + * 获取数据 + */ + getData: function(id){ + let token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.get_head_info', + id, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let headInfo = res.data.data; + let showFare = headInfo.is_modify_shipping_fare == 1 ? true : false; + that.setData({ + headInfo: headInfo, + rest: res.data.data.rest, + showFare + }) + that.is_modify_shipping_method = headInfo.is_modify_shipping_method || 0; + that.is_modify_shipping_fare = headInfo.is_modify_shipping_fare || 0; + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + }, + + /** + * 显示头像修改窗口 + */ + showEdit: function (t) { + let type = t.currentTarget.dataset.type; + if (type == 'avatar') { + this.setData({ + showEditAvatar: true + }) + } else if (type == 'info') { + this.setData({ + showEditUserInfo: true + }) + } else if (type == 'finance') { + this.setData({ + showEditFinance: true + }) + } + }, + + /** + * 隐藏头像修改窗口 + */ + hideEdit: function () { + this.setData({ + showEditAvatar: false, + showEditUserInfo: false, + showEditFinance: false + }) + }, + + /** + * 输入框获得焦点 + */ + iptFocus: function (t) { + let name = t.currentTarget.dataset.name; + this.setData({ + currentFocus: name + }) + }, + + /** + * 输入框失去焦点 + */ + iptBlur: function () { + this.setData({ + currentFocus: '' + }) + }, + + /** + * 状态切换 + */ + switchChange(e) { + let rest = e.detail.value ? 0 : 1 ; + let headInfo = this.data.headInfo; + let id = headInfo && (headInfo.id || 0); + let token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.set_head_rest', + id, + token, + rest + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + that.setData({ + rest: rest + }) + } else if (res.data.code == 1) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } else { + that.setData({ + rest: !rest + }) + wx.showToast({ + title: '修改失败', + }) + } + } + }) + }, + + //报错 + showModal(error) { + wx.showModal({ + content: error.msg, + showCancel: false, + }) + }, + + /** + * 资料修改表单提交 + */ + infoFormSubmit(e) { + this.setData({ btnLoading: true }) + const params = e.detail.value + //校验表单 + if (!this.WxValidate.checkForm(params)) { + const error = this.WxValidate.errorList[0]; + this.showModal(error); + this.setData({ btnLoading: false }) + return false; + } + let is_modify_shipping_method = this.is_modify_shipping_method; + let is_modify_shipping_fare = this.is_modify_shipping_fare; + let data = Object.assign({}, params, { is_modify_shipping_method, is_modify_shipping_fare }); + if (is_modify_shipping_fare==1) { + if (params.shipping_fare*1<=0) { + wx.showToast({ + title: '请输入配送费', + icon: 'none' + }) + this.setData({ btnLoading: false }) + return; + } + } + this.modifyHeadInfo(data); + }, + + /** + * 资料修改 + */ + modifyHeadInfo(params) { + let token = wx.getStorageSync('token'); + let headInfo = this.data.headInfo; + let id = headInfo.id; + let that = this; + let share_wxcode = this.data.image_o; + if (share_wxcode) params.share_wxcode = share_wxcode; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'community.modify_head_info', + id, + token, + ...params + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let share_wxcode_old = headInfo.share_wxcode; + headInfo = Object.assign({}, headInfo, params); + headInfo.share_wxcode = share_wxcode_old; + that.setData({ + headInfo + }) + that.showModal({ + msg: '修改成功' + }) + } else if (res.data.code == 1) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } else { + that.showModal({ + msg: '修改失败' + }) + } + that.hideEdit(); + that.setData({ btnLoading: false }) + } + }) + }, + + choseImg: function () { + var self = this; + wx.chooseMedia({ + count: 1, // 默认9 + sizeType: ['original', 'compressed'], + sourceType: ['album', 'camera'], + success: function (res) { + const tempFiles = res.tempFiles; + wx.showLoading({ + title: '上传中', + }) + wx.uploadFile({ + url: app.util.url('entry/wxapp/index', { 'm': 'eaterplanet_ecommerce', 'controller': 'goods.doPageUpload' }), + filePath: tempFiles[0].tempFilePath, + name: 'upfile', + formData: { + 'name': tempFiles[0].tempFilePath + }, + header: { + 'content-type': 'multipart/form-data' + }, + success: function (res) { + wx.hideLoading(); + var data = JSON.parse(res.data); + var image_o = data.image_o; + self.setData({ + 'headInfo.share_wxcode': image_o, + image_o: image_o + }) + } + }) + } + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/setting.json b/eaterplanet_ecommerce/moduleA/groupCenter/setting.json new file mode 100644 index 0000000..e562a81 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/setting.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "", + "navigationBarBackgroundColor": "#4facfe", + "usingComponents": { +"ep-navBar": "../../components/navigation-bar", + "i-modal": "../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxml new file mode 100644 index 0000000..4ea81f6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxml @@ -0,0 +1,141 @@ + + + + + + + ID: {{headInfo.re_id}} + + {{rest==1?"休息中":"营业中"}} + + + + + + + 个人资料编辑 + + + + 关联会员 + {{headInfo.member_info.username}} + + + + {{groupInfo.owner_name}}名称 + {{headInfo.head_name}} + + + + 手机号 + {{headInfo.head_mobile}} + + + + {{groupInfo.group_name}}名称 + {{headInfo.community_name}} + + + + + 自定义配送开关 + {{tuanType[headInfo.is_modify_shipping_method]}} + + + + 自定义配送费 + {{headInfo.is_modify_shipping_fare==0?'跟随系统':headInfo.shipping_fare}} + + + 群分享二维码 + + + + + + + + + + + + 修改头像 + + + 上传头像 + + 取消 + + + + + + + +
+ + 修改个人资料 + + + + + {{groupInfo.owner_name}}名称 + + + + + + + 手机号 + + + + + + + + 自定义配送开关 + + + + + + + + 自定义配送费 + + + + + + + + + 配送费(元) + + + + + + + + + 群分享二维码(点击修改) + + + + + + + + + + +
+
+
+ diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxss new file mode 100644 index 0000000..37887cb --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/setting.wxss @@ -0,0 +1,252 @@ +.gcs-box { + padding-bottom: 100rpx; +} + +.top-bg { + position: absolute; + top: 0; + left: 0; + right: 0; + height: 500rpx; + background: linear-gradient(35deg,#f6f6f6 200rpx,#4facfe 0); +} + +.avatar-box { + position: relative; + margin-top: 50rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; +} + +.avatar-box image { + width: 110rpx; + height: 110rpx; + border-radius: 50%; +} + +.avatar-edit { + color: #fff; + border: 1rpx solid #fff; + font-size: 24rpx; + border-radius: 6rpx; + padding: 5rpx 22rpx; + margin-top: 30rpx; +} + +.user-id { + color: #fff; + font-size: 28rpx; + margin-top: 30rpx; +} + +.gcs-box .card { + position: relative; + background: #fff; + border-radius: 20rpx; + padding: 60rpx 0 60rpx 36rpx; + margin: 30rpx 36rpx 0; + box-shadow: 0 0 40rpx rgba(0,0,0,0.1); +} + +.gcs-info.card { + margin-top: 70rpx; +} + +.card-header { + display: flex; + padding: 20rpx 0; +} + +.card-header .title { + flex: 1; + color: #000; + font-size: 32rpx; + font-weight: bold; +} + +.card-edit { + margin-right: 36rpx; + color: #666; +} + +.bot-line { + width: 100%; + height: 1rpx; + border-bottom: 1rpx solid #f5f5f5; + transition: 200ms all ease-in-out; +} + +.bot-line.focus { + border-bottom: 2rpx solid #4facfe; +} + +.info-item { + margin-top: 32rpx; + margin-bottom: 20rpx; +} + +.info-item .item-title { + font-size: 24rpx; + color: #7593b4; + margin-bottom: 15rpx; +} + +.info-item .item-content { + font-size: 30rpx; + color: #000; +} + +/* 弹窗 */ + +.avatar-edit-box { + width: 580rpx; + background: #fff; + border-radius: 10rpx; + position: relative; + display: flex; + flex-direction: column; + align-items: center; + justify-content: flex-start; + margin: 60px auto; + overflow: hidden; + z-index: 1001; +} + +.avatar-edit-box .modal-title { + font-size: 32rpx; + color: #555; + padding: 28rpx 0; +} + +.avatar-edit-box image { + width: 185rpx; + height: 185rpx; + border-radius: 50%; + border: 5rpx solid #cacbcd; + margin-bottom: 30rpx; +} + +.avatar-edit-box .modal-btn { + color: #1db1fd; + line-height: 94rpx; + font-size: 30rpx; + width: 100%; + text-align: center; +} + +.avatar-edit-box .modal-btn.cancel { + color: #9f9f9f; +} + +.edit-box { + width: 660rpx; + box-sizing: border-box; + background: #fff; + border-radius: 10rpx; + position: relative; + display: flex; + flex-direction: column; + justify-content: flex-start; + margin: 60px auto; + overflow: hidden; + z-index: 1001; + padding: 0 25rpx; + padding-bottom: 30rpx; +} + +.edit-box .card-header { + line-height: 60rpx; + text-align: center; + font-size: 36rpx; +} + +.edit-close { + position: absolute; + width: 30rpx; + height: 30rpx; + right: 20rpx; + top: 20rpx; +} + +.edit-box .edit-btn button { + background-color: #4facfe; + text-align: center; + line-height: 68rpx; + margin-top: 40rpx; + color: #fff; + border-radius: 6rpx; + font-size: 30rpx; +} + +.edit-box .edit-btn button::after { + border: 0; +} + +.rest { + position: absolute; + right: 36rpx; + top: 0; +} + +.rest text { + color: #fff; + font-size: 24rpx; + margin-right: 10rpx; +} + +.rest switch { + zoom: 0.5; +} + +.radio-group .radio{ + margin-right: 10px; +} + +.radio-group .radio text{ + display: inline-block; + vertical-align: middle; +} + +radio { + width: 38rpx; +} + +radio .wx-radio-input { + border-radius: 50%; + width: 28rpx; + height: 28rpx; +} + +radio .wx-radio-input.wx-radio-input-checked::before { + border-radius: 50%; + width: 44rpx; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + background: #2facff; + border-color: #2facff; +} + +.img { + width: 240rpx; + height: 240rpx; +} + +.upload-btn { + display: flex; + align-items: center; + justify-content: center; + width: 240rpx; + height: 240rpx; + border: 1rpx dashed #ccc; + border-radius: 5rpx; +} + +.upload-btn .iconfont { + font-size: 100rpx; + color: #ccc; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.js b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.js new file mode 100644 index 0000000..dbe296c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.js @@ -0,0 +1,74 @@ +var page = 1; + +Page({ + + /** + * 页面的初始数据 + */ + data: { + containerHeight: "", + LoadingComplete: !1, + loadText: "没有更多订单了~", + orderDetail: {}, + rewardList: [] + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight, + orderDetail: options + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + page = 1, wx.showLoading({ + title: "加载中...", + mask: true + }), this.data.rewardList = [], this.getDetailInfo(); + }, + + /** + * 获取订单详情 + */ + getDetailInfo: function(){ + console.log(211) + wx.hideLoading(); + }, + + getMoreList: function () { + wx.showLoading({ + title: "加载中...", + mask: true + }), this.data.LoadingComplete ? (page += 1, this.getDetailInfo()) : wx.hideLoading(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.json b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.json new file mode 100644 index 0000000..55c96b4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "结算单详情", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxml new file mode 100644 index 0000000..9b61e42 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxml @@ -0,0 +1,52 @@ + + + + + + + 佣金结算单号({{orderDetail.disSettleNo}}) + + + + 结算量 + {{orderDetail.settleNum}} + + + 结算金额 + ¥{{orderDetail.totalAmount/100}} + + + 微信支付单号 + {{orderDetail.payNo}} + + + 结算日期 + {{orderDetail.createTime}} + + + + + + + {{item.createTime}} + {{item.disStatusName}} + + + + + + + + {{item.spuName}} + + 团单金额 ¥{{item.totalAmount/100}} + | 佣金 ¥{{item.orderCommission/100}} + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxss new file mode 100644 index 0000000..f906ccd --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementDetail.wxss @@ -0,0 +1,232 @@ +.nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 92rpx; + border-top: 2rpx solid #f2f2f2; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .orderList_item .line { + position: absolute; + bottom: 0; + height: 6rpx; + width: 100%; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.nav .on { + color: #4facfe; +} + +.swiper-box { + width: 100%; + margin-top: 90rpx; +} + +.swiper-box .order-scroll-view { + width: 750rpx; + height: 100%; +} + +.swiper-box .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.swiper-box .noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.swiper-box .noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.swiper-box .item { + width: 710rpx; + height: 266rpx; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx auto 0; + background: #fff; +} + +.swiper-box .item:last-of-type { + margin: 20rpx auto; +} + +.refresh { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 2rpx solid #999; + box-shadow: 2rpx 2rpx 4rpx #999; + position: fixed; + right: 50rpx; + bottom: 200rpx; + font-size: 20rpx; + color: #666; + background: #fff; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.refresh image { + width: 32rpx; + height: 32rpx; + margin-bottom: 4rpx; +} + +page { + height: 100%; +} + +.settlementDetail { + width: 750rpx; + height: 100%; + overflow: auto; + font-family: PingFangSC-Regular; + font-size: 28rpx; +} + +.settlementDetail .header { + background: #fff; + margin-top: 20rpx; +} + +.settlementDetail .header .title { + height: 96rpx; + line-height: 96rpx; + width: 688rpx; + margin: 0 auto; + color: #333; + border-bottom: 2rpx solid #e4e4e4; +} + +.settlementDetail .header .container { + padding: 12rpx 30rpx 42rpx; + color: #666; +} + +.settlementDetail .header .container .per { + display: flex; + justify-content: space-between; + line-height: 40rpx; + margin-top: 12rpx; +} + +.settlementDetail .main { + margin-top: 20rpx; +} + +.settlementDetail .main .title { + padding: 0 30rpx; + display: flex; + justify-content: space-between; + line-height: 80rpx; + background: #fff; + border-bottom: 2rpx solid #e4e4e4; +} + +.settlementDetail .main .title .date { + font-size: 24rpx; + color: #666; +} + +.settlementDetail .main .title .status { + font-size: 26rpx; + color: #4facfe; +} + +.settlementDetail .main .figcaption { + background: #fff; + display: flex; + justify-content: flex-start; + padding: 24rpx 30rpx; + height: 120rpx; +} + +.settlementDetail .main .figcaption .figure { + margin-right: 30rpx; +} + +.settlementDetail .main .figcaption .figure image { + width: 120rpx; + height: 120rpx; +} + +.settlementDetail .main .figcaption .desc .goodsName { + color: #333; + font-size: 28rpx; + line-height: 40rpx; + height: 80rpx; + width: 540rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.settlementDetail .main .figcaption .desc .goods-detail { + line-height: 34rpx; + font-size: 24rpx; + color: #999; +} + +.settlementDetail .main .figcaption .desc .line { + font-size: 16rpx; + vertical-align: middle; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.js b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.js new file mode 100644 index 0000000..d54cdfd --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.js @@ -0,0 +1,153 @@ +var page = 1; + +Page({ + + /** + * 页面的初始数据 + */ + data: { + settlementList: [{ + id: "1", + disSettleNo: "111111111111", + settleNum: "111", + totalAmount: "2222", + payNo: "4444", + createTime: "2018-12-16" + }], + loadText: "没有更多记录了~", + LoadingComplete: !1, + scrollTop: 0, + containerHeight: 0, + chooseDate: "", + chooseDateTime: "", + data: "", + settle: "", + communnityId: "" + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + var sysInfo = wx.getSystemInfoSync(); + this.setData({ + containerHeight: sysInfo.windowHeight + }); + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + page = 1, wx.showLoading({ + title: "加载中...", + mask: true + }); + var dayTime = new Date(), + year = dayTime.getFullYear(), + mon = dayTime.getMonth() + 1, + dateTime = Date.parse(dayTime); + this.setData({ + chooseDate: year + "年" + mon + "月", + chooseDateTime: dateTime + }), this.data.settlementList = [], this.getData(); + }, + + /** + * 获取数据 + */ + getData: function() { + console.log(111) + wx.hideLoading(); + }, + + /** + * 获取列表 + */ + getSettlementList: function() { + console.log(222) + }, + + /** + * 获取更多 + */ + getMoreList: function() { + wx.showLoading({ + title: "加载中...", + mask: true + }), this.data.LoadingComplete ? (page += 1, this.getSettlementList()) : wx.hideLoading(); + }, + + /** + * 日期监控 + */ + bindDateChange: function(t) { + page = 1, console.log("picker发送选择改变,携带值为", t.detail.value), this.setData({ + date: t.detail.value + }); + var e = this.data.date.split("-"), + a = Date.parse(this.data.date); + this.setData({ + chooseDate: e[0] + "年" + e[1] + "月", + chooseDateTime: a + }), this.getData(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.json b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.json new file mode 100644 index 0000000..340c53d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#FFF", + "navigationBarTitleText": "结算记录", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "component-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxml new file mode 100644 index 0000000..e5f9650 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxml @@ -0,0 +1,52 @@ + + + + + + + + {{chooseDate}} + + + + + + 佣金收入:¥{{settle/100}} + + + + + + + 还没有记录 快去分享吧~ + + + + + 佣金结算单号({{item.disSettleNo}}) + + + + + 结算量 + {{item.settleNum}} + + + 结算金额 + ¥{{item.totalAmount/100}} + + + 结算日期 + {{item.createTime}} + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxss new file mode 100644 index 0000000..4d7562e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/settlementList.wxss @@ -0,0 +1,241 @@ +.nav { + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: #fff; + height: 92rpx; + border-top: 2rpx solid #f2f2f2; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .orderList_item .line { + position: absolute; + bottom: 0; + height: 6rpx; + width: 100%; + background: linear-gradient(90deg,#4facfe 0%,#00f2fe 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.nav .on { + color: #4facfe; +} + +.swiper-box { + width: 100%; + margin-top: 90rpx; +} + +.swiper-box .order-scroll-view { + width: 750rpx; + height: 100%; +} + +.swiper-box .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.swiper-box .noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.swiper-box .noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.swiper-box .noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.swiper-box .item { + width: 710rpx; + height: 266rpx; + box-shadow: 0rpx 0rpx 40rpx 0rpx rgba(0, 0, 0, 0.05); + border-radius: 20rpx; + margin: 20rpx auto 0; + background: #fff; +} + +.swiper-box .item:last-of-type { + margin: 20rpx auto; +} + +.refresh { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + border: 2rpx solid #999; + box-shadow: 2rpx 2rpx 4rpx #999; + position: fixed; + right: 50rpx; + bottom: 200rpx; + font-size: 20rpx; + color: #666; + background: #fff; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.refresh image { + width: 32rpx; + height: 32rpx; + margin-bottom: 4rpx; +} + +page { + height: 100%; +} + +.settlementList { + width: 750rpx; + height: 100%; + overflow: auto; + margin-top: 80rpx; + font-family: PingFangSC-Regular; + font-size: 28rpx; +} + +.settlementList .order-scroll-view { + width: 750rpx; + height: 100%; +} + +.settlementList .noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.settlementList .noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 328rpx; +} + +.settlementList .noRecordCon .noRecord { + padding-top: 18rpx; + font-size: 28rpx; + color: #999; +} + +.settlementList navigator { + background: #fff; + margin-top: 20rpx; +} + +.settlementList .title { + height: 96rpx; + line-height: 96rpx; + width: 688rpx; + margin: 0 auto; + color: #333; + border-bottom: 2rpx solid #e4e4e4; +} + +.settlementList .main { + color: #666; + width: 688rpx; + margin: 0 auto; + display: flex; + justify-content: space-between; +} + +.settlementList .main .left { + flex: 1; + padding: 12rpx 0 24rpx; +} + +.settlementList .main .left .per { + display: flex; + justify-content: space-between; + line-height: 40rpx; + margin-top: 12rpx; +} + +.settlementList .main .arrow { + width: 52rpx; + text-align: right; + line-height: 192rpx; +} + +.settlementList .main .arrow .rightArrowImg { + width: 12rpx; + height: 22rpx; +} + +.section { + position: fixed; + width: 690rpx; + top: 0; + z-index: 20; + display: flex; + font-size: 28rpx; + color: #666; + padding: 20rpx 30rpx; + background-color: #fff; +} + +.section .groupDay { + width: 36rpx; + height: 36rpx; +} + +.section .picker { + margin-left: 20rpx; + display: flex; + flex: 1; +} + +.section .picker .choose-day .iconfont { + font-size: 12rpx; + margin-left: 6rpx; + vertical-align: middle; + color: #999; +} diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/wallet.js b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.js new file mode 100644 index 0000000..18ddd24 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.js @@ -0,0 +1,124 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + showDialog: false + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 点击提现 + */ + cashMoney: function(){ + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/editInfo' + }) + } else { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleA/groupCenter/editInfo' + }) + } + + }, + + /** + * 确认对话框 + */ + confirm: function(){ + this.setData({ + showDialog: false + }) + console.log(111) + }, + + /** + * 取消对话框 + */ + cancel: function(){ + this.setData({ + showDialog: false + }) + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + var token = wx.getStorageSync('token'); + var that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'community.get_community_info', + 'token': token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let commission_info = res.data.commission_info; + if(commission_info&&commission_info.mix_total_money) { + commission_info.mix_total_money = (commission_info.mix_total_money*1).toFixed(2); + } + that.setData({ + member_info: res.data.member_info, + community_info: res.data.community_info, + commission_info, + total_order_count: res.data.total_order_count, + total_member_count: res.data.total_member_count, + today_order_count: res.data.today_order_count, + today_effect_order_count: res.data.today_effect_order_count, + today_pay_order_count: res.data.today_pay_order_count, + today_pre_total_money: res.data.today_pre_total_money, + today_all_total_money: res.data.today_all_total_money, + month_pre_total_money: res.data.month_pre_total_money, + pre_total_money: res.data.pre_total_money, + wait_sub_total_money: res.data.wait_sub_total_money, + dongmoney: res.data.dongmoney, + tixian_sucess_money: res.data.tixian_sucess_money + }); + } else { + //is_login + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/wallet.json b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.json new file mode 100644 index 0000000..d26d6b8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.json @@ -0,0 +1,9 @@ +{ + "navigationBarBackgroundColor": "#fe8464", + "navigationBarTitleText": "我的钱包", + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-dialog": "../../components/dialog/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxml b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxml new file mode 100644 index 0000000..6d0511d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxml @@ -0,0 +1,43 @@ + + + + + 今日收入(元) + {{today_all_total_money}} + + + + 本月收入 + {{month_pre_total_money}} + + + 累计收入 + {{commission_info.mix_total_money}} + + + + + + 待确认收入 + 订单明细 + + {{wait_sub_total_money}} + + 可提现金额 + 收益明细 + + {{commission_info.money}} + + 提现中金额 + 提现记录 + + {{dongmoney}} + + 已打款金额 + 提现记录 + + {{tixian_sucess_money}} + + 提 现 + + diff --git a/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxss b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxss new file mode 100644 index 0000000..0c25a62 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/groupCenter/wallet.wxss @@ -0,0 +1,85 @@ +.basicInForm { + width: 100%; + background: #4facfe; + color: #fff; + text-align: center; + padding: 50rpx 0 20rpx; +} + +.today-box { + margin-bottom: 30rpx; +} + +.today-income { + font-size: 30rpx; +} + +.today-income-money { + font-size: 60rpx; + font-weight: bold; + line-height: 2; +} + +.flex { + display: flex; +} + +.flex-item { + flex: 1; +} + +.other-item { + position: relative; +} + +.other-income .other-item:first-child::after { + position: absolute; + content: ""; + top: 0; + bottom: 0; + right: 0; + width: 1px; + border-left: 1px solid #fff; + transform: scaleX(0.5); +} + +.income-money { + font-weight: bold; + line-height: 2; +} + +.income-data { + padding: 20rpx 30rpx; +} + +.common-title { + display: flex; + color: #999; + align-content: center; + align-items: center; +} + +.common-title .subtit { + margin-right: 10px; +} + +.common-nav { + color: #000; + margin: 5px; +} + +.common-money { + font-size: 40rpx; + line-height: 2; +} + +.income-btn { + margin: 40rpx 30rpx; + line-height: 70rpx; + background-color: #4facfe; + border-radius: 5px; + color: #fff; + text-align: center; + font-weight: bold; + font-size: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/details.js b/eaterplanet_ecommerce/moduleA/menu/details.js new file mode 100644 index 0000000..d3553da --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/details.js @@ -0,0 +1,293 @@ +const app = getApp() +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/compoentCartMixin.js')], + data: { + info: {}, + fmShow: true, + canvasWidth: 375, + canvasHeight: 300 + }, + gid: 0, + goodsImg: '', + imageUrl: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + let gid = options.id || ''; + this.gid = gid; + this.getData(gid); + let showBackBtn = false; + let pages_all = getCurrentPages(); + if (pages_all.length > 1) { + showBackBtn = true; + } + this.setData({ showBackBtn }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + const that = this; + util.check_login_new().then((res) => { + let needAuth = !res; + that.setData({ needAuth }) + if (res) { + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + } + }) + }, + + onReady: function (res) { + this.videoContext = wx.createVideoContext('myVideo'); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + const that = this; + let gid = this.gid; + this.setData({ + needAuth: false, + showAuthModal: false + }, () => { + that.getData(gid); + }) + }, + + vipModal: function(t) { + this.setData(t.detail) + }, + + imageLoad: function (e) { + var imageSize = util.imageUtil(e) + this.setData({ + imageSize + }) + }, + + /** + * 播放视频隐藏封面图 + */ + btnPlay: function () { + this.setData({ + fmShow: false + }) + this.videoContext.play(); + }, + + videEnd: function () { + this.setData({ + fmShow: true + }) + }, + + endPlay: function () { + this.videoContext.pause(); + this.setData({ + fmShow: true + }) + }, + + /** + * 获取信息 + */ + getData: function (id) { + let that = this; + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let head_id = community.communityId || ''; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.get_recipe_detail', + token, + id, + head_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code==0) { + let info = res.data.data || {}; + let is_open_recipe_full_video = res.data.is_open_recipe_full_video; + let showCoverVideo = (is_open_recipe_full_video==1) && info.video; + that.setData({ info, showCoverVideo }, ()=>{ + let shareImg = info.images; + info.video && shareImg && status.download(shareImg + "?imageView2/1/w/500/h/400").then(function (a) { + that.goodsImg = a.tempFilePath, that.drawImg(); + }); + }) + } + wx.hideLoading(); + } + }) + }, + + /** + * 点赞 + */ + agree: function () { + if (!this.authModal()) return; + let that = this; + let item = this.data.info; + let token = wx.getStorageSync('token'); + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.fav_recipe_do', + token: token, + id: item.id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + //成功 + wx.showToast({ + title: '已喜欢~', + icon: 'none' + }) + item.fav_count = res.data.fav_count; + item.has_fav = 1; + that.setData({ info: item }) + } else if (res.data.code == 1) { + //未登录 + that.setData({ needAuth: true }); + } else if (res.data.code == 2) { + //取消收藏 + item.fav_count = res.data.fav_count; + item.has_fav = 0; + that.setData({ info: item }) + wx.showToast({ + title: '取消喜欢~', + icon: 'none' + }) + } + } + }) + }, + + goLink: function(e){ + let link = e.currentTarget.dataset.link; + app.util.navTo(link); + }, + + drawImg: function () { + var t = this; + wx.createSelectorQuery().select(".canvas-img").boundingClientRect(function () { + const context = wx.createCanvasContext("myCanvas"); + context.drawImage(t.goodsImg, 0, 0, status.getPx(375), status.getPx(300)); + context.drawImage("../../images/play.png", status.getPx(127.5), status.getPx(70), status.getPx(120), status.getPx(120)); + context.save(); + context.draw(false, t.checkCanvas()); + }).exec(); + }, + + checkCanvas: function () { + var that = this; + setTimeout(() => { + wx.canvasToTempFilePath({ + canvasId: "myCanvas", + success: function (res) { + res.tempFilePath ? that.imageUrl = res.tempFilePath : that.drawImg(); + console.log('我画完了') + }, + fail: function (a) { + that.drawImg(); + } + }) + }, 500) + }, + + clickStore: function() { + this.setData({ showStore: !this.data.showStore }) + }, + + coverVideoEnd: function(){ + this.setData({ + showCoverVideo: false + }) + }, + + _backhome: function() { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let info = this.data.info; + var community = wx.getStorageSync('community'); + var gid = info.id; + var community_id = community.communityId; + var share_title = info.recipe_name; + var share_id = wx.getStorageSync('member_id'); + var share_path = `eaterplanet_ecommerce/moduleA/menu/details?id=${gid}&share_id=${share_id}&community_id=${community_id}`; + console.log('分享地址:', share_path); + return { + title: share_title, + path: share_path, + imageUrl: this.imageUrl, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + let info = this.data.info; + var community = wx.getStorageSync('community'); + var gid = info.id; + var community_id = community.communityId; + var share_title = info.recipe_name; + var share_id = wx.getStorageSync('member_id'); + var query= `id=${gid}&share_id=${share_id}&community_id=${community_id}`; + + return { + title: share_title, + query, + imageUrl: this.imageUrl, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/menu/details.json b/eaterplanet_ecommerce/moduleA/menu/details.json new file mode 100644 index 0000000..f603340 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/details.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "详情", + "navigationStyle": "custom", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-goods-item": "../components/menuGoodsItem", + "sku": "../../components/sku/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/details.wxml b/eaterplanet_ecommerce/moduleA/menu/details.wxml new file mode 100644 index 0000000..7a63f9a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/details.wxml @@ -0,0 +1,151 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + {{info.recipe_name}} + + 制作时间:{{info.make_time}} | + 难度:{{info.diff_name}} + + + + + {{info.username}} + + {{info.sub_name}} + + + + + + 清单 + + + · {{item.ingredients_title}} + + + + + + + + + + + 详情 + + + + + + + + + + + {{cartNum}} + + + 购物车 + + + + 喜欢 {{info.fav_count}} + + + + + + + + + + + + + + + + + + + + + + + 清单 + + + + + + · {{list.ingredients_title}} + + + + + + {{index+1}} + + + {{item.spuName}} + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + ¥{{item.marketPrice[0]}}.{{item.marketPrice[1]}} + + + + + + + 暂无清单 + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/menu/details.wxss b/eaterplanet_ecommerce/moduleA/menu/details.wxss new file mode 100644 index 0000000..c756b57 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/details.wxss @@ -0,0 +1,432 @@ +.foot { + position: fixed; + left: 0; + right: 0; + bottom: 0; + z-index: 10; + border-top: 1rpx solid #ccc; + text-align: center; + height: 100rpx; + font-size: 24rpx; + color: #666; +} + +.foot-item .btn { + line-height: 1.2; + background: transparent; + font-size: 24rpx; + padding: 0; + color: #666; +} + +.foot-item .btn::after { + border: 0; +} + +.foot-item .iconfont { + color: #333; + font-size: 42rpx; + display: inline-block; +} + +.foot-item .iconfont.active { + color: #ff5344!important; +} + +.foot-item .cart-num { + position: absolute; + right: -16rpx; + top: -4rpx; + width: 36rpx; + height: 36rpx; + background: #f43530; + border-radius: 36rpx; + color: #fff; + font-size: 22rpx; + display: flex; + justify-content: center; + align-items: center; +} + +::-webkit-scrollbar { + display: none; + width: 0; + height: 0; + color: transparent; +} + +.topImg { + width: 100%; + vertical-align: top; +} + +.com-tit { + font-size: 32rpx; + color: #1a1d21; + padding-bottom: 20rpx; +} + +.title { + font-size: 45rpx; + color: #1a1d21; + padding: 15rpx 0; +} + +.desc { + font-size: 24rpx; + color: #b0b2b5; +} + +.userinfo { + margin-top: 30rpx; +} + +.avatar { + width: 66rpx; + height: 66rpx; + border-radius: 50%; + margin-right: 24rpx; +} + +.p { + color: #666; + font-size: 26rpx; + line-height: 1.8; + margin-top: 20rpx; +} + +.list-box { + display: flex; + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; +} + +.wxParse-p image { + max-width: 100%!important; +} + +.list-tit { + color: #333; + font-size: 28rpx; +} + +/* 视频 */ +.media-box { + position: relative; +} + +.btn_view { + position: absolute; + left: 50%; + top: 50%; + z-index: 100; + transform: translate(-50%, -50%); +} + +.btn_view image { + width: 120rpx; + height: 120rpx; + background: rgba(0, 0, 0, 0.1); + border-radius: 50%; + animation: playScale 2s ease-in-out infinite; +} + +.video-wrap, .swiper-video { + width: 100%; + /* height: 100%; */ + vertical-align: top; +} + +.end-play { + position: relative; + z-index: 1000; + background: #000; + text-align: center; + padding: 20rpx 0; +} + +.end-play .btn { + display: inline-block; + padding: 5rpx 30rpx; + background-color: #f6f6f6; + border-radius: 20rpx; + font-size: 24rpx; +} + +@keyframes playScale { + 0% { + transform: scale(1); + } + 25% { + transform: scale(1.1); + } + 50% { + transform: scale(1); + } + 75% { + transform: scale(1.1); + } +} + +.canvas-img { + position: absolute; + top: -20000rpx; +} + + +.nav-btn { + position: relative; + left: 0; + display: flex; + justify-content: center; + align-items: center; + width: 31px; + height: 31px; + line-height: 31px; + padding: 0; + min-width: 31px; + max-width: 31px; + text-align: center; + border-radius: 50%; + min-height: initial; + box-sizing: border-box; + border: 1px solid rgba(255,255,255,0.05); + color: #000; +} + +.nav-btn .img { + width: 22px; + height: 22px; +} + +/* 全屏视频 */ +.livepage { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 20; + padding-bottom: 24px; + box-sizing: border-box; + width: 100%; + height: 100vh; + overflow: hidden; +} + +.livepage1 { + position: relative; + width: 100%; + height: 100%; + z-index: 0; +} + +.livepage1 video { + width: 100%; + height: 100%; +} + +.livepage2 { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 20; + padding-bottom: 24px; + box-sizing: border-box; + width: 100%; + height: 100%; +} + + +.operation { + position: absolute; + right: 17px; + bottom: 24px; + z-index: 10; +} + +.operation .item { + width: 42px; + height: 42px; + background-image: linear-gradient(180deg, #8385F3 0%, #6467F0 100%); + border-radius: 50%; + margin-bottom: 23px; + overflow: hidden; +} + +.operation .item .iconfont { + font-size: 24px; + color: #fff; +} + +.operation .item.operation--mode-filter-black { + background: rgba(0, 0, 0, 0.25); + backdrop-filter: blur(20px); + border-radius: 50%; + overflow: hidden; +} + +.operation button.item::after { + content: none; +} + +.store { + padding: 0 16px; + position: absolute; + z-index: 2; + left: 0; + right: 0; + bottom: 30px; +} + +.store-list { + border-radius: 16px; + overflow: hidden; + position: relative; + bottom: -999px; +} + +.store-list.fadeIn { + bottom: 0; + animation: fadeInStoreList 0.2s 1 forwards; +} + +.store__mask { + position: fixed; + top: 0; + left: 0; + right: 0; + height: 100%; +} + +.mode-filter-black { + background-color: rgba(0, 0, 0, 0.25); + backdrop-filter: blur(20px); + border-radius: inherit; +} + +.store-list__inner { + position: relative; + z-index: 5002; + padding: 16px 12px; + box-sizing: border-box; +} + +.store-list__header { + position: relative; + display: flex; + justify-content: center; + align-items: center; + padding: 0 4px; + font-weight: 500; +} + +.store-list__title { + font-size: 15px; + color: #ffffff; + text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.1); +} + +.store-list__body { + margin-top: 4px; + overflow: hidden; + padding: 2px 5px 0 0; + box-sizing: border-box; + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.store-list__page__inner { + position: relative; + width: calc(100% + 20px); + box-sizing: border-box; + -webkit-mask-image: -webkit-gradient(linear, left bottom, left 96%, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 04))); +} + +.store-list__item { + margin-bottom: 12px; + background: #ffffff; + border-radius: 8px; +} + +.store-list__item:last-child { + margin-bottom: 0; +} + +.store-list__item__inner { + display: flex; + justify-content: flex-start; + align-items: stretch; + padding: 8px; +} + +.store-list__item__header { + position: relative; + margin-right: 9px; + font-size: 0; +} + +.store-list__item__avatar { + width: 64px; + height: 64px; + border-radius: 2px; + box-sizing: border-box; +} + +.store-list__item__index { + position: absolute; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0.5); + border-radius: 2px 0px 8px 0px; + text-align: center; + padding: 0 2px; + min-width: 14px; + line-height: 12px; + font-size: 10px; + color: #ffffff; + text-align: center; +} + +.store-list__item__page { + height: initial; +} + +.store-list__item__title { + font-size: 15px; + color: rgba(0, 0, 0, 0.7); + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; + line-height: 19.6px; + margin-bottom: 5px; +} + +.store-list__item__price { + opacity: 0.9; + font-size: 14px; + color: #fa9d3b; +} + +.store-list__item__price-before { + color: #B2B2B2; + text-decoration: line-through; +} + +.store-list__empty { + text-align: center; + height: 287px; + line-height: 140px; + color: #fff; + font-size: 14px; +} + +.operation--mode-filter-black .icon-xinaixin.active { + color: #ff5344!important; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/fav.js b/eaterplanet_ecommerce/moduleA/menu/fav.js new file mode 100644 index 0000000..5c1ad30 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/fav.js @@ -0,0 +1,151 @@ +const app = getApp() +var util = require('../../utils/util.js'); + +Page({ + data: { + loadMore: true, + classification: { + tabs: [], + activeIndex: 0 + } + }, + pageNum: 1, + + onLoad: function () { + this._doRefreshMasonry(); + }, + + onShow: function () { + util.check_login_new().then((res) => { + this.setData({ + needAuth: !res + }); + }) + }, + + noLogin: function () { + this.setData({ + needAuth: true, + showAuthModal: true + }) + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 授权成功回调 + */ + authSuccess: function () { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0, + needAuth: false, + showAuthModal: false + }, () => { + that._doRefreshMasonry() + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + onPullDownRefresh: function () { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0 + }, () => { + that.getInfo(); + that._doRefreshMasonry() + }) + }, + + onReachBottom: function () { + this.data.loadMore && this._doAppendMasonry() + }, + + _doRefreshMasonry() { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry'); + this.getData().then(res => { + that.masonryListComponent.start(res).then(() => { }) + }).catch(() => { + that.masonryListComponent.start([]).then(() => { }) + }) + }, + + _doAppendMasonry() { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry') + // 获取接口数据后使用瀑布流组件append方法,当append完成后调用then,是否可触底价在的标志位可以在这里处理 + this.getData().then(res => { + that.masonryListComponent.append(res).then(() => { + console.log('refresh completed') + }) + }).catch(() => { + console.log('没有更多了') + }) + }, + + /** + * 获取列表 + */ + getData: function () { + return new Promise((resolve, reject) => { + let that = this; + let token = wx.getStorageSync('token'); + let gid = that.data.classificationId; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.get_fav_recipelist', + token: token, + pageNum: this.pageNum + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let list = res.data.data; + that.pageNum++; + resolve(list); + } else { + // 无数据 + let h = { + loadMore: false + } + if (that.pageNum == 1) h.showEmpty = 1; + that.setData(h); + reject(''); + } + wx.hideLoading(); + } + }) + }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleA/menu/fav.json b/eaterplanet_ecommerce/moduleA/menu/fav.json new file mode 100644 index 0000000..8372cb8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/fav.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "我的收藏", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTextStyle": "black", + "enablePullDownRefresh": false, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "masonry": "../components/masonry/masonry", + "img-box": "../components/img-box/img-box", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/fav.wxml b/eaterplanet_ecommerce/moduleA/menu/fav.wxml new file mode 100644 index 0000000..7cda857 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/fav.wxml @@ -0,0 +1,5 @@ + + + + +暂无喜欢~ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/fav.wxss b/eaterplanet_ecommerce/moduleA/menu/fav.wxss new file mode 100644 index 0000000..5b8f301 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/fav.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/menu/fav.wxss */ diff --git a/eaterplanet_ecommerce/moduleA/menu/index.js b/eaterplanet_ecommerce/moduleA/menu/index.js new file mode 100644 index 0000000..7a6bae6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/index.js @@ -0,0 +1,396 @@ +const app = getApp() +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + loadMore: true, + classification: { + menutabs: [], + activeIndex: 0 + }, + tabTop: 0, + showSubCate: true + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + pageNum: 1, + + onLoad: function() { + app.setShareConfig(); + this.getInfo(); + this._doRefreshMasonry(); + }, + + onReady: function(){ + let that = this; + const query = wx.createSelectorQuery(); + let searH = Math.round(app.globalData.systemInfo.windowWidth / 750 * 100) || 0; + setTimeout(() => { + query.select('#tab').boundingClientRect(function (res) { + that.setData({ tabTop: res.top - searH }); + }).exec(); + }, 1000) + }, + + onShow: function() { + const that = this; + util.check_login_new().then((res) => { + let needAuth = !res; + that.setData({ needAuth }) + if (res) { + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + } + }) + }, + + onPageScroll: function (event) { + if (event.scrollTop > this.data.tabTop) { + if (this.data.tabFix) { + return + } else { + this.setData({ + oneFixed: "Fixed" + }) + } + } else { + this.setData({ + oneFixed: '' + }) + } + }, + + noLogin: function() { + this.setData({ + needAuth: true, + showAuthModal: true + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0, + needAuth: false, + showAuthModal: false + }, () => { + that._doRefreshMasonry() + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + /** + * 监控分类导航 + */ + classificationChange: function (t) { + var that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0, + "classification.activeIndex": t.detail.e, + classificationId: t.detail.a + }, function () { + that._doRefreshMasonry() + }); + }, + + onPullDownRefresh: function() { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0 + }, () => { + that.getInfo(); + that._doRefreshMasonry() + }) + }, + + onReachBottom: function() { + this.data.loadMore && this._doAppendMasonry() + }, + + _doRefreshMasonry(keyword = '') { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry'); + this.getData(keyword).then(res => { + that.masonryListComponent.start(res).then(() => {}) + }).catch(()=>{ + that.masonryListComponent.start([]).then(() => {}) + }) + }, + + _doAppendMasonry() { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry') + // 获取接口数据后使用瀑布流组件append方法,当append完成后调用then,是否可触底价在的标志位可以在这里处理 + this.getData().then(res => { + that.masonryListComponent.append(res).then(() => { + console.log('refresh completed') + }) + }).catch(() => { + console.log('没有更多了') + }) + }, + + /** + * 获取列表 + */ + getData: function(keyword = '') { + return new Promise((resolve, reject) => { + let that = this; + let token = wx.getStorageSync('token'); + let gid = that.data.classificationId; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.get_recipe_list', + token: token, + gid, + pageNum: this.pageNum, + keyword + }, + dataType: 'json', + success: function(res) { + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let list = res.data.data; + that.pageNum++; + resolve(list); + } else { + // 无数据 + let h = { + loadMore: false + } + if (that.pageNum == 1) h.showEmpty = 1; + that.setData(h); + reject(''); + } + wx.hideLoading(); + } + }) + }) + }, + + /** + * 获取信息 + */ + getInfo: function() { + let that = this; + let token = wx.getStorageSync('token'); + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.get_index_info' + }, + dataType: 'json', + success: function(res) { + if (res.data.code) { + let { + adv_arr, + cate_list, + is_open_recipe, + modify_recipe_name, + modify_recipe_share_title, + modify_vipcard_share_image + } = res.data.code; + if (is_open_recipe != 1) { + app.util.message('未开启功能', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } + + wx.setNavigationBarTitle({ + title: modify_recipe_name || '菜谱' + }) + + // 菜单 + let params = { + classification: { + activeIndex: 0 + } + }; + let index_type_first_name = '全部'; + if (cate_list.length > 0) { + cate_list.unshift({ + name: index_type_first_name, + id: 0 + }) + params.isShowClassification = true; + params.classification.tabs = cate_list; + } else { + params.isShowClassification = false; + } + + that.setData({ + adv_arr: adv_arr || [], + modify_recipe_share_title, + modify_vipcard_share_image, + modify_recipe_name: modify_recipe_name || '菜谱', + ...params + }) + } + wx.hideLoading(); + } + }) + }, + + /** + * 搜索 + */ + goResult: function(e) { + let that = this; + let keyword = e.detail.value.replace(/\s+/g, ''); + if (!keyword) { + wx.showToast({ + title: '请输入关键词', + icon: 'none' + }) + return; + } + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0 + }, () => { + that._doRefreshMasonry(keyword); + }) + }, + + /** + * 幻灯片跳转 + */ + goBannerUrl: function(t) { + let idx = t.currentTarget.dataset.idx; + let { + adv_arr, + needAuth + } = this.data; + if (adv_arr.length > 0) { + let url = adv_arr[idx].link; + let type = adv_arr[idx].linktype; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + url && wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) + }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ + url: url + }) + } else { + url && wx.navigateTo({ + url: url + }) + } + + } else if (type == 2) { + // 跳转小程序 + let appid = slider_list[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: slider_list[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } + } + }, + + goLink: function (event) { + if (!this.authModal()) return; + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + onShareAppMessage: function() { + var member_id = wx.getStorageSync('member_id'); + let { + modify_recipe_share_title, + modify_vipcard_share_image, + modify_recipe_name + } = this.data; + return { + title: modify_recipe_share_title || modify_recipe_name, + path: "eaterplanet_ecommerce/moduleA/menu/index?share_id=" + member_id, + imageUrl: modify_vipcard_share_image, + success: function() {}, + fail: function() {} + }; + }, + + onShareTimeline: function() { + var member_id = wx.getStorageSync('member_id'); + let { + modify_recipe_share_title, + modify_vipcard_share_image, + modify_recipe_name + } = this.data; + var query= `share_id=${member_id}`; + + return { + title: modify_recipe_share_title || modify_recipe_name, + query, + imageUrl: modify_vipcard_share_image, + success: function() {}, + fail: function() {} + }; + } + +}) diff --git a/eaterplanet_ecommerce/moduleA/menu/index.json b/eaterplanet_ecommerce/moduleA/menu/index.json new file mode 100644 index 0000000..e91e226 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/index.json @@ -0,0 +1,16 @@ +{ + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#fff", + "navigationBarTextStyle": "white", + "enablePullDownRefresh": false, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "masonry": "../components/masonry/masonry", + "i-img": "../../components/img/index", + "i-menutabs": "../../components/menutabs/index", + "img-box": "../components/img-box/img-box", + "i-empty": "../../components/empty/index", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/index.wxml b/eaterplanet_ecommerce/moduleA/menu/index.wxml new file mode 100644 index 0000000..fd481ee --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/index.wxml @@ -0,0 +1,45 @@ + + + + + + + + + + + 喜欢 + + + + + + + + + + + + + + 今日推荐 + + + + + + + + + + + + + 暂时没有{{modify_recipe_name}} + + + + + diff --git a/eaterplanet_ecommerce/moduleA/menu/index.wxss b/eaterplanet_ecommerce/moduleA/menu/index.wxss new file mode 100644 index 0000000..67d2219 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/index.wxss @@ -0,0 +1,122 @@ +.search-box { + position: fixed; + background-color: #ff758c; + left: 0; + right: 0; + padding: 20rpx; + z-index: 100; +} + +.ipt-box { + position: relative; + background-color: #f0f0f0; + height: 60rpx; + line-height: 60rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + flex: 1; + margin-right: 20rpx; + align-items: center; +} + +.ipt-box .ipt { + flex: 1; + line-height: 60rpx; +} + +.ipt-box .iconfont { + margin-right: 12rpx; + font-size: 34rpx; + margin-left: 20rpx; +} + +.search-fav { + text-align: center; + line-height: 1; + color: #fff; +} + +.search-fav .iconfont { + font-size: 36rpx; +} + +/* 幻灯片 */ +.swipe { + height: 200rpx; +} + +.swiper-content { + width: 750rpx; + height: 200rpx; + border-radius: 20rpx; +} + +.swiper-content swiper-item { + border-radius: 12rpx; + margin-right: 20rpx; + display: flex; + justify-content: flex-start; +} + +.swiper-content swiper-item:last-child { + margin: 0; +} + +.swiper-content .banner { + width: 710rpx; + height: 200rpx; + margin: 0 20rpx; + display: block; + border-radius: 20rpx; + position: relative; + overflow: hidden; +} + +.swiper-content .banner .banner-img { + width: 710rpx; + height: 200rpx; + border-radius: 20rpx; + display: block; + overflow: hidden; +} + +.cate-title { + position: relative; + padding: 30rpx 20rpx 16rpx 40rpx; + font-size: 34rpx; + color: #fff; +} + +.cate-title::before { + content: ""; + position: absolute; + top: 35rpx; + bottom: 20rpx; + left: 20rpx; + border-left: 8rpx solid #fff; +} + +::-webkit-scrollbar { + display: none; + width: 0; + height: 0; + color: transparent; +} + +.sticky-content.Fixed { + position: fixed; + top: 100rpx; + z-index: 100; + transition: top 0.3s ease-in; + left: 0; + right: 0; +} + +.sticky-content .iconfont { + padding: 12rpx 20rpx; + font-weight: bold; + color: #5e6062; + box-shadow: -5px 0 5px -5px #ccc; + margin-left: -5px; +} diff --git a/eaterplanet_ecommerce/moduleA/menu/list.js b/eaterplanet_ecommerce/moduleA/menu/list.js new file mode 100644 index 0000000..51982af --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/list.js @@ -0,0 +1,159 @@ +const app = getApp() +var util = require('../../utils/util.js'); + +Page({ + data: { + loadMore: true, + classification: { + tabs: [], + activeIndex: 0 + } + }, + pageNum: 1, + + onLoad: function(options) { + this.gid = options.gid || ''; + let name = options.name || ''; + name && wx.setNavigationBarTitle({ + title: name + }) + this._doRefreshMasonry(); + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onShow: function() { + util.check_login_new().then((res) => { + this.setData({ + needAuth: !res + }); + }) + }, + + noLogin: function() { + this.setData({ + needAuth: true, + showAuthModal: true + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0, + needAuth: false, + showAuthModal: false + }, () => { + that._doRefreshMasonry() + }) + }, + + authModal: function() { + if (this.data.needAuth) { + this.setData({ + showAuthModal: !this.data.showAuthModal + }); + return false; + } + return true; + }, + + onPullDownRefresh: function() { + const that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + showEmpty: 0 + }, () => { + that.getInfo(); + that._doRefreshMasonry() + }) + }, + + onReachBottom: function() { + this.data.loadMore && this._doAppendMasonry() + }, + + _doRefreshMasonry() { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry'); + this.getData().then(res => { + that.masonryListComponent.start(res).then(() => {}) + }).catch(() => { + that.masonryListComponent.start([]).then(() => {}) + }) + }, + + _doAppendMasonry() { + let that = this; + this.masonryListComponent = this.selectComponent('#masonry') + // 获取接口数据后使用瀑布流组件append方法,当append完成后调用then,是否可触底价在的标志位可以在这里处理 + this.getData().then(res => { + that.masonryListComponent.append(res).then(() => { + console.log('refresh completed') + }) + }).catch(() => { + console.log('没有更多了') + }) + }, + + /** + * 获取列表 + */ + getData: function() { + return new Promise((resolve, reject) => { + let that = this; + let token = wx.getStorageSync('token'); + let gid = that.gid; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'recipe.get_recipe_list', + token: token, + gid, + pageNum: this.pageNum + }, + dataType: 'json', + success: function(res) { + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let list = res.data.data; + that.pageNum++; + resolve(list); + } else { + // 无数据 + let h = { + loadMore: false + } + if (that.pageNum == 1) h.showEmpty = 1; + that.setData(h); + reject(''); + } + wx.hideLoading(); + } + }) + }) + } + +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/list.json b/eaterplanet_ecommerce/moduleA/menu/list.json new file mode 100644 index 0000000..af96f73 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/list.json @@ -0,0 +1,10 @@ +{ + "enablePullDownRefresh": false, + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "masonry": "../components/masonry/masonry", + "img-box": "../components/img-box/img-box", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/list.wxml b/eaterplanet_ecommerce/moduleA/menu/list.wxml new file mode 100644 index 0000000..05e7079 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/list.wxml @@ -0,0 +1,5 @@ + + + + +暂无结果~ diff --git a/eaterplanet_ecommerce/moduleA/menu/list.wxss b/eaterplanet_ecommerce/moduleA/menu/list.wxss new file mode 100644 index 0000000..0bfa16f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/list.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/menu/list.wxss */ diff --git a/eaterplanet_ecommerce/moduleA/menu/subcate.js b/eaterplanet_ecommerce/moduleA/menu/subcate.js new file mode 100644 index 0000000..6762e85 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/subcate.js @@ -0,0 +1,58 @@ +const app = getApp(); + +Page({ + data: { + subCate: [] + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getCate(); + }, + + /** + * 获取子分类 + */ + getCate: function () { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'recipe.get_recipe_categorylist' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let subCate = res.data.data || []; + that.setData({ subCate }) + } + } + }) + }, + + goList: function(e){ + let subId = e.currentTarget.dataset.id || ''; + let name = e.currentTarget.dataset.name || ''; + wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/menu/list?gid=${subId}&name=${name}` + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/menu/subcate.json b/eaterplanet_ecommerce/moduleA/menu/subcate.json new file mode 100644 index 0000000..671d40e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/subcate.json @@ -0,0 +1,7 @@ +{ + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-img": "../../components/img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/subcate.wxml b/eaterplanet_ecommerce/moduleA/menu/subcate.wxml new file mode 100644 index 0000000..f70d95a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/subcate.wxml @@ -0,0 +1,13 @@ + + + + + {{item.name}} + + + + {{sub.name}} + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/menu/subcate.wxss b/eaterplanet_ecommerce/moduleA/menu/subcate.wxss new file mode 100644 index 0000000..0f4f4e6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/menu/subcate.wxss @@ -0,0 +1,43 @@ +/* 子分类 */ +.cate { + padding-top: 20rpx; +} + +.sub-tit { + font-size: 32rpx; + color: #000; + padding: 20rpx 30rpx; +} + +.scroll-lock { + height: 100vh; + overflow-y: hidden; +} + +.sub-list { + flex-wrap: wrap; + padding: 0 15rpx; +} + +.sub-list .item { + width: 25%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-bottom: 30rpx; +} + +.sub-list .item .img { + width: 122rpx; + height: 122rpx; + border-radius: 50%; +} + +.sub-list .item .name { + font-size: 28rpx; + color: #666; + margin: 15rpx 0; + width: 100%; + text-align: center; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/excharge.js b/eaterplanet_ecommerce/moduleA/pin/excharge.js new file mode 100644 index 0000000..e1408f9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/excharge.js @@ -0,0 +1,320 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/commonMixin.js')], + /** + * 页面的初始数据 + */ + data: { + type: 1, + items: [{ + name: '1', + value: '系统余额', + show: true, + checked: false + }, + { + name: '2', + value: '微信零钱', + show: true, + checked: false + }, + { + name: '3', + value: '支付宝', + show: true, + checked: false + }, + { + name: '4', + value: '银行卡', + show: true, + checked: false + } + ], + info: [], + tixian_money: '', + final_money: 0 + }, + canTixian: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + wx.showLoading(); + this.getData(); + }, + + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ + needAuth: false + }) + } else { + that.setData({ + needAuth: true + }) + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + wx.showLoading(); + that.getData(); + }) + }, + + getData: function() { + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'groupdo.get_commission_info', + token: token + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let commiss_tixian_publish = res.data.data.commiss_tixian_publish; + let items = that.data.items; + let rdata = res.data.data; + if (rdata.commiss_tixianway_yuer == 0) items[0].show = false; + if (rdata.commiss_tixianway_weixin == 0) items[1].show = false; + if (rdata.commiss_tixianway_alipay == 0) items[2].show = false; + if (rdata.commiss_tixianway_bank == 0) items[3].show = false; + + let type = that.data.type; + for (let i = 0; i < items.length; i++) { + if (items[i].show) { + items[i].checked = true; + type = items[i].name; + break + } + } + + that.setData({ + info: res.data.data, + items, + type, + commiss_tixian_publish + }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + formSubmit: function(e) { + const params = e.detail.value; + let isNull = 0; + let type = this.data.type; + let errortip = [{}, {}, { + bankusername: '微信真实姓名' + }, { + bankusername: '支付宝真实姓名', + bankaccount: '支付宝账户' + }, { + bankname: '银行卡名称', + bankusername: '持卡人姓名', + bankaccount: '银行卡账户' + }]; + for (let item in params) { + params[item] = params[item].replace(/(^\s*)|(\s*$)/g, ""); + if (!params[item]) { + const itemTip = errortip[type][item]; + wx.showToast({ + title: '请输入' + (itemTip || '正确的表单内容'), + icon: 'none' + }) + isNull = 1; + break; + } + if (item == 'money' && params[item] * 1 <= 0) { + wx.showToast({ + title: '请输入正确的金额', + icon: 'none' + }) + return; + } + } + + if (isNull == 1) return; + params.type = this.data.type; + console.log(params); + + let tdata = this.data; + let tixian_money = parseFloat(tdata.tixian_money); + let max_tixian_money = tdata.info.money; + let community_min_money = parseFloat(tdata.info.commiss_min_tixian_money); + + if (tixian_money == '' || community_min_money > tixian_money) { + wx.showToast({ + title: '最小提现' + community_min_money + '元', + icon: "none", + }) + return false; + } + + if (tixian_money > max_tixian_money) { + wx.showToast({ + title: '本次最大可提现' + max_tixian_money + '元', + icon: "none", + }) + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money + }) + return false; + } + + if (!this.canTixian) return; + this.canTixian = false; + + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'groupdo.tixian_sub', + token: token, + ...params + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + wx.showToast({ + title: '已提交申请', + icon: 'none', + duration: 2000, + success: function () { + that.setData({ + canPay: false, + tixian_money: '', + final_money: 0 + }) + that.getData(); + } + }) + } else { + wx.showToast({ + title: res.data.msg ? res.data.msg : '提交失败,请重试', + icon: 'none' + }) + } + } + }) + }, + + /** + * 获得焦点 + */ + bindIptFocus: function() { + this.setData({ + onFocus: true + }) + }, + + /** + * 失去焦点 + */ + bindIptBlur: function() { + this.setData({ + onFocus: false + }) + }, + + radioChange(e) { + this.setData({ + type: e.detail.value + }) + }, + + bindTixianMoneyInput: function(t) { + let max_val = this.data.info.money; + var value = t.detail.value; + if (!(/^(\d?)+(\.\d{0,2})?$/.test(value))) { + value = value.substring(0, value.length - 1); + value = parseFloat(value); + } + + if (value > max_val) { + wx.showToast({ + title: '本次最大可提现' + max_val + '元', + icon: "none", + }) + } + let fee = this.data.info.commiss_tixian_bili; + let final_money = (value * (100 - fee) / 100).toFixed(2); + + let canPay = false; + value ? canPay = true : canPay = false; + + this.setData({ + tixian_money: value, + final_money: final_money, + canPay + }) + return value; + }, + + getAll: function() { + const tdata = this.data; + var max_tixian_money = tdata.info.money * 1; + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + + let canPay = false; + max_tixian_money ? canPay = true : canPay = false; + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + canPay + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/excharge.json b/eaterplanet_ecommerce/moduleA/pin/excharge.json new file mode 100644 index 0000000..7639879 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/excharge.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "提现", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/excharge.wxml b/eaterplanet_ecommerce/moduleA/pin/excharge.wxml new file mode 100644 index 0000000..510bce2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/excharge.wxml @@ -0,0 +1,58 @@ + + + + + {{info.money}} + 可提现金额(元) + + 提现记录 + +
+ + + + 全部提现 + + + 手续费:{{info.commiss_tixian_bili+'%'}} 最终到账:{{final_money}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提现规则: + + + + +
+ + diff --git a/eaterplanet_ecommerce/moduleA/pin/excharge.wxss b/eaterplanet_ecommerce/moduleA/pin/excharge.wxss new file mode 100644 index 0000000..4849b5f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/excharge.wxss @@ -0,0 +1 @@ +@import "/eaterplanet_ecommerce/resource/css/excharge.wxss"; diff --git a/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.js b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.js new file mode 100644 index 0000000..4786678 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.js @@ -0,0 +1,120 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + loadText: '加载中', + loadMore: false, + noData: false, + state: ['提现中', '提现成功', '提现失败'] + }, + page: 1, + noMore: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.getData(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getData(); + }) + }, + + getData: function() { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'groupdo.tixian_record', + token: token, + page: this.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.data; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list }) + } else { + // 无数据 + if (that.page == 1) that.setData({ noData: true }) + that.noMore = true; + that.setData({ loadMore: false }) + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + wx.showModal({ + title: '提示', + content: '您还未登录', + showCancel: false, + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + this.noMore || (this.setData({ loadMore: true }), this.getData()); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.json b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.json new file mode 100644 index 0000000..b0c579c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "提现记录", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxml b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxml new file mode 100644 index 0000000..11517cb --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxml @@ -0,0 +1,22 @@ + + + + + 申请时间 + 状态 + 金额(元) + + + + {{item.addtime}} + {{state[item.state]}} + {{item.money}} + + + + + + 暂无任何明细记录 + + + diff --git a/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxss b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxss new file mode 100644 index 0000000..0d4a5e2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/exchargeRecord.wxss @@ -0,0 +1,63 @@ + +.title { + position: fixed; + top: 0; + left: 0; + right: 0; + display: flex; + align-items: center; + background-color: #fff; + color: #333; + line-height: 80rpx; + font-size: 28rpx; + text-align: center; + box-shadow: 1px 2px 3px rgba(0, 0, 0, .3); + font-weight: bold; +} + +.time { + flex: 3; +} + +.status { + flex: 1; +} + +.money { + flex: 2; +} + +.list { + padding-top: 80rpx; + text-align: center; + background-color: #fff; + font-size: 24rpx; +} + +.list-item { + position: relative; + display: flex; + align-items: center; + line-height: 76rpx; + border-bottom: 1rpx solid #efefef; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/goodsDetail.js b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.js new file mode 100644 index 0000000..3314648 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.js @@ -0,0 +1,1414 @@ +// eaterplanet_ecommerce/pages/goods/goodsDetail.js +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +var app = getApp(); +var detailClearTime = null; + +function count_down(that, total_micro_second) { + var second = Math.floor(total_micro_second / 1000); + var days = second / 3600 / 24; + var daysRound = Math.floor(days); + var hours = second / 3600 - (24 * daysRound); + var hoursRound = Math.floor(hours); + var minutes = second / 60 - (24 * 60 * daysRound) - (60 * hoursRound); + var minutesRound = Math.floor(minutes); + var seconds = second - (24 * 3600 * daysRound) - (3600 * hoursRound) - (60 * minutesRound); + + that.setData({ + endtime: { + days: fill_zero_prefix(daysRound), + hours: fill_zero_prefix(hoursRound), + minutes: fill_zero_prefix(minutesRound), + seconds: fill_zero_prefix(seconds), + show_detail: 1 + } + }); + + if (total_micro_second <= 0) { + clearTimeout(detailClearTime); + detailClearTime = null; + if (that.data.goods.over_type == 0) { + that.authSuccess(); + } + that.setData({ + endtime: { + days: "00", + hours: "00", + minutes: "00", + seconds: "00", + } + }); + return; + } + + detailClearTime = setTimeout(function () { + total_micro_second -= 1000; + count_down(that, total_micro_second); + }, 1000) + +} +// 位数不足补零 +function fill_zero_prefix(num) { + return num < 10 ? "0" + num : num +} + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + needAuth: false, + goodsIndex: 1, + goods_id: 0, + endtime: { + days: "00", + hours: "00", + minutes: "00", + seconds: "00", + }, + is_share_html: true, + imageSize: { + imageWidth: "100%", + imageHeight: 600 + }, + cartNum: 0, + noIns: false, + index_bottom_image: '', + hideModal: true, + shareImgUrl: '', + goods_details_middle_image: '', + is_show_buy_record: 0, + stopNotify: true, + iconArr: { + home: '', + car: '' + }, + canvasWidth: 375, + canvasHeight: 300, + fmShow: true, + pinListCount: 0, + pinList: [], + needPosition: false, + groupInfo: { + group_name: '社区', + owner_name: '团长' + } + }, + $data: { + id: '', + scene: '' + }, + imageUrl: '', + goodsImg: '', + currentOptions: [], + buy_type: 'pindan', + canPreSub: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + app.globalData.navBackUrl = ''; + var that = this; + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { that.setData({ groupInfo }) }); + status.setIcon().then(function (iconArr) { + that.setData({ iconArr }); + }); + var scene = decodeURIComponent(options.scene); + this.$data.id = options.id; + this.$data.scene = options.scene; + if (scene !== 'undefined') { + var opt_arr = scene.split("_"); + options.id = opt_arr[0]; + options.share_id = opt_arr[1]; + options.community_id = opt_arr[2]; + } + if (options.community_id !== 'undefined' && options.community_id > 0) { + this.$data.community_id = options.community_id; + } + wx.showLoading(); + + if (options.share_id != 'undefined' && options.share_id > 0) wx.setStorage({ key: "share_id", data: options.share_id }) + + this.get_goods_details(options.id); + this.get_instructions(); + this.setData({ + canvasWidth: app.globalData.systemInfo.windowWidth, + canvasHeight: 0.8 * app.globalData.systemInfo.windowWidth, + goods_id: options.id + }) + }, + + get_goods_details: function (id) { + let that = this; + if (!id) { + wx.hideLoading(); + wx.showModal({ + title: '提示', + content: '参数错误', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + return false; + } + this.getFujinTuan(id); + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let community_id = community.communityId || 0; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'groupdo.get_goods_detail', + token: token, + id, + community_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + let goods = (res.data.data && res.data.data.goods) || ''; + // 商品不存在 + if (!goods || goods.length == 0 || Object.keys(goods) == '') { + wx.showModal({ + title: '提示', + content: '该商品不存在,回首页', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/pin/index', + }) + } + } + }) + } + let comment_list = res.data.comment_list; + comment_list.map(function (item) { + 14 * item.content.length / app.globalData.systemInfo.windowWidth > 3 && (item.showOpen = true), item.isOpen = true; + }) + + // 幻灯片预览数组 + let goods_images = res.data.data.goods_image; + let prevImgArr = []; + goods_images.forEach(function (item) { prevImgArr.push(item.image); }) + + that.currentOptions = res.data.data.options; + let pin_info = res.data.data.pin_info || {}; + + // 开启社区 + let pintuan_model_buy = res.data.pintuan_model_buy || 0; + let is_comunity_rest = res.data.is_comunity_rest || 0; + let needPosition = false; + if (pintuan_model_buy==1) { + needPosition = true; + // 团长休息 + if (is_comunity_rest==1) { + wx.showModal({ + title: '温馨提示', + content: '团长休息中,欢迎下次光临!', + showCancel: false, + confirmColor: '#F75451', + confirmText: '好的', + success(res) { } + }) + } + that.needCommunity(); + } + + that.setData({ + needPosition, + pintuan_model_buy, + is_comunity_rest, + order_comment_count: res.data.order_comment_count, + comment_list: comment_list, + goods: goods, + options: res.data.data.options, + order: { + goods_id: res.data.data.goods.goods_id, + pin_id: res.data.data.pin_id, + }, + share_title: goods.share_title, + buy_record_arr: res.data.data.buy_record_arr, + goods_image: res.data.data.goods_image, + goods_image_length: res.data.data.goods_image.length, + service: goods.tag, + showSkeleton: false, + is_comunity_rest: res.data.is_comunity_rest, + prevImgArr, + open_man_orderbuy: res.data.open_man_orderbuy, + man_orderbuy_money: res.data.man_orderbuy_money, + goodsdetails_addcart_bg_color: res.data.goodsdetails_addcart_bg_color || 'linear-gradient(270deg, #f9c706 0%, #feb600 100%)', + goodsdetails_buy_bg_color: res.data.goodsdetails_buy_bg_color || 'linear-gradient(90deg, #ff5041 0%, #ff695c 100%)', + pin_info, + pintuan_close_stranger: res.data.pintuan_close_stranger, + is_need_subscript: res.data.is_need_subscript, + need_subscript_template: res.data.need_subscript_template + }, () => { + let goods_share_image = goods.goods_share_image; + if (goods_share_image) { + console.log('draw分享图'); + status.download(goods_share_image + "?imageView2/1/w/500/h/400").then(function (a) { + that.goodsImg = a.tempFilePath, that.drawImgNoPrice(); + }); + } else { + console.log('draw价格'); + let shareImg = goods.image_thumb; + status.download(shareImg + "?imageView2/1/w/500/h/400").then(function (a) { + that.goodsImg = a.tempFilePath, that.drawImg(); + }); + } + }) + let over_type = goods.over_type; + var seconds = 0; + if (over_type == 0) { + seconds = (goods.begin_time - res.data.data.cur_time) * 1000; + } else { + seconds = (goods.end_time - res.data.data.cur_time) * 1000; + } + if (seconds > 0) { + count_down(that, seconds); + } + } + }) + }, + + /** + * 需要社区 + * 判断是否已绑定 + */ + needCommunity: function () { + let that = this; + console.log('需要社区') + let token = wx.getStorageSync('token'); + //当前社区 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunityId = (currentCommunity && currentCommunity.communityId) || ''; + let shareCommunityId = this.$data.community_id; + console.log('shareCommunityId', shareCommunityId) + + // 单社区 + util.getCommunityById(shareCommunityId).then(res => { + if (res.open_danhead_model == 1) { + let default_head_info = res.default_head_info; + app.globalData.community = default_head_info; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: default_head_info }) + that.setData({ community: default_head_info }) + token && that.addhistory(default_head_info); + } else { + // 社区是否存在 + if (currentCommunityId != '') { + // 存在并且不相同 + console.log('currentCommunityId存在 比较社区') + if (currentCommunityId != shareCommunityId) { + console.log('currentCommunityId存在 社区不同') + if (res.data) { + that.setData({ + showChangeCommunity: true, + changeCommunity: res.data, + community: currentCommunity + }) + } + } + } else { + // 不存在社区id + //token 是否存在 + if (token) { + util.getCommunityInfo().then(function (ret) { + //比较社区 + console.log('token存在 比较社区') + if (ret.community_id && ret.community_id != shareCommunityId) { + that.setData({ + showChangeCommunity: true, + changeCommunity: res.data, + community: currentCommunity + }) + } + }).catch((param) => { + console.log('step4 新人') + if (Object.keys(param) != '') that.addhistory(param, true); + }); + } else { + console.log('token不存在 存社区') + // 直接存本地 + app.globalData.community = res.data; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: res.data }) + that.setData({ community: res.data }) + } + } + } + }) + }, + + /** + * 切换提示 + */ + confrimChangeCommunity: function () { + let community = this.data.changeCommunity; + let token = wx.getStorageSync('token'); + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + token && this.addhistory(community); + + this.setData({ community, showChangeCommunity: false }) + this.get_goods_details(this.data.goods_id, community, community.communityId); + console.log('用户点击确定') + }, + + /** + * 历史社区 + */ + addhistory: function (community, isNew = false) { + var community_id = community.communityId; + console.log('addhistory'); + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.addhistory_community', + community_id: community_id, + token: token + }, + dataType: 'json', + success: function (res) { + if (isNew) { + console.log('新人 社区') + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_community_info', + community_id: community_id + }, + dataType: 'json', + success: function (result) { + if (result.data.code == 0) { + let community = result.data.data; + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: community }) + } + } + }) + } + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + var id = this.$data.id; + var scene = this.$data.scene; + let url = '/eaterplanet_ecommerce/moduleA/pin/goodsDetail?id=' + id + '&scene=' + scene; + app.globalData.navBackUrl = url; + wx.redirectTo({ url }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + } + }) + this.setData({ + stopNotify: false + }); + }, + + /** + * 图片信息 + */ + imageLoad: function (e) { + var imageSize = util.imageUtil(e) + this.setData({ + imageSize + }) + }, + + /** + * 获取服务信息 + */ + get_instructions: function () { + let that = this; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'goods.get_instructions' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + var instructions = res.data.data.value; + if (instructions == '') that.setData({ noIns: true }) + that.setData({ + instructions, + index_bottom_image: res.data.data.index_bottom_image, + goods_details_middle_image: res.data.data.goods_details_middle_image, + is_show_buy_record: res.data.data.is_show_buy_record, + order_notify_switch: res.data.data.order_notify_switch, + is_show_comment_list: res.data.data.is_show_comment_list, + goods_details_price_bg: res.data.data.goods_details_price_bg, + isShowContactBtn: res.data.data.index_service_switch || 0, + goods_industrial_switch: res.data.data.goods_industrial_switch || 0, + goods_industrial: res.data.data.goods_industrial || '', + is_show_ziti_time: res.data.data.is_show_ziti_time || 0, + hide_community_change_btn: res.data.data.hide_community_change_btn || 0, + is_show_goodsdetails_communityinfo: res.data.data.is_show_goodsdetails_communityinfo || 0 + }) + } + } + }) + }, + + getFujinTuan: function (goods_id){ + let that = this; + let community = wx.getStorageSync('community'); + let head_id = community.communityId || 0; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'groupdo.get_goods_fujin_tuan', + goods_id, + limit: 4, + head_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { list, count } = res.data; + if (list.length) { + let timestamp = Date.parse(new Date()); + list.forEach((item, index)=>{ + list[index].seconds = (item.end_time - item.cur_interface_time)*1000 + timestamp; + console.log((item.end_time - item.cur_interface_time)) + }) + } + that.setData({ + pinList: list || [], + pinListCount: count || 0 + }) + } + } + }) + }, + + /** + * 打开购物车 + */ + openSku: function (t) { + if (!this.authModal()) return; + this.canPreSub = true; + var that = this; + var is_just_addcar = 0; + var goods_id = this.data.goods_id; + var options = this.currentOptions; + that.setData({ addCar_goodsid: goods_id }) + let list = options.list || []; + let arr = []; + if (list.length > 0) { + for (let i = 0; i < list.length; i++) { + let sku = list[i]['option_value'][0]; + let temp = { + name: sku['name'], + id: sku['option_value_id'], + index: i, + idx: 0 + }; + arr.push(temp); + } + //把单价剔除出来begin + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + var cur_sku_arr = options.sku_mu_list[id]; + that.setData({ + sku: arr, + sku_val: 1, + cur_sku_arr: cur_sku_arr, + skuList: options, + visible: true, + showSku: true, + is_just_addcar + }); + } else { + let goods = this.data.goods; + let danprice = this.data.pin_info.danprice || 0; + let cur_sku_arr = { + canBuyNum: goods.total, + spuName: goods.goodsname, + // actPrice: goods.actPrice, + marketPrice: goods.marketPrice, + stock: goods.total, + skuImage: goods.image_thumb, + pinprice: goods.actPrice, + actPrice: danprice.split(".") + } + that.setData({ + sku: [], + sku_val: 1, + cur_sku_arr: cur_sku_arr, + skuList: [], + visible: true, + showSku: true + }) + } + }, + + /** + * 确认购物车 + */ + gocarfrom: function (e) { + var that = this; + wx.showLoading(); + var token = wx.getStorageSync('token'); + + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.get_member_form_id', + 'token': token, + "from_id": e.detail.formId + }, + dataType: 'json', + success: function (res) { } + }) + + that.goOrder(); + }, + + /** + * 关闭购物车 + */ + closeSku: function () { + this.setData({ + visible: 0, + stopClick: false, + }); + }, + + goOrder: function () { + var that = this; + if (that.data.can_car) { + that.data.can_car = false; + } + + let open_man_orderbuy = this.data.open_man_orderbuy; + if (open_man_orderbuy == 1) { + let man_orderbuy_money = this.data.man_orderbuy_money * 1; + let sku_val = this.data.sku_val; + let cur_sku_arr = this.data.cur_sku_arr; + let actPrice = cur_sku_arr.actPrice[0] + '.' + cur_sku_arr.actPrice[1]; + console.log(actPrice * 1 * sku_val); + if (actPrice * 1 * sku_val < man_orderbuy_money) { + wx.showToast({ + title: '满' + man_orderbuy_money + '元可下单!', + icon: 'none' + }) + return false; + } + } + + var goods_id = that.data.addCar_goodsid; + var quantity = that.data.sku_val; + var cur_sku_arr = that.data.cur_sku_arr; + var sku_str = ''; + var is_just_addcar = 0; + let buy_type = this.buy_type; + let community = wx.getStorageSync('community'); + let community_id = community.communityId || 0; + + if (cur_sku_arr && cur_sku_arr.option_item_ids) { + sku_str = cur_sku_arr.option_item_ids; + } + + let data = { + goods_id, + community_id, + quantity, + sku_str, + buy_type, + pin_id: 0, + is_just_addcar + } + + util.addCart(data).then(res=>{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + wx.hideLoading(); + that.setData({ pop_vipmember_buyimage, showVipModal: true, visible: false }) + } else if (res.data.code == 3 || res.data.code == 7) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + wx.hideLoading(); + that.setData({ needAuth: true, showAuthModal: true, visible: false }) + } else if (res.data.code == 6) { + var msg = res.data.msg; + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ sku_val: max_quantity }) + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + var is_limit = res.data.is_limit_distance_buy; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: `/eaterplanet_ecommerce/pages/order/placeOrder?type=${buy_type}&is_limit=${is_limit}` + }) + } else { + wx.navigateTo({ + url: `/eaterplanet_ecommerce/pages/order/placeOrder?type=${buy_type}&is_limit=${is_limit}` + }) + } + } + }).catch(res=>{ + app.util.message(res||'请求失败', '', 'error'); + }) + }, + + selectSku: function (event) { + var that = this; + let str = event.currentTarget.dataset.type; + let obj = str.split("_"); + let arr = that.data.sku; + let temp = { + name: obj[3], + id: obj[2], + index: obj[0], + idx: obj[1] + }; + arr.splice(obj[0], 1, temp); + that.setData({ + sku: arr + }) + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + var options = this.data.skuList; + var cur_sku_arr = options.sku_mu_list[id]; + + that.setData({ + cur_sku_arr: cur_sku_arr + }); + + console.log(id); + }, + + submit: function (e) { + var from_id = e.detail.formId; + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.get_member_form_id', + 'token': token, + "from_id": from_id + }, + dataType: 'json', + success: function (res) { } + }) + }, + + /** + * 开团订阅 + */ + preBalance: function(e){ + if (!this.authModal()) return; + let that = this; + if(!this.canPreSub) return; + this.canPreSub = false; + let is_need_subscript = this.data.is_need_subscript; + let buy_type = e.currentTarget.dataset.type; + this.buy_type = buy_type; + this.setData({ buy_type }) + + if(is_need_subscript==1) { + //弹出订阅消息 + this.subscriptionNotice().then(()=>{ + that.openSku(buy_type); + }).catch(()=>{ + that.openSku(buy_type); + }); + } else { + that.openSku(buy_type); + } + }, + + /** + * 订阅消息 + */ + subscriptionNotice: function() { + console.log('subscriptionNotice') + let that = this; + return new Promise((resolve, reject)=>{ + let obj = that.data.need_subscript_template; + let tmplIds = Object.keys(obj).map(key => obj[key]); // 订阅消息模版id + if (wx.requestSubscribeMessage) { + tmplIds.length && wx.requestSubscribeMessage({ + tmplIds: tmplIds, + success(res) { + let is_need_subscript = 1; + let acceptId = []; + tmplIds.forEach(item=>{ + if (res[item] == 'accept') { + //用户同意了订阅,添加进数据库 + acceptId.push(item); + } else { + //用户拒绝了订阅或当前游戏被禁用订阅消息 + is_need_subscript = 0; + } + }) + + if(acceptId.length) { + that.addAccept(acceptId); + } + that.setData({ is_need_subscript }) + resolve(); + }, + fail() { + reject(); + } + }) + } else { + // 兼容处理 + reject(); + } + }) + }, + + // 用户点击订阅添加到数据库 + addAccept: function (acceptId) { + let token = wx.getStorageSync('token'); + let type = acceptId.join(','); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.collect_subscriptmsg', + token, + type + }, + dataType: 'json', + method: 'POST', + success: function () {} + }) + }, + + balance: function (e) { + if (!this.authModal()) return; + let that = this; + let buy_type = e.currentTarget.dataset.type; + // let isZreo = e.currentTarget.dataset.zero || 0; + this.buy_type = buy_type; + this.setData({ buy_type }) + // if (isZreo == 1) { + // this.zeroModal(()=>{ + // that.openSku(buy_type); + // }); + // } else { + that.openSku(buy_type); + // } + }, + + /** + * 数量加减 + */ + setNum: function (event) { + let types = event.currentTarget.dataset.type; + var that = this; + var num = 1; + let sku_val = this.data.sku_val * 1; + if (types == 'add') { + num = sku_val + 1; + } else if (types == 'decrease') { + if (sku_val > 1) { + num = sku_val - 1; + } + } + + let arr = that.data.sku; + var options = this.data.skuList; + if (arr.length > 0) { + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + } + if (options.length > 0) { + var cur_sku_arr = options.sku_mu_list[id]; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } else { + let cur_sku_arr = this.data.cur_sku_arr; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } + this.setData({ + sku_val: num + }) + }, + + scrollImagesChange: function (t) { + this.videoContext.pause(); + this.setData({ + fmShow: true, + goodsIndex: t.detail.current + 1 + }); + }, + + share_handler: function () { + this.setData({ + is_share_html: !this.data.is_share_html + }) + }, + + share_quan: function () { + if (!this.authModal()) return; + wx.showLoading({ + title: '获取中', + }) + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + var goods_id = this.data.order.goods_id; + var community_id = community.communityId; + var that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'goods.get_user_goods_qrcode', + token: token, + community_id: community_id, + goods_id: goods_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + setTimeout(function () { + wx.hideLoading() + }, 2000) + var image_path = res.data.image_path; + wx.getImageInfo({ + src: image_path, + success: function (res) { + var real_path = res.path; + wx.saveImageToPhotosAlbum({ + filePath: real_path, + success(res) { + wx.showToast({ + title: '图片保存成功,可以分享了', + icon: 'none', + duration: 2000 + }) + that.setData({ + is_share_html: true + }); + } + }) + } + }) + } else { + that.setData({ + needAuth: true + }) + } + } + }) + }, + + onReady: function (res) { + this.videoContext = wx.createVideoContext('myVideo'); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + this.setData({ stopNotify: true }) + console.log('详情页hide', this.data.stopNotify) + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + console.log('onUnload') + this.setData({ stopNotify: true }) + console.log('详情页unload', this.data.stopNotify); + detailClearTime = null; + clearTimeout(detailClearTime); + }, + + /** + * 获取分享图并显示 + * 20181225 新形式 + */ + get_share_img: function () { + if (!this.authModal()) return; + wx.showLoading(); + let shareImgUrl = this.data.shareImgUrl; + if (shareImgUrl != '') { + wx.hideLoading(); + this.setData({ + hideModal: false, + is_share_html: true + }) + } else { + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + var goods_id = this.data.goods_id; + var community_id = community.communityId; + + var that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'goods.get_user_goods_qrcode', + token: token, + community_id: community_id, + goods_id: goods_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + wx.hideLoading(); + var image_path = res.data.image_path; + wx.previewImage({ + current: image_path, // 当前显示图片的http链接 + urls: [image_path] // 需要预览的图片http链接列表 + }) + } else { + that.setData({ + needAuth: true + }) + } + } + }) + } + }, + + closeShareModal: function () { + this.setData({ hideModal: true }) + }, + + /** + * 展开收起 + */ + bindOpen: function (t) { + var idx = t.currentTarget.dataset.idx; + console.log(idx) + if (this.data.comment_list[idx].isOpen) { + this.data.comment_list[idx].isOpen = false; + var comment_list = this.data.comment_list; + this.setData({ + comment_list: comment_list + }); + } else { + this.data.comment_list[idx].isOpen = true; + var comment_list = this.data.comment_list; + this.setData({ + comment_list: comment_list + }); + } + }, + + /** + * 保存分享图并显示 + * 20181225 新形式 + */ + saveThumb: function (e) { + wx.showLoading(); + let that = this; + var image_path = this.data.shareImgUrl; + wx.getImageInfo({ + src: image_path, + success: function (res) { + var real_path = res.path; + real_path && wx.saveImageToPhotosAlbum({ + filePath: real_path, + success(res) { + console.log(res) + wx.hideLoading(); + wx.showToast({ + title: '已保存相册', + icon: 'none', + duration: 2000 + }) + that.setData({ + hideModal: true + }); + }, + fail: function (res) { + wx.hideLoading(); + console.log(res) + if (res.errMsg === "saveImageToPhotosAlbum:fail:auth denied") { + wx.openSetting({ + success(settingdata) { + if (settingdata.authSetting["scope.writePhotosAlbum"]) { + console.log("获取权限成功,再次点击图片保存到相册") + } else { + console.log("获取权限失败") + } + } + }) + } + } + }) + } + }) + }, + + drawImgNoPrice: function () { + var t = this; + wx.createSelectorQuery().select(".canvas-img").boundingClientRect(function () { + const context = wx.createCanvasContext("myCanvas"); + context.drawImage(t.goodsImg, 0, 0, status.getPx(375), status.getPx(300)); + if (t.data.goods.video) context.drawImage("../../images/play.png", status.getPx(127.5), status.getPx(90), status.getPx(120), status.getPx(120)); + context.save(); + context.restore(), context.draw(false, t.checkCanvasNoPrice()); + }).exec(); + }, + + checkCanvasNoPrice: function () { + var that = this; + setTimeout(() => { + wx.canvasToTempFilePath({ + canvasId: "myCanvas", + success: function (res) { + res.tempFilePath ? that.imageUrl = res.tempFilePath : that.drawImgNoPrice(); + console.log('我画完了') + }, + fail: function (a) { + that.drawImgNoPrice(); + } + }) + }, 500) + }, + + drawImg: function () { + let endtime = this.data.endtime; + let shareTime = (endtime.days > 0 ? endtime.days + '天' : '') + endtime.hours + ':' + endtime.minutes + ':' + endtime.seconds; + var t = this; + wx.createSelectorQuery().select(".canvas-img").boundingClientRect(function () { + const context = wx.createCanvasContext("myCanvas"); + context.font = "28px Arial"; + var e = context.measureText("¥").width + 2; + var o = context.measureText(t.data.goods.price_front + "." + t.data.goods.price_after).width; + context.font = "17px Arial"; + var s = context.measureText("¥" + t.data.goods.productprice).width + 3, + n = context.measureText("累计销售 " + t.data.goods.seller_count).width, + u = context.measureText("· 剩余" + t.data.goods.total + " ").width + 10; + context.font = "18px Arial"; + let over_type_text = t.data.goods.over_type == 0 ? '距开始' : '距结束'; + var r = context.measureText(over_type_text).width; + var d = context.measureText(shareTime).width + 10; + context.drawImage(t.goodsImg, 0, 0, status.getPx(375), status.getPx(300)); + context.drawImage("../../images/shareBottomBg.png", status.getPx(0), status.getPx(225), status.getPx(375), status.getPx(75)); + if (t.data.goods.video) context.drawImage("../../images/play.png", status.getPx(127.5), status.getPx(70), status.getPx(120), status.getPx(120)); + context.save(); + status.drawText(context, { color: "#ffffff", size: 28, textAlign: "left" }, "¥", status.getPx(6), status.getPx(267), status.getPx(e)); + status.drawText(context, { color: "#ffffff", size: 28, textAlign: "left" }, t.data.goods.price_front + "." + t.data.goods.price_after, + status.getPx(e), status.getPx(267), status.getPx(o)); + context.restore(); + context.save(); + context.restore(), + context.save(), + (0, status.drawText)(context, + { color: "#ffffff", size: 15, textAlign: "left" }, + "¥" + t.data.goods.productprice, + (0, status.getPx)(e + o + 10), + (0, status.getPx)(267), + (0, status.getPx)(s) + ), + context.restore(), + context.save(), + (0, status.drawText)( + context, + { color: "#ffffff", size: 17, textAlign: "left" }, + "累计销售" + t.data.goods.seller_count, + (0, status.getPx)(10), + (0, status.getPx)(290), + (0, status.getPx)(n) + ), + context.restore(), + context.save(), + (0, status.drawText)(context, + { color: "#ffffff", size: 17, textAlign: "left" }, + "· 剩余" + t.data.goods.total, + (0, status.getPx)(n + 10), + (0, status.getPx)(290), + (0, status.getPx)(u) + ), + context.restore(), + context.save(), + context.beginPath(), + context.setStrokeStyle("white"), + context.moveTo((0, status.getPx)(e + o + 10), + (0, status.getPx)(261)), + context.lineTo((0, status.getPx)(e + o + s + 15), + (0, status.getPx)(261)), + context.stroke(), + context.restore(), + context.save(), + (0, status.drawText)(context, + { color: "#F8E71C", size: 18, textAlign: "center" }, + over_type_text, + (0, status.getPx)(318), + (0, status.getPx)(260), + (0, status.getPx)(r) + ), + context.restore(), + context.save(), + (0, status.drawText)(context, { color: "#F8E71C", size: 18, textAlign: "center" }, + shareTime, + (0, status.getPx)(315), + (0, status.getPx)(288), + (0, status.getPx)(d) + ), + context.restore(); + context.draw(false, t.checkCanvas()); + }).exec(); + }, + + checkCanvas: function () { + var that = this; + setTimeout(() => { + wx.canvasToTempFilePath({ + canvasId: "myCanvas", + success: function (res) { + res.tempFilePath ? that.imageUrl = res.tempFilePath : that.drawImg(); + console.log('我画完了') + }, + fail: function (a) { + that.drawImg(); + } + }) + }, 500) + }, + + previewImg: function (e) { + let idx = e.currentTarget.dataset.idx || 0; + let prevImgArr = this.data.prevImgArr; + wx.previewImage({ + current: prevImgArr[idx], + urls: prevImgArr + }) + }, + + /** + * 播放视频隐藏封面图 + */ + btnPlay: function () { + this.setData({ + fmShow: false + }) + this.videoContext.play(); + }, + + videEnd: function () { + this.videoContext.exitFullScreen(); + this.setData({ + fmShow: true + }) + }, + + endPlay: function () { + this.videoContext.pause(); + this.setData({ + fmShow: true + }) + }, + + goLink: function (e) { + var pages_all = getCurrentPages(); + var url = e.currentTarget.dataset.link; + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + }, + + /** + * 0元开团提示 + */ + zeroModal: function(fn){ + let pin_info = this.data.pin_info; + let notice = pin_info.pintuan_newman_notice || ''; + if (notice) { + wx.showModal({ + title: '温馨提示', + content: notice, + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + fn() + } else if (res.cancel) { + console.log('用户点击取消') + } + } + }) + } else { + fn() + } + }, + + /** + * 0元开团 + */ + zeroTuanSub: function() { + if (!this.authModal()) return; + let that = this; + this.zeroModal(()=>{ + that.zeroCartAdd() + }); + }, + + zeroCartAdd: function(){ + let goods_id = this.data.goods_id || ''; + var token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let community_id = community.communityId || 0; + goods_id && app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.add_newcar', + token: token, + goods_id: goods_id, + community_id + }, + dataType: 'json', + success: function (res) { + if(res.data.code==0) { + let order_id = res.data.order_id; + wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/pin/share?id=${order_id}` + }) + } else { + wx.showToast({ + title: res.data.msg || '开团失败', + icon: 'none' + }) + } + } + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let { goods_id, share_title, goods } = this.data; + var community = wx.getStorageSync('community'); + var community_id = community.communityId; + var share_id = wx.getStorageSync('member_id'); + var share_path = `eaterplanet_ecommerce/moduleA/pin/goodsDetail?id=${goods_id}&share_id=${share_id}&community_id=${community_id}`; + let shareImg = goods.goods_share_image; + // if(pin_info.is_zero_open!=1 && pin_info.pin_price) share_title = pin_info.pin_price + '元' + share_title; + + var that = this; + that.setData({ is_share_html: true, hideModal: true }); + return { + title: share_title, + path: share_path, + imageUrl: shareImg ? shareImg : that.imageUrl, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function() { + let { goods_id, share_title, goods } = this.data; + var community = wx.getStorageSync('community'); + var community_id = community.communityId; + var share_id = wx.getStorageSync('member_id'); + let shareImg = goods.goods_share_image; + this.setData({ is_share_html: true, hideModal: true }); + + var query= `id=${goods_id}&share_id=${share_id}&community_id=${community_id}`; + return { + title: share_title, + imageUrl: shareImg ? shareImg : this.imageUrl, + query, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/goodsDetail.json b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.json new file mode 100644 index 0000000..9e6db2b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "商品详情", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-count-down": "../../components/count-down/index", + "i-order-notify": "../../components/order-notify/index", + "i-change-community": "../../components/changeCommunity/index", + "parser":"../../components/parser/parser", + "advimg": "../../components/advimg/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxml b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxml new file mode 100644 index 0000000..f26c747 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxml @@ -0,0 +1,401 @@ + + + + + + + + + + {{goods.label_info.tagcontent}} + + + {{goodsIndex}}/{{goods_image_length}} + + + + + + + + + + + + + + + + + + 退出播放 + + + + + ¥ + {{goods.price_front}}.{{goods.price_after}} + ¥{{goods.productprice}} + {{pin_info.pin_count}}人团 + + + 距结束 + 距开始 + 结束时间 + {{goods.end_date}} + + {{endtime.days}}天 + {{endtime.hours}}: + {{endtime.minutes}}: + {{endtime.seconds}} + + + + + {{goods.goodsname}} + + 销量 + 已售 + {{goods.seller_count}} {{goods_sale_unit}},仅剩 + {{goods.total}} {{goods_sale_unit}} + + + + + + + + {{pinListCount}}人正在拼团,可直接参与 + + + + + + + + + + 还差{{item.re_need_count}}人成团 + + + 仅剩 + + + + 去参团 + + + + + + + + + 拼团玩法 + 查看规则 + + + + 1 + 支付开团 + 参团 + + + 2 + 邀请用户 + 参团 + + + 3 + 拼团成功中 + 奖人员发货 + + + 4 + 未中奖人员退 + 款发放奖励 + + + + + + + + + 拼团玩法 + 查看规则 + + + + 1 + 支付开团 + 参团 + + + 2 + 邀请用户 + 参团 + + + 3 + 拼团成功 + 按时送达 + + + 4 + 逾期未成 + 团退款 + + + + + + + + + + + + + 商品评价 + ({{order_comment_count}}) + + + + + {{item.user_name}} + + {{item.content}} + + {{item.isOpen?'展开':'收起'}} + + + + + + + + 查看全部评论 + + + + + + + + + + + + + + + + + + + + + + + + + 工商资质 + + + + + + + + + + + + + + + + + + + 即将开抢 + 已抢光 + 已结束 + 已下架 + 团长休息中 + + + +
+ +
+ +
+ + +
+ +
+ +
+
+
+
+ + + + + + +
+ + + + + 分享 + + + + + + + + + + + + + + + + + + + +
diff --git a/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxss b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxss new file mode 100644 index 0000000..0bc102a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/goodsDetail.wxss @@ -0,0 +1,1568 @@ +page { + background: #f6f6f6; +} + +movable-view { +width: 110rpx; +height: 110rpx; +top: 0; +left: 0; +position: absolute; + +} + +movable-area { + height: 100%; + width: 100%; + margin: 0rpx; + + +} +.goods-wrapper { + position: relative; +} + +swiper { + height: 600rpx; +} + +swiper image { + width: 100%; + height: auto; +} + +.sticky-title { + width: 100%; + display: none; + justify-content: space-between; + background: #fff; + height: 160rpx; + position: relative; + z-index: 3; +} + +.sticky-title.sticky { + position: fixed; + display: flex; + top: 0; + left: 0; + height: 80rpx; + line-height: 80rpx; + width: 100vw; + border-bottom: 2rpx solid rgba(0, 0, 0, 0.1); + animation: opacity 0.2s ease-in-out; +} + +.sticky-title.sticky .nav { + padding-left: 30rpx; +} + +.sticky-title.sticky .nav .tab-btn { + width: 56rpx; + height: 80rpx; + line-height: 80rpx; + margin-right: 36rpx; + color: #666; + font-size: 28rpx; + font-weight: bold; + position: relative; + display: inline-block; +} + +.sticky-title.sticky .nav .tab-btn-active { + color: #ff5344; + line-height: 80rpx; +} + +.sticky-title.sticky .nav .tab-btn-active:after { + content: ''; + width: 56rpx; + height: 6rpx; + border-radius: 6rpx; + background: linear-gradient(to right, #fe655c, #fa875b); + position: absolute; + bottom: 0; + left: 0; + box-shadow: 0 4rpx 8rpx rgba(255, 89, 9, 0.25); +} + +.sticky-title.sticky .time { + width: 290rpx; + height: 80rpx; + font-size: 26rpx; + color: #444; + display: flex; + align-items: center; + padding-right: 30rpx; + justify-content: flex-end; +} + +.sticky-title.sticky .time text { + white-space: nowrap; +} + +.sticky-title.sticky .time .countdownTop { + font-size: 28rpx; + white-space: nowrap; + display: flex; + justify-content: center; + align-items: center; +} + +.sticky-title.sticky .time .countdownTop .itemTimeTop { + width: 38rpx; + height: 32rpx; + background: #444; + border-radius: 4rpx; + font-size: 26rpx; + color: #fff; + display: flex; + justify-content: center; + align-items: center; +} + +.spuInfoImg { + width: 100%; + height: 600rpx; + background-size: 100% 100%; + position: relative; +} + +.spuInfoImg .share { + width: 160rpx; + height: 68rpx; + background: linear-gradient(90deg, #f75451 0%, #fa6f57 100%); + border-radius: 48rpx 0 0 48rpx; + position: absolute; + top: 60rpx; + right: 0; + display: flex; + justify-content: center; + align-items: center; +} + +.spuInfoImg .share .shareImg { + width: 32rpx; + height: 28rpx; + margin-right: 14rpx; +} + +.spuInfoImg .share text { + width: 60rpx; + height: 68rpx; + line-height: 68rpx; + font-size: 26rpx; + color: #fff; +} + +.spuInfoImg .current { + width: 90rpx; + height: 32rpx; + line-height: 32rpx; + text-align: center; + border-radius: 24rpx; + background-color: rgba(0, 0, 0, 0.5); + font-size: 26rpx; + color: #fff; + position: absolute; + left: 50%; + bottom: 110rpx; + margin-left: -44rpx; + z-index: 1; +} + +.spuInfoImg .slide-image { + width: 750rpx; + height: 600rpx; +} + +.spuInfo { + width: 100%; + z-index: 2; + position: relative; + margin-top: -50px; +} + +.spuInfo .spuPrice { + position: relative; + width: 680rpx; + height: 100rpx; + padding-left: 30rpx; + margin: 0 auto; + display: flex; + align-items: center; + justify-content: space-between; +} + +.spuInfo .spuPrice .spuPriceBg { + position: absolute; + top: 0; + left: 0; + width: 710rpx; + height: 100rpx; + z-index: -1; +} + +.spuInfo .spuPrice .price { + font-family: DIN; + font-size: 28rpx; + color: #fff; + margin-top: 10rpx; +} + +.spuInfo .spuPrice .price .salePrice { + font-size: 68rpx; + font-weight: bold; +} + +.spuInfo .spuPrice .price .storePrice { + text-decoration: line-through; + margin-left: 10rpx; +} + +.spuInfo .spuPrice .time { + width: 220rpx; + height: 100rpx; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + font-size: 26rpx; + color: #f8e71c; + white-space: nowrap; +} + +.spuInfo .spuPrice .time text { + line-height: 28rpx; + margin-top: 10rpx; +} + +.spuInfo .spuPrice .time .endAct { + color: #fff; +} + +.spuInfo .spuPrice .time .countdown { + font-size: 28rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spuInfo .spuPrice .time .countdown em { + margin: 0; +} + +.spuInfo .spuPrice .time .countdown .itemTime { + width: 32rpx; + text-align: center; +} + +.spuInfo .bgOne { + background: url(""); + background-size: 100% 100%; +} + +.spuInfo .bgTwo { + background: url(""); + background-size: 100% 100%; +} + +.spuInfo .spuDetailInfo, .spuInfo .straightInLive, .spuInfo .buyRecords { + width: 670rpx; + background: #fff; + box-shadow: 0 0 40rpx 0 rgba(0, 0, 0, 0.05); + border-radius: 0 0 20rpx 20rpx; + padding: 30rpx 20rpx 0; + margin: 0 auto; +} + +.spuInfo .spuDetailInfo .spuName, .spuInfo .straightInLive .spuName, +.spuInfo .buyRecords .spuName { + font-size: 36rpx; + color: #444; + font-weight: bold; + min-height: 48rpx; + line-height: 44rpx; + padding: 0 10rpx; + white-space: initial; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; +} + +.spuInfo .spuDetailInfo .remind, .spuInfo .straightInLive .remind, +.spuInfo .buyRecords .remind { + margin-top: 20rpx; + display: flex; + align-items: center; + padding: 0 10rpx; +} + +.spuInfo .spuDetailInfo .remind .remindImg, +.spuInfo .straightInLive .remind .remindImg, +.spuInfo .buyRecords .remind .remindImg { + width: 28rpx; + height: 28rpx; + margin-right: 20rpx; +} + +.spuInfo .spuDetailInfo .remind text, .spuInfo .straightInLive .remind text, +.spuInfo .buyRecords .remind text { + font-size: 26rpx; + color: #aaa; +} + +.spuInfo .spuDetailInfo .preferential, .spuInfo .straightInLive .preferential, +.spuInfo .buyRecords .preferential { + padding: 24rpx 20rpx; + background: linear-gradient(223deg, #fff7f0 0%, #fff4ec 100%); + border-radius: 16rpx; + margin-top: 40rpx; + margin-bottom: 10rpx; + font-size: 24rpx; + color: #ca7e57; + font-weight: bold; + line-height: 40rpx; +} + +.spuInfo .spuDetailInfo .preferential .tit, +.spuInfo .straightInLive .preferential .tit, +.spuInfo .buyRecords .preferential .tit { + font-size: 20rpx; + color: #ff5344; + border: 2rpx solid #ffa49c; + border-radius: 16rpx; + padding: 0 8rpx; + margin-right: 10rpx; +} + +.spuInfo .spuDetailInfo .preferential .con, +.spuInfo .straightInLive .preferential .con, +.spuInfo .buyRecords .preferential .con { + margin-right: 20rpx; +} + +.spuInfo .spuDetailInfo .purchasing, .spuInfo .spuDetailInfo .saleNum, +.spuInfo .straightInLive .purchasing, .spuInfo .straightInLive .saleNum, +.spuInfo .buyRecords .purchasing, .spuInfo .buyRecords .saleNum { + font-size: 26rpx; + color: #666; + padding: 30rpx 0; + margin: 0 10rpx; + border-bottom: 0.1rpx solid #efefef; +} + +.spuInfo .spuDetailInfo .purchasing .purTit, +.spuInfo .spuDetailInfo .saleNum .purTit, +.spuInfo .straightInLive .purchasing .purTit, +.spuInfo .straightInLive .saleNum .purTit, +.spuInfo .buyRecords .purchasing .purTit, .spuInfo .buyRecords .saleNum .purTit { + color: #444; + font-weight: bold; + margin-right: 20rpx; +} + +.spuInfo .spuDetailInfo .purchasing .remaining, +.spuInfo .spuDetailInfo .saleNum .remaining, +.spuInfo .straightInLive .purchasing .remaining, +.spuInfo .straightInLive .saleNum .remaining, +.spuInfo .buyRecords .purchasing .remaining, +.spuInfo .buyRecords .saleNum .remaining { + font-weight: bold; + margin: 0; + color: #ff5344; +} + +.spuInfo .spuDetailInfo .purchasing .stock, +.spuInfo .spuDetailInfo .saleNum .stock, +.spuInfo .straightInLive .purchasing .stock, +.spuInfo .straightInLive .saleNum .stock, +.spuInfo .buyRecords .purchasing .stock, .spuInfo .buyRecords .saleNum .stock { + display: inline-block; + font-weight: normal; + margin: 0; +} + +.spuInfo .spuDetailInfo .saleNum, .spuInfo .straightInLive .saleNum, +.spuInfo .buyRecords .saleNum { + border: none; +} + +.spuInfo .straightInLive, .spuInfo .buyRecords { + width: 650rpx; + padding: 0 30rpx; + border-radius: 20rpx; + margin: 20rpx auto 0; +} + +.spuInfo .straightInLive .title, .spuInfo .buyRecords .title { + height: 100rpx; + font-size: 32rpx; + color: #444; + font-weight: bold; + border-bottom: 0.1rpx solid #efefef; + display: flex; + align-items: center; +} + +.spuInfo .straightInLive .title .commentsNum, +.spuInfo .buyRecords .title .commentsNum { + font-size: 26rpx; + color: #aaa; + font-weight: normal; +} + +.spuInfo .straightInLive .comments, .spuInfo .buyRecords .comments { + margin-top: 30rpx; +} + +.spuInfo .straightInLive .comments .commentsCon, +.spuInfo .buyRecords .comments .commentsCon { + font-size: 28rpx; + color: #666; + line-height: 44rpx; + margin-bottom: 10rpx; + word-wrap: break-word; +} + +.spuInfo .straightInLive .comments .doubleHidden, +.spuInfo .buyRecords .comments .doubleHidden { + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; + overflow: hidden; + text-overflow: initial; + white-space: normal; +} + +.spuInfo .straightInLive .comments .commentsOpen, +.spuInfo .buyRecords .comments .commentsOpen { + height: 22rpx; + font-size: 22rpx; + color: #444; + font-weight: bold; + margin-bottom: 20rpx; + display: flex; + align-items: center; +} + +.spuInfo .straightInLive .comments .commentsOpen .commentsOpenImg, +.spuInfo .buyRecords .comments .commentsOpen .commentsOpenImg { + width: 16rpx; + height: 8rpx; + margin-left: 6rpx; +} + +.spuInfo .straightInLive .comments .commentsOpen .down, +.spuInfo .buyRecords .comments .commentsOpen .down { + transform: rotate(180deg); +} + +.spuInfo .straightInLive .comments .allImg, +.spuInfo .buyRecords .comments .allImg { + width: 650rpx; + height: 150rpx; + overflow: hidden; +} + +.spuInfo .straightInLive .comments .allImg { + display: flex; + overflow-x: auto; +} + +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} + +.spuInfo .straightInLive .comments .allImg .commentsImg, +.spuInfo .buyRecords .comments .allImg .commentsImg { + width: 150rpx; + height: 150rpx; + margin-right: 16rpx; + display: inline-block; +} + +.spuInfo .straightInLive .comments .allImg .commentsImg .goodsImg, +.spuInfo .buyRecords .comments .allImg .commentsImg .goodsImg { + width: 150rpx; +} + +.spuInfo .straightInLive .comments .allImg .commentsImg .goodsImg .img-class, +.spuInfo .buyRecords .comments .allImg .commentsImg .goodsImg .img-class { + width: 150rpx; + height: 150rpx; + border-radius: 4rpx; + position: unset; +} + +.spuInfo .straightInLive .comments .allImg .commentsImg:last-child, +.spuInfo .buyRecords .comments .allImg .commentsImg:last-child { + margin: 0; +} + +.spuInfo .straightInLive .comments .checkComments, +.spuInfo .buyRecords .comments .checkComments { + font-size: 26rpx; + color: #aaa; + line-height: 26rpx; + padding: 40rpx 0; + text-align: center; +} + +.spuInfo .buyRecords { + width: 650rpx; +} + +.spuInfo .buyRecords .title { + display: flex; + align-items: center; + justify-content: space-between; +} + +.spuInfo .buyRecords .title .buyNum { + font-size: 24rpx; + color: #aaa; + font-weight: normal; +} + +.spuInfo .buyRecords .title .buyNum text { + color: #ff5344; + font-weight: bold; +} + +.spuInfo .buyRecords .title .buyNum .goBuyRecords { + width: 12rpx; + height: 24rpx; + display: inline-block; + margin-bottom: -4rpx; + margin-left: 10rpx; +} + +.spuInfo .buyRecords .buyerList { + padding: 30rpx 20rpx 20rpx; + display: flex; + flex-wrap: wrap; + width: 650rpx; + box-sizing: border-box; +} + +.spuInfo .buyRecords .buyerList .buyerImg { + width: 90rpx; + height: 90rpx; + margin-right: 40rpx; + margin-bottom: 24rpx; + border-radius: 100%; + display: block; +} + +.spuInfo .buyRecords .buyerList .buyerImg .img-class { + width: 90rpx; + height: 90rpx; + border-radius: 100%; +} + +.spuInfo .buyRecords .buyerList .buyerImg:nth-child(5) { + margin-right: 0; +} + +.spuInfo .buyRecords .buyerList .moreBuyer { + display: inline-block; +} + +.spuInfo .buyRecords .buyerList .moreBuyer .buyerImg { + margin-right: 0; +} + +.spuInfo .spuDetail { + width: 100%; +} + +.spuInfo .spuDetail .goodsDetailTitleImg { + width: 336rpx; + height: 60rpx; + margin: 60rpx auto; + display: block; +} + +.spuInfo .spuDetail .warmPrompt .wxParse .wxParse-p .wxParse-inline,.spuInfo .spuDetail .warmPrompt .wxParse .wxParse-inline { + margin: 0 30rpx; +} + +.spuInfo .service { + padding: 40rpx 20rpx 0; +} + +.spuInfo .service .detailLogo { + display: flex; + justify-content: center; + align-items: center; + margin-bottom: 40rpx; +} + +.spuInfo .service .detailLogo text { + width: 130rpx; + height: 2rpx; + background: #e4e4e4; +} + +.spuInfo .service .detailLogo .detailLogoImg { + width: 184rpx; + height: 48rpx; + margin: 0 40rpx; +} + +.spuInfo .service .instructions { + background: #fff; + padding: 40rpx 30rpx; + border-radius: 20rpx; + overflow: hidden; +} + +.spuInfo .service .instructions .instructionsTit { + height: 36rpx; + line-height: 36rpx; + color: #1c1819; + font-size: 28rpx; + font-weight: bold; + margin-left: 28rpx; + margin-bottom: 30rpx; +} + +.spuInfo .service .instructions .instructionsList { + line-height: 36rpx; + color: #999; + font-size: 24rpx; + margin-bottom: 20rpx; + display: flex; + justify-content: space-between; +} + +.spuInfo .service .instructions .instructionsList:last-child { + margin: 0; +} + +.spuInfo .service .instructions .instructionsList .instructionsMark { + width: 6rpx; + height: 6rpx; + background: #ff5344; + margin-top: 16rpx; +} + +.spuInfo .service .instructions .instructionsList .instructionsText { + width: 630rpx; +} + +.spuInfo .service .instructions .instructionsList .instructionsText .instructionsTextTit { + color: #666; + font-weight: bold; +} + +.spuInfo .service .instructions .instructionsList .instructionsText .instructionsUnderline { + color: #666; + text-decoration: underline; +} + +.spuInfo .service .instructions .instructionsList .instructionsText .instructionsTime { + color: #ff6557; + font-weight: bold; +} + +.spuInfo .sloganImg { + width: 250rpx; + height: 56rpx; + padding: 80rpx 0 180rpx; + margin: 0 auto; + display: block; +} + +.goTopImg { + bottom: 160rpx; + right: 30rpx; + width: 45rpx; + height: 45rpx; + position: fixed; + background: rgba(0, 0, 0, 0.5); + border-radius: 50%; + color: #fff; + text-align: center; + z-index: 3; + padding: 15rpx; +} + +@-webkit-keyframes opacity { + 0% { + opacity: 0; + } + + 25% { + opacity: 0.3; + } + + 50% { + opacity: 0.5; + } + + 75% { + opacity: 0.8; + } + + 100% { + opacity: 1; + } +} + +@keyframes opacity { + 0% { + opacity: 0; + } + + 25% { + opacity: 0.3; + } + + 50% { + opacity: 0.5; + } + + 75% { + opacity: 0.8; + } + + 100% { + opacity: 1; + } +} + +.canvas-img { + position: absolute; + top: -20000rpx; +} + +.goodsDetailSkeleton_content { + position: relative; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_img { + width: 750rpx; + height: 600rpx; + background-color: #e4e4e4; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu { + width: 710rpx; + height: 540rpx; + position: absolute; + left: 20rpx; + top: 650rpx; + background: #fff; + border-radius: 20rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list { + height: 60rpx; + margin: 10rpx 30rpx; + display: flex; + justify-content: space-between; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list text { + width: 200rpx; + background: #e4e4e4; + border-radius: 10rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list2 { + height: 60rpx; + margin: 30rpx; + background: #e4e4e4; + border-radius: 10rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list3, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list5 { + height: 60rpx; + margin: 30rpx; + display: flex; + justify-content: flex-start; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list3 .spec1, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list3 .spec2, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list5 .spec1, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list5 .spec2 { + width: 40rpx; + background: #e4e4e4; + border-radius: 10rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list3 .spec2, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list5 .spec2 { + width: 400rpx; + margin-left: 20rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list3 { + height: 36rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_list5 { + height: 44rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_listAct { + width: 670rpx; + height: 120rpx; + margin: 0 auto; + border-radius: 16rpx; + background: linear-gradient(223deg, #fff7f0 0%, #fff4ec 100%); + overflow: hidden; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_listAct .goodsDetailSkeleton_list4 { + height: 32rpx; + margin: 20rpx; + display: flex; + justify-content: flex-start; + align-items: center; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_listAct .goodsDetailSkeleton_list4 .spec1, +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_listAct .goodsDetailSkeleton_list4 .spec2 { + width: 40rpx; + height: 32rpx; + background: #e4e4e4; + border-radius: 8rpx; + margin-right: 20rpx; +} + +.goodsDetailSkeleton_content .goodsDetailSkeleton_spu .goodsDetailSkeleton_listAct .goodsDetailSkeleton_list4 .spec2 { + width: 400rpx; + height: 40rpx; +} + +button::after { + border: none; +} + +/***商品底部按钮begin **/ + +.goods-bottom-bar { + height: 96rpx; + display: flex; +} + +.goods-bottom-bar .leftBtn { + height: 94rpx; + display: flex; + border-top: 2rpx solid #efefef; +} + +.goods-bottom-bar .leftBtn .bar-item { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.goods-bottom-bar .leftBtn .back-to-index { + background-color: #36362D; + border-radius: 0rpx 8rpx 8rpx 0rpx; + width: 125rpx; + height: 96rpx; + font-size: 20rpx; + color: #fff; +} + +.goods-bottom-bar .leftBtn .back-to-index image { + width: 50rpx; + height: 50rpx; +} + +.goods-bottom-bar .leftBtn .shop-cart { + + border-radius: 8rpx 0rpx 0rpx 8rpx; + margin-left: 6rpx; + background-color: #36362D; + width: 125rpx; + height: 96rpx; + font-size: 20rpx; + color: #fff; + position: relative; +} + +.goods-bottom-bar .leftBtn .shop-cart .icon { + + width: 50rpx; + height: 50rpx; + position: relative; +} + +.goods-bottom-bar .leftBtn .shop-cart .icon image { + border-right:3rpx solid #fff; + padding-right: 40rpx; + width: 100%; + height: 100%; +} + +.goods-bottom-bar .leftBtn .shop-cart .icon .cart-num { + position: absolute; + right: -16rpx; + top: -4rpx; + width: 36rpx; + height: 36rpx; + background: #ff758c; + border-radius: 36rpx; + color: #fff; + font-size: 22rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.goods-bottom-bar .goodsStatus { + width: 100%; + height: 96rpx; + background: #dcdcdc; + font-size: 30rpx; + color: #fff; + display: flex; + justify-content: center; + align-items: center; +} + +.goods-bottom-bar .gobuy { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-weight: bold; + /**background-color: #1c1819;**/ + overflow: hidden; + border-radius: 0rpx 40rpx 40rpx 0rpx; + +} +.bar-item add-to-cart { + + background-color: rgb(247, 112, 98); + +} + + +.goods-bottom-bar .gobuy .add-to-cart { + width: 270rpx; + height: 96rpx; + background-color: #36362D; + color: #fff; + font-size: 28rpx; + display: flex; + justify-content: center; + align-items: center; + + +} + +.goods-bottom-bar .gobuy .btn { + width: 270rpx; + height: 96rpx; + position: absolute; + opacity: 0; + z-index: 9; + top: 0; + padding: 0; + margin: 0; + box-shadow: 20rpx 20rpx 20rpx 0rpx rgba(0,0,0,0.8); + +} + +.goods-bottom-bar .gobuy .balanceBtn { + display: flex; + flex: 1; +} + +.goods-bottom-bar .gobuy .balanceBtn .balance { + height: 96rpx; + flex: 1; + background: linear-gradient(90deg, #e7614d 0%, #E57868 100%); + color: #fff; + font-size: 28rpx; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; + border-radius: 0rpx 0px 0px 0rpx; +} + + +.bar-item-price { + font-family: DIN; +} + +.i-fixed-bottom { + background-color: rgba(0,0,0,0.3); + position: fixed; + bottom: 40rpx; + z-index: 100; + overflow: hidden; + left: 30rpx; + right:30rpx; + border-radius: 48rpx 48rpx 48rpx 48rpx; + box-shadow: 0rpx 10rpx 20rpx 10rpx rgba(0,0,0,0.4); + +} + + .filter { + background-color: rgba(255, 255, 255, 0.8); + display: flex; + flex-direction: row; + justify-content: space-around; + position: fixed; + bottom: 40rpx; + left: 0; + z-index: 2; + width: 100%; + height: 96rpx; + backdrop-filter: blur(30rpx) ; + border-radius: 30rpx 30rpx 30rpx 30rpx; + margin-left: 20rpx; + margin-right: 20rpx; + overflow: hidden; +} + +.i-fixed-bottom.iphoneX-height { + padding-bottom: 48rpx; +} + +.i-fixed-bottom.pb20 { + padding-bottom: 40rpx; +} + +.ui-mask { + position: fixed; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background: rgba(0, 0, 0, 0.6); +} + +.model-services { + width: 100%; + position: fixed; + background-color: #fff; + bottom: 0; + z-index: 1000; + color: #333; + -webkit-transition: all 0.3s; + transition: all 0.3s; + -webkit-transform: translate(0, 100%); + transform: translate(0, 100%); +} + +.model-services.show { + -webkit-transform: translate(0); + transform: translate(0); +} + +.model-services .model-services-title { + font-size: 36rpx; + text-align: center; + height: 80rpx; + line-height: 80rpx; + border-bottom: 1px solid #f2f5f8; +} + +.model-services .model-services-content { + padding: 40rpx; +} + +.model-services .model-services-content .service-item { + margin-bottom: 20rpx; + width: 50%; + float: left; + text-align: center; +} + +.model-services .model-services-content .service-icon { + font-size: 80rpx; + color: #50b674; +} + +.service-name { + padding-left: 10rpx; +} + +.cube-text { + position: relative; + width: 100%; + height: 32rpx; + line-height: 32rpx; + color: #777; + margin-top: 5rpx; + font-size: 24rpx; +} + +.none_btn { + border: none; + line-height: 1.1; + padding: 0px; +} + +button[plain] { + border: none; +} + +.share-modal { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.6); + z-index: 101; + transition: all 400ms ease-in; +} + +.share-modal-content { + position: relative; + width: 70%; + top: 50%; + left: 15%; + transform: translateY(-50%); + z-index: 110; +} + +.share-modal-img { + width: 100%; + height: 956rpx; + background: #f7f7f7; +} + +.share-modal-img image { + width: 100%; +} + +.share-modal-btn-list { + display: flex; + margin-top: 30rpx; +} + +.share-modal-btn-item { + text-align: center; + flex: 1; +} + +.share-modal .btn-icon { + font-size: 70rpx; + color: #fff; + margin: 0 auto; +} + +.share-modal .btn-text { + position: relative; + width: 100%; + height: 32rpx; + line-height: 32rpx; + color: #fff; + margin-top: 5rpx; + font-size: 24rpx; +} + + +.spuInfoImg .item-tag { + position: absolute; + left: 30rpx; + top: 20rpx; + width: 80rpx; + height: 92rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 80rpx; + height: 92rpx; + z-index: 0; +} + +.spuInfoImg .item-tag .tag-name { + position: relative; + padding-top: 12rpx; + font-size: 28rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spuInfoImg .item-tag .tag-name.two-word { + font-size: 28rpx; + padding-top: 24rpx; +} + +/* 评论 */ + +.comment-user { + line-height: 60rpx; + display: flex; + margin-bottom: 10rpx; +} + +.comment-user image { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + margin-right: 14rpx; + background-color: #f0f0f0; +} + +.comment-user text { + font-size: 26rpx; +} + +.fixed-aside { + float:right; + position: fixed; + right: 20rpx; + top:110rpx; + background-color: #fff; + z-index: 100; + width: 80rpx; +} + +.fixed-service { + display: inline-block; + width: 80rpx; + height: 80rpx; + background: #e7614d93; + border-radius: 20rpx 20rpx 20rpx 20rpx; + text-align: center; + color: #fff; + box-sizing: border-box; + font-size: 20rpx; + padding: 10rpx; + line-height: 1.2; + z-index: 100; + margin-bottom: 10rpx; +} + +.fixed-service::after { + border: 0; +} + +.fixed-service .iconfont { + font-size: 30rpx; +} + +.fixed-share { + display: inline-block; + transform: translateY(950rpx); + width: 80rpx; + height: 80rpx; + background: #e7614d93; + border-radius: 20rpx 20rpx 20rpx 20rpx; + text-align: center; + color: #fff; + box-sizing: border-box; + font-size: 20rpx; + padding: 10rpx; + line-height: 1.2; + z-index: 100; + margin-bottom: 10rpx; +} + +.fixed-share::after { + border: 0; +} + +.fixed-share .iconfont { + font-size: 30rpx; +} + +.cell { + display: flex; + justify-content: center; + align-items: center; + margin: 30rpx 0; + background-color: #fff; + padding: 20rpx 30rpx; +} + +.cell-left { + flex: 1; + line-height: 40rpx; +} + +.cell-left text { + display: inline-block; + vertical-align: middle; +} + +.icon-right { + width: 12rpx; + height: 22rpx; +} + +.cell-icon { + width: 40rpx; + display: inline-block; + vertical-align: middle; + margin-right: 10rpx; +} + +/* 幻灯片视频 */ + +.btn_view { + position: absolute; + left: 50%; + top: 50%; + z-index: 100; + transform: translate(-50%, -50%); +} + +.btn_view image { + width: 120rpx; + height: 120rpx; + background: rgba(0, 0, 0, 0.1); + border-radius: 50%; + animation: playScale 2s ease-in-out infinite; +} + +.video-wrap, .swiper-video { + width: 100%; + height: 100%; +} + +.end-play { + position: relative; + z-index: 1000; + background: #000; + text-align: center; + padding: 20rpx 0; +} + +.end-play .btn { + display: inline-block; + padding: 5rpx 30rpx; + background-color: #f6f6f6; + border-radius: 20rpx; + font-size: 24rpx; +} + +@keyframes playScale { + 0% { + transform: scale(1); + } + 25% { + transform: scale(1.1); + } + 50% { + transform: scale(1); + } + 75% { + transform: scale(1.1); + } +} + +/* 群 */ +.group { + background-color: #fff; + width:650rpx; + padding:20rpx 30rpx; + border-radius:20rpx; + margin:20rpx auto 0; + box-shadow:0 0 40rpx 0 rgba(0, 0, 0, 0.05); + display: flex; + align-items: center; +} + +.group-avatar image { + width: 94rpx; + height: 94rpx; + border-radius: 10rpx; +} + +.group-m { + flex: 1; + margin: 0 15rpx; + width: 0; +} + +.group-btn { + background: #ff5344; + color: #fff; + padding: 10rpx 30rpx; + border-radius: 60rpx; +} + +.group-title { + font-size: 28rpx; + color: #333; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.group-desc { + font-size: 24rpx; + color: #999; + margin-top: 6rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.group-r-icon { + width: 20rpx; + height: 36rpx; + vertical-align: middle; +} + +/* 拼团 */ +.pin-type { + font-size: 20rpx; + margin-left: 10rpx; + color: #fff; + font-weight: normal; + border: 1rpx solid #fff; + border-radius: 4rpx; + padding: 2rpx 10rpx; +} + +.spuInfo .pinRecords .title { + font-size: 28rpx; +} + +.spuInfo .pinRecords .title .buyNum text { + font-size: 22rpx; + color: #aaa; + margin-top: -2rpx; +} + +.pinList { + padding-bottom: 30rpx; +} + +.pinList .pinList-item { + display: flex; + align-items: center; + padding-top: 30rpx; +} + +.pinList .pinList-item-l .avatar, +.pinList .pinList-item-l .iconfont { + display: inline-block; + width: 75rpx; + height: 75rpx; + border-radius: 50%; + vertical-align: middle; +} + +.pinList .pinList-item-l .iconfont { + line-height: 67rpx; + text-align: center; + background-color: #d9d9d9; + color: #fff; + margin-left: -10rpx; + box-sizing: border-box; + border: 4rpx solid #fff; +} + +.pinList .pinList-item-m { + flex: 1; + margin: 0 20rpx; +} + +.pinList .pinList-item-m .num { + font-size: 26rpx; + color: #666; + margin-bottom: 10rpx; +} + +.pinList .pinList-item-m .num text { + color: #ff5344; +} + +.pinList .pinList-item-m .time { + font-size: 24rpx; + color: #999; +} + +.pinList .pinList-item-r { + padding: 15rpx 30rpx; + line-height: 1; + font-size: 26rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + color: #fff; + border-radius: 30rpx; +} + +.pinIntro { + color: #333; + font-size: 26rpx; +} + +.pinIntro .pinIntro-top { + height: 100rpx; + border-bottom: 0.1rpx solid #efefef; +} + +.pinIntro .pinIntro-title { + font-weight: bold; + color: #000; +} + +.pinIntro .iconfont { + font-size: 24rpx; + margin-top: 2rpx; +} + +.pinIntro-bot { + padding: 30rpx 0; +} + +.pinIntro .rule-item { + position: relative; + text-align: center; + z-index: 1; +} + +.pinIntro .rule-item::before { + content: ""; + position: absolute; + left: 80rpx; + right: -100%; + top: 42rpx; + border-bottom: 4rpx dotted #ccc; + z-index: -1; +} + +.pinIntro .rule-item:last-child:before { + content: none; +} + +.pinIntro .rule-item .step { + background-color: #ededed; + font-size: 36rpx; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + color: #666; + line-height: 80rpx; + margin: 0 auto 10rpx; +} + +.pinIntro .rule-item .p { + font-size: 26rpx; + color: #333; + line-height: 1.2; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/income.js b/eaterplanet_ecommerce/moduleA/pin/income.js new file mode 100644 index 0000000..ef21d79 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/income.js @@ -0,0 +1,163 @@ +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + currentTab: 0, + pageSize: 10, + navList: [{ + name: "全部", + status: "-1" + }, { + name: "待结算", + status: "0" + }, { + name: "已结算", + status: "1" + }, { + name: "已失效", + status: "2" + } + ], + list: [], + loadText: "加载中...", + info: {}, + noData: 0, + loadMore: true, + stateArr: ["待结算", "已结算", "已失效"] + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + status.setNavBgColor(); + this.getInfo(); + this.getData(); + }, + + getInfo: function () { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'groupdo.get_pincommiss_account_info', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + that.setData({ info: res.data.data }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg || '获取失败', + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let currentTab = this.data.currentTab; + let state = this.data.navList[currentTab].status; + + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'groupdo.listorder_list', + token: token, + state: state, + page: this.page + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 6) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else { + // 无数据 + if (that.page == 1) that.setData({ noData: 1 }) + that.setData({ loadMore: false, noMore: false, loadText: "没有更多记录了~" }) + } + wx.hideLoading(); + } + }) + }, + + getCurrentList: function () { + if (!this.data.loadMore) return false; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + }, + + onReachBottom: function(){ + this.getCurrentList(); + }, + + bindChange: function () { + this.page = 1; + this.setData({ + list: [], + noData: 0, + loadMore: true, + loadText: "加载中...", + }, () => { + console.log('我变啦'); + this.getData(); + }); + }, + + /** + * 切换导航 + */ + switchNav: function (e) { + let that = this; + if (this.data.currentTab === 1 * e.target.dataset.current) return false; + this.setData({ + currentTab: 1 * e.target.dataset.current + }, ()=>{ + that.bindChange() + }); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/income.json b/eaterplanet_ecommerce/moduleA/pin/income.json new file mode 100644 index 0000000..a1648e9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/income.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "拼团收益", + "navigationBarBackgroundColor": "#fff", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-goods-info": "../components/pinGoodsInfo", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/income.wxml b/eaterplanet_ecommerce/moduleA/pin/income.wxml new file mode 100644 index 0000000..f549673 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/income.wxml @@ -0,0 +1,74 @@ + + + + + + + 提现记录 + + + 可提现(元) + {{info.money}} + 提现 + + + + + 待结算 + {{info.wait_statements_money}} + + + 已结算 + {{info.has_statements_money}} + + + 已提现 + {{info.getmoney}} + + + + + + + {{item.name}} + + + + + 还没有记录 快去分享吧~ + + + + + + {{stateArr[item.state]}} + + + + + + 订单编号 + {{item.order_num_alias}} + + + 订单状态 + {{item.status_name}} + + + 下单会员 + {{item.uname}} + + + 订单时间 + {{item.date_added}} + + + 预估佣金 + {{item.money}} + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/pin/income.wxss b/eaterplanet_ecommerce/moduleA/pin/income.wxss new file mode 100644 index 0000000..69f5d3a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/income.wxss @@ -0,0 +1,210 @@ +.zr { + background: #fff; + width: 100%; + position: relative; + overflow: hidden; + padding-bottom: 30rpx; + margin-bottom: 20rpx; +} + +.top_box { + color: #333; + font-size: 24rpx; + line-height: 1; +} + +.total { + text-align: center; + padding-bottom: 40rpx; +} + +.total-money { + font-weight: bold; + font-size: 58rpx; + margin-top: 15rpx; + padding-left: 80rpx; +} + +.three { + display: flex; + justify-content: center; + align-items: center; +} + +.three-item { + position: relative; + flex: 1; + text-align: center; +} + +.three-item::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 1rpx; + border-left: 1rpx solid #cfcfcf; +} + +.three-item:first-child::before { + content: none; +} + +.three-title { + color: #999; + font-size: 24rpx; +} + +.three-money { + margin-top: 15rpx; + font-size: 28rpx; + font-weight: bold; +} + +.rightArrowImg { + width: 12rpx; + height: 22rpx; + margin-left: 8rpx; +} + +.qrcode { + display: inline-block; + width: 80rpx; + font-size: 22rpx; + text-align: center; + padding: 8rpx 0; + border-radius: 5rpx; + background: #4facfe; + color: #fff; + vertical-align: middle; +} + +.nav { + position: sticky; + position: -webkit-sticky; + top: 0; + transition: top 0.3s; + z-index: 10; + background: #fff; + height: 92rpx; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + width: unset; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + margin-bottom: 4rpx; + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 96rpx; + line-height: 96rpx; +} + +.nav .on { + position: relative; + color: #4facfe; + border-bottom: 4rpx solid #4facfe; +} + +.nav .on::after { + content: ""; + position: absolute; + left: 0; + right: 0; + bottom: 0; + border-bottom: 2rpx solid #4facfe; +} + +.noRecordCon { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.noRecordCon .noRecordImg { + width: 132rpx; + height: 138rpx; + margin-top: 30%; +} + +.noRecordCon .noRefundImg { + width: 218rpx; + height: 218rpx; + margin-top: 50%; +} + +.noRecordCon .noRecord { + padding-top: 32rpx; + font-size: 30rpx; + font-family: PingFangSC-Light; + font-weight: 300; + color: #666; + line-height: 30rpx; +} + +.noRecordCon .goIndex { + width: 164rpx; + height: 60rpx; + background: #4facfe; + border-radius: 30rpx; + font-size: 28rpx; + color: #fff; + margin-top: 30rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.list-item { + padding: 30rpx; + background-color: #fff; + margin-bottom: 20rpx; + font-size: 26rpx; +} + +.item-head { + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1rpx solid #ececec; + padding-bottom: 20rpx; +} + +.item-head .status { + color: #4facfe; +} + +.list-item .line { + display: flex; + justify-content: space-between; + align-items: center; + line-height: 2; +} + +.line-tit { + color: #999; +} + +.top_box_head { + padding: 30rpx; +} + +.tx-btn { + color: #4facfe; +} + +.goodsInfo { + padding: 0 !important; +} + +.goodsInfo .identity { + left: 0 !important; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/index.js b/eaterplanet_ecommerce/moduleA/pin/index.js new file mode 100644 index 0000000..0f22f2b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/index.js @@ -0,0 +1,338 @@ +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); +var app = getApp(); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + classification: { + tabs: [], + activeIndex: 0 + }, + slider_list: [], + pintuan_show_type: 0, + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [], + isIpx: app.globalData.isIpx + }, + pageNum: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + status.setNavBgColor(); + this.initFn(); + }, + + initFn: function(){ + wx.showLoading(); + this.getTabs(); + this.getData(); + }, + + authSuccess: function () { + let that = this; + this.pageNum = 1; + this.setData({ + classification: { + tabs: [], + activeIndex: 0 + }, + slider_list: [], + pintuan_show_type: 0, + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.initFn(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + /** + * 获取分类 + */ + getTabs: function () { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'group.pintuan_slides' + }, + dataType: 'json', + success: function (res) { + if(res.data.code==0) { + let { + category_list, + pintuan_show_type, + slider_list, + pintuan_index_share_title, + pintuan_index_share_img + } = res.data; + + let params = { + classification: {} + }; + params.slider_list = slider_list || []; + params.pintuan_show_type = pintuan_show_type; + params.pintuan_index_share_title = pintuan_index_share_title || ''; + params.pintuan_index_share_img = pintuan_index_share_img || ''; + category_list = category_list || []; + let index_type_first_name = '推荐'; + + if (category_list.length > 0) { + category_list.unshift({ + name: index_type_first_name, + id: 0 + }) + params.isShowClassification = true; + params.classification.tabs = category_list; + } else { + params.isShowClassification = false; + } + that.setData(params) + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + }, + + /** + * 监控分类导航 + */ + classificationChange: function (t) { + console.log(t.detail.e) + wx.showLoading(); + var that = this; + this.pageNum = 1; + this.setData({ + rushList: [], + showEmpty: false, + "classification.activeIndex": t.detail.e, + classificationId: t.detail.a + }, function () { + that.getData(); + }); + }, + + /** + * 获取商品列表 + */ + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let gid = that.data.classificationId; + let community = wx.getStorageSync('community'); + let head_id = community.communityId || 0; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'group.get_pintuan_list', + pageNum: this.pageNum, + gid, + token, + head_id, + is_index: 1 + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let oldRushList = that.data.rushList; + if (that.pageNum == 1) oldRushList = []; + + let h = {}, list = res.data.list; + if (that.pageNum == 1 && list.length == 0) h.showEmpty = true; + let rushList = oldRushList.concat(list); + let rdata = res.data; + let reduction = { full_money: rdata.full_money, full_reducemoney: rdata.full_reducemoney, is_open_fullreduction: rdata.is_open_fullreduction } + let pintuan_model_buy = rdata.pintuan_model_buy || 0; + h.rushList = rushList; + h.reduction = reduction; + h.loadOver = true; + let loadMore = that.data.loadMore; + if(res.data.list.length<20) { loadMore = false } + h.loadMore = loadMore; + h.loadText = loadMore ? "加载中..." : "没有更多商品了~"; + h.pintuan_model_buy = pintuan_model_buy; + h.pintuan_show_type = rdata.pintuan_show_type; + if (pintuan_model_buy == 1) h.needPosition=true,(!head_id&&that.needCommunity()); + that.setData(h, function () { + that.pageNum += 1; + }) + } else if (res.data.code == 1) { + let s = { loadMore: false } + if (that.pageNum == 1) s.showEmpty = true; + that.setData(s); + } else if (res.data.code == 2) { + //no login + that.setData({ needAuth: true }) + } + } + }) + }, + + /** + * 需要社区 + * 判断是否已绑定 + */ + needCommunity: function(){ + let token = wx.getStorageSync('token'); + let that = this; + console.log('需要社区') + if (token) { + util.getCommunityInfo().then(res=>{ + if(res) { + that.pageNum = 1; + that.setData({ + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getData(); + }) + } + }) + } + }, + + /** + * 幻灯片跳转 + */ + goBannerUrl: function (t) { + let idx = t.currentTarget.dataset.idx; + let { slider_list, needAuth } = this.data; + if (slider_list.length > 0) { + let url = slider_list[idx].link; + let type = slider_list[idx].linktype; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + url && wx.navigateTo({ url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url: url }) + } else { + url && wx.navigateTo({ url: url }) + } + + } else if (type == 2) { + // 跳转小程序 + let appid = slider_list[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: slider_list[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + let that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getData(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log('这是我的底线'); + this.data.loadMore && (this.setData({ loadOver: false }), this.getData()); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var member_id = wx.getStorageSync('member_id'); + let { pintuan_index_share_title, pintuan_index_share_img } = this.data; + return { + title: pintuan_index_share_title, + path: "eaterplanet_ecommerce/moduleA/pin/index?share_id=" + member_id, + imageUrl: pintuan_index_share_img, + success: function () { }, + fail: function () { } + }; + }, + + onShareTimeline: function() { + var member_id = wx.getStorageSync('member_id'); + let { pintuan_index_share_title, pintuan_index_share_img } = this.data; + var query= `share_id=${member_id}`; + return { + title: pintuan_index_share_title, + imageUrl: pintuan_index_share_img, + query, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/index.json b/eaterplanet_ecommerce/moduleA/pin/index.json new file mode 100644 index 0000000..f7c764b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/index.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "拼团", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-tabs": "../../components/tabs/index", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index", + "i-spu-big": "../components/rushBig", + "i-spu-col": "../components/pinGoods", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/index.wxml b/eaterplanet_ecommerce/moduleA/pin/index.wxml new file mode 100644 index 0000000..150a406 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/index.wxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + 暂时没有拼团 + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/pin/index.wxss b/eaterplanet_ecommerce/moduleA/pin/index.wxss new file mode 100644 index 0000000..cf2648f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/index.wxss @@ -0,0 +1,94 @@ +.wrap { + padding-bottom: 100rpx; +} + +.wrap.pb20 { + padding-bottom: 140rpx; +} + +.sticky-content { + position: fixed; + left: 0; + right: 0; + top: 0; + z-index: 100; +} + +.sticky-content .category-list { + background-color: #fff; +} + +.blank35 { + height: 70rpx; +} + +.swipe { + margin-top: 20rpx; + height: 320rpx; + margin-bottom: 20rpx; +} + +.swiper-content { + width: 750rpx; + height: 320rpx; + border-radius: 12rpx; +} + +.swiper-content swiper-item { + border-radius: 12rpx; + margin-right: 20rpx; + display: flex; + justify-content: flex-start; +} + +.swiper-content swiper-item:last-child { + margin: 0; +} + +.swiper-content .banner { + width: 710rpx; + height: 320rpx; + margin: 0 20rpx; + display: block; + border-radius: 12rpx; + position: relative; + overflow: hidden; +} + +.swiper-content .banner .banner-img { + width: 710rpx; + height: 320rpx; + border-radius: 12rpx; + display: block; + overflow: hidden; +} + +.none-rush-list { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 140rpx; + padding-top: 140rpx; +} + +.none-rush-list .img-block { + width: 240rpx; + height: 240rpx; + margin-bottom: 30rpx; +} + +.none-rush-list .h1 { + font-size: 32rpx; + line-height: 32rpx; + color: #444; + margin-bottom: 20rpx; +} + +.twoCol { + padding: 0 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/me.js b/eaterplanet_ecommerce/moduleA/pin/me.js new file mode 100644 index 0000000..f127b4b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/me.js @@ -0,0 +1,298 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +//state 0:拼团中 1:成功 2:失败 +//order_status_id 1:已付款 2:拼团中,已付款 3:待付款 5:交易已取消 7:退款 + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + tabs: [ + { id: 0, name: '全部' }, + { id: 1, name: '拼团中' }, + { id: 2, name: '拼团成功' }, + { id: 3, name: '拼团失败' } + ], + order_status: 0, + showEmpty: false, + list: [], + loadMore: true, + loadText: "加载中...", + loadOver: false + }, + pageNum: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + status.setNavBgColor(); + this.getData(); + }, + + /** + * 切换导航 + */ + changeTabs: function (e) { + let that = this; + let order_status = e.currentTarget.dataset.type || 0; + this.pageNum = 1; + this.setData({ order_status, list: [], showEmpty: false, loadMore: true, loadOver: false }, ()=>{ + that.getData(); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + this.setData({ needAuth: false }); + } else { + this.setData({ needAuth: true }); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.pageNum = 1; + this.setData({ + needAuth: false, + showEmpty: false, + list: [], + loadMore: true, + loadText: "加载中...", + loadOver: false + }, () => { + that.getData(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ + showAuthModal: !this.data.showAuthModal + }); + return false; + } + return true; + }, + + getData: function () { + wx.showLoading(); + let that = this; + var token = wx.getStorageSync('token'); + let order_id = this.orderId; + let pageNum = this.pageNum; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'user.group_orders', + token, + page: pageNum, + type: this.data.order_status + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let list = res.data.data; + let h = {}; + if (pageNum == 1 && list.length == 0) h.showEmpty = true; + + let oldList = that.data.list; + list = list.concat(oldList); + h.list = list; + h.loadOver = true; + h.loadText = that.data.loadMore ? "加载中..." : "没有更多商品了~"; + that.setData(h, function () { + that.pageNum += 1; + }) + } else { + let s = { loadMore: false } + if (pageNum == 1) s.showEmpty = true; + that.setData( s ) + } + } + }) + }, + + goLink: function (e) { + var pages_all = getCurrentPages(); + var url = e.currentTarget.dataset.link; + let type = e.currentTarget.dataset.type || ''; + if (type == 'ignore'){ + let id = e.currentTarget.dataset.id; + if (type == 'ignore') url = `/eaterplanet_ecommerce/moduleA/pin/share?id=${id}`; + } + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + }, + + /** + * 取消订单 + */ + cancelOrder: function (event) { + let id = event.currentTarget.dataset.type; + var token = wx.getStorageSync('token'); + var that = this; + wx.showModal({ + title: '取消支付', + content: '好不容易挑出来,确定要取消吗?', + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.cancel_order', + token: token, + order_id: id + }, + dataType: 'json', + success: function (res) { + wx.showToast({ + title: '取消成功', + icon: 'success', + duration: 1000 + }) + that.order(); + } + }) + } + } + }) + }, + + order: function (status) { + var that = this; + var token = wx.getStorageSync('token'); + this.pageNum = 1; + this.setData({ + showEmpty: false, + list: [], + loadMore: true, + loadText: "加载中..." + }, () => { + that.getData(); + }) + }, + + /** + * 付款 + */ + orderPay: function (event) { + var that = this; + var token = wx.getStorageSync('token'); + let id = event.currentTarget.dataset.type; + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'car.wxpay', + token: token, + order_id: id, + scene: app.globalData.scene + }, + dataType: 'json', + method: 'POST', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + // 交易组件 + if(res.data.isRequestOrderPayment==1) { + wx.requestOrderPayment({ + orderInfo: res.data.order_info, + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.package, + signType: res.data.signType, + paySign: res.data.paySign, + success: function (wxres) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/pin/share?id=' + id + }) + }, + fail: function (res) { + console.log(res); + } + }) + } else { + wx.requestPayment({ + appId: res.data.appId, + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.package, + signType: res.data.signType, + paySign: res.data.paySign, + success: function (wxres) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/pin/share?id=' + id + }) + }, + fail: function (res) { + console.log(res); + } + }) + } + } else if (res.data.code == 2) { + wx.showToast({ + title: res.data.msg, + icon: 'none' + }) + } + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + let that = this; + this.pageNum = 1; + this.setData({ + showEmpty: false, + list: [], + loadMore: true, + loadText: "加载中..." + }, () => { + that.getData(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log('这是我的底线'); + this.data.loadMore && (this.setData({ loadOver: false }), this.getData()); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/me.json b/eaterplanet_ecommerce/moduleA/pin/me.json new file mode 100644 index 0000000..ddda143 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/me.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "我的拼团", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-card": "../../components/card/index", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index", + "i-goods-info": "../components/pinGoodsInfo" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/me.wxml b/eaterplanet_ecommerce/moduleA/pin/me.wxml new file mode 100644 index 0000000..d031e6b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/me.wxml @@ -0,0 +1,56 @@ + + + + + {{item.name}} + + + + + + + + + + {{item.status_name}} + + + + + + + + + + {{item.shipping_fare}},合计:¥{{item.total}} + + + 取消订单 + + 付款 + + + + 拼团详情 + 邀请好友 + + 订单详情 + + + + + + + + + + + 你还没有参加任何团购,快与小伙伴拼团吧! + + 去开团 + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/pin/me.wxss b/eaterplanet_ecommerce/moduleA/pin/me.wxss new file mode 100644 index 0000000..bc4836b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/me.wxss @@ -0,0 +1,139 @@ +.nav-bar { + width: 100%; + position: fixed; + left: 0; + top: 0; + z-index: 10; +} + +.nav-bar .nav-bar-inner { + display: flex; + justify-content: space-between; + padding: 0 40rpx; + background-color: white; + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,255,255,0.25); +} + +.nav-bar .nav-bar-item { + position: relative; + word-break: keep-all; + font-size: 28rpx; + font-weight: 500; + color: #666; + padding: 20rpx 0; +} + +.nav-bar .current.nav-bar-item::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg,#ff4936 0%,#ff6e3c 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255,89,0,0.25); + border-radius: 24rpx; +} + +.nav-bar-content { + margin-top:49px; + padding-bottom: 30rpx; +} + +.empty-wrap { + padding-top: 100rpx; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.empty-wrap .empty-img { + width: 218rpx; + height: 218rpx; +} + +.empty-wrap .empty-txt { + font-size: 30rpx; + font-weight: 400; + color: #777; + margin-top: 32rpx; +} + +.list { + padding-top: 100rpx; + padding-bottom: 50rpx; +} + +.list .item { + margin: 0 auto 20rpx; +} + +.list .suppy { + line-height: 40rpx; +} + +.list .suppy .logo { + width: 40rpx; + height: 40rpx; + border-radius: 2rpx; + overflow: hidden; + vertical-align: middle; + margin-right: 5rpx; +} + +.list .suppy .name { + display: inline-block; + vertical-align: middle; +} + +.list .header { + padding: 20rpx 30rpx; + color: #444; + font-size: 24rpx; + border-bottom: 0.1rpx solid #efefef; +} + +.list .content-wrap { + padding-bottom: 20rpx; +} + +.list .footer { + padding: 20rpx 30rpx; + color: #444; + font-size: 24rpx; + border-top: 0.1rpx solid #efefef; +} + +.footer .btn { + min-width: 136rpx; + box-sizing: border-box; + text-align: center; + padding: 10rpx 20rpx; + margin-left: 20rpx; + border-radius: 10rpx; + font-size: 24rpx; +} + +.footer .btn.hollow { + border: 1rpx solid #999; + padding: 10rpx 20rpx; +} + +.footer .btn.solid { + color: #fff; + background-color: #ff5344; +} + +.redBtn { + width: 320rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + color: #fff; + margin: 0 30rpx 10rpx; + height: 84rpx; + line-height: 84rpx; + font-size: 32rpx; + border-radius: 10rpx; + text-align: center; + margin-top: 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/rule.js b/eaterplanet_ecommerce/moduleA/pin/rule.js new file mode 100644 index 0000000..ff10a8c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/rule.js @@ -0,0 +1,49 @@ +var app = getApp(); + +Page({ + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function () { + wx.showLoading(); + this.get_article(); + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 获取列表 + */ + get_article: function () { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'group.pintuan_slides' + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { pintuan_publish } = res.data; + that.setData({ pintuan_publish }) + } + } + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/rule.json b/eaterplanet_ecommerce/moduleA/pin/rule.json new file mode 100644 index 0000000..2734119 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/rule.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "拼团规则", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/rule.wxml b/eaterplanet_ecommerce/moduleA/pin/rule.wxml new file mode 100644 index 0000000..5ee1bc5 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/rule.wxml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/rule.wxss b/eaterplanet_ecommerce/moduleA/pin/rule.wxss new file mode 100644 index 0000000..438e737 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/rule.wxss @@ -0,0 +1,13 @@ +.article { + background: #fff; + padding: 20rpx 30rpx; + font-size: 28rpx; +} + +.wxParse-img { + width: 100%; +} + +.wxParse-inline { + padding: 5rpx 0; +} diff --git a/eaterplanet_ecommerce/moduleA/pin/share.js b/eaterplanet_ecommerce/moduleA/pin/share.js new file mode 100644 index 0000000..97a04c8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/share.js @@ -0,0 +1,772 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + seconds: 0, + surplus: 0, + likeList: [], + groupInfo: { + group_name: '社区', + owner_name: '团长' + } + }, + orderId: '', + canPreSub: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + let that = this; + let { id, share_id } = options; + if (share_id != 'undefined' && options.share_id > 0) wx.setStorageSync('share_id', share_id); + status.setGroupInfo().then((groupInfo) => { that.setData({ groupInfo }) }); + console.log(id) + var scene = decodeURIComponent(options.scene); + if (scene != 'undefined' && scene != '') id = scene; + if (id === void 0) { + wx.showModal({ + title: '提示', + content: '参数错误', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + return false; + } + this.orderId = id; + this.getData(); + this.getLikeList(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + this.setData({ needAuth: false }); + } else { + this.setData({ needAuth: true }); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.setData({ + needAuth: false, + }, () => { + that.getData(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ + showAuthModal: !this.data.showAuthModal + }); + return false; + } + return true; + }, + + getData: function () { + wx.showLoading(); + let that = this; + var token = wx.getStorageSync('token'); + let order_id = this.orderId; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'groupdo.group_info', + token, + order_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { + order_goods, + goods_info, + options, + pin_info, + share_title, + pin_order_arr, + me_take_in, + is_me, + interface_get_time, + order_id, + order_type, + pintuan_model_buy, + community_id, + hide_community_change_btn, + pintuan_show_community_info, + is_need_subscript, + need_subscript_template + } = res.data.data; + goods_info.goods_id = order_goods.goods_id; + let order = { + goods_id: order_goods.goods_id, + pin_id: pin_info.pin_id, + } + var timestamp = Date.parse(new Date()); + let seconds = (pin_info.end_time - interface_get_time) * 1000 + timestamp; + let surplus = goods_info.pin_count - pin_order_arr.length; + + util.getCommunityById(community_id).then(ret => { + that.setData({ changeCommunity: ret.data }) + }) + + //开启社区关联 + if (pintuan_model_buy==1) { + pin_info.state == 0 && that.needCommunity(community_id, hide_community_change_btn, goods_info); + } + + that.setData({ + seconds: seconds > 0 ? seconds: 0, + order, + order_goods, + goods_info, + options, + pin_info, + share_title, + pin_order_arr, + me_take_in, + is_me, + interface_get_time, + order_id, + surplus, + order_type, + hide_community_change_btn: hide_community_change_btn || 0, + goodsComunityId: community_id, + pintuan_model_buy, + pintuan_show_community_info, + is_need_subscript, + need_subscript_template + }) + } else { + app.util.message('无数据', '/eaterplanet_ecommerce/moduleA/pin/index', 'error'); + } + } + }) + }, + + /** + * 需要社区 + * 判断是否已绑定 + */ + needCommunity: function (shareCommunityId, hideCommunityChangeBtn, goods_info={}) { + let that = this; + console.log('需要社区') + let token = wx.getStorageSync('token'); + let is_all_sale = goods_info.is_all_sale || 0; + //当前社区 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunityId = (currentCommunity && currentCommunity.communityId) || ''; + console.log('shareCommunityId', shareCommunityId); + + // 单社区 + util.getCommunityById(shareCommunityId).then(res => { + if (res.open_danhead_model == 1) { + console.log(res) + let default_head_info = res.default_head_info; + app.globalData.community = default_head_info; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: default_head_info }) + that.setData({ community: default_head_info }) + token && that.addhistory(default_head_info); + } else { + // 社区是否存在 + if (currentCommunityId != '' && shareCommunityId) { + // 存在并且不相同 + console.log('currentCommunityId存在 比较社区') + if (currentCommunityId != shareCommunityId) { + console.log('currentCommunityId存在 社区不同') + //如果禁止切换 + let { groupInfo } = that.data; + console.log(hideCommunityChangeBtn) + if (hideCommunityChangeBtn == 1 && is_all_sale!=1) { + app.util.message(`您只能访问自己${groupInfo.group_name}`, '/eaterplanet_ecommerce/moduleA/pin/index', 'error', '知道了'); + return; + } + that.setData({ + showChangeCommunity: true, + changeCommunity: res.data, + community: currentCommunity + }) + } + } else { + // 不存在社区id + //token 是否存在 + if (token) { + util.getCommunityInfo().then(function (ret) { + //比较社区 + console.log('token存在 比较社区') + if (ret.community_id && ret.community_id != shareCommunityId) { + that.setData({ + showChangeCommunity: true, + community: currentCommunity + }) + } + }).catch((param) => { + console.log('step4 新人') + if (Object.keys(param) != '') that.addhistory(param, true); + }); + } else { + console.log('token不存在 存社区') + // 直接存本地 + app.globalData.community = res; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: res }) + that.setData({ community: res }) + } + } + } + }) + }, + + /** + * 切换提示 + */ + confrimChangeCommunity: function () { + let community = this.data.changeCommunity; + let token = wx.getStorageSync('token'); + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + token && this.addhistory(community); + + this.setData({ community, showChangeCommunity: false }) + console.log('用户点击确定') + }, + + /** + * 取消切换 + */ + cancelChangeCommunity: function(){ + let { community, goods_info, groupInfo } = this.data; + (goods_info.is_all_sale == 1) || wx.showModal({ + title: '提示', + content: `此拼团在您所属${groupInfo.group_name}不可参与`, + showCancel: false, + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + let community_id = (community && community.communityId) || ''; + let goods_id = goods_info.goods_id; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'goods.check_goods_community_canbuy', + community_id, + goods_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + wx.redirectTo({ + url: `/eaterplanet_ecommerce/moduleA/pin/goodsDetail?id=${goods_id}` + }) + } else { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/moduleA/pin/index' + }) + } + } + }) + } + } + }); + }, + + /** + * 历史社区 + */ + addhistory: function (community, isNew = false) { + var community_id = community.communityId; + console.log('addhistory'); + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.addhistory_community', + community_id, + token: token + }, + dataType: 'json', + success: function (res) { + if (isNew) { + console.log('新人 社区') + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_community_info', + community_id: community_id + }, + dataType: 'json', + success: function (result) { + if (result.data.code == 0) { + let community = result.data.data; + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: community }) + } + } + }) + } + } + }) + }, + + getLikeList: function(){ + let that = this; + var token = wx.getStorageSync('token'); + let order_id = this.orderId; + let community = wx.getStorageSync('community'); + let community_id = (community && community.communityId) || ''; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'group.pintuan_like_list', + order_id, + community_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { is_show_order_guess_like, list } = res.data; + that.setData({ is_show_order_guess_like, likeList: list || [] }) + } else { + console.log('猜你喜欢无数据') + } + } + }) + }, + + goLink: function (e) { + var pages_all = getCurrentPages(); + var url = e.currentTarget.dataset.link; + if (pages_all.length > 6) { + url && wx.redirectTo({ url }) + } else { + url && wx.navigateTo({ url }) + } + }, + + /** + * 开团订阅 + */ + preSub: function(e){ + let that = this; + if(!this.canPreSub) return; + this.canPreSub = false; + let is_need_subscript = this.data.is_need_subscript; + if(is_need_subscript==1) { + //弹出订阅消息 + this.subscriptionNotice().then(()=>{ + that.preOpenSku(); + }).catch(()=>{ + that.preOpenSku(); + }); + } else { + that.preOpenSku(); + } + }, + + /** + * 订阅消息 + */ + subscriptionNotice: function() { + console.log('subscriptionNotice') + let that = this; + return new Promise((resolve, reject)=>{ + let obj = that.data.need_subscript_template; + let tmplIds = Object.keys(obj).map(key => obj[key]); // 订阅消息模版id + if (wx.requestSubscribeMessage) { + tmplIds.length && wx.requestSubscribeMessage({ + tmplIds: tmplIds, + success(res) { + let is_need_subscript = 1; + let acceptId = []; + tmplIds.forEach(item=>{ + if (res[item] == 'accept') { + //用户同意了订阅,添加进数据库 + acceptId.push(item); + } else { + //用户拒绝了订阅或当前游戏被禁用订阅消息 + is_need_subscript = 0; + } + }) + + if(acceptId.length) { + that.addAccept(acceptId); + } + that.setData({ is_need_subscript }) + resolve(); + }, + fail() { + reject(); + } + }) + } else { + // 兼容处理 + reject(); + } + }) + }, + + // 用户点击订阅添加到数据库 + addAccept: function (acceptId) { + let token = wx.getStorageSync('token'); + let type = acceptId.join(','); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.collect_subscriptmsg', + token, + type + }, + dataType: 'json', + method: 'POST', + success: function () {} + }) + }, + + preOpenSku: function(){ + this.canPreSub = true; + var that = this; + var { order, options, goods_info } = that.data; + + order.buy_type = 'pintuan'; + order.quantity = 1; + that.setData({ order: order }) + + var is_just_addcar = 0; + let list = options.list || []; + let arr = []; + if (list.length > 0) { + for (let i = 0; i < list.length; i++) { + let sku = list[i]['option_value'][0]; + let temp = { + name: sku['name'], + id: sku['option_value_id'], + index: i, + idx: 0 + }; + arr.push(temp); + } + //把单价剔除出来begin + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + let cur_sku_arr = options.sku_mu_list[id]; + that.setData({ + sku: arr, + sku_val: 1, + cur_sku_arr: cur_sku_arr, + skuList: options, + visible: true, + showSku: true, + is_just_addcar + }); + } else { + let actPrice = goods_info.danprice || '0.00'; + let pinprice = goods_info.pinprice || '0.00'; + let cur_sku_arr = { + skuImage: goods_info.goods_images, + spuName: goods_info.name, + actPrice: actPrice.split('.'), + pinprice: pinprice.split('.') + }; + that.setData({ + visible: true, + showSku: true, + is_just_addcar, + sku: [], + sku_val: 1, + cur_sku_arr, + skuList: [] + }, () => { + // that.goOrder(); + }) + } + }, + + openSku: function () { + if (!this.authModal()) return; + var that = this; + var { goodsComunityId, groupInfo, goods_info } = that.data; + + if (this.data.pintuan_model_buy==1) { + //判断社区是否相同 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunity_id = (currentCommunity && currentCommunity.communityId) || ''; + if ((goodsComunityId != '' && currentCommunity_id != '' && goodsComunityId == currentCommunity_id) || goods_info.is_all_sale==1) { + this.preSub(); + } else { + app.util.message(`此拼团在您所属${groupInfo.group_name}不可参与`, '','error'); + } + } else { + this.preSub(); + } + }, + + goOrder: function () { + var that = this; + if (that.data.can_car) { that.data.can_car = false; } + let { order, cur_sku_arr, sku_val } = this.data; + var goods_id = order.goods_id; + var quantity = sku_val; + var sku_str = ''; + var is_just_addcar = 0; + let buy_type = order.buy_type; + let pin_id = order.pin_id; + + let community = wx.getStorageSync('community'); + let community_id = community.communityId || 0; + + if (cur_sku_arr && cur_sku_arr.option_item_ids) { + sku_str = cur_sku_arr.option_item_ids; + } + + let data = { + goods_id, + community_id, + quantity, + sku_str, + buy_type, + pin_id, + is_just_addcar + } + + util.addCart(data).then(res=>{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + wx.hideLoading(); + that.setData({ pop_vipmember_buyimage, showVipModal: true, visible: false }) + } else if (res.data.code == 3 || res.data.code == 7) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + wx.hideLoading(); + that.setData({ needAuth: true, showAuthModal: true, visible: false }) + } else if (res.data.code == 6) { + var msg = res.data.msg; + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ sku_val: max_quantity }) + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + var pages_all = getCurrentPages(); + let url = `/eaterplanet_ecommerce/pages/order/placeOrder?type=${buy_type}`; + (pages_all.length > 3) ? wx.redirectTo({ url }) : wx.navigateTo({ url }); + } + }).catch(res=>{ + app.util.message(res||'请求失败', '', 'error'); + }) + }, + + selectSku: function (event) { + var that = this; + let str = event.currentTarget.dataset.type; + let obj = str.split("_"); + let arr = that.data.sku; + let temp = { + name: obj[3], + id: obj[2], + index: obj[0], + idx: obj[1] + }; + arr.splice(obj[0], 1, temp); + that.setData({ + sku: arr + }) + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + var options = this.data.skuList; + var cur_sku_arr = options.sku_mu_list[id]; + + that.setData({ + cur_sku_arr: cur_sku_arr + }); + console.log(id); + }, + + /** + * 数量加减 + */ + setNum: function (event) { + let types = event.currentTarget.dataset.type; + var that = this; + var num = 1; + let sku_val = this.data.sku_val * 1; + if (types == 'add') { + num = sku_val + 1; + } else if (types == 'decrease') { + if (sku_val > 1) { + num = sku_val - 1; + } + } + + let arr = that.data.sku; + var options = this.data.skuList; + if (arr.length > 0) { + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + } + if (options.length > 0) { + var cur_sku_arr = options.sku_mu_list[id]; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } else { + let cur_sku_arr = this.data.cur_sku_arr; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } + this.setData({ + sku_val: num + }) + }, + + /** + * 确认购物车 + */ + gocarfrom: function (e) { + var that = this; + wx.showLoading(); + var token = wx.getStorageSync('token'); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.get_member_form_id', + 'token': token, + "from_id": e.detail.formId + }, + dataType: 'json', + success: function (res) { } + }) + that.goOrder(); + }, + + /** + * 关闭购物车 + */ + closeSku: function () { + this.setData({ + visible: 0, + stopClick: false, + }); + }, + + showAllBtn: function() { + this.setData({ + showAllUser: !this.data.showAllUser + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var that = this; + var share_id = wx.getStorageSync('member_id') || ''; + var share_path = 'eaterplanet_ecommerce/moduleA/pin/share?id=' + that.data.order_id + '&share_id=' + share_id; + let { surplus, order_goods } = this.data; + let title = ''; + if (surplus > 0) { + title = `还差${surplus}人!我${order_goods.price}元团了${order_goods.name}`; + } else { + title = `我${order_goods.price}元团了${order_goods.name}`; + } + return { + title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function() { + var share_id = wx.getStorageSync('member_id') || ''; + let { surplus, order_goods, order_id } = this.data; + let title = ''; + if (surplus > 0) { + title = `还差${surplus}人!我${order_goods.price}元团了${order_goods.name}`; + } else { + title = `我${order_goods.price}元团了${order_goods.name}`; + } + + var query= `id=${order_id}&share_id=${share_id}`; + return { + title: title, + query, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/pin/share.json b/eaterplanet_ecommerce/moduleA/pin/share.json new file mode 100644 index 0000000..0802a9c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/share.json @@ -0,0 +1,14 @@ +{ + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-img": "../../components/img/index", + "i-count-down": "../../components/count-down/index", + "i-goods-info": "../components/pinGoodsInfo", + "i-aside-btn": "../../components/asideBtn/index", + "i-spu": "../components/rushNormal", + "i-change-community": "../../components/changeCommunity/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/pin/share.wxml b/eaterplanet_ecommerce/moduleA/pin/share.wxml new file mode 100644 index 0000000..cd9dc61 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/share.wxml @@ -0,0 +1,229 @@ + + + + + 拼团成功 + + + 已成功下单,可在会员中心 + 查看订单 + + + 团长人气太高,已拼团成功啦 + + + + + + + + + + + + + + {{changeCommunity.communityName}} + 取货地址:{{changeCommunity.fullAddress}} + + + + + + + + + + 仅剩 + {{surplus}}个名额,团满即可拼团成功 + + + 仅剩 + + + + + 该团未能按时凑齐人数,拼团失败 + 退款金额将原路返回 + + + + + + 团长 + + + + + + + + + + + 收起 + 查看全部 + + + + 我要参团 + + + + + 查看更多拼团商品 + + + 查看订单详情 + + + + 查看更多拼团商品 + + + 查看更多拼团商品 + + + + + + + + + 拼团玩法 + 查看规则 + + + + 1 + 支付开团 + 参团 + + + 2 + 邀请用户 + 参团 + + + 3 + 拼团成功中 + 奖人员发货 + + + 4 + 未中奖人员退 + 款发放奖励 + + + + + + + + + 拼团玩法 + 查看规则 + + + + 1 + 支付开团 + 参团 + + + 2 + 邀请用户 + 参团 + + + 3 + 拼团成功 + 按时送达 + + + 4 + 逾期未成 + 团退款 + + + + + + + + ——猜你喜欢—— + + + + + + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/pin/share.wxss b/eaterplanet_ecommerce/moduleA/pin/share.wxss new file mode 100644 index 0000000..d82f0f9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/pin/share.wxss @@ -0,0 +1,274 @@ +.pinStatus { + padding: 30rpx; + text-align: center; +} + +.pinStatus .title { + color: #6fc667; + font-size: 35rpx; + margin-bottom: 20rpx; +} + +.pinStatus .title .iconfont { + font-size: 35rpx; +} + +.pinStatus .tip { + font-size: 24rpx; + color: #bbb; +} + +.pinStatus .tip text { + color: #93bdee; +} + +.pinMember { + padding: 30rpx; + text-align: center; +} + +.pinMember .title { + margin-bottom: 15rpx; +} + +.pinMember .count-down { + display: flex; + align-items: center; + justify-content: center; +} + +.count-down-left-text { + margin-right: 10rpx; +} + +.pinMember .item-time { + color: #fff; + background-color: #333; + font-size: 20rpx; + padding: 2rpx 4rpx; + border-radius: 5rpx; + width: 28rpx; +} + +.pinMember .status .failTit { + font-size: 28rpx; +} + +.pinMember .status .tip { + color: #999; + font-size: 24rpx; + margin-top: 10rpx; +} + +.pinMemberList { + display: flex; + flex-wrap: wrap; + margin: 30rpx 0 20rpx; + justify-content: center; +} + +.pinMemberList .item { + position: relative; + padding-left: 53rpx; + margin-bottom: 20rpx; +} + +.pinMemberList .item:nth-child(5n+1) { + padding-left: 0; +} + +.pinMemberList .avatar { + width: 85rpx; + height: 85rpx; + border-radius: 50%; + overflow: hidden; + left: 0; +} + +.pinMemberList .iconfont { + display: inline-block; + color: #e4e4e4; + font-size: 85rpx; + text-align: center; +} + +.pinMemberList .item .name { + position: absolute; + display: inline-block; + background: #fb9135; + color: #fff; + border-radius: 15rpx; + font-size: 20rpx; + padding: 5rpx 8rpx; + bottom: 8rpx; + right: -20rpx; + line-height: 1; + border: .1rpx solid #fff; +} + +.btn { + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + color: #fff; + margin: 0 30rpx 10rpx; + height: 84rpx; + line-height: 84rpx; + font-size: 32rpx; + border-radius: 42rpx; +} + +button.btn::after { + border: 0; +} + +.goodsInfo { + position: relative; +} + +.goodsInfo .iconfont { + position: absolute; + right: 50rpx; + top: 50rpx; + font-size: 120rpx; + color: #ccc; + z-index: 1; +} + +.guessLike { + margin-top: 30rpx; + padding-bottom: 30rpx; +} + +.guessLikeTitle { + padding: 30rpx; + font-size: 32rpx; + text-align: center; + font-weight: bold; + color: #666; +} + +/* 规则 */ +.pinIntro { + color: #333; + font-size: 26rpx; +} + +.pinIntro .pinIntro-top { + padding: 30rpx; + border-bottom: 0.1rpx solid #efefef; +} + +.pinIntro .pinIntro-title { + font-weight: bold; + color: #000; +} + +.pinIntro .iconfont { + font-size: 24rpx; + margin-top: 2rpx; +} + +.pinIntro-bot { + padding: 30rpx; +} + +.pinIntro .rule-item { + position: relative; + text-align: center; + z-index: 1; +} + +.pinIntro .rule-item::before { + content: ""; + position: absolute; + left: 80rpx; + right: -100%; + top: 42rpx; + border-bottom: 4rpx dotted #ccc; + z-index: -1; +} + +.pinIntro .rule-item:last-child:before { + content: none; +} + +.pinIntro .rule-item .step { + background-color: #ededed; + font-size: 36rpx; + width: 80rpx; + height: 80rpx; + border-radius: 50%; + color: #666; + line-height: 80rpx; + margin: 0 auto 10rpx; +} + +.pinIntro .rule-item .p { + font-size: 26rpx; + color: #333; + line-height: 1.2; +} + +/* 团长信息 */ +.group { + padding: 20rpx 30rpx; + display: flex; + align-items: center; + margin-top: 20rpx; +} + +.group-avatar image { + width: 94rpx; + height: 94rpx; + border-radius: 10rpx; +} + +.group-m { + flex: 1; + margin: 0 15rpx; + width: 0; +} + +.group-btn { + background: #ff5344; + color: #fff; + padding: 10rpx 30rpx; + border-radius: 60rpx; +} + +.group-title { + font-size: 28rpx; + color: #333; + overflow: hidden; + text-overflow:ellipsis; + white-space: nowrap; +} + +.group-desc { + font-size: 24rpx; + color: #999; + margin-top: 6rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.group-r-icon { + width: 20rpx; + height: 36rpx; + vertical-align: middle; +} + +.pin-more { + text-align: center; + padding-bottom: 20rpx; + font-size: 24rpx; + display: flex; + align-items: center; + justify-content: center; + color: #ff5344; +} + +.pin-more .iconfont { + color: #ff5344; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/score/scoreDetails.js b/eaterplanet_ecommerce/moduleA/score/scoreDetails.js new file mode 100644 index 0000000..03d908c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/scoreDetails.js @@ -0,0 +1,123 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + is_login: true, + list: [], + showData: 1, + loadText: '加载中', + remark: { + goodsbuy: '商品购买送积分', + refundorder: '订单退款增加积分', + system_add: '系统后台增加积分', + system_del: '系统后台减少积分', + orderbuy: '商品购买扣除积分' + } + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + util.check_login() ? this.setData({ is_login: true }) : this.setData({ is_login: false }); + this.getData(); + }, + + getData: function () { + var token = wx.getStorageSync('token'); + let that = this; + wx.showLoading(); + this.setData({ isHideLoadMore: false }) + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'user.get_user_integral_flow', + token: token, + page: that.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + var list = that.data.list; + list = list.concat(res.data.data); + that.setData({ list, isHideLoadMore: true }) + } else if (res.data.code == 1) { + if (that.data.list.length == 0 && that.page == 1) that.setData({ showData: 0 }); + that.setData({ isHideLoadMore: true, no_data: 1 }) + return false; + } else if (res.data.code == 2) { + that.setData({ is_login: false }) + } + }, + fail: (error) => { + console.log(error) + wx.showLoading(); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/scoreDetails', + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_data == 1) return false; + this.page += 1; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/score/scoreDetails.json b/eaterplanet_ecommerce/moduleA/score/scoreDetails.json new file mode 100644 index 0000000..18d17ea --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/scoreDetails.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "积分明细", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "i-load-more": "../../components/load-more/index", + "i-card": "../../components/card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxml b/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxml new file mode 100644 index 0000000..52540ae --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxml @@ -0,0 +1,27 @@ + + + + + + 暂无任何明细记录 + + + + + + + {{item.remark?item.remark:remark[item.type]}} + {{item.in_out=='in'?'+':'-'}}{{item.score}} + + 订单号: {{item.trans_id}} + + {{item.addtime}} + 剩余积分:{{item.current_yuer}} + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxss b/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxss new file mode 100644 index 0000000..ad2e50b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/scoreDetails.wxss @@ -0,0 +1,76 @@ +.score-box { + padding-top: 30rpx; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} + +.list { + padding: 0 20rpx; +} + +.list .listData { + padding: 30rpx; + border-bottom: 0.1rpx solid #eee; +} + +.list .listData:last-child { + border: none; +} + +.list .listData .list-tit { + line-height: 28rpx; + margin-bottom: 24rpx; + display: flex; + justify-content: space-between; +} + +.list .listData .list-tit .tit { + font-size: 30rpx; + color: #444; +} + +.list .listData .list-tit .num { + font-size: 32rpx; + color: #ff5344; + font-weight: bold; +} + +.list .listData .list-tit .num.yue { + color: #666; + font-weight: normal; + font-size: 30rpx; +} + +.list .listData .list-tit .num2 { + color: #999; +} + +.list .listData .list-orderNo { + font-size: 26rpx; + color: #444; + margin-bottom: 16rpx; +} + +.list .listData .list-time { + font-size: 26rpx; + color: #aaa; + line-height: 22rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/score/signin.js b/eaterplanet_ecommerce/moduleA/score/signin.js new file mode 100644 index 0000000..dba52aa --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/signin.js @@ -0,0 +1,263 @@ +// eaterplanet_ecommerce/moduleA/score/signin.js +var util = require('../../utils/util.js'); +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/scoreCartMixin.js')], + data: { + info: {}, + dayScore: [], + showSignModal: false, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true + }, + page: 1, + isLock: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function () { + app.setShareConfig(); + status.setNavBgColor(); + wx.showLoading(); + this.getData(); + this.getList(); + }, + + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } + }) + }, + + vipModal: function(t) { + this.setData(t.detail) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + that.page = 1; + this.setData({ + needAuth: false, + showAuthModal: false, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true + }, () => { + that.getData(); + that.getList(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + getData: function(){ + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'signinreward.get_signinreward_baseinfo', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let info = res.data.data || {}; + let dayScore = []; + dayScore.push(info.signinreward_day1_score || 0); + dayScore.push(info.signinreward_day2_score || 0); + dayScore.push(info.signinreward_day3_score || 0); + dayScore.push(info.signinreward_day4_score || 0); + dayScore.push(info.signinreward_day5_score || 0); + dayScore.push(info.signinreward_day6_score || 0); + dayScore.push(info.signinreward_day7_score || 0); + + // let isopen_signinreward = info.isopen_signinreward; + // if (isopen_signinreward!=1) { + // app.util.message('未开启签到送积分功能', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + // } + + that.setData({ + info: res.data.data || {}, + dayScore + }) + } else { + that.setData({ needAuth: true }) + } + } + }) + }, + + signIn: function () { + if (!this.authModal() || this.isLock) return; + this.isLock = true; + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'signinreward.sub_signin', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { score, continuity_day, reward_socre } = res.data; + let info = that.data.info; + info.score = score; + info.today_is_signin = 1; + info.has_continuity_day = continuity_day; + info.show_day_arr[continuity_day-1].is_signin = 1; + that.setData({ info, showSignModal: true, reward_socre }) + // app.util.message('签到成功', '', 'success'); + } else{ + app.util.message(res.data.msg || '签到失败', '', 'success'); + } + this.isLock = false; + } + }) + }, + + goLink: function (event) { + if (!this.authModal()) return; + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + handleTipModal: function(){ + this.setData({ + showSignModal: !this.data.showSignModal + }) + }, + + getList: function () { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'signinreward.load_sign_goodslist', + token, + pageNum: this.page, + is_random: 1, + head_id: cur_community.communityId + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.list; + if (list.length < 10) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else { + let h = {}; + if (that.page == 1) h.noData = 1; + that.setData({ + loadMore: false, + noMore: false, + loadText: "没有更多记录了~", + ...h + }) + } + } + }) + }, + + onReachBottom: function() { + if (!this.data.loadMore) return false; + this.getList(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let info = this.data.info; + let { signinreward_share_title, signinreward_share_image } = info; + var share_id = wx.getStorageSync('member_id'); + var share_path = 'eaterplanet_ecommerce/moduleA/score/signin?share_id=' + share_id; + console.log('签到分享地址:', share_path); + + return { + title: signinreward_share_title, + path: share_path, + imageUrl: signinreward_share_image, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + let info = this.data.info; + let { signinreward_share_title, signinreward_share_image } = info; + var share_id = wx.getStorageSync('member_id'); + var query= `share_id=${share_id}`; + + return { + title: signinreward_share_title, + query, + imageUrl: signinreward_share_image, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/score/signin.json b/eaterplanet_ecommerce/moduleA/score/signin.json new file mode 100644 index 0000000..fecfbd6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/signin.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "积分", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "sku": "../../components/sku/index", + "i-modal": "../../components/modal/index", + "guess-like": "../components/score-guess-like/index", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/score/signin.wxml b/eaterplanet_ecommerce/moduleA/score/signin.wxml new file mode 100644 index 0000000..9e38816 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/signin.wxml @@ -0,0 +1,70 @@ + + + + + + 活动规则 + + + 当前积分 + + {{info.score || 0}} + 明细 + + + + + + 已签到 + 签到 + 已连续签到 + {{info.has_continuity_day || 0}} + + + + +{{dayScore[index]}} + {{item.is_today==1?'今日':item.date}} + + + + + + 连续签到有机会领取以下奖励: + + + + 连续{{index+1}}天 + + {{item}} + 积分 + + + + + + + + + + + + + + 签到成功 + 获得{{reward_socre}}积分 + 好的 + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/score/signin.wxss b/eaterplanet_ecommerce/moduleA/score/signin.wxss new file mode 100644 index 0000000..acb2635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/score/signin.wxss @@ -0,0 +1,202 @@ +.wrap { + width: 100%; + overflow-x: hidden; +} + +.navItem { + font-size: 28rpx; +} + +.score .tit { + color: #999; + margin-top: 40rpx; +} + +.score .num { + font-family: DIN; + color: #4facfe; + font-size: 60rpx; + font-weight: bold; + padding-bottom: 20rpx; +} + +.signBtn { + background: linear-gradient(120deg, #e0c3fc 0%, #8ec5fc 100%); + width: 200rpx; + height: 200rpx; + border-radius: 50%; + color: #fff; + text-align: center; + line-height: 200rpx; + margin: 20rpx 0; +} + +.signBtn.disabled { + background: #ccc; +} + +.sign .list { + width: 100%; + padding: 40rpx 0 20rpx; +} + +.sign .list .list-item { + position: relative; + text-align: center; + min-width: 88rpx; +} + +.sign .list .list-item::before { + position: absolute; + content: ""; + border: 4rpx solid #8ec5fc; + left: -36rpx; + width: 55rpx; + top: 25rpx; +} + +.sign .list .list-item.on::before { + content: ""; + border: 4rpx solid #4facfe; +} + +.sign .list .list-item:first-child::before { + content: none; +} + +.sign .list .list-item .num { + position: relative; + z-index: 1; + display: inline-block; + text-align: center; + width: 52rpx; + height: 52rpx; + border-radius: 50%; + line-height: 52rpx; + margin-bottom: 10rpx; + font-size: 24rpx; + background: #8ec5fc; + color: #fff; +} + +.sign .list .list-item .iconfont { + position: relative; + z-index: 1; + display: inline-block; + text-align: center; + color: #4facfe; + font-size: 50rpx; + margin-bottom: 10rpx; + width: 52rpx; + height: 52rpx; +} + +.sign .list .list-item .datetime { + font-size: 20rpx; +} + +.viplist .list { + display: flex; + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; + margin: 30rpx 0; +} + +.viplist .list .list-item { + position: relative; + border: 1rpx solid rgb(59, 140, 232); + padding: 18rpx 15rpx 10rpx; + border-radius: 15rpx; + min-width: 135rpx; + max-width: 135rpx; + height: 120rpx; + margin-right: 20rpx; + align-items: flex-start; +} + +.signTip { + position: relative; + width: 644rpx; + height: 645rpx; +} + +.loadingpic { + animation: load 3s linear 1s infinite; +} + +@keyframes load { + from { + transform: rotate(0deg); + } + + to { + transform: rotate(360deg); + } +} + +.signTipLight { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoQAAAKFCAMAAABiNQjYAAAAjVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8DizOFAAAAL3RSTlMABAsHDxMdGRYnKyEvQiQ+OUYzSjZOYFtkUmhteVhVdHCCfoaLkJWZnaGmrLG4xJtLVuIAALjgSURBVHja7NzdkuogEATgNO37P/OZYiFggKO1Q1yw+iMhP7d2DUGJh4iIiIiI/Abqrbklcj8MbyiQ8imo2oGmnRRDuQtyf83gJZGKoNwG46YUSo8yKN8HgHWIWx6VAZz5PG8qhnIXVNqLozpRBOUueJNSKHeBQiguUAjlCyiE4imCUCUUH3/6YJtCKH8H1qDhWP4ArP1swKyJCT8WQq3G+Q7VwoIpQQQBGhCGjF085ktDFUJJ2csNqZ9RVsA3gYcftDZxZ0i7dSWFh21efNvhBq1K3BVSBEurbRRCnPMpqBxupHxgqezBjs92DKGsDtcLlLVWdsCuIQSqYq6xeQN4eo7HmcO9Q5gn9NACxeXl8KXzsqBvfgjx0RDmHJ5NT4dLO+cgeTjuIf2VMASawFfgzmASQ6h3BjZQ1QgMMHXeEEa0ZpthiiVDvHFeTQzh9d1S/ZSyIOQeODBEMnaHS06aYdkj1ge6Sy6yEkS9RbUslCJo3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gx6CCiGXm4D+A7g8i8yP4IUaexa7nwIDNRMRj3yAIgiAIPog/YPT/GCz2HRcAAAAASUVORK5CYII='); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 100%; + height: 100%; +} + +.signTipCon { + background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAaQAAAGkCAMAAABJkqEHAAAC8VBMVEUAAAD1zGTtuVf////tuVf////////3zWX////40Gf40GfxwV33zWXrQC7qtFP0yGHzxWDrQC3rQjDwwFzrOCXsSDb54rLqNyT////sTj3rQjD////3z2frtlXrQzH40WjpslL////1zGTqtFT40WjrQzH99+j76Lr66b7////1znT1zGT1y2TrQzHsTj3qNyTblz30yWL87dL1y2T87M/dl0DdmEHclj7768v66snqyG/////3zWXrQC756MLqx2zdmUH45Lrpxmnzx2HqOCX3zmbblD7qOifrynPemkL45bz979fv04z45r7y2Zvst1balj3pxmj347fhoEbuz4LrRTP66cbfnEP347Xxwl31ymP0ymP24K3x2Jjbkz3akjzrPCn97tT66MTx15brPiz55r/w1ZL24rTqyXHmqk3uvFnzxmDsSjnrtVXqs1Por1DnrU/mrE7jpUnio0jlqEvry3XqtVTpslLosFHtuVfkpkv24bLwwFzvvlvgnkTsTTzz26Hy2p3YlTztu1j03aXz2p/40WjksVbsRzbu0ITszXz98Nny1pTw1ZDu0Ybsy3f03KP03aftzn/szHnoxGP13qjw1I/v0on136r20YDtzn3szHr+8dvoxWXrPSvyxF724LDlZDfsSDfv0YjlqUz40Gfw1pXnrlDXlDzQkDrTkTvsTDv+8t/77MzNjTnnYzf/8+Hnw2DnbD7Vkjvx2Zriokfv1I7vv1zmtlz+8d3636b0pFjocUHtVT/nWjTbjzzqXzn42pjy0IrsxHXqu2bqaEH//fnwekvGiDfjrFLvckPnWDTsSTPUo17bqFvJizjoy5jmvIDftnLQmUzox4TswG71y2nv1ZDu0oj0zXz3xmTXnUzt06Ly2Z3005Dsy4zxzITyyXjju3TYmEPx263kwo3Zrm7frWLcoU/Lk0f9+fL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14Dl0O3aOka/ALQRAxfnKw8+AAAAAElFTkSuQmCC'); + background-repeat: no-repeat; + background-size: 100% 100%; + width: 420rpx; + height: 420rpx; + position: absolute; + top: 50%; + left: 50%; + margin-left: -210rpx; + margin-top: -225rpx; +} + +.signTip .signTipCon .state { + font-size: 34rpx; + color: #fff; + margin-top: 150rpx; +} + +.signTip .signTipCon .integral { + font-size: 30rpx; + color: rgba(255,255,255,0.6); + margin-top: 9rpx; +} + +.signTip .signTipCon .signTipBnt { + font-size: 30rpx; + color: #eb4331; + width: 260rpx; + height: 76rpx; + background-color: #f8d168; + border-radius: 38rpx; + line-height: 76rpx; + margin: 48rpx auto 0 auto; +} + +.like { + margin-top: 60rpx; + margin-bottom: 100rpx; +} + +.like-title { + font-size: 30rpx; + text-align: center; + font-weight: bold; + color: #666; + margin-bottom: 20rpx; +} + +.like-list { + position: relative; + padding: 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + z-index: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/seckill/list.js b/eaterplanet_ecommerce/moduleA/seckill/list.js new file mode 100644 index 0000000..afaee8b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/seckill/list.js @@ -0,0 +1,283 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + statusBarHeight: app.globalData.statusBarHeight + 44 + 'px', + searchBarHeight: app.globalData.statusBarHeight + 'px', + currentTab: 0, + scekillTimeList: [], + endTime: 10000, + list: [], + clearTimer: false + }, + secTime: '', + seckill_share_title: '', + seckill_share_image: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + status.setNavBgColor(); + app.setShareConfig(); + this.secTime = options.time || ''; + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + that.setData({needAuth: !res}) + res && (0, status.cartNum)('', true).then((resp) => { + resp.code == 0 && that.setData({ + cartNum: resp.data + }) + }); + }) + this.loadPage(); + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + this.setData({ clearTimer: false }) + }, + + loadPage: function(){ + this.getInfo(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + const that = this; + this.setData({ + showEmpty: false, + needAuth: false, + showAuthModal: false + }, () => { + that.loadPage() + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ + showAuthModal: !this.data.showAuthModal + }); + return false; + } + return true; + }, + + getInfo: function(){ + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'scekill.get_scekill_info' + }, + dataType: 'json', + success: function (res) { + if(res.data.code==0){ + let { + seckill_is_open, + scekill_time_arr, + seckill_page_title, + seckill_bg_color, + seckill_share_title, + seckill_share_image, + showTabbar + } = res.data.data; + wx.setNavigationBarTitle({ + title: seckill_page_title || '整点秒杀' + }) + + let myDate = new Date(); + let curHour = myDate.getHours(); // 当前时间 + console.log('当前时间:', curHour); + let curSeckillIdx = 0; //当前时间索引 + let scekillTimeArr = scekill_time_arr || []; //显示的时间段 + // if (scekill_time_arr.length > 5) {} + //判断各个时段状态 + let scekillTimeList = []; + let currentTab = 0; + if (scekillTimeArr.length) { + scekillTimeArr.forEach((item, idx) => { + let secObj = {}; + //state: 0已开抢 1疯抢中 2即将开抢 + if (item == curHour) { + secObj.state = 1; + secObj.desc = '疯抢中'; + currentTab = idx; + } else if (item < curHour) { + secObj.state = 0; + secObj.desc = '已开抢'; + } else { + secObj.state = 2; + secObj.desc = '即将开抢'; + } + secObj.timeStr = (item < 10 ? '0' + item : item) + ':00'; + secObj.seckillTime = item; + scekillTimeList.push(secObj); + }) + if (that.secTime!='') { + let k = scekillTimeArr.findIndex((n) => n == that.secTime); + if (k > 0) currentTab = k; + } + that.getSecKillGoods(scekillTimeArr[currentTab]); + } + + let curTimeStr = (scekillTimeArr[currentTab]*1 + 1); + if (that.secTime!='' && curHour!=scekillTimeArr[currentTab]) { + curTimeStr = (scekillTimeArr[currentTab]*1); + } + + let endTime = new Date(new Date().toLocaleDateString()).getTime() + curTimeStr*60*60*1000; + that.seckill_share_title = seckill_share_title; + that.seckill_share_image = seckill_share_image; + that.setData({ scekillTimeList, seckill_bg_color, currentTab, endTime, showTabbar }) + } + } + }) + }, + + handleClick(e) { + let that = this; + let currentTab = e.currentTarget.dataset.index; + let scekillTimeList = this.data.scekillTimeList; + let day = new Date(new Date().toLocaleDateString()).getTime(); + let curTimeItem = scekillTimeList[currentTab]; + let endTime = 0; + if (curTimeItem.state == 1) { + endTime = day + (curTimeItem.seckillTime * 1 + 1) * 60 * 60 * 1000; + } else { + if (curTimeItem.state == 2) { + endTime = day + (curTimeItem.seckillTime * 1) * 60 * 60 * 1000 + 1; + } + } + + this.setData({ + list: [], + currentTab, + endTime, + clearTimer: true + }, ()=>{ + that.getSecKillGoods(curTimeItem.seckillTime); + }) + }, + + getSecKillGoods: function (seckill_time) { + wx.showLoading(); + var that = this; + var cur_community = wx.getStorageSync('community'); + var token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_gps_goodslist', + token: token, + pageNum: 1, + head_id: cur_community.communityId, + seckill_time, + is_seckill: 1, + per_page: 10000 + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.list || []; + list = that.transTime(list); + let showEmpty = false; + if (list.length == 0) showEmpty = true; + that.setData({ list, clearTimer: false, showEmpty }) + } else { + that.setData({ clearTimer: false, showEmpty: true }) + } + } + }) + }, + + /** + * 结束时间判断 + */ + transTime: function (list) { + let that = this; + let e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; + e === 0 && list.map(function (t) { + t.end_time *= 1000; + t.actEnd = t.end_time <= new Date().getTime(); + }) + return list; + }, + + endCurSeckill: function(){ + this.loadPage(); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.loadPage(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var member_id = wx.getStorageSync('member_id'); + let { + seckill_share_title, + seckill_share_image + } = this; + return { + title: seckill_share_title, + path: "eaterplanet_ecommerce/moduleA/seckill/list?share_id=" + member_id, + imageUrl: seckill_share_image, + success: function () { }, + fail: function () { } + }; + }, + + onShareTimeline: function() { + var member_id = wx.getStorageSync('member_id'); + let { + seckill_share_title, + seckill_share_image + } = this; + var query= `share_id=${member_id}`; + return { + title: seckill_share_title, + imageUrl: seckill_share_image, + query, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/seckill/list.json b/eaterplanet_ecommerce/moduleA/seckill/list.json new file mode 100644 index 0000000..ff87a34 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/seckill/list.json @@ -0,0 +1,11 @@ +{ + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-count-down": "../../components/count-down/index", + "i-seckill-spu": "../../components/seckillItem/seckillItem", + "i-empty": "../../components/empty/index", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/seckill/list.wxml b/eaterplanet_ecommerce/moduleA/seckill/list.wxml new file mode 100644 index 0000000..c1486b7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/seckill/list.wxml @@ -0,0 +1,32 @@ + + + + + + {{item.timeStr}} + {{item.desc}} + + + + + 限时抢购 先到先得 + + + 距离本场{{scekillTimeList[currentTab].state==1?'结束':'开始'}} + + + + + + + + + + + 暂时没有商品 + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/seckill/list.wxss b/eaterplanet_ecommerce/moduleA/seckill/list.wxss new file mode 100644 index 0000000..caf66d1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/seckill/list.wxss @@ -0,0 +1,92 @@ +.fixed-top { + position: fixed; + + left: 0; + right: 0; + z-index: 100; +} + +.scroll-wrapper { + white-space: nowrap; + -webkit-overflow-scrolling: touch; + height: 114rpx; + box-sizing: border-box; + background: linear-gradient(90deg, #ea404b 0%, #ed745d 100%); +} + +::-webkit-scrollbar { + width: 0; + height: 0; + color: transparent; +} + +.navigate-item { + display: inline-block; + text-align: center; + height: 99rpx; + width: 20%; + color: #fff; + margin-top: 15rpx; +} + +.names { + font-size: 28rpx; +} + +.desc { + font-size: 22rpx; +} + +.navigate-item.active .names { + color: #fff; + font-weight: bold; + font-size: 34rpx; +} + +.navigate-item.active .desc { + color: #ea474e; + padding: 2rpx 10rpx; + background-color: #fff; + border-radius: 20rpx; +} + +.counttime { + height: 60rpx; + background: #f0f4f7; + padding: 0 20rpx; + font-size: 24rpx; +} + +.count-down { + height: 68rpx; + line-height: 68rpx; + color: #444; + font-size: 26rpx; + display: flex; + align-items: center; + flex: 1; +} + +.count-down .item-time { + width: 34rpx; + height: 32rpx; + line-height: 32rpx; + color: #fff; + text-align: center; + background: #444; + border-radius: 4rpx; + padding: 0 2rpx; +} + +.count-down-left-text { + font-size: 24rpx; + margin-right: 10rpx; +} + +.list { + padding-top: 174rpx; +} + +.list-item { + border-bottom: .1rpx solid #f2f5f8; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/addGood.js b/eaterplanet_ecommerce/moduleA/solitaire/addGood.js new file mode 100644 index 0000000..c5593fe --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/addGood.js @@ -0,0 +1,247 @@ +var app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + tabs: [{ + id: 0, + name: '社区商品' + }, + { + id: 1, + name: '仅快递' + } + ], + currentIdx: 0, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + checkedAll: false, + checkedCount: 0 + }, + page: 1, + keyword: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + let currentIdx = options.type || 0; + let that = this; + this.setData({ + currentIdx + }, ()=>{ + that.getData(); + }) + }, + + initFn: function() { + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + checkedAll: false, + checkedCount: 0 + },()=>{ + this.getData(); + }) + }, + + /** + * 切换导航 + */ + changeTabs: function(e) { + let that = this; + let currentIdx = e.currentTarget.dataset.type || 0; + this.page = 1; + this.setData({ + currentIdx, + list: [], + noData: 0, + showEmpty: false, + loadMore: true, + loadOver: false + }, () => { + that.getData(); + }) + }, + + /** + * 获取列表 + */ + getData: function() { + let that = this; + let keyword = this.keyword || ''; + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.search_head_goodslist', + token: token, + page: this.page, + is_only_express: this.data.currentIdx, + keyword, + is_soli: 1 + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h, checkedAll: false }) + } else if (res.data.code == 1) { + // 无数据 + if (that.page == 1) that.setData({ noData: 1 }) + that.setData({ loadMore: false, noMore: false, loadText: "没有更多记录了~" }) + } else if (res.data.code == 2) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } + } + }) + }, + + /** + * selType: 0单选 1多选 + */ + selectGoods: function(t){ + let selType = t.currentTarget.dataset.type || 0; + let currentIdx = this.data.currentIdx; + var pages = getCurrentPages(); + var prevPage = pages[pages.length - 2]; //上一个页面 + let goods = prevPage.data.goods || []; + let goodsItem = t.detail; + if (selType==0) { + if(goods.length>0) { + let idx = goods.findIndex(item => { return (item.gid == goodsItem.gid) }) + if (idx === -1) goods.push(goodsItem); + } else { + goods.push(goodsItem); + } + } else { + let list = this.data.list || []; + let selGoods = list.filter(item => item.checked==1 ); + let newGoods = goods.concat(selGoods); + let uniq = new Map() + // 去重合并 + for (let i = 0; i < newGoods.length; i++) { + let gid = newGoods[i].gid, val = newGoods[i]; + if (uniq.has(gid)) uniq.set(gid, val) + else uniq.set(gid, val) + } + let res = []; + // 放入数组 + for (let comb of uniq) { + console.log(comb[1]) + res.push(comb[1]) + } + goods = res; + } + prevPage.setData({ + goods, + type: currentIdx + }) + wx.navigateBack({ + delta: 1 + }) + }, + + /** + * 勾选 + */ + checkboxChange: function (e) { + var type = e.currentTarget.dataset.type, + idx = e.currentTarget.dataset.index, + list = this.data.list, + checkedAll = this.data.checkedAll; + + if ("all" === type) { + let ck = 0; + if (checkedAll) { + list.forEach(function (item) { + item.checked = 0; + }) + } else { + list.forEach(function (item) { + item.checked = 1; + }) + ck = list.length; + } + this.setData({ + checkedCount: ck, + list, + checkedAll: !checkedAll + }) + } else if ("item" === type) { + list.forEach(function (item, t) { + if (idx == t) { + if (item.checked) { + item.checked = 0 + } else { + item.checked = 1 + } + } + }) + var ck = 0; + list.forEach(function (item) { + if (item.checked) { + ck++; + } + }) + this.setData({ + checkedCount: ck, + list, + checkedAll: ck == list.length ? true : false + }) + } + }, + + goResult: function(e){ + let keyword = e.detail.value || ''; + (this.keyword = keyword), this.initFn(); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/addGood.json b/eaterplanet_ecommerce/moduleA/solitaire/addGood.json new file mode 100644 index 0000000..13da4ca --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/addGood.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "选择商品", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-solitaire-good": "../components/solitaireGood" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxml b/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxml new file mode 100644 index 0000000..1559d6c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + {{item.name}} + + + + + + + + + + + + + + + + + + + + + 合计:{{checkedCount}}条 + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxss b/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxss new file mode 100644 index 0000000..199d7c8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/addGood.wxss @@ -0,0 +1,203 @@ +.fixed-top { + position: fixed; + left: 0; + right: 0; + top: 0; + z-index: 100; +} + +/* 搜索 S */ + +.search-bar { + padding: 12rpx 25rpx; + background-color: #fff; + padding-bottom: 20rpx; +} + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} + +/* 搜索 E */ + +.nav-bar { + width: 100%; + border-bottom: 1px solid#e5e5e5; +} + +.nav-bar .nav-bar-inner { + display: flex; + justify-content: center; + padding: 0 40rpx; + background-color: white; + height: 58rpx; + text-align: center; +} + +.nav-bar .nav-bar-item { + position: relative; + word-break: keep-all; + font-size: 28rpx; + font-weight: 500; + color: #666; + padding: 20rpx 0; +} + +.nav-bar .current.nav-bar-item::after { + content: ""; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 3px; + background: linear-gradient(90deg, #ff4936 0%, #ff6e3c 100%); + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255, 89, 0, 0.25); + border-radius: 24rpx; +} + +.nav-bar-content { + margin-top: 49px; + padding-bottom: 30rpx; +} + +.list { + padding-top: 150rpx; + padding-bottom: 100rpx; +} + +.list .item { + position: relative; + padding: 30rpx 0; + margin: 0 30rpx; +} + +.list .item::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + right: 0; + border-bottom: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleY(0.5); +} + +.list .item:last-child::after { + content: none; +} + +/* 底部 */ +.bottom-bar { + width: 100%; + height: 104rpx; + display: flex; + justify-content: space-between; + align-items: center; + background: #fff; + position: fixed; + bottom: 0; + left: 0; + z-index: 9; + padding: 0 30rpx; + box-sizing: border-box; + box-shadow: 0px -1px 3px #ccc; +} + +.bottom-bar .check-box-content { + width: 140rpx; +} + +.bottom-bar .check-box-content .check-box { + margin-right: 20rpx; +} + +.bottom-bar .flex { + display: flex; + align-items: center; + justify-content: flex-end; +} + +.bottom-bar .total { + margin-right: 20rpx; + text-align: right; +} + +.bottom-bar .total span { + color: #f75451; +} + +.bottom-bar .btn { + flex: 3; + padding: 0 40rpx; + height: 60rpx; + border-radius: 60rpx; + line-height: 60rpx; + text-align: center; + color: #fff; + font-size: 30rpx; + background: #f75451; + white-space: nowrap; +} + +.bottom-bar .btn.gray { + background: #f55b5b; +} + +.bottom-bar .btn.btn-disabled { + flex: 1; + padding: 0 40rpx; + background: #e3e3e3; +} + +.check-box { + box-sizing: border-box; + width: 50rpx; + height: 50rpx; + display: flex; + justify-content: center; +} + +.check-box .checkbox-checked { + width: 48rpx; + height: 48rpx; +} + +.check-box .checkbox-disabled { + width: 48rpx; + height: 48rpx; + margin-top: 2rpx; +} + +.check-box-content { + height: 100%; + display: flex; + justify-content: center; + align-items: center; + margin-right: 20rpx; +} diff --git a/eaterplanet_ecommerce/moduleA/solitaire/details.js b/eaterplanet_ecommerce/moduleA/solitaire/details.js new file mode 100644 index 0000000..65c163d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/details.js @@ -0,0 +1,1105 @@ +// 团长接龙详情 +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/compoentCartMixin.js'), require('../../mixin/globalMixin.js')], + data: { + showGoodsModal: false, + showCommentModal: false, + showCartModal: false, + pid: 0, + hideGoods: true, + buy_type: 'soitaire', + groupInfo: { + group_name: '社区', + owner_name: '团长' + }, + showShareModal: false, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + isIpx: app.globalData.isIpx, + orderList: [], + noOrderMore: false, + noOrderData: 0, + myOrderList: [], + noMyOrderMore: false, + noMyOrderData: false + }, + imagePath: '', + options: '', + page: 1, + soli_id: 0, + orderPage: 1, + isFirst: 1, + myOrderPage: 1, + canCancel: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + let that = this; + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { that.setData({ groupInfo }) }); + var scene = decodeURIComponent(options.scene); + if (scene !== 'undefined') { + var opt_arr = scene.split("_"); + options.id = opt_arr[0]; //接龙id + options.share_id = opt_arr[1]; //分享人id + } + let { id, share_id } = options; + this.options = options; + if (share_id != 'undefined' && share_id > 0) wx.setStorageSync('share_id', share_id); + if (!id) { + app.util.message('参数错误', 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/index', 'error'); + } + this.soli_id = id; + }, + + initFn(){ + let that = this; + let id = this.options && this.options.id || 0; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true + }, ()=>{ + id && that.getData(id); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + let id = this.options && this.options.id || 0; + id && this.getData(id),this.getOrderList(), this.getMyOrderList(); + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + that.showCartGoods().catch(()=>{ + console.log('购物车为空') + }); + } + }) + }, + + onHide: function () { + this.setData({ clearTime: true }) + }, + + authSuccess: function(){ + this.setData({ needAuth: false }) + let head_data = this.data.community; + console.log('authSuccess'); + this.compareCommunity(head_data); + this.visiteRecord(); + }, + + /** + * 获取详情 + */ + getData: function (id) { + const token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_solitaire_detail', + id, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { head_data, soli_info, solitaire_target, solitaire_target_takemember, solitaire_target_takemoney, solitaire_target_type,solitaire_is_message } = res.data; + + // 完成接龙差值 + let { + soli_total_money, //一共下单金额 + order_count //一共下多少单 + } = soli_info; + let diffMoney = solitaire_target_takemoney * 1 - soli_total_money*1; + let diffMember = solitaire_target_takemember * 1 - order_count * 1; + that.setData({ + community: head_data || '', + soli_info, + solitaire_target, + solitaire_target_takemember, + solitaire_target_takemoney, + solitaire_target_type, + diffMoney, + diffMember, + clearTime: false, + solitaire_is_message + }) + + if(that.isFirst==1) { + that.compareCommunity(head_data); + if(solitaire_is_message==1){ + that.getCommentList() + } + setTimeout(() => { + that.drawImg(head_data, soli_info); + }, 1000); + token && that.visiteRecord(); + } + that.isFirst++; + } else { + app.util.message(res.data.msg, 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/index', 'error'); + return; + } + } + }) + }, + + showImgPrev: function (event) { + var idx = event ? event.currentTarget.dataset.idx : ''; + let urls = this.data.soli_info.images_list || ''; + wx.previewImage({ + current: urls[idx], + urls + }); + }, + + /** + * 比较社区 + * shareCommunity: 这个接龙的所属社区 + */ + compareCommunity: function(shareCommunity) { + let that = this; + // 原来社区 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunityId = currentCommunity.communityId || ''; + const token = wx.getStorageSync('token'); + let { groupInfo } = that.data; + + let shareCommunityId = shareCommunity.head_id || ''; + shareCommunityId && util.getCommunityById(shareCommunityId).then(res=>{ + let { hide_community_change_btn, default_head_info } = res; + if (res.open_danhead_model == 1) { + // 开启单社区 + app.globalData.community = default_head_info; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: default_head_info }) + token && util.addhistory(default_head_info); + if(shareCommunityId!=default_head_info.communityId) { + let { groupInfo } = that.data; + console.log('开启单社区'); + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/index', 'error', '知道了'); + return; + } + } else { + // 社区是否存在 + if (currentCommunityId != '' && shareCommunityId) { + // 存在并且不相同 + console.log('currentCommunityId存在 比较社区') + if (currentCommunityId != shareCommunityId) { + console.log('currentCommunityId存在 社区不同') + //如果禁止切换 + // if (hide_community_change_btn == 1) { + console.log('禁止切换'); + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/index', 'error', '知道了'); + return; + // } + // that.setData({ + // hide_community_change_btn, + // showChangeCommunity: res.data ? true : false, + // changeCommunity: res.data, + // currentCommunity: currentCommunity + // }) + } + } else { + // 不存在社区id + //token 是否存在 + if (token) { + util.getCommunityInfo().then(function (ret) { + //比较社区 + console.log('token存在 比较社区') + if (ret.community_id && ret.community_id != shareCommunityId) { + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/index', 'error', '知道了'); + return; + // that.setData({ + // showChangeCommunity: true, + // currentCommunity: ret + // }) + } + }).catch((param) => { + console.log('step4 新人') + if (Object.keys(param) != '') util.addhistory(param, true); + }); + } else { + console.log('token不存在 存社区') + // 直接存本地 + app.globalData.community = res.data; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: res.data }) + } + } + } + }); + }, + + /** + * 切换提示 + */ + confrimChangeCommunity: function () { + let community = this.data.changeCommunity; + let token = wx.getStorageSync('token'); + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + token && util.addhistory(community); + + this.setData({ showChangeCommunity: false }) + console.log('用户点击确定') + }, + + /** + * 取消切换 + */ + cancelChangeCommunity: function () { + let { groupInfo } = this.data; + wx.showModal({ + title: '提示', + content: `此接龙在您所属${groupInfo.group_name}不可参与`, + showCancel: false, + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + wx.switchTab({ + url: `/eaterplanet_ecommerce/pages/index/index` + }) + } + } + }); + }, + + /** + * 商品弹窗 + */ + handleGoodsModal: function () { + this.setData({ + showGoodsModal: !this.data.showGoodsModal + }) + }, + + /** + * 评论弹窗 + */ + handleCommentModal: function () { + this.setData({ + showCommentModal: !this.data.showCommentModal + }) + }, + + changeCartNum: function(e){ + let { goods_total_count, goods_id } = e.detail; + let soli_info = this.data.soli_info || ''; + let goods_list = soli_info.goods_list || []; + let gidx = goods_list.findIndex(item => item.actId == goods_id); + if (gidx !== -1) { + this.showCartGoods().catch(()=>{ + console.log('购物车为空') + }); + goods_list[gidx].goods_total_count = goods_total_count || 0; + soli_info.goods_list = goods_list; + // let cartNum = 0; + // goods_list.forEach(item=>{ + // cartNum += item.goods_total_count*1; + // }) + this.setData({ soli_info }) + } + }, + + /** + * 购物车弹窗 + */ + handleCartModal: function() { + console.log('购物车弹窗'); + let that = this; + let showCartModal = this.data.showCartModal; + if (showCartModal){ + this.setData({ showCartModal: false }) + } else { + this.showCartGoods().then(()=>{ + that.setData({ showCartModal: true }) + }).catch(()=>{ + console.log('购物车为空') + }); + } + }, + + /** + * showModal + */ + showCartGoods: function (showModal=true){ + let that = this; + return new Promise(function (resolve, reject) { + const token = wx.getStorageSync('token'); + let soli_id = that.soli_id || ''; + let currentCommunity = wx.getStorageSync('community'); + let community_id = currentCommunity.communityId || ''; + + soli_id && wx.showLoading(), app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'car.show_cart_goods', + token, + soli_id, + community_id, + buy_type: 'soitaire', + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let carts = res.data.carts; + if (Object.keys(carts).length == 0){ + that.setData({ cartNum: 0 }) + reject(res); + } else { + let { cartNum, totMoney } = that.countCartNum(carts); + showModal && that.setData({ carts, cartNum, totMoney }) + resolve(); + } + } else if(res.data.code == 5) { + that.setData({ needAuth: true, showAuthModal: true }) + } else { + console.log(res) + } + } + }) + }) + }, + + /** + * 计算数量和金额 + * @param {*} carts + */ + countCartNum: function(carts){ + let cartNum = 0; + let totMoney = 0; + Object.keys(carts).forEach(k=>{ + Object.keys(carts[k].shopcarts).forEach(j=>{ + let gnum = carts[k].shopcarts[j].goodsnum*1; + cartNum += gnum; + totMoney += carts[k].shopcarts[j].currntprice*gnum; + }); + }) + totMoney = totMoney.toFixed(2); + return { cartNum, totMoney }; + }, + + /** + * 购物车改变 + * 重新请求列表 + */ + changeCart: function(e){ + let id = this.options && this.options.id || 0; + let carts = e.detail; + let { cartNum, totMoney } = this.countCartNum(carts); + id && this.setData({ clearTime: true, carts, cartNum, totMoney }), this.getData(id); + }, + + /** + * 留言 + */ + subComment: function (e) { + let { soli_info, pid } = this.data; + let soli_id = soli_info.id || ''; + let content = e.detail.value.content || ''; + if (content == '') { + wx.showToast({ + title: '请输入内容', + icon: 'none' + }) + return; + } + let that = this; + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.sub_solipost', + soli_id, + content, + pid, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { post_id, cur_time } = res.data; + let userInfo = wx.getStorageSync('userInfo'); + let comment = { + id: post_id, + soli_id, + pid, + username: userInfo.nickName, + avatar: userInfo.avatarUrl, + content, + fav_count: 0, + addtime: cur_time, + reply: [], + is_agree: false + } + let list = that.data.list; + list.unshift(comment); + + soli_info.comment_total = soli_info.comment_total*1 + 1; + that.setData({ soli_info, list, content: '', showCommentModal: false, noData: 0 }) + app.util.message(res.data.msg || '留言成功', '', 'success'); + } else { + app.util.message(res.data.msg || '留言失败', '', 'error'); + } + } + }) + }, + + /** + * 记录浏览次数 + */ + visiteRecord: function () { + let soli_id = this.soli_id || ''; + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.send_visite_record', + soli_id, + token + }, + dataType: 'json', + success: function (res) { } + }) + }, + + /** + * 点赞 + */ + favComment: function (e) { + let that = this; + let soli_info = this.data.soli_info; + let soli_id = soli_info.id || ''; + let post_id = e ? e.currentTarget.dataset.post_id : ''; + let idx = e ? e.currentTarget.dataset.idx : 0; + const token = wx.getStorageSync('token'); + post_id && app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.fav_soli_post', + soli_id, + post_id, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + if (res.data.do == 1) { + // 点赞成功 + let list = that.data.list; + list[idx].is_agree = true; + list[idx].fav_count = list[idx].fav_count * 1 + 1; + that.setData({ list }) + } else { + // 取消成功 + let list = that.data.list; + list[idx].is_agree = false; + list[idx].fav_count = list[idx].fav_count*1 - 1; + that.setData({ list }) + } + } else if (res.data.code == 1) { + that.setData({ needAuth: true, showAuthModal: true }) + } else { + wx.showToast({ + title: res.data.msg || '点赞失败', + icon: 'none' + }) + } + } + }) + }, + + /** + * 更多商品显示隐藏 + */ + handleMoreGoods: function(){ + this.setData({ hideGoods: !this.data.hideGoods }) + }, + + goPlaceOrder: function(){ + let soli_info = this.data.soli_info; + // if (soli_info.is_involved) return; + this.showCartGoods(false).then(()=>{ + let soli_id = soli_info.id || ''; + let url = `/eaterplanet_ecommerce/pages/order/placeOrder?type=soitaire&soli_id=${soli_id}`; + wx.navigateTo({ url }) + }).catch(()=>{ + wx.showToast({ + title: '请先选择商品!', + icon: 'none' + }) + }); + }, + + /** + * 获取评论列表 + */ + getCommentList: function () { + let that = this; + let id = this.options && this.options.id || 0; + const token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_comment_list', + page: this.page, + token, + id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + if (that.page == 1) that.setData({ + noData: 1 + }) + that.setData({ + loadMore: false, + noMore: false, + loadText: "没有更多记录了~" + }) + } + } + }) + }, + + /** + * 用户订单列表 + */ + getMyOrderList: function () { + console.log('getMyOrderList'); + let that = this; + let soli_id = this.options && this.options.id || 0; + const token = wx.getStorageSync('token'); + token && wx.showLoading(), app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.orderlist', + page: this.myOrderPage, + token, + soli_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 6) h.noMyOrderMore = true; + let oldList = that.data.myOrderList; + list = oldList.concat(list); + that.myOrderPage++; + that.setData({ + myOrderList: list, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + let h = { noMyOrderMore: true }; + if (that.myOrderPage == 1) h.noMyOrderData = 1; + that.setData(h) + } + } + }) + }, + + getMoreMyOrder: function(){ + this.data.noMyOrderMore || this.getMyOrderList(); + }, + + //取消订单 + cancelOrder: function(e){ + let that = this; + this.canCancel && wx.showModal({ + title: '取消订单并退款', + content: '取消订单后,款项将原路退回到您的支付账户;详情请查看退款进度。', + confirmText: '取消订单', + confirmColor: '#ff5344', + cancelText: '再等等', + cancelColor: '#666666', + success(res) { + if (res.confirm) { + that.canCancel = false; + let order_id = e.currentTarget.dataset.type; + let idx = e.currentTarget.dataset.index; + let token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.del_cancle_order', + token, + order_id + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if(res.data.code==0){ + //提交成功 + wx.showModal({ + title: '提示', + content: '取消订单成功', + showCancel: false, + confirmColor: '#ff5344', + success(ret) { + if(ret.confirm) { + let myOrderList = that.data.myOrderList; + myOrderList[idx].order_status_id = 5; + that.setData({ myOrderList }) + } + } + }) + } else { + that.canCancel = true; + wx.showToast({ + title: res.data.msg || '取消订单失败', + icon: 'none' + }) + } + } + }) + console.log('用户点击确定') + } else if (res.cancel) { + that.canCancel = true; + console.log('用户点击取消') + } + } + }) + }, + + callTelphone: function(event) { + let phoneNumber = event.currentTarget.dataset.phone; + wx.makePhoneCall({ phoneNumber }) + }, + + /** + * 获取评论列表 + */ + getOrderList: function () { + let that = this; + let id = this.options && this.options.id || 0; + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_soli_order_list', + page: this.orderPage, + id, + size: 6 + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 6) h.noOrderMore = true; + let oldList = that.data.orderList; + let orderList = oldList.concat(list); + that.orderPage++; + that.setData({ + orderList, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + let h = {}; + if (that.orderPage == 1) h.noOrderData = 1; + that.setData({ + noOrderMore: true, + ...h + }) + } + } + }) + }, + + getMoreOrder: function(){ + this.data.noOrderMore || this.getOrderList(); + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore||this.data.solitaire_is_message==0) return false; + this.getCommentList(); + }, + + drawImg: function (head, soli_info) { + let images_list = soli_info.images_list; + let qrcode_image = soli_info.qrcode_image; + let content = soli_info.content.replace(/<[^>]+>|&[^>]+;/g, "").trim(); + content = content.replace(/<\/?.+?>/g, ""); + content = content.replace(/ /g, ""); + let option = []; + let h = 300 + if (images_list.length) { + option.push({ + "type": "image", + "url": images_list[0], + "css": + { + "width": "442px", + "height": "300px", + "top": "230px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "", + "shadow": "", + "mode": "aspectFill" + } + }) + h = 0; + } + + this.setData({ + template: { + "width": "514px", + "height": (710-h) + "px", + "background": "#fff", + "views": [ + { + "type": "image", + "url": head.avatar, + "css": + { + "width": "46px", + "height": "46px", + "top": "25px", + "left": "36px", + "rotate": "0", + "borderRadius": "3px", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "mode": "scaleToFill" + } + }, + { + "type": "text", + "text": head.head_name, + "css": + { + "color": "#000000", + "background": "", + "width": "385px", + "height": "20px", + "top": "30px", + "left": "96px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "14px", + "fontWeight": "bold", + "maxLines": "1", + "lineHeight": "20px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": head.community_name, + "css": + { + "color": "#999999", + "background": "", + "width": "385px", + "height": "17px", + "top": "52px", + "left": "96px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "12px", + "fontWeight": "normal", + "maxLines": "1", + "lineHeight": "17px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": content, + "css": + { + "color": "#666666", + "background": "", + "width": "442px", + "height": "52px", + "top": "158px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "18px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "26px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": soli_info.solitaire_name, + "css": + { + "color": "#000000", + "background": "", + "width": "442px", + "height": "43px", + "top": "95px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "30px", + "fontWeight": "normal", + "maxLines": "1", + "lineHeight": "43px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": "一群人正在赶来接龙", + "css": + { + "color": "#999999", + "background": "", + "width": "442px", + "height": "23px", + "top": (595-h) + "px", + "left": "204px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "16px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "23px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": "长按识别或扫码参与", + "css": + { + "color": "#999999", + "background": "", + "width": "442px", + "height": "22.88px", + "top": (630-h) + "px", + "left": "204px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "16px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "23px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "image", + "url": qrcode_image, + "css": + { + "width": "120px", + "height": "120px", + "top": (560-h) + "px", + "left": "356px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "mode": "scaleToFill" + } + }, + ...option + ] + } + }); + }, + + onImgOK(e) { + this.imagePath = e.detail.path; + this.setData({ + image: this.imagePath + }) + }, + + saveImage() { + let that = this; + wx.saveImageToPhotosAlbum({ + filePath: this.imagePath, + success(res) { + that.setData({ showShareModal: false }) + wx.showToast({ + title: '保存成功!' + }) + }, + fail(res) { + wx.showToast({ + title: '保存失败,请重试!', + icon: 'none' + }) + } + }); + }, + + handleShareModal: function (e) { + let type = e ? e.currentTarget.dataset.type : ''; + let h = {}; + if(type=='order') { + h.showOrderModal = !this.data.showOrderModal + } else { + h.showShareModal = !this.data.showShareModal + this.data.showShareModal || wx.showLoading({ title: '生成中' }) + } + if(!this.data.showShareModal){ + setTimeout(() => { + wx.hideLoading() + this.setData(h) + }, 1000) + } else { + this.setData(h) + } + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let share_id = wx.getStorageSync('member_id') || ''; + let soli_info = this.data.soli_info || ''; + let title = (soli_info&&soli_info.solitaire_name) || ''; + let id = soli_info&&soli_info.id || ''; + let share_path = `eaterplanet_ecommerce/moduleA/solitaire/details?id=${id}&share_id=${share_id}`; + console.log(share_path) + return { + title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + let share_id = wx.getStorageSync('member_id') || ''; + let soli_info = this.data.soli_info || ''; + let title = (soli_info&&soli_info.solitaire_name) || ''; + let id = soli_info&&soli_info.id || ''; + + var query= `id=${id}&share_id=${share_id}`; + return { + title, + query, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/details.json b/eaterplanet_ecommerce/moduleA/solitaire/details.json new file mode 100644 index 0000000..89fa700 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/details.json @@ -0,0 +1,18 @@ +{ + "navigationBarTitleText": "接龙详情", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-solitaire-good": "../components/solitaireGood", + "i-solitaire-head": "../components/solitaireHead", + "i-count-down": "../../components/count-down/index", + "i-cart-modal": "../components/cartModal", + "i-sku": "../../components/sku/index", + "i-modal": "../../components/modal/index", + "i-painter": "../../components/painter/painter", + "i-load-more": "../../components/load-more/index", + "i-change-community": "../../components/changeCommunity/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/details.wxml b/eaterplanet_ecommerce/moduleA/solitaire/details.wxml new file mode 100644 index 0000000..98d5aec --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/details.wxml @@ -0,0 +1,288 @@ + + + + + {{soli_info.solitaire_name}} + + + + 接龙时间:{{soli_info.begin_time_str}}~{{soli_info.end_time_str}} + + + + + + 商品信息 + + + + + + + + + + 还有{{soli_info.goods_list.length-6}}{{goods_sale_unit}}商品,点击展开 + + + 点击收缩 + + + + + + 活动统计 + + + {{soli_info.invite_count|0}} + 浏览(次) + + + {{soli_info.order_count|0}} + 参与接龙(次) + + + {{soli_info.soli_total_money|0}} + 接龙金额(元) + + + + + + + + + 预计接龙完成还差{{diffMember}}人,分享邀请尽快完成目标! + + 已完成目标人数 + + + + 还差{{diffMoney}}元订单金额完成接龙,分享邀请尽快完成目标 + + 已完成目标金额 + + + + 开始倒计时: + + + 接龙未开始 + + + + 接龙倒计时: + + + + 已结束 + 接龙规则 + + + 已结束 + + + + + + 我的订单 + + + + + + + + + {{goods.name}} + ¥{{goods.price}} + + + + + + + + 提货人 + {{item.shipping_name}} {{item.shipping_tel}} + + + 收货地址 + {{item.shipping_address}} + + + {{groupInfo.owner_name}}信息 + + {{item.ziti_name}} + + + 联系{{groupInfo.owner_name}} + + + + + + 取消订单 + 已取消接龙 + 已签收 + 已退款 + 等待退款 + 交易完成 + 售后中 + + 订单详情 + + + + + 点击加载更多 + + + + + + + 接龙记录 + + + + + + {{item.username}} + {{item.addtime}} + + + + + + + {{goods.name}} + ¥{{goods.price}} + + + + + + + 点击加载更多 + + + 暂无订单记录~ + + + + + + + + + + 已有{{soli_info.comment_total}}条留言,快来说说您的感想! + + 接龙留言 + + + + + + + {{item.username}} + {{item.addtime}} + + + {{item.fav_count}} + + + {{item.content}} + + {{community.head_name}}:{{item.reply[0].content}} + + + + + + + 暂无留言~ + + + + + + +
+ + 取消 + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + {{cartNum}} + + + + + ¥{{totMoney||0}} + + 即将开始 + 立即接龙 + 已结束 + + 已结束 + + + + + +
+ + + + + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/solitaire/details.wxss b/eaterplanet_ecommerce/moduleA/solitaire/details.wxss new file mode 100644 index 0000000..924d2a3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/details.wxss @@ -0,0 +1,117 @@ +@import './groupDetails.wxss'; + +.rule { + text-decoration: underline; +} + +.more .iconfont { + transition: 200ms all ease-in; +} + +.more .iconfont.rotate { + display: inline-block; + transform: rotate(180deg); +} + +.fixed-bar { + left: 0; + right: 0; + bottom: 0; + z-index: 800; + height: 100rpx; +} + +.fixed-bar-bg { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + background: linear-gradient(45deg, #474442 0%, #3f2a1c 50%, #4a3721 100%); + overflow: hidden; + z-index: 800; +} + +.fixed-bar-bg::after{ + content: ""; + width:100%; + height:100%; + position: absolute; + left:0; + top:0; + background: inherit; + filter: blur(20px); + z-index: 801; +} + +.cartBtn { + position: relative; + margin: -30rpx 30rpx 0; + width: 110rpx; + height: 110rpx; + line-height: 110rpx; + text-align: center; + border-radius: 50%; + background: linear-gradient(45deg, #fdd225 0%, #feb600 100%); +} + +.cartBtn.disable { + background: rgb(70, 69, 69); + color: #ccc; +} + +.cartBtn .iconfont { + font-size: 60rpx; +} + +.cartBtn .num { + color: #fff; + background-color: #ff5041; + position: absolute; + top: -10rpx; + right: -10rpx; + min-width: 44rpx; + height: 44rpx; + line-height: 44rpx; + border-radius: 44rpx; + text-align: center; + font-size: 24rpx; +} + +.fixed-bar-sub { + background: linear-gradient(270deg, #f9c706 0%, #feb600 100%); + padding: 0 40rpx; + height: 100rpx; + line-height: 100rpx; +} + +.fixed-bar-sub.disable { + background: rgba(103, 103, 103, 0.4); + color: #7f8285; +} + +.order-goods-item { + width: 160rpx; + margin-right: 20rpx; +} + +.order-goods-item .img { + width: 160rpx; + height: 160rpx; +} + +.phone { + margin-left: 20rpx; + padding: 0 20rpx; + height: 44rpx; + display: flex; + align-items: center; + border: 0.1rpx solid #efefef; + border-radius: 26rpx; +} + +.phone .icon-phone { + width: 20rpx; + height: 20rpx; + margin-right: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.js b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.js new file mode 100644 index 0000000..808982c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.js @@ -0,0 +1,790 @@ +// 团长接龙详情 +var app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + showGoodsModal: false, + showCommentModal: false, + pid: 0, + showShareModal: false, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + orderList: [], + noOrderMore: false, + noOrderData: 0, + solitaire_is_message: 0 + }, + imagePath: '', + options: '', + page: 1, + orderPage: 1, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + status.setNavBgColor(); + this.options = options; + let id = options.id || 0; + if(!id) { + app.util.message('参数错误', 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/groupIndex', 'error'); + } + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + initFn() { + let that = this; + let id = this.options && this.options.id || 0; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true + }, () => { + id && that.getData(id); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let id = this.options && this.options.id || 0; + id && this.getData(id), this.getOrderList(); + }, + + onHide: function () { + this.setData({ clearTime: true }) + }, + + /** + * 获取详情 + */ + getData: function (id) { + const token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_solitaire_detail', + id, + token, + is_head: 1 + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { head_data, soli_info, solitaire_target, solitaire_target_takemember, solitaire_target_takemoney, solitaire_target_type,solitaire_is_message } = res.data; + // 完成接龙差值 + let { + soli_total_money, //一共下单金额 + order_count //一共下多少单 + } = soli_info; + let diffMoney = solitaire_target_takemoney * 1 - soli_total_money * 1; + let diffMember = solitaire_target_takemember * 1 - order_count * 1; + + that.setData({ + community: head_data || '', + soli_info, + solitaire_target, + solitaire_target_takemember, + solitaire_target_takemoney, + solitaire_target_type, + diffMoney, + diffMember, + clearTime: false, + solitaire_is_message + }, ()=>{ + that.drawImg(head_data, soli_info); + }) + if(solitaire_is_message==1){ + that.getCommentList() + } + } else if (res.data.code == 2) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg, 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/groupIndex', 'error'); + return; + } + } + }) + }, + + showImgPrev: function (event){ + var idx = event ? event.currentTarget.dataset.idx : ''; + let urls = this.data.soli_info.images_list || []; + wx.previewImage({ + current: urls[idx], + urls + }); + }, + + /** + * 商品弹窗 + */ + handleGoodsModal: function(){ + this.setData({ + showGoodsModal: !this.data.showGoodsModal + }) + }, + + /** + * 评论弹窗 + */ + handleCommentModal: function () { + this.setData({ + showCommentModal: !this.data.showCommentModal, + pid: 0 + }) + }, + + /** + * 留言 + */ + subComment: function (e) { + let { soli_info, pid } = this.data; + let soli_id = soli_info.id || ''; + let content = e.detail.value.content || ''; + if (content == '') { + wx.showToast({ + title: '请输入内容', + icon: 'none' + }) + return; + } + let that = this; + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.sub_solipost', + soli_id, + content, + pid, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { post_id, cur_time } = res.data; + let userInfo = wx.getStorageSync('userInfo'); + let list = that.data.list; + + if (pid!=0) { + let comment = { + id: post_id, + pid, + username: userInfo.nickName, + content + } + let idx = list.findIndex(item => item.id == pid); + if (idx !== -1) { + list[idx].reply.push(comment); + } + } else { + let comment = { + id: post_id, + soli_id, + pid, + username: userInfo.nickName, + avatar: userInfo.avatarUrl, + content, + fav_count: 0, + addtime: cur_time, + reply: [], + is_agree: false + } + list.unshift(comment); + } + + soli_info.comment_total = soli_info.comment_total * 1 + 1; + that.setData({ soli_info, list, content: '', showCommentModal: false, noData: 0 }) + app.util.message(res.data.msg || '留言成功', '', 'success'); + } else { + app.util.message(res.data.msg || '留言失败', '', 'error'); + } + } + }) + }, + + /** + * 回复留言 + */ + replyComment: function(e){ + let pid = e.currentTarget.dataset.id || ''; + this.setData({ + showCommentModal: !this.data.showCommentModal, + pid + }) + }, + + /** + * 删除留言 + */ + deleteComment: function(e){ + let that = this; + let id = e.currentTarget.dataset.id || ''; + let idx = e.currentTarget.dataset.idx || ''; + id && wx.showModal({ + title: '操作提示', + content: '确认删除此留言?', + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + wx.showLoading({ title: '删除中...' }) + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.delete_comment', + id, + token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { list, soli_info } = that.data; + list.splice(idx, 1); + let noData = false; + if (list.length==0) noData = true; + + soli_info.comment_total = soli_info.comment_total * 1 - 1; + that.setData({ list, soli_info, noData }); + wx.showToast({ + title: res.data.msg || '删除成功', + icon: 'none' + }) + } else if (res.data.code == 2) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg || '删除失败', '', 'error'); + } + } + }) + } + } + }); + }, + + /** + * 点赞 + */ + favComment: function (e) { + let that = this; + let soli_info = this.data.soli_info; + let soli_id = soli_info.id || ''; + let post_id = e ? e.currentTarget.dataset.post_id : ''; + let idx = e ? e.currentTarget.dataset.idx : 0; + const token = wx.getStorageSync('token'); + post_id && app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.fav_soli_post', + soli_id, + post_id, + token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + if (res.data.do == 1) { + // 点赞成功 + let list = that.data.list; + list[idx].is_agree = true; + list[idx].fav_count = list[idx].fav_count * 1 + 1; + that.setData({ list }) + } else { + // 取消成功 + let list = that.data.list; + list[idx].is_agree = false; + list[idx].fav_count = list[idx].fav_count * 1 - 1; + that.setData({ list }) + } + } else if (res.data.code == 1) { + that.setData({ needAuth: true, showAuthModal: true }) + } else { + wx.showToast({ + title: res.data.msg || '点赞失败', + icon: 'none' + }) + } + } + }) + }, + + /** + * 结束接龙 + */ + endSolitaire: function (e) { + let that = this; + let soli_info = that.data.soli_info; + let id = soli_info.id; + id && wx.showModal({ + title: '操作提示', + content: '确认终止此接龙吗?', + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + wx.showLoading({ title: '提交中...' }) + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.end_solitaire', + id, + token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + soli_info.end = 1; + that.setData({ soli_info }); + wx.showToast({ + title: res.data.msg || '接龙已终止', + icon: 'none' + }) + } else if (res.data.code == 2) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg || '操作失败', '', 'error'); + } + } + }) + } + } + }); + }, + + drawImg: function (head, soli_info) { + let images_list = soli_info.images_list; + let qrcode_image = soli_info.qrcode_image; + let content = soli_info.content.replace(/<[^>]+>|&[^>]+;/g, "").trim(); + content = content.replace(/<\/?.+?>/g, ""); + content = content.replace(/ /g, ""); + let option = []; + let h = 300 + if (images_list.length) { + option.push({ + "type": "image", + "url": images_list[0], + "css": + { + "width": "442px", + "height": "300px", + "top": "230px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "", + "shadow": "", + "mode": "scaleToFill" + } + }) + h = 0; + } + + this.setData({ + template: { + "width": "514px", + "height": (710 - h) + "px", + "background": "#fff", + "views": [ + { + "type": "image", + "url": head.avatar, + "css": + { + "width": "46px", + "height": "46px", + "top": "25px", + "left": "36px", + "rotate": "0", + "borderRadius": "3px", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "mode": "scaleToFill" + } + }, + { + "type": "text", + "text": head.head_name, + "css": + { + "color": "#000000", + "background": "", + "width": "385px", + "height": "20.02px", + "top": "30px", + "left": "96px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "14px", + "fontWeight": "bold", + "maxLines": "1", + "lineHeight": "20.202000000000005px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": head.community_name, + "css": + { + "color": "#999999", + "background": "", + "width": "385px", + "height": "17.16px", + "top": "52px", + "left": "96px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "12px", + "fontWeight": "normal", + "maxLines": "1", + "lineHeight": "17.316000000000003px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": content, + "css": + { + "color": "#666666", + "background": "", + "width": "442px", + "height": "52.181999999999995px", + "top": "158px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "18px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "25.974000000000004px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": soli_info.solitaire_name, + "css": + { + "color": "#000000", + "background": "", + "width": "442px", + "height": "42.89999999999999px", + "top": "95px", + "left": "36px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "30px", + "fontWeight": "normal", + "maxLines": "1", + "lineHeight": "43.290000000000006px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": "一群人正在赶来接龙", + "css": + { + "color": "#999999", + "background": "", + "width": "442px", + "height": "22.88px", + "top": (595 - h) + "px", + "left": "204px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "16px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "23.088000000000005px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "text", + "text": "长按识别或扫码参与", + "css": + { + "color": "#999999", + "background": "", + "width": "442px", + "height": "22.88px", + "top": (630 - h) + "px", + "left": "204px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "padding": "0px", + "fontSize": "16px", + "fontWeight": "normal", + "maxLines": "2", + "lineHeight": "23.088000000000005px", + "textStyle": "fill", + "textDecoration": "none", + "fontFamily": "", + "textAlign": "left" + } + }, + { + "type": "image", + "url": qrcode_image, + "css": + { + "width": "120px", + "height": "120px", + "top": (560 - h) + "px", + "left": "356px", + "rotate": "0", + "borderRadius": "", + "borderWidth": "", + "borderColor": "#000000", + "shadow": "", + "mode": "scaleToFill" + } + }, + ...option + ] + } + }); + }, + + onImgOK(e) { + this.imagePath = e.detail.path; + this.setData({ + image: this.imagePath + }) + }, + + saveImage() { + let that = this; + wx.saveImageToPhotosAlbum({ + filePath: this.imagePath, + success(res) { + that.setData({ showShareModal: false }) + wx.showToast({ + title: '保存成功!' + }) + }, + fail(res) { + wx.showToast({ + title: '保存失败,请重试!', + icon: 'none' + }) + } + }); + }, + + handleShareModal: function () { + this.setData({ + showShareModal: !this.data.showShareModal + }) + }, + + handleGoodsModal: function(e){ + if (this.data.showGoodsModal){ + this.setData({ + showGoodsModal: false, + goodsModalList: [] + }) + } else { + let idx = e ? e.currentTarget.dataset.idx : ''; + let orderList = this.data.orderList; + let goodsModalList = orderList[idx].goodslist || []; + this.setData({ + showGoodsModal: true, + goodsModalList + }) + } + }, + + /** + * 获取评论列表 + */ + getCommentList: function () { + let that = this; + let id = this.options && this.options.id || 0; + const token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_comment_list', + page: this.page, + token, + id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + if (that.page == 1) that.setData({ + noData: 1 + }) + that.setData({ + loadMore: false, + noMore: false, + loadText: "没有更多记录了~" + }) + } + } + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore||this.data.solitaire_is_message==0) return false; + this.getCommentList(); + }, + + /** + * 获取评论列表 + */ + getOrderList: function () { + let that = this; + let id = this.options && this.options.id || 0; + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_soli_order_list', + page: this.orderPage, + id, + size: 5 + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 5) h.noOrderMore = true; + let oldList = that.data.orderList; + let orderList = oldList.concat(list); + that.orderPage++; + that.setData({ + orderList, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + let h = {}; + if (that.orderPage == 1) h.noOrderData = 1; + that.setData({ + noOrderMore: true, + ...h + }) + } + } + }) + }, + + getMoreOrder: function(){ + this.data.noOrderMore || this.getOrderList(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let share_id = wx.getStorageSync('member_id') || ''; + let soli_info = this.data.soli_info || ''; + let title = soli_info.solitaire_name || ''; + let share_path = `eaterplanet_ecommerce/moduleA/solitaire/details?id=${soli_info.id}&share_id=${share_id}`; + return { + title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.json b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.json new file mode 100644 index 0000000..bd8d24f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "接龙详情", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-solitaire-good": "../components/solitaireGood", + "i-solitaire-head": "../components/solitaireHead", + "i-count-down": "../../components/count-down/index", + "i-painter": "../../components/painter/painter", + "i-modal": "../../components/modal/index", + "i-load-more": "../../components/load-more/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxml b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxml new file mode 100644 index 0000000..2ec49ad --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxml @@ -0,0 +1,175 @@ + + + + + {{soli_info.solitaire_name}} + + + + 接龙时间:{{soli_info.begin_time_str}}~{{soli_info.end_time_str}} + + + + + + 商品信息 + + + + + + + + 活动统计 + + + {{soli_info.invite_count|0}} + 浏览(人) + + + {{soli_info.order_count|0}} + 参与接龙(人) + + + {{soli_info.soli_total_money|0}} + 接龙金额(元) + + + + + 接龙记录 + + + + + {{item.username}} + {{item.addtime}} + + + + + + 共{{item.goodsnum}} + + + 查看更多订单信息 + + + + + 暂无订单记录~ + + + + + + + 预计接龙完成还差{{diffMember}}人,分享邀请尽快完成目标! + + 已完成目标人数 + + + + 还差{{diffMoney}}元订单金额完成接龙,分享邀请尽快完成目标 + + 已完成目标金额 + + + + 开始倒计时: + + + 接龙未开始 + + + + 接龙倒计时: + + + 已结束 + 终止活动 + + + 已结束 + + + + + + + + 已有{{soli_info.comment_total}}条留言,快来说说您的感想! + + 接龙留言 + + + + + + + {{item.username}} + {{item.addtime}} + + + {{item.fav_count}} + + + {{item.content}} + + 删除 + 回复 + + + {{community.head_name}}:{{item.reply[0].content}} + + + + + + + 暂无留言~ + + + + + + +
+ + 取消 + + + + + + + +
+
+
+ + + + + + + + + + + + + + +
+ + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxss b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxss new file mode 100644 index 0000000..f7b0010 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupDetails.wxss @@ -0,0 +1,169 @@ +.img-list .img-item { + width: 155rpx; + height: 155rpx; + margin-left: 24rpx; + margin-bottom: 24rpx; +} + +.img-list .img-item:nth-child(4n+1) { + margin-left: 0; +} + +.three { + display: flex; + justify-content: center; + align-items: center; + padding: 50rpx 0; +} + +.three-item { + position: relative; + flex: 1; + text-align: center; +} + +.three-item::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 1rpx; + border-left: 1rpx solid #cfcfcf; +} + +.three-item:first-child::before { + content: none; +} + +.three-title { + color: #999; + font-size: 24rpx; +} + +.three-money { + margin-bottom: 15rpx; + font-size: 34rpx; + font-weight: bold; +} + +.order .avatar { + width: 60rpx; + height: 60rpx; + border-radius: 50%; + margin-right: 20rpx; +} + +.order-goods { + margin: 30rpx 0 0; +} + +.order-goods-img { + width: 100rpx; + height: 100rpx; + margin-right: 18rpx; + border-radius: 50%; +} + +.more { + line-height: 100rpx; +} + +.order .item { + margin: 0 30rpx; + padding: 30rpx 0; +} + +.btn { + background: linear-gradient(270deg, #f9c706 0%, #feb600 100%); + border-radius: 10rpx; + padding: 20rpx 0; +} + +.end-btn { + display: inline-block; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + border-radius: 10rpx; + padding: 15rpx 0; + width: 40%; + margin: 0 auto; +} + +.comment { + border: 1rpx solid #e5e5e5; + line-height: 64rpx; + border-radius: 32rpx; +} + +.msg .avatar { + width: 80rpx; + height: 80rpx; +} + +.handled { + margin-left: 30rpx; +} + +.goods-modal { + width: 90%; + overflow: hidden; +} + +.goods-modal-body { + max-height: 80vh; +} + +.modal-close { + padding: 20rpx 0; +} + +.modal-close .iconfont { + color: #fff; + font-size: 60rpx; +} + +.textarea { + border: 1rpx solid #e5e5e5; + width: 100%; + box-sizing: border-box; + padding: 15rpx; + border-radius: 10rpx; +} + +.send { + padding: 8rpx 15rpx; + border-radius: 6rpx; + line-height: initial; + font-size: 24rpx; +} + +.send::after { + content: none; +} + +.shareModal-box { + background: transparent!important; + left: 115rpx!important; + right: 115rpx!important; + bottom: initial!important; + top: 50%; + transform: translateY(-50%)!important; + width: 520rpx!important; +} + +.shareModal { + width: 520rpx; +} + +.shareBtn { + line-height: 84rpx; +} + +.item-time { + color: #fff; + background-color: #333; + font-size: 20rpx; + padding: 2rpx 4rpx; + border-radius: 5rpx; + width: 28rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.js b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.js new file mode 100644 index 0000000..295beaf --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.js @@ -0,0 +1,132 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + keyword: "" + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 获取列表 + */ + getData: function () { + let that= this; + wx.showLoading(); + const token = wx.getStorageSync('token'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_head_solitairelist', + token: token, + page: this.page, + keyword: this.data.keyword + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else if (res.data.code == 1) { + // 无数据 + if (that.page == 1) that.setData({ noData: 1 }) + that.setData({ loadMore: false, noMore: false, loadText: "没有更多记录了~" }) + } else if (res.data.code == 2) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } + } + }) + }, + + goResult: function (e){ + let keyword = e.detail.value || '', that = this; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + keyword + }, ()=>{ + that.getData(); + }) + }, + + goDetails: function (e){ + var id = e ? e.currentTarget.dataset.id : ''; + if (!id) return; + let link = `/eaterplanet_ecommerce/moduleA/solitaire/groupDetails?id=${id}`; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.json b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.json new file mode 100644 index 0000000..417ac5c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "接龙中心", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-card": "../../components/card/index", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxml b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxml new file mode 100644 index 0000000..281cce6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + {{item.solitaire_name}} + + + 发布时间:{{item.begin_time}} + 接龙状态:{{item.state_str}} + + {{item.invite_count}}人看过 {{item.order_count}}人参加 + 接龙详情 + + 接龙详情 + + + + + + + 暂无接龙~ + + + + + + 发布接龙 + + diff --git a/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxss b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxss new file mode 100644 index 0000000..64b1553 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/groupIndex.wxss @@ -0,0 +1,95 @@ +/* 搜索 S */ +.search-bar { + position: fixed; + left: 0; + right: 0; + top: 0; + z-index: 100; + padding: 12rpx 25rpx; + background-color: #fff; + padding-bottom: 20rpx; +} + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} + +/* 搜索 E */ + +.list { + padding-top: 88rpx; +} + +.list .item { + width: 710rpx; + border-radius: 20rpx; + background: #fff; + box-shadow: 0 0 40rpx 0 rgba(0, 0, 0, 0.05); + display: flex; + flex-direction: column; + overflow: hidden; + margin: 20rpx 20rpx 0; +} + +.header { + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + border-bottom: 0.1rpx solid #efefef; +} + +.middle { + padding: 20rpx 30rpx; + font-size: 26rpx; +} + +.middle .btn { + color: #fff; + padding: 10rpx 15rpx; + border-radius: 6rpx; + font-size: 24rpx; +} + +.pub { + position: fixed; + right: 20rpx; + bottom: 20%; + width: 120rpx; + height: 120rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + border-radius: 50%; + box-shadow: 0 0 5px #ccc; + z-index: 100; + color: #fff; + font-size: 22rpx; +} + +.pub .iconfont { + font-size: 44rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/index.js b/eaterplanet_ecommerce/moduleA/solitaire/index.js new file mode 100644 index 0000000..1360789 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/index.js @@ -0,0 +1,337 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + groupInfo: { + group_name: '社区', + owner_name: '团长' + }, + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + app.setShareConfig(); + let that = this; + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { that.setData({ groupInfo }) }); + let { share_id, community_id } = options; + this.options = options; + if (share_id != 'undefined' && share_id > 0) wx.setStorageSync('share_id', share_id); + this.compareCommunity(community_id) + this.getData(community_id); + }, + + initFn(community_id) { + let that = this; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, ()=>{ + that.getData(community_id); + }) + }, + + /** + * 比较社区 + */ + compareCommunity: function (shareCommunityId) { + let that = this; + // 原来社区 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunityId = currentCommunity.communityId || ''; + const token = wx.getStorageSync('token'); + + shareCommunityId && util.getCommunityById(shareCommunityId).then(res => { + let { hide_community_change_btn, default_head_info } = res; + let { groupInfo } = that.data; + if (res.open_danhead_model == 1) { + // 开启单社区 + app.globalData.community = default_head_info; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: default_head_info }) + token && util.addhistory(default_head_info); + if(shareCommunityId!=default_head_info.communityId) { + let { groupInfo } = that.data; + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + return; + } + } else { + // 社区是否存在 + if (currentCommunityId != '' && shareCommunityId) { + // 存在并且不相同 + console.log('currentCommunityId存在 比较社区') + if (currentCommunityId != shareCommunityId) { + console.log('currentCommunityId存在 社区不同') + //如果禁止切换 + // if (hide_community_change_btn == 1) { + console.log('禁止切换'); + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + return; + // } + // that.setData({ + // hide_community_change_btn, + // showChangeCommunity: res.data ? true : false, + // changeCommunity: res.data, + // currentCommunity: currentCommunity + // }) + } + } else { + // 不存在社区id + //token 是否存在 + if (token) { + util.getCommunityInfo().then(function (ret) { + //比较社区 + console.log('token存在 比较社区') + if (ret.community_id && ret.community_id != shareCommunityId) { + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + // that.setData({ + // showChangeCommunity: true, + // currentCommunity: ret + // }) + } + }).catch((param) => { + console.log('step4 新人') + if (Object.keys(param) != '') util.addhistory(param, true); + }); + } else { + console.log('token不存在 存社区') + // 直接存本地 + app.globalData.community = res.data; + app.globalData.changedCommunity = true; + wx.setStorage({ key: "community", data: res.data }) + } + } + } + }); + }, + + /** + * 切换提示 + */ + confrimChangeCommunity: function () { + let community = this.data.changeCommunity; + let token = wx.getStorageSync('token'); + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + token && util.addhistory(community); + this.initFn(community.communityId); + this.setData({ showChangeCommunity: false }) + console.log('用户点击确定') + }, + + /** + * 取消切换 + */ + cancelChangeCommunity: function () { + let currentCommunity = this.data.currentCommunity; + let communityId = currentCommunity.communityId || ''; + communityId && this.initFn(communityId); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + (0, status.cartNum)('', true).then((res) => { + that.setData({ + cartNum: res.data + }) + }); + } + }) + }, + + /** + * 获取列表 + */ + getData: function (head_id) { + let that = this; + wx.showLoading(); + if (!head_id) { + let community = wx.getStorageSync('community'); + head_id = community.communityId || ''; + } + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_head_index_solitairelist', + head_id, + page: this.page + }, + dataType: 'json', + success: function(res) { + wx.stopPullDownRefresh(); + wx.hideLoading(); + let showTabbar = res.data.showTabbar; + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + let head_data = res.data.head_data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h, + head_data, + showTabbar + }) + } else if (res.data.code == 1) { + // 无数据 + let head_data = res.data.head_data || ''; + if (that.page == 1) that.setData({ + noData: 1 + }) + that.setData({ + loadMore: false, + noMore: false, + head_data, + loadText: "没有更多记录了~", + showTabbar + }) + } else if (res.data.code == 2) { + // 您还未登录 + } else if (res.data.code == 3) { + // 团长不存在 + app.util.message(res.data.msg, '/eaterplanet_ecommerce/pages/position/community', 'error'); + return; + } else { + app.util.message(res.data.msg, '', 'error'); + return; + } + } + }) + }, + + goDetails: function (event){ + var id = event ? event.currentTarget.dataset.id : ''; + if(!id) return; + var pages_all = getCurrentPages(); + let link = `/eaterplanet_ecommerce/moduleA/solitaire/details?id=${id}`; + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + showImgPrev: function (event) { + var idx = event ? event.currentTarget.dataset.idx : ''; + var sidx = event ? event.currentTarget.dataset.sidx : ''; + let list = this.data.list; + let urls = list[sidx].images_list; + wx.previewImage({ + current: urls[idx], + urls + }); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + let that = this; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, ()=>{ + that.getData(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + if (!this.data.loadMore) return false; + this.getData(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let community = wx.getStorageSync('community'); + let head_id = community.communityId || ''; + let share_id = wx.getStorageSync('member_id') || ''; + let share_path = `eaterplanet_ecommerce/moduleA/solitaire/index?share_id=${share_id}&community_id=${head_id}`; + let title = ''; + return { + title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + let community = wx.getStorageSync('community'); + let head_id = community.communityId || ''; + let share_id = wx.getStorageSync('member_id') || ''; + let title = ''; + + var query= `share_id=${share_id}&community_id=${head_id}`; + return { + title, + query, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/index.json b/eaterplanet_ecommerce/moduleA/solitaire/index.json new file mode 100644 index 0000000..7c8c3f7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/index.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "群接龙", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-solitaire-head": "../components/solitaireHead", + "i-change-community": "../../components/changeCommunity/index", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/index.wxml b/eaterplanet_ecommerce/moduleA/solitaire/index.wxml new file mode 100644 index 0000000..df407ca --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/index.wxml @@ -0,0 +1,34 @@ + + + + + + + {{solitaire.solitaire_name}} + {{solitaire.state_str}} + + 接龙时间:{{solitaire.begin_time}}~{{solitaire.end_time}} + + + + + + + + + + + {{solitaire.invite_count}}次浏览,{{solitaire.order_count}}次接龙 + + + + + + 暂无接龙~ + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/index.wxss b/eaterplanet_ecommerce/moduleA/solitaire/index.wxss new file mode 100644 index 0000000..cecac1b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/index.wxss @@ -0,0 +1,40 @@ +.img-list .img-item { + width: 155rpx; + height: 155rpx; + margin-left: 24rpx; + margin-bottom: 24rpx; +} + +.img-list .img-item:nth-child(4n+1) { + margin-left: 0; +} + +.shareModal-box { + background: transparent!important; + left: 115rpx!important; + right: 115rpx!important; + bottom: initial!important; + top: 50%; + transform: translateY(-50%)!important; + width: 520rpx!important; +} + +.shareModal { + width: 520rpx; +} + +.shareBtn { + line-height: 84rpx; +} + +.member-list .avatar { + width: 50rpx; + height: 50rpx; + border-radius: 50%; + border: 1px solid #fff; + margin-left: -15rpx; +} + +.member-list .avatar:first-child { + margin-left: 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/me.js b/eaterplanet_ecommerce/moduleA/solitaire/me.js new file mode 100644 index 0000000..4a08133 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/me.js @@ -0,0 +1,156 @@ +var app = getApp(); + +Page({ + mixins: [require('../../mixin/globalMixin.js')], + data: { + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + needAuth: false + }, ()=>{ + that.getData(this.specialId); + }) + }, + + /** + * 获取列表 + */ + getData: function () { + let that = this; + const token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let head_id = community && community.communityId || ''; + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_member_solitairelist', + token, + page: this.page, + head_id + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 20) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else if (res.data.code == 1) { + // 无数据 + if (that.page == 1) that.setData({ + noData: 1 + }) + that.setData({ + loadMore: false, + noMore: false, + loadText: "没有更多记录了~" + }) + } else if (res.data.code == 2) { + // 您还未登录 + that.setData({ needAuth: true, showAuthModal: true }) + } else { + app.util.message(res.data.msg, '', 'error'); + return; + } + } + }) + }, + + goDetails: function (event) { + var id = event ? event.currentTarget.dataset.id : ''; + if (!id) return; + var pages_all = getCurrentPages(); + let link = `/eaterplanet_ecommerce/moduleA/solitaire/details?id=${id}`; + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + showImgPrev: function (event) { + var idx = event ? event.currentTarget.dataset.idx : ''; + var sidx = event ? event.currentTarget.dataset.sidx : ''; + let list = this.data.list; + let urls = list[sidx].images_list; + wx.previewImage({ + current: urls[idx], + urls + }); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + let that = this; + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, () => { + that.getData(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/me.json b/eaterplanet_ecommerce/moduleA/solitaire/me.json new file mode 100644 index 0000000..019ebed --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/me.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "我的接龙", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/me.wxml b/eaterplanet_ecommerce/moduleA/solitaire/me.wxml new file mode 100644 index 0000000..18f9a57 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/me.wxml @@ -0,0 +1,25 @@ + + + + + + {{solitaire.solitaire_name}} + {{solitaire.state_str}} + + + + + 接龙时间:{{solitaire.begin_time}}~{{solitaire.end_time}} + + + + 暂无接龙~ + + + + + + 去接龙 + + + diff --git a/eaterplanet_ecommerce/moduleA/solitaire/me.wxss b/eaterplanet_ecommerce/moduleA/solitaire/me.wxss new file mode 100644 index 0000000..5af9067 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/me.wxss @@ -0,0 +1,28 @@ +.img-list .img-item { + width: 155rpx; + height: 155rpx; + margin-left: 24rpx; + margin-bottom: 24rpx; +} + +.img-list .img-item:nth-child(4n+1) { + margin-left: 0; +} + +.pub { + position: fixed; + right: 20rpx; + bottom: 20%; + width: 120rpx; + height: 120rpx; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + border-radius: 50%; + box-shadow: 0 0 5px #ccc; + z-index: 100; + color: #fff; + font-size: 22rpx; +} + +.pub .iconfont { + font-size: 44rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/order.js b/eaterplanet_ecommerce/moduleA/solitaire/order.js new file mode 100644 index 0000000..76a4062 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/order.js @@ -0,0 +1,82 @@ +// eaterplanet_ecommerce/moduleA/solitaire/order.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/order.json b/eaterplanet_ecommerce/moduleA/solitaire/order.json new file mode 100644 index 0000000..33c9534 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/order.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "我的接龙", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/order.wxml b/eaterplanet_ecommerce/moduleA/solitaire/order.wxml new file mode 100644 index 0000000..e91c4d9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/order.wxml @@ -0,0 +1,2 @@ + +eaterplanet_ecommerce/moduleA/solitaire/order.wxml diff --git a/eaterplanet_ecommerce/moduleA/solitaire/order.wxss b/eaterplanet_ecommerce/moduleA/solitaire/order.wxss new file mode 100644 index 0000000..93a0c1d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/order.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/solitaire/order.wxss */ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/pub.js b/eaterplanet_ecommerce/moduleA/solitaire/pub.js new file mode 100644 index 0000000..225d3de --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/pub.js @@ -0,0 +1,188 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var chooseFlag = true; +var myDate = new Date(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + begin_time: '', + end_time: '', + noteMaxLen: 500, + imgGroup: [], + goods: [], // 选择商品 + type: 0, // 0社区商品 1仅快递 + title: '', + content: '' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + titleInput: function(e){ + var title = e.detail.value; + this.setData({ title }) + }, + + /** + * 开始时间 + */ + beginTimePicker: function(e){ + this.setData({ begin_time: e.detail }) + }, + + /** + * 开始时间 + */ + endTimePicker: function (e) { + this.setData({ end_time: e.detail }) + }, + + contentInput: function(e){ + var value = e.detail.value, len = parseInt(value.length); + if (len > this.data.noteMaxLen) return; + this.setData({ + currentNoteLen: len, //当前字数 + limitNoteLen: this.data.noteMaxLen - len, //剩余字数 + content: value + }); + }, + + chooseImage: function () { + chooseFlag = false; + }, + + changeImg: function (e) { + chooseFlag = e.detail.len === e.detail.value.length; + this.setData({ + imgGroup: e.detail.value + }); + }, + + deleteGoods: function(e){ + let idx = e.detail; + console.log(idx); + let goods = this.data.goods; + if(idx!=-1) { + goods.splice(idx, 1); + this.setData({ goods }) + } + }, + + /** + * 获取团长信息 + */ + getData: function () { + const token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.get_solitaire_headinfo', + token: token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + that.setData({ community: res.data.data || '' }) + } else if (res.data.code == 1) { + app.util.message('您还未登录', 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + return; + } + } + }) + }, + + /** + * 提交 + */ + subForm: function(){ + let { title, content, begin_time, end_time, imgGroup, goods } = this.data; + let that = this; + if(title=='') { + wx.showToast({ + title: '请输入标题', + icon: 'none' + }) + return; + } + if (content == '') { + wx.showToast({ + title: '请输入内容', + icon: 'none' + }) + return; + } + if (imgGroup.length <= 0) { + wx.showToast({ + title: '请上传接龙图片', + icon: 'none' + }) + return; + } + if (goods.length <= 0) { + wx.showToast({ + title: '请选择商品', + icon: 'none' + }) + return; + } + + let ids = []; + goods.forEach(item=>{ + ids.push(item.gid); + }) + let goods_list = ids.join(','); + const token = wx.getStorageSync('token'); + let data = { title, content, begin_time, end_time, images_list: imgGroup.join(','), goods_list, token }; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'solitaire.sub_head_solitaire', + ...data + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + app.util.message('提交成功', 'redirect:/eaterplanet_ecommerce/moduleA/solitaire/groupIndex', 'success'); + } else { + app.util.message(res.data.msg || '提交失败', '', 'error'); + return; + } + } + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/pub.json b/eaterplanet_ecommerce/moduleA/solitaire/pub.json new file mode 100644 index 0000000..0ddd961 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/pub.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "发布群接龙", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "DateTimePicker": "../../components/datetimepicker/datetimepicker", + "chooseImage": "../../components/chooseImage/index", + "i-solitaire-good": "../components/solitaireGood", + "i-solitaire-head": "../components/solitaireHead" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/pub.wxml b/eaterplanet_ecommerce/moduleA/solitaire/pub.wxml new file mode 100644 index 0000000..9e6e68c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/pub.wxml @@ -0,0 +1,50 @@ + + + + + + 标题: + + + + + + {{currentNoteLen|0}}/{{noteMaxLen}} + + + + 上传接龙图片(最多10张) + + + + + 商品项目 + + + + + + + 添加商品 + + + + 活动设置 + + 开始时间: + + + + + + 结束时间: + + + + + + + + 发布接龙 + + diff --git a/eaterplanet_ecommerce/moduleA/solitaire/pub.wxss b/eaterplanet_ecommerce/moduleA/solitaire/pub.wxss new file mode 100644 index 0000000..b719e38 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/pub.wxss @@ -0,0 +1,179 @@ +.cell { + position: relative; + display: flex; + justify-content: space-between; + background-color: #fff; + padding: 30rpx; +} + +.cell::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + right: 0; + border-bottom: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleY(0.5); +} + +.cell-hd, +.tit { + color: #000; +} + +.cell-bd { + flex: 1; +} + +.cell-col { + position: relative; + background-color: #fff; + padding: 20rpx 30rpx; +} + +.cell-col .tit { + margin-bottom: 20rpx; +} + +.cell-col::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + right: 0; + border-bottom: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleY(0.5); +} + +.image_uploader_selector { + width: 56px; + height: 56px; + border: 1px dashed #ccc; + display: inline-block; +} + +.image_uploader_indicate { + position: absolute; + font-size: 32px; + color: #ccc; + width: 56px; + height: 56px; + line-height: 52px; + text-align: center; +} + +.cell-ipt { + text-align: right; +} + +.cell-textarea { + width: 100%; + padding-bottom: 40rpx; +} + +.wordLimit { + position: absolute; + right: 30rpx; + bottom: 20rpx; +} + +.image_uploader_image { + position: relative; + display: inline-block; + width: 56px; + height: 56px; + border: 1px dashed #e6e6e6; + padding: 1px; + box-sizing: border-box; + margin-right: 12px; +} + +.image_uploader_image image { + width: 52px; + height: auto; + max-width: 52px; + max-height: 52px; + overflow: hidden; + margin: auto; + position: absolute; + top: 0; + left: 0; + bottom: 0; + right: 0; +} + +.image_uploader_image .image_uploader_image_img_portrait { + width: auto !important; + height: 52px !important; +} + +.image_uploader_image .image_uploader_image_delete { + border-radius: 50%; + -webkit-border-radius: 50%; + position: absolute; + right: -8px; + top: -8px; + background-color: #ff2742; + line-height: 20px; + height: 20px; + width: 20px; + text-align: center; + color: #fff; + font-size: 14px; + font-weight: bold; +} + +.submit_button { + height: 70rpx; + line-height: 70rpx; + top: 10px; + position: relative; + border-top: 1px solid #eee; + text-align: center; + margin: 15px 30rpx 30px; +} + +.submit_button .span { + padding: 5px 20px; + font-size: 15px; + color: #fff; + background-color: #F75451; + position: relative; + text-align: center; + border-radius: 5px; +} + +.addBtn { + display: inline-block; + color: #fff; + padding: 4px 15rpx; + border-radius: 8rpx; + background: #F75451; + margin-top: 20rpx; +} + +.video-wrap { + padding: 0 0 10rpx; +} + +.video-wrap .item { + position: relative; + padding: 30rpx 0; +} + +.video-wrap .item::after { + content: ""; + position: absolute; + left: 0; + bottom: 0; + right: 0; + border-bottom: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleY(0.5); +} + +.video-wrap .item:last-child::after { + content: none; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/share.js b/eaterplanet_ecommerce/moduleA/solitaire/share.js new file mode 100644 index 0000000..1c8ef76 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/share.js @@ -0,0 +1,82 @@ +// eaterplanet_ecommerce/moduleA/solitaire/share.js 用户打开群接龙主页面 +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/share.json b/eaterplanet_ecommerce/moduleA/solitaire/share.json new file mode 100644 index 0000000..8e59d78 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/share.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "接龙详情", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/share.wxml b/eaterplanet_ecommerce/moduleA/solitaire/share.wxml new file mode 100644 index 0000000..c074925 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/share.wxml @@ -0,0 +1,2 @@ + +eaterplanet_ecommerce/moduleA/solitaire/share.wxml diff --git a/eaterplanet_ecommerce/moduleA/solitaire/share.wxss b/eaterplanet_ecommerce/moduleA/solitaire/share.wxss new file mode 100644 index 0000000..a4de85e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/share.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/solitaire/share.wxss */ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.js b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.js new file mode 100644 index 0000000..7681137 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.js @@ -0,0 +1,82 @@ +// eaterplanet_ecommerce/moduleA/solitaire/shareDetails.js 用户打开群接龙详情 +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.json b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.json new file mode 100644 index 0000000..8e59d78 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "接龙详情", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxml b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxml new file mode 100644 index 0000000..ce745b6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxml @@ -0,0 +1,2 @@ + +eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxml diff --git a/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxss b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxss new file mode 100644 index 0000000..5364382 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/solitaire/shareDetails.wxss */ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/special/index.js b/eaterplanet_ecommerce/moduleA/special/index.js new file mode 100644 index 0000000..b24c63e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/index.js @@ -0,0 +1,167 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/cartMixin.js')], + /** + * 页面的初始数据 + */ + data: { + list: [], + info: {}, + cartNum: 0, + needAuth: false + }, + specialId: 0, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + status.setNavBgColor(); + let id = options.id || 0; + this.specialId = id; + if (options.share_id != 'undefined' && options.share_id > 0) wx.setStorageSync('share_id', options.share_id); + this.getData(id); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + this.getData(this.specialId); + this.setData({ + needAuth: false + }) + }, + + getData: function (id) { + wx.showLoading(); + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'marketing.get_special', + token, + head_id: cur_community.communityId, + id + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.list; + let info = res.data.data; + let ishowShareBtn = res.data.ishow_special_share_btn || 0; + wx.setNavigationBarTitle({ + title: info.special_title || '专题' + }) + + let { full_money, full_reducemoney, is_open_fullreduction, is_open_vipcard_buy, is_vip_card_member, is_member_level_buy } = res.data; + let reduction = { full_money, full_reducemoney, is_open_fullreduction } + + let noData = (list.length==0)? true : false; + that.setData({ list, info, ishowShareBtn, noData, reduction }) + } else if (res.data.code == 1) { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(ret){ + if (ret.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + } else if(res.data.code == 2) { + // 未登录 + that.setData({ needAuth: true }); + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + this.setData({ needAuth: false }); + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ cartNum: res.data }) + }); + } else { + let id = this.specialId; + this.setData({ needAuth: true, navBackUrl: `/eaterplanet_ecommerce/pages/supply/index?id=${id}` }); + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.getData(this.specialId); + }, + + onShareAppMessage: function (res) { + var share_title = this.data.info.special_title || '活动专题'; + var share_id = wx.getStorageSync('member_id'); + var id = this.specialId; + var share_path = `eaterplanet_ecommerce/moduleA/special/index?id=${id}&share_id=${share_id}`; + + return { + title: share_title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function (res) { + var share_title = this.data.info.special_title || '活动专题'; + var share_id = wx.getStorageSync('member_id'); + var id = this.specialId; + + var query= `id=${id}&share_id=${share_id}`; + return { + title: share_title, + query, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/special/index.json b/eaterplanet_ecommerce/moduleA/special/index.json new file mode 100644 index 0000000..48c2279 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/index.json @@ -0,0 +1,15 @@ +{ + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-img": "../../components/img/index", + "i-button": "../../components/button/index", + "i-router-link": "../../components/router-link/router-link", + "sku": "../../components/sku/index", + "i-cart-btn": "../../components/cartBtn/index", + "i-input-number": "../../components/input-number/index", + "i-aside-btn": "../../components/asideBtn/index", + "i-addcart": "../../components/addCartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/special/index.wxml b/eaterplanet_ecommerce/moduleA/special/index.wxml new file mode 100644 index 0000000..ed64e8a --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/index.wxml @@ -0,0 +1,137 @@ + + + + + + + 暂时没有商品 + 我们正在为您准备更优惠的商品 + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/special/index.wxss b/eaterplanet_ecommerce/moduleA/special/index.wxss new file mode 100644 index 0000000..b001db8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/index.wxss @@ -0,0 +1,743 @@ +.special { + min-height: 100vh; +} + +.topic-img { + width: 100%; +} + +.like { + padding-bottom: 100rpx; +} + +.like-list { + position: relative; + padding: 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; + z-index: 0; +} + +.new-comers-item { + background-color: #fff; + width: 345rpx; + box-sizing: border-box; + padding: 30rpx; + border-radius: 10px; + font-size: 28rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .new-img { + width: 285rpx; + height: 285rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot { + display: flex; + align-items: center; + justify-content: space-between; + margin-top: 10rpx; +} + +.new-comers-item .new-bot .market-price { + text-decoration: line-through; + color: #999; + font-size: 20rpx; +} + +.new-comers-item .add-cart { + height: 48rpx; + line-height: 48rpx; + padding: 0 20rpx; + color: #fff; + border-radius: 22rpx; + margin: 0; + background: linear-gradient(270deg, #ff5041 0%, #ff695c 100%); + font-size: 24rpx; +} + +.new-comers-item .add-cart.disabled { + background: #ccc; +} + +.new-comers-item .price { + font-size: 30rpx; + color: #ff5041; + font-weight: bold; +} + +.new-comers-item { + position: relative; +} + +.new-comers-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 120rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.none-rush-list { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 140rpx; + padding-top: 140rpx; +} + +.none-rush-list .img-block { + width: 240rpx; + height: 240rpx; + margin-bottom: 30rpx; +} + +.none-rush-list .h1 { + font-size: 32rpx; + line-height: 32rpx; + color: #444; + margin-bottom: 20rpx; +} + +.none-rush-list .h2 { + font-size: 24rpx; + line-height: 24rpx; + color: #aaa; +} + +.item { + position: relative; + z-index: 999; +} + +/* 数量加减 */ + +.like-list .index-input-number { + position: absolute; + right: 20rpx; + bottom: 0; + display: flex; + justify-content: center; + align-items: center; +} + +.like-list .index-input-number .i-input-number-view { + width: 80rpx; + height: 80rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.like-list .index-input-number .i-input-number-view .img { + width: 40rpx; + height: 40rpx; +} + +.like-list .index-input-number .i-input-number-minus { + justify-content: flex-end; +} + +.like-list .index-input-number .i-input-number-plus { + justify-content: flex-start; +} + +.like-list .index-input-number .input-number-text { + height: 88rpx; + line-height: 88rpx; + font-size: 24rpx; + color: #333; + width: 58rpx; +} + +/* 大图 */ + +.i-btn { + text-align: center; + vertical-align: middle; + touch-action: manipulation; + cursor: pointer; + background-image: none; + white-space: nowrap; + user-select: none; + font-size: 28rpx; + border: 0 !important; + position: relative; + text-decoration: none; + height: 88rpx; + line-height: 88rpx; + background: none; + color: #495060; + border-radius: 0; + margin: 0; + box-shadow: none; +} + +.i-btn::after { + border: none; +} + +.spu { + width: 100%; + display: block; + margin-top: 20rpx; +} + +.spu .img-class { + width: 710rpx; + height: 400rpx; + border-radius: 10rpx 10rpx 0 0; + image-rendering: crisp-edges; +} + +.spu .mask { + background: rgba(255, 255, 255, 0.5); + width: 710rpx; + height: 400rpx; + position: absolute; + left: 0; + top: 0; +} + +.spu .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 170rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.spu .spu-content { + background: #fff; + width: 710rpx; + border-radius: 20rpx; + overflow: hidden; + position: relative; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + margin: 0 auto 20rpx; + display: flex; + flex-direction: column; + box-sizing: border-box; +} + +.spu .spu-content.disabled { + opacity: 0.6; +} + +.spu .spu-content .item-top { + width: 100%; + height: 400rpx; + position: relative; +} + +.spu .spu-content .item-bottom { + box-sizing: border-box; + padding: 20rpx; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.spu .spu-content .item-bottom .spu-title { + color: #222; + font-size: 30rpx; + height: 32rpx; + width: 100%; + margin-bottom: 12rpx; + margin-top: 10rpx; + font-weight: 500; + position: relative; +} + +.spu .spu-content .item-bottom .spu-title .span { + width: 100%; + height: 40rpx; + position: absolute; + left: 0; + top: -4rpx; + line-height: 40rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .item-bottom .spu-tag { + padding-left: 196rpx; + margin-bottom: 20rpx; + display: flex; + height: 28rpx; +} + +.spu .spu-content .item-bottom .spu-desc { + font-size: 26rpx; + line-height: 26rpx; + color: #999; + position: relative; + width: 100%; + height: 26rpx; + margin-bottom: 12rpx; +} + +.spu .spu-content .item-bottom .spu-desc em { + width: 100%; + height: 32rpx; + position: absolute; + left: 0; + top: -2rpx; + line-height: 32rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .spu-content .item-bottom .spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-bottom: 10rpx; + margin-top: 10rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price { + color: #ff5344; + margin-right: 12rpx; +} + +.spu .spu-content .item-bottom .spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu .spu-content .item-bottom .spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-right: 20rpx; +} + +.spu .spu-content .item-bottom .spu-count { + font-size: 24rpx; + line-height: 24rpx; + color: #999; +} + +.spu .spu-content .add-cart, .spu .spu-content .add-cart-disabled { + width: 160rpx; + height: 60rpx; + padding: 0; + margin: 0; + position: absolute; + right: 28rpx; + bottom: 20rpx; + display: flex; + align-items: center; + justify-content: center; + background: #ff5344; + color: #fff; + border-radius: 30rpx; +} + +.spu .spu-content .add-cart-disabled { + background: #ccc; +} + +.spu .spu-content .add-cart.disabled { + background: #ccc; +} + +.spu .item-top .spu-active { + position: absolute; + left: 0; + bottom: 0; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.spu .item-top .spu-active .tag { + background: linear-gradient(to right, #ff5041, #ff994b); + border-radius: 0 25rpx 25rpx 0; + padding: 0 15rpx; + height: 50rpx; + font-size: 26rpx; + line-height: 50rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 220rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu .item-top .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +.spu .spu-content .time-tip { + position: absolute; + background: #ff5344; + left: 0; + bottom: 0; + width: 250rpx; + height: 40rpx; + border-radius: 0 8rpx 0 0; +} + +.spu .spu-content .time-tip.notip { + display: none; +} + +/* 标签 */ + +.spu .item-tag { + position: absolute; + left: 22rpx; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.spu .index-input-number { + position: absolute; + right: 0; + bottom: 10rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view { + width: 80rpx; + height: 80rpx; + display: flex; + justify-content: center; + align-items: center; +} + +.spu .index-input-number .i-input-number-view .img { + width: 40rpx; + height: 40rpx; +} + +.spu .index-input-number .i-input-number-minus { + justify-content: flex-end; +} + +.spu .index-input-number .i-input-number-plus { + justify-content: flex-start; +} + +.spu .index-input-number .input-number-text { + height: 88rpx; + line-height: 88rpx; + font-size: 24rpx; + color: #333; + width: 58rpx; +} + +.fixed-share { + display: inline-block; + bottom: 320rpx; + left: 30rpx; + width: 80rpx; + height: 80rpx; + position: fixed; + background: rgba(0, 0, 0, 0.5); + border-radius: 50%; + text-align: center; + color: #fff; + box-sizing: border-box; + font-size: 20rpx; + padding: 10rpx; + line-height: 1.2; + z-index: 100; +} + +.fixed-share image { + width: 50%; + height: 50%; +} + +/* 标签 */ +.new-comers-item .item-tag { + position: absolute; + left: 30rpx; + top: 30rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.new-comers-item .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.new-comers-item .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + + +/* 小图满减 */ +.like-list .spu-active { + position: absolute; + left: 30rpx; + top: 280rpx; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.like-list .spu-active .tag { + background: linear-gradient(to right, #ff5041, #ff994b); + border-radius: 0 14rpx 14rpx 0; + padding: 0 12rpx; + height: 30rpx; + font-size: 22rpx; + line-height: 30rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.like-list .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +.col-3 { + display: flex; + flex-wrap: wrap; + padding: 20rpx 0; + border-radius: 10rpx; + overflow: hidden; + background-color: #fff; + border-radius: 0; + overflow-x: hidden; + max-width: 100%; +} + +.col-3 .w250 { + width: 236rpx; + overflow: hidden; + position: relative; + padding: 0 3rpx; + box-sizing: border-box; + margin: 0 7rpx 20rpx; +} + +.w250 .new-img { + width: 236rpx; + height: 236rpx; + margin-bottom: 20rpx; + overflow: hidden; +} + +.w250 .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.w250 .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.w250 .add-cart { + width: 44rpx; + height: 44rpx; + padding: 0; + margin: 0; +} + +.w250 .price { + color: #ff5041; +} + +.w250 .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +.col-3 .w250 .vip { + position: absolute; + left: 10rpx; + top: 20rpx; +} + +.col-3 .w250 .item-tag { + position: absolute; + right: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.col-3 .w250 .item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.col-3 .w250 .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.col-3 .w250 .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.col-3 .w250 .spu-active { + position: absolute; + left: 0; + top: 200rpx; + z-index: 9; + display: flex; + flex-direction: column-reverse; + align-items: flex-start; +} + +.col-3 .w250 .spu-active .tag { + background: linear-gradient(to right, #ff5041, #ff994b); + border-radius: 0 14rpx 14rpx 0; + padding: 0 12rpx; + height: 30rpx; + font-size: 22rpx; + line-height: 30rpx; + color: #fff; + display: inline-block; + align-items: center; + justify-content: center; + width: auto; + max-width: 180rpx; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.col-3 .w250 .spu-active .tag-green { + background: linear-gradient(to left, #46c8d0, #29ba9a); +} + +.col-3 .w250 .spu-play { + position: absolute; + left: 50%; + top: 20%; + width: 100rpx; + height: 100rpx; + margin-left: -50rpx; +} + +.col-3 .w250 .spu-play .img { + width: 100%; + height: 100%; +} + +.col-3 .w250 .addbtn { + width: 44rpx; + height: 44rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/special/list.js b/eaterplanet_ecommerce/moduleA/special/list.js new file mode 100644 index 0000000..117e151 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/list.js @@ -0,0 +1,233 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/cartMixin.js')], + /** + * 页面的初始数据 + */ + data: { + list: [], + specialList: [], + navBackUrl: '/eaterplanet_ecommerce/moduleA/special/list' + }, + page: 1, + noMore: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + if (options.share_id != 'undefined' && options.share_id > 0) wx.setStorageSync('share_id', options.share_id); + this.getData(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + this.page = 1; + this.setData({ + needAuth: false, + noMore: false, + list: [], + specialList: [] + }, () => { + that.getData(); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (res) { + this.setData({ needAuth: false }); + } else { + this.setData({ needAuth: true }); + } + }) + }, + + getData: function () { + wx.showLoading(); + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'marketing.get_special_page_list', + token: token, + head_id: cur_community.communityId, + page: this.page + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + wx.hideLoading(); + if (res.data.code == 0) { + let specialList = res.data.data; + let oldList = that.data.specialList; + specialList = oldList.concat(specialList); + that.page++; + that.setData({ specialList }) + } else if(res.data.code == 1) { + that.noMore = true; + } else if (res.data.code == 2) { + that.setData({ needAuth: true }) + } + } + }) + }, + + goSpecial: function (e) { + let id = e.currentTarget.dataset.id; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/moduleA/special/index?id=${id}`, + }) + }, + + openSku: function (e) { + if (!this.authModal()) return; + let shopidx = e.currentTarget.dataset.idx; + let specialList = this.data.specialList; + let rushList = specialList[shopidx].list || []; + this.setData({ list: rushList }) + + var that = this; + let idx = e.currentTarget.dataset.gidx; + let spuItem = rushList[idx]; + + var goods_id = spuItem.actId; + var options = spuItem.skuList; + that.setData({ + addCar_goodsid: goods_id + }) + + let list = options.list || []; + let arr = []; + if (list.length > 0) { + for (let i = 0; i < list.length; i++) { + let sku = list[i]['option_value'][0]; + let temp = { + name: sku['name'], + id: sku['option_value_id'], + index: i, + idx: 0 + }; + arr.push(temp); + } + //把单价剔除出来begin + + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + var cur_sku_arr = options.sku_mu_list[id]; + that.setData({ + sku: arr, + sku_val: 1, + cur_sku_arr: cur_sku_arr, + skuList: spuItem.skuList, + visible: true, + showSku: true + }); + } else { + let goodsInfo = spuItem; + that.setData({ + sku: [], + sku_val: 1, + skuList: [], + cur_sku_arr: goodsInfo + }) + let formIds = { + detail: { + formId: "" + } + }; + formIds.detail.formId = "the formId is a mock one"; + that.gocarfrom(formIds); + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.noMore = false; + this.page = 1; + let that = this; + that.setData({ list: [], specialList: [] },()=>{ + that.getData(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.noMore || this.getData(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var share_title = '活动专题列表'; + var share_id = wx.getStorageSync('member_id'); + var share_path = `eaterplanet_ecommerce/moduleA/special/list?share_id=${share_id}`; + + return { + title: share_title, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + var share_title = '活动专题列表'; + var share_id = wx.getStorageSync('member_id'); + + var query= `share_id=${share_id}`; + return { + title: share_title, + query, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleA/special/list.json b/eaterplanet_ecommerce/moduleA/special/list.json new file mode 100644 index 0000000..6f2be8f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/list.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "专题列表", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-sku": "../../components/sku/index", + "i-img": "../../components/img/index", + "i-button": "../../components/button/index", + "i-router-link": "../../components/router-link/router-link", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/special/list.wxml b/eaterplanet_ecommerce/moduleA/special/list.wxml new file mode 100644 index 0000000..9254338 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/list.wxml @@ -0,0 +1,34 @@ + + + + + + + + + + + 已抢光 + {{item.spuName}} + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + + + + + + + + + + + + + + 暂无内容~ + + + + + + diff --git a/eaterplanet_ecommerce/moduleA/special/list.wxss b/eaterplanet_ecommerce/moduleA/special/list.wxss new file mode 100644 index 0000000..16996ee --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/special/list.wxss @@ -0,0 +1,90 @@ +page { + background-color: #f8f8f8; +} + +.topic { + padding-bottom: 30rpx; + margin-bottom: 20rpx; + background-color: #fff; +} + +.topic-img { + width: 100%; +} + +.new-comers { + position: relative; +} + +.new-comers-scroll { + max-height: 340rpx; +} + +.new-comers-wrap { + position: relative; + display: flex; + flex-direction: row; + flex-wrap: nowrap; +} + +.new-comers-item { + width: 240rpx; + box-sizing: border-box; + padding: 20rpx; + font-size: 28rpx; +} + +.new-comers-item .new-img { + width: 200rpx; + height: 180rpx; + margin-bottom: 20rpx; +} + +.new-comers-item .title { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.new-comers-item .new-bot { + display: flex; + justify-content: space-between; + align-items: center; + margin-top: 10rpx; +} + +.new-comers-item .add-cart { + width: 44rpx; + height: 44rpx; + padding: 0; + margin: 0; +} + +.new-comers-item .add-cart .img { + width: 44rpx; + height: 44rpx; + display: block; +} + +.new-comers-item .price { + color: #ff758c; +} + +.new-comers-item { + position: relative; +} + +.new-comers-item .act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 80rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/static/1.png b/eaterplanet_ecommerce/moduleA/static/1.png new file mode 100644 index 0000000000000000000000000000000000000000..064daa0f93298d756b303221d7ec5dde0e39ea7e GIT binary patch literal 1636 zcmX9;2~d;Q7EVpyC@#Y*LIr$?FO9Mp>jr~F`T$AFB4J;o2!SN*AYqe&wJMH?#t?QM zh=>&{1cHEw6)6-3F=A=i!xE9l60-0|HZlKpUu?g*=brnW`DX6<=H5BEUW{*dZ8zRd zAP{!Bx;Xo2v)!lIM%3_!WMI{Gk!EJ#Z(+v!Pc%M5wOcc0SHCp97M^|RuDA{ zlSg1{?Emo5PZ}i~D8pen3;FAeDE^kQ5Qv4XGl3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B`mPhbN#A13gnQMGuWlRQd5@(@FjIHbq!b$MWPrrIzBF#?wt4IC{& zlSb24ayc_39iB;LRqXg~s3a2(LXI$@KE=3hc?5T&V@F9^QjY+_wR_jD-L08STEp?J zqAWXZWQU!ti!!hDG;4k+sN6N3=0L98u9~t zrm{3O-s32uSKK;+{;CHM(AQAaq)5$unc?VOpJb!P6govv98=sY6rPIKVEAP{qLX4e z4XNOw6{aX{)S$m=hM_ZcH;AY`t8E>{Q$b=`c?J_~Fp{P!$->xY#vSgBDZMP^>k2`? zb~rhshE8)xlQvwB;%J}~mWbtT5)NL;GL|#LI_;k(9vdt`m|e!H!d9%gmsNl3MNQ#b#=$n*Mvl280GM~c0>aOL74Q5j6u%HA7dI^E-LdPesoWSFj>sLLmT6Qg7zl<@B_e@q| ziim+4CC}%amwhi3=>vUCCLM#?-jbAwN<}zG*As~By_xhVYKwX=V{qwA>Grqf(#tz{ zUS2|}TzYlm#d8}$mW|Xp_|fs~-Kh|0K5d zja%2hZ`6J(yDyx7^zaqfmc07l=Ji9rBbQt_fBwRwhfp_>=gzJD9lHNKMA|#Zwx7Rm zO2~rWD=O`~hac}ezklPClrq!v=>ee1zWugm;@3BCK+0TQm?xL60IKZU?V7gfD#&K8 zZ^)zbK(_1|Ou rYuO_g`o)2wGKZ%QXyxiD?H}bQ!xMb7K|$uB00000NkvXXu0mjfkZ#UO literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleA/static/3.png b/eaterplanet_ecommerce/moduleA/static/3.png new file mode 100644 index 0000000000000000000000000000000000000000..08d68205d971beb2310a590cf8119ba25407052e GIT binary patch literal 1720 zcmV;p21ogcP)=u?!=Pu!I4a& z|M0_;@57Pm%b!!I{|$ow?ZlDr!<6vDlkmfnaIydI!;(6U{BE!RG?D#rt^e`Fla)G_iL;F_`R8Svh?r8lst_8@y3qr$&#_LuEe~q?ZK6D zt^YcX`|-n*9Ebnj!>3%U|H`+f|IUE_#(yr9{Bf@T@xzkw#FRCT{b#Z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{s-i{UPDRKm-blbx={h*GZ)U~j6 z$=SU*_$OvJDw>hV;HI6R2~aLlWd5%J^y;Y25w_E8pH3C+m-|3HS}|3*1(u(?wRY^1OIKMuA#dUyY; I(RGOWAI8011poj5 literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleA/video/detail.js b/eaterplanet_ecommerce/moduleA/video/detail.js new file mode 100644 index 0000000..6b8443b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/detail.js @@ -0,0 +1,235 @@ +var app = getApp(); + +Page({ + + data: { + is_heng: 1, + rushList: [], + current: 0 + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + onLoad: function (options) { + app.setShareConfig(); + let id = options.id || ''; + if (!id) { + wx.showModal({ + title: '提示', + content: '参数错误', + showCancel: false, + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + return; + } + this.getData(id); + this.get_goods_details(id); + + let showBackBtn = false; + let pages_all = getCurrentPages(); + if (pages_all.length > 1) { + showBackBtn = true; + } + this.setData({ showBackBtn }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + goDetails: function(){ + let goods = this.data.goods; + let id = goods.id || ''; + id && wx.redirectTo({ + url: `/eaterplanet_ecommerce/pages/goods/goodsDetail?id=${id}`, + }) + }, + + get_goods_details: function (id) { + let that = this; + if (!id) { + wx.hideLoading(); + wx.showModal({ + title: '提示', + content: '参数错误', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + return false; + } + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let community_id = community.communityId || ''; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'goods.get_goods_detail', + token: token, + id, + community_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + let goods = (res.data.data && res.data.data.goods) || ''; + // 商品不存在 + if (!goods || goods.length == 0 || Object.keys(goods) == '') { + wx.showModal({ + title: '提示', + content: '该商品不存在,回首页', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + } + that.currentOptions = res.data.data.options; + that.setData({ + goods: goods, + options: res.data.data.options, + order: { + goods_id: res.data.data.goods.goods_id, + pin_id: res.data.data.pin_id, + }, + share_title: goods.share_title, + goods_image: res.data.data.goods_image + }) + } + }) + }, + + getData: function (goodsId) { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_gps_goodslist', + token: token, + pageNum: 1, + head_id: cur_community.communityId, + per_page: 10000, + is_video: 1 + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let rdata = res.data; + let rushList = rdata.list || []; + let current = rushList.findIndex(item => item.actId == goodsId); + that.setData({ rushList, current }); + } + } + }) + }, + + changeSubject: function(t){ + let rushList = this.data.rushList; + if (t < 0 || rushList.length<=1) { + wx.showToast({ + title: "没有上一个视频了~", + icon: "none", + duration: 2000 + }); + } else { + console.log(t); + if (t>rushList.length-1) { + wx.showToast({ + title: "没有下一个视频了~", + icon: "none", + duration: 2000 + }); + return; + } + var that = this; + t = t || 0, that.setData({ + current: t + }), this.get_goods_details(rushList[t].actId); + } + }, + + pre: function(){ + this.changeSubject(this.data.current*1 - 1) + }, + + next: function () { + this.changeSubject(this.data.current*1 + 1) + }, + + _backhome: function() { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var goods = this.data.goods; + var share_title = this.data.share_title; + var share_id = wx.getStorageSync('member_id'); + var share_path = `eaterplanet_ecommerce/moduleA/video/detail?id=${goods.id}&share_id=${share_id}`; + let shareImg = goods.goods_share_image; + console.log('商品分享地址:', share_path); + + return { + title: share_title, + path: share_path, + imageUrl: shareImg, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function() { + var goods = this.data.goods; + var share_title = this.data.share_title; + var share_id = wx.getStorageSync('member_id'); + let shareImg = goods.goods_share_image; + + var query= `id=${goods.id}&share_id=${share_id}`; + return { + title: share_title, + imageUrl: shareImg, + query, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/video/detail.json b/eaterplanet_ecommerce/moduleA/video/detail.json new file mode 100644 index 0000000..8ff54b5 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/detail.json @@ -0,0 +1,7 @@ +{ + "navigationStyle": "custom", + "usingComponents": { + "i-auth": "../../components/new-auth/index", + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/video/detail.wxml b/eaterplanet_ecommerce/moduleA/video/detail.wxml new file mode 100644 index 0000000..9b2cf8e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/detail.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + {{goods.goodsname}} + + ¥{{goods.price_front}}.{{goods.price_after}} + + + + + + 上一个商品 + 下一个商品 + + + diff --git a/eaterplanet_ecommerce/moduleA/video/detail.wxss b/eaterplanet_ecommerce/moduleA/video/detail.wxss new file mode 100644 index 0000000..51e2a85 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/detail.wxss @@ -0,0 +1,122 @@ +.main { + width: 750rpx; + height: 100%; + background: #000; + overflow: hidden; + z-index: 99999; +} + +.main .section video { + width: 750rpx; + height: 100vh; +} + +.goods { + width: 400rpx; + height: 150rpx; + background: #fff; + border-radius: 10rpx; + position: fixed; + bottom: 160rpx; + left: 20rpx; + z-index: 9998; + display: flex; +} + +.goods .good-img { + width: 150rpx; + height: 150rpx; + margin-right: 10rpx; + box-sizing: border-box; + padding: 10rpx; +} + +.good-img cover-image { + width: 150rpx; + height: 150rpx; + object-fit: cover; + border-radius: 10rpx; + overflow: hidden; +} + +.good-title { + display: inline-block; + font-size: 26rpx; + margin-top: 10rpx; + height: 60rpx; + line-height: 30rpx; + white-space: pre-wrap; +} + +.xqbottom { + display: flex; + justify-content: space-between; + align-items: center; + margin-bottom: 10rpx; +} + +.good-price { + display: inline-block; + flex: 1; + font-size: 28rpx; + color: red; +} + +.cart { + width: 45rpx; + height: 45rpx; + margin-left: 8rpx; +} + +.switch { + display: flex; + position: fixed; + bottom: 40rpx; + color: #fff; + font-size: 30rpx; + font-weight: bold; + left: 115rpx; +} + +.switch .an { + width: 250rpx; + height: 80rpx; + background: rgba(0, 0, 0, 0.3); + margin-left: 20rpx; + border-radius: 10rpx; + line-height: 80rpx; + text-align: center; +} + +.switch .an:nth-child(2) { + margin-right: 20rpx; +} + +.nav-btn { + position: relative; + top: 0; + left: 0; + display: flex; + justify-content: center; + align-items: center; + width: 31px; + height: 31px; + line-height: 31px; + padding: 0; + min-width: 31px; + max-width: 31px; + text-align: center; + border-radius: 50%; + min-height: initial; + box-sizing: border-box; + background: rgba(0,0,0,0.25); + border: 1px solid rgba(255,255,255,0.05); + color: #fff; + backdrop-filter: blur(20px); +} + +.nav-btn .img { + width: 20px; + height: 20px; + vertical-align: top; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/video/index.js b/eaterplanet_ecommerce/moduleA/video/index.js new file mode 100644 index 0000000..ca3e18d --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/index.js @@ -0,0 +1,178 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + rushList: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + shareInfo: '' + }, + pageNum: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + app.setShareConfig(); + status.setNavBgColor(); + this.getData(); + this.getInfo(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + const that = this; + util.check_login_new().then((res) => { + let needAuth = !res; + that.setData({ needAuth }) + if (res) { + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + } + }) + }, + + getInfo: function() { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'goods.get_video_list_share' + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + wx.setNavigationBarTitle({ + title: res.data.data.nav_title || '详情', + }) + that.setData({ shareInfo: res.data.data }) + } + } + }) + }, + + /** + * 获取商品列表 + */ + getData: function() { + var token = wx.getStorageSync('token'); + var that = this; + var cur_community = wx.getStorageSync('community'); + wx.showLoading(); + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_gps_goodslist', + token: token, + pageNum: that.pageNum, + head_id: cur_community.communityId, + per_page: 12, + is_video: 1 + }, + dataType: 'json', + success: function(res) { + if (res.data.code == 0) { + let rushList = ''; + let h = {}; + let rdata = res.data; + if (rdata.list.length < 12) h.noMore = true; + let oldRushList = that.data.rushList; + rushList = oldRushList.concat(rdata.list); + that.pageNum++; + that.setData({ + rushList: rushList, + tip: '', + ...h + }); + } else if (res.data.code == 1) { + if (that.pageNum == 1) that.setData({ noData: 1 }) + that.setData({ loadMore: false, noMore: false, loadText: "没有更多记录了~" }) + } else if (res.data.code == 2) { + //no login + that.setData({ + needAuth: true + }) + } + }, + complete: function() { + wx.hideLoading(); + } + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + if (!this.data.loadMore) return false; + this.getData(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function() { + let shareInfo = this.data.shareInfo; + let share_title = shareInfo.share_title || '视频'; + let shareImg = shareInfo.share_poster || ''; + var share_id = wx.getStorageSync('member_id'); + var share_path = `eaterplanet_ecommerce/moduleA/video/index?share_id=${share_id}`; + + return { + title: share_title, + path: share_path, + imageUrl: shareImg, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function(res) { + let shareInfo = this.data.shareInfo; + let title = shareInfo.share_title || '视频'; + let imageUrl = shareInfo.share_poster || ''; + var share_id = wx.getStorageSync('member_id'); + + var query= `share_id=${share_id}`; + return { + title, + query, + imageUrl, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleA/video/index.json b/eaterplanet_ecommerce/moduleA/video/index.json new file mode 100644 index 0000000..5cc6f0b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/index.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "视频", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index", + "i-router-link": "../../components/router-link/router-link", + "i-empty": "../../components/empty/index", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/video/index.wxml b/eaterplanet_ecommerce/moduleA/video/index.wxml new file mode 100644 index 0000000..2a87e37 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/index.wxml @@ -0,0 +1,27 @@ + + + + + + + + + + {{item.spuName}} + + + ¥{{item.actPrice[0]}}.{{item.actPrice[1]}} + + ¥{{item.marketPrice[0]}}.{{item.marketPrice[1]}} + + + + + + + + 暂时没有商品~ + + + + diff --git a/eaterplanet_ecommerce/moduleA/video/index.wxss b/eaterplanet_ecommerce/moduleA/video/index.wxss new file mode 100644 index 0000000..96035f7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/video/index.wxss @@ -0,0 +1,74 @@ +.list { + position: relative; + display: flex; + flex-wrap: wrap; + padding: 20rpx 10rpx; +} + +.list .item { + position: relative; + width: 345rpx; + margin: 0 10rpx 20rpx; + border-radius: 10rpx; + background: #fff; + overflow: hidden; + box-shadow: 0 0 3px #ccc; +} + +.list .item .img { + width: 345rpx; + height: 345rpx; +} + +.spu-play { + position: absolute; + left: 50%; + width: 150rpx; + height: 150rpx; + z-index: 1; + top: 98rpx; + margin-left: -75rpx; +} + +.list .item .cont { + padding: 20rpx; +} + +.list .item .tit { + font-size: 28rpx; + font-weight: bold; + line-height: 1.4; + margin-bottom: 15rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + word-break: break-all; +} + +.spu-price { + display: flex; + align-items: flex-end; + font-size: 26rpx; + line-height: 26rpx; + overflow: hidden; + margin-top: 10rpx; +} + +.spu-price .sale-price { + color: #ff5344; + margin-right: 12rpx; +} + +.spu-price .sale-price .span { + font-size: 46rpx; + line-height: 42rpx; + margin: 0; + font-weight: bold; +} + +.spu-price .market-price { + text-decoration: line-through; + color: #999; + margin-right: 20rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/notice.js b/eaterplanet_ecommerce/moduleA/vip/notice.js new file mode 100644 index 0000000..9088e1f --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/notice.js @@ -0,0 +1,53 @@ +var app = getApp(); + +Page({ + + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + this.getData(); + }, + + onShow: function () { + + }, + + getData: function () { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'vipcard.get_vipcard_baseinfo', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { vipcard_buy_pagenotice } = res.data.data; + that.setData({ vipcard_buy_pagenotice }) + } + } + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/notice.json b/eaterplanet_ecommerce/moduleA/vip/notice.json new file mode 100644 index 0000000..fe14af7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/notice.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "权益规则", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/notice.wxml b/eaterplanet_ecommerce/moduleA/vip/notice.wxml new file mode 100644 index 0000000..10e4a35 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/notice.wxml @@ -0,0 +1,3 @@ + + + diff --git a/eaterplanet_ecommerce/moduleA/vip/notice.wxss b/eaterplanet_ecommerce/moduleA/vip/notice.wxss new file mode 100644 index 0000000..fed6a5e --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/notice.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleA/vip/notice.wxss */ \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/upgrade.js b/eaterplanet_ecommerce/moduleA/vip/upgrade.js new file mode 100644 index 0000000..5efe7f6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/upgrade.js @@ -0,0 +1,310 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('../../mixin/compoentCartMixin.js')], + data: { + classification: { + tabs: [], + activeIndex: 0 + }, + rushList: [], + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + is_show_vipgoods: 1 + }, + pageNum:1, + canLoad: 1, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + status.setNavBgColor(); + this.getData(); + this.getList(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let that = this; + wx.showLoading(); + this.pageNum = 1; + that.setData({ + needAuth: false, + showAuthModal: false, + classification: { + tabs: [], + activeIndex: 0 + }, + rushList: [], + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false + }); + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + let url = '/eaterplanet_ecommerce/moduleA/vip/upgrade'; + app.globalData.navBackUrl = url; + wx.redirectTo({ url }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + this.setData({ needAuth: false }); + (0, status.cartNum)('', true).then((res) => { + res.code == 0 && that.setData({ cartNum: res.data }) + }); + } + }) + }, + + getData: function(){ + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'vipcard.get_vipcard_baseinfo', + token: token + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { + member_info, + card_equity_list, + card_list, + is_open_vipcard_buy, + modify_vipcard_name, + is_vip_card_member, + vipcard_unopen_headbg, + vipcard_effect_headbg, + vipcard_afterefect_headbg, + vipcard_buy_pagenotice, + vipcard_equity_notice, + is_show_vipgoods, + category_list + // del_vip_day + } = res.data.data; + wx.setNavigationBarTitle({ title: modify_vipcard_name || '会员中心' }) + + let params = { + classification: {} + }; + category_list = category_list || []; + if (category_list.length > 0) { + category_list.unshift({ + name: '全部', + id: 0 + }) + params.isShowClassification = true; + params.classification.tabs = category_list; + } else { + params.isShowClassification = false; + } + + card_list.map(item=>{ + let expire_day = item.expire_day.split('.'); + return item.expire_day = expire_day[0]; + }) + + that.setData({ + member_info, + card_equity_list, + card_list, + is_open_vipcard_buy, + modify_vipcard_name, + is_vip_card_member, + vipcard_unopen_headbg, + vipcard_effect_headbg, + vipcard_afterefect_headbg, + vipcard_equity_notice, + del_vip_day: res.data.del_vip_day || '', + is_show_vipgoods, + ...params + }) + } else { + app.util.message('未登录', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } + } + }) + }, + + choosecard: function (t) { + this.setData({ + selectid: t.currentTarget.dataset.id + }); + }, + + submitpay: function (t) { + if (wx.getStorageSync("token")) { + var rech_id = this.data.selectid, token = wx.getStorageSync("token"); + if (void 0 == rech_id) return wx.showToast({ + icon: "none", + title: "请选择要开通的会员类型" + }); + app.util.request({ + url: "entry/wxapp/user", + data: { + controller: "vipcard.wxcharge", + token, + rech_id + }, + dataType: "json", + success: function (res) { + if(res.data.is_zero_pay==1) { + wx.showToast({ + title: "支付成功", + icon: "none", + duration: 2000, + success: function () { + setTimeout(function () { + wx.redirectTo({ + url: "/eaterplanet_ecommerce/moduleA/vip/upgrade" + }); + }, 2000); + } + }); + } else { + wx.requestPayment({ + appId: res.data.appId, + timeStamp: res.data.timeStamp, + nonceStr: res.data.nonceStr, + package: res.data.package, + signType: res.data.signType, + paySign: res.data.paySign, + success: function (wxres) { + wx.showToast({ + title: "支付成功", + icon: "none", + duration: 2000, + success: function () { + setTimeout(function () { + wx.redirectTo({ + url: "/eaterplanet_ecommerce/moduleA/vip/upgrade" + }); + }, 2000); + } + }); + }, + fail: function (error) { + wx.showToast({ + icon: "none", + title: "支付失败,请重试!" + }); + } + }) + } + } + }); + } else{ + this.setData({ + needAuth: true + }); + } + }, + + /** + * 监控分类导航 + */ + classificationChange: function (t) { + wx.showLoading(); + var that = this; + this.pageNum = 1; + this.canLoad = 1; + this.setData({ + rushList: [], + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + "classification.activeIndex": t.detail.e, + classificationId: t.detail.a + }, function () { + that.getList(); + }); + }, + + /** + * 获取商品列表 + */ + getList: function () { + let that = this; + let token = wx.getStorageSync('token'); + let gid = that.data.classificationId; + let community = wx.getStorageSync('community'); + let head_id = community.communityId || 0; + + this.canLoad==1 && (that.canLoad=0), app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'vipcard.get_vipgoods_list', + pageNum: this.pageNum, + gid, + token, + head_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let oldRushList = that.data.rushList; + let h = {}, list = res.data.list; + if (that.pageNum == 1 && list.length == 0) h.showEmpty = true; + if(list.length < 10) h.loadMore = false; + let rushList = oldRushList.concat(list); + let rdata = res.data; + let reduction = { full_money: rdata.full_money, full_reducemoney: rdata.full_reducemoney, is_open_fullreduction: rdata.is_open_fullreduction } + h.rushList = rushList; + h.reduction = reduction; + h.loadOver = true; + h.loadText = that.data.loadMore ? "加载中..." : "没有更多商品了~"; + console.log(h) + that.setData(h, function () { + that.pageNum += 1; + }) + } else if (res.data.code == 1) { + let s = { loadMore: false } + if (that.pageNum == 1) s.showEmpty = true; + that.setData(s); + } else if (res.data.code == 2) { + //no login + that.setData({ needAuth: true }) + } + console.log('that.canLoad', that.canLoad); + that.canLoad=1; + } + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log('这是我的底线', this.canLoad); + this.data.loadMore && (this.canLoad==1) && (this.setData({ loadOver: false }), this.getList()); + } +}) diff --git a/eaterplanet_ecommerce/moduleA/vip/upgrade.json b/eaterplanet_ecommerce/moduleA/vip/upgrade.json new file mode 100644 index 0000000..a97d73b --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/upgrade.json @@ -0,0 +1,15 @@ +{ + "navigationBarTextStyle": "white", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "i-router-link": "../../components/router-link/router-link", + "i-img": "../../components/img/index", + "i-tabs": "../../components/tabs/index", + "i-type-item": "../../pages/type/type-item", + "sku": "../../components/sku/index", + "i-load-more": "../../components/load-more/index", + "i-vip-modal": "../../components/vipModal/index", + "i-cart-btn": "../../components/cartBtn/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/upgrade.wxml b/eaterplanet_ecommerce/moduleA/vip/upgrade.wxml new file mode 100644 index 0000000..fe5935c --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/upgrade.wxml @@ -0,0 +1,105 @@ + + + + + + + + + 开通{{modify_vipcard_name}} + + + 尊享特权·会员专享价 + + + + + + + + + + + + {{member_info.username}} + 有效期至:{{member_info.card_end_time}} + + + 立即续卡 + + + 尊享特权·会员专享价 + + + + + + + + + + + 开通{{modify_vipcard_name}} + + + 尊享特权·会员专享价 + + + + + + + + {{modify_vipcard_name}}专享特权 + + + + {{item.equity_name}} + + + + + + {{modify_vipcard_name}}类型 + + + + {{item.cardname}} + + {{item.price}} + ¥{{item.orignprice}} + 有效期 {{item.expire_day%30==0?item.expire_day/30+'个月':item.expire_day+'天'}} + + + + + + + {{is_vip_card_member!=0?"立即续费":"立即购买"}} + + + + + + {{modify_vipcard_name}}专享特价 + + + + + + + + + + 暂时没有专享商品 + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleA/vip/upgrade.wxss b/eaterplanet_ecommerce/moduleA/vip/upgrade.wxss new file mode 100644 index 0000000..00bd0ee --- /dev/null +++ b/eaterplanet_ecommerce/moduleA/vip/upgrade.wxss @@ -0,0 +1,264 @@ +.section { + overflow-x: hidden; + background-color: #fff; +} + +.topImg { + width: 100%; +} + +.section .head { + width: 130%; + height: 350rpx; + border-radius: 0 0 50% 50%; + background: #2e3748; + position: relative; + left: -15%; + overflow: hidden; +} + +.section .head1 { + width: 150%; + height: 240rpx; + border-radius: 0 0 50% 50%; + background: #2e3748; + position: relative; + left: -25%; + padding-top: 30rpx; +} + +.section .head .card { + width: 538rpx; + height: 255rpx; + background: linear-gradient(to right, #e6b980 0%, #eacda3 100%); + margin: 30rpx auto 0 auto; + border-radius: 25rpx 25rpx 0 0; + padding: 50rpx; + text-align: center; + overflow: hidden; +} + +.section .head1 .card { + width: 610rpx; + height: 295rpx; + background: linear-gradient(to right, #e6b980 0%, #eacda3 100%); + margin: 0 auto; + border-radius: 25rpx; + padding: 30rpx 40rpx; + overflow: hidden; + color: #282e42; +} + +.card .card-title { + display: flex; + align-items: center; + justify-content: center; + color: #885824; + font-size: 26rpx; +} + +.card .card-title.vipinfo { + color: #282e42; +} + +.card .card-title .vipinfo-avatar { + width: 120rpx; + height: 120rpx; + border-radius: 50%; + margin-right: 20rpx; +} + +.card .card-title .vipinfo-r { + display: flex; + flex-direction: column; + flex: 1; +} + +.card .card-title .vipinfo-name { + font-size: 30rpx; +} + +.card .card-title .endtime { + font-size: 26rpx; + margin-top: 10rpx; + font-weight: 500; +} + +.card .card-title .vip-xucard { + position: absolute; + display: flex; + align-items: center; + padding: 13rpx 20rpx; + background: #282e42; + border-radius: 50px; + color: #fff; + font-size: 26rpx; + right: 22%; +} + +.card .sheng { + margin-top: 30rpx; + font-size: 30rpx; +} + +.card .sheng text { + color: #fff; +} + +.card .card-title .title-name { + margin: 0 20rpx; + color:linear-gradient(to right,#72491d,#885824); +} + +.card .card-title text { + flex: 1; + border-top: 0.1rpx solid #72491d; +} + +.section .content { + + background-image: linear-gradient(to right,#72491d,#885824); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; +} + +.card .bigtitle { + margin: 30rpx 0; + font-size: 55rpx; +} + +.card .smalltitle { + font-size: 30rpx; + font-weight: 600; +} + +.section .privilege { + padding: 30rpx; +} + +.section .privilege1 { + padding: 140rpx 30rpx 0 30rpx; + background-color: #fff; +} + +.section .privilege .privilegelist { + display: flex; + width: 100%; + overflow-x: scroll; + white-space: nowrap; + padding-top: 30rpx; +} + +.section .privilege .privilegelist .list-item { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + margin-right: 30rpx; + min-width: 140rpx; + height: 160rpx; +} + +.section .privilege .privilegelist .list-item image { + width: 90rpx; + height: 90rpx; + border-radius: 10rpx; +} + +.section .privilege .privilegelist .list-item view { + font-size: 24rpx; + margin-top: 8rpx; +} + +.section .greentitle { + font-size: 35rpx; + color: #2f3746; +} + +.viptype { + padding: 30rpx; + margin-top: 20rpx; + background-color: #fff; + +} + +.viplist .list { + display: flex; + overflow-x: scroll; + overflow-y: hidden; + white-space: nowrap; + margin: 30rpx 0; +} + +.viplist .list .list-item { + border: 1rpx solid #cca704; + padding: 18rpx 30rpx; + border-radius: 15rpx; + min-width: 160rpx; + max-width: 160rpx; + height: 180rpx; + text-align: center; + margin-right: 20rpx; +} + +.viplist .list .list-item.active { + background: rgba(194, 177, 30, 0.2); +} + +.gray { + font-family: DIN; + color: #999; +} + +.green { + font-family: DIN; + color: #cca704; +} + +.section .apply-btn { + background: linear-gradient(to bottom,#394456,#2F3848); + width: 68%; + color: #cca704; + font-size: 30rpx; + text-align: center; + border-radius: 50rpx; + padding: 20rpx 0; + margin: 0 auto 5rpx; + box-shadow: 1rpx 1rpx 5rpx #ccc; +} + +.cate { + position: sticky; + top: 0; + left: 0; + right: 0; + z-index: 10; + background: linear-gradient(to right, #e6b980 0%, #eacda3 100%); + +} + +.goodsItem { + border-bottom: .1rpx solid #f5f5f5; +} + +.none-rush-list { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 140rpx; + padding-top: 140rpx; +} + +.none-rush-list .img-block { + width: 240rpx; + height: 240rpx; + margin-bottom: 30rpx; +} + +.none-rush-list .h1 { + font-size: 32rpx; + line-height: 32rpx; + color: #444; + margin-bottom: 20rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsone.js b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.js new file mode 100644 index 0000000..48ba481 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.js @@ -0,0 +1,5 @@ +var presaleBehavior = require('./presaleBehavior.js'); + +Component({ + behaviors: [presaleBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsone.json b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxml b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxml new file mode 100644 index 0000000..57dae80 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxml @@ -0,0 +1,48 @@ + + + + + {{spuItem.label_info.tagcontent}} + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + {{spuItem.spuName}} + + + + 定金¥{{spuItem.presale_ding_money}}可抵¥{{spuItem.presale_deduction_money>0?spuItem.presale_deduction_money:spuItem.presale_ding_money}} + 全款预售 + + + + 尾款:¥{{weikuan}} + 预售时间:{{spuItem.presale_ding_time_start}}-{{spuItem.presale_ding_time_end}} + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + + 已抢光 + + 未开始 + 已结束 + 抢购 + + + 已抢光 + 即将开抢 + 已结束 + diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxss b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxss new file mode 100644 index 0000000..29ab264 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsone.wxss @@ -0,0 +1,177 @@ +.spu-content { + width: 350rpx; + height: 600rpx; + border-radius: 20rpx; + background: #fff; + box-sizing: border-box; + padding: 30rpx 25rpx; + box-shadow: 0 0 40rpx rgba(0, 0, 0, 0.05); + position: relative; + margin-bottom: 10rpx; +} + +.spu-img { + width: 300rpx; + height: 300rpx; + border-radius: 10rpx; +} + +.spu-content .spu-title { + font-size: 28rpx; + line-height: 36rpx; + height: 36rpx; + color: #444; + margin-bottom: 16rpx; + font-weight: 500; + position: relative; + margin-top: 16rpx; +} + +.spu-content .spu-title .span { + display: block; + width: 100%; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.spu-content .spu-price { + display: flex; + align-items: flex-end; + font-size: 20rpx; + margin-top: 30rpx; +} + +.spu-content .spu-price .sale-price { + font-family: DIN; + color: #ff758c; + margin-right: 8rpx; +} + +.spu-content .spu-price .sale-price .span { + font-size: 40rpx; + line-height: 40rpx; + margin-left: 4rpx; + font-weight: 500; + font-weight: bold; +} + +.spu-content .spu-price .market-price { + font-family: DIN; + text-decoration: line-through; + color: #999; +} + +.spu-content .add-cart, .spu-content .add-cart-disabled { + width: 100rpx; + height: 50rpx; + padding: 0; + margin: 0; + position: absolute; + right: 20rpx; + bottom: 30rpx; + display: flex; + align-items: center; + justify-content: center; + background: linear-gradient(90deg, #ff5041 0%, #ff695c 100%); + color: #fff; + border-radius: 25rpx; + font-size: 24rpx; + font-weight: bold; +} + +.spu-content .add-cart-disabled { + background: #ccc; +} + +.spu-content .pin-tag { + display: inline-block; + font-size: 24rpx; + padding: 6rpx 10rpx; + margin-right: 10rpx; + border: 0.1rpx solid #ff5344; + line-height: 1; + vertical-align: middle; + color: #ff5344; + border-radius: 8rpx; + font-weight: bold; +} + +.spu-play { + position: absolute; + left: 50%; + top: 95rpx; + width: 100rpx; + height: 100rpx; + margin-left: -50rpx; +} + +.spu-play .img { + width: 100%; + height: 100%; +} + +.mask { + background: rgba(255, 255, 255, 0.5); + width: 300rpx; + height: 300rpx; + position: absolute; + left: 25rpx; + top: 30rpx; +} + +.act-end { + position: absolute; + height: 60rpx; + border-radius: 10rpx; + background: rgba(0, 0, 0, 0.5); + color: #fff; + font-size: 28rpx; + text-align: center; + line-height: 60rpx; + left: 50%; + top: 140rpx; + padding: 0 12rpx; + transform: translateX(-50%); +} + +/* 标签 */ +.spu-content .item-tag { + position: absolute; + left: 25rpx; + top: 35rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.spu-content .item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.spu-content .item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} + +.desc { + font-size: 21rpx; + color: #999; + height: 56rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.js b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.js new file mode 100644 index 0000000..48ba481 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.js @@ -0,0 +1,5 @@ +var presaleBehavior = require('./presaleBehavior.js'); + +Component({ + behaviors: [presaleBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.json b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxml b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxml new file mode 100644 index 0000000..be3c3be --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxml @@ -0,0 +1,58 @@ + + + + + + + {{spuItem.label_info.tagcontent}} + + + + + + + 已抢光 + 已结束 + + + + {{spuItem.spuName}} + + + {{spuItem.spuDescribe}} + + + + 定金¥{{spuItem.presale_ding_money}}可抵¥{{spuItem.presale_deduction_money>0?spuItem.presale_deduction_money:spuItem.presale_ding_money}} + 全款预售 + + 尾款:¥{{weikuan}} + 预售时间:{{spuItem.presale_ding_time_start}}-{{spuItem.presale_ding_time_end}} + + + + + ¥{{dingArr[0]}}.{{dingArr[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + + 未开始 + 已结束 + + 已抢光 + + 去抢购 + + + + diff --git a/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxss b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxss new file mode 100644 index 0000000..fa6daa6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxss @@ -0,0 +1,60 @@ +/* eaterplanet_ecommerce/moduleB/components/presale-goodsrow.wxss */ +@import "/eaterplanet_ecommerce/pages/index/template/pinrow.wxss"; + +.pinrow-wrap { + background: #ffffff; + border-radius: 10rpx; +} + +.pinrow-wrap .spu-content { + margin-top: 0; +} + +.pinrow-wrap .mask { + width: 240rpx; + height: 240rpx; + left: 20rpx; + top: 20rpx; +} + +.pinrow-wrap .act-end { + z-index: 1; + left: 118rpx; + top: 95rpx; +} + +/* 标签 */ + +.item-tag { + position: absolute; + left: 10rpx; + top: 20rpx; + width: 54rpx; + height: 62rpx; + z-index: 1; + color: #fff; + text-align: center; +} + +.item-tag-bg { + position: absolute; + left: 0; + top: 0; + width: 54rpx; + height: 62rpx; + z-index: 0; +} + +.item-tag .tag-name { + position: relative; + padding-top: 6rpx; + font-size: 20rpx; + line-height: 1; + font-weight: 600; + z-index: 1; +} + +.item-tag .tag-name.two-word { + font-size: 22rpx; + padding-top: 14rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/components/presaleBehavior.js b/eaterplanet_ecommerce/moduleB/components/presaleBehavior.js new file mode 100644 index 0000000..713d56c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/presaleBehavior.js @@ -0,0 +1,93 @@ +let app = getApp(); + +module.exports = Behavior({ + properties: { + spuItem: { + type: Object, + value: { + actId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + }, + observer: function (t) { + let {presale_ding_time_start_int, presale_ding_time_end_int } = t; + let nowtime = Date.parse(new Date())/1000; + let saleStatus = 1; //客付定金 0未开始 2已结束 + let h = {}; + + if(t.presale_type==0) { + let { presale_ding_money, actPrice, presale_deduction_money } = t; + let goodsPrice = (actPrice[0]+'.'+actPrice[1])*1; + presale_deduction_money = presale_deduction_money>0?presale_deduction_money:presale_ding_money; + let weikuan = goodsPrice - presale_deduction_money*1; + presale_ding_money = presale_ding_money.toFixed(2); + h.dingArr = (presale_ding_money+'').split('.'); + h.weikuan = weikuan.toFixed(2); + } + + if(nowtimepresale_ding_time_end_int) { + saleStatus = 2; + } + this.setData({ + saleStatus, + ...h + }) + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + skin: Object, + goods_sale_unit: String + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '', + weikuan: 0, + dingArr: ['0', '00'], + saleStatus: 1 + }, + methods: { + goLink: function () { + let id = this.data.spuItem.actId; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/pages/goods/goodsDetail?id=${id}&type=presale`, + }) + } + } +}) diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.js b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.js new file mode 100644 index 0000000..9f52fa0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.js @@ -0,0 +1,5 @@ +var virtualcardBehavior = require('./virtualcardBehavior'); + +Component({ + behaviors: [virtualcardBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.json b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxml b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxml new file mode 100644 index 0000000..5bd1a24 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxml @@ -0,0 +1,44 @@ + + + + + {{spuItem.label_info.tagcontent}} + + + + + 满{{reduction.full_money}}减{{reduction.full_reducemoney}} + 限购 + + + + + + {{spuItem.spuName}} + + + + 可兑换{{spuItem.code_money}}元 + + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + + 已抢光 + + + 已结束 + + 抢购 + + + 已抢光 + + 已结束 + diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxss b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxss new file mode 100644 index 0000000..e2fc1f3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsone.wxss @@ -0,0 +1,5 @@ +@import "./presale-goodsone.wxss"; + +.spu-content { + height: 530rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.js b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.js new file mode 100644 index 0000000..9f52fa0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.js @@ -0,0 +1,5 @@ +var virtualcardBehavior = require('./virtualcardBehavior'); + +Component({ + behaviors: [virtualcardBehavior] +}); \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.json b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.json new file mode 100644 index 0000000..0d19635 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "i-button": "../../components/button/index", + "i-img": "../../components/img/index", + "i-router-link": "../../components/router-link/router-link" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxml b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxml new file mode 100644 index 0000000..4c6f41a --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxml @@ -0,0 +1,43 @@ + + + + + + + {{spuItem.label_info.tagcontent}} + + + + + + + 已抢光 + 已结束 + + + + {{spuItem.spuName}} + + + {{spuItem.spuDescribe}} + + + 可兑换{{spuItem.code_money}}元 + + + + ¥{{spuItem.actPrice[0]}}.{{spuItem.actPrice[1]}} + + ¥{{spuItem.marketPrice[0]}}.{{spuItem.marketPrice[1]}} + + + + + 已抢光 + + 去抢购 + + + + diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxss b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxss new file mode 100644 index 0000000..9d45119 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcard-goodsrow.wxss @@ -0,0 +1 @@ +@import "presale-goodsrow.wxss"; \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/components/virtualcardBehavior.js b/eaterplanet_ecommerce/moduleB/components/virtualcardBehavior.js new file mode 100644 index 0000000..0208306 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/components/virtualcardBehavior.js @@ -0,0 +1,93 @@ +let app = getApp(); + +module.exports = Behavior({ + properties: { + spuItem: { + type: Object, + value: { + actId: "", + skuId: "", + spuImage: "", + spuName: "", + endTime: 0, + beginTime: "", + actPrice: ["", ""], + marketPrice: ["", ""], + spuCanBuyNum: "", + soldNum: "", + actId: "", + limitMemberNum: "", + limitOrderNum: "", + serverTime: "", + isLimit: false, + skuList: [], + spuDescribe: "", + is_take_fullreduction: 0, + bigImg: '', + car_count: 0 + }, + observer: function (t) { + let {presale_ding_time_start_int, presale_ding_time_end_int } = t; + let nowtime = Date.parse(new Date())/1000; + let saleStatus = 1; //客付定金 0未开始 2已结束 + let h = {}; + + if(t.presale_type==0) { + let { presale_ding_money, actPrice, presale_deduction_money } = t; + let goodsPrice = (actPrice[0]+'.'+actPrice[1])*1; + presale_deduction_money = presale_deduction_money>0?presale_deduction_money:presale_ding_money; + let weikuan = goodsPrice - presale_deduction_money*1; + presale_ding_money = presale_ding_money.toFixed(2); + h.dingArr = (presale_ding_money+'').split('.'); + h.weikuan = weikuan.toFixed(2); + } + + if(nowtimepresale_ding_time_end_int) { + saleStatus = 2; + } + this.setData({ + saleStatus, + ...h + }) + } + }, + isPast: { + type: Boolean, + value: false + }, + actEnd: { + type: Boolean, + value: false + }, + reduction: { + type: Object, + value: { + full_money: '', + full_reducemoney: '', + is_open_fullreduction: 0 + } + }, + skin: Object, + goods_sale_unit: String + }, + attached() { + this.setData({ placeholdeImg: app.globalData.placeholdeImg }) + }, + data: { + disabled: false, + placeholdeImg: '', + weikuan: 0, + dingArr: ['0', '00'], + saleStatus: 1 + }, + methods: { + goLink: function () { + let id = this.data.spuItem.actId; + id && wx.navigateTo({ + url: `/eaterplanet_ecommerce/pages/goods/goodsDetail?id=${id}&type=virtualcard`, + }) + } + } +}) diff --git a/eaterplanet_ecommerce/moduleB/generalmall/index.js b/eaterplanet_ecommerce/moduleB/generalmall/index.js new file mode 100644 index 0000000..48fd26a --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/generalmall/index.js @@ -0,0 +1,954 @@ +const height = wx.getSystemInfoSync().windowHeight +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); +var countDownInit = require("../../utils/countDown"); +var a = require("../../utils/public"); +var app = getApp(); +let globalData = getApp().globalData +const key = globalData.key +let SYSTEMINFO = globalData.systeminfo +Page({ + mixins: [countDownInit.default, require('../../mixin/globalMixin.js')], + data: { + classification: { + tabs: [], + activeIndex: -1 + }, + rushList: [], + statusBarHeight: app.globalData.statusBarHeight + 44 + 'px', + searchBarHeight: app.globalData.statusBarHeight + 'px', + rushboxHeight: app.globalData.statusBarHeight + 200 + 'px', + pageNum: 1 + + }, + $data: { + statusBarHeight: app.globalData.statusBarHeight + 44, + top: 0, + stickyFlag: false, + scrollTop: 0, + overPageNum: 1, + loadOver: false, + hasOverGoods: false, + countDownMap: {}, + actEndMap: {}, + timer: {}, + scrollHeight: 1300, + stickyTop: 0, + }, + + /** + * is_only_express + */ + onLoad: function (options) { + app.setShareConfig(); + let that = this; + status.setNavBgColor(); + status.setGroupInfo().then((groupInfo) => { + that.setData({ + groupInfo + }) + }); + }, + + loadPage: function () { + wx.showLoading(); + this.hasRefeshin = false; + this.$data = { + ...this.$data, + ...{ + overPageNum: 1, + loadOver: false, + hasOverGoods: false, + countDownMap: {}, + actEndMap: {}, + timer: {}, + hasCommingGoods: true + } + } + this.setData({ + rushList: [], + pageNum: 1 + }, ()=>{ + this.getIndexInfo(); + this.load_goods_data(); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + (0, status.cartNum)('', true).then((res) => { + that.setData({ + cartNum: res.data + }) + }); + } + }) + this.loadPage(); + }, + + /** + * 监控滚动事件 + */ + onPageScroll: function (t) { + if (!this.$data.isLoadData) { + if (t.scrollTop < this.$data.scrollHeight) { + if (t.scrollTop > this.$data.scrollTop) { + "down" !== this.data.scrollDirect && this.setData({ + scrollDirect: "down" + }) + } else { + "up" != this.data.scrollDirect && this.setData({ + scrollDirect: "up" + }) + } + } else { + "down" !== this.data.scrollDirect && this.setData({ + scrollDirect: "down" + }) + } + if (t.scrollTop > this.$data.stickyTop) { + this.data.isSticky || (this.setData({ + isSticky: true + }), this.$data.stickyFlag = true) + } else { + t.scrollTop < this.$data.stickyBackTop && this.data.isSticky && (this.setData({ + isSticky: false + }), this.$data.stickyFlag = false) + } + this.$data.scrollTop = t.scrollTop + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.loadPage(); + wx.stopPullDownRefresh(); + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.load_goods_data(); + }, + + authModal: function (e = {}) { + let needAuth = (e && e.detail) || this.data.needAuth; + if (this.data.needAuth || e.detail) { + this.setData({ + showAuthModal: !this.data.showAuthModal, + needAuth + }); + return false; + } + return true; + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + this.setData({ + needAuth: false + }) + this.loadPage(); + }, + + /** + * 导航小图标 + */ + getIndexInfo: function () { + let that = this; + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'generalmall.get_index_info' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let { + navigat_list, + slider_list, + category_list, + shoname, + index_type_first_name, + theme, + index_list_top_image, + showTabbar, + is_show_list_timer, + is_show_list_count + } = res.data.data; + wx.setNavigationBarTitle({ + title: shoname + }); + + let navigatEmpty = []; + if (navigat_list.length > 0) { + let len = (5 - navigat_list.length % 5) || 0; + if (len < 5 && len > 0) navigatEmpty = new Array(len); + } + + let h = { + classification: { + tabs: '' + } + }; + h.index_type_first_name = index_type_first_name || '全部'; + if (category_list.length > 0) { + category_list.unshift({ + name: index_type_first_name || '全部', + id: 0 + }) + h.isShowClassification = true; + h.classification.tabs = category_list; + } else { + h.isShowClassification = false; + } + + that.setData({ + navigat: navigat_list, + navigatEmpty, + slider_list, + theme, + index_list_top_image, + showTabbar, + isShowListTimer: is_show_list_timer, + isShowListCount: is_show_list_count, + ...h + }) + } + } + }) + }, + + /** + * 幻灯片跳转 + */ + goBannerUrl: function (t) { + let idx = t.currentTarget.dataset.idx; + let { + slider_list, + needAuth + } = this.data; + if (slider_list.length > 0) { + let url = slider_list[idx].link; + let type = slider_list[idx].linktype; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + url && wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) + }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ + url: url + }) + } else { + url && wx.navigateTo({ + url: url + }) + } + + } else if (type == 2) { + // 跳转小程序 + let appid = slider_list[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: slider_list[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } + } + }, + + /** + * 导航图标跳转 + */ + goNavUrl: function (t) { + let idx = t.currentTarget.dataset.idx; + let { + navigat, + needAuth + } = this.data; + if (navigat.length > 0) { + let url = navigat[idx].link; + let type = navigat[idx].type; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url), + }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + wx.switchTab({ + url: url + }) + } else { + wx.navigateTo({ + url: url + }) + } + + } else if (type == 2) { + // 跳转小程序 + let appid = navigat[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: navigat[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } else if (type == 3) { + //首页分类 + let classification = this.data.classification; + let tabs = classification && classification.tabs; + let cid = url; + let activeIdx = tabs.findIndex((p) => { + return p.id == cid + }); + if (activeIdx != -1) { + let cateInfo = { + detail: { + e: activeIdx, + a: cid + } + }; + this.classificationChange(cateInfo); + } + } else if (type == 4) { + //独立分类 + app.globalData.typeCateId = url; + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/type/index' + }) + } + } + }, + + /** + * 监控分类导航 + */ + classificationChange: function (t) { + wx.showLoading(); + var that = this; + this.$data = { + ...this.$data, + ...{ + overPageNum: 1, + loadOver: false, + hasOverGoods: false, + countDownMap: {}, + actEndMap: {}, + timer: {} + } + }, this.hasRefeshin = false, this.setData({ + rushList: [], + showEmpty: false, + pageNum: 1, + "classification.activeIndex": t.detail.e, + classificationId: t.detail.a + }, function () { + if (!this.$data.stickyFlag && (that.$data.scrollTop != that.$data.stickyTop + 5)) { + wx.pageScrollTo({ + scrollTop: that.$data.stickyTop - 30, + duration: 0 + }) + } + that.load_goods_data(); + }); + }, + + /** + * 获取商品列表 + */ + load_goods_data: function () { + var token = wx.getStorageSync('token'); + var that = this; + // var cur_community = wx.getStorageSync('community'); + var gid = that.data.classificationId; + this.$data.isLoadData = true; + console.log('load_goods_begin '); + + if (!that.hasRefeshin && !that.$data.loadOver) { + console.log('load_goods_in '); + this.hasRefeshin = true; + that.setData({ + loadMore: true + }); + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.load_gps_goodslist', + token: token, + pageNum: that.data.pageNum, + head_id: '', + gid, + per_page: 12, + is_only_express: 1 + }, + dataType: 'json', + success: function (res) { + if (that.data.pageNum == 1) { + that.setData({ + cate_info: res.data.cate_info || {} + }) + } + if (res.data.code == 0) { + let rushList = ''; + if (res.data.is_show_list_timer == 1) { + rushList = that.transTime(res.data.list); + for (let s in that.$data.countDownMap) that.initCountDown(that.$data.countDownMap[s]); + } else { + let oldRushList = that.data.rushList; + rushList = oldRushList.concat(res.data.list); + } + let rdata = res.data; + let { + full_money, + full_reducemoney, + is_open_fullreduction, + is_open_vipcard_buy, + is_vip_card_member, + is_member_level_buy + } = rdata; + let reduction = { + full_money, + full_reducemoney, + is_open_fullreduction + } + + // 是否可以会员折扣购买 + let canLevelBuy = false; + if (is_open_vipcard_buy == 1) { + if (is_vip_card_member != 1 && is_member_level_buy == 1) canLevelBuy = true; + } else { + (is_member_level_buy == 1) && (canLevelBuy = true); + } + + if (that.data.pageNum == 1) that.setData({ + copy_text_arr: rdata.copy_text_arr || [] + }) + that.hasRefeshin = false; + that.setData({ + rushList: rushList, + pageNum: that.data.pageNum + 1, + loadMore: false, + reduction, + tip: '', + is_open_vipcard_buy: is_open_vipcard_buy || 0, + is_vip_card_member, + is_member_level_buy, + canLevelBuy + }, () => { + if (that.isFirst == 1) { + that.isFirst++; + if (rushList.length && !that.$data.stickyTop) { + wx.createSelectorQuery().select(".tab-nav-query").boundingClientRect(function (t) { + if (t && t.top) { + wcache.put('tabPos', t); + that.$data.stickyTop = t.top + t.height, that.$data.stickyBackTop = t.top; + } else { + let tabpos = wcache.get('tabPos', false); + if (tabpos) that.$data.stickyTop = tabpos.top + tabpos.height, that.$data.stickyBackTop = tabpos.top; + } + }).exec(); + that.$data.scrollTop > that.$data.stickyTop && wx.pageScrollTo({ + duration: 0, + scrollTop: that.$data.stickyTop + 4 + }); + } + } + that.getScrollHeight(); + if (that.data.pageNum == 2 && res.data.list.length < 10) { + console.log('load_over_goods_list_begin') + that.$data.loadOver = true; + that.hasRefeshin = true; + that.setData({ + loadMore: true + }, () => { + that.load_over_gps_goodslist(); + }); + } + }); + } else if (res.data.code == 1) { + that.$data.loadOver = true; + that.load_over_gps_goodslist(); + } else if (res.data.code == 2) { + //no login + that.setData({ + needAuth: true, + couponRefresh: false + }) + } + }, + complete: function () { + that.$data.isLoadData = false; + // wx.hideLoading(); + setTimeout(function () { + wx.hideLoading(); + }, 1000); + } + }) + } else { + that.load_over_gps_goodslist(); + } + }, + + /** + * 组合倒计时时间 + */ + transTime: function (list) { + let that = this; + let e = arguments.length > 1 && void 0 !== arguments[1] ? arguments[1] : 0; + e === 0 && list.map(function (t) { + t.end_time *= 1000; + that.$data.countDownMap[t.end_time] = t.end_time, that.$data.actEndMap[t.end_time] = t.end_time <= new Date().getTime() || t.spuCanBuyNum == 0; + }) + return that.data.rushList.concat(list); + }, + + /** + * 获取售罄商品 + */ + load_over_gps_goodslist: function () { + var token = wx.getStorageSync('token'); + var that = this; + // var cur_community = wx.getStorageSync('community'); + var gid = that.data.classificationId; + + if (!that.$data.hasOverGoods && that.$data.loadOver) { + that.$data.hasOverGoods = true; + that.setData({ + loadMore: true + }); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_over_gps_goodslist', + token: token, + pageNum: that.$data.overPageNum, + head_id: '', + gid, + is_index_show: 1, + is_only_express: 1 + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let rushList = that.transTime(res.data.list); + for (let s in that.$data.countDownMap) that.initCountDown(that.$data.countDownMap[s]); + + that.$data.hasOverGoods = false; + that.$data.overPageNum += 1; + that.setData({ + rushList: rushList, + loadMore: false, + tip: '' + }, () => { + if (that.isFirst == 1) { + that.isFirst++; + if (rushList.length && !that.$data.stickyTop) { + wx.createSelectorQuery().select(".tab-nav-query").boundingClientRect(function (t) { + if (t && t.top) { + wcache.put('tabPos', t); + that.$data.stickyTop = t.top + t.height, that.$data.stickyBackTop = t.top; + } else { + let tabpos = wcache.get('tabPos', false); + if (tabpos) that.$data.stickyTop = tabpos.top + tabpos.height, that.$data.stickyBackTop = tabpos.top; + } + }).exec(); + that.$data.scrollTop > that.$data.stickyTop && wx.pageScrollTo({ + duration: 0, + scrollTop: that.$data.stickyTop + 4 + }); + } + } + that.getScrollHeight(); + }); + } else if (res.data.code == 1) { + if (that.$data.overPageNum == 1 && that.data.rushList.length == 0) that.setData({ + showEmpty: true + }) + that.setData({ + loadMore: false, + tip: '^_^已经到底了' + }) + } else if (res.data.code == 2) { + that.setData({ + needAuth: true, + couponRefresh: false + }) + } + that.$data.isLoadData = false; + } + }) + } else { + that.$data.isLoadData = false; + } + }, + + getScrollHeight: function () { + wx.createSelectorQuery().select('.rush-list-box').boundingClientRect((rect) => { + rect && rect.height && (this.$data.scrollHeight = rect.height || 1300); + console.log(this.$data.scrollHeight) + }).exec() + }, + + openSku: function (t) { + if (!this.authModal()) return; + var that = this, + e = t.detail; + var goods_id = e.actId; + var options = e.skuList; + that.setData({ + addCar_goodsid: goods_id + }) + + let list = options.list || []; + let arr = []; + if (list && list.length > 0) { + for (let i = 0; i < list.length; i++) { + let sku = list[i]['option_value'][0]; + console.log(sku) + let temp = { + name: sku['name'], + id: sku['option_value_id'], + index: i, + idx: 0 + }; + arr.push(temp); + } + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + var cur_sku_arr = options.sku_mu_list[id] || {}; + that.setData({ + sku: arr, + sku_val: 1, + cur_sku_arr: cur_sku_arr, + skuList: e.skuList, + visible: true, + showSku: true, + is_take_vipcard: e.is_take_vipcard || '', + is_mb_level_buy: e.is_mb_level_buy || '' + }); + } else { + let goodsInfo = e.allData; + that.setData({ + sku: [], + sku_val: 1, + skuList: [], + cur_sku_arr: goodsInfo + }) + let formIds = { + detail: { + formId: "" + } + }; + formIds.detail.formId = "the formId is a mock one"; + that.gocarfrom(formIds); + } + + }, + + /** + * 确认加入购物车 + */ + gocarfrom: function (e) { + var that = this; + wx.showLoading(); + this.setData({ + is_take_vipcard: '', + is_mb_level_buy: '' + }) + a.collectFormIds(e.detail.formId); + that.goOrder(); + }, + + /** + * 关闭购物车选项卡 + */ + closeSku: function () { + this.setData({ + visible: 0, + stopClick: false, + }); + }, + + selectSku: function (event) { + var that = this; + let str = event.currentTarget.dataset.type; + let obj = str.split("_"); + let { + sku, + skuList, + sku_val + } = this.data; + let temp = { + name: obj[3], + id: obj[2], + index: obj[0], + idx: obj[1] + }; + sku.splice(obj[0], 1, temp); + var id = ''; + for (let i = 0; i < sku.length; i++) { + if (i == sku.length - 1) { + id = id + sku[i]['id']; + } else { + id = id + sku[i]['id'] + "_"; + } + } + var cur_sku_arr = skuList.sku_mu_list[id]; + + let h = {}; + sku_val = sku_val || 1; + if (sku_val > cur_sku_arr.canBuyNum) { + h.sku_val = cur_sku_arr.canBuyNum; + wx.showToast({ + title: `最多只能购买${cur_sku_arr.canBuyNum}件`, + icon: 'none' + }) + } + + that.setData({ + cur_sku_arr, + sku, + ...h + }); + }, + + /** + * 数量加减 + */ + setNum: function (event) { + let types = event.currentTarget.dataset.type; + var that = this; + var num = 1; + let sku_val = this.data.sku_val * 1; + if (types == 'add') { + num = sku_val + 1; + } else if (types == 'decrease') { + if (sku_val > 1) { + num = sku_val - 1; + } + } + + let arr = that.data.sku; + var options = this.data.skuList; + + if (arr.length > 0) { + var id = ''; + for (let i = 0; i < arr.length; i++) { + if (i == arr.length - 1) { + id = id + arr[i]['id']; + } else { + id = id + arr[i]['id'] + "_"; + } + } + } + + if (options.length > 0) { + let cur_sku_arr = options.sku_mu_list[id]; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } else { + let cur_sku_arr = this.data.cur_sku_arr; + if (num > cur_sku_arr['canBuyNum']) { + num = num - 1; + } + } + + this.setData({ + sku_val: num + }) + }, + + skuConfirm: function () { + this.closeSku(), (0, status.cartNum)().then((res) => { + res.code == 0 && that.setData({ + cartNum: res.data + }) + }); + }, + + goOrder: function() { + var that = this; + if (that.data.can_car) { + that.data.can_car = false; + } + var token = wx.getStorageSync('token'); + var community = wx.getStorageSync('community'); + + var goods_id = that.data.addCar_goodsid; + var community_id = community.communityId; + var quantity = that.data.sku_val; + + var cur_sku_arr = that.data.cur_sku_arr; + + var sku_str = ''; + var is_just_addcar = 1; + + if (cur_sku_arr && cur_sku_arr.option_item_ids) { + sku_str = cur_sku_arr.option_item_ids; + } + + let data = { + goods_id, + community_id, + quantity, + sku_str, + buy_type: 'dan', + pin_id: 0, + is_just_addcar + } + util.addCart(data).then(res=>{ + if(res.showVipModal==1) { + let { pop_vipmember_buyimage } = res.data; + wx.hideLoading(); + that.setData({ pop_vipmember_buyimage, showVipModal: true, visible: false }) + } else { + if (res.data.code == 3 || res.data.code == 7) { + wx.showToast({ + title: res.data.msg, + icon: 'none', + duration: 2000 + }) + } else if (res.data.code == 4) { + wx.hideLoading(); + that.setData({ needAuth: true, showAuthModal: true, visible: false }) + } else if (res.data.code == 6) { + let max_quantity = res.data.max_quantity || ''; + (max_quantity > 0) && that.setData({ sku_val: max_quantity }) + var msg = res.data.msg; + wx.showToast({ + title: msg, + icon: 'none', + duration: 2000 + }) + } else { + if (is_just_addcar == 1) { + that.closeSku(); + (0, status.cartNum)(res.data.total); + that.setData({ cartNum: res.data.total }) + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + } else { + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/buy/index?type=' + that.data.order.buy_type + }) + } else { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/buy/index?type=' + that.data.order.buy_type + }) + } + } + + } + } + }).catch(res=>{ + app.util.message(res||'请求失败', '', 'error'); + }) + }, + + vipModal: function (t) { + this.setData(t.detail) + }, + + // 输入框获得焦点 + handleFocus: function () { + this.focusFlag = true; + }, + + handleBlur: function (t) { + let a = t.detail; + let val = parseInt(a.value); + if (val == '' || isNaN(val)) { + this.setData({ + sku_val: 1 + }) + } + }, + + // 监控输入框变化 + changeNumber: function (t) { + let { + cur_sku_arr, + sku_val + } = this.data; + let max = cur_sku_arr.stock * 1; + let a = t.detail; + this.focusFlag = false; + if (a) { + let val = parseInt(a.value); + val = val < 1 ? 1 : val; + if (val > max) { + wx.showToast({ + title: `最多只能购买${max}件`, + icon: 'none' + }) + sku_val = max; + } else { + sku_val = val; + } + } + this.setData({ + sku_val + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + }, + + onShareTimeline: function(res) { + + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/generalmall/index.json b/eaterplanet_ecommerce/moduleB/generalmall/index.json new file mode 100644 index 0000000..d316cce --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/generalmall/index.json @@ -0,0 +1,19 @@ +{ + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-tabs": "../../components/tabs/index", + "i-img": "../../components/img/index", + "i-rush-spu-big": "../../components/rush-spu-big/index", + "i-sku": "../../components/sku/index", + "i-load-more": "../../components/load-more/index", + "i-new-rush-spu": "../../components/new-rush-spu/index", + "i-new-auth": "../../components/new-auth/index", + "i-rush-spu": "../../components/rush-spu-col/index", + "i-vip-price": "../../components/vipPrice/vipPrice", + "i-vip-modal": "../../components/vipModal/index", + "i-tabbar": "../../components/tabbar/index", + "i-tworow": "../../components/tworow/index", + "skeleton": "../../components/skeleton/skeleton" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/generalmall/index.wxml b/eaterplanet_ecommerce/moduleB/generalmall/index.wxml new file mode 100644 index 0000000..2648335 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/generalmall/index.wxml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + {{item.navname}} + + + +
+
+ + + + + + + + + + + + + + + + + + 仅剩 + {{countDownMap[item.end_time].day}}天 + {{countDownMap[item.end_time].hour}}: + {{countDownMap[item.end_time].minute}}: + {{countDownMap[item.end_time].second}} + + + + + + + + + + 仅剩 + {{countDownMap[item.end_time].day}}天 + {{countDownMap[item.end_time].hour}}: + {{countDownMap[item.end_time].minute}}: + {{countDownMap[item.end_time].second}} + + + + + + + + + + + + + + + + + + + + + + + + 暂时没有商品 + 我们正在为您准备更优惠的商品 + + + + + +
+ + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/generalmall/index.wxss b/eaterplanet_ecommerce/moduleB/generalmall/index.wxss new file mode 100644 index 0000000..a62231f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/generalmall/index.wxss @@ -0,0 +1,8 @@ +@import "/eaterplanet_ecommerce/pages/index/index.wxss"; + +.rush-list-title { + width: 336rpx; + height: 88rpx; + display: block; + margin: 20rpx auto; +} diff --git a/eaterplanet_ecommerce/moduleB/images/authority.png b/eaterplanet_ecommerce/moduleB/images/authority.png new file mode 100644 index 0000000000000000000000000000000000000000..cf733b98b0eaf0aa4f340d43f2ef728e3d8a63f0 GIT binary patch literal 2320 zcmaJ@doExPAA#%wWMNwEX`i(+rCf8!J^~3zSkcgP(@-jskif z+3_3%B7;~Tqs_AG2sXOSeEpc6bwxUzy5>5}8X4tqq*5t|!yy(^>zcdhU)hgJsO%BW z7p{Q#q-A~cy@+!&&alTs=-Xd2`|OtoJlnuH~xrG2(w(>RU2|M=zuceefC6+xqG z22Y?}O;YJc<5cn5R;i)djqUd4&`7&PwOod2Z}2tsk_U=jy2_97eEqt!SNoKO9;Ejj zR~^;=Hc)|md9x$WTzTr97PSu4d2rIDPcD46oHLr26#gZNlC~LRkT1?o-aF^z3iDLC z_AbXmwZ!{K0NKsBT5BA?C6|(xN=c*)mTHh!RR|mej)M@Vz(-Tyi+Ykf7_ChRv5Ta= zXaQCN_u>IH20Xe1DQ$isL=(Ivc!>y2kn8YlQz6K85!Y3}C3@@Zm7<0AqH%zJSegs%ZW zH1+oKzKTe4GKdfnd2SuNGN|Fu*gV{}XryA-e$xbuSn(e(z3KT?;y>0f0==lq*i_mn z7NfYJb!(?kcdn{-4n6VX=J#wFRuM%AAN@GM+~} z^Y~Xh$OUJ5H zkWfGX{nke0kX(3!?9(#9A=NS<=cnzaxYBbt>U*)aF1OXbRr4qg1T>_@#zNX61|UYK=}zeD`> zDV3`lhCqn4pgC6`w4nFOK8>dktW5#6zrAgK{E~NedbfREhvf?inm?JMQT_+>aSyKN z&FOBb|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AuG zJ}a!HGzMW-Ov!U^a|c@Dfi|OOPmZAdX{DJ?!ceWg?sTBck$Hu3<G2reS{pAmv zDhGs7UG2@SgI9;YuKO=B{@R!<3VupH-tcPbu-Mn}eQ~2JybllrVq$1+P_E}1`#*4B B(=Px3 literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/icon-video-started.gif b/eaterplanet_ecommerce/moduleB/images/icon-video-started.gif new file mode 100644 index 0000000000000000000000000000000000000000..56fc44c221f6693e5ddeccd0f6117278c9bc38dd GIT binary patch literal 2252 zcmaKsdsq`!7QllPt(8^~R;VbB;UNVk$qac-FeoI1$2N$8f`HZ?CKHH|Oh^V35UFla z5frU25C!a_V9TS}@+b=kRjccY>jGj?KvqOW0b3X8qN41ChwJvs*ZarJz2}~De&^hK z&J75X@DbFR=1kjeMw^_R93359F}WbbKRit28|n`;SmtIl8jTXImxcmjltiijs?`P! ziY4GA5R1nt)k6Bu4b5~wDHqZsIZ~EXBf{gAfvH+NEHxw?OHIHKIeoPcu*x7Xs5B~^ zL;-^;QLPgggmhF+#Nq;KZWJ@=z?2G^Af)>mHvl73L}+nqr^?zc5T{>%vnsI8%n}h-58>Q|eB$#?;yUKFFv@MI%_N zRZ^FNCW;9xS%s^~AhD26?J(p@xqyq~Tm{TgfE)#z1+uwZ4v4~Ri2Cpmjsk`u1Vd*1 zn6hX2@g-sr!efcqeh}o(^F@3ie-Vq%MZ_XsJ{O*~4N~h!RE^=YY$e5>vE}}*tw5y3 zQIgPx6GY-{6@XjeITnllY15}0H^f9ot&fcOBs@&EE_7{(^y5DU2L%R5{KXagTPd%MMdu(eraZME=&_bnH^ zH~-yvb1mL6pF=%BE1thI|2>)+&69eIsHe)AMw=tI%(1^ZGI=ng8a`H@Gd|o*I)1;0 z7L|2IQ5i8L)3heD*?qZR^HL@|EC^9F#Pz<(@^)~$@^Vc<`9-2w9)z0&%l7X7>gveC;uF=kv%kAzJwBNmo7-3?6hn;BMxKiK=y zv(Mib1*LI|KNu|63uO)w_BYF}xt7M3bVa#*zB{hQqmjGVBq{tiq-I(_KYc)1c)GN5 zqen?adAr+!?o&^+td{J%id}sd*S7{8Fe?eWmEp5z-Q((`)xmYQ8MQB(?zCV}84eFh zn(*Y~+ZZN6*bHb+b;O4imqKG+8|=C=ZKLwtusK8R=MK3$C2i|5oV>T~)gg;bqQ(34 z!%MTPaCpELC0mc(2$hBw<&1D_#y-B_uqQIn^|SWAa;ea-_U=m0Uc6|iP5ZjOCo;k$ zH~#Ge%^URv26|?uV@h7pDXr4Grlsss)rxLTdH~WqI+lJOu=ZQ!b5J-?Ri8GuKr$%V z+>Y<)j*U#I2r2GojAbuN>NHav8<8}xO-S`t?Z5D}>}BIOxtAZx<{83F!qwAoyS&4f zVn+AXtGl9#Y(ku(3Z?VUSPlg%PqeUO`y`bQC+;0j%2*vf7`nlF=gIp?4~K!`C4*j8 zjf&F|jH8bqMKniOWe)e|bfV90CoZbH6_?s0++8=2{HoeA@4;n#T;1-U?8Zy%P3OP) zt^Ao?C*nGHZd$a(NtRmrh1#P#1k|)@ElcYPa~t|>f)af@tn2{E;ox^|9*Mcj*WQt3 z)kN&L;;Hu--rR&%t($Nuy5>$s^(q>&lE!`xa$kvQJA7&hf}U7wEB^T-H-lDN6Hve#G^>m35xz#et@PHXFHnK|6XQ x|03h8G^EpD5%*(ElHJ9E)Q)KP?unf__pk2-)w~7{ literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/invite-btn.png b/eaterplanet_ecommerce/moduleB/images/invite-btn.png new file mode 100644 index 0000000000000000000000000000000000000000..eb2e94f522b009e93338aa2062e01b3b0641cf6a GIT binary patch literal 6608 zcmV;>887CEP)MQ-gXWD)IZ*K4fL=r|I$C+b`Af`I{(;0|Jg&{b`Ag0KHhc>{IDtBb`Af& zG5^{_-gXWD*FpcvIsef;|I|SL)MQ-gXV@iWc#j9{DF3%C z|Hd}|v@7n77wU!+`ko&6n;hhT5#xOi^_Cj)lNtM_B15*Cwg3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bogbc3ob_v||df@;AQIL|*Skc0*fTU#&{z_2>TqcmV(n literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/live_end.png b/eaterplanet_ecommerce/moduleB/images/live_end.png new file mode 100644 index 0000000000000000000000000000000000000000..e11d2bb1546e630571a281d946be1237597bf2c7 GIT binary patch literal 2001 zcmc(g`#%$k8^?vYk7(|5*|1V_38A58vn-1daxI|{i`=P>!r0Eq%q?<>v5;JnTe&5& zA+xoN(@0^iO{p)^A&&D`e4p3rdETGr^V8?I4+-aV7AU1AB_t#S#5kZ__c{3AN{H;= zqV!93`)I;p-R$?-_J5kay}hZasmaO7#l^+#?QI5w@$%(ME|B` zXNQJ{`uqFW*VkDr)~i>qxOd$D3x6cW)#-xJFTnb2oce0sQAyAkZIMN`v(oA4ZcI&b zmlfgl4;N?P1HBy2)h8@QI{bX%*-c32yTB8LiQni*!|C%8PE{L> zlT!X!+d-5PS(m~Yw;WYd2AUdPjo}vGk#(_r`o*<%DxKg;MCa=>8_tBH+A&-Sn9{kc z=Y?x~$I#0H{d}fYg#xl{SeGHJC?AMns{1~A8TWQn z1_1CX9NC&Pzm@KXZagv8vQgpRp{3kDXngK=IdnwbxWS})Dn(vJ1(5e%AZ6goJW_B? z92--Vml|{;tMu5z%1R(wOqoR+3ekkuOFLc*A7xxFRrS;MKbckf^ll5&Yf38v9nBf| zY|G-XryG06#F=+4-qokJO8>NZHot-KVhab>-*s#1U}v>r-f0we>ge?V77WTj4spdp zO=Q~7j}>A!mi^=>)q~22OBy*F#TMM0m}wPrld9$&Z);C@Uv+ePO(vwANm_EU*K*RM1EP1P2IdG-&|Bm(Fj8`Y%9}kgJpD4 zKmtSOCeBe-gL1N^t6uYR4uAgFG7$aY#KeQvJLJ8@={{QMqt^KRH@9*Wv4fXVw%N}} za^e2CJ&s&@r>v7+AkVa&Dli{ilL{1AJx;>4`7%_;9aY{}jsf%PXR*grqI2UMvjH{|&_3l}%jF4}2j7;J-L1k;Af#Lu3XLJ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0zK~gt70JvLh<;f0%SEULEh=CsV+ZgJ14InmjkjBxuX)3~zci|X<7Tc0y$V>_aI@bT8EkNvm=i`AT)#0Tmu zuuQSHN`PTx*(jo>h!X>SJD(;aALQ({sK<2{wSfIcDrNDbQGE&(mcge2$^bZS!1!$C zj;=+>!<8>=NI4s(+O*&f;^Wd|aE&j)-75CSa=oKxA0r z^nrYP^_(3U`HhbOypRU>#&a+ZA|PUiG&Sg%=8+!$MG~#te~$Nj`WvqC6oaUQ9zpt8=i>u2YZOr zv#-+m=r8O;doqEsT+}^NytpBxTz*kil{_!eKBPMT&uqLE=k^>ElRWaWxWUmn1}*D+DnbC zI>Dd!s;jwXAf?}m8@|AxiyR8F)f_>@7$O?#&{(f_bG>aWHbxmYjcYw>j?2NZ^vPNyLP6EL7Xu|Ghaf+azI z!3_87_s_Ri5O{Bp5TAd(e|Pp5kG9ai9RIV~@xF!Oi(w!kS- znYzN8UoFb-OiTIDe|){hx~ZDYj7769M8ApHYbTYU)pFc1oc)039Bu}Sxpoa4x2E{D zRy;bih{s{Z?JHva{9!wtgI4ZKEr?nFFj{(*xx}SwQZK5ak8#XvVpDx)V!`t;wKGyu zAxJN@&qp%Mit9DIZ`YT;Q^zA*BnnnvDsEr%e2u^dr~P>X9J3-XpP4Ib-}pHF{)1z& zrwkukK5%e}TB#HmF;VH^I-Z-$Zk&x(eB)Xd^U+hxTB|uyNOrGooSDV0cULbhou511 kxM^|eL61ux_kU(u*KYYv^!15fKwmR>y85}Sb4q9e0G*$`H2?qr literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/location-green.png b/eaterplanet_ecommerce/moduleB/images/location-green.png new file mode 100644 index 0000000000000000000000000000000000000000..d1a314328be5330b826036a953a1e2de99d51cb4 GIT binary patch literal 919 zcmV;I18Dq-P)^dg0FxsoVBQk8~=ep8Fz}J%)wk*tb%3O=hnHz41b(qePjl3 zgN{B5w+XPCz!Gx+0iFtRRvLmohB-8nqZaAUa8B>~NVwFVlde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H4w-J$q3jCq~Na6bcS}L=+;~9`?!dTy^5|I19E368k0CSm{xv%UBBvd8P`?4#z pPejTWP$g+(fcZ37l$Zqv_yYhqAuz2#4_5#H002ovPDHLkV1niPmx=%Y literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/new.png b/eaterplanet_ecommerce/moduleB/images/new.png new file mode 100644 index 0000000000000000000000000000000000000000..e7c53da3421743883991df1bd5f4767e3371ad4d GIT binary patch literal 1002 zcmVVf>}tKp6;q&zp8$<1owE}R#E-5UwI}{Y3VVNNBUbtqV#<+ z3}=hWdzgf5viXl%<(R0PLU6pveh>pPxoEz>wZPUrYXOWNe|01xFCk(hz4t>#Bwwuq zvJ$|k9&`nGd2gpn53mzX&Bd}$cK~Rf<9+`%McNPJJhdWZ|LM$}eQEO!fKkowi^%Ci zI(N2~fhYkO*ZmG4ueag+vrV3dQ`5^qxj$^ddERf^b)H&hl00{XnKLk|`H_e`+XVoS zQ8+WtZEfg}T}JN$bSzi^<61C);HRBLpCiC!IE#-{0CoQwkgsd=@89XN$q8=C?)U zXIIx?X%@-j0;mn+;PW|ED2h&jFS7cyZ517%Fv!aNb)3~9=KJNR2yk3lHH~+>&?Px^J zndvJ)kd5Zdkmg%n{8tJzEsW#C zjPAAo9l{o4|Iv*Zd^`w-TInRuH1Z6nEk19-AHV<04DDKB%%=dd0ptLb5N4f`uaVK- zjX5cHfi;>I;T0g&qRi%#HQ`10-gGhm6W5Zq4K-g$MXoX(=vW;nT)hP7l4upy)IeYF zepXF)y4QSC|%RgknxoD}ci9#9UgG>lTA z@F%;P2QGT6mJZj$UP9L;l5@tUrQK8lpf9;VY_SlEZF&d5wr@q+_swaXbw(Ox=~B8) z0Lz@;O+hw<9ySA<3zN3agJpJe2Fil;d8?gR|MRk{)&A(lbiP#1B9PTxKwNqWyQ<+T zwebC}{*UNnbQMbk-bum%Z%xlt`Z`8S3@ki*eTopr{Z)tEsD((QWH?D8+}=($aauh0 YFQ%MQArGh?X#fBK07*qoM6N<$f*l6e`2YX_ literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/old.png b/eaterplanet_ecommerce/moduleB/images/old.png new file mode 100644 index 0000000000000000000000000000000000000000..21b2d71718c6f23a7ff2486626e2ef9c925755a1 GIT binary patch literal 1734 zcmV;%208hOP)bwn@nI0yXjI^@gYoxshtA+FS>8F0WmgF|E4{6af>6)Z=zJF?wABc@Ux&VoJZGI)R0T2R^)Va(rT! z=*0`hXYNazJAaHQ)k&6v3#!bF`O&XV^0B?ra|`|&Jlyycjc=@+T$eA&e9n3H%#?io z{Cwy^DT82KLx2IEwA0Cj!lPqT>flm2`fn^>z&;?TD`6jS_nTfcC8&Je-64=o;bK}; zszMZ!|HO%u`&2xjpdzl2dSF!R?hoQgRbu`qvU&?DVS~_i{d9l77O?9oxn#jGsFZ@2 zissOSAv`OrE^aZ6r5GvzA_l60VF=3#MhOIjRXcmbU&kopxzS9f)G=mSmeCekxGQK@ z`h*q6#6gg04*Xr#m7F(0Ea4H)Of9y3X{p+KFk@_m>MWgsfSrgLU+%QVA2rF;3tTHI z5DYMt?DTR5>tXZZf`qIO9am z80ixXmj3vFE6YpM?(kDZXZK@HcmB1unMYpGLDd3*TqG0R^F*fqgO5aQi+Fl;9pdN* z%I>{~COf{lhiE3G&K*XmYV(`@T0n>YDDuozM}9Jqa?Zr8lykE^deRBMu>qwBm*?NN zlop|4-XYqJ$@T5YXU>{kOHld4&r&_Rcg*D0 zyez8)P@-8tT%U*MpP><>Sgsy+)2FZ(kL-3hy8+n)vW;%%+-C#X69aSSUm%^U9>NG~ zmt8(fo!*`dr@Zt(l9}^|kY|4IkZCM{T;s=tGyRM2ySWKWJC0IU9f7HhS{= z!7a|>*umQ|gXpiv&>7&79sA`_`uq{HMUt3dM3Vr$S5}th#NsO$s!TMP-w9z*E(H4^ zKfW$M_M}fPwB0MnY9kANx(E+D)^B@KP%b3reNld7dw!7##y8JJd$$t`x7o-tsY! zbGQ)*WWY#Klzk`7wO@EG+P{-Fr+hE6fWq(;wewU;U|QAQe8uhvb#EuQY5#Zew5z8; z7RknTKd$1#NVlLp*DT;)TEL(EM`_Y+p8ERQ!9n51hG$Nvw~s6?s>7*t;&)?9L-%Bh z(CIA1+ualUFxo&?i>jKVS}m8PazM?{Wt@J{E$6A&w;Y=Z?c1AnH$FX`+xGbj#cjVb ztuU^qkWyB-5{E|{&1e>3^q>|fiousAa$7!`%!V%{LOEPdP%`@Hbms0H44-=1Qj?o8 zZ053Sem$PQ>;A5AF19i9V#d(@AP{3RzxBS!q-BO?#bEfnOf z(c>rEBiY;Vf;yMm8$;=DQF6b|$dLTcj?IzOcuFJ=Ic@!~O1EUo^6NX|c4`-10gQxy z=3SA(r-RW;^AU6DPQ%rS6oE>Po6NsG7m6kR6qFZ^V>p%-P45i_r`H!$U_)PzeJP?U zx8Yhk?4Hmqwc!EX52ou$1)>V33$6>o(1{LSpgw`ugH!L(Emm3ecC2UwGiH@q3`h_G zKf`pg`Ejd-`X&GBc02?8ruL|6MqQ^iz^E{Iq51^h2q0PO>8cGs-7c@IT6u77P@x)` z?v(!j5m3>_+;E_leOC`8j-L@QuuP$UJ8>Gg^>P($GOVYHS8p(R7I;tdLhDfK+(7aq zFbvFHPrxe1vQ=Re*b0obzSJyWQ+;A>Md2+F>(S?1z&-Uqe-oMo=ozgU`ht0X-760O zudISt-wD45tgqiIuZiZ{u_n;x^E&WU{nwZtep>(OtChZ<57h^muKIYi2u#+m=YIiS cUXe`Tzu`@b%0fxDzW@LL07*qoM6N<$g1A3WrvLx| literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/play.png b/eaterplanet_ecommerce/moduleB/images/play.png new file mode 100644 index 0000000000000000000000000000000000000000..98c980c4afb8f5789e1a3ee8c2439f4f1681dc76 GIT binary patch literal 1126 zcmV-s1eyDZP) zNFWm5pRR^sn5wR>uBxsY`h&-i>B%JX@#=Ngo2mvnIyyQ!I&!6l$Xs4t&dWnzVnJd_ z#k~4?oO6jYi3^ESi4%!Yuh+XkM4|{%QdUuj>7yAG^+)1JWSt{0K?R8z%2-EpDLN=? zPeh#{5J3b*5Hksf;;x7~f@i!65;2SNa1ZgsOmc`Kqr440Z-PV)Ys?yog4-s{CQAAZ z4>T5}3NVM$9i+ujB<-RhjRYw@<^K*$WDqc$5Mtf9#Hse%7ow**tA1@@HPCUnU>L-c!Xoqj6Hf~i0-GE=7OnHty zX=c?&&GFC}uj{G=-GX11497UsIOHhmG2*doI;a&i_U%J#DC#xh)u+B`j%LcBw&zQpGSmoX+mrg{;Z(1lz(T1?!WN>Y{rUWzSAp$WAf`T#&f__Q-Kp;$lf-f!cz>dT#H0Mlrz;r6- z3^&z6{TIdT|1N}q(1V$bS*7vL(6O)b}|3F$HX3gTGT zO$77Ji?^Rre`xW*Icu=jvs@n25TIVoz#H z@MN;zbQ7@84RvhKa?M}cjeZK@soYB^BE*(VE;w(im(Bjwc9L5%$59K1(vx|+hYbchVOfEqg szbyq%*Q_fiv2RV$(b3V-(UC9z0Ylgo)k8>GdjJ3c07*qoM6N<$f|fG%$^ZZW literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/redbag-bg.png b/eaterplanet_ecommerce/moduleB/images/redbag-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..4672be1d32f8ce7ce286125dc72b6cd41d3b7abc GIT binary patch literal 65241 zcmV)kK%l>gP)+{<&DB3Y9+%PBGFecnFDE;g4-Yp^ia!meoP5=D<{&P<{8|NsC0{{QDB4*qdW|NsB~a!&qoQ2ugG<|PmR|NsC0|Ne7M|Ns9sebE2^|Ne4K z{&G(L|Nl9J)Bpef|NsB~a!&Zi)GKh#`pVlWZOrmuEbTQV|NsC0|Ns2Q<|l2;Cv43A z#_agV+WpDtPpskd!LRyID=}liQ?=yyN-02$*K8j_XB|EA%fD+QL~bEN_}ka{vw3VD zK>zLN{JBd%1|I+H>ZDhE|NsBxAO`(MEBQYr{&G&{BMS98AnGR$=_(HYa5wQY8~Z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bD7A5+6p|t7Pg?o<)fKpRf3}vI zTlUF~1eck_I?cxvg^A|=Gksq(GWxbJEx7GkMvWBjJO;e+f@G2`jQ@UtPK_o&FlJM4 z=GuuafgA&kXHzR>!WvB*&xfA(m`8alIu~POMspg937!$L6rEj*Z@-f~ceyqlbh+v# zWkQx}y4+nc-6T@uzA`sF8@{2gCrG-n(uU&-NN+x~w#MMNSJ2MIp|=|z72aUimiF6* z^oP^;cjoD*HnBt6jkQy@Ls}cu4-e!(wsJWL=M5`wKUf_|jo!U}ItZ@5A5ROlS?;%? z-OfOYLj`FP!HZU8ljq^4Za~ckVV|2R*Ejl!H}zE|u=fv73vT<`CUJQhurNP4DJ98r I2_ygi0n-0(i~s-t literal 0 HcmV?d00001 diff --git a/eaterplanet_ecommerce/moduleB/images/writeoff.png b/eaterplanet_ecommerce/moduleB/images/writeoff.png new file mode 100644 index 0000000000000000000000000000000000000000..2f00d04bdec77edf72c479022490b2650ce6a447 GIT binary patch literal 1121 zcmV-n1fKheP)AoxJwk7nzDfh=L=d&Z#pd9(gE%Lk}^}{Of^Yr-q|JI-yjKNZw$6xNd zCEuzaytzBy>(;N*hUf9*#NMmb=EbYQO`p3(+PN+$S95y+000VfQchC<|NsBglHx!> zJqQMM+W-IquSrBfR9M69nCoJrAQXfbG2J$zDB_*>f6nD_6A?wWKif%SHA%nB;Y^VD z=g+TxjQ-~76+7^7uXmox_(5rTADOuF3SRz~zw+krrGVvkc*p9r#T*<-ynY4}Rx!eY zjSyT)2!a?R6(R7vRRTy5LKq)5f_GLc7g!4!$sKYBWC#ZmYj+SA<}L7Pn8Aiz15Z3; z+>P_F%%ef>ubQ{BDbFfM^@DS5HD9!RLD0wjG)#M&w6>Ad&*-kaWQrEKKqL*0wUSSqy2)4!4WxiDf`bOui^uDLILlGYbtu#b2E<{MebU@D z*CBTm%f6VZr%v-!&AGsJAHoiZljbe1&mt4J=^g{G1L8EuIxTOQvw_F~>$z3LVfQyQ z`M_R|;apo{+fCA_`yNis*mivm5K-y@l}GS5Sc6TM*%T_}#|AvY2taG#yHe)?d#Zu$ zvdT)V`y-cXD*JyGr;*I^?ti{>}r9y z_y%DDYgY~PfRWQEkssO9m`4u@xUJ;|<(-z#Cwivda3(@$Byt>Q`RLSv2p0~qrHHN| z=24qeg1wE4n}vu2ddssjk@C#~H(vOSKz=(sAk#ds2+^@B;4W`cloy;!T955A6V|1A zOU?^UjWX*;Y`Dq*vet2bHgmls?!D#cLH@DiRS%Zn4v0@QVCcU9$bJ8}-gS zJ_T{#wZJM(bj2Urh4%r{e{^iBG%-xkaeOV6y)Ce+@Qt7)PvnA)tAw5;@DS`I@bQmT z-4t4&1o1J?Jg!fii|MX9`KZ5aOGg;oSz? zKnojUfl?b8uiIeTpVtq2@-)~i>!QhnU}s%+GQsZef=zOGI)^fS-%m9J+s@c!L9bNM zG9!f;>q}KHO0Q?aj~+c2ewoX2DsmAjr6tDxB#P1X!x`K?M!qj)k8yOajyyhI-Zjpz nxIX3m^AjFvef?f|{yF*w= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleB/index/auth.json b/eaterplanet_ecommerce/moduleB/index/auth.json new file mode 100644 index 0000000..0bd9096 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/auth.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "平台管理中心", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/index/auth.wxml b/eaterplanet_ecommerce/moduleB/index/auth.wxml new file mode 100644 index 0000000..1838bf1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/auth.wxml @@ -0,0 +1,7 @@ + + + + + 您好,您暂无浏览此页面权限! + + diff --git a/eaterplanet_ecommerce/moduleB/index/auth.wxss b/eaterplanet_ecommerce/moduleB/index/auth.wxss new file mode 100644 index 0000000..fca249c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/auth.wxss @@ -0,0 +1 @@ +/* eaterplanet_ecommerce/moduleB/index/auth.wxss */ diff --git a/eaterplanet_ecommerce/moduleB/index/index.js b/eaterplanet_ecommerce/moduleB/index/index.js new file mode 100644 index 0000000..7baca69 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/index.js @@ -0,0 +1,82 @@ +// eaterplanet_ecommerce/moduleB/index/index.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleB/index/index.json b/eaterplanet_ecommerce/moduleB/index/index.json new file mode 100644 index 0000000..f875122 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/index.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "平台管理中心", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/index/index.wxml b/eaterplanet_ecommerce/moduleB/index/index.wxml new file mode 100644 index 0000000..d834289 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/index.wxml @@ -0,0 +1,9 @@ + + + + + + 核销管理 + + + diff --git a/eaterplanet_ecommerce/moduleB/index/index.wxss b/eaterplanet_ecommerce/moduleB/index/index.wxss new file mode 100644 index 0000000..1b00eb3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/index/index.wxss @@ -0,0 +1,13 @@ +.list { + padding-top: 30rpx; +} + +.list .item { + width: 25%; + margin: 10rpx 0; +} + +.list .item .icon { + width: 120rpx; + height: 120rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/index.js b/eaterplanet_ecommerce/moduleB/invite/index.js new file mode 100644 index 0000000..fd2b377 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/index.js @@ -0,0 +1,243 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + info: '', + list: [], + showSharePopup: true, + needAuth: false, + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + this.getInvitelist(); + }, + + onPullDownRefresh() { + this.getData(); + this.getInvitelist(); + }, + + getData() { + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('invitegift.index', {token}) + .then(res=>{ + wx.stopPullDownRefresh(); + this.setData({ + info: res.data + }, ()=>{ + this.drawImg(res.data); + }); + // this.onRender(res.data); + }) + .catch(err=>{ + wx.stopPullDownRefresh(); + app.util.message(err.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + // if(err.code==1&&err.msg=='未登录') { + // this.setData({ + // needAuth: true, + // showAuthModal: true + // }) + // } + }) + }, + + getInvitelist() { + let token = wx.getStorageSync('token'); + app.util.ProReq('invitegift.getInvitegiftRecord', { token, page:1, type: 'invite'}) + .then(res=>{ + this.setData({ + list: res.data + }); + }) + }, + + goLink: function(event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + checkInvitegift() { + let token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.ProReq('invitegift.checkInvitegift', {token}) + .then(res=>{ + wx.hideLoading(); + this.setData({ showSharePopup: false }) + }).catch(err=>{ + wx.hideLoading(); + wx.showModal({ + content: err.msg, + showCancel: false + }) + }) + }, + + hide_share_handler: function () { + this.setData({ + showSharePopup: !this.data.showSharePopup + }) + }, + + drawImg: function (info) { + let { + invite_poster_back_type, + invite_poster_back_color, + invite_poster_back_img, + invite_poster_qrcode_img, + invite_poster_qrcode_size, + invite_poster_qrcode_top, + invite_poster_qrcode_left, + invite_poster_qrcode_border_status, + invite_poster_qrcode_corner_type, + invite_poster_qrcode_bordercolor + } = info; + let background = '#FFFFFF'; + let data = []; + if(invite_poster_back_type==0) { + background = invite_poster_back_color; + } else { + let bgImg = { + type: 'image', + url: invite_poster_back_img, + css: { + left: '0px', + top: '0px', + mode: 'widthFix', + width: '750px', + height: '1334px' + } + } + data.push(bgImg); + } + let poster = { + width: '750px', + height: '1334px', + background, + views: [ + ...data, + { + type: 'image', + url: invite_poster_qrcode_img, + mode: 'widthFix', + css: { + left: invite_poster_qrcode_left + 'px', + top: invite_poster_qrcode_top + 'px', + width: invite_poster_qrcode_size + 'px', + height: invite_poster_qrcode_size + 'px', + radius: invite_poster_qrcode_corner_type==0?'10px':'0px', + border: invite_poster_qrcode_border_status==1?`1px solid ${invite_poster_qrcode_bordercolor}`:'none' + } + } + ] + }; + console.log(poster); + this.setData({ + template: poster + }); + }, + + onImgOK(e) { + this.imagePath = e.detail.path; + this.setData({ + image: this.imagePath + }) + }, + + saveImage() { + let that = this; + wx.saveImageToPhotosAlbum({ + filePath: this.imagePath, + success(res) { + that.setData({ showShareModal: false }) + wx.showToast({ + title: '保存成功!' + }) + }, + fail(res) { + wx.showToast({ + title: '保存失败,请重试!', + icon: 'none' + }) + } + }); + }, + + handleShareModal: function () { + this.setData({ + showSharePopup: true, + showShareModal: !this.data.showShareModal + }) + }, + + handleTipModal(e) { + var type = e.currentTarget.dataset.type; + let tip = { + wait: '被邀请人的订单在售后期内,需要等待售后期结束才能获得活动奖励', + invalid: '被邀请人的订单在售后期内发生退款,需要被邀请人重新下单才可获得奖励', + }; + wx.showModal({ + title: '提示', + content: tip[type], + showCancel: false + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function (options) { + let { invite_share_title, invite_share_img, suid, invite_order_share_title, invite_order_share_img } = this.data.info; + var community = wx.getStorageSync('community'); + var community_id = community.communityId; + let title = invite_share_title; + let imageUrl = invite_share_img; + let path = "eaterplanet_ecommerce/moduleB/invite/share?community_id=" + community_id + '&share_id=' + suid; + if( options && options.target && options.target.dataset.name == 'invite' ){ + path = "eaterplanet_ecommerce/pages/index/index?community_id=" + community_id + '&share_id=' + suid; + title = invite_order_share_title; + imageUrl = invite_order_share_img; + } + return { + title, + path, + imageUrl, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleB/invite/index.json b/eaterplanet_ecommerce/moduleB/invite/index.json new file mode 100644 index 0000000..d381d2c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/index.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "邀请有礼", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-empty": "../../components/empty/index", + "i-painter": "../../components/painter/painter", + "i-modal": "../../components/modal/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/index.wxml b/eaterplanet_ecommerce/moduleB/invite/index.wxml new file mode 100644 index 0000000..4f61839 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/index.wxml @@ -0,0 +1,121 @@ + + + + + + + 我的邀请战绩 + + + + 邀请成功 + + + + {{info.income.invitee_succ_count}}人 + + + + + 累计邀请 + + + + {{info.income.invitee_count}}人 + + + + + 累计奖励 + + + + {{info.income.inviter_total_count}}次 + + + + + + 立即邀请 + + + + + + 我邀请的好友 + + + + + + + + {{item.nickname}} + + {{item.addtime}} + {{item.receive_content}} + + + + + {{item.reward_content}} + + + + + + 查看更多 + + + 还没邀请到好友,快去邀请把! + + + + + + 活动规则 + + + + + + + + + + + + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/invite/index.wxss b/eaterplanet_ecommerce/moduleB/invite/index.wxss new file mode 100644 index 0000000..26dfb89 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/index.wxss @@ -0,0 +1,138 @@ +page { + background: linear-gradient(90deg, #ff5734, #ff854f); +} + +.box { + position: relative; + background: #FFFFFF; + width: 706rpx; + border-radius: 20rpx; + margin: 0 auto; + box-sizing: border-box; +} + +.actColor { + color: #ff6139; +} + +.actBg { + background: #ff6139; +} + +.tag { + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} + +.btn { + position: relative; + width: 637rpx; + height: 97rpx; + line-height: 92rpx; + margin: 20rpx auto 15rpx; +} + +.btn-bg { + width: 100%; + position: absolute; + left: 0; + top: 0; + z-index: 0; +} + +.btn .title { + position: relative; + z-index: 1; + color: #FFFFFF; + font-size: 34rpx; +} + +.invite-num { + font-size: 60rpx; +} + +/*分享begin*/ + +.ui-mask { + position: fixed; + display: block; + top: 0; + left: 0; + width: 100%; + height: 100%; + z-index: 999; + background: rgba(0, 0, 0, 0.6); +} + +.model-services { + width: 100%; + position: fixed; + background-color: #fff; + bottom: 0; + z-index: 1000; + color: #333; + transition: all 0.3s; + transform: translate(0, 100%); +} + +.model-services.show { + transform: translate(0); +} + +.model-services .model-services-title { + font-size: 36rpx; + text-align: center; + height: 80rpx; + line-height: 80rpx; + border-bottom: 1px solid #f2f5f8; +} + +.model-services .model-services-content { + padding: 40rpx; +} + +.model-services .model-services-content .service-item { + margin-bottom: 20rpx; + width: 50%; + float: left; + text-align: center; +} + +.model-services .model-services-content .service-icon { + font-size: 80rpx; + color: #50b674; +} + +.service-name { + padding-left: 10rpx; +} + +.none_btn { + border: none; + line-height: 1.1; + padding: 0px; + font-size: 26rpx; +} + +button[plain] { + border: none; +} + +.shareModal-box { + background: transparent!important; + left: 115rpx!important; + right: 115rpx!important; + bottom: initial!important; + top: 50%; + transform: translateY(-50%)!important; + width: 520rpx!important; +} + +.shareModal { + width: 520rpx; +} + +.shareBtn { + line-height: 84rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/record.js b/eaterplanet_ecommerce/moduleB/invite/record.js new file mode 100644 index 0000000..b972059 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/record.js @@ -0,0 +1,157 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + tab_index: 0, + list: [], + info: '' + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let type = options.type || 0; + this.getData(); + this.setData({ + tab_index: type + },()=>{ + this.getList(); + }) + }, + listPage: 1, + + tabchange: function (e) { + var index = e.currentTarget.dataset.index; + this.listPage = 1; + this.setData({ + list: [], + tab_index: index, + noMore: false, + noData: false + },()=>{ + this.getList(); + }) + }, + + getList() { + let _this = this; + let token = wx.getStorageSync('token'); + let type = ['invite', 'success']; + let data = { + token, + type: type[this.data.tab_index], + page: _this.listPage + }; + wx.showLoading(); + app.util.ProReq('invitegift.getInvitegiftRecord', data) + .then(res => { + _this.listLoading = false; + wx.stopPullDownRefresh(); + let h = {}; + if (_this.listPage == 1) { + h.list = res.data; + res.data.length==0?(h.noData=true):''; + } else { + h.list = [..._this.data.list, ...res.data]; + } + if (res.data.length > 0) { + _this.listPage += 1; + } else { + _this.listPage = 0; + } + if(res.data.length < 10) { + h.noMore = true; + } + this.setData(h); + wx.hideLoading(); + }) + .catch(err => { + wx.hideLoading(); + let h = {}; + _this.listPage==1?(h.noData=true):''; + this.setData({ + listLoading: false, + noMore: true, + ...h, + }) + wx.stopPullDownRefresh(); + }); + }, + + getData() { + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('invitegift.index', {token}) + .then(res=>{ + this.setData({ + info: res.data + }); + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + handleTipModal(e) { + var type = e.currentTarget.dataset.type; + let tip = { + wait: '被邀请人的订单在售后期内,需要等待售后期结束才能获得活动奖励', + invalid: '被邀请人的订单在售后期内发生退款,需要被邀请人重新下单才可获得奖励', + }; + wx.showModal({ + title: '提示', + content: tip[type], + showCancel: false + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + (this.data.noMore&&this.listPage!=1) || this.getList(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let { invite_order_share_title, invite_order_share_img } = this.data.info; + let suid = wx.getStorageSync('member_id') || ''; + var community = wx.getStorageSync('community') || ''; + var community_id = community&&community.communityId; + return { + title: invite_order_share_title, + path: "eaterplanet_ecommerce/pages/index/index?community_id=" + community_id + '&share_id=' + suid, + imageUrl: invite_order_share_img, + success: function() {}, + fail: function() {} + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleB/invite/record.json b/eaterplanet_ecommerce/moduleB/invite/record.json new file mode 100644 index 0000000..847a4c9 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/record.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "邀请记录", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/record.wxml b/eaterplanet_ecommerce/moduleB/invite/record.wxml new file mode 100644 index 0000000..de0baa0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/record.wxml @@ -0,0 +1,45 @@ + + + + + + + + + 已邀请好友 + + + 邀请成功好友 + + + + + + + + + 暂无记录~ + + + + + + + {{item.nickname}} + + {{item.addtime}} + {{item.receive_content}} + + + + + {{item.reward_content}} + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/record.wxss b/eaterplanet_ecommerce/moduleB/invite/record.wxss new file mode 100644 index 0000000..f505def --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/record.wxss @@ -0,0 +1,8 @@ +@charset "UTF-8"; +@import "./reward.wxss"; + +.tag { + width: 32rpx; + height: 32rpx; + margin-right: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/reward.js b/eaterplanet_ecommerce/moduleB/invite/reward.js new file mode 100644 index 0000000..4572382 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/reward.js @@ -0,0 +1,142 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + total_points: 0, + tab_index: 1 + }, + listPage: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.goodsList(); + this.getScore(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + tabchange: function (e) { + var index = e.currentTarget.dataset.index; + this.listPage = 1; + this.setData({ + list: [], + tab_index: index + }) + console.log(index) + if(index==1) { + this.goodsList(); + } else { + this.getScore(); + } + }, + + goodsList() { + let _this = this; + let token = wx.getStorageSync('token'); + let data = { + token, + page: _this.listPage + }; + wx.showLoading(); + app.util.ProReq('invitegift.getInvitegiftCouponList', data) + .then(res => { + _this.listLoading = false; + wx.stopPullDownRefresh(); + let h = {}; + if (_this.listPage == 1) { + h.list = res.data; + res.data.length==0?(h.noData=true):''; + } else { + h.list = [..._this.data.list, ...res.data]; + } + if (res.data.length > 0) { + _this.listPage += 1; + } else { + _this.listPage = 0; + } + if(res.data.length < 10) { + h.noMore = true; + } + this.setData(h); + wx.hideLoading(); + }) + .catch(err => { + wx.hideLoading(); + let h = {}; + _this.listPage==1?(h.noData=true):''; + this.setData({ + listLoading: false, + noMore: true, + ...h, + }) + wx.stopPullDownRefresh(); + }); + }, + + getScore() { + let token = wx.getStorageSync('token'); + app.util.ProReq('invitegift.getInvitegiftPoints', {token}) + .then(res=>{ + this.setData({ + total_points: res.data.total_points + }) + }) + }, + + goLink: function(event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/reward.json b/eaterplanet_ecommerce/moduleB/invite/reward.json new file mode 100644 index 0000000..4d68ea7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/reward.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "邀请奖励", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-empty": "../../components/empty/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/reward.wxml b/eaterplanet_ecommerce/moduleB/invite/reward.wxml new file mode 100644 index 0000000..03d3ada --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/reward.wxml @@ -0,0 +1,71 @@ + + + + + + + + + 优惠券 + + + 积分 + + + + + + + + + + + + + {{item.credit}} + + {{item.limit_money >0.01 ?'满'+item.limit_money+'元可用':'不限制'}} + + + {{item.tag}} + {{item.voucher_title}} + 使用范围:所有商品 + 使用范围:指定商品 + 使用范围:指定分类 + + + 去使用 + + + + + + 领取 + + + + + + 邀新奖励 + 有效期:{{item.begin_time}}~{{item.end_time}} + + + 暂无记录~ + + + + + 当前活动获得积分 + + 积分明细 + + + + + {{total_points}} + 积分 + + + diff --git a/eaterplanet_ecommerce/moduleB/invite/reward.wxss b/eaterplanet_ecommerce/moduleB/invite/reward.wxss new file mode 100644 index 0000000..e44aa21 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/reward.wxss @@ -0,0 +1,332 @@ +.tabs { + box-sizing: border-box; + position: relative; + overflow: hidden; + zoom: 1; + color: #666; +} + +.tabs:after, .tabs:before { + content: " "; + display: table; +} + +.tabs:after { + clear: both; + visibility: hidden; + font-size: 0; + height: 0; +} + +.tabs-bar { + outline: none; + width: 100%; + background-color: #fff; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10; +} + +.tabs-link-bar { + z-index: 1; + position: absolute; + left: 0; + bottom: 2rpx; + box-sizing: border-box; + height: 2rpx; + background-color: #ff5777; + transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transform-origin: 0 0; +} + +.tabs-bar { + border-bottom: 1px solid #d9d9d9; + box-sizing: border-box; +} + +.tabs-nav--container { + overflow: hidden; + font-size: 14rpx; + line-height: 1.5; + box-sizing: border-box; + position: relative; + white-space: nowrap; + margin-bottom: -1px; + zoom: 1; +} + +.tabs-nav--container:after, .tabs-nav--container:before { + content: " "; + display: table; +} + +.tabs-nav--container:after { + clear: both; + visibility: hidden; + font-size: 0; + height: 0; +} + +.tabs-tab-btn-disabled { + cursor: not-allowed; +} + +.tabs-tab-btn-disabled, .tabs-tab-btn-disabled:hover { + color: #ccc; +} + +.tabs-nav--wrap { + overflow: hidden; + margin-bottom: -1rpx; +} + +.tabs-nav { + display: flex; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding-left: 0; + transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1); + position: relative; + margin: 0; + list-style: none; +} + +.tabs-nav:after, .tabs-nav:before { + display: table; + content: " "; +} + +.tabs-nav:after { + clear: both; +} + +.tabs-nav .tabs-tab-disabled { + pointer-events: none; + cursor: default; + color: #ccc; +} + +.tabs-nav .tabs-tab { + flex: 1; + display: block; + height: 90rpx; + line-height: 90rpx; + margin: 0 12rpx; + box-sizing: border-box; + position: relative; + transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + cursor: pointer; + text-decoration: none; + text-align: center; + font-size: 30rpx; + color: #333; +} + +.tabs-nav .tabs-tab:active { + color: #f13e3a; +} + +.tabs-nav .tabs-tab .anticon { + width: 14rpx; + height: 14rpx; + margin-right: 8rpx; +} + +.tabs-nav .tabs-tab-active { + color: #ff4936; + border-bottom: 6rpx solid #ff4936; +} + +.tabs.tabs-card>.tabs-bar .tabs-link-bar { + visibility: hidden; +} + +.tabs.tabs-card>.tabs-bar .tabs-tab { + margin: 0; + border: 1px solid #d9d9d9; + border-bottom: 0; + border-radius: 6rpx 6rpx 0 0; + transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + background: #f9f9f9; + margin-right: 2rpx; +} + +.tabs.tabs-card>.tabs-bar .tabs-tab-active { + background: #fff; + transform: translateZ(0); + border-color: #d9d9d9; + color: #f13e3a; +} + +.tabs.tabs-card>.tabs-bar .tabs-nav--wrap { + margin-bottom: 0; +} + +.list { + padding-top: 100rpx; +} + +.score { + font-size: 70rpx; +} +.details { + position: absolute; + right: 30rpx; + top: 10rpx; + color: #ff6139; + line-height: 1; +} + + +.coupon { + background-color: #fefefe; + position: relative; + padding: 0 20rpx; + border-radius: 6rpx; + margin-top: 24rpx; +} + +.coupon:before, .coupon:after { + content: ''; + position: absolute; + width: 20rpx; + height: 40rpx; + background: #f6f6f6; + top: 70rpx; + z-index: 1; +} + +.coupon:before { + border-radius: 0 40rpx 40rpx 0; + left: 0; +} + +.coupon:after { + border-radius: 40rpx 0 0 40rpx; + right: 0; +} + +.coupon .header { + display: flex; + padding: 15rpx 0; + border-bottom: 2rpx dashed #dbdbdb; + height: 140rpx; +} + +.coupon .footer { + color: #747474; + font-size: 24rpx; + padding: 22rpx 0 20rpx 0; +} + +.coupon .price { + color: #333; + width: 175rpx; + text-align: center; + border-right: 2rpx dashed #dbdbdb; +} + +.coupon .price .reduce-price { + color: #000; + font-size: 38rpx; + font-weight: bold; + padding-top: 30rpx; +} + +.coupon .price .reduce-price text { + font-size: 24rpx; +} + +.coupon .price .reduce-desc { + font-size: 20rpx; + margin-top: 10rpx; +} + +.coupon .info { + padding-left: 30rpx; + flex: 1; +} + +.coupon .info .reduce-title { + color: #000; + font-size: 28rpx; + font-weight: bold; + padding-top: 20rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.coupon .info .reduce-type { + color: #fff; + font-weight: normal; + font-size: 20rpx; + background: #ec6b5a; + padding: 2rpx 8rpx; + border-radius: 4rpx; +} + +.coupon .status { + width: 130rpx; + text-align: center; +} + +.coupon .status image { + width: 90rpx; + height: 90rpx; + margin-top: 20rpx; +} + +.coupon.used, +.coupon.expired { + background: #fafafa; +} + +.coupon.used .price, +.coupon.expired .price { + color: #949494; +} + +.coupon.used .reduce-price, +.coupon.expired .reduce-price, +.coupon.used .reduce-title, +.coupon.expired .reduce-title { + color: #7a7a7a; +} + +.coupon.used .reduce-type, +.coupon.expired .reduce-type { + background: #eeaea6; +} + +.coupon.used .footer, +.coupon.expired .footer { + color: #b6b6b6; +} + +.reduce-area { + font-size: 24rpx; + color: #666; + margin-top: 10rpx; +} + +.go-shop { + border: 1rpx solid #ec6b5a; + border-radius: 30rpx; + color: #ec6b5a; + font-size: 24rpx; + margin-top: 60rpx; + margin-right: 12rpx; + line-height: 38rpx; +} + +.footer-tag { + font-size: 20rpx; + border-radius: 5rpx; + color: #fff; + padding: 2rpx 5rpx; + text-align: center; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/scoreList.js b/eaterplanet_ecommerce/moduleB/invite/scoreList.js new file mode 100644 index 0000000..5a92d05 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/scoreList.js @@ -0,0 +1,126 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + is_login: true, + list: [], + showData: 1, + loadText: '加载中', + remark: { + goodsbuy: '商品购买送积分', + refundorder: '订单退款增加积分', + system_add: '系统后台增加积分', + system_del: '系统后台减少积分', + orderbuy: '商品购买扣除积分' + } + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + util.check_login() ? this.setData({ is_login: true }) : this.setData({ is_login: false }); + this.getData(); + }, + + getData: function () { + var token = wx.getStorageSync('token'); + let that = this; + wx.showLoading(); + this.setData({ isHideLoadMore: false }) + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'invitegift.getInvitegiftPointsList', + token, + page: that.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let h = {}; + var list = that.data.list; + list = res.data.data && list.concat(res.data.data) || []; + h.showData = res.data.data==null ? 0 : 1; + that.setData({ list, isHideLoadMore: true, ...h }) + } else if (res.data.code == 1) { + if (that.data.list.length == 0 && that.page == 1) that.setData({ showData: 0 }); + that.setData({ isHideLoadMore: true, no_data: 1 }) + return false; + } else if (res.data.code == 2) { + that.setData({ is_login: false }) + } + }, + fail: (error) => { + console.log(error) + wx.showLoading(); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/scoreDetails', + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_data == 1) return false; + this.page += 1; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/invite/scoreList.json b/eaterplanet_ecommerce/moduleB/invite/scoreList.json new file mode 100644 index 0000000..18d17ea --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/scoreList.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "积分明细", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "i-load-more": "../../components/load-more/index", + "i-card": "../../components/card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/scoreList.wxml b/eaterplanet_ecommerce/moduleB/invite/scoreList.wxml new file mode 100644 index 0000000..ac56bf6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/scoreList.wxml @@ -0,0 +1,27 @@ + + + + + + 暂无任何明细记录 + + + + + + + {{item.remark?item.remark:remark[item.type]}} + {{item.in_out=='in'?'+':'-'}}{{item.score}} + + 订单号: {{item.trans_id}} + + {{item.addtime}} + 剩余积分:{{item.after_operate_score}} + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/scoreList.wxss b/eaterplanet_ecommerce/moduleB/invite/scoreList.wxss new file mode 100644 index 0000000..ad2e50b --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/scoreList.wxss @@ -0,0 +1,76 @@ +.score-box { + padding-top: 30rpx; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} + +.list { + padding: 0 20rpx; +} + +.list .listData { + padding: 30rpx; + border-bottom: 0.1rpx solid #eee; +} + +.list .listData:last-child { + border: none; +} + +.list .listData .list-tit { + line-height: 28rpx; + margin-bottom: 24rpx; + display: flex; + justify-content: space-between; +} + +.list .listData .list-tit .tit { + font-size: 30rpx; + color: #444; +} + +.list .listData .list-tit .num { + font-size: 32rpx; + color: #ff5344; + font-weight: bold; +} + +.list .listData .list-tit .num.yue { + color: #666; + font-weight: normal; + font-size: 30rpx; +} + +.list .listData .list-tit .num2 { + color: #999; +} + +.list .listData .list-orderNo { + font-size: 26rpx; + color: #444; + margin-bottom: 16rpx; +} + +.list .listData .list-time { + font-size: 26rpx; + color: #aaa; + line-height: 22rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/invite/share.js b/eaterplanet_ecommerce/moduleB/invite/share.js new file mode 100644 index 0000000..225870f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/share.js @@ -0,0 +1,165 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/compoentCartMixin.js'), require('../../mixin/globalMixin.js')], + data: { + list: [], + topImg: '', + rules: '', + getRules: '', + showRulesPopup: false, + token: '', + can_collect_gift: 0, + coupon_info: '', + point: '', + isCollect: 0, + needAuth: false + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + let share_id = ''; + if (options.scene) { + var value = decodeURIComponent(options.scene); + if (typeof value === 'object') { + //记录推广人uid + if (value.share_id) share_id = value.share_id; + } else { + share_id = value; + } + } + if (options.share_id) share_id = options.share_id; + wx.setStorageSync('share_id', share_id); + + //登錄後返回 + let can_collect_gift = options.can_collect_gift; + let token = wx.getStorageSync('token') || ''; + this.setData({ + token, + can_collect_gift + }) + if(can_collect_gift==1) this.collectInvitegift(); + setTimeout(() => { this.getData() }, 100); + }, + + getData() { + let suid = wx.getStorageSync('share_id'); + let token = wx.getStorageSync('token') || ''; + app.util.ProReq('invitegift.invitegiftIndex', { suid, token }) + .then(res=>{ + let { invite_activity_open_topback_img, invite_activity_rules, invite_activity_use_rules, suid } = res.data; + + this.setData({ + topImg: invite_activity_open_topback_img, + rules: invite_activity_rules, + getRules: invite_activity_use_rules, + }) + }) + .catch(err=>{ + app.util.message(err.msg, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function (res) { + console.log(res) + let can_collect_gift = res.detail.data.is_can_collect_gift; + // if(can_collect_gift==1) this.collectInvitegift(); + this.setData({ + needAuth: false, + can_collect_gift + }, ()=>{ + this.collectInvitegift(); + }) + }, + + authModal: function(){ + if(this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + /** + * 领取礼包 + */ + collectInvitegift() { + let token = wx.getStorageSync('token') || ''; + app.util.ProReq('invitegift.collectInvitegift', {token}) + .then(res=>{ + this.setData({ + coupon_info: res.data.coupon_info, + point: res.data.point, + isCollect: 1 + }) + }) + .catch(err=>{ + this.setData({ can_collect_gift: 0 }) + app.util.message(err.msg, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error'); + }) + }, + + goLink: function(event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + goIndex: function(event) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + }, + + handleRuleModal() { + this.setData({ + showRulesPopup: !this.data.showRulesPopup + }) + }, + + /** + * 立即领取按钮 + */ + getGift() { + // 1.判断登录 + wx.showLoading(); + let that = this; + util.check_login_new().then((res)=>{ + if (res) { + let token = wx.getStorageSync('token') || ''; + this.setData({ token }) + wx.hideLoading(); + } else { + that.setData({ needAuth: true, showAuthModal: true }); + wx.hideLoading(); + } + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/invite/share.json b/eaterplanet_ecommerce/moduleB/invite/share.json new file mode 100644 index 0000000..8da4913 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/share.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "新手福利", + "navigationBarBackgroundColor": "#FFFFFF", + "navigationBarTextStyle": "black", + "enablePullDownRefresh": false, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-modal": "../../components/modal/index", + "i-new-auth": "../../components/new-auth/index", + "parser":"../../components/parser/parser", + "sku": "../../components/sku/index", + "guess-like": "../../components/guess-like/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/invite/share.wxml b/eaterplanet_ecommerce/moduleB/invite/share.wxml new file mode 100644 index 0000000..0e0b8da --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/share.wxml @@ -0,0 +1,89 @@ + + + + + + + + + + + 抱歉!您已是我们的老朋友啦 + 该礼包仅限新加入的用户领取,您也可以通过邀请其他新用户进行参与,获得奖励! + + + + + + 恭喜,已成功领取新人礼包! + + 优惠券 + + + + + {{coupon_info.credit}} + + {{coupon_info.limit_money >0.01 ?'满'+coupon_info.limit_money+'元可用':'不限制'}} + + + {{coupon_info.tag}} + {{coupon_info.voucher_title}} + 使用范围:所有商品 + 使用范围:指定商品 + 使用范围:指定分类 + + + 去使用 + + + + + + 领取 + + + + + 有效期:{{coupon_info.begin_time}}~{{coupon_info.end_time}} + + + + 恭喜您获得 + + {{point}}积分 + + + + + + + + + 领券规则 + + + + + + + + + + + + + 活动规则 + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/invite/share.wxss b/eaterplanet_ecommerce/moduleB/invite/share.wxss new file mode 100644 index 0000000..922acd4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/invite/share.wxss @@ -0,0 +1,179 @@ +.box { + position: relative; + background: #FFFFFF; + width: 706rpx; + border-radius: 20rpx; + margin: 0 auto; + box-sizing: border-box; +} +.rules { + position: absolute; + top: 20rpx; + right: 20rpx; +} +.actColor { + color: #ff6139; +} + +.actBg { + background: #ff6139; +} + +.point { + font-size: 64rpx; +} + +.point-box { + background: linear-gradient(90deg, rgb(255,87,51), rgb(255,132,80)); + padding: 30rpx; + border-radius: 30rpx; + color: rgb(255,230,163); +} + +.line-h { + line-height: 1; +} + +.coupon { + background-color: #fefefe; + position: relative; + padding: 0 20rpx; + border-radius: 6rpx; + margin-top: 24rpx; + box-shadow: 1px 6px 12px #ececec; +} + +.coupon:before, .coupon:after { + content: ''; + position: absolute; + width: 20rpx; + height: 40rpx; + background: #f6f6f6; + top: 70rpx; + z-index: 1; +} + +.coupon:before { + border-radius: 0 40rpx 40rpx 0; + left: 0; +} + +.coupon:after { + border-radius: 40rpx 0 0 40rpx; + right: 0; +} + +.coupon .header { + display: flex; + padding: 15rpx 0; + border-bottom: 2rpx dashed #dbdbdb; + height: 140rpx; +} + +.coupon .footer { + color: #747474; + font-size: 24rpx; + padding: 22rpx 0 20rpx 35rpx; +} + +.coupon .price { + color: #333; + width: 175rpx; + text-align: center; + border-right: 2rpx dashed #dbdbdb; +} + +.coupon .price .reduce-price { + color: #000; + font-size: 38rpx; + font-weight: bold; + padding-top: 30rpx; +} + +.coupon .price .reduce-price text { + font-size: 24rpx; +} + +.coupon .price .reduce-desc { + font-size: 20rpx; + margin-top: 10rpx; +} + +.coupon .info { + padding-left: 30rpx; + flex: 1; +} + +.coupon .info .reduce-title { + color: #000; + font-size: 28rpx; + font-weight: bold; + padding-top: 20rpx; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; +} + +.coupon .info .reduce-type { + color: #fff; + font-weight: normal; + font-size: 20rpx; + background: #ec6b5a; + padding: 2rpx 8rpx; + border-radius: 4rpx; +} + +.coupon .status { + width: 130rpx; + text-align: center; +} + +.coupon .status image { + width: 90rpx; + height: 90rpx; + margin-top: 20rpx; +} + +.coupon.used, +.coupon.expired { + background: #fafafa; +} + +.coupon.used .price, +.coupon.expired .price { + color: #949494; +} + +.coupon.used .reduce-price, +.coupon.expired .reduce-price, +.coupon.used .reduce-title, +.coupon.expired .reduce-title { + color: #7a7a7a; +} + +.coupon.used .reduce-type, +.coupon.expired .reduce-type { + background: #eeaea6; +} + +.coupon.used .footer, +.coupon.expired .footer { + color: #b6b6b6; +} + +.reduce-area { + font-size: 24rpx; + color: #666; + margin-top: 10rpx; +} + +.go-shop { + border: 1rpx solid #ec6b5a; + border-radius: 30rpx; + color: #ec6b5a; + font-size: 24rpx; + margin-top: 60rpx; + margin-right: 12rpx; + line-height: 38rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/live/index.js b/eaterplanet_ecommerce/moduleB/live/index.js new file mode 100644 index 0000000..3ed5f85 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/index.js @@ -0,0 +1,160 @@ +var app = getApp(); +var util = require('../../utils/util.js'); +var status = require('../../utils/index.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + roomInfo: [], + loadText: "加载中...", + noData: false, + loadMore: true, + live_status_tip: { + 101: '直播中', + 102: '未开始', + 103: '已结束', + 104: '禁播', + 105: '暂停中', + 106: '异常', + 107: '已过期' + } + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + app.setShareConfig(); + status.setNavBgColor(); + this.getData(); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + that.setData({ + needAuth: true + }) + } else { + (0, status.cartNum)('', true).then((res) => { + that.setData({ + cartNum: res.data + }) + }); + } + }) + }, + + getData: function(){ + let that = this; + wx.showLoading(); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'livevideo.get_roominfo', + page: this.page + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.data || []; + let h = {}; + h.share = res.data.share; + if(h.share && h.share.name) wx.setNavigationBarTitle({ title: h.share.name }) + h.showTabbar = res.data.showTabbar; + if(list.length<5) h.noMore = true, h.loadMore = false; + let roomInfo = that.data.roomInfo; + roomInfo = roomInfo.concat(list); + h.roomInfo = roomInfo; + that.page++; + that.setData(h); + } else { + let h = {}; + if(that.page==1) h.noData = true; + h.showTabbar = res.data.showTabbar; + h.loadMore = false; + that.setData(h); + } + } + }) + }, + + goLive: function(e){ + let roomid = e.currentTarget.dataset.roomid; + // let idx = e.currentTarget.dataset.idx; + // let roomInfo = this.data.roomInfo; + // if(idx>=0 && roomInfo && roomInfo[idx] && roomInfo[idx]['has_replay']) { + // roomid && wx.navigateTo({ + // url: `/eaterplanet_ecommerce/moduleB/live/replay?room_id=${roomid}`, + // }) + // return; + // } + roomid && wx.navigateTo({ + url: `plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id=${roomid}`, + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + this.data.loadMore && this.getData(); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let share = this.data.share || ''; + let title = share.title || ''; + let imageUrl = share.img || ''; + let share_path = 'eaterplanet_ecommerce/moduleB/live/index'; + return { + title, + imageUrl, + path: share_path, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + }, + + onShareTimeline: function () { + let share = this.data.share || ''; + let title = share.title || ''; + let imageUrl = share.img || ''; + return { + title, + imageUrl, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleB/live/index.json b/eaterplanet_ecommerce/moduleB/live/index.json new file mode 100644 index 0000000..ca022d1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "", + "usingComponents": { + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-tabbar": "../../components/tabbar/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/live/index.wxml b/eaterplanet_ecommerce/moduleB/live/index.wxml new file mode 100644 index 0000000..2f7ea48 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/index.wxml @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + 直播中 + + + 预告 + {{item.date_text}}开播 + + + + 直播结束 + + + + {{live_status_tip[item.live_status]}} + + 置顶 + + + 推荐 + + + + + {{item.name}} + + + + + {{item.anchor_name}} + + + + + ¥{{item.goods_list[0].price/100}} + ¥{{item.goods_list[0].price/100}}~{{item.goods_list[0].price2/100}} + ¥{{item.goods_list[0].price2/100}} + + + + + {{item.goods_list.length}} + 商品 + + + + + + + + 暂无内容~ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/live/index.wxss b/eaterplanet_ecommerce/moduleB/live/index.wxss new file mode 100644 index 0000000..a484661 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/index.wxss @@ -0,0 +1,226 @@ +.empty-list { + padding: 260rpx 150rpx; + font-size: 34rpx; +} + +.empty-list .btn { + margin: 0; + border-radius: 100rpx; + height: 76rpx; + line-height: 76rpx; + width: 280rpx; + font-size: 30rpx; + padding: 0; +} + +.empty-list .light { + height: 240rpx; + width: 240rpx; +} + +.empty-list .text-cancel { + padding: 10rpx; + margin-bottom: 30rpx; + margin-top: 25rpx; + font-size: 30rpx; +} + +.fui-live-list { + padding: 24rpx; +} + +.fui-live-item { + margin-bottom: 24rpx; + border-radius: 24rpx; + background: #fff; + display: flex; + overflow: hidden; +} + +.fui-live-item>.cover,.fui-live-item>.cover>image { + width: 400rpx; + height: 400rpx; + background: #f2f2f2; + position: relative; +} + +.fui-live-item>.cover>.status { + position: absolute; + left: 8rpx; + top: 8rpx; + width: auto; + height: 48rpx; + border-radius: 24rpx; + background: rgba(0,0,0,0.2); + line-height: 48rpx; + color: #FFFFFF; + font-size: 24rpx; + display: flex; +} + +.fui-live-item>.cover>.status .notice { + height: 48rpx; + background: #3DC637; + font-size: 24rpx; + line-height: 48rpx; + padding: 0 16rpx; + border-radius: 24rpx; + font-weight: 500; +} + +.fui-live-item>.cover>.status>image { + height: 48rpx; + width: 48rpx; +} + +.fui-live-item>.cover>.status text { + padding: 0 20rpx 0 12rpx; + font-weight: 400; +} + +.fui-live-item>.cover>.status text.b { + font-weight: 700; +} + +.fui-live-item>.cover>.top { + position: absolute; + left: 8rpx; + bottom: 8rpx; + height: 36rpx; + border-radius: 18rpx; + background: #FF661A; + padding: 0 16rpx; + line-height: 36rpx; + font-weight: 500; + font-size: 20rpx; + color: #FFFFFF; +} + +.fui-live-item>.cover>.recommend { + position: absolute; + right: 8rpx; + bottom: 8rpx; + height: 36rpx; + border-radius: 18rpx; + background: #FB1732; + padding: 0 8rpx; + line-height: 30rpx; +} + +.fui-live-item>.cover>.recommend>image { + width: 20rpx; + height: 20rpx; + display: inline-block; +} + +.fui-live-item>.cover>.recommend>text { + color: #FFFFFF; + font-weight: 500; + font-size: 20rpx; +} + +.fui-live-item>.info { + flex: 1; + padding: 36rpx 24rpx 0 24rpx; +} + +.fui-live-item>.info>.title { + height: 80rpx; + font-size: 28rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + align-content: center; + font-weight: 700; + line-height: 40rpx; +} + +.fui-live-item>.info>.anchor { + height: 60rpx; + width: 100%; + padding: 24rpx 0; + display: flex; + flex-direction: row; +} + +.fui-live-item>.info>.anchor>.avatar,.fui-live-item>.info>.anchor>.avatar>image { + width: 60rpx; + height: 60rpx; + border-radius: 30rpx; +} + +.fui-live-item>.info>.anchor>.nickname { + flex: 1; + font-size: 24rpx; + color: #56595B; + height: 60rpx; + line-height: 60rpx; + padding-left: 8rpx; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + align-content: center; +} + +.fui-live-item>.info>.goods-list { + height: 120rpx; + display: flex; + justify-content: space-between; +} + +.fui-live-item>.info>.goods-list>.row,.fui-live-item>.info>.goods-list>.row>image { + width: 120rpx; + height: 120rpx; + border-radius: 8rpx; + background: #eee; +} + +.fui-live-item>.info>.goods-list>.row { + position: relative; +} + +.fui-live-item>.info>.goods-list>.row>.cover { + top: 0; + right: 0; + bottom: 0; + left: 0; + background: rgba(0,0,0,0.2); + position: absolute; + padding-top: 86rpx; + text-align: center; + font-weight: 500; + font-size: 22rpx; + color: #fff; + border-radius: 8rpx; +} + +.fui-live-item>.info>.goods-list>.row>.cover.br { + padding-top: 26rpx; + color: #fff; + font-weight: 500; + font-size: 24rpx; + line-height: 38rpx; +} + +.replayImg { + width: 400rpx; + height: 400rpx; + position: absolute; + top: 0; + left: 0; + background-color: rgba(0,0,0,0.6); +} + +.replayImg image { + height: 128rpx; + width: 128rpx; + border-radius: 50%; + position: absolute; + left: 50%; + margin-left: -64rpx; + top: 136rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/live/replay.js b/eaterplanet_ecommerce/moduleB/live/replay.js new file mode 100644 index 0000000..b8b7a23 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/replay.js @@ -0,0 +1,108 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + replayInfo: '', + roominfo: '' + }, + room_id: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let room_id = options.room_id || 0; + this.room_id = room_id; + this.getData(room_id); + + let showBackBtn = false; + let pages_all = getCurrentPages(); + if (pages_all.length > 1) { + showBackBtn = true; + } + this.setData({ showBackBtn }) + }, + + getData: function(room_id){ + let that = this; + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'livevideo.get_replay', + room_id + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let replayInfo = res.data.data || ''; + let roominfo = res.data.roominfo || ''; + that.setData({ replayInfo, roominfo }); + } else { + app.util.message('回放内容不存在', 'redirect:/eaterplanet_ecommerce/moduleB/live/index', 'error', '知道了'); + } + } + }) + }, + + goDetails: function(e) { + let url = e.currentTarget.dataset.link; + url = url.replace(".html", ""); + if(!url) return; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ url }) + } else { + wx.navigateTo({ url }) + } + }, + + clickStore: function() { + this.setData({ showStore: !this.data.showStore }) + }, + + _backhome: function() { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + let roominfo = this.data.roominfo; + let share_title = roominfo.name; + let imageUrl = roominfo.share_img; + let room_id = this.room_id; + var share_path = `eaterplanet_ecommerce/moduleB/live/replay?room_id=${room_id}`; + console.log('回放分享地址:', share_path); + return { + title: share_title, + path: share_path, + imageUrl, + success: function (res) { + // 转发成功 + }, + fail: function (res) { + // 转发失败 + } + } + } +}) diff --git a/eaterplanet_ecommerce/moduleB/live/replay.json b/eaterplanet_ecommerce/moduleB/live/replay.json new file mode 100644 index 0000000..83a082f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/replay.json @@ -0,0 +1,7 @@ +{ + "navigationBarTextStyle": "white", + "navigationStyle": "custom", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/live/replay.wxml b/eaterplanet_ecommerce/moduleB/live/replay.wxml new file mode 100644 index 0000000..b1873c2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/replay.wxml @@ -0,0 +1,63 @@ + + var caclPrice = function (d) { + var str = d; + if(d) { + d = d.toString(); + var len = d.length; + str = d.slice(0, len-2) + '.' + d.slice(-2); + } + return str; + } + module.exports = { + caclPrice : caclPrice, + } + + + + + + + + + + + + + + + + + + 直播商品 + + + + + + + + {{index+1}} + + + {{item.name}} + + ¥ {{price.caclPrice(item.price)}} + + + + + + 暂无商品 + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/live/replay.wxss b/eaterplanet_ecommerce/moduleB/live/replay.wxss new file mode 100644 index 0000000..b48927c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/live/replay.wxss @@ -0,0 +1,284 @@ +page { + width: 100%; + height: 100%; + overflow-y: hidden; +} + +.main { + display: block; + position: relative; + height: 100%; + z-index: 0; +} + +.main::after { + content: ' '; + display: block; + position: absolute; + bottom: 0; + left: 0; + right: 0; + height: 30%; + z-index: 1; + background-image: linear-gradient(to top, rgba(0, 0, 0, 0.24) 0%, rgba(0, 0, 0, 0.16) 40%, rgba(0, 0, 0, 0) 100%); +} + +.main::before { + content: ' '; + display: block; + position: absolute; + top: 0; + left: 0; + right: 0; + height: 20%; + z-index: 1; + background-image: linear-gradient(to top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.16) 40%, rgba(0, 0, 0, 0.24) 100%); +} + +.main video { + width: 750rpx; + height: 100%; +} + +.live-page { + position: absolute; + top: 0; + left: 0; + right: 0; + z-index: 20; + padding-bottom: 24px; + box-sizing: border-box; + width: 100%; + height: 100%; +} + +.operation { + position: fixed; + right: 17px; + bottom: 24px; + z-index: 10; +} + +.operation .item { + width: 42px; + height: 42px; + background: #8385F3; + border-radius: 50%; + margin-bottom: 23px; + overflow: hidden; +} + +.operation button.item { + background: transparent; +} + +.operation .item .iconfont { + font-size: 24px; + color: #fff; +} + +.operation .item.operation--mode-filter-black { + background: rgba(0, 0, 0, 0.25); + backdrop-filter: blur(20px); + border-radius: 50%; + overflow: hidden; +} + +.operation button.item { + line-height: initial; + padding: 0; +} + +.operation button.item::after { + content: none; +} + +.store { + padding: 0 16px; + position: absolute; + z-index: 2; + left: 0; + right: 0; + bottom: 30px; +} + +.store-list { + border-radius: 16px; + overflow: hidden; + position: relative; + bottom: -999px; +} + +.store-list.fadeIn { + bottom: 0; + animation: fadeInStoreList 0.2s 1 forwards; +} + +.store__mask { + position: fixed; + top: 0; + left: 0; + right: 0; + height: 100%; + z-index: 1; +} + +.mode-filter-black { + background-color: rgba(0, 0, 0, 0.25); + backdrop-filter: blur(20px); + border-radius: inherit; +} + +.store-list__inner { + position: relative; + z-index: 5002; + padding: 16px 12px; + box-sizing: border-box; +} + +.store-list__header { + position: relative; + display: flex; + justify-content: flex-start; + align-items: center; + padding: 0 4px; + font-weight: 500; +} + +.store-list__title { + font-size: 15px; + color: #ffffff; + text-shadow: 0.5px 0.5px 2px rgba(0, 0, 0, 0.1); +} + +.store-list__body { + margin-top: 4px; + overflow: hidden; + padding: 2px 5px 0 0; + box-sizing: border-box; + flex: 1; + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.store-list__page__inner { + position: relative; + width: calc(100% + 20px); + box-sizing: border-box; + -webkit-mask-image: -webkit-gradient(linear, left bottom, left 96%, from(rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 04))); +} + +.store-list__item { + margin-bottom: 12px; + background: #ffffff; + border-radius: 8px; +} + +.store-list__item:last-child { + margin-bottom: 0; +} + +.store-list__item__inner { + display: flex; + justify-content: flex-start; + align-items: stretch; + padding: 8px; +} + +.store-list__item__header { + position: relative; + margin-right: 9px; + font-size: 0; +} + +.store-list__item__avatar { + width: 64px; + height: 64px; + border-radius: 2px; + box-sizing: border-box; +} + +.store-list__item__index { + position: absolute; + top: 0; + left: 0; + background: rgba(0, 0, 0, 0.5); + border-radius: 2px 0px 8px 0px; + text-align: center; + padding: 0 2px; + min-width: 14px; + line-height: 12px; + font-size: 10px; + color: #ffffff; + text-align: center; +} + +.store-list__item__page { + height: initial; +} + +.store-list__item__title { + font-size: 15px; + color: rgba(0, 0, 0, 0.7); + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + word-break: break-all; + line-height: 19.6px; + margin-bottom: 5px; +} + +.store-list__item__price { + opacity: 0.9; + font-size: 14px; + color: #fa9d3b; +} + +.store-list__item__price-before { + color: #B2B2B2; + text-decoration: line-through; +} + +.store-list__empty { + text-align: center; + height: 287px; + line-height: 140px; + color: #fff; + font-size: 14px; +} + +.nav-btn { + position: relative; + top: 0; + left: 0; + display: flex; + justify-content: center; + align-items: center; + width: 31px; + height: 31px; + line-height: 31px; + padding: 0; + min-width: 31px; + max-width: 31px; + text-align: center; + border-radius: 50%; + min-height: initial; + box-sizing: border-box; + background: rgba(0,0,0,0.25); + border: 1px solid rgba(255,255,255,0.05); + color: #fff; + backdrop-filter: blur(20px); +} + +.nav-btn .img { + width: 20px; + height: 20px; + vertical-align: top; +} + +.store-list__body__inner { + overflow-y: auto; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/manage/index.js b/eaterplanet_ecommerce/moduleB/manage/index.js new file mode 100644 index 0000000..57321fb --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/manage/index.js @@ -0,0 +1,163 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + data: { + type: 0, + showTipDialog: false, + showTimeModal: false, + isPickerRender: false, + isPickerShow: false, + startTime: new Date().toLocaleDateString(), + endTime: new Date().toLocaleDateString(), + pickerConfig: { + endDate: true, + column: "day", + dateLimit: true, + initStartTime: new Date().toLocaleDateString(), + initEndTime: new Date().toLocaleDateString(), + limitStartTime: "2015-05-06", + limitEndTime: "2065-05-06" + } + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + + }, + + onShow: function () { + this.getData(); + }, + + getData: function () { + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('platformmobile.getIndexData', { + token + }).then(res => { + wx.hideLoading(); + wx.stopPullDownRefresh(); + let { + business_data, + goods_data, + sales_data, + todayOrderData, + user_data + } = res; + this.setData({ + business_data, + goods_data, + sales_data, + todayOrderData, + user_data, + type: 0 + }) + }).catch(err => { + wx.hideLoading(); + wx.stopPullDownRefresh(); + app.util.message(err.message || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + sortData: function () { + // type 0 全部,1 今日 ,2 昨日 ,3 7日, 4 时间段 + // begin_time + // end_time + let { type, startTime, endTime } = this.data; + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('platformmobile.searchAnalySalesByTime', { + token, + type, + begin_time: startTime, + end_time: endTime + }).then(res => { + wx.hideLoading(); + }).catch(err => { + wx.hideLoading(); + this.setData({ + sales_data: err.sales_data + }) + }) + }, + + changeNav: function (e) { + let type = e.currentTarget.dataset.type || 0; + this.setData({ + type, + startTime: "", + endTime: "" + }, ()=>{ + this.sortData(); + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.getData(); + }, + + confirmMessage: function () { + this.setData({ + showTipDialog: !this.data.showTipDialog + }) + }, + + handleModal: function () { + this.setData({ + showTimeModal: !this.data.showTimeModal + }) + }, + + pickerShow: function () { + this.setData({ + isPickerShow: true, + isPickerRender: true, + chartHide: true + }); + }, + + pickerHide: function () { + this.setData({ + isPickerShow: false, + chartHide: false + }); + }, + + bindPickerChange: function (e) { + this.getData(this.data.sensorList[e.detail.value].id); + this.setData({ + index: e.detail.value, + sensorId: this.data.sensorList[e.detail.value].id + }); + }, + + setPickerTime: function (val) { + let data = val.detail; + this.setData({ + type: 4, + startTime: data.startTime, + endTime: data.endTime + }, ()=>{ + this.sortData(); + }); + } +}) diff --git a/eaterplanet_ecommerce/moduleB/manage/index.json b/eaterplanet_ecommerce/moduleB/manage/index.json new file mode 100644 index 0000000..42542a4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/manage/index.json @@ -0,0 +1,12 @@ +{ + "navigationBarTitleText": "平台管理", + "navigationBarTextStyle": "white", + "navigationBarBackgroundColor": "#EF485A", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-dialog": "../../components/dialog/index", + "i-modal": "../../components/modal/index", + "timePicker": "../../components/timePicker/timePicker" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/manage/index.wxml b/eaterplanet_ecommerce/moduleB/manage/index.wxml new file mode 100644 index 0000000..587e147 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/manage/index.wxml @@ -0,0 +1,189 @@ + + + 销售统计 + 自定义时间 + + 汇总 + 今日 + 昨日 + 7日 + + + + + {{sales_data.pay_order_count}} + 支付订单数 + + + ¥{{sales_data.pay_order_money?sales_data.pay_order_money:0}} + 支付订单金额 + + + + + + + + + {{sales_data.wait_send_count}} + 待发货订单 + + + + + + + {{sales_data.sending_order_count}} + 配送中订单 + + + + + + + {{sales_data.waitrefund_count}} + 待退款订单 + + + + + 平台数据 + + + {{todayOrderData.todaypay_order_count}} + 今日付款订单 + + + ¥{{todayOrderData.todaypay_order_money}} + 今日付款总金额 + + + {{todayOrderData.todaywait_send_count}} + 今日待付款订单 + + + + + + 平台用户 + + + {{user_data.today_user_count}} + 今日新增会员 + + + {{user_data.yes_user_count}} + 昨日新增会员 + + + {{user_data.total_user_count}} + 总会员数 + + + + + {{user_data.today_addhead_count}} + 今日新增团长 + + + {{user_data.yes_addhead_count}} + 昨日新增团长 + + + {{user_data.total_head_count}} + 总团长数 + + + + + + 商品数据 + + + {{goods_data.count}} + 商品总数 + + + {{goods_data.normal_count}} + 普通商品 + + + {{goods_data.pingoods_count}} + 拼团商品 + + + + + {{goods_data.integral_goods_count}} + 积分商品 + + + + + + + + + 平台营业数据 + + + + + ¥{{business_data.head_commiss_money}} + 商城团长总佣金 + + + ¥{{business_data.today_win_money}} + 今日利润 + + + {{business_data.payed_member_count}} + 付款人数 + + + + + {{business_data.addorder_member_count}} + 下单人数 + + + + + + + + + + + 提示 + + + + 订单金额: 统计订单金额不包含退款金额和已取消订单金额。 + 团长总佣金:统计佣金订单金额不包含退款金额和已取消订单金额。 + 今日利润:今日商城商品销量的全部金额-今日商城商品销量的全部成本金额-今日商城商品优惠金额=今日商品利润。 + 今日商城商品销量的全部金额:商城今日销售的所有商品金额总和。 + 今日商城商品销量的全部成本金额:商城今日销售的所有商品成本金额总。 + 今日商城商品优惠金额:商城今日使用掉的优惠金额(积分抵扣的金额,优惠券金额,新人优惠金额等)。 + 访问人数:浏览小程序的人数(包含已登录和未登录小程序的人数,每个IP计算一次,相同IP不重复统计)。 + 下单人数:商城下过订单的会员人数(待付款的订单人数也统计在内)。 + 付款人数:商城下单并且付款完成(已支付)的会员人数。 + + + + + + + + + 自定义时间 + + 1111 + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/manage/index.wxss b/eaterplanet_ecommerce/moduleB/manage/index.wxss new file mode 100644 index 0000000..b427564 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/manage/index.wxss @@ -0,0 +1,85 @@ +.diytime { + position: absolute; + right: 30rpx; + top: 32rpx; +} + +.nav { + border: 1rpx solid #4facfe; + margin: 0 50rpx; + border-radius: 50rpx; + color: #4facfe; + overflow: hidden; +} + +.nav .item { + padding: 10rpx 0; + border-left: 1rpx solid #4facfe; +} + +.nav .item:first-child { + border-left: 0; +} + +.nav .item.active { + background-color: #4facfe; + color: #ffffff; +} + +.bg-line { + background: linear-gradient(160deg, #4facfe, #00f2fe); +} + +.hide-dialog { + height: 100%; + width: 100%; + bottom: 0; + left: 0; + z-index: 19; + background: rgba(0, 0, 0, 0.3); + position: fixed; +} + +.dialog-tips { + width: 700rpx; + min-height: 412rpx; + max-height: 75vh; + border-radius: 24rpx; + top: 0rpx; + left: 0rpx; + right: 0rpx; + bottom: 0rpx; + margin: auto; + position: fixed; + background: #fff; + z-index: 20; +} + +.dialog-tips .dialog-title { + padding: 30rpx 0; + font-size: 32rpx; + color: #333; + text-align: center; + font-weight: 500; +} + +.dialog-tips .dialog-content { + font-size: 28rpx; + padding: 0 50rpx; + color: #999; +} + +.dialog-tips .dialog-btn { + bottom: 30rpx; + position: absolute; + text-align: center; + color: #fff; + background: #4facfe; + font-size: 32rpx; + height: 72rpx; + width: 432rpx; + line-height: 72rpx; + border-radius: 60rpx; + left: 50%; + margin-left: -216rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/offlineCode/index.js b/eaterplanet_ecommerce/moduleB/offlineCode/index.js new file mode 100644 index 0000000..dfede4c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/offlineCode/index.js @@ -0,0 +1,81 @@ +var app = getApp(); +Page({ + + /** + * 页面的初始数据 + */ + data: { + needAuth: false, + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + authSuccess: function() { + this.setData({ showAuthModal: false, needAuth: false }); + }, + + formSubmit(e) { + console.log('form发生了submit事件,携带数据为:', e.detail.value) + let code_sn = e.detail.value.code_sn || ""; + if(!code_sn) { + wx.showToast({ + title: '请输入卡密', + icon: "none" + }) + return; + } + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('virtualcard.subOfflineCode', { + token, + code_sn + }).then(res => { + wx.hideLoading(); + wx.showModal({ + title: "提示", + content: "您已成功充值"+res.money+"元", + showCancel: false + }) + }).catch(err => { + wx.hideLoading(); + if(err.code==1) { + //未登录 + this.setData({ showAuthModal: !this.data.showAuthModal, needAuth: true }); + } else { + wx.showModal({ + title: "提示", + content: err.message || "充值失败,请重试", + showCancel: false + }) + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/offlineCode/index.json b/eaterplanet_ecommerce/moduleB/offlineCode/index.json new file mode 100644 index 0000000..0ed5c28 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/offlineCode/index.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "卡密充值", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#ffffff", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/offlineCode/index.wxml b/eaterplanet_ecommerce/moduleB/offlineCode/index.wxml new file mode 100644 index 0000000..027237d --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/offlineCode/index.wxml @@ -0,0 +1,12 @@ + + +

+ + 卡密: + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/offlineCode/index.wxss b/eaterplanet_ecommerce/moduleB/offlineCode/index.wxss new file mode 100644 index 0000000..5df684e --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/offlineCode/index.wxss @@ -0,0 +1,12 @@ +.btn { + margin: 50rpx; + font-size: 30rpx; + background-color: #4facfe; + color: #fff; +} + +.ipt { + padding: 15rpx 20rpx; + border: 1rpx solid #e5e5e5; + border-radius: 5rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/order/share.js b/eaterplanet_ecommerce/moduleB/order/share.js new file mode 100644 index 0000000..1d05449 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/order/share.js @@ -0,0 +1,195 @@ +var app = getApp(); +var status = require('../../utils/index.js'); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/globalMixin.js'), require('../../mixin/compoentCartMixin.js')], + data: { + members: '', + order_goods_list: [], + orders: '', + cartNum: 0, + groupInfo: { + group_name: '社区', + owner_name: '团长' + }, + }, + isFirst: 1, + + onLoad: function (options) { + let order_id = options.order_id || ''; + if (!order_id) { + wx.showModal({ + title: '提示', + content: '参数错误', + showCancel: false, + confirmColor: '#F75451', + success(res) { + if (res.confirm) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } + } + }) + return false; + } + status.setGroupInfo().then((groupInfo) => { this.setData({ groupInfo }) }); + this.getData(order_id); + }, + + getData: function (order_id) { + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('order.share_order', { + token, + order_id + }).then(res => { + wx.hideLoading(); + let { + members, + order_goods_list, + orders + } = res.data; + this.setData({ + members, + order_goods_list, + orders + }) + if(this.isFirst==1) this.compareCommunity(orders.head_info); + this.isFirst++; + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + changeNotListCartNum: function (t) { + let that = this; + let e = t.detail; + (0, status.cartNum)(that.setData({ + cartNum: e + })); + }, + + /** + * 比较社区 + * shareCommunity: 这个接龙的所属社区 + */ + compareCommunity: function (shareCommunity='') { + console.log('shareCommunity', shareCommunity) + let that = this; + // 原来社区 + let currentCommunity = wx.getStorageSync('community'); + let currentCommunityId = currentCommunity.communityId || ''; + const token = wx.getStorageSync('token'); + let { + groupInfo + } = that.data; + + let shareCommunityId = shareCommunity.id || ''; + shareCommunityId && util.getCommunityById(shareCommunityId).then(res => { + let { + hide_community_change_btn, + default_head_info + } = res; + if (res.open_danhead_model == 1) { + // 开启单社区 + app.globalData.community = default_head_info; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: default_head_info + }) + token && util.addhistory(default_head_info); + if (shareCommunityId != default_head_info.communityId) { + let { + groupInfo + } = that.data; + console.log('开启单社区'); + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + return; + } + } else { + // 社区是否存在 + if (currentCommunityId != '' && shareCommunityId) { + // 存在并且不相同 + console.log('currentCommunityId存在 比较社区') + if (currentCommunityId != shareCommunityId) { + console.log('currentCommunityId存在 社区不同') + console.log('禁止切换'); + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + return; + } + } else { + // 不存在社区id + //token 是否存在 + if (token) { + util.getCommunityInfo().then(function (ret) { + //比较社区 + console.log('token存在 比较社区') + if (ret.community_id && ret.community_id != shareCommunityId) { + app.util.message(`您只能访问自己${groupInfo.group_name}`, 'switchTo:/eaterplanet_ecommerce/pages/index/index', 'error', '知道了'); + return; + } + }).catch((param) => { + console.log('step4 新人') + if (Object.keys(param) != '') util.addhistory(param, true); + }); + } else { + console.log('token不存在 存社区') + // 直接存本地 + app.globalData.community = res.data; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: res.data + }) + } + } + } + }); + }, + + /** + * 切换提示 + */ + confrimChangeCommunity: function () { + let community = this.data.changeCommunity; + let token = wx.getStorageSync('token'); + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + token && util.addhistory(community); + + this.setData({ + showChangeCommunity: false + }) + console.log('用户点击确定') + }, + + /** + * 取消切换 + */ + cancelChangeCommunity: function () { + let { + groupInfo + } = this.data; + wx.showModal({ + title: '提示', + content: `此订单在您所属${groupInfo.group_name}不可参与`, + showCancel: false, + confirmColor: '#ff5041', + success(res) { + if (res.confirm) { + wx.switchTab({ + url: `/eaterplanet_ecommerce/pages/index/index` + }) + } + } + }); + }, +}) diff --git a/eaterplanet_ecommerce/moduleB/order/share.json b/eaterplanet_ecommerce/moduleB/order/share.json new file mode 100644 index 0000000..97f7529 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/order/share.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "朋友的订单", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "i-new-auth": "../../components/new-auth/index", + "sku": "../../components/sku/index", + "i-new-rush-spu": "../../components/new-rush-spu/index", + "i-fixed-bottom": "../../components/fixed-bottom/index", + "i-change-community": "../../components/changeCommunity/index", + "i-vip-modal": "../../components/vipModal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/order/share.wxml b/eaterplanet_ecommerce/moduleB/order/share.wxml new file mode 100644 index 0000000..7e2d90d --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/order/share.wxml @@ -0,0 +1,50 @@ + + + + + + + {{orders.salesroom_info.room_name}} + {{orders.salesroom_info.room_address}} + + + + + + + + {{orders.head_info.community_name}} + {{orders.head_info.fulladdress}} + + + + + + + + {{members.username}} + + + 买了{{orders.goods_count}}件共花费¥{{orders.old_order_total}} + ,一共省了¥{{orders.save_money}} + + + + + + + + + + 去购物车 + 去首页逛逛 + + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/order/share.wxss b/eaterplanet_ecommerce/moduleB/order/share.wxss new file mode 100644 index 0000000..0d2a708 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/order/share.wxss @@ -0,0 +1,33 @@ +.tip { + position: relative; + background: rgb(255, 245, 244); + color: #FD4F5F; + padding: 10rpx 20rpx; + margin-top: 15px; +} + +.tip::before { + content: ""; + position: absolute; + top: -10px; + width: 0; + height: 0; + border-left: 10px solid transparent; + border-right: 10px solid transparent; + border-bottom: 20px solid rgb(255, 245, 244); +} + +.price { + margin-left: 5rpx; +} + +.cartbtn { + border: 1px solid #FD4F5F; + color: #FD4F5F; + margin-left: 30rpx; +} + +.btn { + background: #FD4F5F; + color: #ffffff; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/presale/index.js b/eaterplanet_ecommerce/moduleB/presale/index.js new file mode 100644 index 0000000..5665e24 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/presale/index.js @@ -0,0 +1,233 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + needAuth: false, + has_slider: 0, + slider_list: [], + share_img: '', + share_title: '', + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [], + }, + pageNum: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + onLoad: function (options) { + this.getData(); + this.getList(); + }, + + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if(res) { + that.setData({ needAuth: false }) + } else { + this.setData({ needAuth: true }); + } + }) + }, + + authSuccess: function () { + let that = this; + this.pageNum = 1; + this.setData({ + slider_list: [], + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getData(); + that.getList(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + getData: function () { + app.util.ProReq('presalegoods.index', {}).then(res => { + let { has_slider, slider_list, presale_share_img, presale_share_title, presale_layout } = res.data; + this.setData({ + presale_layout, + has_slider, + slider_list, + share_img: presale_share_img, + share_title: presale_share_title + }) + }) + }, + + /** + * 获取商品列表 + */ + getList: function () { + let that = this; + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let head_id = community.communityId || 0; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'presalegoods.load_goods_list', + pageNum: this.pageNum, + token, + head_id, + pre_page: 10 + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let oldRushList = that.data.rushList; + if (that.pageNum == 1) oldRushList = []; + + let h = {}, list = res.data.list; + if (that.pageNum == 1 && list.length == 0) h.showEmpty = true; + let rushList = oldRushList.concat(list); + let rdata = res.data; + let reduction = { full_money: rdata.full_money, full_reducemoney: rdata.full_reducemoney, is_open_fullreduction: rdata.is_open_fullreduction } + h.rushList = rushList; + h.reduction = reduction; + h.loadOver = true; + let loadMore = that.data.loadMore; + if(res.data.list.length<10) { loadMore = false } + h.loadMore = loadMore; + h.loadText = loadMore ? "加载中..." : "没有更多商品了~"; + // h.pintuan_show_type = rdata.pintuan_show_type; + that.setData(h, function () { + that.pageNum += 1; + }) + } else if (res.data.code == 1) { + let s = { loadMore: false } + if (that.pageNum == 1) s.showEmpty = true; + that.setData(s); + } else if (res.data.code == 2) { + //no login + that.setData({ needAuth: true }) + } + } + }) + }, + + /** + * 幻灯片跳转 + */ + goBannerUrl: function (t) { + let idx = t.currentTarget.dataset.idx; + let { slider_list, needAuth } = this.data; + if (slider_list.length > 0) { + let url = slider_list[idx].link; + let type = slider_list[idx].linktype; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + url && wx.navigateTo({ url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url: url }) + } else { + url && wx.navigateTo({ url: url }) + } + } else if (type == 2) { + // 跳转小程序 + let appid = slider_list[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: slider_list[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } else if (type == 6) { + //领券 + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleA/coupon/getCoupon?id='+url + }) + } + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.getData(); + let that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getList(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log('这是我的底线'); + this.data.loadMore && (this.setData({ loadOver: false }), this.getList()); + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var member_id = wx.getStorageSync('member_id'); + let { share_title, share_img } = this.data; + return { + title: share_title, + path: "eaterplanet_ecommerce/moduleB/presale/index?share_id=" + member_id, + imageUrl: share_img, + success: function () { }, + fail: function () { } + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleB/presale/index.json b/eaterplanet_ecommerce/moduleB/presale/index.json new file mode 100644 index 0000000..b2a5ec4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/presale/index.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "预售中心", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-spu-col": "../components/presale-goodsone", + "i-spu-row": "../components/presale-goodsrow", + "i-new-auth": "../../components/new-auth/index", + "i-img": "../../components/img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/presale/index.wxml b/eaterplanet_ecommerce/moduleB/presale/index.wxml new file mode 100644 index 0000000..7ae6dbc --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/presale/index.wxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + 暂时没有商品 + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/presale/index.wxss b/eaterplanet_ecommerce/moduleB/presale/index.wxss new file mode 100644 index 0000000..159d5a1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/presale/index.wxss @@ -0,0 +1,126 @@ +.swipe { + margin-top: 20rpx; + height: 320rpx; + margin-bottom: 20rpx; +} + +.swiper-content { + width: 750rpx; + height: 320rpx; + border-radius: 12rpx; +} + +.swiper-content swiper-item { + border-radius: 12rpx; + margin-right: 20rpx; + display: flex; + justify-content: flex-start; +} + +.swiper-content swiper-item:last-child { + margin: 0; +} + +.swiper-content .banner { + width: 710rpx; + height: 320rpx; + margin: 0 20rpx; + display: block; + border-radius: 12rpx; + position: relative; + overflow: hidden; +} + +.swiper-content .banner .banner-img { + width: 710rpx; + height: 320rpx; + border-radius: 12rpx; + display: block; + overflow: hidden; +} + +.search-bar { + padding: 20rpx 25rpx; + background-color: #fff; + width: 100%; + box-sizing: border-box; + display: flex; + align-items: center; +} + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; + flex: 1; +} + +.search-btn { + padding-left: 20rpx; + padding-right: 10rpx; + background: transparent; + line-height: 56rpx; + font-size: 32rpx; + padding-right: 5rpx; + width: 95rpx; +} + +button.search-btn::after { + content: none; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} +/* 搜索 E */ + + +.none-rush-list { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding-bottom: 140rpx; + padding-top: 140rpx; +} + +.none-rush-list .img-block { + width: 240rpx; + height: 240rpx; + margin-bottom: 30rpx; +} + +.none-rush-list .h1 { + font-size: 32rpx; + line-height: 32rpx; + color: #444; + margin-bottom: 20rpx; +} + +.twoCol { + padding: 0 20rpx; + display: flex; + justify-content: space-between; + flex-wrap: wrap; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/accountRecord.js b/eaterplanet_ecommerce/moduleB/rider/accountRecord.js new file mode 100644 index 0000000..738d3ce --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/accountRecord.js @@ -0,0 +1,96 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + is_login: true, + list: [], + showData: 1, + loadText: '加载中', + remark: ['未结算','已结算'] + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + util.check_login() ? this.setData({ is_login: true }) : this.setData({ is_login: false }); + this.getData(); + }, + + getData: function () { + var token = wx.getStorageSync('token'); + let that = this; + wx.showLoading(); + this.setData({ isHideLoadMore: false }) + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'user.get_user_distribution_order', + token: token, + page: that.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + var list = that.data.list; + list = list.concat(res.data.data); + that.setData({ list, isHideLoadMore: true }) + } else if (res.data.code == 1) { + if (that.data.list.length == 0 && that.page == 1) that.setData({ showData: 0 }); + that.setData({ isHideLoadMore: true, no_data: 1 }) + return false; + } else if (res.data.code == 2) { + that.setData({ is_login: false }) + } + }, + fail: (error) => { + console.log(error) + wx.showLoading(); + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function () { + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/scoreDetails', + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (this.data.no_data == 1) return false; + this.page += 1; + this.getData(); + this.setData({ + isHideLoadMore: false + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/accountRecord.json b/eaterplanet_ecommerce/moduleB/rider/accountRecord.json new file mode 100644 index 0000000..93aa33f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/accountRecord.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "账户明细", + "navigationBarTextStyle": "black", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-auth": "../../components/auth/index", + "i-load-more": "../../components/load-more/index", + "i-card": "../../components/card/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxml b/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxml new file mode 100644 index 0000000..078cabb --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxml @@ -0,0 +1,27 @@ + + + + + + 暂无任何明细记录 + + + + + + + 配送费收入 + + {{item.shipping_money}} + + 订单号: {{item.order_num_alias}} + + {{item.addtime}} + {{remark[item.is_statement]}} + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxss b/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxss new file mode 100644 index 0000000..63c73b8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/accountRecord.wxss @@ -0,0 +1,78 @@ +@import "/common.wxss"; + +.score-box { + padding-top: 30rpx; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} + +.list { + padding: 0 20rpx; +} + +.list .listData { + padding: 30rpx; + border-bottom: 0.1rpx solid #eee; +} + +.list .listData:last-child { + border: none; +} + +.list .listData .list-tit { + line-height: 28rpx; + margin-bottom: 24rpx; + display: flex; + justify-content: space-between; +} + +.list .listData .list-tit .tit { + font-size: 30rpx; + color: #444; +} + +.list .listData .list-tit .num { + font-size: 32rpx; + color: #ff5344; + font-weight: bold; +} + +.list .listData .list-tit .num.yue { + color: #666; + font-weight: normal; + font-size: 30rpx; +} + +.list .listData .list-tit .num2 { + color: #999; +} + +.list .listData .list-orderNo { + font-size: 26rpx; + color: #444; + margin-bottom: 16rpx; +} + +.list .listData .list-time { + font-size: 26rpx; + color: #aaa; + line-height: 22rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/rider/census.js b/eaterplanet_ecommerce/moduleB/rider/census.js new file mode 100644 index 0000000..cbba941 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/census.js @@ -0,0 +1,59 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + total_getorder_count: 0, + system_send_ordercount: 0, + has_send_count: 0, + total_commiss_money: 0 + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData(); + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.get_distribution_statics', { token }).then(res => { + console.log(res) + let { total_getorder_count, system_send_ordercount, has_send_count, total_commiss_money } = res.data; + this.setData({ + total_getorder_count, system_send_ordercount, has_send_count, total_commiss_money + }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/census.json b/eaterplanet_ecommerce/moduleB/rider/census.json new file mode 100644 index 0000000..387dc53 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/census.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/census.wxml b/eaterplanet_ecommerce/moduleB/rider/census.wxml new file mode 100644 index 0000000..a8a01b3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/census.wxml @@ -0,0 +1,22 @@ + + + + + {{total_getorder_count}} + 累计抢单数 + + + {{system_send_ordercount}} + 系统分配订单数 + + + {{has_send_count}} + 累计完成数量 + + + {{total_commiss_money}} + 配送费收入 + + + + diff --git a/eaterplanet_ecommerce/moduleB/rider/census.wxss b/eaterplanet_ecommerce/moduleB/rider/census.wxss new file mode 100644 index 0000000..052818c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/census.wxss @@ -0,0 +1,12 @@ +@import "/icon.wxss"; +@import "/common.wxss"; +@import 'tabbar.wxss'; + +.box { + flex-wrap: wrap; +} + +.box .item { + width: 50%; + margin: 30rpx 0; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/excharge.js b/eaterplanet_ecommerce/moduleB/rider/excharge.js new file mode 100644 index 0000000..d48bfd5 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/excharge.js @@ -0,0 +1,321 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + mixins: [require('../../mixin/commonMixin.js')], + /** + * 页面的初始数据 + */ + data: { + type: 1, + items: [{ + name: '1', + value: '系统余额', + show: true, + checked: false + }, + { + name: '2', + value: '微信零钱', + show: true, + checked: false + }, + { + name: '3', + value: '支付宝', + show: true, + checked: false + }, + { + name: '4', + value: '银行卡', + show: true, + checked: false + } + ], + info: [], + tixian_money: '', + final_money: 0 + }, + canTixian: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + wx.showLoading(); + this.getData(); + }, + + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (res) { + that.setData({ + needAuth: false + }) + } else { + that.setData({ + needAuth: true + }) + } + }) + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + wx.showLoading(); + that.getData(); + }) + }, + + getData: function() { + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'localtown.get_distribution_commission_info', + token: token + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let commiss_tixian_publish = res.data.data.commiss_tixian_publish; + let items = that.data.items; + let rdata = res.data.data; + if (rdata.commiss_tixianway_yuer == 0) items[0].show = false; + if (rdata.commiss_tixianway_weixin == 0) items[1].show = false; + if (rdata.commiss_tixianway_alipay == 0) items[2].show = false; + if (rdata.commiss_tixianway_bank == 0) items[3].show = false; + + let type = that.data.type; + for (let i = 0; i < items.length; i++) { + if (items[i].show) { + items[i].checked = true; + type = items[i].name; + break + } + } + + that.setData({ + info: res.data.data, + items, + type, + commiss_tixian_publish + }) + } else { + wx.showModal({ + title: '提示', + content: res.data.msg, + showCancel: false, + success(res) { + if (res.confirm) { + console.log('用户点击确定') + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + } + }) + }, + + formSubmit: function(e) { + const params = e.detail.value; + let isNull = 0; + let type = this.data.type; + let errortip = [{}, {}, { + bankusername: '微信真实姓名' + }, { + bankusername: '支付宝真实姓名', + bankaccount: '支付宝账户' + }, { + bankname: '银行卡名称', + bankusername: '持卡人姓名', + bankaccount: '银行卡账户' + }]; + for (let item in params) { + params[item] = params[item].replace(/(^\s*)|(\s*$)/g, ""); + if (!params[item]) { + const itemTip = errortip[type][item]; + wx.showToast({ + title: '请输入' + (itemTip || '正确的表单内容'), + icon: 'none' + }) + isNull = 1; + break; + } + if (item == 'money' && params[item] * 1 <= 0) { + wx.showToast({ + title: '请输入正确的金额', + icon: 'none' + }) + return; + } + } + + if (isNull == 1) return; + params.type = this.data.type; + console.log(params); + + let tdata = this.data; + let tixian_money = parseFloat(tdata.tixian_money); + let max_tixian_money = tdata.info.money; + let community_min_money = parseFloat(tdata.info.commiss_min_tixian_money); + + if (tixian_money == '' || community_min_money > tixian_money) { + wx.showToast({ + title: '最小提现' + community_min_money + '元', + icon: "none", + }) + return false; + } + + if (tixian_money > max_tixian_money) { + wx.showToast({ + title: '本次最大可提现' + max_tixian_money + '元', + icon: "none", + }) + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money + }) + return false; + } + + if (!this.canTixian) return; + this.canTixian = false; + + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'localtown.tixian_sub', + token: token, + ...params + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + wx.showToast({ + title: '已提交申请', + icon: 'none', + duration: 2000, + success: function () { + that.setData({ + canPay: false, + tixian_money: '', + final_money: 0 + }) + that.getData(); + } + }) + } else { + wx.showToast({ + title: res.data.msg ? res.data.msg : '提交失败,请重试', + icon: 'none' + }) + } + that.canTixian = true; + } + }) + }, + + /** + * 获得焦点 + */ + bindIptFocus: function() { + this.setData({ + onFocus: true + }) + }, + + /** + * 失去焦点 + */ + bindIptBlur: function() { + this.setData({ + onFocus: false + }) + }, + + radioChange(e) { + this.setData({ + type: e.detail.value + }) + }, + + bindTixianMoneyInput: function(t) { + let max_val = this.data.info.money; + var value = t.detail.value; + if (!(/^(\d?)+(\.\d{0,2})?$/.test(value))) { + value = value.substring(0, value.length - 1); + value = parseFloat(value); + } + + if (value > max_val) { + wx.showToast({ + title: '本次最大可提现' + max_val + '元', + icon: "none", + }) + } + let fee = this.data.info.commiss_tixian_bili; + let final_money = (value * (100 - fee) / 100).toFixed(2); + + let canPay = false; + value ? canPay = true : canPay = false; + + this.setData({ + tixian_money: value, + final_money: final_money, + canPay + }) + return value; + }, + + getAll: function() { + const tdata = this.data; + var max_tixian_money = tdata.info.money * 1; + let fee = tdata.info.commiss_tixian_bili; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + + let canPay = false; + max_tixian_money ? canPay = true : canPay = false; + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + canPay + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/excharge.json b/eaterplanet_ecommerce/moduleB/rider/excharge.json new file mode 100644 index 0000000..9b72cdd --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/excharge.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "提现", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-new-auth": "../../components/new-auth/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/excharge.wxml b/eaterplanet_ecommerce/moduleB/rider/excharge.wxml new file mode 100644 index 0000000..7f7240c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/excharge.wxml @@ -0,0 +1,58 @@ + + + + + {{info.money}} + 可提现金额(元) + + 提现记录 + +
+ + + + 全部提现 + + + 手续费:{{info.commiss_tixian_bili+'%'}} 最终到账:{{final_money}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提现规则: + + + + +
+ + diff --git a/eaterplanet_ecommerce/moduleB/rider/excharge.wxss b/eaterplanet_ecommerce/moduleB/rider/excharge.wxss new file mode 100644 index 0000000..6e99b31 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/excharge.wxss @@ -0,0 +1,5 @@ +@import "/eaterplanet_ecommerce/resource/css/excharge.wxss"; + +page { + font-size: 28rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.js b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.js new file mode 100644 index 0000000..d1dc023 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.js @@ -0,0 +1,120 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + loadText: '加载中', + loadMore: false, + noData: false, + state: ['提现中', '提现成功', '提现失败'] + }, + page: 1, + noMore: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.getData(); + }, + + /** + * 授权成功回调 + */ + authSuccess: function() { + let that = this; + this.setData({ + needAuth: false + }, () => { + that.getData(); + }) + }, + + getData: function() { + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'localtown.tixian_record', + token: token, + page: this.page + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = res.data.data; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list }) + } else { + // 无数据 + if (that.page == 1) that.setData({ noData: true }) + that.noMore = true; + that.setData({ loadMore: false }) + } + } + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function() { + let that = this; + util.check_login_new().then((res) => { + if (!res) { + wx.showModal({ + title: '提示', + content: '您还未登录', + showCancel: false, + success(res) { + if (res.confirm) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/user/me', + }) + } + } + }) + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + this.noMore || (this.setData({ loadMore: true }), this.getData()); + } +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.json b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.json new file mode 100644 index 0000000..f2a60e0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "提现记录", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxml b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxml new file mode 100644 index 0000000..7485215 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxml @@ -0,0 +1,22 @@ + + + + + 申请时间 + 状态 + 金额(元) + + + + {{item.addtime}} + {{state[item.state]}} + {{item.money}} + + + + + + 暂无任何明细记录 + + + diff --git a/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxss b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxss new file mode 100644 index 0000000..c151d7b --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/exchargeRecord.wxss @@ -0,0 +1,61 @@ + +.title { + left: 0; + right: 0; + display: flex; + align-items: center; + background-color: #fff; + color: #333; + line-height: 80rpx; + font-size: 28rpx; + text-align: center; + box-shadow: 1px 2px 3px rgba(0, 0, 0, .3); + font-weight: bold; +} + +.time { + flex: 3; +} + +.status { + flex: 1; +} + +.money { + flex: 2; +} + +.list { + padding-top: 80rpx; + text-align: center; + background-color: #fff; + font-size: 24rpx; +} + +.list-item { + position: relative; + display: flex; + align-items: center; + line-height: 76rpx; + border-bottom: 1rpx solid #efefef; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/rider/grab.js b/eaterplanet_ecommerce/moduleB/rider/grab.js new file mode 100644 index 0000000..4ab45e8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/grab.js @@ -0,0 +1,168 @@ +var app = getApp(); +var timer = null; +var location = require("../../utils/Location") +const bgMusic = wx.getBackgroundAudioManager(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + noData: 0 + }, + _onPlay: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + onReady: function() { + bgMusic.onEnded(()=>{ + this._onPlay = false; + }) + }, + + initFn: function(){ + timer = setInterval(()=>{ + this.getData(); + }, 1500) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.initFn(); + }, + + onHide: function () { + clearInterval(timer); + timer = null; + }, + + onUnload: function () { + clearInterval(timer); + timer = null; + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.get_localtown_delivery', { token }).then(res => { + let list = res.data || []; + if(res.new_order_notice==1 && !this._onPlay) { + this._onPlay = true; + bgMusic.src = "https://demo.ch871.com/assets/ep/mp3/click.mp3"; + bgMusic.title = '您有新订单'; + bgMusic.play() + } + this.setData({ + noData: false, + list + }) + }).catch(err => { + console.log(err) + if(err.code==2) { + this.setData({ + list: [], + noData: true + }) + return; + } + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + /** + * 查看地图 + */ + gotoMap: function (e) { + let idx = e.currentTarget.dataset.idx; + if(idx<0) { return; } + let list = this.data.list || []; + let item = list[idx]; + let longitude = parseFloat(item.member_lon), + latitude = parseFloat(item.member_lat), + name = item.shop_name, + address = item.member_address; + wx.openLocation({ + latitude: latitude, + longitude: longitude, + name: name, + address: address, + scale: 28 + }) + }, + + /** + * 抢单 + */ + rob: function(e){ + let order_id = e.currentTarget.dataset.orderid; + if(!order_id) { + app.util.message('订单ID错误', '', 'error'); + return; + } + let ps_lon=0, ps_lat=0; + location.getGps().then(res=>{ + console.log('经纬度结果', res); + if(res.errCode==2) { + console.log(res.errMsg) + app.util.message('请检查手机定位是否开启', '', 'error'); + return; + } + ps_lon = res.latitude + ps_lat = res.longitude + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.rob_distribution_order', { token, order_id, ps_lon, ps_lat }).then(res => { + app.util.message('抢单失败,请重试', '', 'error'); + this.getData(); + }).catch(err => { + if(err.code==1) { + app.util.message(err.msg || '抢单成功', '', 'error'); + } else { + app.util.message(err.msg || '抢单失败', '', 'error'); + } + this.getData(); + }) + }).catch(()=>{ + app.util.message('请先开启定位服务', '', 'error'); + return; + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/grab.json b/eaterplanet_ecommerce/moduleB/rider/grab.json new file mode 100644 index 0000000..e84da95 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/grab.json @@ -0,0 +1,9 @@ +{ + "navigationBarTitleText": "抢单", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index", + "i-empty": "../../components/empty/index", + "i-cashon_delivery": "../../components/cashon_delivery/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/grab.wxml b/eaterplanet_ecommerce/moduleB/rider/grab.wxml new file mode 100644 index 0000000..6d0d4a2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/grab.wxml @@ -0,0 +1,40 @@ + + + + + + 订单编号: {{item.order_num_alias}} + 货到付款 + + + {{item.shop_name}} + + + + + + + {{item.shop_address}} + + + + + {{item.member_address}} + + + + + 收货人:{{item.shipping_name}} + 下单时间:{{item.pay_time}} + 商家拣货完毕:{{item.order_delivery_time}} + {{item.delivery_note}} + + + 确认抢单 + + + +暂无订单~ + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/grab.wxss b/eaterplanet_ecommerce/moduleB/rider/grab.wxss new file mode 100644 index 0000000..9132917 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/grab.wxss @@ -0,0 +1,13 @@ +@import "/icon.wxss"; +@import "/common.wxss"; +@import 'tabbar.wxss'; + +.footer .btn { + background: #FED206; + padding: 12rpx 0; + text-align: center; + border-radius: 10rpx; + color: #000; + flex: 1; + margin: 0 30rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/index.js b/eaterplanet_ecommerce/moduleB/rider/index.js new file mode 100644 index 0000000..85ee805 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/index.js @@ -0,0 +1,163 @@ +// eaterplanet_ecommerce/moduleB/rider/index.js +var app = getApp(); +var location = require("../../utils/Location") + +Page({ + data: { + orderdistribution_info: {}, + waite_get_count: 0, + sending_count: 0, + sended_count: 0, + waite_send_list: [], + sending_send_list: [], + scale:'15', + controls:'40', + latitude:'', + longitude:'', + markers: [], + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + this.getMyLocal(); + }, + + onReady: function (e) { + this.mapCtx = wx.createMapContext('myMap') + }, + + getMyLocal: function() { + let that = this; + location.getGps().then(ret=>{ + that.setData({ + scale: 12, + longitude: ret.longitude, + latitude: ret.latitude + }) + // wx.getLocation({ + // type: 'wgs84', + // success: (res) => { + // console.log("getMyLocal",res) + // that.setData({ + // scale: 12, + // longitude: res.longitude, + // latitude: res.latitude + // }) + // } + // }); + }).catch(()=>{ + app.util.message('地图功能开启失败', '', 'error'); + }) + }, + + getMemberMarkers: function(listData) { + var market = []; + // 待取货 + if(listData[0] && listData[0].length) { + for (let item of listData[0]) { + let marker1 = this.createMarker(item); + market.push(marker1) + } + } + // 配送中 + if(listData[1] && listData[1].length) { + for (let item of listData[1]) { + let marker1 = this.createMarker(item, 1); + market.push(marker1) + } + } + return market; + }, + + createMarker: function(point, type=0) { + let latitude = point.shop_lat; + let longitude = point.shop_lon; + if(type==1){ + latitude = point.member_lat; + longitude = point.member_lon; + } + let marker = { + iconPath: type==0?"../images/location-red.png":"../images/location-green.png", + id: point.order_id+'_'+type, + title: type==0?'待取货':'配送中', + latitude, + longitude, + label:{ + anchorX: -12, + anchorY: 0, + content: type==0?'商家':'客户' + }, + width: 30, + height: 30 + }; + return marker; + }, + + markertap: function(e){ + console.log(e.detail) + }, + + controltap: function(e) { + this.moveToLocation() + }, + + moveToLocation: function () { + this.mapCtx.moveToLocation() + }, + + regionchange: function(){ + + }, + + onShow: function () { + this.getData(); + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.get_orderdistribution_info', { token }).then(res => { + let { orderdistribution_info, waite_get_count, sending_count, sended_count, waite_send_list, sending_send_list } = res.data; + let markers = this.getMemberMarkers([waite_send_list, sending_send_list]); + this.setData({ + orderdistribution_info, waite_get_count, sending_count, sended_count, waite_send_list, sending_send_list, markers + }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + goLink: function(event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + // 接单状态切换 + switchState: function(e){ + console.log(e.detail.value) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/index.json b/eaterplanet_ecommerce/moduleB/rider/index.json new file mode 100644 index 0000000..cd9cd49 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/index.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "配送员中心", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/index.wxml b/eaterplanet_ecommerce/moduleB/rider/index.wxml new file mode 100644 index 0000000..498fa7f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/index.wxml @@ -0,0 +1,50 @@ + + + + + + {{orderdistribution_info.username}} + {{orderdistribution_info.mobile}} + + + + + + + {{waite_get_count}} + 待取货 + + + {{sending_count}} + 配送中 + + + {{sended_count}} + 已送达 + + + + + + + + + 备注: + 待取货 + 配送中 + + + diff --git a/eaterplanet_ecommerce/moduleB/rider/index.wxss b/eaterplanet_ecommerce/moduleB/rider/index.wxss new file mode 100644 index 0000000..7f2c79a --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/index.wxss @@ -0,0 +1,16 @@ +@import "/icon.wxss"; +@import "/common.wxss"; +@import 'tabbar.wxss'; + +page { + font-size: 28rpx; +} + +switch { + zoom: 0.7; +} + +.map-tip-img { + width: 40rpx; + height: 40rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/me.js b/eaterplanet_ecommerce/moduleB/rider/me.js new file mode 100644 index 0000000..a964b41 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/me.js @@ -0,0 +1,71 @@ +var app = getApp(); + +Page({ + data: { + orderdistribution_info: {}, + can_tixian_money: 0 + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + + }, + + onShow: function () { + this.getData(); + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.get_distribution_center_info', { token }).then(res => { + let { orderdistribution_info, can_tixian_money } = res.data; + this.setData({ + orderdistribution_info, can_tixian_money + }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + goLink: function(event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + switchNotice: function(e){ + let token = wx.getStorageSync('token'); + let is_new_notice = e.detail.value?1:0; + app.util.ProReq('localtown.change_distribution_notice', { token, is_new_notice }).then(res => { + this.getData(); + }).catch(err => { + this.getData(); + console.log(err) + }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/me.json b/eaterplanet_ecommerce/moduleB/rider/me.json new file mode 100644 index 0000000..387dc53 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/me.json @@ -0,0 +1,6 @@ +{ + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/me.wxml b/eaterplanet_ecommerce/moduleB/rider/me.wxml new file mode 100644 index 0000000..4900f8e --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/me.wxml @@ -0,0 +1,30 @@ + + + + + + {{orderdistribution_info.username}} + {{orderdistribution_info.mobile}} + + + + 小程序来单语音通知 + + + + + + + {{can_tixian_money}} + 可提现金额(元) + + + + + + + 账户明细 + + + + diff --git a/eaterplanet_ecommerce/moduleB/rider/me.wxss b/eaterplanet_ecommerce/moduleB/rider/me.wxss new file mode 100644 index 0000000..45f9ff6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/me.wxss @@ -0,0 +1,26 @@ +@import "/icon.wxss"; +@import "/common.wxss"; +@import 'tabbar.wxss'; + +.money { + padding: 20rpx 30rpx; +} + +.icon-right { + width: 12rpx; + height: 22rpx; +} + +.recharge-money { + color: #ff758c; + font-size: 50rpx; +} + +.recharge-tip { + color: #999; + font-size: 24rpx; +} + +switch { + zoom: 0.7; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/order.js b/eaterplanet_ecommerce/moduleB/rider/order.js new file mode 100644 index 0000000..7e39e39 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/order.js @@ -0,0 +1,272 @@ +var app = getApp(); +var location = require("../../utils/Location") +// 0 =>'未付款,未配送',1=>'已付款,未被抢',2=>'已付款,待配送,已被抢单',3=>'已拿货,配送中',4=>'已送达',5=>'已取消' + +Page({ + data: { + tabs: [{ + id: 2, + name: '待取货' + }, + { + id: 3, + name: '配送中' + }, + { + id: 4, + name: '已送达' + } + ], + status: 2, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, + page: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let status = options.status || 2; + this.setData({ + status + }, () => { + this.initFn(); + }) + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + changeTabs: function (e) { + let that = this; + let status = e.currentTarget.dataset.type || 0; + this.page = 1; + this.setData({ + status, + list: [], + showEmpty: false, + loadMore: true + }, () => { + that.initFn(); + }) + }, + + initFn: function () { + this.page = 1; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + }, () => { + this.getData(); + }) + }, + + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let type = this.data.status; + + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'localtown.get_distribution_orderlist', + token, + type, + page: this.page, + }, + dataType: 'json', + success: function (res) { + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length == 0) { + if (that.page == 1) { + h.noData = 1; + } else { + h.loadMore = false; + h.noMore = false; + h.loadText = "没有更多记录了~" + } + } + if (list.length < 10) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ + list, + ...h + }) + } else if (res.data.code == 2) { + let h = {}; + h.loadMore = false; + h.noMore = false; + h.loadText = "没有更多记录了~"; + if(that.page==1) { h.noData = 1; } + that.setData(h) + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } + wx.hideLoading(); + } + }) + }, + + /** + * 查看地图 + */ + gotoMap: function (e) { + let idx = e.currentTarget.dataset.idx; + if (idx < 0) { + return; + } + let list = this.data.list || []; + let item = list[idx]; + let longitude = parseFloat(item.member_lon), + latitude = parseFloat(item.member_lat), + name = item.shop_name, + address = item.member_address; + wx.openLocation({ + latitude: latitude, + longitude: longitude, + name: name, + address: address, + scale: 28 + }) + }, + + /** + * 确认取货 + */ + pickup: function (e) { + this.preConfirm('确认已取到商品?').then(() => { + let order_id = e.currentTarget.dataset.orderid; + if (!order_id) { + app.util.message('订单ID错误', '', 'error'); + return; + } + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.distribution_deliverying_order', { + token, + order_id + }).then(res => { + app.util.message('取货失败,请重试', '', 'success'); + this.initFn(); + }).catch(err => { + app.util.message(err.msg || '取货成功', '', 'success'); + this.initFn(); + }) + }) + }, + + preConfirm: function (msg) { + return new Promise((resolve, reject) => { + wx.showModal({ + title: '提示', + content: msg, + confirmColor: '#FED206', + success: function (res) { + if (res.confirm) { + resolve() + } else { + console.log('用户点击了取消') + } + } + }) + }) + }, + + /** + * 确认送达 + */ + arrived: function (e) { + this.preConfirm('确认已送达商品?').then(() => { + let order_id = e.currentTarget.dataset.orderid; + if (!order_id) { + app.util.message('订单ID错误', '', 'error'); + return; + } + console.log('确认已送达商品 ---- 是'); + let ps_lon=0, ps_lat=0; + location.getGps().then(res=>{ + console.log('经纬度结果', res); + if(res.errCode==2) { + console.log(res.errMsg) + app.util.message('请检查手机定位是否开启', '', 'error'); + return; + } + ps_lon = res.latitude + ps_lat = res.longitude + let token = wx.getStorageSync('token'); + app.util.ProReq('localtown.distribution_arrived_order', { + token, + order_id, + ps_lon, + ps_lat + }).then(ret => { + console.log('确认失败,请重试', ret); + app.util.message('确认失败,请重试', '', 'success'); + this.initFn(); + }).catch(err => { + console.log('成功', err); + if(err.code==3) { + app.util.message(err.msg, '', 'error'); + } else { + app.util.message(err.msg || '确认成功', '', 'error'); + this.initFn(); + } + }) + }).catch(()=>{ + app.util.message('请先开启定位服务', '', 'error'); + return; + }) + }) + }, + + /** + * 联系商家 + */ + phoneCall: function (e) { + let phoneNumber = e.currentTarget.dataset.tel || ''; + phoneNumber && wx.makePhoneCall({ + phoneNumber, + complete: function () {} + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.initFn(); + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log(this.data.noMore) + this.data.loadMore && this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleB/rider/order.json b/eaterplanet_ecommerce/moduleB/rider/order.json new file mode 100644 index 0000000..6bd31eb --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/order.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "配送订单列表", + "navigationBarBackgroundColor": "#FED206", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-cashon_delivery": "../../components/cashon_delivery/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/rider/order.wxml b/eaterplanet_ecommerce/moduleB/rider/order.wxml new file mode 100644 index 0000000..fd8b4c6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/order.wxml @@ -0,0 +1,102 @@ + + + + + {{item.name}} + + + + + + + + 订单编号: {{item.order_num_alias}} + + + + + + + + {{goods.name}} + 货到付款 + + {{goods.option_str}}x{{goods.quantity}} + 小计¥{{goods.total}} + + + 合计¥{{item.order_info.total}} + + + {{item.shop_name}} + + + + + + {{item.shop_address}} + + + + + {{item.member_address}} + + + + + 收货人:{{item.shipping_name}} + 下单时间:{{item.pay_time}} + {{item.delivery_note}} + + + 联系商家 + 确认取货 + + + + + + 订单编号: {{item.order_num_alias}} + + + + + + + + {{goods.name}} + 货到付款 + + {{goods.option_str}}x{{goods.quantity}} + 小计¥{{goods.total}} + + + 合计¥{{item.order_info.total}} + + + + + {{item.shop_address}} + + + + + {{item.member_address}} + + + + + 收货人:{{item.shipping_name}} + + {{item.delivery_note}} + + + 联系客户 + 确认送达 + + + + + + 暂无订单~ + diff --git a/eaterplanet_ecommerce/moduleB/rider/order.wxss b/eaterplanet_ecommerce/moduleB/rider/order.wxss new file mode 100644 index 0000000..dddc6fc --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/order.wxss @@ -0,0 +1,50 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.nav-bar { + width: 100%; + left: 0; + z-index: 10; +} + +.nav-bar .nav-bar-inner { + display: flex; + justify-content: space-between; + padding: 0 40rpx; + background-color: white; + box-shadow: 0rpx 4rpx 8rpx 0rpx rgba(255, 255, 255, 0.25); +} + +.nav-bar .nav-bar-item { + position: relative; + word-break: keep-all; + font-size: 28rpx; + font-weight: 500; + color: #666; + padding: 20rpx 0; +} + +.nav-bar .current.nav-bar-item { + border-bottom: 3px solid #FED206; +} + +.nav-bar-content { + margin-top: 49px; + padding-bottom: 30rpx; +} + +.footer .btn { + background: #FED206; + padding: 12rpx 0; + text-align: center; + border-radius: 10rpx; + color: #000; + flex: 1; + margin: 0 30rpx; +} + +.goods .img { + width: 120rpx; + height: 120rpx; + margin-right: 10rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/rider/tabbar.wxml b/eaterplanet_ecommerce/moduleB/rider/tabbar.wxml new file mode 100644 index 0000000..e9683f2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/tabbar.wxml @@ -0,0 +1,22 @@ + diff --git a/eaterplanet_ecommerce/moduleB/rider/tabbar.wxss b/eaterplanet_ecommerce/moduleB/rider/tabbar.wxss new file mode 100644 index 0000000..4e95783 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/rider/tabbar.wxss @@ -0,0 +1,32 @@ +.tabbar { + line-height: 1; +} + +.tabbar.active { + color: #fe8464; +} + +.tabbar .iconfont { + font-size: 44rpx; +} + +.tabbar-home { + display: flex; + flex-direction: column; + justify-content: flex-end; +} + +.tabbar-home .iconfont { + display: inline-block; + position: absolute; + background: #fe8464; + border-radius: 50%; + width: 100rpx; + height: 100rpx; + line-height: 100rpx; + border: 10rpx solid #fff; + top: -50rpx; + left: 50%; + margin-left: -60rpx; + color: #fff; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/changePrice.js b/eaterplanet_ecommerce/moduleB/supply/changePrice.js new file mode 100644 index 0000000..54572e3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/changePrice.js @@ -0,0 +1,167 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + orders: '', + order_goods: [], + priceArr: [], + orderGoodsIdArr: [], + goodsTot: 0, + changePrice: 0 + }, + id: 0, + cansub: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let id = options.order_id || ''; + if(!id) { + app.util.message('参数错误', '/eaterplanet_ecommerce/moduleB/supply/orderManage', 'error'); + return; + } + this.id = id; + this.getData(id); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + getData: function(order_id) { + wx.showLoading(); + let token = wx.getStorageSync('token'); + app.util.ProReq('order.order_change', {token, order_id, is_supply: 1}).then(res=>{ + let orders = res.orders; + let order_goods = res.order_goods; + let priceArr = []; + let orderGoodsIdArr = []; + order_goods.forEach(item=>{ + orderGoodsIdArr.push(item.order_goods_id); + priceArr.push(0); + }) + this.calcGoodsPrice(priceArr, orders); + this.setData({ + orders, + order_goods, + priceArr, + orderGoodsIdArr + }) + }).catch(err=>{ + app.util.message(err.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + reduceIpt: function(e) { + let type = e.currentTarget.dataset.type; + let idx = e.currentTarget.dataset.idx; + let { priceArr, order_goods } = this.data; + let goodItem = order_goods[idx]; + let curPrice = priceArr[idx]*1; + let max = goodItem.max_total*1; + let min = -max; + if(type=='add') { + priceArr[idx] = (curPrice+1).toFixed(2); + } else { + if((curPrice-1){ + changePrice += item*1; + }) + console.log(old_price) + buyer_total += changePrice; + changePrice += orders.changeprice*1; + this.setData({ + goodsTot: (old_price+changePrice).toFixed(2), + changePrice: changePrice.toFixed(2), + buyer_total: buyer_total.toFixed(2) + }) + }, + + subChange: function() { + if(!this.cansub) return; + this.cansub = false; + wx.showLoading(); + let token = wx.getStorageSync('token'); + let order_id = this.id; + let { priceArr, orderGoodsIdArr } = this.data; + let order_goods_id = orderGoodsIdArr.join(','); + let change_price = priceArr.join(','); + app.util.ProReq('order.order_changeprice', {token, order_id, is_supply: 1, order_goods_id,change_price}).then(res=>{ + wx.showToast({ + title: "改价成功", + icon: "none" + }) + setTimeout(() => { + this.getData(order_id); + this.cansub = true; + }, 1500); + }).catch(err=>{ + this.cansub = true; + app.util.message(err.msg, '', 'error'); + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/changePrice.json b/eaterplanet_ecommerce/moduleB/supply/changePrice.json new file mode 100644 index 0000000..4a21511 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/changePrice.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "订单改价", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-input-number": "../../components/input-number/index", + "i-fixed-bottom": "../../components/fixed-bottom/index", + "i-img": "../../components/img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/changePrice.wxml b/eaterplanet_ecommerce/moduleB/supply/changePrice.wxml new file mode 100644 index 0000000..87944a2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/changePrice.wxml @@ -0,0 +1,71 @@ + + + + + + + + + {{goods.name}} + ¥{{goods.price}} x{{goods.quantity}} + 小计:{{goods.old_total}} + + + + 最多可减金额 + ¥{{goods.max_total}} + + + 涨价或减价 + + + + + + + + + + + + + + 注:只有在订单未付款时才支持改价,商品改价后价格不能小于 0 元,订单修改的价格不包含优惠信息,运费价格是 0 的时候商品免运费 + 买家实付 = 原价 + 运费 + 涨价或减价 - 优惠 + + + 原价 + + ¥{{orders.old_price}} + + + 运费 + + ¥{{orders.shipping_fare}} + + + 涨价或减价 + {{changePrice>=0?'+':'-'}} ¥{{changePrice>=0?changePrice:-changePrice}} + + + 优惠 + - ¥{{orders.youhui_total}} + + + + 买家实付: ¥{{buyer_total}} + + + + + + + + + + 商品改价: + +¥{{changePrice}} + -¥{{-changePrice}} + + 确认改价 + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/changePrice.wxss b/eaterplanet_ecommerce/moduleB/supply/changePrice.wxss new file mode 100644 index 0000000..4d556bf --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/changePrice.wxss @@ -0,0 +1,19 @@ +.item .img-class { + width: 160rpx; + height: 160rpx; + overflow: hidden; +} + +.btn { + color: #ffffff; + padding: 25rpx 40rpx; + font-size: 30rpx; +} + +.iptbtn { + font-size: 44rpx; +} + +.iptnum { + width: 120rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/components/selectRider.js b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.js new file mode 100644 index 0000000..588a6b0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.js @@ -0,0 +1,117 @@ +var app = getApp(); +Component({ + /** + * 组件的属性列表 + */ + properties: { + order_id: { + type: String, + value: 0 + }, + show: { + type: Boolean, + value: false + } + }, + + /** + * 组件的初始数据 + */ + data: { + list: [] + }, + + attached() { + this.initFn() + }, + + /** + * 组件的方法列表 + */ + methods: { + initFn: function(keyword=''){ + this.page = 1; + this.keyword = keyword; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + },()=>{ + this.getData(); + }) + }, + + goResult: function(e) { + let keyword = e.detail.value.replace(/\s+/g, ''); + this.initFn(keyword); + }, + + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let order_id = this.data.order_id; + let keyword = this.keyword; + + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.choosemember', + token, + is_supply: 1, + order_id, + page: this.page, + keyword + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 10) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else if(res.data.code==2) { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } else { + let h = {}; + if(that.page==1) h.noData = 1; + h.loadMore = false; + h.noMore = false; + h.loadText = "没有更多记录了~"; + that.setData( h ) + } + wx.hideLoading(); + } + }) + }, + + toLower: function() { + if (!this.data.loadMore) return false; + this.getData(); + }, + + selectItem: function(e) { + let distribution_id = e.currentTarget.dataset.id || ''; + let order_id = this.data.order_id; + let token = wx.getStorageSync('token'); + wx.showLoading(); + order_id && app.util.ProReq('order.sub_orderchoose_distribution', {token, order_id, distribution_id, is_supply: 1}).then(res=>{ + wx.showToast({ title: '设置成功' }) + setTimeout(()=>{ + this.triggerEvent('update'); + }, 1500) + }).catch(err=>{ + this.triggerEvent('update'); + app.util.message(err.msg, '', 'error'); + }) + }, + + close: function() { + this.triggerEvent('close'); + } + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/components/selectRider.json b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.json new file mode 100644 index 0000000..1ce7f3f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.json @@ -0,0 +1,7 @@ +{ + "component": true, + "usingComponents": { + "i-load-more": "../../../components/load-more/index", + "i-modal": "../../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxml b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxml new file mode 100644 index 0000000..ad9e216 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxml @@ -0,0 +1,27 @@ + + + + 选择配送员 + + + + + + + + + + + + + {{item.username}} + {{item.mobile}} + + + 选择 + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxss b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxss new file mode 100644 index 0000000..48dfd48 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/components/selectRider.wxss @@ -0,0 +1,33 @@ +@import "/common.wxss"; +@import "/icon.wxss"; + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; + margin: 10rpx 30rpx; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/editSku.js b/eaterplanet_ecommerce/moduleB/supply/editSku.js new file mode 100644 index 0000000..5aecfcd --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/editSku.js @@ -0,0 +1,86 @@ +let app = getApp(); +Page({ + data: { + need_data: [] + }, + goods_id: 0, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + let id = options.id || ''; + if(!id) { + app.util.message('参数错误', '/eaterplanet_ecommerce/moduleB/supply/goodsManage', 'error'); + return; + } + this.goods_id = id; + }, + + onShow: function () { + this.getData(); + }, + + formSubmit: function(e) { + console.log(e.detail.value) + let res = e.detail.value || {}; + let resArr = []; + Object.keys(res).forEach(k=>{ + if(res[k]) { + let idsArr = k.split("_"); + let num = parseInt(res[k]); + if(num!=='') { + let ids = idsArr[1]+'_'+num; + resArr.push(ids); + } + } + }) + if(resArr.length==0) { + return wx.showToast({ + title: '请输入修改数量', + icon: 'none' + }) + } + + let sku_list_str = resArr.join(','); + let token = wx.getStorageSync('token'); + let params = { + token, + goods_id: this.goods_id, + is_has_option: 1, + sku_list_str + }; + app.util.ProReq('supplymobile.modify_supply_goods_quantity', params).then(res=>{ + app.util.message(res.msg || '修改成功', 'redirect:/eaterplanet_ecommerce/moduleB/supply/goodsManage', 'error'); + }).catch(err=>{ + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + getData: function() { + let token = wx.getStorageSync('token'); + let params = { + token, + goods_id: this.goods_id + }; + app.util.ProReq('supplymobile.get_supply_goods_sku', params).then(res=>{ + let { goods_stock_notice, need_data } = res; + this.setData({ goods_stock_notice, need_data }) + }).catch(err=>{ + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/editSku.json b/eaterplanet_ecommerce/moduleB/supply/editSku.json new file mode 100644 index 0000000..5f5b29e --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/editSku.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "修改库存", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/editSku.wxml b/eaterplanet_ecommerce/moduleB/supply/editSku.wxml new file mode 100644 index 0000000..a5721c3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/editSku.wxml @@ -0,0 +1,23 @@ + + + + 名称 + 剩余库存 + 修改库存 + + +
+ + {{item.title}} + {{item.stock}} + + + + + + + + +
+
+
diff --git a/eaterplanet_ecommerce/moduleB/supply/editSku.wxss b/eaterplanet_ecommerce/moduleB/supply/editSku.wxss new file mode 100644 index 0000000..1f253ad --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/editSku.wxss @@ -0,0 +1,15 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.w100 { + width:200rpx; +} + +.btn-area { + margin-top: 30rpx; +} + +.btn-area button { + background: #fe8464; + color: #fff; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/excharge.js b/eaterplanet_ecommerce/moduleB/supply/excharge.js new file mode 100644 index 0000000..7f190a8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/excharge.js @@ -0,0 +1,256 @@ +var app = getApp(); + +Page({ + mixins: [require('../../mixin/commonMixin.js')], + data: { + type: 1, + tixian_money: '', + final_money: 0 + }, + canTixian: true, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + onShow: function () { + wx.showLoading(); + this.getData(); + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('supplymobile.supply_managemoney_panel', { token }).then(res => { + let { + supply_min_apply_money, + supply_commiss, + tixian_waylist, + supply_tixian_free, + supply_tixian_notice + } = res.data; + + // 查询是否有自定义选中 没有则第一个显示的 + let type = 0; + let tixian_waylist_keys = Object.keys(tixian_waylist); + tixian_waylist_keys.forEach(item=>{ + if (tixian_waylist[item].is_default_check) { + type = item; + return + } + }) + + if(type==0) { + try { + tixian_waylist_keys.forEach(item=>{ + if (tixian_waylist[item].is_show==1) { + type = item; + tixian_waylist[item].is_default_check = 1; + throw Error(); + } + }) + } catch (e) { + } + } + + this.setData({ + type, + supply_min_apply_money, + supply_commiss, + tixian_waylist, + supply_tixian_free, + supply_tixian_notice + }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + formSubmit: function (e) { + const params = e.detail.value; + let isNull = 0; + let { type, tixian_money, supply_commiss, supply_min_apply_money, supply_tixian_free } = this.data; + let errortip = [{}, { + account: '微信真实姓名' + }, { + bankusername: '支付宝真实姓名', + account: '支付宝账户' + }, { + card_name: '银行卡名称', + card_username: '持卡人姓名', + account: '银行卡账户' + }, { + account: '微信真实姓名' + }]; + for (let item in params) { + params[item] = params[item].replace(/(^\s*)|(\s*$)/g, ""); + if (!params[item]) { + const itemTip = errortip[type][item]; + wx.showToast({ + title: '请输入' + (itemTip || '正确的表单内容'), + icon: 'none' + }) + isNull = 1; + break; + } + if (item == 'money' && params[item] * 1 <= 0) { + wx.showToast({ + title: '请输入正确的金额', + icon: 'none' + }) + return; + } + } + + if (isNull == 1) return; + params.type = type; + + tixian_money = parseFloat(tixian_money); + let max_tixian_money = supply_commiss.money; + supply_min_apply_money = parseFloat(supply_min_apply_money); + + if (tixian_money == '' || supply_min_apply_money > tixian_money) { + wx.showToast({ + title: '最小提现' + supply_min_apply_money + '元', + icon: "none", + }) + return false; + } + + if (tixian_money > max_tixian_money) { + wx.showToast({ + title: '本次最大可提现' + max_tixian_money + '元', + icon: "none", + }) + let final_money = (max_tixian_money * (100 - supply_tixian_free) / 100).toFixed(2); + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money + }) + return false; + } + + if (!this.canTixian) return; + this.canTixian = false; + + wx.showLoading(); + var token = wx.getStorageSync('token'); + let that = this; + let data = { + supply_apply_type: params.type, + account: params.account || '', + card_name: params.card_name || '', + card_username: params.card_username || '', + ti_money: params.money, + token + } + app.util.ProReq('supplymobile.supply_applymoney', data).then(res => { + wx.showToast({ + title: '已提交申请', + icon: 'none', + success: function () { + that.canTixian = true; + that.setData({ + canPay: false, + tixian_money: '', + final_money: 0 + }) + that.getData(); + } + }) + }).catch(err=>{ + that.canTixian = true; + wx.showToast({ + title: err.msg || '提交失败,请重试', + icon: 'none' + }) + }) + }, + + /** + * 获得焦点 + */ + bindIptFocus: function () { + this.setData({ + onFocus: true + }) + }, + + /** + * 失去焦点 + */ + bindIptBlur: function () { + this.setData({ + onFocus: false + }) + }, + + radioChange(e) { + this.setData({ + type: e.detail.value + }) + }, + + bindTixianMoneyInput: function (t) { + let max_val = this.data.supply_commiss.money; + var value = t.detail.value; + if (!(/^(\d?)+(\.\d{0,2})?$/.test(value))) { + value = value.substring(0, value.length - 1); + value = parseFloat(value); + } + + if (value > max_val) { + wx.showToast({ + title: '本次最大可提现' + max_val + '元', + icon: "none", + }) + } + let fee = this.data.supply_tixian_free; + let val = parseFloat(value) > 0 ? parseFloat(value) : 0; + let final_money = (val * (100 - fee) / 100).toFixed(2); + + let canPay = false; + value ? canPay = true : canPay = false; + + this.setData({ + tixian_money: value, + final_money: final_money, + canPay + }) + return value; + }, + + getAll: function () { + const tdata = this.data; + var max_tixian_money = tdata.supply_commiss.money * 1; + let fee = tdata.supply_tixian_free; + let final_money = (max_tixian_money * (100 - fee) / 100).toFixed(2); + + let canPay = false; + max_tixian_money ? canPay = true : canPay = false; + this.setData({ + tixian_money: max_tixian_money, + final_money: final_money, + canPay + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/excharge.json b/eaterplanet_ecommerce/moduleB/supply/excharge.json new file mode 100644 index 0000000..a2b483d --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/excharge.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "提现", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/excharge.wxml b/eaterplanet_ecommerce/moduleB/supply/excharge.wxml new file mode 100644 index 0000000..dd0adaf --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/excharge.wxml @@ -0,0 +1,58 @@ + + + + + {{supply_commiss.money}} + 可提现金额(元) + + 提现记录 + +
+ + + + 全部提现 + + + + 最低提现金额: {{supply_min_apply_money}} 手续费: {{supply_tixian_free+'%'}} 最终到账: {{final_money}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + 提现规则: + + + + +
diff --git a/eaterplanet_ecommerce/moduleB/supply/excharge.wxss b/eaterplanet_ecommerce/moduleB/supply/excharge.wxss new file mode 100644 index 0000000..0f4d806 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/excharge.wxss @@ -0,0 +1,17 @@ +@import "/eaterplanet_ecommerce/resource/css/excharge.wxss"; + +.wrap { + font-size: 28rpx; +} + +.form-group label { + display: flex; + font-size: 26rpx; + align-items: center; + padding: 5rpx 0 15rpx; +} + +.form-group label input { + flex: 1; + border: 0; +} diff --git a/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.js b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.js new file mode 100644 index 0000000..847be83 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.js @@ -0,0 +1,76 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + list: [], + loadText: '加载中', + loadMore: false, + noData: false + }, + page: 1, + noMore: false, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function(options) { + this.getData(); + }, + + getData: function() { + wx.showLoading(); + var token = wx.getStorageSync('token'); + app.util.ProReq('supplymobile.supply_apply_flowlist', { token, page: this.page }).then(res => { + let list = res.data; + let oldList = this.data.list; + list = oldList.concat(list); + this.page++; + this.setData({ list }) + }).catch(err => { + console.log(err) + if(err.code==1) { + let h = {}; + if (this.page == 1) h.noData=true; + this.noMore = true; + h.loadMore = false; + this.setData(h) + } else { + app.util.message(err.msg || '请求出错', '', 'error'); + } + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function() { + this.noMore || (this.setData({ loadMore: true }), this.getData()); + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.json b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.json new file mode 100644 index 0000000..f2a60e0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "提现记录", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxml b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxml new file mode 100644 index 0000000..20e3607 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxml @@ -0,0 +1,22 @@ + + + + + 申请时间 + 状态 + 金额(元) + + + + {{item.addtime}} + {{item.state_str}} + {{item.money}} + + + + + + 暂无任何明细记录 + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxss b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxss new file mode 100644 index 0000000..eb60357 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/exchargeRecord.wxss @@ -0,0 +1,60 @@ + +.title { + left: 0; + right: 0; + display: flex; + align-items: center; + background-color: #fff; + color: #333; + line-height: 80rpx; + font-size: 28rpx; + text-align: center; + font-weight: bold; +} + +.time { + flex: 3; +} + +.status { + flex: 1; +} + +.money { + flex: 2; +} + +.list { + padding-top: 80rpx; + text-align: center; + background-color: #fff; + font-size: 24rpx; +} + +.list-item { + position: relative; + display: flex; + align-items: center; + line-height: 76rpx; + border-bottom: 1rpx solid #efefef; +} + +.noDistributionList { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; + margin-top: 200rpx; +} + +.noDistributionList .noDistributionListImg { + width: 218rpx; + height: 218rpx; + margin-bottom: 32rpx; +} + +.noDistributionList .noDistributionListTit { + font-size: 30rpx; + color: #666; + line-height: 30rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/supply/goodsManage.js b/eaterplanet_ecommerce/moduleB/supply/goodsManage.js new file mode 100644 index 0000000..9be2954 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/goodsManage.js @@ -0,0 +1,407 @@ +var app = getApp(); + +Page({ + data: { + placeholdeImg: app.globalData.placeholdeImg, + navList: [{ + name: "出售中", + status: "1" + }, { + name: "库存预警", + status: "8" + }, { + name: "已下架", + status: "0" + }, { + name: "待审核", + status: "4" + } + ], + currentTab: 1, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + showActionsheet: false, + groups: [ + { text: '删除', type: 'warn', value: 1 }, + { text: '下架', value: 2 }, + { text: '修改库存', value: 5 } + // { text: '编辑', value: 3 } + ], + buttons: [{text: '取消'}, {text: '确定'}], + editSkuNum: 0 + }, + page: 1, + keywords: '', + goodsId: '', //当前操作的商品id + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + let currentTab = options.status || 1; + this.setData({ + currentTab + }, ()=>{ + this.initFn(); + }) + }, + + initFn: function(keywords=''){ + this.page = 1; + this.keywords = keywords; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + },()=>{ + this.getData(); + }) + }, + + /** + * 切换导航 + */ + switchNav: function (e) { + let that = this; + let curIdx = e.target.dataset.current*1; + if (this.data.currentTab === curIdx) return false; + let groups = [ + { text: '删除', type: 'warn', value: 1 }, + { text: '下架', value: 2 }, + { text: '修改库存', value: 5 } + // { text: '编辑', value: 3 } + ] + if(curIdx==0) { + groups = [ + { text: '删除', type: 'warn', value: 1 }, + { text: '上架', value: 4 }, + { text: '修改库存', value: 5 } + // { text: '编辑', value: 3 } + ] + } else if(curIdx==4){ + groups = [ + { text: '删除', type: 'warn', value: 1 }, + { text: '修改库存', value: 5 } + // { text: '编辑', value: 3 } + ] + } else if(curIdx==8){ + groups = [ + { text: '删除', type: 'warn', value: 1 }, + { text: '下架', value: 2 }, + { text: '修改库存', value: 5 } + ] + } + + this.setData({ + currentTab: 1 * e.target.dataset.current, + groups + }, ()=>{ + that.initFn(); + }); + }, + + goResult: function(e) { + let keyword = e.detail.value.replace(/\s+/g, ''); + // if (!keyword) { + // wx.showToast({ + // title: '请输入关键词', + // icon: 'none' + // }) + // return; + // } + this.initFn(keyword); + }, + + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let grounding = this.data.currentTab; + let keywords = this.keywords; + + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'supplymobile.get_supply_goodslist', + token, + grounding, + page: this.page, + keywords + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length == 0) { + if(that.page==1) { + h.noData = 1; + } else { + h.loadMore = false; + h.noMore = false; + h.loadText = "没有更多记录了~" + } + } + if (list.length < 10) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } + wx.hideLoading(); + } + }) + }, + + handleActionsheet: function (e) { + let idx = (e && e.currentTarget.dataset.index) || 0; + let id = (e && e.currentTarget.dataset.id) || 0; + let list = this.data.list; + let goodsItem = list[idx]; + let h = {}; + if(id) { h.goodsItem = goodsItem } + this.setData({ + showActionsheet: !this.data.showActionsheet, + ...h + }) + }, + + handleBtn(e) { + let goodsItem = this.data.goodsItem; + let goodsId = goodsItem.id; + let hasoption = goodsItem.hasoption; + let type = e.detail.value; // 1删除 2下架 3编辑 4上下架 5修改库存 + this.handleActionsheet(); + switch(type) { + case 1: + this.actionConfirm('是否删除该商品').then(()=>{ + this.delGoods(goodsId) + }); + break; + case 2: + this.actionConfirm('是否下架该商品').then(()=>{ + this.undercarriage(goodsId) + }); + break; + case 3: + console.log('3编辑') + break; + case 4: + this.actionConfirm('是否上架该商品').then(()=>{ + this.upcarriage(goodsId) + }); + break; + case 5: + // 修改库存 + if(hasoption==1) { + wx.navigateTo({ url: `/eaterplanet_ecommerce/moduleB/supply/editSku?id=${goodsId}` }) + } else { + // 显示弹窗 + this.setData({ editSkuVisible: true, editSkuNum: goodsItem.total || 0 }) + } + break; + default: + console.log('默认操作') + } + }, + + /** + * 下架 + * @param {*} goods_id + */ + undercarriage: function (goods_id) { + let that = this; + let token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'supplymobile.down_supply_goods', + token, + goods_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = that.data.list || []; + list = list.filter(item=>item.id!=goods_id); + let h = {}; + if(list.length==0) h.noData = 1; + h.list = list; + that.setData(h); + wx.showToast({ + title: '下架成功', + icon: 'none' + }) + } else { + app.util.message(res.data.msg, '', 'error'); + } + } + }) + }, + + /** + * 上架 + * @param {*} goods_id + */ + upcarriage: function (goods_id) { + let that = this; + let token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'supplymobile.up_supply_goods', + token, + goods_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = that.data.list || []; + list = list.filter(item=>item.id!=goods_id); + let h = {}; + if(list.length==0) h.noData = 1; + h.list = list; + that.setData(h); + wx.showToast({ + title: '上架成功', + icon: 'none' + }) + } else { + that.initFn(); + app.util.message(res.data.msg, '', 'error'); + } + } + }) + }, + + delGoods: function (goods_id) { + let that = this; + let token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'supplymobile.delete_supply_goods', + token, + goods_id + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + if (res.data.code == 0) { + let list = that.data.list || []; + list = list.filter(item=>item.id!=goods_id); + let h = {}; + if(list.length==0) h.noData = 1; + h.list = list; + that.setData(h); + wx.showToast({ + title: '删除成功', + icon: 'none' + }) + } else { + app.util.message(res.data.msg, '', 'error'); + } + } + }) + }, + + actionConfirm: function(content) { + return new Promise((resolve, reject)=>{ + wx.showModal({ + title: '提示', + content, + showCancel: true, + success: (result) => { + if (result.confirm) { + resolve(); + } else if (result.cancel) { + console.log('用户点击取消') + } + } + }) + }) + }, + + /** + * 修改库存 + */ + editSku: function(e){ + if(e.detail.index==0) { + this.setData({ editSkuVisible: false }) + } else { + let editSkuNum = this.data.editSkuNum; + if(editSkuNum==='') { + return wx.showToast({ + title: '请输入正确的数量', + icon: 'none' + }) + } + this.subSku(); + } + }, + + subSku: function(){ + let goodsItem = this.data.goodsItem; + let goodsId = goodsItem.id; + console.log(goodsId); + let editSkuNum = this.data.editSkuNum; + let token = wx.getStorageSync('token'); + let params = { + token, + goods_id: goodsId, + is_has_option: 0, + quantity: editSkuNum + }; + app.util.ProReq('supplymobile.modify_supply_goods_quantity', params).then(res=>{ + let list = this.data.list || []; + list.map(item=>{ if(item.id == goodsId) item.total = editSkuNum; }) + this.setData({ list, editSkuVisible: false, editSkuNum: 0, goodsItem: '' }) + }).catch(err=>{ + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + bindSkuIpt: function(e) { + let val = e.detail.value || 0; + this.setData({ editSkuNum: parseInt(val) }); + return parseInt(val) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/goodsManage.json b/eaterplanet_ecommerce/moduleB/supply/goodsManage.json new file mode 100644 index 0000000..32e064c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/goodsManage.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "商品管理", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-fixed-bottom": "../../components/fixed-bottom/index", + "mp-actionSheet": "../../components/actionsheet/actionsheet", + "mp-dialog": "../../components/mp-dialog/dialog" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxml b/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxml new file mode 100644 index 0000000..94fc1a0 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxml @@ -0,0 +1,41 @@ + + + + + {{item.name}} + + + + + + + + + + + + + + + {{item.goodsname}} + ¥{{item.price}} + 库存:{{item.total}} + + + + + + 暂无商品~ + + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxss b/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxss new file mode 100644 index 0000000..56e5412 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/goodsManage.wxss @@ -0,0 +1,79 @@ +@import 'tabbar.wxss'; + +.nav { + left: 0; + right: 0; + transition: top 0.3s; + z-index: 10; + background: #fff; + height: 92rpx; + border-bottom: 2rpx solid #f2f2f2; + padding: 0 60rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.nav .orderList_item { + font-size: 28rpx; + font-family: PingFangSC-Medium; + font-weight: 500; + color: #666; + position: relative; + height: 94rpx; + line-height: 94rpx; +} + +.nav .on { + position: relative; + color: #fe8464; + border-bottom: 4rpx solid #fe8464; +} + +/* 搜索 */ +.search-bar { + padding: 12rpx 25rpx; + background-color: #fff; + width: 100%; + box-sizing: border-box; +} + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} + +.item .img-class { + width: 160rpx; + height: 160rpx; + overflow: hidden; +} + +.search-bar { + font-size: 28rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/supply/index.js b/eaterplanet_ecommerce/moduleB/supply/index.js new file mode 100644 index 0000000..643f72c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/index.js @@ -0,0 +1,99 @@ +var app = getApp(); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + isIpx: app.globalData.isIpx, + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + getData: function(){ + let that = this; + const token = wx.getStorageSync('token'); + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'supplymobile.supplyindex_info', + token + }, + dataType: 'json', + success: function(res) { + wx.hideLoading(); + if (res.data.code == 0) { + let { + supply_info, + wait_send_count, + wait_refund_count, + today_order_count, + yestday_order_count, + total_order_count, + wait_statement_money, + has_statement_money, + has_get_money + } = res.data.data; + + that.setData({ + supply_info, + wait_send_count, + wait_refund_count, + today_order_count, + yestday_order_count, + total_order_count, + wait_statement_money, + has_statement_money, + has_get_money + }); + } else { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } + } + }) + }, + + goLink: function (event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/index.json b/eaterplanet_ecommerce/moduleB/supply/index.json new file mode 100644 index 0000000..01e6fa3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/index.json @@ -0,0 +1,8 @@ +{ + "navigationBarTitleText": "商户管理中心", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/index.wxml b/eaterplanet_ecommerce/moduleB/supply/index.wxml new file mode 100644 index 0000000..925908c --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/index.wxml @@ -0,0 +1,91 @@ + + + + + + + + + + {{supply_info.shopname}} + + + + + + + 销售数据 + + + + {{today_order_count}} + 今日订单 + + + {{yestday_order_count}} + 昨日订单 + + + {{total_order_count}} + 总订单数 + + + + + + + + + {{wait_statement_money}} + + 待结算(元) + + + + {{has_statement_money}} + + 已结算(元) + + + + {{has_get_money}} + + 已提现(元) + + + + + + + + + + 我的订单 + + 查看全部 + + + + + + 0 + + 库存预警 + + + {{wait_send_count}} + + 待发货 + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/index.wxss b/eaterplanet_ecommerce/moduleB/supply/index.wxss new file mode 100644 index 0000000..63c9948 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/index.wxss @@ -0,0 +1,240 @@ +@import 'tabbar.wxss'; + +.groupCenter { + width: 100%; + position: relative; + overflow: hidden; +} + +.groupCenter .basicInform { + width: 100%; + height: 226rpx; + background: #fe8464; + display: flex; + justify-content: flex-start; +} + +.groupCenter .basicInform .user-avatar { + width: 144rpx; + height: 144rpx; + margin: 10rpx 30rpx 0; +} + +.groupCenter .basicInform .user-avatar .userAvatarUrl { + border-radius: 50%; + width: 140rpx; + height: 140rpx; + border: 2rpx solid rgba(255, 255, 255, 0.24); + overflow: hidden; + display: flex; +} + +.groupCenter .basicInform .userInfo { + display: flex; + flex-direction: column; + padding-top: 10rpx; +} + +.groupCenter .basicInform .userInfo .user-name { + height: 40rpx; + line-height: 40rpx; + color: #fff; + font-size: 40rpx; + margin-top: 45rpx; +} + +.groupCenter .distributionCon { + width: 100%; + margin-top: -30rpx; + z-index: 9; +} + +.groupCenter .distributionCon .distribution { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 0; +} + +.groupCenter .distributionCon .distribution .myDistribution { + display: flex; + justify-content: center; + align-items: center; + font-size: 30rpx; + color: #333; + font-weight: 500; +} + +.groupCenter .distributionCon .distribution .incomeCon { + margin-top: 30rpx; + display: flex; + justify-content: flex-start; +} + +.groupCenter .distributionCon .distribution .incomeCon .income { + width: 33.3%; + padding: 20rpx 0; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .distributionCon .distribution .incomeCon .income:last-child { + border: none; +} + +.groupCenter .distributionCon .distribution .incomeCon .income .incomeTop { + font-size: 36rpx; + color: #ff673f; + margin-bottom: 16rpx; + font-weight: 500; +} + +.groupCenter .distributionCon .distribution .incomeCon .income .incomeBottom { + font-size: 24rpx; + color: #999; +} + +.groupCenter .effectData { + width: 100%; + margin-top: 30rpx; +} + +.groupCenter .effectData .effect { + background: #fff; + border-radius: 10rpx; + padding: 24rpx 0; + margin: 0 20rpx; +} + +.groupCenter .effectData .effect .incomeCon { + margin-top: 30rpx; + display: flex; + justify-content: flex-start; +} + +.groupCenter .effectData .effect .incomeCon .income { + width: 33.3%; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .effectData .effect .incomeCon .income:last-child { + border: none; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeTop { + font-size: 36rpx; + color: #333; + margin-bottom: 16rpx; + font-weight: 500; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeBottom { + font-size: 24rpx; + color: #999; + display: flex; + justify-content: center; + align-items: center; +} + +.groupCenter .effectData .effect .incomeCon .income .incomeBottom .distributionInstrIcon { + width: 28rpx; + height: 28rpx; + margin-right: 8rpx; +} + +.groupCenter .groupCenterCon { + margin-top: 30rpx; +} + +.groupCenter .groupCenterCon .order .myOrders { + height: 90rpx; + border-top-right-radius: 10rpx; + border-top-left-radius: 10rpx; + background: #fff; + border-bottom: 0.1rpx solid #e4e4e4; + padding: 0 30rpx; + font-size: 30rpx; + color: #333; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .groupCenterCon .order .myOrders .allGroupOrder { + font-size: 26rpx; + color: #999; +} + +.groupCenter .groupCenterCon .order .myOrders .allGroupOrder .rightArrowImg { + width: 12rpx; + height: 22rpx; + color: #a7a7a7; + margin-left: 14rpx; + margin-bottom: -2rpx; +} + +.groupCenter .groupCenterCon .order .orderTab { + padding: 30rpx 52rpx; + background-color: #fff; + overflow: hidden; + border-radius: 10rpx; + display: flex; + align-items: center; + justify-content: space-between; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status { + position: relative; + color: #58595b; + font-size: 26rpx; + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .num { + width: 34rpx; + height: 34rpx; + background: #fff; + font-size: 22rpx; + color: #fff; + background: #ff6557; + border-radius: 50%; + position: absolute; + right: 0; + top: -14rpx; + display: flex; + justify-content: center; + align-items: center; + z-index: 1; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .distributionIcon { + width: 60rpx; + height: 50rpx; + margin-bottom: 16rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .receiveIcon { + margin-bottom: 16rpx; + width: 54rpx; + height: 50rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .completeIcon { + margin-bottom: 16rpx; + width: 50rpx; + height: 50rpx; +} + +.groupCenter .groupCenterCon .order .orderTab .order_status .needPickIcon { + margin-bottom: 16rpx; + margin-left: 10rpx; + width: 58rpx; + height: 54rpx; +} diff --git a/eaterplanet_ecommerce/moduleB/supply/moneyManage.js b/eaterplanet_ecommerce/moduleB/supply/moneyManage.js new file mode 100644 index 0000000..6840d68 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/moneyManage.js @@ -0,0 +1,62 @@ +var app = getApp(); + +Page({ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData(); + }, + + getData: function(){ + let token = wx.getStorageSync('token'); + app.util.ProReq('supplymobile.supply_managemoney_panel', {token}).then(res=>{ + console.log(res) + let { member_info, supply_commiss } = res.data; + this.setData({ member_info, supply_commiss }) + }).catch(err=>{ + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + goLink: function (event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/moneyManage.json b/eaterplanet_ecommerce/moduleB/supply/moneyManage.json new file mode 100644 index 0000000..d86e8eb --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/moneyManage.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "资金管理", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-fixed-bottom": "../../components/fixed-bottom/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxml b/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxml new file mode 100644 index 0000000..875ef69 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxml @@ -0,0 +1,47 @@ + + + + + + + {{supply_commiss.money}} + 可提现金额(元) + + + + + + + + + + 未结算金额 + + ¥{{supply_commiss.dongmoney}} + + + + + + 已结算金额 + + ¥{{supply_commiss.getmoney}} + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxss b/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxss new file mode 100644 index 0000000..9ce9e5e --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/moneyManage.wxss @@ -0,0 +1,68 @@ +@import 'tabbar.wxss'; + +.user-info .avatar { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; + border-radius: 50%; +} + +.nickname { + font-size: 32rpx; + font-weight: bold; + color: #000; +} + +.userid, +invote { + font-size: 26rpx; + margin-top: 10rpx; +} + +.money { + padding: 20rpx 30rpx; +} + +.bor-bottom { + position: relative; +} + +.bor-bottom::after { + content: ''; + position: absolute; + left: 0; + bottom: 0; + right: 0; + height: 1px; + transform: scaleY(.5); + border-bottom: 1rpx solid #efefef; +} + +.item-main { + padding: 32rpx 40rpx; +} + +.item-title { + height: 40rpx; + width: 400rpx; + color: #444; + font-size: 28rpx; + display: flex; + align-items: center; +} + +.icon-right { + width: 12rpx; + height: 22rpx; +} + +.recharge-money { + font-family: DIN; + color: #ff758c; + font-size: 50rpx; +} + +.recharge-tip { + color: #999; + font-size: 24rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/orderDetails.js b/eaterplanet_ecommerce/moduleB/supply/orderDetails.js new file mode 100644 index 0000000..bc70b55 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderDetails.js @@ -0,0 +1,121 @@ +let app = getApp(); +var status = require('../../utils/index.js'); + +Page({ + mixins: [require('static/orderMixin.js')], + data: { + common_header_backgroundimage: app.globalData.common_header_backgroundimage, + changePrice: 0 + }, + id: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let id = options.id || ''; + if(!id) { + app.util.message('参数错误', '/eaterplanet_ecommerce/moduleB/supply/orderManage', 'error'); + return; + } + this.id = id; + status.setGroupInfo().then((groupInfo) => { + this.setData({ groupInfo }) + }); + this.initFn(id); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + initFn: function(){ + this.setData({showRaderList: false}); + wx.showLoading(); + let id = this.id; + let token = wx.getStorageSync('token'); + app.util.ProReq('order.order_info', {token, id, is_supply: 1}).then(res=>{ + let order = res.data; + let { is_hidden_orderlist_phone, presale_info } = res; + + let { real_total, shipping_fare, voucher_credit, fullreduction_money } = order.order_info; + var goodsTotal = parseFloat(real_total) - parseFloat(shipping_fare); + let disAmount = parseFloat(voucher_credit) + parseFloat(fullreduction_money); + disAmount = (disAmount > goodsTotal) ? goodsTotal : disAmount; + + let changePrice = 0; + if(order.order_info.is_change_price==1) { + changePrice = Math.abs(order.order_info.admin_change_price); + } + + let levelAmount = 0; + let order_goods_list = order.order_goods_list; + if(order_goods_list&&order_goods_list.length) { + order_goods_list.forEach(function(item){ + let total = item.total * 1; + let old_total = item.old_total * 1; + if (item.is_level_buy==1 || item.is_vipcard_buy==1) { + levelAmount += old_total - total; + } + }) + } + + presale_info = Object.keys(presale_info).length ? presale_info : ''; + + this.setData({ + order, + is_hidden_orderlist_phone, + goodsTotal: goodsTotal.toFixed(2), + disAmount: disAmount.toFixed(2), + levelAmount: levelAmount.toFixed(2), + changePrice: changePrice.toFixed(2), + presale_info + }) + }).catch(err=>{ + app.util.message(err.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + callTelphone: function (t) { + var e = this; + this.data.isCalling || (this.data.isCalling = true, wx.makePhoneCall({ + phoneNumber: t.currentTarget.dataset.phone, + complete: function () { + e.data.isCalling = false; + } + })); + }, + + goExpress: function(){ + let order_id = this.data.order.order_info.order_id; + wx.navigateTo({ + url: '/eaterplanet_ecommerce/pages/order/goods_express?id=' + order_id, + }) + }, + + hideExpModal: function(){ + this.setData({ + showExpModal: false + }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/orderDetails.json b/eaterplanet_ecommerce/moduleB/supply/orderDetails.json new file mode 100644 index 0000000..fc94acc --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderDetails.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "订单详情", + "navigationBarBackgroundColor": "#ff5344", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-img": "../../components/img/index", + "i-card": "../../components/card/index", + "i-modal": "../../components/modal/index", + "i-select-rider": "components/selectRider" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxml b/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxml new file mode 100644 index 0000000..d71ff8d --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxml @@ -0,0 +1,339 @@ + + + + + + + + 备货中 + + + + 拼团中,已付款 + + + + 配送中 + + + + {{order.order_status_info.name?order.order_status_info.name:"可提货"}} + + + + 已签收 + + + + + 等待退款 + + + + 交易完成 + + + + + 售后中 + + + + + 交易取消 + + + + + 已退款 + + + + + + + + 订单信息 + + + + 下单时间 + + {{order.order_info.date_added}} + + + + 订单编号 + {{order.order_info.order_num_alias}} + + + 买家 + {{order.order_info.name}} + + + 支付方式 + {{order.order_info.transaction_id}} + + + + + + + + + {{order.order_info.delivery=='localtown_delivery'?'提货':'收货'}}信息 + + + + + 配送方式 + {{groupInfo.delivery_express_name}}({{order.order_info.dispatchname}}) + + 查看物流 + + + + + 快递单号 + {{order.order_info.shipping_no}} + + + + 配送方式 + 同城配送 + + + 配送方式 + 到店核销 + + + 配送方式 + {{groupInfo.delivery_tuanzshipping_name}} + + + 期望送达时间 + + {{order.order_info.expected_delivery_time}} + + + + 收货人 + + {{order.order_info.ziti_name}} + + + 联系收货人 + + + + + 收货地址 + {{order.shipping_province.name}}{{order.shipping_city.name}}{{order.shipping_country.name}}{{order.order_info.shipping_address}} + + + 收货地址 + {{order.order_info.tuan_send_address}} + + + + + + + + 提货信息 + + + + 配送方式 + + {{order.order_info.delivery_name}} + + + + 收货人 + + {{order.order_info.ziti_name}} + + + 联系{{groupInfo.owner_name}} + + + + + 取货地址 + {{order.order_info.shipping_address}} + + + + + + + + + + + 已取消 + + 预计{{order.order_info.pick_up_time}}可提货 + 预计{{order.order_info.pick_up_time}}{{groupInfo.owner_name}}配送 + 商品信息 + 快递配送 + + {{showRealPickUpTime}}提货完成 + {{order.goods_count}}件商品 + + + + + + + + + + 拼团 {{goodsInfo.name}} + + {{goodsInfo.option_str}} + ¥{{goodsInfo.price}} + 积分 x {{goodsInfo.quantity}} + + + + 小计:¥{{goodsInfo.real_total}} + 积分 + + + + + + + + + 商品合计 + + + ¥{{goodsTotal}} + + + + 快递费 + 配送费 + + + ¥{{order.order_info.shipping_fare}} + + + + + 配送费 + + + ¥{{order.order_info.fare_shipping_free}} + + + + 满金额免配送费 + + - ¥{{order.order_info.fare_shipping_free}} + + + + + 积分抵扣 + + - ¥{{orderInfo.score_for_money}} + + + + 会员优惠 + + - ¥{{levelAmount}} + + + + 等级折扣 + + - ¥{{levelAmount}} + + + + 总优惠 + + - ¥{{disAmount}} + + + + 订单改价 + + {{order.order_info.admin_change_price>0?'+':'-'}} ¥{{changePrice}} + + + + + + 实付款:¥{{order.order_info.total}} + + + + + + + + + + + + + + + + + 指定配送员配送 + + 确认收货 + + + + 确认发货 + + 确认配送 + + 确认配送 + + + + 确认收货 + + 确认送达团长 + + + 订单改价 + 确认付款 + + + + + + + + + 订单发货 + + 联系人:{{expInfo.shipping_name}} + 收货地址:{{expInfo.shipping_name}} + + + + 物流公司:{{expInfo.express_list[index].name}} + + + + + 物流单号: + + + + + 取消 + 确认发货 + + + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxss b/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxss new file mode 100644 index 0000000..64994e7 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderDetails.wxss @@ -0,0 +1,205 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.head .little-img { + width: 230rpx; + height: 120rpx; +} + +.back-img-wrap { + width: 100%; + position: absolute; + top: 0; + left: 0; + z-index: -1; +} + +.back-img-wrap .back-img { + width: 100%; + height: 340rpx; +} + +.to-pay-wrap { + text-align: center; + padding: 46rpx 0; + color: white; +} + +.to-get-wrap { + display: flex; + justify-content: space-between; + padding: 50rpx 50rpx 0 50rpx; + color: white; +} + +.trade-cancel-wrap { + padding: 50rpx 76rpx; + color: white; + text-align: center; +} + +.cancel-box { + display: flex; + align-items: center; + justify-content: center; +} + +.cancel-img { + margin-right: 10rpx; + width: 40rpx; + height: 40rpx; +} + +.font-bold-20 { + font-size: 40rpx; + font-weight: 500; +} + +.content { + padding: 0 20rpx; + padding-bottom: 80rpx; +} + +.header { + display: flex; + justify-content: space-between; + padding: 20rpx 30rpx; + color: #444; + font-size: 28rpx; + font-weight: 500; +} + +.header .goods-num { + color: #aaa; +} + +.header .goods-done { + color: #aaa; +} + +.header .goods-ready { + color: #ff5344; +} + +.header .goods-cancel { + color: #aaa; +} + +.bold-text { + font-weight: 500; +} + +.show-img { + float: left; + width: 120rpx; + height: 120rpx; +} + +.name { + margin-top: -8rpx; + width: 510rpx; + font-size: 26rpx; + color: #444; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; +} + +.mount { + font-size: 22rpx; + color: #aaa; + margin-top: 10rpx; +} + +.bottom-info { + justify-content: space-between; + font-size: 28rpx; + color: #444; + margin-top: 18rpx; +} + +.middle .middle-line { + height: 0.1rpx; + background: #efefef; +} + +.middle .each-item { + box-sizing: border-box; + display: flex; + width: 100%; + padding: 32rpx 30rpx; +} + +.content-wrap { + padding-bottom: 20rpx; +} + +.content-wrap .item { + display: flex; + justify-content: space-between; + font-size: 26rpx; + padding: 16rpx 30rpx; + padding-bottom: 0; +} + +.content-wrap .item .title { + color: #aaa; + min-width: 120rpx; +} + +.content-wrap .item .detail { + color: #444; +} + +.content-wrap .item .detail .phone { + margin-left: 20rpx; + padding: 0 20rpx; + height: 44rpx; + display: flex; + align-items: center; + border: 0.1rpx solid #efefef; + border-radius: 26rpx; +} + +.content-wrap .item .detail .phone .icon-phone { + width: 20rpx; + height: 20rpx; + margin-right: 10rpx; +} + +.footerContorl { + justify-content: flex-end; + margin-top: 20rpx; +} + +.footerContorl .btn { + padding: 6rpx 15rpx; + margin-left: 20rpx; + border-radius: 10rpx; + color: #fff; +} + +.exp-modal { + width: 80%; + overflow: hidden; +} + +.btn { + position: relative; +} + +.btn:last-child::before { + content: ""; + position: absolute; + left: 0; + bottom: 0; + top: 0; + border-left: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleX(0.5); +} + +.exp-modal .ipt { + border: 1rpx solid #e5e5e5; + padding: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/orderManage.js b/eaterplanet_ecommerce/moduleB/supply/orderManage.js new file mode 100644 index 0000000..c1d49f3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderManage.js @@ -0,0 +1,169 @@ +var app = getApp(); + +Page({ + mixins: [require('static/orderMixin.js')], + data: { + placeholdeImg: app.globalData.placeholdeImg, + navList: [{ + name: "全部", + status: "-1" + }, { + name: "待发货", + status: "1" + }, { + name: "配送中", + status: "14" + }, { + name: "待收货", + status: "4" + }, { + name: "待付款", + status: "3" + } + ], + currentTab: -1, + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true + }, + page: 1, + keyword: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + let currentTab = options.status || -1; + this.setData({ + currentTab + }) + }, + + onShow: function () { + this.initFn(); + }, + + initFn: function(keyword=''){ + if(typeof keyword !=='string') keyword=''; + this.page = 1; + this.keyword = keyword; + this.setData({ + list: [], + loadText: "加载中...", + noData: 0, + loadMore: true, + showRaderList: false + },()=>{ + this.getData(); + }) + }, + + /** + * 切换导航 + */ + switchNav: function (e) { + let that = this; + if (this.data.currentTab === 1 * e.target.dataset.current) return false; + this.setData({ + currentTab: 1 * e.target.dataset.current + }, ()=>{ + that.initFn(); + }); + }, + + goResult: function(e) { + let keyword = e.detail.value.replace(/\s+/g, ''); + // if (!keyword) { + // wx.showToast({ + // title: '请输入关键词', + // icon: 'none' + // }) + // return; + // } + this.initFn(keyword); + }, + + getData: function () { + let that = this; + let token = wx.getStorageSync('token'); + let order_status = this.data.currentTab; + let keyword = this.keyword; + + wx.showLoading(); + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'order.orderlist', + token, + is_supply: 1, + order_status, + page: this.page, + keyword + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let h = {}; + let list = res.data.data; + if (list.length < 10) h.noMore = true; + let oldList = that.data.list; + list = oldList.concat(list); + that.page++; + that.setData({ list, ...h }) + } else if(res.data.code==2) { + app.util.message(res.data.msg, 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } else { + let h = {}; + if(that.page==1) h.noData = 1; + h.loadMore = false; + h.noMore = false; + h.loadText = "没有更多记录了~"; + that.setData( h ) + } + wx.hideLoading(); + } + }) + }, + + callPhone: function(e){ + var phoneNumber = e.currentTarget.dataset.phone; + phoneNumber && wx.makePhoneCall({ + phoneNumber: phoneNumber + }); + }, + + hideExpModal: function(){ + this.setData({ + showExpModal: false + }) + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if (!this.data.loadMore) return false; + this.getData(); + } +}) diff --git a/eaterplanet_ecommerce/moduleB/supply/orderManage.json b/eaterplanet_ecommerce/moduleB/supply/orderManage.json new file mode 100644 index 0000000..d8e1850 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderManage.json @@ -0,0 +1,14 @@ +{ + "navigationBarTitleText": "订单管理", + "navigationBarBackgroundColor": "#FE8464", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-img": "../../components/img/index", + "i-load-more": "../../components/load-more/index", + "i-empty": "../../components/empty/index", + "i-fixed-bottom": "../../components/fixed-bottom/index", + "i-modal": "../../components/modal/index", + "i-card": "../../components/card/index", + "i-select-rider": "components/selectRider" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/orderManage.wxml b/eaterplanet_ecommerce/moduleB/supply/orderManage.wxml new file mode 100644 index 0000000..acd0d69 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderManage.wxml @@ -0,0 +1,103 @@ + + + + + {{item.name}} + + + + + + + + + + + + + + 订单编号:{{item.order_num_alias}} + {{item.status_name}} + + + + 收货人信息:{{item.shipping_name}} {{item.shipping_tel}} + 联系收货人 + + + + + + + {{goods.name}} + ¥{{goods.price}} x{{goods.quantity}} + 小计:{{goods.total}} + + + + + + + + + + + 指定配送员配送 + + 确认收货 + + + + 确认发货 + + 确认配送 + + 确认配送 + + + + 确认收货 + + 确认送达团长 + + + 订单改价 + 确认付款 + + + + + + + 暂无订单~ + + + + + + + + 订单发货 + + 联系人:{{expInfo.shipping_name}} + 收货地址:{{expInfo.shipping_name}} + + + + 物流公司:{{expInfo.express_list[index].name}} + + + + + 物流单号: + + + + + 取消 + 确认发货 + + + + + diff --git a/eaterplanet_ecommerce/moduleB/supply/orderManage.wxss b/eaterplanet_ecommerce/moduleB/supply/orderManage.wxss new file mode 100644 index 0000000..ae5108b --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/orderManage.wxss @@ -0,0 +1,61 @@ +@import 'tabbar.wxss'; +@import 'goodsManage.wxss'; + +.orderItem { + margin: 20rpx auto; + font-size: 28rpx; +} + +.red { + font-weight: 500; +} + +.red.black { + color: #aaa; +} + +.call { + padding: 5rpx 15rpx; + border-radius: 10rpx; + font-size: 24rpx; +} + +.footer { + justify-content: flex-end; +} + +.footer .btn { + padding: 4rpx 15rpx; + margin-left: 20rpx; + border-radius: 10rpx; + color: #fff; +} + +.exp-modal { + width: 80%; + overflow: hidden; +} + +.btn { + position: relative; +} + +.btn:last-child::before { + content: ""; + position: absolute; + left: 0; + bottom: 0; + top: 0; + border-left: 1px solid #e5e5e5; + transform-origin: 0 0; + transform: scaleX(0.5); +} + +.exp-modal .ipt { + border: 1rpx solid #e5e5e5; + padding: 10rpx; +} + +.search-bar { + font-size: 28rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/static/orderMixin.js b/eaterplanet_ecommerce/moduleB/supply/static/orderMixin.js new file mode 100644 index 0000000..7e067b1 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/static/orderMixin.js @@ -0,0 +1,218 @@ +let app = getApp(); + +module.exports = { + data: { + index: 0, + shipping_no: '', + expInfo: '', + showRaderList: false, + selectOrderId: '' + }, + + actionConfirm: function(content) { + return new Promise((resolve, reject)=>{ + wx.showModal({ + title: '提示', + content, + showCancel: true, + success: (result) => { + if (result.confirm) { + resolve(); + } else if (result.cancel) { + console.log('用户点击取消') + } + } + }) + }) + }, + + /** + * 获取快递列表 + * @param {*} e + */ + getExpList: function(e) { + this.actionConfirm('确认此订单发货吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + app.util.ProReq('supplymobile.get_express_list', {token, order_id}).then(res=>{ + //快递列表 + let expInfo = { order_id, ...res.data }; + this.setData({ + expInfo, + showExpModal: true + }) + //弹窗 + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }) + }, + + bindPickerChange: function(e) { + console.log('picker发送选择改变,携带值为', e.detail.value) + this.setData({ + index: e.detail.value + }) + }, + + bindKeyInput: function (e) { + this.setData({ + shipping_no: e.detail.value + }) + }, + + /** + * 快递确认配送 + * @param {*} order_id + */ + expSend: function(e) { + console.log(e) + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + let { expInfo, index, shipping_no } = this.data; + let express_id = expInfo && expInfo.express_list[index].id || ''; + if(express_id=='') { + wx.showToast({ + title: '请选择物流公司', + icon: 'none' + }) + return; + } + if(shipping_no=='') { + wx.showToast({ + title: '请输入物流单号', + icon: 'none' + }) + return; + } + wx.showLoading(); + app.util.ProReq('supplymobile.do_send_order_express', {token, order_id, express_id, shipping_no}).then(res=>{ + wx.showToast({ title: '确认配送成功' }) + this.setData({ shipping_no: '', showExpModal: false, index: 0, expInfo: '' }) + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }, + + /** + * 团长确认配送 + * @param {*} e + */ + tuanSend: function(e) { + this.actionConfirm('确认此订单发货吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + order_id && app.util.ProReq('supplymobile.supply_do_opsend_tuanz', {token, order_id}).then(res=>{ + wx.showToast({ title: '确认配送成功' }) + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }); + }, + + /** + * 同城配送确认配送 + * @param {*} e + */ + localtownSend: function(e) { + this.actionConfirm('确认此订单发货吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + order_id && app.util.ProReq('order.order_delivery', {token, order_id, is_supply: 1}).then(res=>{ + wx.showToast({ title: '确认配送成功' }) + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }); + }, + + /** + * 确认送达团长 + * @param {*} e + */ + tuanOver: function(e) { + this.actionConfirm('确认送达团长吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + order_id && app.util.ProReq('supplymobile.supply_do_tuanz_over', {token, order_id}).then(res=>{ + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }); + }, + + /** + * 团长/快递确认收货 最后一步 + * @param {*} e + */ + opreceive: function(e) { + this.actionConfirm('确认订单收货吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + order_id && app.util.ProReq('supplymobile.supply_do_opreceive', {token, order_id}).then(res=>{ + wx.showToast({ title: '确认收货成功' }) + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }); + }, + + goLink: function (event) { + let link = event.currentTarget.dataset.link; + var pages_all = getCurrentPages(); + if (pages_all.length > 3) { + wx.redirectTo({ + url: link + }) + } else { + wx.navigateTo({ + url: link + }) + } + }, + + /** + * 确认付款 + */ + confirmPay: function(e) { + this.actionConfirm('确认此订单已付款吗?').then(()=>{ + let token = wx.getStorageSync('token'); + let order_id = e.currentTarget.dataset.id || ''; + wx.showLoading(); + order_id && app.util.ProReq('order.order_pay', {token, order_id, is_supply:1}).then(res=>{ + wx.showToast({ title: '付款成功' }) + this.initFn(); + }).catch(err=>{ + app.util.message(err.msg, '', 'error'); + }) + }); + }, + + /** + * 显示配送员列表 + */ + chooseRider: function(e) { + let selectOrderId = e.currentTarget.dataset.id || ''; + this.setData({ + selectOrderId, + showRaderList: true + }) + }, + + closeRiderList: function() { + this.setData({ + selectOrderId: '', + showRaderList: false + }) + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/supply/tabbar.wxml b/eaterplanet_ecommerce/moduleB/supply/tabbar.wxml new file mode 100644 index 0000000..41e1a27 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/tabbar.wxml @@ -0,0 +1,26 @@ + diff --git a/eaterplanet_ecommerce/moduleB/supply/tabbar.wxss b/eaterplanet_ecommerce/moduleB/supply/tabbar.wxss new file mode 100644 index 0000000..aeab0a5 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/supply/tabbar.wxss @@ -0,0 +1,35 @@ +@import "/icon.wxss"; +@import "/common.wxss"; + +.tabbar { + line-height: 1; +} + +.tabbar.active { + color: #fe8464; +} + +.tabbar .iconfont { + font-size: 44rpx; +} + +.tabbar-home { + display: flex; + flex-direction: column; + justify-content: flex-end; +} + +.tabbar-home .iconfont { + display: inline-block; + position: absolute; + background: #fe8464; + border-radius: 50%; + width: 100rpx; + height: 100rpx; + line-height: 100rpx; + border: 10rpx solid #fff; + top: -50rpx; + left: 50%; + margin-left: -60rpx; + color: #fff; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/btn.png b/eaterplanet_ecommerce/moduleB/virtualcard/btn.png new file mode 100644 index 0000000000000000000000000000000000000000..8c40dbad2f6f8d3bda02088b073d532f50541926 GIT binary patch literal 2684 zcmV-?3WN2DP)C0003IP)t-s0000x zv;Re=`$eYuMW*{jrTavt`$eYvMWy;hrTayu`$MMxMW*{jru#*v{6weyMW*{gum44+ z`$eYvMW*^iru#*v`bDPuMW*{jru;;v`$VY!M5g~lssBZ$`$eYvMW*~krTayu`$eVu zM5g;irvF5y|3;?!|NsAWz5LSZ{-e|V^!oo(toyp&{`dR;m(KlZxBOkP{O9xj&FB75 ztNTr=`+&mz-R}QowfvFG{fx-{VYB?%?fyxp`|(e`Fldo zuT<}DsDP~2y?ziy#GX&_hdbb)RC_t6G8#_;ON0-7MgB6_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<@NqE zC;k;E@VUFS;A#7-y!eZM-C0UkX(DhUAzm@jc-X!0RN_@TI^N z-+8W+H!z{WCIWRV=fRf(8lNje%;da>#_{6GeTf39x!DyvK@am^=&rr`U{0<;E}iZg zE|22;Gs@1+4Yn;-*OODZ0%>tb{ou{~+4@Y)b_D0@MVeC_MwyziqzzvRRQY!d+ZM}O9>&1PV9lLffd(&O!}h7Zi!SQM z$r(01G6hc1)Q)Mo70YT*e70X8FD|K`ahzK9UjI9yf<*hBGcK!)O-Poz8&LZE7t!K2|r+%~DYpcK{Y? zT~wSz7KZg~-6e`|bl%)Zh(kJAE&2ismfK}n5RjGwNTY%uA6^5x2Fiv^&c3um zwGsqD!LcRf9TD-B(fQGOrqG1BDQeCwDN961!m;Ut77Un^&iGxfA z+*TX`q}jvouQQE9{Z71+9N8pF4p$s*Y;ijPk38H@A3A6BR%~p>V0_2DOMyK;(eYyZ z7kpyKI1g^^R*piPkL5f?w5r@6pLOQ$Rt;Dpp3mcLhJoWLOBouvOLqMARN!vx@wF_v z>HmO*(aTbn^I@-=VuqtLc-1Z8NX9m~SoM9x1XZw;ZQV4qGd$xVnU<`5p8JrEfupOU zrSs0}@0iVD*g42Q+EmT(8tg><9S7ZA6F8c#$%Lneug=o7wn2Qd9uc-U*O^CwL!1xw zvapekuM_|5#oUtJb4~BvkNO4eFL%A_rCW;H-Xn8yn1s1V&VLwqJqo`0gx3EbDn!?V zJ98U`nF%iid+aw6gBge=P<&8?_E)#S6I-kMA+iuQ_Y*6iU?s7?NfycXFHu)RY(>9( qC;x)?2ge&p{`h}#= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + this.getData(); + }, + + getData: function () { + app.util.ProReq('virtualcard.index', {}).then(res => { + let { virtcard_publish } = res.data; + this.setData({ + virtcard_publish + }) + }) + }, + + preFormSubmit: function(e) { + wx.showLoading(); + this.formSubmit(e); + }, + formSubmit: util.debounce(function(e) { + console.log('form发生了submit事件,携带数据为:', e[0].detail.value) + let token = wx.getStorageSync('token'); + let code_sn = e[0].detail.value.code; + app.util.ProReq('virtualcard.subCodeSn', { token, code_sn }).then(res => { + app.util.message(res.message || '兑换成功', '', 'error'); + + }).catch(err => { + console.log(err) + err.code==1&&app.util.message(err.message || '请先登录', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + err.code==2&&app.util.message(err.message || '兑换失败,请重试', '', 'error'); + }) + }), + + tabchange: function (e) { + var index = e.currentTarget.dataset.index; + this.listPage = 1; + this.setData({ + list: [], + tab_index: index + }) + if(index==2) { + this.getList(); + } + }, + + getList() { + let _this = this; + let token = wx.getStorageSync('token'); + let data = { + token, + pageNum: _this.listPage + }; + wx.showLoading(); + app.util.ProReq('virtualcard.loadUseRecord', data) + .then(res => { + _this.listLoading = false; + wx.stopPullDownRefresh(); + let h = {}; + if (_this.listPage == 1) { + h.list = res.data; + res.data.length==0?(h.noData=true):''; + } else { + h.list = [..._this.data.list, ...res.data]; + } + if (res.data.length > 0) { + _this.listPage += 1; + } else { + _this.listPage = 0; + } + if(res.data.length < 10) { + h.noMore = true; + } + this.setData(h); + wx.hideLoading(); + }) + .catch(err => { + wx.hideLoading(); + if(err.code==1) { + app.util.message(err.message || '请先登录', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + } else { + let h = {}; + _this.listPage==1?(h.noData=true):''; + this.setData({ + listLoading: false, + noMore: true, + ...h, + }) + } + wx.stopPullDownRefresh(); + }); + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + if(!this.data.noData&&!this.data.noMore) { + this.getList(); + } + }, + + handleRuleModal() { + this.setData({ + showRulesPopup: !this.data.showRulesPopup + }) + } +}) diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/exchange.json b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.json new file mode 100644 index 0000000..dc49041 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.json @@ -0,0 +1,11 @@ +{ + "navigationBarTitleText": "兑换中心", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-empty": "../../components/empty/index", + "i-modal": "../../components/modal/index", + "parser":"../../components/parser/parser" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxml b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxml new file mode 100644 index 0000000..781138e --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxml @@ -0,0 +1,52 @@ + + + + + + + + + 兑换礼品 + + + 兑换记录 + + + + + + + + + + + {{item.code_sn}} + 兑换金额:¥{{item.money_format}} + 兑换时间:{{item.adddate}} + + 已兑换 + + 暂无记录~ + + +
+ + + + +
+
+ +兑换说明 + + + + + 兑换说明 + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxss b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxss new file mode 100644 index 0000000..efc2360 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/exchange.wxss @@ -0,0 +1,200 @@ +.tabs { + box-sizing: border-box; + position: relative; + overflow: hidden; + zoom: 1; + color: #666; +} + +.tabs:after, +.tabs:before { + content: " "; + display: table; +} + +.tabs:after { + clear: both; + visibility: hidden; + font-size: 0; + height: 0; +} + +.tabs-bar { + outline: none; + width: 100%; + background-color: #fff; + top: 0; + left: 0; + right: 0; + z-index: 10; +} + +.tabs-link-bar { + z-index: 1; + position: absolute; + left: 0; + bottom: 2rpx; + box-sizing: border-box; + height: 2rpx; + background-color: #ff5777; + transition: transform 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + transform-origin: 0 0; +} + +.tabs-bar { + border-bottom: 1px solid #d9d9d9; + box-sizing: border-box; +} + +.tabs-nav--container { + overflow: hidden; + font-size: 14rpx; + line-height: 1.5; + box-sizing: border-box; + position: relative; + white-space: nowrap; + margin-bottom: -1px; + zoom: 1; +} + +.tabs-nav--container:after, +.tabs-nav--container:before { + content: " "; + display: table; +} + +.tabs-nav--container:after { + clear: both; + visibility: hidden; + font-size: 0; + height: 0; +} + +.tabs-tab-btn-disabled { + cursor: not-allowed; +} + +.tabs-tab-btn-disabled, +.tabs-tab-btn-disabled:hover { + color: #ccc; +} + +.tabs-nav--wrap { + overflow: hidden; + margin-bottom: -1rpx; +} + +.tabs-nav { + display: flex; + -moz-box-sizing: border-box; + box-sizing: border-box; + padding-left: 0; + transition: transform 0.5s cubic-bezier(0.645, 0.045, 0.355, 1); + position: relative; + margin: 0; + list-style: none; +} + +.tabs-nav:after, +.tabs-nav:before { + display: table; + content: " "; +} + +.tabs-nav:after { + clear: both; +} + +.tabs-nav .tabs-tab-disabled { + pointer-events: none; + cursor: default; + color: #ccc; +} + +.tabs-nav .tabs-tab { + flex: 1; + display: block; + height: 90rpx; + line-height: 90rpx; + margin: 0 12rpx; + box-sizing: border-box; + position: relative; + transition: color 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + cursor: pointer; + text-decoration: none; + text-align: center; + font-size: 30rpx; + color: #333; +} + +.tabs-nav .tabs-tab:active { + color: #f13e3a; +} + +.tabs-nav .tabs-tab .anticon { + width: 14rpx; + height: 14rpx; + margin-right: 8rpx; +} + +.tabs-nav .tabs-tab-active { + color: #ff4936; + border-bottom: 6rpx solid #ff4936; +} + +.tabs.tabs-card>.tabs-bar .tabs-link-bar { + visibility: hidden; +} + +.tabs.tabs-card>.tabs-bar .tabs-tab { + margin: 0; + border: 1px solid #d9d9d9; + border-bottom: 0; + border-radius: 6rpx 6rpx 0 0; + transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + background: #f9f9f9; + margin-right: 2rpx; +} + +.tabs.tabs-card>.tabs-bar .tabs-tab-active { + background: #fff; + transform: translateZ(0); + border-color: #d9d9d9; + color: #f13e3a; +} + +.tabs.tabs-card>.tabs-bar .tabs-nav--wrap { + margin-bottom: 0; +} + +.list { + padding-top: 0rpx; +} + +.ipt { + border: 1rpx solid #e5e5e5; + height: 72rpx; + line-height: 72rpx; + padding: 0 20rpx; + box-sizing: border-box; +} + +.btn { + line-height: 72rpx; + border: 0; + border-radius: 20rpx; + font-size: 32rpx; + background-color: #fe8464; + color: #fff; +} + +button.btn::after { + content: none; +} + +.fixed-btn { + position: absolute; + left: 0; + right: 0; + bottom: 10%; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/index.js b/eaterplanet_ecommerce/moduleB/virtualcard/index.js new file mode 100644 index 0000000..c805322 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/index.js @@ -0,0 +1,254 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + needAuth: false, + virtualcard_layout: '', + virtcard_publish: '', + virtcard_top_banner: '', + share_img: '', + share_title: '', + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [], + }, + pageNum: 1, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + onLoad: function (options) { + this.getData(); + this.getList(); + }, + + onShow: function () { + let that = this; + util.check_login_new().then((res) => { + if(res) { + that.setData({ needAuth: false }) + } else { + this.setData({ needAuth: true }); + } + }) + }, + + authSuccess: function () { + let that = this; + this.pageNum = 1; + this.setData({ + slider_list: [], + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getData(); + that.getList(); + }) + }, + + authModal: function () { + if (this.data.needAuth) { + this.setData({ showAuthModal: !this.data.showAuthModal }); + return false; + } + return true; + }, + + getData: function () { + app.util.ProReq('virtualcard.index', {}).then(res => { + let { virtcard_top_banner, virtcard_share_img, virtcard_share_title, virtualcard_layout, virtcard_publish, virtualcard_name_modify } = res.data; + wx.setNavigationBarTitle({ + title: virtualcard_name_modify || '礼品卡中心', + }) + this.setData({ + virtualcard_layout, + virtcard_publish, + virtcard_top_banner, + share_img: virtcard_share_img, + share_title: virtcard_share_title + }) + }) + }, + + /** + * 获取商品列表 + */ + getList: function () { + let that = this; + let token = wx.getStorageSync('token'); + let community = wx.getStorageSync('community'); + let head_id = community.communityId || 0; + + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'virtualcard.load_goods_list', + pageNum: this.pageNum, + token, + head_id, + pre_page: 10 + }, + dataType: 'json', + success: function (res) { + wx.hideLoading(); + wx.stopPullDownRefresh(); + if (res.data.code == 0) { + let oldRushList = that.data.rushList; + if (that.pageNum == 1) oldRushList = []; + + let h = {}, list = res.data.list; + if (that.pageNum == 1 && list.length == 0) h.showEmpty = true; + list = that.calcEndTime(list); + let rushList = oldRushList.concat(list); + let rdata = res.data; + let reduction = { full_money: rdata.full_money, full_reducemoney: rdata.full_reducemoney, is_open_fullreduction: rdata.is_open_fullreduction } + h.rushList = rushList; + h.reduction = reduction; + h.loadOver = true; + let loadMore = that.data.loadMore; + if(res.data.list.length<10) { loadMore = false } + h.loadMore = loadMore; + h.loadText = loadMore ? "加载中..." : "没有更多商品了~"; + // h.pintuan_show_type = rdata.pintuan_show_type; + that.setData(h, function () { + that.pageNum += 1; + }) + } else if (res.data.code == 1) { + let s = { loadMore: false } + if (that.pageNum == 1) s.showEmpty = true; + that.setData(s); + } else if (res.data.code == 2) { + //no login + that.setData({ needAuth: true }) + } + } + }) + }, + + calcEndTime: function(list) { + var timestamp = Date.parse(new Date())/1000; + let newList = []; + if(Object.keys(list).length) { + list.forEach(item=>{ + (item.end_time 0) { + let url = slider_list[idx].link; + let type = slider_list[idx].linktype; + if (util.checkRedirectTo(url, needAuth)) { + this.authModal(); + return; + } + if (type == 0) { + // 跳转webview + url && wx.navigateTo({ url: '/eaterplanet_ecommerce/pages/web-view?url=' + encodeURIComponent(url) }) + } else if (type == 1) { + if (url.indexOf('eaterplanet_ecommerce/pages/index/index') != -1 || url.indexOf('eaterplanet_ecommerce/pages/order/shopCart') != -1 || url.indexOf('eaterplanet_ecommerce/pages/user/me') != -1 || url.indexOf('eaterplanet_ecommerce/pages/type/index') != -1) { + url && wx.switchTab({ url: url }) + } else { + url && wx.navigateTo({ url: url }) + } + } else if (type == 2) { + // 跳转小程序 + let appid = slider_list[idx].appid; + appid && wx.navigateToMiniProgram({ + appId: slider_list[idx].appid, + path: url, + extraData: {}, + envVersion: 'release', + success(res) { + // 打开成功 + }, + fail(error) { + console.log(error) + } + }) + } else if (type == 6) { + //领券 + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleA/coupon/getCoupon?id='+url + }) + } + } + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + this.getData(); + let that = this; + this.pageNum = 1; + this.setData({ + loadMore: true, + loadText: "加载中...", + loadOver: false, + showEmpty: false, + rushList: [] + }, () => { + that.getList(); + }) + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + console.log('这是我的底线'); + this.data.loadMore && (this.setData({ loadOver: false }), this.getList()); + }, + + goLink: function(event) { + let url = event.currentTarget.dataset.link; + url && wx.navigateTo({ url }) + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + var member_id = wx.getStorageSync('member_id'); + let { share_title, share_img } = this.data; + return { + title: share_title, + path: "eaterplanet_ecommerce/moduleB/presale/index?share_id=" + member_id, + imageUrl: share_img, + success: function () { }, + fail: function () { } + }; + } +}) diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/index.json b/eaterplanet_ecommerce/moduleB/virtualcard/index.json new file mode 100644 index 0000000..7c8edc2 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/index.json @@ -0,0 +1,13 @@ +{ + "navigationBarTitleText": "礼品卡中心", + "navigationBarTextStyle": "black", + "navigationBarBackgroundColor": "#FFFFFF", + "enablePullDownRefresh": true, + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-spu-col": "../components/virtualcard-goodsone", + "i-spu-row": "../components/virtualcard-goodsrow", + "i-new-auth": "../../components/new-auth/index", + "i-img": "../../components/img/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/index.wxml b/eaterplanet_ecommerce/moduleB/virtualcard/index.wxml new file mode 100644 index 0000000..ad8bf7f --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/index.wxml @@ -0,0 +1,36 @@ + + + + + + + +
+ + + + + + + + + +
+ + + + + + + + + 暂时没有商品 + + + + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/virtualcard/index.wxss b/eaterplanet_ecommerce/moduleB/virtualcard/index.wxss new file mode 100644 index 0000000..97ad4bb --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/virtualcard/index.wxss @@ -0,0 +1,7 @@ +@import "../presale/index.wxss"; + +.fixed-btn { + position: fixed; + right: 20rpx; + bottom: 30%; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/details.js b/eaterplanet_ecommerce/moduleB/writeoff/details.js new file mode 100644 index 0000000..33b03e6 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/details.js @@ -0,0 +1,232 @@ +var app = getApp(); +var canHexiao = true; + +Page({ + + /** + * 页面的初始数据 + */ + data: { + salesroom_id: '', + hxNum: 1 + }, + salesroom_id: '', + code: '', + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let code = options.code || ''; + this.code = code; + this.salesroom_id = options.salesroom_id || ''; + this.getHexiaoInfo(code); + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + actionConfirm: function(content) { + return new Promise((resolve, reject)=>{ + wx.showModal({ + title: '提示', + content, + showCancel: true, + success: (result) => { + if (result.confirm) { + resolve(); + } else if (result.cancel) { + console.log('用户点击取消') + } + } + }) + }) + }, + + getHexiaoInfo: function(hexiao_volume_code) { + let token = wx.getStorageSync('token'); + app.util.ProReq('hexiao.hexiao_order_info', { token, hexiao_volume_code }).then(res => { + let { orders, order_goods_count, order_goods_saleshexiao_list } = res.data; + this.setData({ + orders, order_goods_count, order_goods_saleshexiao_list + }) + }).catch(err => { + console.log(err) + wx.showModal({ + title: '提示', + content: err.msg || '请求出错', + showCancel: false, + confirmColor: '#ff5041', + complete: function() { + app.util.navigateBack({}); + } + }); + }) + }, + + goHexiao: function(event) { + let hexiao_id = event.currentTarget.dataset.id || ''; + let type = event.currentTarget.dataset.type || 0; + let token = wx.getStorageSync('token'); + let salesroom_id = this.salesroom_id; + let data = { token, hexiao_id, salesroom_id }; + if(type==0) { + // 按订单核销 + if(!canHexiao) return; + canHexiao = false; + this.orderHexiao(data); + } else { + // 按次数核销 弹窗显示具体信息 + this.getNumHexiaoInfo(data); + } + }, + + /** + * 获取按次数核销信息 + * @param {*} data + */ + getNumHexiaoInfo: function(data){ + wx.showLoading(); + app.util.ProReq('hexiao.get_hxgoods_bytimes', data).then(res => { + wx.hideLoading(); + let { hexiao_record_list, order_goods_info, saleshexiao_info } = res.data; + this.setData({ hexiao_record_list, order_goods_info, saleshexiao_info, showHexiaoModal: true }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + /** + * 按订单核销 + * @param {*} data + */ + orderHexiao: function(data) { + wx.showLoading(); + app.util.ProReq('hexiao.hx_order_goods', data).then(res => { + canHexiao = true; + app.util.message('核销成功', '', 'error'); + this.getHexiaoInfo(this.code); + }).catch(err => { + console.log(err) + canHexiao = true; + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + /** + * 按次数核销 + * @param {*} data + */ + numHexiao: function(event) { + let hexiao_id = event.currentTarget.dataset.id || ''; + let token = wx.getStorageSync('token'); + let salesroom_id = this.salesroom_id; + let hx_times = this.data.hxNum; + let data = { token, hexiao_id, salesroom_id, hx_times }; + wx.showLoading(); + app.util.ProReq('hexiao.hx_order_goods_bytimes', data).then(res => { + wx.hideLoading(); + this.handleHexiaoModal(); + app.util.message('核销成功', '', 'error'); + this.getHexiaoInfo(this.code); + }).catch(err => { + console.log(err) + wx.hideLoading(); + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }, + + /** + * 全部订单核销 + * @param {*} event + */ + allHexiao: function(event) { + this.actionConfirm('确认全部核销').then(()=>{ + let order_goods_saleshexiao_list = this.data.order_goods_saleshexiao_list; + let order_ids = []; + order_goods_saleshexiao_list.map(item=>{ + (item.is_hexiao_over==0)&&order_ids.push(item.order_id) + }) + let order_id = order_ids.join(','); + let token = wx.getStorageSync('token'); + let salesroom_id = this.salesroom_id; + app.util.ProReq('hexiao.all_hx_order', { token, order_id, salesroom_id }).then(res => { + this.getHexiaoInfo(this.code); + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }); + }, + + /** + * 单商品按次数全部核销 + */ + allHexiaoBytimes: function(event) { + this.actionConfirm('确认全部核销').then(()=>{ + let hexiao_id = event.currentTarget.dataset.id || ''; + let token = wx.getStorageSync('token'); + let salesroom_id = this.salesroom_id; + app.util.ProReq('hexiao.all_hx_order_goods_bytimes', { token, hexiao_id, salesroom_id }).then(res => { + this.setData({showHexiaoModal: false}); + this.getHexiaoInfo(this.code); + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', '', 'error'); + }) + }); + }, + + /** + * 次数核销弹窗 + */ + handleHexiaoModal: function() { + this.setData({ + showHexiaoModal: !this.data.showHexiaoModal, + hxNum: 1 + }) + }, + + /** + * 输入框改变监控 + * @param {*} t + */ + changeNumber: function (t) { + var e = t.detail; + console.log(e) + e&&this.setData({ hxNum: e.value }) + }, + + /** + * 输入极值限制 + * @param {*} t + */ + outOfMax: function (t) { + // var e = t.detail; + wx.showToast({ + title: "不能再多了~", + icon: "none" + }) + } +}) \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/details.json b/eaterplanet_ecommerce/moduleB/writeoff/details.json new file mode 100644 index 0000000..f433760 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/details.json @@ -0,0 +1,10 @@ +{ + "navigationBarTitleText": "核销信息", + "navigationBarBackgroundColor": "#FFFFFF", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-input-number": "../../components/input-number/index", + "i-modal": "../../components/modal/index", + "i-cashon_delivery": "../../components/cashon_delivery/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/details.wxml b/eaterplanet_ecommerce/moduleB/writeoff/details.wxml new file mode 100644 index 0000000..809d952 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/details.wxml @@ -0,0 +1,88 @@ + + + + 用户信息 + + + + 昵称:{{orders.username}} + 收货人:{{orders.shipping_name}} + 手机号:{{orders.shipping_tel}} + 商品数量:{{order_goods_count}} + + + + + + 核销内容 + + 全部核销 + + + + + + + + + {{item.goods_name}} + 货到付款 + + {{item.option_sku}} + x {{item.quantity}} + + + + 订单编号:{{item.order_num_alias}} + 核销日期:{{item.effect_begin_time}}~{{item.effect_begin_time}} + 核销类型:订单核销 + + + 核销类型:按次核销 + 总核销:{{item.hexiao_count}}次 + 已核销:{{item.has_hexiao_count}}次 + 可核销:{{item.remain_hexiao_count}}次 + + 订单状态:{{item.is_refund==1?'已退款':'部分退款'}} + 已退款 + 已核销 + 核销 + + + + + + + + + 商品核销 + + + + + + + {{order_goods_info.goods_name}} + x {{order_goods_info.quantity}} + + + 全部核销 + + + + + 使用记录 + + 核销次数:{{item.hexiao_count}} + 核销时间:{{item.hx_time}} + + + + + + 使用次数(剩余 {{saleshexiao_info.remain_hexiao_count}} 次) + + + 确认使用 + + diff --git a/eaterplanet_ecommerce/moduleB/writeoff/details.wxss b/eaterplanet_ecommerce/moduleB/writeoff/details.wxss new file mode 100644 index 0000000..f69a8cf --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/details.wxss @@ -0,0 +1,32 @@ + +.goodsimg { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; +} + +.item { + padding-bottom: 20rpx; + margin-bottom: 20rpx; +} + +.state { + height: 64rpx; + line-height: 64rpx; + text-align: center; + color: #ffffff; +} + +.sku-card .icon-guanbi { + position: absolute; + right: 30rpx; + top: 30rpx; + font-size: 40rpx; +} + +.allbtn { + background: #ff5344; + color: #ffffff; + padding: 8rpx 15rpx; + border-radius: 10rpx; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/index.js b/eaterplanet_ecommerce/moduleB/writeoff/index.js new file mode 100644 index 0000000..e1a77ef --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/index.js @@ -0,0 +1,121 @@ +var app = getApp(); +var util = require('../../utils/util.js'); + +Page({ + + /** + * 页面的初始数据 + */ + data: { + salesroomIdx: 0, + salesroom_list: [], + today_saleshexiao_count: 0, + saleshexiao_record_list: [] + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + this.getData() + }, + + getData: function () { + let token = wx.getStorageSync('token'); + app.util.ProReq('hexiao.hexiao_manage', { token }).then(res => { + let { salesroom_list, today_saleshexiao_count, saleshexiao_record_list, salesroom_member } = res.data; + let last_salesroom_id = salesroom_member.last_salesroom_id || ''; + let salesroomIdx = 0; + if(salesroom_list) { + salesroomIdx = salesroom_list.findIndex(item=>item.id == last_salesroom_id); + } + this.setData({ + salesroom_list, today_saleshexiao_count, saleshexiao_record_list,salesroomIdx: salesroomIdx>=0?salesroomIdx:0 + }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '请求出错', 'switchTo:/eaterplanet_ecommerce/pages/user/me', 'error'); + }) + }, + + handleHexiaoModal: function() { + this.setData({ + showHexiaoModal: !this.data.showHexiaoModal + }) + }, + + preFormSubmit: function(e) { + wx.showLoading(); + this.formSubmit(e); + }, + formSubmit: util.debounce(function(e) { + console.log('form发生了submit事件,携带数据为:', e[0].detail.value) + let code = e[0].detail.value.code; + this.goDetails(code); + }), + + goDetails: function(code) { + let salesroom_id = this.data.salesroom_list[this.data.salesroomIdx].id; + if(code) { + wx.navigateTo({ + url: '/eaterplanet_ecommerce/moduleB/writeoff/details?code='+code+'&salesroom_id='+salesroom_id, + success: function(res) { + wx.hideLoading(); + } + }) + } else { + wx.showToast({ + title: '请输入手机号/券码', + icon: 'none' + }) + } + }, + + goScan: function() { + let that = this; + wx.scanCode({ + success (res) { + console.log(res) + let codeStr = res.result || ''; + let code = codeStr.split('_')[1]; + that.goDetails(code); + } + }) + }, + + changeMendian: function(e) { + let token = wx.getStorageSync('token'); + let salesroomIdx = e.currentTarget.dataset.idx; + let salesroom_id = this.data.salesroom_list[salesroomIdx].id; + app.util.ProReq('hexiao.hexiao_change_salesroom', { token, salesroom_id }).then(res => { + this.setData({ salesroomIdx, showHexiaoModal: !this.data.showHexiaoModal }) + }).catch(err => { + console.log(err) + app.util.message(err.msg || '切换失败,请重试', '', 'error'); + }) + } + +}) diff --git a/eaterplanet_ecommerce/moduleB/writeoff/index.json b/eaterplanet_ecommerce/moduleB/writeoff/index.json new file mode 100644 index 0000000..d0f67e4 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/index.json @@ -0,0 +1,7 @@ +{ + "navigationBarTitleText": "到店核销", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar", + "i-modal": "../../components/modal/index" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/index.wxml b/eaterplanet_ecommerce/moduleB/writeoff/index.wxml new file mode 100644 index 0000000..7198938 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/index.wxml @@ -0,0 +1,103 @@ + + + + + {{salesroom_list[salesroomIdx].room_name}} + 切换店铺 + + + + + 今日核销(次) + 10 + + + 累计核销(次) + 100 + + + + + + + 核销人员 + + 5 + + + + + + 商品核销 + + + + + + + + + + 选择核销方式 +
+ + + + +
+ + + 扫码核销 + +
+
+ + + + 今日核销记录({{today_saleshexiao_count}}个) + + + + 操作员:{{item.smember_name}} + 订单编号:{{item.order_num_alias}} + 用户手机号:{{item.shipping_tel}} + + 核销时间:{{item.hx_time}} + 已核销 + + + + + {{item.goods_name}} + + {{item.option_sku}} x{{item.quantity}} + + 小计 ¥{{item.total}} + {{item.hexiao_count}} + 核销类型:订单核销 + + 核销类型:按次核销;本次核销消耗{{item.hexiao_count2}} + + + + + + 暂无记录~ + + + + + + + 门店选择 + + + + {{item.room_name}} + {{item.room_address}} + + + + + + diff --git a/eaterplanet_ecommerce/moduleB/writeoff/index.wxss b/eaterplanet_ecommerce/moduleB/writeoff/index.wxss new file mode 100644 index 0000000..859cbd8 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/index.wxss @@ -0,0 +1,120 @@ +.three { + display: flex; + justify-content: center; + align-items: center; +} + +.three-item { + position: relative; + flex: 1; + text-align: center; +} + +.three-item::before { + content: ''; + position: absolute; + left: 0; + top: 0; + bottom: 0; + width: 1rpx; + border-left: 1rpx solid #cfcfcf; +} + +.three-item:first-child::before { + content: none; +} + +.three-title { + color: #999; + font-size: 24rpx; +} + +.three-money { + margin-top: 15rpx; + font-size: 38rpx; + font-weight: bold; +} + +.item-main { + padding: 32rpx 40rpx; +} + +.item-title { + height: 40rpx; + width: 400rpx; + color: #444; + font-size: 28rpx; + display: flex; + align-items: center; +} + +.icon-right { + width: 12rpx; + height: 22rpx; +} + +.ipt { + border: 1rpx solid #e5e5e5; + height: 72rpx; + line-height: 72rpx; + padding: 0 20rpx; + box-sizing: border-box; +} + +.btn { + line-height: 72rpx; + border: 0; + border-radius: 0; + font-size: 32rpx; +} + +button.btn::after { + content: none; +} + +.scan { + margin-top: 30rpx; + height: 300rpx; + border: 1rpx solid #e5e5e5; + border-radius: 20rpx; +} + +.icon-erweima1 { + width: 100rpx; + height: 100rpx; + line-height: 100rpx; + background: #f5f5f5; + border-radius: 50%; + text-align: center; + font-size: 44rpx; +} + +.list .item { + margin-bottom: 20rpx; + padding-bottom: 20rpx; +} + +.state { + height: 64rpx; + line-height: 64rpx; + text-align: center; + color: #ffffff; +} + +.empty { + padding: 50rpx 0; +} + +.goodsimg { + width: 120rpx; + height: 120rpx; + margin-right: 20rpx; +} + +.changemendian { + margin: 0 40rpx; +} + +.changehead { + margin: 30rpx 0; + } \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/member.js b/eaterplanet_ecommerce/moduleB/writeoff/member.js new file mode 100644 index 0000000..6b15eb3 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/member.js @@ -0,0 +1,82 @@ +// eaterplanet_ecommerce/moduleB/writeoff/member.js +Page({ + + /** + * 页面的初始数据 + */ + data: { + + }, + handlerGobackClick(delta) { + const pages = getCurrentPages(); + if (pages.length >= 2) { + wx.navigateBack({ + delta: delta + }); + } else { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + } + }, + handlerGohomeClick(url) { + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index' + }); + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) diff --git a/eaterplanet_ecommerce/moduleB/writeoff/member.json b/eaterplanet_ecommerce/moduleB/writeoff/member.json new file mode 100644 index 0000000..7414c29 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/member.json @@ -0,0 +1,6 @@ +{ + "navigationBarTitleText": "到店核销", + "usingComponents": { + "ep-navBar": "../../components/navigation-bar" + } +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/member.wxml b/eaterplanet_ecommerce/moduleB/writeoff/member.wxml new file mode 100644 index 0000000..1655036 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/member.wxml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/eaterplanet_ecommerce/moduleB/writeoff/member.wxss b/eaterplanet_ecommerce/moduleB/writeoff/member.wxss new file mode 100644 index 0000000..5e42851 --- /dev/null +++ b/eaterplanet_ecommerce/moduleB/writeoff/member.wxss @@ -0,0 +1,37 @@ + +.search-bar { + padding: 12rpx 25rpx; + background-color: #fff; + width: 100%; + box-sizing: border-box; +} + +.search-box { + background-color: #f0f0f0; + height: 56rpx; + line-height: 56rpx; + border-radius: 28rpx; + color: #acacac; + display: flex; + align-content: center; +} + +.search-icon { + position: absolute; + left: 20rpx; + margin-left: 25rpx; + margin-right: 12rpx; +} + +.search-icon .iconfont { + font-size: 34rpx; + padding-top: 10rpx; +} + +.search-box .ipt { + padding: 0 30rpx 0 60rpx; + line-height: 56rpx; + height: 56rpx; + width: 100%; + box-sizing: border-box; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/resource/css/excharge.wxss b/eaterplanet_ecommerce/resource/css/excharge.wxss new file mode 100644 index 0000000..1cd4838 --- /dev/null +++ b/eaterplanet_ecommerce/resource/css/excharge.wxss @@ -0,0 +1,195 @@ +.top { + position: relative; + padding: 30rpx; + text-align: center; + background: #fff; +} + +.money { + padding-top: 30rpx; +} + +.record { + position: absolute; + top: 30rpx; + right: 30rpx; + color: #408ce2; +} + +.yue { + font-size: 54rpx; + color: #000; + font-weight: bold; +} + +.card { + margin-top: 20rpx; + padding: 30rpx; + background-color: #fff; +} + +.tip { + font-size: 24rpx; + color: #666; + margin-top: 15rpx; +} + +.flex-ipt { + position: relative; + display: flex; + font-size: 40rpx; + color: #000; + justify-content: center; + align-content: center; + overflow: hidden; + border-bottom: 2rpx solid #ececec; + align-items: center; +} + +.flex-ipt .money { + font-size: 30rpx; + flex: 1; + padding: 20rpx 0; +} + +.flex-ipt .bottom-line { + position: absolute; + bottom: 0; + left: 0; + width: 0; + height: 4rpx; + background-color: #2facff; + transition: 200ms all ease-in; +} + +.flex-ipt .bottom-line.ipt-focus { + width: 100%; +} + +.btn { + margin: 50rpx 30rpx; + background-color: #4facfe; + color: #fff; + text-align: center; + line-height: 88rpx; + font-size: 30rpx; + border-radius: 5rpx; +} + +button.btn::after { + border: none; +} + +.btn.disable { + background-color: #4facfe; +} + +button.btn[disabled] { + color: #fff!important; + background: #4facfe!important; + border-radius: 20rpx; +} + +.desc { + padding: 0 30rpx; + line-height: 1.6; + font-size: 26rpx; + color: #666; +} + +.desc .h2 { + font-size: 30rpx; + margin-bottom: 10rpx; +} + +.sucess { + display: flex; + flex-direction: column; + align-items: center; + justify-content: space-around; + height: 100vh; + text-align: center; + background: #fff; +} + +.sucess .applyPassImg { + width: 172rpx; + color: #ff758c; + margin-bottom: 40rpx; +} + +.sucess .h1 { + font-size: 32rpx; + margin-bottom: 20rpx; + color: #4facfe; + font-weight: bold; +} + +.sucess .p { + font-size: 28rpx; + color: #999; +} + +.sucess .link-btn { + color: #4facfe; + font-size: 28rpx; + margin-top: 100rpx; +} + +.radio-group { + margin-top: 40rpx; +} + +.radio { + position: relative; + margin-right: 20rpx; + width: 38rpx; +} + +.radio text { + display: inline-block; + vertical-align: middle; +} + +radio { + width: 38rpx; +} + +radio .wx-radio-input { + border-radius: 50%; + width: 28rpx; + height: 28rpx; +} + +radio .wx-radio-input.wx-radio-input-checked::before { + border-radius: 50%; + width: 44rpx; + height: 44rpx; + line-height: 44rpx; + text-align: center; + font-size: 28rpx; + color: #fff; + background: #2facff; + border-color: #2facff; +} + +.form-box { + margin-top: 30rpx; +} + +.form-group { + margin-bottom: 20rpx; + font-size: 30rpx; +} + +.form-ipt { + position: relative; + border: 1rpx solid #e5e5e5; + padding: 5rpx 10rpx; + line-height: 52rpx; +} + +.getall { + font-size: 28rpx; + color: #408ce2; +} diff --git a/eaterplanet_ecommerce/resource/css/vip.wxss b/eaterplanet_ecommerce/resource/css/vip.wxss new file mode 100644 index 0000000..13f5a8c --- /dev/null +++ b/eaterplanet_ecommerce/resource/css/vip.wxss @@ -0,0 +1,22 @@ +.vip { + background: linear-gradient(to right, #e3c28c, #fdd2a7); + height: 76rpx; + padding: 0 20rpx; + font-size: 24rpx; + color: #72491d; + border-radius: 10rpx; + margin-top: 30rpx; +} + +.vip .goright.iconfont { + font-size: 24rpx; +} + +.vip-logo { + width: 30rpx; + height: 30rpx; +} + +.vip-name { + align-items: center; +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/Location.js b/eaterplanet_ecommerce/utils/Location.js new file mode 100644 index 0000000..b24e374 --- /dev/null +++ b/eaterplanet_ecommerce/utils/Location.js @@ -0,0 +1,185 @@ +let app = getApp(); +var QQMapWX = require("./qqmap-wx-jssdk.min.js"); + +function checkGPS(t, fn=null) { + wx.authorize({ + scope: "scope.userLocation", + success: function () { + console.log("get GPS success"), wx.getLocation({ + success: function (n) { + console.log("get GPS location success"), app.globalData.location = { + lat: n.latitude, + lng: n.longitude + }, app.globalData.canGetGPS = true, fn; + wx.setStorage({ + key: "latitude", + data: n.latitude + }) + wx.setStorage({ + key: "longitude", + data: n.longitude + }) + }, + fail: function () { + console.log("get GPS location fail"), app.globalData.canGetGPS = false, fn&&fn(); + } + }); + }, + fail: function () { + console.log("get GPS fail checkGPS"), app.globalData.canGetGPS = false, fn&&fn(); + } + }); +} + +function openSetting(t) { + return new Promise(function (resolve, reject) { + wx.showModal({ + content: "为了更好的服务您,需要您的地理位置", + confirmText: "去开启", + confirmColor: "#FF673F", + success: function(res1) { + if(res1.confirm) { + wx.openSetting({ + success: function(result) { + console.log(result); + if(result.authSetting["scope.userLocation"]){ + wx.getLocation({ + success: function(res) { + console.log("get GPS location success"); + getApp().globalData.location = { + lat: res.latitude, + lng: res.longitude + }, + getApp().globalData.canGetGPS = true; + resolve(res); + }, + fail: function (error) { + console.log("get GPS fail openSetting"); + getApp().globalData.canGetGPS = false; + reject('取消', error); + } + }); + } else { + reject('未开启'); + } + }, + fail: function(error) { + reject(error); + } + }); + } else if(res1.cancel) { + reject('用户点击取消'); + console.log('用户点击取消') + } + } + }); + }); +} + +/** + * 获取定位城市 + */ +function getGps() { + let that = this; + return new Promise(function (resolve, reject) { + wx.getLocation({ + type: 'gcj02', //编码方式, + success: function (res) { + console.log("getGps-res", res); + resolve(res); + wx.setStorage({ + key: "latitude", + data: res.latitude + }) + wx.setStorage({ + key: "longitude", + data: res.longitude + }) + }, + fail: (error) => { + console.log("getGps-error", error); + if (error.errMsg == "getLocation:fail auth deny"){ + that.openSetting().then(function(res){ + console.log(res); + // reject(res) + }).catch(function(){ + console.log(error); + reject(error); + }); + } else { + // reject(error); + console.log(error); + // reject(error); + } + } + }) + }) +} + +/** + * 通过GPS获取详细位置 + */ +function getGpsLocation(lat, lon) { + var tx_map_key = wx.getStorageSync('tx_map_key'); + if (tx_map_key) { + return new Promise(function (resolve, reject) { + analyzeGps(tx_map_key, lat, lon).then((res)=>{ + resolve(res); + }); + }) + } else { + return new Promise(function (resolve, reject) { + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.get_community_config' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + tx_map_key = res.data.tx_map_key; + wx.setStorage({ + key: "tx_map_key", + data: tx_map_key + }) + analyzeGps(tx_map_key, lat, lon).then((res) => { + resolve(res); + }); + } + } + }) + }) + } +} + +/** + * 解析GPS + */ +function analyzeGps(tx_map_key, lat, lon) { + var demo = new QQMapWX({ + key: tx_map_key + }); + return new Promise(function (resolve, reject) { + demo.reverseGeocoder({ + //腾讯地图api 逆解析方法 首先设置经纬度 + location: { + latitude: lat, + longitude: lon + }, //逆解析成功回调函数 + success: function (res) { + console.log(res) + let address_component = res.result.address_component || {}; + let address_reference = res.result.address_reference; + address_component.town = address_reference.town&&address_reference.town.title || ''; + resolve(address_component); + } + }) + }) +} + +module.exports = { + checkGPS, + openSetting, + getGps, + getGpsLocation +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/WxValidate.js b/eaterplanet_ecommerce/utils/WxValidate.js new file mode 100644 index 0000000..59ce0be --- /dev/null +++ b/eaterplanet_ecommerce/utils/WxValidate.js @@ -0,0 +1,418 @@ +/** + * 表单验证 + * + * @param {Object} rules 验证字段的规则 + * @param {Object} messages 验证字段的提示信息 + * + */ +class WxValidate { + constructor(rules = {}, messages = {}) { + Object.assign(this, { + data: {}, + rules, + messages, + }) + this.__init() + } + + /** + * __init + */ + __init() { + this.__initMethods() + this.__initDefaults() + this.__initData() + } + + /** + * 初始化数据 + */ + __initData() { + this.form = {} + this.errorList = [] + } + + /** + * 初始化默认提示信息 + */ + __initDefaults() { + this.defaults = { + messages: { + required: '这是必填字段。', + email: '请输入有效的电子邮件地址。', + tel: '请输入11位的手机号码。', + url: '请输入有效的网址。', + date: '请输入有效的日期。', + dateISO: '请输入有效的日期(ISO),例如:2009-06-23,1998/01/22。', + number: '请输入有效的数字。', + digits: '只能输入数字。', + idcard: '请输入18位的有效身份证。', + equalTo: this.formatTpl('输入值必须和 {0} 相同。'), + contains: this.formatTpl('输入值必须包含 {0}。'), + minlength: this.formatTpl('最少要输入 {0} 个字符。'), + maxlength: this.formatTpl('最多可以输入 {0} 个字符。'), + rangelength: this.formatTpl('请输入长度在 {0} 到 {1} 之间的字符。'), + min: this.formatTpl('请输入不小于 {0} 的数值。'), + max: this.formatTpl('请输入不大于 {0} 的数值。'), + range: this.formatTpl('请输入范围在 {0} 到 {1} 之间的数值。'), + } + } + } + + /** + * 初始化默认验证方法 + */ + __initMethods() { + const that = this + that.methods = { + /** + * 验证必填元素 + */ + required(value, param) { + if (!that.depend(param)) { + return 'dependency-mismatch' + } else if (typeof value === 'number') { + value = value.toString() + } else if (typeof value === 'boolean') { + return !0 + } + + return value.length > 0 + }, + /** + * 验证电子邮箱格式 + */ + email(value) { + return that.optional(value) || /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(value) + }, + /** + * 验证手机格式 + */ + tel(value) { + return that.optional(value) || /^1[23456789]\d{9}$/.test(value) + }, + /** + * 验证URL格式 + */ + url(value) { + return that.optional(value) || /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(value) + }, + /** + * 验证日期格式 + */ + date(value) { + return that.optional(value) || !/Invalid|NaN/.test(new Date(value).toString()) + }, + /** + * 验证ISO类型的日期格式 + */ + dateISO(value) { + return that.optional(value) || /^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(value) + }, + /** + * 验证十进制数字 + */ + number(value) { + return that.optional(value) || /^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(value) + }, + /** + * 验证整数 + */ + digits(value) { + return that.optional(value) || /^\d+$/.test(value) + }, + /** + * 验证身份证号码 + */ + idcard(value) { + return that.optional(value) || /^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(value) + }, + /** + * 验证两个输入框的内容是否相同 + */ + equalTo(value, param) { + return that.optional(value) || value === that.data[param] + }, + /** + * 验证是否包含某个值 + */ + contains(value, param) { + return that.optional(value) || value.indexOf(param) >= 0 + }, + /** + * 验证最小长度 + */ + minlength(value, param) { + return that.optional(value) || value.length >= param + }, + /** + * 验证最大长度 + */ + maxlength(value, param) { + return that.optional(value) || value.length <= param + }, + /** + * 验证一个长度范围[min, max] + */ + rangelength(value, param) { + return that.optional(value) || (value.length >= param[0] && value.length <= param[1]) + }, + /** + * 验证最小值 + */ + min(value, param) { + return that.optional(value) || value >= param + }, + /** + * 验证最大值 + */ + max(value, param) { + return that.optional(value) || value <= param + }, + /** + * 验证一个值范围[min, max] + */ + range(value, param) { + return that.optional(value) || (value >= param[0] && value <= param[1]) + }, + } + } + + /** + * 添加自定义验证方法 + * @param {String} name 方法名 + * @param {Function} method 函数体,接收两个参数(value, param),value表示元素的值,param表示参数 + * @param {String} message 提示信息 + */ + addMethod(name, method, message) { + this.methods[name] = method + this.defaults.messages[name] = message !== undefined ? message : this.defaults.messages[name] + } + + /** + * 判断验证方法是否存在 + */ + isValidMethod(value) { + let methods = [] + for (let method in this.methods) { + if (method && typeof this.methods[method] === 'function') { + methods.push(method) + } + } + return methods.indexOf(value) !== -1 + } + + /** + * 格式化提示信息模板 + */ + formatTpl(source, params) { + const that = this + if (arguments.length === 1) { + return function() { + let args = Array.from(arguments) + args.unshift(source) + return that.formatTpl.apply(this, args) + } + } + if (params === undefined) { + return source + } + if (arguments.length > 2 && params.constructor !== Array) { + params = Array.from(arguments).slice(1) + } + if (params.constructor !== Array) { + params = [params] + } + params.forEach(function(n, i) { + source = source.replace(new RegExp("\\{" + i + "\\}", "g"), function() { + return n + }) + }) + return source + } + + /** + * 判断规则依赖是否存在 + */ + depend(param) { + switch (typeof param) { + case 'boolean': + param = param + break + case 'string': + param = !!param.length + break + case 'function': + param = param() + default: + param = !0 + } + return param + } + + /** + * 判断输入值是否为空 + */ + optional(value) { + return !this.methods.required(value) && 'dependency-mismatch' + } + + /** + * 获取自定义字段的提示信息 + * @param {String} param 字段名 + * @param {Object} rule 规则 + */ + customMessage(param, rule) { + const params = this.messages[param] + const isObject = typeof params === 'object' + if (params && isObject) return params[rule.method] + } + + /** + * 获取某个指定字段的提示信息 + * @param {String} param 字段名 + * @param {Object} rule 规则 + */ + defaultMessage(param, rule) { + let message = this.customMessage(param, rule) || this.defaults.messages[rule.method] + let type = typeof message + + if (type === 'undefined') { + message = `Warning: No message defined for ${rule.method}.` + } else if (type === 'function') { + message = message.call(this, rule.parameters) + } + + return message + } + + /** + * 缓存错误信息 + * @param {String} param 字段名 + * @param {Object} rule 规则 + * @param {String} value 元素的值 + */ + formatTplAndAdd(param, rule, value) { + let msg = this.defaultMessage(param, rule) + + this.errorList.push({ + param: param, + msg: msg, + value: value, + }) + } + + /** + * 验证某个指定字段的规则 + * @param {String} param 字段名 + * @param {Object} rules 规则 + * @param {Object} data 需要验证的数据对象 + */ + checkParam(param, rules, data) { + + // 缓存数据对象 + this.data = data + + // 缓存字段对应的值 + const value = data[param] !== null && data[param] !== undefined ? data[param] : '' + + // 遍历某个指定字段的所有规则,依次验证规则,否则缓存错误信息 + for (let method in rules) { + + // 判断验证方法是否存在 + if (this.isValidMethod(method)) { + + // 缓存规则的属性及值 + const rule = { + method: method, + parameters: rules[method] + } + + // 调用验证方法 + const result = this.methods[method](value, rule.parameters) + + // 若result返回值为dependency-mismatch,则说明该字段的值为空或非必填字段 + if (result === 'dependency-mismatch') { + continue + } + + this.setValue(param, method, result, value) + + // 判断是否通过验证,否则缓存错误信息,跳出循环 + if (!result) { + this.formatTplAndAdd(param, rule, value) + break + } + } + } + } + + /** + * 设置字段的默认验证值 + * @param {String} param 字段名 + */ + setView(param) { + this.form[param] = { + $name: param, + $valid: true, + $invalid: false, + $error: {}, + $success: {}, + $viewValue: ``, + } + } + + /** + * 设置字段的验证值 + * @param {String} param 字段名 + * @param {String} method 字段的方法 + * @param {Boolean} result 是否通过验证 + * @param {String} value 字段的值 + */ + setValue(param, method, result, value) { + const params = this.form[param] + params.$valid = result + params.$invalid = !result + params.$error[method] = !result + params.$success[method] = result + params.$viewValue = value + } + + /** + * 验证所有字段的规则,返回验证是否通过 + * @param {Object} data 需要验证数据对象 + */ + checkForm(data) { + this.__initData() + + for (let param in this.rules) { + this.setView(param) + this.checkParam(param, this.rules[param], data) + } + + return this.valid() + } + + /** + * 返回验证是否通过 + */ + valid() { + return this.size() === 0 + } + + /** + * 返回错误信息的个数 + */ + size() { + return this.errorList.length + } + + /** + * 返回所有错误信息 + */ + validationErrors() { + return this.errorList + } +} + +export default WxValidate \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/countDown.js b/eaterplanet_ecommerce/utils/countDown.js new file mode 100644 index 0000000..4334e12 --- /dev/null +++ b/eaterplanet_ecommerce/utils/countDown.js @@ -0,0 +1,59 @@ +function t(obj, attr, newAttr) { + return attr in obj ? Object.defineProperty(obj, attr, { + value: newAttr, + enumerable: true, + configurable: true, + writable: true + }) : obj[attr] = newAttr, obj; +} + + +var timeFormat = require("timeFormat"), + app = getApp(); + +exports.default = { + initCountDown: function (e) { + var that = this, + r = { + day: "0", + second: "00", + minute: "00", + hour: "00" + }; + if (e - new Date().getTime() <= 0) { + var i; + this.setData((i = {}, t(i, "countDownMap." + e, r), t(i, "actEndMap." + e, !0), i)); + } else { + this.$data.timer[e] = app.globalData.timer.add(function () { + that.interval(e); + }); + } + }, + interval: function (t) { + var n = {}, r = t - new Date().getTime(); + + if (r <= 0) { + return app.globalData.timer.remove(this.$data.timer[t]), + this.$data.actEndMap[t] || (n["actEndMap." + t] = true), + n["countDownMap." + t] = { + day: "0", + second: "00", + minute: "00", + hour: "00" + }, + void this.setData(n); + } + var i = Math.ceil(r / 1000), + o = parseInt(i / 86400), + u = i % 86400, + s = (0, timeFormat.formatNumber)(parseInt(u / 3600)); + u %= 3600; + var d = { + day: o, + hour: s, + minute: (0, timeFormat.formatNumber)(parseInt(u / 60)), + second: (0, timeFormat.formatNumber)(u % 60) + }; + this.$data.actEndMap[t] && (n["actEndMap." + t] = !1), n["countDownMap." + t] = d, this.setData(n); + } +}; \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/index.js b/eaterplanet_ecommerce/utils/index.js new file mode 100644 index 0000000..9f9d3af --- /dev/null +++ b/eaterplanet_ecommerce/utils/index.js @@ -0,0 +1,417 @@ +var app = getApp(); +var util = require('./util.js'); +var wcache = require('./wcache.js'); + +function loadStatus() { + return new Promise(function (resolve) { + util.check_login_new().then((res) => { + let appLoadStatus = 1; + if (res) { + if (!app.globalData.hasDefaultCommunity) { + appLoadStatus = 2; + } + } else { + appLoadStatus = 0; + } + app.globalData.appLoadStatus = appLoadStatus; + resolve(); + }) + }); +}; + +function changeCommunity(community, city) { + let token = wx.getStorageSync('token') || ''; + if (community.communityId && community.communityId !== app.globalData.community.communityId) { + app.globalData.timer.del(); + app.globalData.changedCommunity = true; + app.globalData.community = community; + app.globalData.refresh = true; + app.globalData.hasDefaultCommunity = true; + wx.setStorage({ + key: "community", + data: community + }); + app.globalData.city = city; + wx.setStorage({ + key: "city", + data: city + }); + + var data = { + community: community, + city: city + }; + + var historyCommunity = app.globalData.historyCommunity || []; + if (0 === historyCommunity.length || historyCommunity[0] && historyCommunity[0].communityId !== community.communityId) { + historyCommunity.length > 1 && historyCommunity.shift(); + historyCommunity.push(data); + app.globalData.historyCommunity = historyCommunity; + wx.setStorage({ + key: "historyCommunity", + data: historyCommunity + }) + } + + app.globalData.changedCommunity = true; + app.globalData.goodsListCarCount = []; + if (token) { + console.log('changeCommunity step2') + // 请求提交社区id + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.switch_history_community', + token: token, + head_id: community.communityId + }, + dataType: 'json', + success: function (res) { + swithNavBack(community) + } + }) + } else { + swithNavBack(community) + } + } else { + if (!app.globalData.community.disUserHeadImg) { + app.globalData.community = community; + wx.setStorage({ + key: "community", + data: community + }) + } + app.globalData.changedCommunity = true; + app.globalData.goodsListCarCount = []; + wx.switchTab({ + url: "/eaterplanet_ecommerce/pages/index/index" + }); + } +} + +// 切换社区跳转 +function swithNavBack(community) { + app.globalData.community_id = community.communityId; + let navBackUrl = app.globalData.navBackUrl; + if (navBackUrl) { + let tabUrls = ['/eaterplanet_ecommerce/pages/index/index', '/eaterplanet_ecommerce/pages/order/shopCart', '/eaterplanet_ecommerce/pages/user/me', '/eaterplanet_ecommerce/pages/type/index']; + if (tabUrls.indexOf(navBackUrl) != -1) { + wx.switchTab({ + url: navBackUrl, + success: () => { + app.globalData.navBackUrl = ''; + } + }) + } else { + wx.redirectTo({ + url: navBackUrl, + success: () => { + app.globalData.navBackUrl = ''; + } + }) + } + } else { + wx.switchTab({ + url: "/eaterplanet_ecommerce/pages/index/index" + }); + } +} + +function isIdCard(t) { + return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(t); +}; + +/** + * 购物车数量 + */ +function cartNum() { + function getTab(cb) { + let token = wx.getStorageSync('token') || ''; + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'car.count', + token: token, + community_id: app.globalData.community.communityId + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + app.globalData.cartNum = res.data.data; + wx.setStorageSync("cartNum", res.data.data); + setTab(res.data.data); + cb(res.data); + } + } + }) + } + + function setTab(t) { + if ("number" == typeof t && t) { + // wx.setTabBarBadge({ + // index: 1, + // text: t + "", + // fail: function (error) { + // console.log(error); + // } + // }) + } else { + // wx.removeTabBarBadge({ + // index: 1, + // fail: function (error) { + // console.log(error); + // } + // }); + } + } + var n = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : "", + i = arguments.length > 1 && void 0 !== arguments[1] && arguments[1]; + return new Promise(function (resolve) { + if (i) { + getTab(resolve); + } else { + var nowTime = new Date().getTime(); + if (app.globalData.cartNumStamp < nowTime) { + getTab(resolve); + } else { + ("number" == typeof n && (app.globalData.cartNum = n), setTab(app.globalData.cartNum), resolve(n)) + } + app.globalData.cartNumStamp = new Date().getTime() + 60000; + } + }); +} + +function getRect(t, e, r) { + return new Promise(function (n) { + wx.createSelectorQuery().in(t)[r ? "selectAll" : "select"](e).boundingClientRect(function (t) { + r && Array.isArray(t) && t.length && n(t), !r && t && n(t); + }).exec(); + }); +} + +/** + * 设置缓存过期时间 + */ +function getInNum() { + return new Promise((resolve, reject) => { + let timestamp = Date.parse(new Date()); + let inNum = parseInt(wx.getStorageSync('inNum')) || 0; + let inNumExp = parseInt(wx.getStorageSync('inNumExp')) || 0; + let today = new Date(new Date().toLocaleDateString()).getTime(); + + if ((timestamp - inNumExp) > 86400000 || inNumExp == 0) { + console.log('过期了'); + inNum = 1; + wx.setStorage({ + key: 'inNumExp', + data: today + }) + } else { + inNum += 1; + } + wx.setStorage({ + key: 'inNum', + data: inNum + }) + let isThree = inNum > 3 ? false : true; + resolve(isThree); + }) +} + +/** + * 设置导航颜色 + */ +function setNavBgColor() { + let navBgColor = wcache.get('navBgColor', 1); + let navFontColor = wcache.get('navFontColor', 1); + if (navBgColor == 1 || navFontColor == 1) { + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_nav_bg_color' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let nav_bg_color = res.data.data || '#4d9ee9'; + let nav_font_color = res.data.nav_font_color || '#ffffff'; + wx.setNavigationBarColor({ + frontColor: nav_font_color, + backgroundColor: nav_bg_color + }) + wcache.put('navBgColor', nav_bg_color, 100); + wcache.put('navFontColor', nav_font_color, 100); + } + } + }) + } else { + wx.setNavigationBarColor({ + frontColor: navFontColor, + backgroundColor: navBgColor + }) + } +} + +/** + * 获取配置名字 团长快递等 + */ +function setGroupInfo() { + return new Promise(function (resolve, reject) { + // let groupInfo = wcache.get('groupInfo', 1); + // if (groupInfo == 1) { + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_group_info' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let obj = res.data.data; + console.log(obj); + obj.commiss_diy_name = obj.commiss_diy_name || '分销'; + obj.group_name = obj.group_name || '社区'; + obj.owner_name = obj.owner_name || '团长'; + obj.delivery_ziti_name = obj.delivery_ziti_name || '社区自提'; + obj.delivery_tuanzshipping_name = obj.delivery_tuanzshipping_name || '团长配送'; + obj.delivery_express_name = obj.delivery_express_name || '快递配送'; + obj.placeorder_tuan_name = obj.placeorder_tuan_name; + obj.placeorder_trans_name = obj.placeorder_trans_name; + obj.localtown_modifypickingname = obj.localtown_modifypickingname + // wcache.put('groupInfo', obj, 60); + resolve(obj); + } + } + }) + // } else { + // resolve(groupInfo); + // } + }) +} + +/** + * 获取首页、购物车图标 + */ +function setIcon() { + let tabList = wcache.get('tabList', 1); + return new Promise(function (resolve, reject) { + if (tabList == 1) { + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'index.get_tabbar' + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let list = res.data.data; + let iconArr = { + home: '', + car: '', + user: '' + }; + iconArr.home = list['i1'] || '/eaterplanet_ecommerce/images/icon-tab-index1.png'; + iconArr.car = list['i2'] || '/eaterplanet_ecommerce/images/icon-tab-shop1.png'; + iconArr.user = list['i3'] || '/eaterplanet_ecommerce/images/icon-tab-me.png'; + resolve(iconArr); + } + } + }) + } else { + let iconArr = { + home: '', + car: '' + }; + iconArr.home = tabList.list[0].iconPath; + iconArr.car = tabList.list[2].iconPath; + iconArr.user = tabList.list[3].iconPath; + resolve(iconArr); + } + }) +} + +function getPx(t) { + return Math.round(app.globalData.systemInfo.windowWidth / 375 * t); +} + +/** + * canvas画文字 + */ +function drawText(context, obj, o, a, n, i) { + var r = o.split(""), + l = "", + u = []; + context.setFillStyle(obj.color); + // context.fillStyle = obj.color; + context.textAlign = obj.textAlign; + context.setFontSize(obj.size); + // context.font = obj.size +'px Arial'; + for (var s = 0; s < r.length; s++) { + context.measureText(l).width < i || (u.push(l), l = ""), l += r[s]; + } + u.push(l); + for (var m = 0; m < u.length; m++) { + context.fillText(u[m], a, n + 12 * m); + } +} + +/** + * 下载图片至本地 + */ +function download(t) { + return new Promise(function (e) { + wx.downloadFile({ + url: t, + success: function (t) { + 200 === t.statusCode && e(t); + }, + fail: function (t) { + console.log(t), wx.hideLoading(); + } + }); + }); +} + +/** + * 更新首页列表购物车数量 + * actId: 商品id + * num:数量 + */ +function indexListCarCount(actId, num = 0) { + let obj = { + actId, + num + }; + if (!actId) return; + let goodsListCarCount = app.globalData.goodsListCarCount || []; + if(Object.prototype.toString.call(goodsListCarCount) !== '[object Array]') { + goodsListCarCount = []; + } + if (goodsListCarCount.length == 0) { + goodsListCarCount.push(obj); + } else { + let k = goodsListCarCount.findIndex((n) => n.actId == obj.actId); + if (k == -1) { + goodsListCarCount.push(obj); + } else { + goodsListCarCount[k].num = obj.num; + } + } + app.globalData.goodsListCarCount = goodsListCarCount; +} + +module.exports = { + changeCommunity, + loadStatus, + isIdCard, + cartNum, + getRect, + getInNum, + setNavBgColor, + setGroupInfo, + setIcon, + getPx, + drawText, + download, + indexListCarCount +} diff --git a/eaterplanet_ecommerce/utils/mixins.js b/eaterplanet_ecommerce/utils/mixins.js new file mode 100644 index 0000000..cb5c906 --- /dev/null +++ b/eaterplanet_ecommerce/utils/mixins.js @@ -0,0 +1,54 @@ +// 保存原生的 Page 函数 +const originPage = Page + +Page = (options) => { + const mixins = options.mixins + // mixins 必须为数组 + if (Array.isArray(mixins)) { + delete options.mixins + // mixins 注入并执行相应逻辑 + options = merge(mixins, options) + } + // 释放原生 Page 函数 + originPage(options) +} + +// 定义小程序内置的属性/方法 +const originProperties = ['data', 'properties', 'options'] +const originMethods = ['onLoad', 'onReady', 'onShow', 'onHide', 'onUnload', 'onPullDownRefresh', 'onReachBottom', 'onShareAppMessage', 'onPageScroll', 'onTabItemTap'] + +function merge(mixins, options) { + if (!Object.entries) { + Object.entries = function (obj) { + var ownProps = Object.keys(obj), + i = ownProps.length, + resArray = new Array(i); // preallocate the Array + while (i--) + resArray[i] = [ownProps[i], obj[ownProps[i]]]; + return resArray; + }; + } + mixins.forEach((mixin) => { + if (Object.prototype.toString.call(mixin) !== '[object Object]') { + throw new Error('mixin 类型必须为对象!') + } + // 遍历 mixin 里面的所有属性 + for (let [key, value] of Object.entries(mixin)) { + if (originProperties.includes(key)) { + // 内置对象属性混入 + options[key] = { ...value, ...options[key] } + } else if (originMethods.includes(key)) { + // 内置方法属性混入,优先执行混入的部分 + const originFunc = options[key] + options[key] = function (...args) { + value.call(this, ...args) + return originFunc && originFunc.call(this, ...args) + } + } else { + // 自定义方法混入 + options = { ...mixin, ...options } + } + } + }) + return options +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/public.js b/eaterplanet_ecommerce/utils/public.js new file mode 100644 index 0000000..c2e6489 --- /dev/null +++ b/eaterplanet_ecommerce/utils/public.js @@ -0,0 +1,90 @@ +var app = getApp(), flag = true; + +/** + * 加入购物车 + */ +function addToCart(data, fn) { + if (flag){ + flag = false; + // 请求数据 + // 成功 + wx.hideLoading(); + wx.showToast({ + title: "已加入购物车", + image: "../../images/addShopCart.png" + }) + flag = true; + app.globalData.cartNum += data.goodsNum; + fn && fn(); + // 失败 + flag = true; + fn && fn(); + } +} + +/** + * 购物车提交 + */ +function skuConfirm(data, fn) { + //请求 + //成功 + fn && fn(); + // app.globalData.settleInfo = res.data; + wx.navigateTo({ + url: "/eaterplanet_ecommerce/pages/order/placeOrder" + }); + // 失败 + // 100008 === t.head.error && wx.showToast({ + // title: "购买单数已达到上限,无法购买此商品", + // icon: "none" + // }); +} + +/** + * 手机formID + */ +function collectFormIds(e) { + console.log(e) + var formIds = app.globalData.formIds; + if (!formIds) + { + formIds = []; + } + formIds.push(e), app.globalData.formIds = formIds; + var token = wx.getStorageSync('token'); + + app.util.request({ + 'url': 'entry/wxapp/index', + 'data': { + controller: 'user.get_member_form_id', + token: token, + from_id: e + }, + dataType: 'json', + success: function (res) { + } + }) + +} + +/** + * 手机验证 + */ +function checkMobile(t) { + return /^1[1-9][0-9]\d{8}$/.test(t); +} + +/** + * 身份证验证 + */ +function isIdCard(t) { + return /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(t); +} + +module.exports = { + addToCart, + skuConfirm, + collectFormIds, + checkMobile, + isIdCard +} diff --git a/eaterplanet_ecommerce/utils/qqmap-wx-jssdk.min.js b/eaterplanet_ecommerce/utils/qqmap-wx-jssdk.min.js new file mode 100644 index 0000000..b92f25a --- /dev/null +++ b/eaterplanet_ecommerce/utils/qqmap-wx-jssdk.min.js @@ -0,0 +1,2 @@ +var _createClass=function(){function a(e,c){for(var b=0;b r ? "今日" + [u.hour, u.minute].map(t).join(":") + "开抢" : a < r && a + 864e5 > r ? "明日" + [u.hour, u.minute].map(t).join(":") + "开抢" : "即将开抢"; +}; \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/timeQueue.js b/eaterplanet_ecommerce/utils/timeQueue.js new file mode 100644 index 0000000..6e552ef --- /dev/null +++ b/eaterplanet_ecommerce/utils/timeQueue.js @@ -0,0 +1,43 @@ +exports.default = class { + constructor(name) { + this.queue = {}; + this.timer = -1; + } + + action(){ + if ("{}" !== JSON.stringify(this.queue)) { + for (let i in this.queue) this.queue[i][0](); + this.timer = -1, this.begin(); + } else { + this.stop(); + } + } + + add(e){ + var t = "" + new Date().getTime() + Math.ceil(1000 * Math.random()); + return this.queue["" + t] = [e], -1 === this.timer && this.start(), t; + } + + remove(e) { + delete this.queue["" + e], "{}" === JSON.stringify(this.queue) && (this.timer = -1); + } + + del() { + this.queue = {}, "{}" === JSON.stringify(this.queue) && (this.timer = -1); + } + + stop() { + clearTimeout(this.timer), this.timer = -1; + } + + start() { + this.timer > -1 || this.action(); + } + + begin() { + var that = this; + this.timer = setTimeout(function () { + that.action(); + }, 1000); + } +} diff --git a/eaterplanet_ecommerce/utils/util.js b/eaterplanet_ecommerce/utils/util.js new file mode 100644 index 0000000..0142459 --- /dev/null +++ b/eaterplanet_ecommerce/utils/util.js @@ -0,0 +1,707 @@ +function getdomain() { + var app = getApp(); + + var new_domain = app.siteInfo.uniacid + '_' + app.siteInfo.siteroot; + + var api = new_domain; + return api; +} + +function api() { + var api = 'https://www.eaterplanet.com/api/'; + return api; +} + +function check_login() { + let token = wx.getStorageSync('token'); + let member_id = wx.getStorageSync('member_id'); + + if (token && member_id != undefined && member_id.length > 0) { + return true; + } else { + return false; + } +} + +/** + * 检查登录状态 + * return promise [Boolean] + */ +function check_login_new() { + let token = wx.getStorageSync('token'); + let member_id = wx.getStorageSync('member_id'); + return new Promise(function (resolve, reject) { + wx.checkSession({ + success() { + console.log('checkSession 未过期'); + if (token && member_id != undefined && member_id.length > 0) { + resolve(true) + } else { + resolve(false) + } + }, + fail() { + console.log('checkSession 过期'); + resolve(false) + } + }) + }) +} + +/** + * 检查跳转权限控制 + * return [Boolean] + */ +function checkRedirectTo(url, needAuth) { + let status = false; + if (needAuth) { + const needAuthUrl = [ + "/eaterplanet_ecommerce/moduleA/groupCenter/apply", + "/eaterplanet_ecommerce/pages/supply/apply", + "/eaterplanet_ecommerce/pages/user/charge", + "/eaterplanet_ecommerce/pages/order/index", + "/eaterplanet_ecommerce/moduleA/solitaire/index", + "/eaterplanet_ecommerce/moduleA/vip/upgrade", + "eaterplanet_ecommerce/moduleA/coupon/getCoupon" + ]; + let idx = needAuthUrl.indexOf(url); + if (idx !== -1) status = true; + } + return status; +} + +/** + * s_link: 回调链接 + * type:跳转方式 0 redirectTo, 1 switchTab + */ +function login(s_link, type = 0) { + var app = getApp(); + var share_id = wx.getStorageSync('share_id'); + if (share_id == undefined) { + share_id = '0'; + } + + wx.login({ + success: function (res) { + if (res.code) { + console.log(res.code); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.applogin', + 'code': res.code + }, + dataType: 'json', + success: function (res) { + console.log(res); + wx.setStorage({ + key: "token", + data: res.data.token + }) + wx.getUserInfo({ + success: function (msg) { + var userInfo = msg.userInfo + wx.setStorage({ + key: "userInfo", + data: userInfo + }) + console.log(msg.userInfo); + app.util.request({ + 'url': 'entry/wxapp/user', + 'data': { + controller: 'user.applogin_do', + 'token': res.data.token, + share_id: share_id, + nickName: msg.userInfo.nickName, + avatarUrl: msg.userInfo.avatarUrl, + encrypteddata: msg.encryptedData, + iv: msg.iv + }, + method: 'post', + dataType: 'json', + success: function (res) { + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + wx.showToast({ + title: '资料已更新', + icon: 'success', + duration: 2000, + success: function () { + //s_link + if (s_link && s_link.length > 0) { + if (type == 1) { + wx.switchTab({ + url: s_link, + }) + } else { + wx.redirectTo({ + url: s_link + }) + } + } + } + }) + } + }) + }, + fail: function (msg) { + // console.log(msg); + } + }) + } + }); + } else { + //console.log('获取用户登录态失败!' + res.errMsg) + } + } + }) +} + +function login_prosime(needPosition = true, userInfo = {}) { + return new Promise(function (resolve, reject) { + getCode().then(token => { + wxGetUserInfo(needPosition, token, userInfo).then(res => { + resolve(res) + }).catch(res => { + console.log(res); + reject(res) + }); + }) + }) +} + +function login_promise(needPosition = true, userInfo = {}) { + return new Promise(function (resolve, reject) { + getCode().then(token => { + let member_info = wx.getStorageSync('member_info') + console.log(typeof (member_info)) + let wxGetUserInfoFunc = member_info !== null ? wxGetMemberInfo : wxGetUserInfo; + function handleResponse(res) { + resolve(res) + } + function handleError(res) { + reject(res) + } + wxGetUserInfoFunc(needPosition, token, userInfo, member_info).then(handleResponse).catch(handleError); + }) + }) +} + +function getCode() { + return new Promise(function (resolve, reject) { + var app = getApp(); + wx.login({ + success: function (res) { + if (res.code) { + console.log(res.code); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.applogin', + code: res.code + }, + dataType: 'json', + success: function (res) { + resolve(res.data.token); + wx.setStorage({ + key: "token", + data: res.data.token + }) + wx.setStorage({ + key: "member_info", + data: res.data.member_info + }) + console.log(res.data) + } + }); + } else { + reject(res.errMsg) + } + } + }) + }) +} + +function wxGetMemberInfo(needPosition, token, userInfo, member_info) { + return new Promise(function (resolve, reject) { + var app = getApp(); + var share_id = wx.getStorageSync('share_id'); + var member_info = wx.getStorageSync('member_info'); + if (share_id == undefined) { + share_id = '0'; + } + var community = wx.getStorageSync('community'); + var community_id = community && (community.communityId || 0); + community && wx.setStorageSync('lastCommunity', community); + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.applogin_do', + token, + member_info, + share_id: share_id, + nickName: member_info.username, + avatarUrl: member_info.avatar, + community_id + }, + method: 'post', + dataType: 'json', + success: function (res) { + let isblack = res.data.isblack || 0; + let isparse_formdata = res.data.isparse_formdata || 0; + if (isblack == 1) { + app.globalData.isblack = 1; + wx.removeStorageSync('token'); + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } else if (isparse_formdata == 1) { + wx.setStorageSync('isparse_formdata', 1); + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } else { + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + console.log('needPosition', needPosition) + needPosition && getCommunityInfo(); + } + resolve(res); + }, + fail: (err) => { + console.log("9applogin_do") + reject(err); + } + }) + }) +} + +function wxGetUserInfo(needPosition, token, userInfo) { + return new Promise(function (resolve, reject) { + var app = getApp(); + var share_id = wx.getStorageSync('share_id'); + if (share_id == undefined) { + share_id = '0'; + } + var community = wx.getStorageSync('community'); + var community_id = community && (community.communityId || 0); + community && wx.setStorageSync('lastCommunity', community); + + app.util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'user.applogin_do', + token, + share_id: share_id, + nickName: userInfo.nickName, + avatarUrl: userInfo.avatarUrl, + community_id + }, + method: 'post', + dataType: 'json', + success: function (res) { + let isblack = res.data.isblack || 0; + let isparse_formdata = res.data.isparse_formdata || 0; + + if (isblack == 1) { + app.globalData.isblack = 1; + wx.removeStorageSync('token'); + wx.switchTab({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } else if (isparse_formdata == 1) { + wx.setStorageSync('isparse_formdata', 1); + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + wx.reLaunch({ + url: '/eaterplanet_ecommerce/pages/index/index', + }) + } else { + wx.setStorage({ + key: "member_id", + data: res.data.member_id + }) + console.log('needPosition', needPosition) + needPosition && getCommunityInfo(); + } + resolve(res); + }, + fail: (err) => { + reject(err); + } + }) + }) +} + +function stringToJson(data) { + return JSON.parse(data); +} + +function jsonToString(data) { + return JSON.stringify(data); +} + +function imageUtil(e) { + var imageSize = {}; + var originalWidth = e.detail.width; //图片原始宽 + var originalHeight = e.detail.height; //图片原始高 + var originalScale = originalHeight / originalWidth; //图片高宽比 + + //获取屏幕宽高 + wx.getSystemInfo({ + success: function (res) { + var windowWidth = res.windowWidth; + var windowHeight = res.windowHeight; + var windowscale = windowHeight / windowWidth; //屏幕高宽比 + + //console.log('windowWidth: ' + windowWidth) + //console.log('windowHeight: ' + windowHeight) + if (originalScale < windowscale) { //图片高宽比小于屏幕高宽比 + //图片缩放后的宽为屏幕宽 + imageSize.imageWidth = windowWidth; + imageSize.imageHeight = (windowWidth * originalHeight) / originalWidth; + } else { //图片高宽比大于屏幕高宽比 + //图片缩放后的高为屏幕高 + imageSize.imageHeight = windowHeight; + imageSize.imageWidth = (windowHeight * originalWidth) / originalHeight; + } + } + }) + //console.log('缩放后的宽: ' + imageSize.imageWidth) + //console.log('缩放后的高: ' + imageSize.imageHeight) + return imageSize; +} + +const formatTime = date => { + const year = date.getFullYear() + const month = date.getMonth() + 1 + const day = date.getDate() + const hour = date.getHours() + const minute = date.getMinutes() + const second = date.getSeconds() + + return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':') +} + +const formatNumber = n => { + n = n.toString() + return n[1] ? n : '0' + n +} + +//获取社区存本地 +const getCommunityInfo = function (param = {}) { + // let community = wx.getStorageSync('community'); + let app = getApp(); + // let that = this; + var token = wx.getStorageSync('token'); + return new Promise(function (resolve, reject) { + // if (!community){ + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.load_history_community', + token: token + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) { + let history_communities = res.data.list; + if (Object.keys(history_communities).length > 0 || history_communities.communityId != 0) { + wx.setStorageSync('community', history_communities); + app.globalData.community = history_communities; + resolve(history_communities); + } else { + resolve(''); + } + } else if (res.data.code == 1) { + console.log(param) + if (check_login() && param.communityId === void 0) { + wx.redirectTo({ + url: '/eaterplanet_ecommerce/pages/position/community', + }) + resolve(''); + } else { + resolve(param); + } + } else { + // 未登录 + resolve(''); + } + } + }) + // } else { + // resolve('') + // } + }) +} + +/** + * 通过社区id获取社区信息 + * 单社区控制 + * data:该id社区信息 + * open_danhead_model:是否开启单社区 + * default_head_info: 自定义单社区信息 + */ +const getCommunityById = function (community_id) { + return new Promise(function (resolve, reject) { + getApp().util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.get_community_info', + community_id + }, + dataType: 'json', + success: function (res) { + if (res.data.code == 0) resolve(res.data); + } + }) + }) +} + +/** + * 历史社区 + */ +const addhistory = function (community, isNew = false) { + var community_id = community.communityId; + console.log('addhistory'); + var token = wx.getStorageSync('token'); + getApp().util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.addhistory_community', + community_id, + token: token + }, + dataType: 'json', + success: function (res) { + if (isNew) { + console.log('新人 社区') + app.util.request({ + url: 'entry/wxapp/index', + data: { + controller: 'index.get_community_info', + community_id: community_id + }, + dataType: 'json', + success: function (result) { + if (result.data.code == 0) { + let community = result.data.data; + app.globalData.community = community; + app.globalData.changedCommunity = true; + wx.setStorage({ + key: "community", + data: community + }) + } + } + }) + } + } + }) +} + +/** + * 获取wx的版本号 + */ +const getWxVersion = function () { + return wx.getSystemInfoSync().SDKVersion +} + +/** + * 微信版本比较, v1 大于 v2,返回1,否则返回 0 + * @param {Object} v1 + * @param {Object} v2 + */ +const wxCompareVersion = function (v1, v2) { + v1 = v1.split('.') + v2 = v2.split('.') + const len = Math.max(v1.length, v2.length) + while (v1.length < len) { + v1.push('0') + } + while (v2.length < len) { + v2.push('0') + } + for (let i = 0; i < len; i++) { + const num1 = parseInt(v1[i]) + const num2 = parseInt(v2[i]) + + if (num1 > num2) { + return 1 + } else if (num1 < num2) { + return -1 + } + } + return 0 +} + +const addCart = function (option) { + return new Promise((resolve, reject) => { + let token = wx.getStorageSync('token'); + getApp().util.request({ + url: 'entry/wxapp/user', + data: { + controller: 'car.add', + token, + ...option + }, + dataType: 'json', + method: 'POST', + success: function (res) { + if (res.data.code == 7) { + let { + has_image, + pop_vipmember_buyimage + } = res.data; + if (has_image == 1 && pop_vipmember_buyimage) { + res.showVipModal = 1; + res.data.pop_vipmember_buyimage = pop_vipmember_buyimage; + resolve(res) + } else { + resolve(res) + } + } else { + resolve(res) + } + }, + fail: function (res) { + reject(res) + } + }) + }) +} + +const filterTel = function (shipping_tel) { + if (shipping_tel) { + var pat = /(\d{7})\d*(\d{0})/; + return shipping_tel.replace(pat, '$1****$2'); + } + return shipping_tel; +} + +/*函数节流*/ +function throttle(fn, interval) { + var enterTime = 0; //触发的时间 + var gapTime = interval || 300; //间隔时间,如果interval不传,则默认300ms + return function () { + var context = this; + var backTime = new Date(); //第一次函数return即触发的时间 + if (backTime - enterTime > gapTime) { + fn.call(context, arguments); + enterTime = backTime; //赋值给第一次触发的时间,这样就保存了第二次触发的时间 + } + }; +} + +/*函数防抖*/ +function debounce(fn, interval) { + var timer; + var gapTime = interval || 1000; //间隔时间,如果interval不传,则默认1000ms + return function () { + clearTimeout(timer); + var context = this; + var args = arguments; //保存此处的arguments,因为setTimeout是全局的,arguments不是防抖函数需要的。 + timer = setTimeout(function () { + fn.call(context, args); + }, gapTime); + }; +} + +const fileSystem = wx.getFileSystemManager() +/** + * 缓存图片 + */ +const getStorageImage = (web_image) => { + return new Promise((resolve, reject) => { + let webImages = wx.getStorageSync('webImages') || [] + let webImage = webImages.find(y => y.web_path === web_image) + if (webImage) { + try { + fileSystem.accessSync(webImage.local_path) + resolve(webImage.local_path) + return webImage.local_path + } catch (e) { + // let webImageIdx = webImages.findIndex(y => y.web_path === web_image) + // webImages.splice(webImageIdx, 1) + wx.setStorageSync('webImages', webImages) + } + resolve(web_image) + } else { + wx.downloadFile({ + url: web_image, + success(res) { + if (res.statusCode === 200) { + let filePath = res.tempFilePath + // let webImageStorage = wx.getStorageSync('webImages') || [] + let webImageStorage = [] + wx.getImageInfo({ + src: filePath, + success(ret) { + let windowWidth = getApp().globalData.systemInfo.windowWidth || 375; + let h = ret.height; + let w = ret.width; + let height = h * windowWidth / w; + let storage = { + web_path: web_image, + local_path: filePath, + height, + last_time: Date.parse(new Date()), + } + webImageStorage.push(storage) + wx.setStorageSync('webImages', webImageStorage) + resolve(web_image) + }, + fail(err) { + console.log(err) + reject() + } + }) + } else { + reject() + } + }, + fail() { + reject() + } + }) + } + // return web_image + }) +} + +module.exports = { + formatTime: formatTime, + login: login, + check_login: check_login, + api: api, + getdomain: getdomain, + imageUtil: imageUtil, + jsonToString: jsonToString, + stringToJson: stringToJson, + login_prosime, + login_promise, + wxGetMemberInfo, + getCommunityInfo, + check_login_new, + checkRedirectTo, + getCommunityById, + addhistory, + wxGetUserInfo, + getWxVersion, + wxCompareVersion, + addCart, + filterTel, + throttle, + debounce, + getStorageImage +} \ No newline at end of file diff --git a/eaterplanet_ecommerce/utils/wcache.js b/eaterplanet_ecommerce/utils/wcache.js new file mode 100644 index 0000000..313fb70 --- /dev/null +++ b/eaterplanet_ecommerce/utils/wcache.js @@ -0,0 +1,48 @@ +var dtime = '_deadtime'; + +function put(k, v, t) { + wx.setStorageSync(k, v) + var seconds = parseInt(t); + if (seconds > 0) { + var timestamp = Date.parse(new Date()); + timestamp = timestamp / 1000 + seconds; + wx.setStorageSync(k + dtime, timestamp + "") + } else { + wx.removeStorageSync(k + dtime) + } +} + +function get(k, def) { + var deadtime = parseInt(wx.getStorageSync(k + dtime)) + if (deadtime) { + if (parseInt(deadtime) < Date.parse(new Date()) / 1000) { + if (def) { + return def; + } else { + return; + } + } + } + var res = wx.getStorageSync(k); + if (res) { + return res; + } else { + return def; + } +} + +function remove(k) { + wx.removeStorageSync(k); + wx.removeStorageSync(k + dtime); +} + +function clear() { + wx.clearStorageSync(); +} + +module.exports = { + put: put, + get: get, + remove: remove, + clear: clear, +} \ No newline at end of file