├── .gitignore
├── pages
├── address
│ ├── edit
│ │ ├── edit.json
│ │ └── edit.wxml
│ └── index
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
├── cart
│ └── index
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
├── coupon
│ ├── use
│ │ ├── use.json
│ │ ├── use.wxss
│ │ ├── use.wxml
│ │ └── use.js
│ └── index
│ │ ├── index.json
│ │ ├── index.wxss
│ │ ├── index.wxml
│ │ └── index.js
├── goods
│ ├── index
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
│ ├── score
│ │ ├── score.json
│ │ ├── list.json
│ │ ├── score.wxml
│ │ ├── list.wxml
│ │ ├── list.wxss
│ │ ├── score.js
│ │ ├── score.wxss
│ │ └── list.js
│ ├── favorite
│ │ ├── favorite.json
│ │ ├── favorite.wxml
│ │ ├── favorite.wxss
│ │ └── favorite.js
│ └── history
│ │ ├── history.json
│ │ ├── history.wxml
│ │ ├── history.wxss
│ │ └── history.js
├── order
│ ├── trace
│ │ ├── trace.json
│ │ ├── trace.js
│ │ ├── trace.wxss
│ │ └── trace.wxml
│ ├── trade
│ │ ├── trade.json
│ │ ├── trade.wxss
│ │ └── trade.wxml
│ ├── detail
│ │ └── detail.json
│ └── index
│ │ ├── index.json
│ │ ├── index.wxml
│ │ └── index.wxss
├── refund
│ ├── apply
│ │ ├── apply.json
│ │ ├── apply.wxss
│ │ ├── apply.js
│ │ └── apply.wxml
│ └── detail
│ │ ├── detail.json
│ │ ├── detail.wxss
│ │ ├── detail.js
│ │ └── detail.wxml
├── shop
│ ├── detail
│ │ ├── detail.json
│ │ ├── detail.wxss
│ │ ├── detail.wxml
│ │ └── detail.js
│ ├── contact
│ │ ├── contact.json
│ │ ├── contact.js
│ │ ├── contact.wxml
│ │ └── contact.wxss
│ └── index
│ │ ├── index.json
│ │ ├── index.wxss
│ │ └── index.wxml
└── customer
│ ├── index
│ ├── index.json
│ ├── index.js
│ ├── index.wxss
│ └── index.wxml
│ └── login
│ ├── login.json
│ ├── login.wxml
│ ├── login.wxss
│ └── login.js
├── templates
├── shop
│ ├── info
│ │ ├── shop-info-template.wxss
│ │ └── shop-info-template.wxml
│ ├── list
│ │ ├── shop-list-template.wxss
│ │ └── shop-list-template.wxml
│ ├── item-white
│ │ ├── shop-item-template.wxml
│ │ └── shop-item-template.wxss
│ └── item
│ │ ├── shop-item-template.wxml
│ │ └── shop-item-template.wxss
├── steps
│ ├── index.wxss
│ ├── index.wxml
│ └── wxss
│ │ ├── vstep.wxss
│ │ └── step.wxss
├── order
│ ├── list
│ │ ├── order-list-template.wxss
│ │ └── order-list-template.wxml
│ ├── tab
│ │ ├── order-tab-template.wxml
│ │ └── order-tab-template.wxss
│ ├── goods
│ │ ├── order-goods-template.wxml
│ │ └── order-goods-template.wxss
│ ├── detail-item
│ │ ├── order-item-template.wxml
│ │ └── order-item-template.wxss
│ └── list-item
│ │ ├── order-item-template.wxss
│ │ └── order-item-template.wxml
├── goods
│ ├── sku
│ │ ├── goods-sku-template.wxss
│ │ └── goods-sku-template.wxml
│ ├── score
│ │ ├── goods-score-template.wxss
│ │ └── goods-score-template.wxml
│ ├── detail
│ │ ├── goods-detail-template.wxss
│ │ └── goods-detail-template.wxml
│ ├── grid
│ │ ├── goods-grid-template.wxss
│ │ └── goods-grid-template.wxml
│ ├── fav
│ │ ├── goods-fav-template.wxml
│ │ └── goods-fav-template.wxss
│ ├── item
│ │ ├── goods-item-template.wxml
│ │ └── goods-item-template.wxss
│ ├── buy-bar
│ │ ├── goods-buy-bar-template.wxml
│ │ └── goods-buy-bar-template.wxss
│ ├── info
│ │ ├── goods-info-template.wxss
│ │ └── goods-info-template.wxml
│ └── buy-panel
│ │ ├── goods-buy-panel-template.wxml
│ │ └── goods-buy-panel-template.wxss
├── toptips
│ ├── index.wxml
│ ├── index.wxss
│ └── index.js
├── notice
│ └── bar
│ │ ├── notice-bar-template.wxss
│ │ └── notice-bar-template.wxml
├── coupon
│ ├── shelf
│ │ ├── coupon-shelf-template.wxss
│ │ └── coupon-shelf-template.wxml
│ ├── pick-simple
│ │ ├── coupon-pick-template.wxml
│ │ └── coupon-pick-template.wxss
│ ├── pick-color
│ │ ├── coupon-pick-template.wxml
│ │ └── coupon-pick-template.wxss
│ ├── pick-item
│ │ ├── coupon-item-template.wxml
│ │ └── coupon-item-template.wxss
│ ├── shelf-panel
│ │ ├── coupon-panel-template.wxml
│ │ └── coupon-panel-template.wxss
│ └── item
│ │ ├── coupon-item-template.wxml
│ │ └── coupon-item-template.wxss
├── tab
│ ├── index.js
│ ├── index.wxss
│ └── index.wxml
├── loadmore
│ └── index.wxml
├── address
│ ├── show
│ │ ├── address-show-template.wxml
│ │ └── address-show-template.wxss
│ ├── item
│ │ ├── address-item-template.wxml
│ │ └── address-item-template.wxss
│ └── mgr
│ │ ├── address-item-template.wxml
│ │ └── address-item-template.wxss
├── trade
│ └── item
│ │ ├── order-item-template.wxml
│ │ └── order-item-template.wxss
├── quantity
│ ├── index.wxss
│ ├── index.wxml
│ └── index.js
└── cart
│ └── item
│ ├── cart-item-template.wxml
│ └── cart-item-template.wxss
├── images
├── icons
│ ├── car.png
│ ├── new.png
│ ├── vip.png
│ ├── alert.png
│ ├── close.png
│ ├── cuppon.png
│ ├── delete.png
│ ├── down.png
│ ├── edit.png
│ ├── error.png
│ ├── gift.png
│ ├── like.png
│ ├── more.png
│ ├── notice.png
│ ├── order.png
│ ├── phone.png
│ ├── picked.png
│ ├── shop.png
│ ├── star.png
│ ├── used.png
│ ├── address.png
│ ├── cart-add.png
│ ├── cart-btn.png
│ ├── customer.png
│ ├── expired.png
│ ├── expiring.png
│ ├── history.png
│ ├── like-red.png
│ ├── more-dot.png
│ ├── status-1.png
│ ├── status-2.png
│ ├── status-3.png
│ ├── status-4.png
│ ├── status-5.png
│ ├── status-6.png
│ ├── status-7.png
│ ├── status-8.png
│ ├── address-hr.png
│ ├── cart-empty.png
│ ├── cart-gray.png
│ ├── cooperate.png
│ ├── like-empty.png
│ ├── like-gray.png
│ ├── more-gray.png
│ ├── more-white.png
│ ├── order-empty.png
│ ├── plus-square.png
│ ├── plus-white.png
│ ├── recommend.png
│ ├── shop-close.png
│ ├── shop-color.png
│ ├── shop-gray.png
│ ├── star-fill.png
│ ├── cart-btn-gray.png
│ ├── more -radius.png
│ └── wecahrt-white.png
├── mock
│ └── img.jpg
├── shop
│ ├── shop.png
│ └── shop-logo.png
├── tab
│ ├── cart.png
│ ├── home.png
│ ├── order.png
│ ├── user.png
│ ├── cart-active.png
│ ├── home-active.png
│ ├── order-active.png
│ └── user-active.png
└── goods
│ └── broken.png
├── class
├── service
│ ├── BaseService.js
│ ├── LogService.js
│ ├── CartService.js
│ ├── FavoriteService.js
│ ├── AddressService.js
│ ├── ShopService.js
│ └── ExpressService.js
├── utils
│ ├── wxApi.js
│ ├── Router.js
│ └── Http.js
└── entity
│ └── Page.js
├── app.js
├── README.md
└── app.json
/.gitignore:
--------------------------------------------------------------------------------
1 | jsconfig.json
2 | /.vscode
3 | /typings
--------------------------------------------------------------------------------
/pages/address/edit/edit.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "编辑地址"
3 | }
--------------------------------------------------------------------------------
/pages/cart/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "购物车"
3 | }
--------------------------------------------------------------------------------
/pages/coupon/use/use.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "可用优惠券"
3 | }
--------------------------------------------------------------------------------
/pages/goods/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "商品详情"
3 | }
--------------------------------------------------------------------------------
/pages/goods/score/score.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "订单评价"
3 | }
--------------------------------------------------------------------------------
/pages/order/trace/trace.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "物流详情"
3 | }
--------------------------------------------------------------------------------
/pages/order/trade/trade.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "确认订单"
3 | }
--------------------------------------------------------------------------------
/pages/refund/apply/apply.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "退款申请"
3 | }
--------------------------------------------------------------------------------
/pages/shop/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "店铺详情"
3 | }
--------------------------------------------------------------------------------
/pages/customer/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "我的信息"
3 | }
--------------------------------------------------------------------------------
/pages/customer/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "用户授权"
3 | }
--------------------------------------------------------------------------------
/pages/order/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "订单详情"
3 | }
--------------------------------------------------------------------------------
/pages/refund/detail/detail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "退款详情"
3 | }
--------------------------------------------------------------------------------
/templates/shop/info/shop-info-template.wxss:
--------------------------------------------------------------------------------
1 | .address-label{
2 | min-width: 150rpx;
3 | }
--------------------------------------------------------------------------------
/images/icons/car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/car.png
--------------------------------------------------------------------------------
/images/icons/new.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/new.png
--------------------------------------------------------------------------------
/images/icons/vip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/vip.png
--------------------------------------------------------------------------------
/images/mock/img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/mock/img.jpg
--------------------------------------------------------------------------------
/images/shop/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/shop/shop.png
--------------------------------------------------------------------------------
/images/tab/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/cart.png
--------------------------------------------------------------------------------
/images/tab/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/home.png
--------------------------------------------------------------------------------
/images/tab/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/order.png
--------------------------------------------------------------------------------
/images/tab/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/user.png
--------------------------------------------------------------------------------
/templates/shop/list/shop-list-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/shop/item/shop-item-template.wxss";
2 |
--------------------------------------------------------------------------------
/images/goods/broken.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/goods/broken.png
--------------------------------------------------------------------------------
/images/icons/alert.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/alert.png
--------------------------------------------------------------------------------
/images/icons/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/close.png
--------------------------------------------------------------------------------
/images/icons/cuppon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cuppon.png
--------------------------------------------------------------------------------
/images/icons/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/delete.png
--------------------------------------------------------------------------------
/images/icons/down.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/down.png
--------------------------------------------------------------------------------
/images/icons/edit.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/edit.png
--------------------------------------------------------------------------------
/images/icons/error.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/error.png
--------------------------------------------------------------------------------
/images/icons/gift.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/gift.png
--------------------------------------------------------------------------------
/images/icons/like.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/like.png
--------------------------------------------------------------------------------
/images/icons/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/more.png
--------------------------------------------------------------------------------
/images/icons/notice.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/notice.png
--------------------------------------------------------------------------------
/images/icons/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/order.png
--------------------------------------------------------------------------------
/images/icons/phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/phone.png
--------------------------------------------------------------------------------
/images/icons/picked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/picked.png
--------------------------------------------------------------------------------
/images/icons/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/shop.png
--------------------------------------------------------------------------------
/images/icons/star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/star.png
--------------------------------------------------------------------------------
/images/icons/used.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/used.png
--------------------------------------------------------------------------------
/images/icons/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/address.png
--------------------------------------------------------------------------------
/images/icons/cart-add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cart-add.png
--------------------------------------------------------------------------------
/images/icons/cart-btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cart-btn.png
--------------------------------------------------------------------------------
/images/icons/customer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/customer.png
--------------------------------------------------------------------------------
/images/icons/expired.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/expired.png
--------------------------------------------------------------------------------
/images/icons/expiring.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/expiring.png
--------------------------------------------------------------------------------
/images/icons/history.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/history.png
--------------------------------------------------------------------------------
/images/icons/like-red.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/like-red.png
--------------------------------------------------------------------------------
/images/icons/more-dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/more-dot.png
--------------------------------------------------------------------------------
/images/icons/status-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-1.png
--------------------------------------------------------------------------------
/images/icons/status-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-2.png
--------------------------------------------------------------------------------
/images/icons/status-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-3.png
--------------------------------------------------------------------------------
/images/icons/status-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-4.png
--------------------------------------------------------------------------------
/images/icons/status-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-5.png
--------------------------------------------------------------------------------
/images/icons/status-6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-6.png
--------------------------------------------------------------------------------
/images/icons/status-7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-7.png
--------------------------------------------------------------------------------
/images/icons/status-8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/status-8.png
--------------------------------------------------------------------------------
/images/shop/shop-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/shop/shop-logo.png
--------------------------------------------------------------------------------
/images/icons/address-hr.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/address-hr.png
--------------------------------------------------------------------------------
/images/icons/cart-empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cart-empty.png
--------------------------------------------------------------------------------
/images/icons/cart-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cart-gray.png
--------------------------------------------------------------------------------
/images/icons/cooperate.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cooperate.png
--------------------------------------------------------------------------------
/images/icons/like-empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/like-empty.png
--------------------------------------------------------------------------------
/images/icons/like-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/like-gray.png
--------------------------------------------------------------------------------
/images/icons/more-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/more-gray.png
--------------------------------------------------------------------------------
/images/icons/more-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/more-white.png
--------------------------------------------------------------------------------
/images/icons/order-empty.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/order-empty.png
--------------------------------------------------------------------------------
/images/icons/plus-square.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/plus-square.png
--------------------------------------------------------------------------------
/images/icons/plus-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/plus-white.png
--------------------------------------------------------------------------------
/images/icons/recommend.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/recommend.png
--------------------------------------------------------------------------------
/images/icons/shop-close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/shop-close.png
--------------------------------------------------------------------------------
/images/icons/shop-color.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/shop-color.png
--------------------------------------------------------------------------------
/images/icons/shop-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/shop-gray.png
--------------------------------------------------------------------------------
/images/icons/star-fill.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/star-fill.png
--------------------------------------------------------------------------------
/images/tab/cart-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/cart-active.png
--------------------------------------------------------------------------------
/images/tab/home-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/home-active.png
--------------------------------------------------------------------------------
/images/tab/order-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/order-active.png
--------------------------------------------------------------------------------
/images/tab/user-active.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/tab/user-active.png
--------------------------------------------------------------------------------
/pages/goods/score/list.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "商品评价",
3 | "enablePullDownRefresh": true
4 | }
--------------------------------------------------------------------------------
/pages/order/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText" : "我的订单",
3 | "enablePullDownRefresh": true
4 | }
--------------------------------------------------------------------------------
/images/icons/cart-btn-gray.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/cart-btn-gray.png
--------------------------------------------------------------------------------
/images/icons/more -radius.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/more -radius.png
--------------------------------------------------------------------------------
/images/icons/wecahrt-white.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/coolhwm/leshare-shop-weapp/HEAD/images/icons/wecahrt-white.png
--------------------------------------------------------------------------------
/pages/goods/favorite/favorite.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "收藏商品",
3 | "enablePullDownRefresh": true
4 | }
--------------------------------------------------------------------------------
/pages/goods/history/history.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "浏览历史",
3 | "enablePullDownRefresh": true
4 | }
--------------------------------------------------------------------------------
/pages/coupon/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "优惠券",
3 | "enablePullDownRefresh": "true"
4 | }
--------------------------------------------------------------------------------
/pages/shop/contact/contact.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "联系我们",
3 | "navigationBarBackgroundColor": "#11ca6f"
4 | }
--------------------------------------------------------------------------------
/pages/shop/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarBackgroundColor": "#1296db",
3 | "navigationBarTitleText": " "
4 | }
--------------------------------------------------------------------------------
/templates/steps/index.wxss:
--------------------------------------------------------------------------------
1 | @import "wxss/step.wxss";
2 | @import "wxss/vstep.wxss";
3 |
4 | .zan-steps {
5 | position: relative;
6 | }
7 |
--------------------------------------------------------------------------------
/templates/order/list/order-list-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/order/list-item/order-item-template.wxss";
2 | @import "/templates/loadmore/index.wxss";
--------------------------------------------------------------------------------
/pages/coupon/use/use.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/coupon/item/coupon-item-template.wxss";
2 | page{
3 | height: 100%;
4 | background-color: #f2f2f2;
5 | }
--------------------------------------------------------------------------------
/templates/goods/sku/goods-sku-template.wxss:
--------------------------------------------------------------------------------
1 | .goods-sku-selector{
2 | margin-top: 0rpx;
3 | }
4 | .goods-sku-selector text{
5 | font-size: 28rpx;
6 | }
--------------------------------------------------------------------------------
/pages/address/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "管理收货地址",
3 | "enablePullDownRefresh": true,
4 | "backgroundTextStyle": "light"
5 | }
--------------------------------------------------------------------------------
/templates/goods/score/goods-score-template.wxss:
--------------------------------------------------------------------------------
1 | .goods-sku-selector{
2 | margin-top: 0rpx;
3 | }
4 | .goods-sku-selector text{
5 | font-size: 28rpx;
6 | }
7 |
--------------------------------------------------------------------------------
/templates/toptips/index.wxml:
--------------------------------------------------------------------------------
1 |
2 | {{ zanTopTips.content }}
3 |
4 |
--------------------------------------------------------------------------------
/pages/shop/contact/contact.js:
--------------------------------------------------------------------------------
1 | // pages/shop/contact/contact.js
2 | Page({
3 |
4 | data: {
5 |
6 | },
7 |
8 | onLoad: function (options) {
9 |
10 | },
11 | call: function () {
12 | wx.makePhoneCall({
13 | phoneNumber: '059187519835'
14 | });
15 | },
16 | })
--------------------------------------------------------------------------------
/templates/notice/bar/notice-bar-template.wxss:
--------------------------------------------------------------------------------
1 | .notice-bar-container{
2 | padding: 10rpx;
3 | display: flex;
4 | flex-direction: row;
5 | }
6 |
7 | .notice-bar-image{
8 | height: 32rpx;
9 | width: 32rpx;
10 | }
11 |
12 |
13 | .notice-bar-content{
14 | margin-left: 10rpx;
15 | }
--------------------------------------------------------------------------------
/pages/coupon/use/use.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/templates/notice/bar/notice-bar-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{content}}
8 |
9 |
--------------------------------------------------------------------------------
/templates/shop/list/shop-list-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/templates/coupon/shelf/coupon-shelf-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/coupon/pick-simple/coupon-pick-template.wxss";
2 |
3 | .coupon-shelf-container{
4 | display: flex;
5 | flex-direction: row;
6 | width: 100%;
7 | overflow: scroll;
8 | white-space: nowrap;
9 | margin-bottom: 5rpx;
10 | margin-top: 5rpx;
11 | margin-left: 5rpx;
12 | white-space: nowrap;
13 | background-color: #FFF;
14 | }
15 |
--------------------------------------------------------------------------------
/templates/coupon/shelf/coupon-shelf-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/templates/goods/sku/goods-sku-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 选择:{{sku.isReady ? sku.skuValues : sku.skuKeys}}
8 |
9 |
10 |
--------------------------------------------------------------------------------
/templates/order/tab/order-tab-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item.name}}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/templates/coupon/pick-simple/coupon-pick-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | ¥
7 | {{price}}
8 |
9 | 满{{limitPrice}}元可用
10 |
11 |
--------------------------------------------------------------------------------
/templates/tab/index.js:
--------------------------------------------------------------------------------
1 | var Tab = {
2 | _handleZanTabChange(e) {
3 | var dataset = e.currentTarget.dataset;
4 | var componentId = dataset.componentId;
5 | var selectedId = dataset.itemId;
6 | var data = { componentId, selectedId };
7 |
8 | console.info('[zan:tab:change]', data);
9 | if (this.handleZanTabChange) {
10 | this.handleZanTabChange(data);
11 | } else {
12 | console.warn('页面缺少 handleZanTabChange 回调函数');
13 | }
14 | }
15 | };
16 |
17 | module.exports = Tab;
18 |
--------------------------------------------------------------------------------
/pages/goods/favorite/favorite.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | 您还没有收藏商品
14 |
--------------------------------------------------------------------------------
/templates/toptips/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-toptips {
2 | display: block;
3 | position: fixed;
4 | -webkit-transform: translateZ(0) translateY(-100%);
5 | width: 100%;
6 | /* 至少有一行的高度,保证第一次动画显示正常 */
7 | min-height: 32px;
8 | top: 0;
9 | line-height: 2.3;
10 | font-size: 14px;
11 | text-align: center;
12 | color: #FFF;
13 | background-color: #E64340;
14 | z-index: 110;
15 |
16 | /* 动画部分 */
17 | transition: all 0.4s ease;
18 | }
19 |
20 | .zan-toptips--show {
21 | -webkit-transform: translateZ(0) translateY(0);
22 | }
23 |
--------------------------------------------------------------------------------
/pages/goods/history/history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | 您还没有浏览历史记录
15 |
16 |
--------------------------------------------------------------------------------
/pages/order/trace/trace.js:
--------------------------------------------------------------------------------
1 | import ExpressService from "../../../class/service/ExpressService";
2 |
3 | const expressService = new ExpressService();
4 |
5 | Page({
6 |
7 | data: {
8 | steps: [],
9 | info: {},
10 | order: {},
11 | },
12 |
13 |
14 | onLoad: function (options) {
15 | const order = JSON.parse(options.order);
16 |
17 | this.setData({
18 | order: order
19 | });
20 |
21 | expressService.queryTrace(order.orderId).then(express => {
22 | this.setData(express);
23 | });
24 |
25 | }
26 | })
--------------------------------------------------------------------------------
/templates/goods/score/goods-score-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 共 {{commentNum}} 条用户评价
9 | 该商品暂无评价
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/refund/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/steps/index.wxss";
2 | page{
3 | height: 100%;
4 | padding-bottom: 100rpx;
5 | background-color: #F5F5F5;
6 | }
7 | /*按钮样式调整*/
8 | .tarde-button-panel{
9 | padding-right: 20rpx;
10 | }
11 |
12 | /*购买栏*/
13 | .tarde-action-bar{
14 | position: fixed;
15 | bottom: 0px;
16 | display: flex;
17 | flex-direction: row;
18 | justify-content: flex-end;
19 | align-items: center;
20 | height: 100rpx;
21 | width: 100%;
22 | background-color: #FAFAFA;
23 | border-top: 1px solid #DCDCDC;
24 |
25 | }
--------------------------------------------------------------------------------
/templates/goods/detail/goods-detail-template.wxss:
--------------------------------------------------------------------------------
1 | .goods-detail-container{
2 | background-color: #FFF;
3 | }
4 |
5 | .goods-detail-title{
6 | text-align: center;
7 | height: 75rpx;
8 | }
9 |
10 | .goods-detail-title text{
11 | line-height: 75rpx;
12 | font-size: 30rpx;
13 | color:#1296db;
14 | }
15 |
16 | .goods-detail-list{
17 | display: flex;
18 | flex-direction: column;
19 | padding: 20rpx;
20 | }
21 |
22 | .goods-detail-list text{
23 | font-size: 30rpx;
24 | margin-bottom: 20rpx;
25 | }
26 |
27 | .goods-detail-list image{
28 | width: 100%;
29 | margin-bottom: 20rpx;
30 | }
31 |
--------------------------------------------------------------------------------
/pages/coupon/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/tab/index.wxss";
2 | @import "/templates/coupon/item/coupon-item-template.wxss";
3 | page{
4 | height: 100%;
5 | background-color: #f2f2f2;
6 | }
7 |
8 |
9 | /*占位*/
10 | .order-empty-tips{
11 | position: fixed;
12 | top: 300rpx;
13 | width: 100%;
14 | height: 300rpx;
15 | display: flex;
16 | flex-direction: row;
17 | align-items: center;
18 | justify-content: center;
19 | }
20 | .order-empty-tips image{
21 | width:100rpx;
22 | height: 100rpx;
23 | }
24 | .order-empty-tips text{
25 | color: #656565;
26 | font-size: 40rpx;
27 | margin-left: 30rpx;
28 | }
--------------------------------------------------------------------------------
/pages/shop/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/shop/item/shop-item-template.wxss";
2 | @import "/templates/goods/grid/goods-grid-template.wxss";
3 | @import "/templates/notice/bar/notice-bar-template.wxss";
4 | @import "/templates/coupon/shelf/coupon-shelf-template.wxss";
5 | @import "/templates/goods/buy-panel/goods-buy-panel-template.wxss";
6 |
7 | page{
8 | height: 100%;
9 | background-color: #F5F5F5;
10 | }
11 | .shop-index-container{
12 | height: 100%;
13 | overflow-x: hidden;
14 | }
15 |
16 | .footer-line{
17 | position: fixed;
18 | height: 1px;
19 | width: 100%;
20 | background-color: #E6E8EB;
21 | bottom: 0px;
22 | }
--------------------------------------------------------------------------------
/templates/coupon/pick-simple/coupon-pick-template.wxss:
--------------------------------------------------------------------------------
1 | .coupon-pick-container{
2 | display: inline-flex;
3 | flex-direction: column;
4 | border: 1px #add8f7 solid;
5 | border-radius: 5rpx;
6 | justify-content: center;
7 | align-items: center;
8 | width: 200rpx;
9 | padding-bottom: 10rpx;
10 | padding-top: 10rpx;
11 | margin-right: 5rpx;
12 | }
13 | .coupon-pick-container text{
14 | color: #108ee9;
15 | }
16 | .coupon-value-unit{
17 | font-size: 32rpx;
18 | }
19 | .coupon-value-text{
20 | font-size: 50rpx;
21 | }
22 | .coupon-value-container{
23 |
24 | }
25 | .coupon-limit-text{
26 | font-size: 22rpx;
27 | }
--------------------------------------------------------------------------------
/templates/goods/grid/goods-grid-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/goods/item/goods-item-template.wxss";
2 | @import "/templates/tab/index.wxss";
3 | @import "/templates/loadmore/index.wxss";
4 | .goods-grid-container{
5 | background-color: #F4F4F4;
6 | display: flex;
7 | flex-direction: row;
8 | flex-wrap: wrap;
9 | justify-content: space-between;
10 | padding-top: 2rpx;
11 | }
12 |
13 | .goods-grid-tab-fixed{
14 | position: fixed;
15 | top: 0;
16 | }
17 | .goods-grid-tab{
18 | z-index: 1000;
19 | }
20 |
21 | .goods-empty-tips{
22 | margin-top: 100rpx;
23 | }
24 |
25 | .goods-grid-tab-placeholder{
26 | height: 41px;
27 | }
--------------------------------------------------------------------------------
/pages/goods/history/history.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/goods/fav/goods-fav-template.wxss";
2 |
3 | page{
4 | height: 100%;
5 | background-color: #F5F5F5;
6 | }
7 |
8 | .container{
9 | background-color: #FFF;
10 | }
11 |
12 | /*占位*/
13 | .order-empty-tips{
14 | position: fixed;
15 | top: 300rpx;
16 | width: 100%;
17 | height: 300rpx;
18 | display: flex;
19 | flex-direction: row;
20 | align-items: center;
21 | justify-content: center;
22 | }
23 | .order-empty-tips image{
24 | width:100rpx;
25 | height: 100rpx;
26 | }
27 | .order-empty-tips text{
28 | color: #656565;
29 | font-size: 40rpx;
30 | margin-left: 30rpx;
31 | }
--------------------------------------------------------------------------------
/pages/refund/detail/detail.js:
--------------------------------------------------------------------------------
1 | import OrderService from "../../../class/service/OrderService";
2 | import Tips from "../../../class/utils/Tips";
3 | import Router from "../../../class/utils/Router";
4 |
5 | const orderService = new OrderService();
6 |
7 | Page({
8 |
9 | /**
10 | * 页面的初始数据
11 | */
12 | data: {
13 | steps: [],
14 | refund: {}
15 | },
16 |
17 | onLoad: function (options) {
18 | const refundStr = options.refund;
19 | const refund = JSON.parse(refundStr);
20 | const steps = orderService.createOrderRefundSetps(refund);
21 |
22 | this.setData({
23 | refund: refund,
24 | steps: steps
25 | });
26 | }
27 |
28 | })
--------------------------------------------------------------------------------
/templates/order/list/order-list-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/pages/goods/favorite/favorite.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/goods/fav/goods-fav-template.wxss";
2 |
3 | page{
4 | height: 100%;
5 | background-color: #F5F5F5;
6 | }
7 |
8 | .container{
9 | background-color: #FFF;
10 | }
11 |
12 | /*占位*/
13 | .order-empty-tips{
14 | position: fixed;
15 | top: 300rpx;
16 | width: 100%;
17 | height: 300rpx;
18 | display: flex;
19 | flex-direction: row;
20 | align-items: center;
21 | justify-content: center;
22 | }
23 | .order-empty-tips image{
24 | width:100rpx;
25 | height: 100rpx;
26 | }
27 | .order-empty-tips text{
28 | color: #656565;
29 | font-size: 40rpx;
30 | margin-left: 30rpx;
31 | }
--------------------------------------------------------------------------------
/templates/order/tab/order-tab-template.wxss:
--------------------------------------------------------------------------------
1 | .order-tab-container{
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | justify-content: space-around;
6 | height: 85rpx;
7 | background-color: #FFF;
8 | margin-bottom: 10rpx;
9 | z-index: 10000;
10 | }
11 |
12 | .order-tab-item{
13 | flex-grow: 1;
14 | height: 100%;
15 | text-align: center;
16 | border-bottom: solid 3px #FAFAFA;
17 | }
18 |
19 |
20 | .order-tab-item text{
21 | font-size: 30rpx;
22 | line-height: 85rpx;
23 | color: #4B515C;
24 | }
25 |
26 |
27 | .order-tab-item.active{
28 | border-bottom-color: #1296db;
29 | }
30 |
31 | .order-tab-item.active text{
32 | color: #1296db;
33 | }
--------------------------------------------------------------------------------
/pages/coupon/use/use.js:
--------------------------------------------------------------------------------
1 | import Router from "../../../class/utils/Router";
2 | const notification = require("../../../class/utils/WxNotificationCenter.js");
3 |
4 | Page({
5 | data: {
6 | coupons: []
7 | },
8 |
9 | onLoad: function (options) {
10 | const param = options.coupons;
11 | const coupons = JSON.parse(param);
12 | this.setData({ coupons: coupons });
13 | },
14 |
15 | /**
16 | * 点击选择
17 | */
18 | onCouponTap: function(event){
19 | const couponId = event.currentTarget.dataset.couponId;
20 | const selectedCoupon = this.data.coupons.find(item => item.id == couponId);
21 | notification.postNotificationName("ON_COUPON_CHOICE",selectedCoupon);
22 | Router.back();
23 | }
24 | })
--------------------------------------------------------------------------------
/pages/customer/index/index.js:
--------------------------------------------------------------------------------
1 | import Tips from "../../../class/utils/Tips";
2 | import AuthService from "../../../class/service/AuthService";
3 |
4 | const authService = new AuthService();
5 | const app = getApp();
6 |
7 | Page({
8 | data: {
9 | userInfo: {}
10 | },
11 |
12 | onLoad: function (options) {
13 | authService.check();
14 | this.setData({ userInfo: app.globalData.user });
15 | },
16 | /**
17 | * 选择收货地址
18 | */
19 | onAddressTap: function (event) {
20 | console.info(event);
21 | wx.chooseAddress({
22 | success: function (res) {
23 | console.info(res);
24 | }
25 | });
26 | },
27 |
28 | tips: function(event){
29 | Tips.alert('尚未开放');
30 | }
31 |
32 | });
--------------------------------------------------------------------------------
/templates/loadmore/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 | {{ nodata_str || '暂无数据' }}
14 |
15 |
16 |
17 |
18 |
19 |
20 | 加载中...
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/templates/shop/item-white/shop-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{name}}
11 |
12 | 地址:{{address}}
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/coupon/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 您还没有相关优惠券
21 |
--------------------------------------------------------------------------------
/pages/goods/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/goods/info/goods-info-template.wxss";
2 | @import "/templates/goods/detail/goods-detail-template.wxss";
3 | @import "/templates/shop/item-white/shop-item-template.wxss";
4 | @import "/templates/goods/buy-bar/goods-buy-bar-template.wxss";
5 | @import "/templates/goods/buy-panel/goods-buy-panel-template.wxss";
6 | @import "/templates/goods/sku/goods-sku-template.wxss";
7 | @import "/templates/goods/score/goods-score-template.wxss";
8 | @import "/templates/coupon/shelf-panel/coupon-panel-template.wxss";
9 |
10 | .goods-index-container{
11 | background-color: #F2F2F2;
12 | }
13 |
14 | .goods-index-footer{
15 | height: 100rpx;
16 | width: 100%;
17 | }
18 |
19 | .goods-operate-container{
20 | margin-top: 0;
21 | }
--------------------------------------------------------------------------------
/templates/shop/item-white/shop-item-template.wxss:
--------------------------------------------------------------------------------
1 | .shop-item-container{
2 | display: flex;
3 | flex-direction: row;
4 | height: 180rpx;
5 | align-items: center;
6 | background-color: #fff;
7 | }
8 |
9 | .shop-item-image{
10 | padding: 20rpx;
11 | width: 120rpx;
12 | height: 120rpx;
13 | }
14 |
15 | .shop-more-image{
16 | width: 60rpx;
17 | height: 60rpx;
18 | }
19 |
20 | .shop-synopsis-container{
21 | display: flex;
22 | flex-direction: column;
23 | margin-left: 20rpx;
24 | width: 500rpx;
25 | }
26 |
27 | .shop-item-title{
28 | font-size: 36rpx;
29 | font-weight: 700;
30 | letter-spacing: 2px;
31 | color: #46556c;
32 | }
33 |
34 | .shop-item-describe{
35 | margin-top: 5px;
36 | }
37 |
38 |
--------------------------------------------------------------------------------
/templates/goods/fav/goods-fav-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{goodsName}}
12 | ¥{{goodsPrice}}
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/shop/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/shop/info/shop-info-template.wxss";
2 |
3 | page{
4 | height: 100%;
5 | background-color: #f2f2f2;
6 | }
7 |
8 | /*轮播图*/
9 | .shop-swiper{
10 | height: 375rpx;
11 | width: 750rpx;
12 | }
13 | .shop-swiper image{
14 | width:100%;
15 | height:375rpx;
16 | }
17 |
18 | /*店铺名称*/
19 | .shop-name-container{
20 | display: flex;
21 | flex-direction: row;
22 | background-color: #FFF;
23 | align-items: center;
24 | padding: 20rpx;
25 | height: 60rpx;
26 | }
27 | .shop-name-font{
28 | margin-left: 20rpx;
29 | font-size: 38rpx;
30 | color: #333;
31 | letter-spacing: 2px;
32 | flex-grow: 1;
33 | }
34 |
35 | /*举报栏*/
36 | .shop-report-container{
37 | background-color: #FFF;
38 | }
39 |
--------------------------------------------------------------------------------
/pages/customer/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{shop.name}}
5 | 购买商品、查看订单需要进行用户信息授权
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/class/service/BaseService.js:
--------------------------------------------------------------------------------
1 | import Http from '../utils/Http';
2 | const app = getApp();
3 | const wxApi = require('../utils/wxApi');
4 |
5 | /**
6 | * 基础服务类
7 | */
8 | export default class BaseService {
9 |
10 | constructor() {
11 |
12 | //路径信息
13 | this.baseUrl = app.globalData.baseUrl;
14 | this.publicUrl = app.globalData.publicUrl;
15 | //店铺信息
16 | this.shopName = app.globalData.shop.name;
17 | //微信支付
18 | this.wxpay = wxApi.wxPay;
19 | //全局对象
20 | this.app = app;
21 |
22 | //网络请求
23 | this.get = Http.get.bind(Http);
24 | this.post = Http.post.bind(Http);
25 | this.patch = Http.patch.bind(Http);
26 | this.delete = Http.delete.bind(Http);
27 | this.put = Http.put.bind(Http);
28 | }
29 |
30 | }
--------------------------------------------------------------------------------
/pages/shop/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{shop.name}}
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/templates/address/show/address-show-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{name}}
13 | {{phone}}
14 |
15 |
16 | 地址:{{fullAddress}}
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/pages/shop/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/shop/contact/contact.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 小程序,商家营销利器
4 | 帮助商家提前布局微信生态,抢占第一波红利
5 | 电话咨询
6 |
7 |
8 |
9 |
10 |
11 |
12 |
18 |
19 |
--------------------------------------------------------------------------------
/pages/order/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | 您还没有相关订单
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/templates/order/goods/order-goods-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{goodsName}}
12 | {{skuText}}
13 |
14 |
15 |
16 |
17 | ¥{{goodsPrice}}
18 |
19 | x{{count}}
20 |
21 |
22 |
--------------------------------------------------------------------------------
/templates/coupon/pick-color/coupon-pick-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ¥
9 | 50
10 |
11 | 满88元可用
12 |
13 |
14 | 有效期 2017.06.06-2017.06.06
15 |
16 |
17 |
18 |
19 | 领
20 | 取
21 |
22 |
23 |
--------------------------------------------------------------------------------
/templates/goods/detail/goods-detail-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ── 商品详情 ──
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{item.content}}
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/templates/goods/fav/goods-fav-template.wxss:
--------------------------------------------------------------------------------
1 | /*基本容器*/
2 | .goods-fav-container{
3 | display: flex;
4 | flex-direction: row;
5 | align-items: center;
6 | padding: 23rpx;
7 | padding-right: 35rpx;
8 | background-color: #FFF;
9 | }
10 |
11 | /*信息容器*/
12 | .goods-info-container{
13 | display: flex;
14 | flex-direction: column;
15 | justify-content: center;
16 | flex:1;
17 | margin-left: 25rpx;
18 | }
19 |
20 | /*商品图片*/
21 | .goods-item-img{
22 | height: 130rpx;
23 | width: 130rpx;
24 | }
25 |
26 | /*商品名称*/
27 | .goods-name{
28 | color: #000311;
29 | font-size: 30rpx;
30 | }
31 |
32 | /*商品价格*/
33 | .goods-price{
34 | font-size: 30rpx;
35 | color:#ff6200;
36 | }
37 |
38 | /*加入购物车图片*/
39 | .goods-more-img{
40 | height: 45rpx;
41 | width: 45rpx;
42 | }
43 | /*分隔符*/
44 | .goods-item-border{
45 | height: 1px;
46 | background-color: #F3F3F3;
47 | width: 725rpx;
48 | margin-left: 25rpx;
49 | }
--------------------------------------------------------------------------------
/templates/toptips/index.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | showZanTopTips(content = '', options = {}) {
3 | let zanTopTips = this.data.zanTopTips || {};
4 | // 如果已经有一个计时器在了,就清理掉先
5 | if (zanTopTips.timer) {
6 | clearTimeout(zanTopTips.timer);
7 | zanTopTips.timer = undefined;
8 | }
9 |
10 | if (typeof options === 'number') {
11 | options = {
12 | duration: options
13 | };
14 | }
15 |
16 | // options参数默认参数扩展
17 | options = Object.assign({
18 | duration: 3000
19 | }, options);
20 |
21 | // 设置定时器,定时关闭topTips
22 | let timer = setTimeout(() => {
23 | this.setData({
24 | 'zanTopTips.show': false,
25 | 'zanTopTips.timer': undefined
26 | });
27 | }, options.duration);
28 |
29 | // 展示出topTips
30 | this.setData({
31 | zanTopTips: {
32 | show: true,
33 | content,
34 | options,
35 | timer
36 | }
37 | });
38 | }
39 | };
40 |
--------------------------------------------------------------------------------
/templates/address/show/address-show-template.wxss:
--------------------------------------------------------------------------------
1 | .address-item-container{
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | padding-top:25rpx;
6 | padding-bottom: 25rpx;
7 | background-color: #FFF;
8 | }
9 |
10 |
11 | .address-icon-container{
12 | width: 80rpx;
13 | text-align: center;
14 | }
15 |
16 | .address-info-container{
17 | display: flex;
18 | flex-direction: column;
19 | width: 600rpx;
20 | flex:1;
21 | }
22 |
23 | .address-info-name{
24 | color: #232326;
25 | font-size: 30rpx;
26 | }
27 | .address-info-phone{
28 | font-size: 28rpx;
29 | margin-left: 20rpx;
30 | color: #232326;
31 | }
32 |
33 | .address-name-phone-container{
34 | display: flex;
35 | flex-direction: row;
36 | align-items: center;
37 | }
38 |
39 | /*
40 | * 地址详情
41 | */
42 | .address-info-detail{
43 | color: #0A0A0D;
44 | font-size: 28rpx;
45 | }
46 | .address-detail-container{
47 | margin-top: 10rpx;
48 | }
49 |
--------------------------------------------------------------------------------
/templates/shop/info/shop-info-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 联系方式
8 | {{phone}}
9 |
10 |
11 | 详细地址
12 | {{address}}
13 |
14 |
15 | 店铺分类
16 | {{categoryName}}
17 |
18 |
19 | 店铺说明
20 | {{describe}}
21 |
22 |
23 |
--------------------------------------------------------------------------------
/pages/refund/apply/apply.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/toptips/index.wxss";
2 | page{
3 | height: 100%;
4 | padding-bottom: 100rpx;
5 | background-color: #F5F5F5;
6 | }
7 |
8 | .refund-form-container{
9 | margin-top: 20rpx;
10 | }
11 |
12 | .refund-action-bar{
13 | position: fixed;
14 | bottom: 0;
15 | display: flex;
16 | flex-direction: row;
17 | justify-content: center;
18 | align-items: center;
19 | width: 100%;
20 | height: 100rpx;
21 | }
22 |
23 | .refund-action-primary{
24 | background-color: #1296db;
25 | }
26 | .refund-action{
27 | background-color: #FFF;
28 | border-top: 1px solid #e5e5e5;
29 | }
30 | .refund-action-primary text{
31 | font-size: 32rpx;
32 | color: #FFF;
33 | }
34 |
35 | .refund-action text{
36 | font-size: 32rpx;
37 | color: #333;
38 | }
39 |
40 | .refund-action, .refund-action-primary{
41 | width: 50%;
42 | height: 100%;
43 | display: flex;
44 | justify-content: center;
45 | align-items: center;
46 | }
--------------------------------------------------------------------------------
/templates/trade/item/order-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/order/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/order/list/order-list-template.wxss";
2 | @import "/templates/order/tab/order-tab-template.wxss";
3 |
4 | page{
5 | height: 100%;
6 | background-color: #F5F5F5;
7 | }
8 |
9 | .order-index-container{
10 |
11 | }
12 |
13 |
14 | /*占位*/
15 | .order-empty-tips{
16 | position: fixed;
17 | top: 300rpx;
18 | width: 100%;
19 | height: 300rpx;
20 | display: flex;
21 | flex-direction: row;
22 | align-items: center;
23 | justify-content: center;
24 | }
25 | .order-empty-tips image{
26 | width:100rpx;
27 | height: 100rpx;
28 | }
29 | .order-empty-tips text{
30 | color: #656565;
31 | font-size: 40rpx;
32 | margin-left: 30rpx;
33 | }
34 |
35 |
36 | .order-tab-wrap{
37 | position: fixed;
38 | top: 0;
39 | }
40 | .order-tab-container{
41 | width: 750rpx;
42 | }
43 |
44 | .order-list-wrap{
45 | margin-top: 95rpx;
46 | }
47 |
48 | /*底部边线*/
49 | .footer-line{
50 | position: fixed;
51 | height: 1px;
52 | width: 100%;
53 | background-color: #E6E8EB;
54 | bottom: 0px;
55 | }
--------------------------------------------------------------------------------
/templates/order/detail-item/order-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
--------------------------------------------------------------------------------
/templates/steps/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 | {{ step.text }}
8 | {{ step.desc }}
9 | {{ step.timestape }}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/pages/address/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 从微信选择
18 |
19 |
20 |
21 | 新增地址
22 |
23 |
24 |
25 |
26 |
27 |
28 | 您还没有收货地址
29 |
30 |
--------------------------------------------------------------------------------
/pages/goods/score/score.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/templates/quantity/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-quantity {
2 | color: #666;
3 | }
4 | .zan-quantity view {
5 | display: inline-block;
6 | line-height: 20px;
7 | padding: 5px 0;
8 | text-align: center;
9 | min-width: 40px;
10 | box-sizing: border-box;
11 | vertical-align: middle;
12 | font-size: 12px;
13 | border: 1rpx solid #999;
14 | }
15 | .zan-quantity .zan-quantity__minus {
16 | border-right: none;
17 | border-radius: 2px 0 0 2px;
18 | }
19 | .zan-quantity .zan-quantity__text {
20 | border: 1rpx solid #999;
21 | display: inline-block;
22 | text-align: center;
23 | vertical-align: middle;
24 | height: 30px;
25 | width: 40px;
26 | font-size: 12px;
27 | line-height: 30px;
28 | }
29 | .zan-quantity .zan-quantity__plus {
30 | border-left: none;
31 | border-radius: 0 2px 2px 0;
32 | }
33 | .zan-quantity .zan-quantity--disabled {
34 | background: #f8f8f8;
35 | color: #bbb;
36 | border-color: #e8e8e8;
37 | }
38 | .zan-quantity--small view {
39 | min-width: 36px;
40 | line-height: 18px;
41 | }
42 | .zan-quantity--small .zan-quantity__text {
43 | width: 36px;
44 | line-height: 28px;
45 | height: 28px;
46 | }
47 |
--------------------------------------------------------------------------------
/templates/tab/index.wxss:
--------------------------------------------------------------------------------
1 | .zan-tab {
2 | height: 41px;
3 | }
4 | .zan-tab__bd {
5 | width: 750rpx;
6 | display: flex;
7 | flex-direction: row;
8 | border-bottom: 1rpx solid #e5e5e5;
9 | background: #fff;
10 | }
11 | .zan-tab__bd--fixed {
12 | position: fixed;
13 | top: 0;
14 | z-index: 2;
15 | }
16 | .zan-tab__item {
17 | flex: 1;
18 | display: inline-block;
19 | text-align: center;
20 | box-sizing: border-box;
21 | }
22 |
23 | .zan-tab__title {
24 | display: inline-block;
25 | color: #666;
26 | height: 40px;
27 | line-height: 40px;
28 | box-sizing: border-box;
29 | margin: 0 10px;
30 | word-break: keep-all;
31 | }
32 |
33 | .zan-tab__title text{
34 | font-size: 28rpx;
35 | }
36 |
37 | .zan-tab__item--selected .zan-tab__title {
38 | border-bottom: 2px solid #1296db;
39 | }
40 |
41 | .zan-tab__item--selected .zan-tab__title text{
42 | color: #1296db;
43 | }
44 |
45 |
46 |
47 | .zan-tab__bd--scroll {
48 | display: block;
49 | white-space: nowrap;
50 | }
51 | .zan-tab__bd--scroll .zan-tab__item {
52 | min-width: 80px;
53 | }
54 | .zan-tab__bd--scroll .zan-tab__text {
55 | margin: 0 20px;
56 | }
57 |
--------------------------------------------------------------------------------
/templates/quantity/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | -
10 |
20 | +
27 |
28 |
29 |
--------------------------------------------------------------------------------
/templates/tab/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
29 | {{item.title}}
30 |
31 |
32 |
--------------------------------------------------------------------------------
/templates/goods/grid/goods-grid-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/templates/shop/item/shop-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{name}}
11 | 地址:{{address}}
12 |
13 |
14 | 公告:
15 |
16 |
17 |
18 | {{item.content}}
19 |
20 |
21 |
22 |
23 |
24 |
25 | 提示: {{status.closeTips}}
26 |
--------------------------------------------------------------------------------
/pages/customer/login/login.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | height: 100%;
3 | background-color: #f2f2f2;
4 | }
5 |
6 | /*用户信息*/
7 | .user-info-container{
8 | display: flex;
9 | flex-direction: column;
10 | justify-content: center;
11 | align-items: center;
12 | height: 400rpx;
13 | background-color: #1296db;
14 | padding-left: 50rpx;
15 | padding-right: 50rpx;
16 | }
17 | .user-avatar{
18 | height:160rpx;
19 | width: 160rpx;
20 | border-radius: 50%;
21 | }
22 |
23 | .user-nickname{
24 | color: white;
25 | font-size: 40rpx;
26 | }
27 |
28 | .user-desc{
29 | color: white;
30 | font-size: 30rpx;
31 | margin-top: 30rpx;
32 | }
33 |
34 | .weui-footer{margin-top:30rpx; color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}
--------------------------------------------------------------------------------
/templates/order/goods/order-goods-template.wxss:
--------------------------------------------------------------------------------
1 | .order-goods-container{
2 | display: flex;
3 | flex-direction: row;
4 | align-items: center;
5 | justify-content: space-between;
6 | background-color: #FAFAFA;
7 | padding: 10rpx 20rpx 15rpx 25rpx;
8 | }
9 |
10 | /*商品图图片*/
11 | .order-goods-image{
12 | width: 150rpx;
13 | height: 150rpx;
14 | }
15 |
16 | /*购买信息*/
17 | .order-goods-buy-container{
18 | display: flex;
19 | text-align: right;
20 | flex-direction: column;
21 | }
22 | /*价格*/
23 | .order-goods-price{
24 | color:#262626;
25 | font-size: 28rpx;
26 | }
27 |
28 | /*标题*/
29 | .order-goods-title-container{
30 | flex:1;
31 | display: flex;
32 | flex-direction: column;
33 | height: 100%;
34 | padding-left: 28rpx;
35 | }
36 |
37 | /*商品价格*/
38 | .order-goods-title{
39 | color:#262626;
40 | font-size: 28rpx;
41 | }
42 |
43 | /*商品原价*/
44 | .order-goods-orgin-price{
45 | color:#A3A3A3;
46 | font-size: 28rpx;
47 | text-decoration: line-through;
48 | }
49 |
50 | /*商品数量*/
51 | .order-goods-count{
52 | color:#A3A3A3;
53 | font-size: 28rpx;
54 | }
55 |
56 | /*规格信息*/
57 | .order-goods-sku{
58 | color:#A3A3A3;
59 | font-size: 28rpx;
60 | }
61 |
--------------------------------------------------------------------------------
/templates/coupon/pick-color/coupon-pick-template.wxss:
--------------------------------------------------------------------------------
1 | .coupon-pick-container{
2 | display: flex;
3 | flex-direction: row;
4 | height: 170rpx;
5 | }
6 | .coupon-pick-container text{
7 | color: #FFF;
8 | }
9 | .coupon-value-unit{
10 | font-size: 32rpx;
11 | }
12 | .coupon-value-text{
13 | font-size: 65rpx;
14 | }
15 | .coupon-main-container{
16 | display: flex;
17 | flex-direction: column;
18 | justify-content: flex-end;
19 | background-color: #49a9ee;
20 | width:320rpx;
21 | padding:10rpx 20rpx 20rpx 10rpx;
22 | }
23 |
24 | .coupon-value-container{
25 | display: flex;
26 | flex-direction: row;
27 | align-items: flex-end;
28 | justify-content: space-between;
29 | }
30 | .coupon-pick-bar{
31 | background-color: #0e77ca;
32 | }
33 | .coupon-time-text{
34 | font-size: 22rpx;
35 | margin-top: 10rpx;
36 | }
37 | .coupon-limit-text{
38 | font-size: 22rpx;
39 | }
40 | .coupon-time-wrap{
41 | text-align: right;
42 | }
43 | .coupon-pick-bar{
44 | width: 50rpx;
45 | display: flex;
46 | flex-direction: column;
47 | justify-content: center;
48 | align-items: center;
49 | }
50 | .coupon-pick-bar text{
51 | font-size: 28rpx;
52 | margin:10rpx 0;
53 | }
--------------------------------------------------------------------------------
/templates/goods/item/goods-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | 销量 {{salesVolume}}
12 |
13 |
14 |
15 |
16 |
17 | {{name}}
18 |
19 |
20 | ¥{{priceLable}}
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/pages/order/trace/trace.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/steps/index.wxss";
2 |
3 | page{
4 | height: 100%;
5 | background-color: #F5F5F5;
6 | }
7 |
8 | /*物流基本信息区域*/
9 | .express-container{
10 | display: flex;
11 | flex-direction: row;
12 | align-items: center;
13 | background-color: #FFF;
14 | padding: 40rpx 25rpx;
15 | border-bottom: 1px solid #E3E3E3;
16 | }
17 |
18 | /*快递信息区域*/
19 | .express-info-container{
20 | display: flex;
21 | flex-direction: column;
22 | justify-content: center;
23 | margin-left: 30rpx;
24 | }
25 |
26 | /*商品概览图片*/
27 | .goods-info-image{
28 | height: 160rpx;
29 | width: 160rpx;
30 | }
31 |
32 | /*商品数量*/
33 | .goods-info-count{
34 | background-color: #000;
35 | -webkit-filter:opacity(.8);
36 | width: 160rpx;
37 | height: 45rpx;
38 | position: absolute;
39 | top:162rpx;
40 | text-align: center;
41 | }
42 | /*商品数量文字*/
43 | .goods-count-text{
44 | position: relative;
45 | top: -1px;
46 | font-size: 30rpx;
47 | color: #FFF;
48 | }
49 |
50 | /*主要文字*/
51 | .express-text-primary{
52 | font-size: 30rpx;
53 | color: #000311;
54 | }
55 | /*次要文字*/
56 | .express-text-desc{
57 | font-size: 28rpx;
58 | color: #A3A3A3;
59 | margin-top: 10rpx;
60 | }
--------------------------------------------------------------------------------
/pages/order/trace/trace.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{order.goodsCount}}件商品
15 |
16 |
17 |
18 |
19 |
20 | 物流状态:{{info.status}}
21 | 承运公司:{{info.expTextName}}
22 | 运单编号:{{info.mailNo}}
23 | 官方电话:{{info.tel}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pages/address/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/address/mgr/address-item-template.wxss";
2 | page{
3 | height: 100%;
4 | background-color: #f2f2f2;
5 | }
6 |
7 | .address-list-container{
8 | padding-bottom: 100rpx;
9 | }
10 |
11 |
12 | /*底栏*/
13 | .address-action-bar{
14 | position: fixed;
15 | bottom: 0;
16 | display: flex;
17 | flex-direction: row;
18 | width: 100%;
19 | height: 100rpx;
20 | }
21 | .address-action-bar text{
22 | font-size: 32rpx;
23 | color: #FFF;
24 | }
25 | .address-action-bar image{
26 | height: 40rpx;
27 | width: 40rpx;
28 | margin-right: 10rpx;
29 | }
30 |
31 | .address-wechart{
32 | display: flex;
33 | align-items: center;
34 | justify-content: center;
35 | width: 40%;
36 | background-color: #09BB07;
37 | }
38 |
39 | .address-add{
40 | width: 60%;
41 | display: flex;
42 | align-items: center;
43 | justify-content: center;
44 | background-color: #1296db;
45 | }
46 |
47 |
48 | /*占位*/
49 | .order-empty-tips{
50 | margin-top: 300rpx;
51 | height: 300rpx;
52 | display: flex;
53 | flex-direction: row;
54 | align-items: center;
55 | justify-content: center;
56 | }
57 | .order-empty-tips image{
58 | width:100rpx;
59 | height: 100rpx;
60 | }
61 | .order-empty-tips text{
62 | color: #656565;
63 | font-size: 40rpx;
64 | margin-left: 30rpx;
65 | }
--------------------------------------------------------------------------------
/templates/coupon/pick-item/coupon-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ¥
9 | {{price}}
10 |
11 | 满{{limitPrice}}元可用
12 |
13 |
14 |
15 |
16 |
17 | 现金
18 | {{name}}
19 |
20 |
21 | {{beginTime}}-{{dueTime}}
22 | 点击领取
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/templates/goods/buy-bar/goods-buy-bar-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{isFav ? '已收藏': '收藏' }}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | {{cartNum}}
18 |
19 | 购物车
20 |
21 |
22 |
23 | 加入购物车
24 |
25 |
26 |
27 | 立即购买
28 |
29 |
30 |
31 |
32 | 未营业
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pages/customer/login/login.js:
--------------------------------------------------------------------------------
1 | import ShopService from "../../../class/service/ShopService";
2 | import AuthService from "../../../class/service/AuthService";
3 | import Router from "../../../class/utils/Router";
4 | import Tips from "../../../class/utils/Tips";
5 |
6 | const authService = new AuthService();
7 | const shopService = new ShopService();
8 | Page({
9 |
10 | data: {
11 | shop: {}
12 | },
13 |
14 | onLoad: function (options) {
15 | shopService.getInfo().then(data => {
16 | this.setData({ shop: data });
17 | });
18 | authService.cleanLoginInfo();
19 | },
20 |
21 | confirm: function ({detail}) {
22 | console.info('user login:', detail);
23 | const rawUser = detail;
24 | Tips.loading();
25 | authService.getWxJsCode()
26 | .then(jsCode => authService.getLoginCode(jsCode))
27 | .then(auth => authService.saveAuthInfo(auth))
28 | .then(() => authService.decodeUserInfo(rawUser))
29 | .then(user => authService.saveUserInfo(user))
30 | .then(() => {
31 | Tips.loaded();
32 | Tips.toast('授权成功', ()=> wx.reLaunch({url: '/pages/shop/index/index'}));
33 | }).catch(() => {
34 | Tips.loaded();
35 | Tips.error('授权失败');
36 | }).finally(() => {
37 | Tips.loaded();
38 | });
39 | },
40 |
41 | back: function (e) {
42 | wx.reLaunch({url: '/pages/shop/index/index'});
43 | }
44 |
45 | })
--------------------------------------------------------------------------------
/pages/shop/detail/detail.js:
--------------------------------------------------------------------------------
1 | import ShopService from "../../../class/service/ShopService";
2 | import Tips from "../../../class/utils/Tips";
3 | import Router from "../../../class/utils/Router";
4 |
5 | const app = getApp();
6 | const shopService = new ShopService();
7 |
8 | Page({
9 | data: {
10 | shop: {}
11 | },
12 | onLoad: function (options) {
13 | //请求店铺基本信息
14 | shopService.getInfo().then(data => {
15 | if (data.longitude && data.latitude) {
16 | data.map = true;
17 | }
18 | this.setData({ shop: data });
19 | });
20 | },
21 |
22 | onPhoneCall: function (event) {
23 | const phone = this.data.shop.phone;
24 | wx.makePhoneCall({
25 | phoneNumber: phone
26 | });
27 | },
28 |
29 | /**
30 | * 查看图片
31 | */
32 | preview: function(event) {
33 | const urls = this.data.shop.images.map(item => item.url);
34 | wx.previewImage({
35 | urls: urls
36 | });
37 | },
38 |
39 | /**
40 | * 打开地图
41 | */
42 | onOpenLocation: function (event) {
43 | const longitude = this.data.shop.longitude;
44 | const latitude = this.data.shop.latitude;
45 | wx.openLocation({
46 | latitude: Number(latitude),
47 | longitude: Number(longitude),
48 | name: this.data.shop.name,
49 | address: this.data.shop.describe,
50 | fail: (e) => {
51 | Tips.alert('定位失败');
52 | }
53 | });
54 | }
55 | })
--------------------------------------------------------------------------------
/templates/address/item/address-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 新增收货地址
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{name}}
20 | {{phone}}
21 | 默认
22 |
23 |
24 | {{fullAddress}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/pages/goods/score/list.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
26 |
27 | {{comment.comment ? comment.comment : '好评!'}}
28 |
29 |
30 |
31 |
32 |
33 |
34 | 该商品暂时还没有评价
35 |
36 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | App({
2 | onLaunch: function () {
3 | //URL初始化
4 | this.globalData.baseUrl = this.globalData.publicUrl + '/customer';
5 | this.globalData.init = true;
6 |
7 | //缓存同步
8 | this.cacheAuthInfo();
9 | },
10 |
11 |
12 | cacheAuthInfo: function(){
13 | //微信会话
14 | const third_session = wx.getStorageSync('third_session');
15 | if(third_session != ''){
16 | this.globalData.auth.third_session = third_session;
17 | }
18 | //服务器会话
19 | const login_code = wx.getStorageSync('login_code');
20 | if(login_code != ''){
21 | this.globalData.auth.login_code = login_code;
22 | }
23 | //用户信息
24 | const user = wx.getStorageSync('user');
25 | if(user != ''){
26 | this.globalData.user = user;
27 | }
28 | },
29 |
30 | globalData: {
31 | init: false,
32 | //购物车缓存
33 | cart: { num: 0 },
34 | order: { reload: false },
35 | //用户缓存
36 | user: {},
37 | //权限缓存
38 | auth: {},
39 | //店铺缓存
40 | shop: {
41 | //code: 'eemTgbKrhqiYKMFowcBCQ1Zr7G13bWUT',
42 | //name: '连江什么鬼炸鸡店',
43 | code: 'xemTgbKrhqiYKMFowcBCQ1Zr7G13bWUT',
44 | name: '示例店铺',
45 | limitPrice: 0
46 | },
47 | //API地址
48 | //publicUrl: "http://192.168.31.124:9999/api/v1",
49 | //publicUrl: "http://121.42.178.251:9999/v1",
50 | publicUrl: "https://api.leshare.shop/v1",
51 | //publicUrl: "http://api.leshare.shop:9001/v1",
52 | }
53 | });
--------------------------------------------------------------------------------
/class/service/LogService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | import Pagination from "../entity/Page";
3 |
4 | /**
5 | * 日志服务
6 | */
7 | export default class LogService extends BaseService {
8 | constructor() {
9 | super()
10 | }
11 |
12 | /**
13 | * 返回分页对象
14 | */
15 | page() {
16 | const url = `${this.baseUrl}/visit_goods_log`;
17 | return new Pagination(url, this._processFavGoods.bind(this));
18 | }
19 |
20 | /**
21 | * 移除访问记录
22 | */
23 | remove(goodsId) {
24 | const url = `${this.baseUrl}/visit_goods_log?goodsId=${goodsId}`;
25 | return this.delete(url);
26 | }
27 |
28 | /**
29 | * 数据处理
30 | */
31 | _processFavGoods(data) {
32 | return {
33 | goodsId: data.goodsId,
34 | goodsName: data.goods.name,
35 | goodsPrice: data.goods.sellPrice.toFixed(2),
36 | imageUrl: this._processGoodsPreview(data.goods.images)
37 | };
38 | }
39 |
40 | /**
41 | * 处理预览图
42 | */
43 | _processGoodsPreview(images) {
44 | //图片处理
45 | if (images == null || images.length < 1) {
46 | return "/images/goods/broken.png";
47 | }
48 | else if (images[0].url == null) {
49 | return "/images/goods/broken.png";
50 | }
51 | else {
52 | return images[0].url + '/small';
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/pages/shop/contact/contact.wxss:
--------------------------------------------------------------------------------
1 | .weui-footer{margin-top:30rpx; color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}
2 |
3 |
4 | page{
5 | height: 100%;
6 | background-color: #f2f2f2;
7 | }
8 |
9 | .header {
10 | background-color: #11ca6f;
11 | display: flex;
12 | flex-direction: column;
13 | justify-content: center;
14 | align-items: center;
15 | }
16 |
17 | .header .title {
18 | font-size: 34rpx;
19 | font-weight: bold;
20 | margin-top: 50px;
21 | }
22 |
23 | .header .describe {
24 | margin-top: 20px;
25 | }
26 |
27 | .header .contact {
28 | display: flex;
29 | flex-direction: column;
30 | justify-content: center;
31 | align-items: center;
32 | width: 160rpx;
33 | height: 60rpx;
34 | background-color: #FFF;
35 | color: #11ca6f;
36 | margin-top: 20px;
37 | font-size: 28rpx;
38 | }
39 |
40 | .header .preview {
41 | width: 700rpx;
42 | margin-top: 20px;
43 | }
44 |
45 | .header text {
46 | color: #FFF;
47 | }
48 |
49 | .content .solution {
50 | width: 100%;
51 | }
52 |
--------------------------------------------------------------------------------
/templates/goods/info/goods-info-template.wxss:
--------------------------------------------------------------------------------
1 | .goods-info-conatiner{
2 | background-color: #FFF;
3 | display: flex;
4 | flex-direction: column;
5 | }
6 |
7 | .goods-swiper{
8 | height: 750rpx;
9 | width: 750rpx;
10 | }
11 |
12 | .goods-swiper image{
13 | width:100%;
14 | height:750rpx;
15 | }
16 |
17 | .goods-sales-container{
18 | position: absolute;
19 | top: 690rpx;
20 | right: 0rpx;
21 | height: 60rpx;
22 | width: 180rpx;
23 | text-align: center;
24 | color: #FFF;
25 | background-color: #1296db;
26 | -webkit-filter: opacity(.7);
27 | }
28 | .goods-sales-container text{
29 | line-height: 60rpx;
30 | font-size: 28rpx;
31 | color: #FFF;
32 | }
33 |
34 | .goods-title-container{
35 | display: flex;
36 | flex-direction: column;
37 | justify-content: space-around;
38 | padding: 20rpx 10rpx 0rpx 20rpx;
39 | }
40 |
41 | .goods-info-title{
42 | color: #333;
43 | font-size: 32rpx;
44 | }
45 |
46 |
47 | .goods-price-container{
48 | display: flex;
49 | flex-direction: row;
50 | justify-content: space-between;
51 | align-items: center;
52 | height: 80rpx;
53 | padding-left: 20rpx;
54 | }
55 | .goods-info-price{
56 | font-size:38rpx;
57 | color:#ff6200;
58 | }
59 |
60 | .goods-item-price-original{
61 | margin-left: 20rpx;
62 | text-decoration: line-through;
63 | color:#999;
64 | }
65 |
66 | /*运费*/
67 | .goods-post-fee-text{
68 | margin-right: 20rpx;
69 | }
70 |
--------------------------------------------------------------------------------
/templates/goods/info/goods-info-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | 销量: {{salesVolume}}
18 |
19 |
20 |
21 |
22 |
23 |
24 | {{name}}
25 |
26 |
27 |
28 |
29 |
30 | ¥ {{sku.isReady ? sku.detail.price: priceLable}}
31 | ¥ {{sellPrice}}
32 |
33 |
34 | {{feeText}}
35 |
36 |
37 |
--------------------------------------------------------------------------------
/templates/address/item/address-item-template.wxss:
--------------------------------------------------------------------------------
1 | .address-item-container{
2 | display: flex;
3 | flex-direction: row;
4 | justify-content: space-around;
5 | align-items: center;
6 | padding-top:25rpx;
7 | padding-bottom: 25rpx;
8 | background-color: #FFF;
9 | }
10 |
11 |
12 | .address-icon-container{
13 | width: 60rpx;
14 | text-align: center;
15 | }
16 |
17 | .address-info-container{
18 | display: flex;
19 | flex-direction: column;
20 | width: 600rpx;
21 | }
22 |
23 | .address-info-name{
24 | color: #232326;
25 | font-size: 36rpx;
26 | font-weight: bold;
27 | }
28 | .address-info-phone{
29 | font-size: 28rpx;
30 | margin-left: 45rpx;
31 | font-weight: bold;
32 | color: #232326;
33 | }
34 |
35 | .address-name-phone-container{
36 | display: flex;
37 | flex-direction: row;
38 | align-items: center;
39 | }
40 |
41 | /*
42 | * 地址详情
43 | */
44 | .address-info-detail{
45 | color: #0A0A0D;
46 | font-size: 28rpx;
47 | }
48 | .address-detail-container{
49 | margin-top: 10rpx;
50 | }
51 |
52 | /*默认标签*/
53 | .address-default-label{
54 | margin-left: 10rpx;
55 | }
56 |
57 | /*占位符*/
58 | .address-empty-container{
59 | display: flex;
60 | flex-direction: row;
61 | flex:1;
62 | padding-left: 20rpx;
63 | align-items: center;
64 | }
65 | .address-empty-add{
66 | height: 80rpx;
67 | width: 80rpx;
68 | }
69 | .address-empty-text{
70 | font-size: 30rpx;
71 | margin-left: 20rpx;
72 | }
--------------------------------------------------------------------------------
/pages/refund/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | 订单号:
11 | {{refund.orderUuid}}
12 |
13 |
14 | 退款单号:
15 | {{refund.refundUuid}}
16 |
17 |
18 | 退款金额:
19 | ¥{{refund.refundPrice}}
20 |
21 |
22 | 退款原因:
23 | {{refund.cause}}
24 |
25 |
26 | 联系方式:
27 | {{refund.contactName}} {{refund.contactPhone}}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/templates/address/mgr/address-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{name}}
9 | {{phone}}
10 |
11 |
12 | {{fullAddress}}
13 |
14 |
15 |
16 |
17 |
18 | 设为默认
19 |
20 |
21 |
22 |
23 | 编辑
24 |
25 |
26 | 删除
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | ## 1. 项目描述
2 | 基于微信小程序的电商平台
3 |
4 | 本项目后续将使用`wepy`框架进行重构,已迁移项目:
5 | - 卖家端:https://github.com/coolhwm/leshare-seller-wepy
6 | - 外卖端:https://github.com/coolhwm/leshare-food-wepy
7 |
8 | *项目截图待补充*
9 |
10 | ## 2. 功能清单
11 |
12 | ### 店铺管理
13 | - [x] 店铺首页
14 | - [x] 店铺公告
15 | - [x] 店铺详情
16 | - [x] 分享
17 | - [x] 店铺打烊/营业
18 | - [x] 联系我们
19 |
20 | ### 商品管理
21 | - [x] 商品详情
22 | - [x] 商品规格
23 | - [x] 购物车
24 | - [x] 商品简单分类
25 | - [x] 商品评价
26 | - [ ] 商品简单检索
27 | - [ ] 商品分类检索
28 |
29 |
30 | ### 订单管理
31 | - [x] 订单列表
32 | - [x] 订单详情
33 | - [x] 交易下单
34 | - [x] 交易退款
35 | - [x] 微信支付
36 | - [x] 物流查询
37 | - [x] 运费加载
38 | - [x] 付款方式
39 | - [ ] 商品退款
40 |
41 | ### 营销管理
42 | - [x] 优惠券
43 | - [ ] 会员卡
44 |
45 | ### 用户管理
46 | - [x] 个人首页
47 | - [x] 地址管理
48 | - [x] 商品历史
49 | - [x] 收藏商品
50 | - [ ] 客服消息
51 | - [x] 访问统计
52 | - [x] 手工授权
53 |
54 | ## 3. 更新日志
55 | - 2017/03/03:完成首页;
56 | - 2017/03/04:完成店铺、订单页面;
57 | - 2017/03/05:完成商品详情;
58 | - 2017/03/08:完成订单详情、订单交易页面,构建店铺详情页面;
59 | - 2017/03/09:完成店铺详情页面;
60 | - 2017/04/13:完成下单页面;
61 | - 2017/05/13:完成用户登录,用户授权;
62 | - 2017/05/19:完成交易流程;
63 | - 2017/06/04:完成退款、物流查询、地址管理、SKU规格购买功能;
64 | - 2017/06/05:完成商品历史、收藏商品功能;
65 | - 2017/06/06:完成商品分类功能、运费加载;
66 | - 2017/06/12:完成优惠券功能、重构业务类、工程改名;
67 | - 2017/06/21:完成支付方式、项目细节优化;
68 | - 2017/06/23:完成店铺首页、优化购物车功能;
69 | - 2017/06/24:完成卡券领取功能;
70 | - 2017/06/28:完成分享功能,已完成V1.0版本;
71 | - 2017/07/06:完成访问统计;
72 | - 2017/07/24:首页增加销量和购物车功能;
73 | - 2017/07/26:增加商品评价及展现功能;
74 | - 2017/07/31:配送改造、手工授权页面;
75 | - 2017/08/02:完成店铺打烊、营业;
76 | - 2017/08/05:完成联系我们、工程改名;
77 | ## License
78 | MIT
79 |
--------------------------------------------------------------------------------
/templates/quantity/index.js:
--------------------------------------------------------------------------------
1 | function handle(e, num) {
2 | var dataset = e.currentTarget.dataset;
3 | var componentId = dataset.componentId;
4 | var disabled = dataset.disabled;
5 | var quantity = +dataset.quantity;
6 |
7 | if (disabled) return null;
8 |
9 | callback.call(this, componentId, quantity + num);
10 | }
11 |
12 | function callback(componentId, quantity) {
13 | quantity = +quantity;
14 | var e = { componentId, quantity };
15 | console.info('[zan:quantity:change]', e);
16 |
17 | if (this.handleZanQuantityChange) {
18 | this.handleZanQuantityChange(e);
19 | } else {
20 | console.warn('页面缺少 handleZanQuantityChange 回调函数');
21 | }
22 | }
23 |
24 | var Quantity = {
25 | _handleZanQuantityMinus(e) {
26 | handle.call(this, e, -1);
27 | },
28 |
29 | _handleZanQuantityPlus(e) {
30 | handle.call(this, e, +1);
31 | },
32 |
33 | _handleZanQuantityBlur(e) {
34 | var dataset = e.currentTarget.dataset;
35 | var componentId = dataset.componentId;
36 | var max = +dataset.max;
37 | var min = +dataset.min;
38 | var value = e.detail.value;
39 |
40 | if (!value) {
41 | setTimeout(() => {
42 | callback.call(this, componentId, min);
43 | }, 16);
44 | callback.call(this, componentId, value);
45 | return '' + value;
46 | }
47 |
48 | value = +value;
49 | if (value > max) {
50 | value = max;
51 | } else if (value < min) {
52 | value = min;
53 | }
54 |
55 | callback.call(this, componentId, value);
56 |
57 | return '' + value;
58 | }
59 | };
60 |
61 | module.exports = Quantity;
62 |
--------------------------------------------------------------------------------
/templates/goods/item/goods-item-template.wxss:
--------------------------------------------------------------------------------
1 | .goods-item-container{
2 | position: relative;
3 | display: flex;
4 | flex-direction: column;
5 | justify-content: space-around;
6 | margin-bottom: 10rpx;
7 | width: 370rpx;
8 | background-color: #FFF;
9 | }
10 | .goods-item-image{
11 | height: 370rpx;
12 | width: 370rpx;
13 | }
14 |
15 | .goods-item-describe{
16 | height: 100rpx;
17 | margin-top: 10rpx;
18 | padding: 0 20rpx;
19 | }
20 |
21 | .goods-item-title{
22 | font-size: 28rpx;
23 | text-overflow: ellipsis;
24 | word-break:keep-all;/* 不换行 */
25 | white-space:nowrap;/* 不换行 */
26 | overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
27 | color:#262626;
28 | }
29 |
30 | .goods-item-price-cost{
31 | font-size: 33rpx;
32 | color:#ff6200;
33 | }
34 |
35 | .goods-item-price-original{
36 | margin-left: 15rpx;
37 | text-decoration: line-through;
38 | color:#999;
39 | }
40 |
41 | .recommend-image{
42 | position: absolute;
43 | width: 40px;
44 | height: 40px;
45 | top: 0;
46 | right: 0;
47 | }
48 |
49 | .goods-sales-container{
50 | position: absolute;
51 | padding: 3px 8px;
52 | display: flex;
53 | align-items: center;
54 | flex-direction: row;
55 | justify-content: center;
56 | min-width: 50px;
57 | right: 0;
58 | bottom: 110rpx;
59 | background-color: #1296db;
60 | -webkit-filter: opacity(.9);
61 | }
62 | .goods-sales-container text{
63 | color: #FFF;
64 | }
65 |
66 | .cart-image{
67 | position: absolute;
68 | width: 25px;
69 | height: 25px;
70 | bottom: 5px;
71 | right: 5px;
72 | }
--------------------------------------------------------------------------------
/templates/goods/buy-bar/goods-buy-bar-template.wxss:
--------------------------------------------------------------------------------
1 | /*
2 | * 底部购买栏样式
3 | */
4 | .buy-bar-container{
5 | display: flex;
6 | flex-direction: row;
7 | justify-content: space-between;
8 | align-items: center;
9 | position: fixed;
10 | bottom: 0;
11 | height: 100rpx;
12 | width: 100%;
13 | background-color: #FEFEFE;
14 | border-top: 1px solid #E6E8EB;
15 | z-index: 100;
16 | }
17 |
18 | /*购买/加入购物车*/
19 | .bar-buy-container{
20 | background-color: #1296db;
21 | text-align: center;
22 | height: 100%;
23 | width: 35%;
24 | }
25 | .bar-cart-container{
26 | background-color: #49a9ee;
27 | text-align: center;
28 | height: 100%;
29 | width: 35%;
30 | }
31 | .bar-close-container{
32 | background-color: #B0B0B0;
33 | text-align: center;
34 | height: 100%;
35 | width: 70%;
36 | }
37 | .bar-buy-container text,.bar-cart-container text,.bar-close-container text{
38 | font-size: 32rpx;
39 | line-height: 100rpx;
40 | color: #FFF;
41 | }
42 |
43 | /*收藏/购物车按钮*/
44 | .bar-action-container{
45 | display: flex;
46 | flex-direction: column;
47 | height: 100%;
48 | text-align: center;
49 | align-items: center;
50 | justify-content: center;
51 | width: 15%;
52 | padding-left: 10rpx;
53 | }
54 | .bar-action-container text{
55 | margin-top: 8rpx;
56 | font-size: 22rpx;
57 | }
58 |
59 | /*竖线*/
60 | .gap-v{
61 | height: 70%;
62 | width: 1px;
63 | background-color: #e5e5e5;
64 | }
65 |
66 | /*调整购物车徽章位置*/
67 | .zan-badge {
68 | height: 45rpx;
69 |
70 | }
71 | .zan-badge__count{
72 | top:-6px;
73 | right: -5px;
74 | }
--------------------------------------------------------------------------------
/templates/address/mgr/address-item-template.wxss:
--------------------------------------------------------------------------------
1 |
2 | /*父窗口*/
3 | .address-item-container{
4 | display: flex;
5 | flex-direction: column;
6 | background-color: #FFF;
7 | }
8 |
9 | /*管理按钮容器*/
10 | .address-mgr-container{
11 | display: flex;
12 | flex-direction: row;
13 | justify-content: space-between;
14 | align-items: center;
15 | padding: 25rpx;
16 | border-top: 1px solid #EAEAEA;
17 | }
18 |
19 | /*操作容器*/
20 | .address-opt-container, .address-default-container, .address-opt-action, .address-mgr-container>view{
21 | display: flex;
22 | flex-direction: row;
23 | align-items: center;
24 | vertical-align: middle;
25 | }
26 | /*操作图片*/
27 | .address-opt-container image{
28 | height: 40rpx;
29 | width: 40rpx;
30 | margin-left: 25rpx;
31 | }
32 | /*操作文本*/
33 | .address-mgr-container text{
34 | color: #0A0A0D;
35 | font-size: 28rpx;
36 | margin-left: 13rpx;
37 | }
38 |
39 |
40 | /*信息容器*/
41 | .address-info-container{
42 | display: flex;
43 | flex-direction: column;
44 | padding: 30rpx 25rpx;
45 | }
46 | /*容器*/
47 | .address-name-phone-container{
48 | display: flex;
49 | flex-direction: row;
50 | justify-content: space-between;
51 | align-items: center;
52 | }
53 | /*姓名*/
54 | .address-info-name{
55 | color: #232326;
56 | font-size: 34rpx;
57 | font-weight: bold;
58 | }
59 | /*电话*/
60 | .address-info-phone{
61 | font-size: 28rpx;
62 | color: #232326;
63 | }
64 |
65 | /*
66 | * 地址详情
67 | */
68 | .address-info-detail{
69 | color: #0A0A0D;
70 | font-size: 28rpx;
71 | }
72 | /*地址容器*/
73 | .address-detail-container{
74 | margin-top: 10rpx;
75 | }
76 |
77 |
78 |
--------------------------------------------------------------------------------
/templates/trade/item/order-item-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/order/goods/order-goods-template.wxss";
2 |
3 |
4 | .order-item-container{
5 | border-top: 1px solid #F2F2F2;
6 | display: flex;
7 | flex-direction: column;
8 | background-color: #FFF;
9 | }
10 |
11 | /*顶栏*/
12 | .order-header-container{
13 | padding-left: 25rpx;
14 | padding-right: 20rpx;
15 | display: flex;
16 | flex-direction: row;
17 | justify-content: space-between;
18 | align-items: center;
19 | height: 85rpx;
20 | }
21 |
22 | /*底栏*/
23 | .order-footer-container{
24 | padding-left: 25rpx;
25 | padding-right: 20rpx;
26 | display: flex;
27 | flex-direction: row;
28 | justify-content: flex-end;
29 | align-items: center;
30 | height: 70rpx;
31 | }
32 | /*底栏文字*/
33 | .order-footer-container text{
34 | color:#262626;
35 | font-size: 28rpx;
36 | }
37 |
38 | /*顶栏图片*/
39 | .shop-info-icon{
40 | height: 40rpx;
41 | width: 40rpx;
42 | vertical-align: middle;
43 | }
44 |
45 | /*顶栏店铺名称*/
46 | .shop-info-name{
47 | margin-left: 10rpx;
48 | margin-right: 20rpx;
49 | font-size: 28rpx;
50 | color:#262626;
51 | }
52 |
53 | /*价格*/
54 | .order-footer-container .footer-price{
55 | font-size: 32rpx;
56 | color:#ff6200;
57 | margin-right: 20rpx;
58 | }
59 |
60 | /* 数量 */
61 | .footer-count{
62 | margin-right: 20rpx;
63 | }
64 |
65 | /*间隔*/
66 | .order-goods-hr{
67 | width: 100%;
68 | height: 6rpx;
69 | }
70 |
71 | /* 操作栏 */
72 | .order-action-bar{
73 | display: flex;
74 | justify-content: flex-end;
75 | align-items: center;
76 | border-top: 1px solid #F5F5F5;
77 | height: 90rpx;
78 | padding-right: 20rpx;
79 | }
--------------------------------------------------------------------------------
/pages/goods/history/history.js:
--------------------------------------------------------------------------------
1 | import LogService from "../../../class/service/LogService";
2 | import Router from "../../../class/utils/Router";
3 | import Tips from "../../../class/utils/Tips";
4 | const logService = new LogService();
5 |
6 |
7 | Page({
8 | page: {},
9 | data: {
10 | histories: [],
11 | init: false
12 | },
13 |
14 | onLoad: function (options) {
15 | Tips.loading();
16 | //初始化分页参数
17 | this.page = logService.page();
18 | this.loadNextPage();
19 | },
20 |
21 | reload: function () {
22 | this.page.reset();
23 | this.loadNextPage();
24 | wx.stopPullDownRefresh();
25 | },
26 |
27 | /**
28 | * 加载下一页
29 | */
30 | loadNextPage: function () {
31 | this.page.next().then(data => {
32 | this.setData({
33 | histories: data.list,
34 | init: true
35 | });
36 | Tips.loaded();
37 | });
38 | },
39 |
40 | /**
41 | * 下拉刷新
42 | */
43 | onPullDownRefresh: function () {
44 | this.reload();
45 | },
46 |
47 | /**
48 | * 上划加载
49 | */
50 | onReachBottom: function (event) {
51 | this.loadNextPage();
52 | },
53 |
54 | /***********************操作事件***********************/
55 |
56 | /**
57 | * 点击商品
58 | */
59 | onGoodsTap: function (event) {
60 | const goodsId = event.currentTarget.dataset.goodsId;
61 | Router.goodsIndex(goodsId);
62 | },
63 |
64 | /**
65 | * 操作
66 | */
67 | onMoreTap: function (event) {
68 | const goodsId = event.currentTarget.dataset.goodsId;
69 | Tips.actionWithFunc(['查看商品', '删除记录'],
70 | () => Router.goodsIndex(goodsId),
71 | () => {
72 | Tips.loading();
73 | logService.remove(goodsId).then(() => this.reload())
74 | });
75 | }
76 | });
--------------------------------------------------------------------------------
/pages/goods/favorite/favorite.js:
--------------------------------------------------------------------------------
1 | import FavoriteService from "../../../class/service/FavoriteService";
2 | import Router from "../../../class/utils/Router";
3 | import Tips from "../../../class/utils/Tips";
4 |
5 | const favoriteService = new FavoriteService();
6 | Page({
7 | page: {},
8 | data: {
9 | favorites: [],
10 | init: false
11 | },
12 |
13 | onLoad: function (options) {
14 | Tips.loading();
15 | //初始化分页参数
16 | this.page = favoriteService.page();
17 | this.loadNextPage();
18 | },
19 |
20 | reload: function () {
21 | this.page.reset();
22 | this.loadNextPage();
23 | wx.stopPullDownRefresh();
24 | },
25 |
26 | /**
27 | * 加载下一页
28 | */
29 | loadNextPage: function () {
30 | this.page.next().then(data => {
31 | this.setData({
32 | favorites: data.list,
33 | init: true
34 | });
35 | Tips.loaded();
36 | });
37 | },
38 |
39 | /**
40 | * 下拉刷新
41 | */
42 | onPullDownRefresh: function () {
43 | this.reload();
44 | },
45 |
46 | /**
47 | * 上划加载
48 | */
49 | onReachBottom: function (event) {
50 | this.loadNextPage();
51 | },
52 |
53 | /***********************操作事件***********************/
54 |
55 | /**
56 | * 点击商品
57 | */
58 | onGoodsTap: function (event) {
59 | const goodsId = event.currentTarget.dataset.goodsId;
60 | Router.goodsIndex(goodsId);
61 | },
62 |
63 |
64 | /**
65 | * 操作
66 | */
67 | onMoreTap: function (event) {
68 | const goodsId = event.currentTarget.dataset.goodsId;
69 | Tips.actionWithFunc(['查看商品', '取消收藏'],
70 | () => Router.goodsIndex(goodsId),
71 | () => {
72 | Tips.loading();
73 | favoriteService.remove(goodsId).then(() => this.reload())
74 | });
75 | }
76 | });
--------------------------------------------------------------------------------
/templates/order/detail-item/order-item-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/order/goods/order-goods-template.wxss";
2 |
3 |
4 | .order-item-container{
5 |
6 | display: flex;
7 | flex-direction: column;
8 | background-color: #FFF;
9 | }
10 |
11 | .order-status-complete{
12 | font-size: 26rpx;
13 | color: limegreen;
14 | }
15 |
16 | /*顶栏*/
17 | .order-header-container{
18 | padding-left: 25rpx;
19 | padding-right: 20rpx;
20 | display: flex;
21 | flex-direction: row;
22 | justify-content: space-between;
23 | align-items: center;
24 | height: 85rpx;
25 | }
26 |
27 | /*底栏*/
28 | .order-footer-container{
29 | padding-left: 25rpx;
30 | padding-right: 20rpx;
31 | display: flex;
32 | flex-direction: row;
33 | justify-content: flex-end;
34 | align-items: center;
35 | height: 70rpx;
36 | }
37 | /*底栏文字*/
38 | .order-footer-container text{
39 | color:#262626;
40 | font-size: 28rpx;
41 | }
42 |
43 | /*顶栏图片*/
44 | .shop-info-icon{
45 | height: 40rpx;
46 | width: 40rpx;
47 | vertical-align: middle;
48 | }
49 |
50 | /*顶栏店铺名称*/
51 | .shop-info-name{
52 | margin-left: 10rpx;
53 | margin-right: 20rpx;
54 | font-size: 28rpx;
55 | color:#262626;
56 | }
57 |
58 | /*价格*/
59 | .order-footer-container .footer-price{
60 | font-size: 32rpx;
61 | color:#ff6200;
62 | margin-right: 20rpx;
63 | }
64 |
65 | /* 数量 */
66 | .footer-count{
67 | margin-right: 20rpx;
68 | }
69 |
70 | /*间隔*/
71 | .order-goods-hr{
72 | width: 100%;
73 | height: 6rpx;
74 | }
75 |
76 | /* 操作栏 */
77 | .order-action-bar{
78 | display: flex;
79 | justify-content: flex-end;
80 | align-items: center;
81 | border-top: 1px solid #F5F5F5;
82 | height: 90rpx;
83 | padding-right: 20rpx;
84 | }
--------------------------------------------------------------------------------
/templates/cart/item/cart-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{goodsName}}
20 | {{skuText}}
21 |
22 |
23 | ¥
24 | {{goodsPrice}}
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 删除
33 |
34 |
35 |
--------------------------------------------------------------------------------
/pages/goods/score/list.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/tab/index.wxss";
2 |
3 | page{
4 | height: 100%;
5 | background-color: #F5F5F5;
6 | }
7 |
8 | .score-box{
9 | display: flex;
10 | flex-direction: column;
11 | background-color: white;
12 | padding: 30rpx;
13 | border-bottom: 1px solid #EDEDED;
14 | }
15 |
16 | .header-box{
17 | display: flex;
18 | flex-direction: row;
19 | justify-content: space-between;
20 | align-items: center;
21 | }
22 |
23 | .info-box{
24 | display: flex;
25 | flex-direction: row;
26 | flex: 1;
27 | }
28 |
29 | .info-box .avatar{
30 | height: 70rpx;
31 | width: 70rpx;
32 | border-radius: 50%;
33 | vertical-align: middle;
34 | }
35 |
36 | .info-box .username{
37 | font-size:28rpx;
38 | color: #262626;
39 | }
40 |
41 | .info-box .date{
42 | font-size:26rpx;
43 | color: #A3A3A3;
44 | }
45 |
46 | .name-box{
47 | display: flex;
48 | flex-direction: column;
49 | margin-left: 20rpx;
50 | }
51 |
52 | .star-box image{
53 | height: 40rpx;
54 | width: 40rpx;
55 | vertical-align: middle;
56 | }
57 |
58 | .content-box{
59 | padding-left: 90rpx;
60 | margin-top: 20rpx;
61 | font-size: 28rpx;
62 | color: #262626;
63 | }
64 |
65 | /*占位*/
66 | .order-empty-tips{
67 | position: fixed;
68 | top: 300rpx;
69 | width: 100%;
70 | height: 300rpx;
71 | display: flex;
72 | flex-direction: row;
73 | align-items: center;
74 | justify-content: center;
75 | }
76 | .order-empty-tips image{
77 | width:100rpx;
78 | height: 100rpx;
79 | }
80 | .order-empty-tips text{
81 | color: #656565;
82 | font-size: 40rpx;
83 | margin-left: 30rpx;
84 | }
85 | .goods-grid-tab-placeholder{
86 | height: 41px;
87 | }
88 | .goods-grid-tab{
89 | margin-bottom: 10rpx;
90 | }
--------------------------------------------------------------------------------
/templates/cart/item/cart-item-template.wxss:
--------------------------------------------------------------------------------
1 | /*外框容器*/
2 |
3 | .cart-item-wrap{
4 | width: 100%;
5 | transition: left 0.2s ease-in-out;
6 | position: relative;
7 | }
8 |
9 | .cart-item-container{
10 | padding: 20rpx;
11 | background-color: #FFF;
12 | display: flex;
13 | flex-direction: row;
14 | align-items: center;
15 | justify-content: space-between;
16 | margin-bottom: 2px;
17 |
18 | }
19 |
20 | .cart-item-delete{
21 | position: absolute;
22 | top:0;
23 | right: -60px;
24 | background-color: #FF4343;
25 | height: 100%;
26 | width: 60px;
27 | display: flex;
28 | justify-content: center;
29 | align-items: center;
30 | }
31 |
32 | .cart-item-delete text{
33 | font-size: 32rpx;
34 | color: white;
35 | }
36 |
37 | /*选择框容器*/
38 | .cart-check-container{
39 | width: 40rpx;
40 | margin-right: 20rpx;
41 | text-align: center;
42 | }
43 |
44 | /*图片*/
45 | .cart-item-image{
46 | width: 180rpx;
47 | height: 180rpx;
48 | border: 1px solid #E7E7E7;
49 | border-radius: 5px;
50 | }
51 |
52 | /* 信息容器 */
53 | .cart-info-container{
54 | width: auto;
55 | display: flex;
56 | flex: 1;
57 | flex-direction: column;
58 | margin-left: 20rpx;
59 | justify-content: space-between;
60 | height: 180rpx;
61 | }
62 | /*商品主标题*/
63 | .goods-title-text{
64 | font-size: 28rpx;
65 | color: #2D2D2D;
66 | }
67 | /*规则*/
68 | .goods-sku-text{
69 | font-size: 28rpx;
70 | color: #A3A3A3;
71 | }
72 | /*商品价格*/
73 | .goods-price-small{
74 | font-size: 26rpx;
75 | color:#ff6200;
76 | }
77 | .goods-price-big{
78 | font-size: 36rpx;
79 | color:#ff6200;
80 | }
81 |
82 | /*价格/数量栏*/
83 | .goods-price-num-container{
84 | display: flex;
85 | flex-direction: row;
86 | justify-content: space-between;
87 | }
--------------------------------------------------------------------------------
/pages/goods/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/pages/goods/score/score.js:
--------------------------------------------------------------------------------
1 | import Tips from "../../../class/utils/Tips";
2 | import Router from "../../../class/utils/Router";
3 | import OrderService from "../../../class/service/OrderService";
4 |
5 | const notification = require("../../../class/utils/WxNotificationCenter.js");
6 | const app = getApp();
7 | const orderService = new OrderService();
8 | Page({
9 | data: {
10 | init: false,
11 | orderId: '',
12 | scores: []
13 | },
14 | onLoad: function ({orderId, data}) {
15 | const scores = JSON.parse(data);
16 | this.setData({
17 | orderId: orderId,
18 | scores: scores,
19 | init: true
20 | });
21 | },
22 | onStarTap({currentTarget}) {
23 | const {goodsId, goodsSku, index} = currentTarget.dataset;
24 | const scores = this.data.scores;
25 | const score = scores.find(item => item.goodsId == goodsId && item.sku == goodsSku);
26 | for (let i = 0; i < 5; i++) {
27 | score.starArr[i] = i <= index ? 1 : 0;
28 | }
29 | score.star = index + 1;
30 | this.setData({ scores: scores });
31 | },
32 | input(event) {
33 | const index = event.currentTarget.dataset.index;
34 | const value = event.detail.value;
35 | const scores = this.data.scores;
36 | scores[index].comment = value;
37 | this.setData({ scores: scores });
38 | },
39 | onSubmitTap(event) {
40 | const {orderId, scores} = this.data;
41 | const data = scores.map(item => {
42 | return {
43 | comment: item.comment,
44 | sku: item.sku,
45 | star: item.star,
46 | goodsId: item.goodsId,
47 | orderId: orderId
48 | }
49 | });
50 |
51 | Tips.confirm('确认评价?').then(() => {
52 | Tips.loading();
53 | return orderService.comment(orderId, data);
54 | }).then(res => {
55 | Tips.toast('评价成功', () => Router.orderIndexRefresh());
56 | });
57 | }
58 | })
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/shop/index/index",
4 | "pages/shop/contact/contact",
5 | "pages/customer/index/index",
6 | "pages/customer/login/login",
7 | "pages/goods/score/list",
8 | "pages/order/index/index",
9 | "pages/goods/score/score",
10 | "pages/goods/favorite/favorite",
11 | "pages/goods/index/index",
12 | "pages/shop/detail/detail",
13 | "pages/cart/index/index",
14 | "pages/coupon/index/index",
15 | "pages/order/detail/detail",
16 | "pages/order/trade/trade",
17 | "pages/order/trace/trace",
18 | "pages/coupon/use/use",
19 | "pages/goods/history/history",
20 | "pages/refund/detail/detail",
21 | "pages/refund/apply/apply",
22 | "pages/address/index/index",
23 | "pages/address/edit/edit"
24 | ],
25 | "window": {
26 | "navigationBarBackgroundColor": "#1296db"
27 | },
28 | "tabBar": {
29 | "color": "#666666",
30 | "selectedColor": "#1296db",
31 | "borderStyle": "white",
32 | "backgroundColor": "#FAFAFA",
33 | "list": [
34 | {
35 | "iconPath": "images/tab/home.png",
36 | "selectedIconPath": "images/tab/home-active.png",
37 | "pagePath": "pages/shop/index/index",
38 | "text": "店铺"
39 | },
40 | {
41 | "iconPath": "images/tab/cart.png",
42 | "selectedIconPath": "images/tab/cart-active.png",
43 | "pagePath": "pages/cart/index/index",
44 | "text": "购物车"
45 | },
46 | {
47 | "iconPath": "images/tab/order.png",
48 | "selectedIconPath": "images/tab/order-active.png",
49 | "pagePath": "pages/order/index/index",
50 | "text": "订单"
51 | },
52 | {
53 | "iconPath": "images/tab/user.png",
54 | "selectedIconPath": "images/tab/user-active.png",
55 | "pagePath": "pages/customer/index/index",
56 | "text": "我的"
57 | }
58 | ]
59 | }
60 | }
--------------------------------------------------------------------------------
/pages/goods/score/score.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | height: 100%;
3 | background-color: #F5F5F5;
4 | }
5 |
6 | .score-item-box{
7 | margin-top: 10rpx;
8 | background-color: white;
9 | display: flex;
10 | flex-direction: column;
11 | }
12 |
13 | .socre-header{
14 | display: flex;
15 | flex-direction: row;
16 | align-items: center;
17 | padding: 20rpx 30rpx;
18 | border-top: 1px solid #EDEDED;
19 | border-bottom: 1px solid #EDEDED;
20 | }
21 |
22 | .socre-header .title{
23 | font-size: 28rpx;
24 | margin-left: 30rpx;
25 | }
26 | .score-note{
27 | border-bottom: 1px solid #EDEDED;
28 | }
29 |
30 | .goods-img{
31 | height: 60rpx;
32 | width: 60rpx;
33 | vertical-align: middle;
34 | }
35 |
36 | .star-box image{
37 | height: 50rpx;
38 | width: 50rpx;
39 | vertical-align: middle;
40 | margin-left: 30rpx;
41 | }
42 |
43 | textarea{
44 | padding: 10rpx;
45 | width: 90%;
46 | min-height: 80px;
47 | margin-left: auto;
48 | margin-right: auto;
49 | font-family: MicroSoft Yahei;
50 | font-size: 30rpx;
51 | color: #666;
52 | }
53 |
54 | /******确认按钮********/
55 | .refund-action-bar{
56 | position: fixed;
57 | bottom: 0;
58 | display: flex;
59 | flex-direction: row;
60 | justify-content: center;
61 | align-items: center;
62 | width: 100%;
63 | height: 100rpx;
64 | }
65 |
66 | .refund-action-primary{
67 | background-color: #1296db;
68 | }
69 | .refund-action{
70 | background-color: #FFF;
71 | border-top: 1px solid #e5e5e5;
72 | }
73 | .refund-action-primary text{
74 | font-size: 32rpx;
75 | color: #FFF;
76 | }
77 |
78 | .refund-action text{
79 | font-size: 32rpx;
80 | color: #333;
81 | }
82 |
83 | .refund-action, .refund-action-primary{
84 | width: 50%;
85 | height: 100%;
86 | display: flex;
87 | justify-content: center;
88 | align-items: center;
89 | }
--------------------------------------------------------------------------------
/pages/customer/index/index.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | height: 100%;
3 | background-color: #f2f2f2;
4 | }
5 |
6 | /*用户信息*/
7 | .user-info-container{
8 | display: flex;
9 | flex-direction: column;
10 | justify-content: center;
11 | align-items: center;
12 | height: 300rpx;
13 | background-color: #1296db;
14 | }
15 | .user-avatar{
16 | height:160rpx;
17 | width: 160rpx;
18 | border-radius: 50%;
19 | }
20 |
21 | .user-nickname{
22 | color: white;
23 | font-size: 40rpx;
24 | }
25 |
26 | /*列表*/
27 | .zan-cell__bd{
28 | display: flex;
29 | flex-direction: row;
30 | align-items: center;
31 | }
32 | .zan-cell__bd image{
33 | height: 46rpx;
34 | width: 46rpx;
35 | margin-right: 25rpx;
36 | vertical-align: middle;
37 | }
38 |
39 | /*底部边线*/
40 | .footer-line{
41 | position: fixed;
42 | height: 1px;
43 | width: 100%;
44 | background-color: #E6E8EB;
45 | bottom: 0px;
46 | }
47 |
48 | .user-func-container{
49 | display: flex;
50 | flex-direction: column;
51 | background-color: #FFF;
52 | margin-top: 20rpx;
53 | padding: 10rpx;
54 | }
55 |
56 | .user-func-item{
57 | display: flex;
58 | font-size: 30rpx;
59 | flex-direction: row;
60 | align-items: center;
61 | justify-content: space-between;
62 | padding-left: 20rpx;
63 | }
64 | .func-text{
65 | font-size: 30rpx;
66 | line-height: 60rpx;
67 | }
68 |
69 | .weui-footer{margin-top:30rpx; color:#999;font-size:14px;text-align:center}.weui-footer_fixed-bottom{position:fixed;bottom:.52em;left:0;right:0}.weui-footer__links{font-size:0}.weui-footer__link{display:inline-block;vertical-align:top;margin:0 .62em;position:relative;font-size:14px;color:#586c94}.weui-footer__link:before{content:" ";position:absolute;left:0;top:0;width:1px;bottom:0;border-left:1rpx solid #c7c7c7;color:#c7c7c7;left:-.65em;top:.36em;bottom:.36em}.weui-footer__link:first-child:before{display:none}.weui-footer__text{padding:0 .34em;font-size:12px}
--------------------------------------------------------------------------------
/templates/order/list-item/order-item-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/order/goods/order-goods-template.wxss";
2 |
3 |
4 | .order-item-container{
5 | border-top: 1px solid #F2F2F2;
6 | border-bottom: 1px solid #EDEDED;
7 | display: flex;
8 | flex-direction: column;
9 | background-color: #FFF;
10 | margin-bottom: 10rpx;
11 | }
12 |
13 | .order-status-complete{
14 | font-size: 26rpx;
15 | color: #1296db;
16 | }
17 |
18 | .order-status-cancel{
19 | font-size: 26rpx;
20 | color: #A3A3A3;
21 | }
22 |
23 |
24 | /*顶栏*/
25 | .order-header-container{
26 | padding-left: 25rpx;
27 | padding-right: 20rpx;
28 | display: flex;
29 | flex-direction: row;
30 | justify-content: space-between;
31 | align-items: center;
32 | height: 85rpx;
33 | }
34 |
35 | /*底栏*/
36 | .order-footer-container{
37 | padding-left: 25rpx;
38 | padding-right: 20rpx;
39 | display: flex;
40 | flex-direction: row;
41 | justify-content: flex-end;
42 | align-items: center;
43 | height: 70rpx;
44 | }
45 | /*底栏文字*/
46 | .order-footer-container text{
47 | color:#262626;
48 | font-size: 28rpx;
49 | }
50 |
51 | /*顶栏图片*/
52 | .shop-info-icon{
53 | height: 40rpx;
54 | width: 40rpx;
55 | vertical-align: middle;
56 | }
57 |
58 | /*顶栏店铺名称*/
59 | .shop-info-name{
60 | margin-left: 10rpx;
61 | margin-right: 20rpx;
62 | font-size: 28rpx;
63 | color:#262626;
64 | }
65 |
66 | /*价格*/
67 | .order-footer-container .footer-price{
68 | font-size: 32rpx;
69 | color:#ff6200;
70 | margin-right: 20rpx;
71 | }
72 |
73 | /* 数量 */
74 | .footer-count{
75 | margin-right: 20rpx;
76 | }
77 |
78 | /*间隔*/
79 | .order-goods-hr{
80 | width: 100%;
81 | height: 6rpx;
82 | }
83 |
84 | /* 操作栏 */
85 | .order-action-bar{
86 | display: flex;
87 | justify-content: flex-end;
88 | align-items: center;
89 | border-top: 1px solid #F5F5F5;
90 | height: 90rpx;
91 | padding-right: 20rpx;
92 | }
--------------------------------------------------------------------------------
/class/utils/wxApi.js:
--------------------------------------------------------------------------------
1 | function wxPromisify(fn) {
2 | return function (obj = {}) {
3 | return new Promise((resolve, reject) => {
4 | obj.success = function (res) {
5 | //成功
6 | resolve(res)
7 | }
8 | obj.fail = function (res) {
9 | //失败
10 | reject(res)
11 | }
12 | fn(obj)
13 | })
14 | }
15 | }
16 | //无论promise对象最后状态如何都会执行
17 | Promise.prototype.finally = function (callback) {
18 | let P = this.constructor;
19 | return this.then(
20 | value => P.resolve(callback()).then(() => value),
21 | reason => P.resolve(callback()).then(() => { throw reason })
22 | );
23 | };
24 | /**
25 | * 微信用户登录,获取code
26 | */
27 | function wxLogin() {
28 | return wxPromisify(wx.login)();
29 | }
30 | /**
31 | * 获取微信用户信息
32 | * 注意:须在登录之后调用
33 | */
34 | function wxGetUserInfo() {
35 | return wxPromisify(wx.getUserInfo)();
36 | }
37 | /**
38 | * 获取系统信息
39 | */
40 | function wxGetSystemInfo() {
41 | return wxPromisify(wx.getSystemInfo)();
42 | }
43 |
44 | /**
45 | * 调起客户端小程序设置界面
46 | */
47 | function wxOpenSetting() {
48 | return wxPromisify(wx.openSetting)();
49 | }
50 |
51 | /**
52 | * 检查客户端会话状态
53 | */
54 | function checkSession() {
55 | return wxPromisify(wx.checkSession)();
56 | }
57 |
58 |
59 |
60 | /**
61 | * 检查客户端会话状态
62 | */
63 | function wxPay(data) {
64 | return new Promise((resolve, reject) => {
65 | wx.requestPayment({
66 | timeStamp: data.timeStamp,
67 | nonceStr: data.nonceStr,
68 | package: data.package,
69 | signType: 'MD5',
70 | paySign: data.paySign,
71 | success: function(res){
72 | resolve(res);
73 | },
74 | fail: function(res) {
75 | reject(res);
76 | }
77 | });
78 | });
79 | }
80 |
81 |
82 |
83 | module.exports = {
84 | wxPromisify: wxPromisify,
85 | wxLogin: wxLogin,
86 | wxGetUserInfo: wxGetUserInfo,
87 | wxGetSystemInfo: wxGetSystemInfo,
88 | wxOpenSetting: wxOpenSetting,
89 | checkSession: checkSession,
90 | wxPay: wxPay
91 |
92 | }
--------------------------------------------------------------------------------
/templates/coupon/shelf-panel/coupon-panel-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | 领券:
9 | {{item}}
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | 领优惠券
23 |
24 |
25 |
26 |
27 |
28 |
29 | 可领优惠券
30 |
31 |
32 |
33 |
34 |
35 | 已领优惠券
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/templates/coupon/item/coupon-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | ¥
9 | {{price}}
10 |
11 | 满{{limitPrice}}元可用
12 |
13 |
14 |
15 |
16 |
17 |
18 | 现金
19 | {{name}}
20 |
21 | {{beginTime}}-{{dueTime}}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 使用时间:{{usedTime}}
30 | 领取时间:{{acceptTime}}
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/pages/coupon/index/index.js:
--------------------------------------------------------------------------------
1 | import CouponService from "../../../class/service/CouponService";
2 | import Tips from "../../../class/utils/Tips";
3 |
4 | const Tab = require('../../../templates/tab/index');
5 | const couponService = new CouponService();
6 |
7 | Page(Object.assign({}, Tab, {
8 | page: {},
9 | data: {
10 | tab: {
11 | list: [{
12 | id: 'NEVER_USED',
13 | title: '未使用'
14 | }, {
15 | id: 'USED',
16 | title: '使用记录'
17 | }, {
18 | id: 'EXPIRED',
19 | title: '已过期'
20 | }],
21 | selectedId: 'NEVER_USED',
22 | scroll: false
23 | },
24 | coupons: [],
25 | init: false
26 | },
27 |
28 | onLoad: function (options) {
29 | this.page = couponService.page();
30 | this.loadNextPage();
31 | },
32 |
33 | /**
34 | * 重新加载
35 | */
36 | reload: function () {
37 | this.page.reset();
38 | this.loadNextPage();
39 | wx.stopPullDownRefresh();
40 | },
41 |
42 | /**
43 | * 加载下一页
44 | */
45 | loadNextPage: function () {
46 | Tips.loading();
47 | const param = {
48 | status: this.data.tab.selectedId
49 | };
50 | this.page.next(param).then(data => {
51 | this.setData({
52 | coupons: data.list,
53 | init: true
54 | });
55 | Tips.loaded();
56 | });
57 | },
58 |
59 | /**
60 | * 下拉刷新
61 | */
62 | onPullDownRefresh: function () {
63 | this.reload();
64 | },
65 |
66 | /**
67 | * 上划加载
68 | */
69 | onReachBottom: function (event) {
70 | this.loadNextPage();
71 | },
72 |
73 |
74 | /**
75 | * 处理点击事件
76 | */
77 | handleZanTabChange(e) {
78 | var componentId = e.componentId;
79 | var selectedId = e.selectedId;
80 |
81 | this.setData({
82 | [`${componentId}.selectedId`]: selectedId
83 | });
84 | this.reload();
85 | },
86 |
87 | /**
88 | * 长按删除卡券
89 | */
90 | onCouponDelete: function (event) {
91 | const acceptId = event.currentTarget.dataset.couponId;
92 | Tips.confirm('是否删除该卡券?')
93 | .then(() => couponService.remove(acceptId))
94 | .then(() => Tips.toast('删除成功', () => this.reload()));
95 | }
96 | }))
--------------------------------------------------------------------------------
/class/service/CartService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | import Pagination from "../entity/Page";
3 |
4 | /**
5 | * 购物车服务类
6 | */
7 | export default class CartService extends BaseService {
8 |
9 | constructor() {
10 | super();
11 | }
12 |
13 | /**
14 | * 返回分页对象
15 | */
16 | page() {
17 | const url = `${this.baseUrl}/carts`;
18 | return new Pagination(url, this._processCartData);
19 | }
20 |
21 |
22 | /**
23 | * 购物车总数
24 | */
25 | count(){
26 | const url = `${this.baseUrl}/carts/count`;
27 | return this.get(url).then(data => data.count);
28 | }
29 |
30 |
31 | /**
32 | * 将商品加入购物车中
33 | */
34 | add(goodsId, num = 1, sku) {
35 | const url = `${this.baseUrl}/carts`;
36 | const param = {
37 | goodsId: goodsId,
38 | goodsSku: sku,
39 | goodsNum: num
40 | };
41 | return this.post(url, param);
42 | }
43 |
44 | /**
45 | * 删除购物车中的商品
46 | */
47 | remove(cartId) {
48 | const url = `${this.baseUrl}/carts/${cartId}`;
49 | return this.delete(url);
50 | }
51 |
52 | /**
53 | * 批量删除购物车商品
54 | */
55 | removeBatch(carts){
56 | const url = `${this.baseUrl}/carts/batch`;
57 | const param = carts.map(cart => {
58 | return {cartId: cart.cartId}
59 | });
60 | return this.delete(url, param);
61 | }
62 |
63 | /**
64 | * 更新购物车中的商品数量
65 | */
66 | update(cartId, num) {
67 | const url = `${this.baseUrl}/carts/${cartId}`;
68 | const param = {
69 | goodsNum: num
70 | };
71 | return this.put(url, param);
72 | }
73 |
74 | /**
75 | * 处理购物车数据
76 | */
77 | _processCartData(cart){
78 | cart.check = true;
79 | cart.goodsPrice = cart.goodsPrice.toFixed(2);
80 | if(cart.goodsSku){
81 | cart.skuText = cart.goodsSku.replace(/:/g, ',');
82 | }
83 | if(cart.goodsNum > cart.stock){
84 | cart.goodsNum = cart.stock;
85 | }
86 | cart.goodsImage += '/small';
87 | }
88 |
89 | }
--------------------------------------------------------------------------------
/pages/goods/score/list.js:
--------------------------------------------------------------------------------
1 | import Tips from "../../../class/utils/Tips";
2 | import Router from "../../../class/utils/Router";
3 | import OrderService from "../../../class/service/OrderService";
4 |
5 | const app = getApp();
6 | const Tab = require('../../../templates/tab/index');
7 | const orderService = new OrderService();
8 |
9 | Page(Object.assign({}, Tab, {
10 | page: {},
11 | data: {
12 | comments: [],
13 | init: false
14 | },
15 | onLoad: function ({goodsId}) {
16 | this.data.goodsId = goodsId;
17 | Tips.loading();
18 | //初始化分页参数
19 | this.page = orderService.commentList();
20 | orderService.commentCount(this.data.goodsId).then(res => {
21 | this.setData(
22 | {
23 | "tab": {
24 | "list": [
25 | { "id": "GOOD", "title": `满意(${res.GOOD})` },
26 | { "id": "NORMAL", "title": `一般(${res.NORMAL})` },
27 | { "id": "BAD", "title": `不满意(${res.BAD})` }
28 | ],
29 | "selectedId": "GOOD",
30 | "scroll": false
31 | },
32 | }
33 | );
34 | }).then(() => {
35 | this.loadNextPage();
36 | });
37 | },
38 |
39 | reload: function () {
40 | this.page.reset();
41 | this.loadNextPage();
42 | wx.stopPullDownRefresh();
43 | },
44 |
45 | /**
46 | * 加载下一页
47 | */
48 | loadNextPage: function () {
49 | const param = {
50 | status: this.data.tab.selectedId,
51 | goods_id: this.data.goodsId
52 | };
53 | this.page.next(param).then(data => {
54 | this.setData({
55 | comments: data.list,
56 | init: true
57 | });
58 | Tips.loaded();
59 | });
60 | },
61 |
62 | /**
63 | * 下拉刷新
64 | */
65 | onPullDownRefresh: function () {
66 | this.reload();
67 | },
68 |
69 | /**
70 | * 上划加载
71 | */
72 | onReachBottom: function (event) {
73 | this.loadNextPage();
74 | },
75 | /**
76 | * 处理点击事件
77 | */
78 | handleZanTabChange(e) {
79 | var componentId = e.componentId;
80 | var selectedId = e.selectedId;
81 |
82 | this.setData({
83 | [`${componentId}.selectedId`]: selectedId
84 | });
85 | this.reload();
86 | },
87 | }));
--------------------------------------------------------------------------------
/pages/refund/apply/apply.js:
--------------------------------------------------------------------------------
1 | import OrderService from "../../../class/service/OrderService";
2 | import Router from "../../../class/utils/Router";
3 | import Tips from "../../../class/utils/Tips";
4 |
5 | const orderService = new OrderService();
6 | const TopTips = require('../../../templates/toptips/index');
7 |
8 | Page(Object.assign({}, TopTips, {
9 |
10 | data: {
11 | refund: {},
12 | reason: ['重复下单/误下单', '操作有误', '其他渠道价格更低', '不想买了', '其他原因']
13 | },
14 |
15 | onLoad: function (options) {
16 | const refund = JSON.parse(options.refund);
17 | this.setData({ refund: refund });
18 | },
19 |
20 |
21 | /**
22 | * 修改输入框
23 | */
24 | onInputChange: function (e) {
25 | console.info(e);
26 | const refund = this.data.refund;
27 | refund[e.currentTarget.id] = e.detail.value
28 | this.setData(refund);
29 | },
30 | /**
31 | * 修改原因
32 | */
33 | onReasonChange: function (e) {
34 | console.info(e);
35 | const refund = this.data.refund;
36 | const reasonIndex = e.detail.value;
37 | refund['cause'] = this.data.reason[reasonIndex];
38 | this.setData({
39 | refund: refund,
40 | reasonIndex: reasonIndex
41 | });
42 | },
43 |
44 | /**
45 | * 提交申请
46 | */
47 | onSubmitTap: function (event) {
48 | //校验
49 | let errorMsg = '';
50 | if (this.isEmpty(this.data.refund.cause)) {
51 | errorMsg = '请填写退款原因';
52 | }
53 | else if (this.isEmpty(this.data.refund.contactName)) {
54 | errorMsg = '请填联系人';
55 | }
56 | else if (this.isEmpty(this.data.refund.contactPhone)) {
57 | errorMsg = '请填联系方式';
58 | }
59 | if(!this.isEmpty(errorMsg)){
60 | this.showZanTopTips(errorMsg);
61 | return;
62 | }
63 |
64 | //发起退款
65 | const refund = this.data.refund;
66 | const orderId = refund.orderId;
67 | Tips.confirm('您确认要申请退款吗?').then(() => {
68 | Tips.loading('退款申请中');
69 | return orderService.refundOrder(orderId, refund);
70 | }).then(data => {
71 | Tips.toast('退款申请成功', () => Router.orderIndexRefresh());
72 | });
73 | },
74 |
75 | /**
76 | * 工具方法,校验
77 | */
78 | isEmpty: function (str) {
79 | return str == null || str == '';
80 | }
81 | }))
--------------------------------------------------------------------------------
/templates/steps/wxss/vstep.wxss:
--------------------------------------------------------------------------------
1 | .zan-steps--vsteps {
2 | color: #999;
3 | font-size: 14px;
4 | }
5 |
6 | .zan-steps--vsteps .zan-steps__step {
7 | position: relative;
8 | padding: 10rpx 0;
9 | }
10 |
11 | .zan-steps--vsteps .zan-steps__step--done {
12 | color: #44BB00;
13 | }
14 |
15 | .zan-steps--vsteps .zan-steps__line {
16 | position: absolute;
17 | top: 0;
18 | bottom: 0;
19 | left: 7px;
20 | width: 1px;
21 | background-color: #e5e5e5;
22 | }
23 |
24 | .zan-steps--vsteps .zan-steps__title {
25 | display: inline-block;
26 | line-height: 20px;
27 | padding-left: 27px;
28 | }
29 |
30 | .zan-steps--vsteps .zan-steps__title--desc {
31 | padding-left: 3px;
32 | }
33 |
34 | .zan-steps--vsteps .zan-steps__title--timesteap {
35 | display: block;
36 | font-size: 24rpx;
37 | }
38 |
39 | .zan-steps--vsteps .zan-steps__icons {
40 | position: absolute;
41 | left: 7px;
42 | top: 50%;
43 | transform: translate(-50%, -50%);
44 | z-index: 2;
45 | padding: 3px 0;
46 | background-color: #fff;
47 | }
48 |
49 | .zan-steps--vsteps .zan-steps__circle {
50 | width: 5px;
51 | height: 5px;
52 | background-color: #cacaca;
53 | border-radius: 10px;
54 | }
55 |
56 | .zan-steps--vsteps .zan-steps__step--done .zan-steps__circle {
57 | width: 5px;
58 | height: 5px;
59 | background-color: #09bb07;
60 | }
61 |
62 | .zan-steps--vsteps .zan-steps__step--cur .zan-steps__circle {
63 | width: 13px;
64 | height: 13px;
65 | background: transparent url("https://b.yzcdn.cn/v2/image/wap/success_small@2x.png");
66 | background-size: 13px 13px;
67 | border-radius:0;
68 | }
69 |
70 | .zan-steps--vsteps .zan-steps__icon--active {
71 | width: 13px;
72 | height: 13px;
73 | }
74 |
75 | .zan-steps--vsteps .zan-steps__step--first-child .zan-steps__title::before {
76 | content: '';
77 | position: absolute;
78 | top: 0;
79 | bottom: 50%;
80 | left: 7px;
81 | width: 1px;
82 | background-color: #fff;
83 | z-index: 1;
84 | }
85 |
86 | .zan-steps--vsteps .zan-steps__step--last-child .zan-steps__title::after {
87 | content: '';
88 | position: absolute;
89 | top: 50%;
90 | bottom: 0%;
91 | left: 7px;
92 | width: 1px;
93 | background-color: #fff;
94 | z-index: 1;
95 | }
96 |
--------------------------------------------------------------------------------
/pages/refund/apply/apply.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 订单号:
10 | {{refund.uuid}}
11 |
12 |
13 | 退款金额:
14 | ¥{{refund.price}}
15 |
16 |
17 |
18 |
19 |
20 |
21 | 退款原因:
22 |
23 |
24 | {{ reason[reasonIndex] ? reason[reasonIndex] : '请选择退款原因' }}
25 |
26 |
27 |
28 |
29 | 联系人:
30 |
32 |
33 |
34 | 联系方式:
35 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 取消
44 |
45 |
46 |
47 | 提交申请
48 |
49 |
50 |
51 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/class/service/FavoriteService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | import Pagination from "../entity/Page";
3 |
4 | /**
5 | * 收藏信息服务类
6 | */
7 | export default class FavoriteService extends BaseService {
8 |
9 | constructor() {
10 | super();
11 | }
12 |
13 | /**
14 | * 返回分页对象
15 | */
16 | page() {
17 | const url = `${this.baseUrl}/favorite_goods`;
18 | return new Pagination(url, this._processFavGoods.bind(this));
19 | }
20 |
21 |
22 | /**
23 | * 判断是否为收藏商品
24 | */
25 | is(goodsId) {
26 | const url = `${this.baseUrl}/favorite_goods/check`;
27 | const param = {goodsId : goodsId};
28 | return this.get(url, param);
29 | }
30 |
31 | /**
32 | * 增加收藏
33 | */
34 | add(goodsId) {
35 | const url = `${this.baseUrl}/favorite_goods`;
36 | const param = { goodsId: goodsId }
37 | return this.post(url, param);
38 | }
39 |
40 | /**
41 | * 增加收藏
42 | */
43 | addBatch(goodsIdList) {
44 | const url = `${this.baseUrl}/favorite_goods/batch`;
45 | return this.post(url, goodsIdList);
46 | }
47 |
48 | /**
49 | * 移除收藏
50 | */
51 | remove(goodsId) {
52 | const url = `${this.baseUrl}/favorite_goods`;
53 | const param = { goodsId: goodsId }
54 | return this.delete(url, param);
55 | }
56 |
57 | /**
58 | * 数据处理
59 | */
60 | _processFavGoods(data) {
61 | if(data.goods == null){
62 | return;
63 | }
64 | return {
65 | goodsId: data.goodsId,
66 | goodsName: data.goods.name,
67 | goodsPrice: data.goods.sellPrice.toFixed(2),
68 | imageUrl: this._processGoodsPreview(data.goods.images)
69 | };
70 | }
71 |
72 | /**
73 | * 处理预览图
74 | */
75 | _processGoodsPreview(images) {
76 | //图片处理
77 | if (images == null || images.length < 1) {
78 | return "/images/goods/broken.png";
79 | }
80 | else if (images[0].url == null) {
81 | return "/images/goods/broken.png";
82 | }
83 | else {
84 | return images[0].url + '/small';
85 | }
86 | }
87 | }
88 |
89 |
--------------------------------------------------------------------------------
/class/entity/Page.js:
--------------------------------------------------------------------------------
1 | import Http from '../utils/Http';
2 |
3 | export default class Pagination {
4 |
5 | constructor(url, processFunc) {
6 | //数据访问地址
7 | this.url = url;
8 | //数据集合
9 | this.list = [];
10 | //起始数据
11 | this.start = 0;
12 | //加载数据条数
13 | this.count = 10;
14 | //数据处理函数
15 | this.processFunc = processFunc;
16 | //正在加载中
17 | this.loading = false;
18 | //参数
19 | this.params = [];
20 | //是否底部
21 | this.reachBottom = false;
22 | }
23 |
24 | /**
25 | * 加载下一页数据
26 | */
27 | next(args) {
28 | const param = {
29 | from: this.start,
30 | limit: this.count
31 | };
32 | //附加参数
33 | this.loading = true;
34 | Object.assign(param, args);
35 | return Http.get(this.url, param).then(data => {
36 | //底部判断
37 | if (data == null || data.length < 1) {
38 | this.reachBottom = true;
39 | return this._export();
40 | }
41 |
42 | //处理数据
43 | this._processData(data);
44 |
45 | //设置数据
46 | this.list = this.list.concat(data);
47 | this.start += this.count;
48 | //加载完毕
49 | this.loading = false;
50 | if (data.length < this.count) {
51 | this.reachBottom = true;
52 | }
53 | //导出列表数据
54 | return this._export();
55 | });
56 | }
57 |
58 |
59 | /**
60 | * 恢复到第一页
61 | */
62 | reset() {
63 | this.start = 0;
64 | this.list = [];
65 | }
66 |
67 | /**
68 | * 处理数据(私有)
69 | */
70 | _processData(data) {
71 | if (this.processFunc) {
72 | for (let i in data) {
73 | const result = this.processFunc(data[i]);
74 | if (result) {
75 | data[i] = result;
76 | }
77 | }
78 | }
79 | }
80 |
81 | /**
82 | * 导出数据(私有)
83 | */
84 | _export() {
85 | return {
86 | list: this.list,
87 | start: this.start,
88 | count: this.count
89 | }
90 | }
91 | }
--------------------------------------------------------------------------------
/templates/coupon/shelf-panel/coupon-panel-template.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/coupon/pick-item/coupon-item-template.wxss";
2 |
3 | .coupon-preview-container{
4 | display: inline-flex;
5 | flex-direction: row;
6 | overflow: hidden;
7 | align-items: center;
8 | }
9 |
10 | .coupon-preview{
11 | height: 35rpx;
12 | /*background-color: #1296db;*/
13 | border: 1px solid #1296db;
14 | color: #1296db;
15 | font-size: 26rpx;
16 | line-height: 35rpx;
17 | padding:5rpx 10rpx;
18 | margin-right: 10rpx;
19 | border-radius: 5px;
20 | }
21 |
22 |
23 | /*面板遮罩*/
24 | .coupon-panel-cover{
25 | width: 100%;
26 | height: 100%;
27 | position: fixed;
28 | top: 0;
29 | background-color: black;
30 | -webkit-filter:opacity(.6);
31 | z-index: 100;
32 | }
33 |
34 |
35 | .coupon-panel-container{
36 | position: fixed;
37 | display: flex;
38 | flex-direction: column;
39 | background: #F8F8F8;
40 | bottom: 0px;
41 | width: 100%;
42 | z-index: 1000;
43 | transform: translateY(150%);
44 | transition: all 0.4s ease;
45 | z-index: 1000;
46 | padding-bottom: 20rpx;
47 | }
48 |
49 | /*标题*/
50 | .coupon-panel-title{
51 | font-size: 30rpx;
52 | color: #A7A7A7;
53 | }
54 |
55 | /*标题容器*/
56 | .coupon-panel-title-container{
57 | text-align: center;
58 | padding: 30rpx 0 10rpx 0;
59 | }
60 |
61 | /*列表标题*/
62 | .coupon-pick-title{
63 | font-size: 30rpx;
64 | color: #000311;
65 | margin-left: 20rpx;
66 | margin-top: 20rpx;
67 | }
68 |
69 | .coupon-panel-show{
70 | transform: translateY(0);
71 | }
72 |
73 | /*领券列表容器*/
74 | .coupon-list-container{
75 | max-height:750rpx;
76 | }
77 |
78 | /*卡券列表*/
79 | .coupon-pick-list{
80 | display: flex;
81 | flex-direction: column;
82 | }
83 |
84 | /*领取卡券*/
85 | .coupon-time-pick-container{
86 | display: flex;
87 | flex-direction: row;
88 | justify-content: space-between;
89 | align-items: center;
90 | }
91 |
92 | /*关闭*/
93 | .coupon-panel-close-container{
94 |
95 | width: 100rpx;
96 | float: right;
97 | }
98 |
99 | .coupon-panel-close-icon{
100 | height: 45rpx;
101 | width: 45rpx;
102 | }
103 |
--------------------------------------------------------------------------------
/templates/shop/item/shop-item-template.wxss:
--------------------------------------------------------------------------------
1 | .shop-item-container{
2 | display: flex;
3 | flex-direction: row;
4 | justify-content: space-between;
5 | align-items: center;
6 | background-color: #1296db;
7 | padding-top: 15px;
8 | padding-bottom: 15px;
9 | height: 90px;
10 | padding-left: 20px;
11 | padding-right: 10px;
12 | }
13 |
14 | .shop-item-image{
15 | width: 150rpx;
16 | height: 150rpx;
17 | border-radius: 50%;
18 | background-color: #FFF;
19 | border: 2px solid #FFF;
20 | box-shadow: 0 0 5px gray;
21 | }
22 |
23 | .shop-more-image{
24 | width: 60rpx;
25 | height: 60rpx;
26 | }
27 |
28 | .shop-synopsis-container{
29 | display: flex;
30 | flex: 1;
31 | flex-direction: column;
32 | margin-left: 40rpx;
33 | }
34 |
35 | .shop-item-title{
36 | font-size: 36rpx;
37 | letter-spacing: 2px;
38 | font-weight: bold;
39 | color: #FFF;
40 | }
41 |
42 | .shop-item-describe{
43 | margin-top: 20rpx;
44 | color: #FFF;
45 | }
46 |
47 | .shop-item-notice{
48 | margin-top: 20rpx;
49 | color: #FFF;
50 | }
51 | .shop-item-notice text{
52 | color: #FFF;
53 | font-size: 24rpx;
54 | }
55 |
56 | /*背景*/
57 | .shop-background-image{
58 | position: absolute;
59 | width: 750rpx;
60 | height: 230rpx;
61 | z-index: -1;
62 | -webkit-filter:blur(30px) brightness(.6);
63 | }
64 |
65 | .shop-background-container{
66 | position: absolute;
67 | height: 230rpx;
68 | width: 100%;
69 | overflow: hidden;
70 | top:0;
71 | left: 0;
72 | }
73 |
74 | .shop-item-notice{
75 | display: flex;
76 | flex-direction: row;
77 | align-items: center;
78 | }
79 | .notice-swiper{
80 | width: 170px;
81 | height: 20px;
82 | }
83 | .notiec-title{
84 | display: flex;
85 | flex-direction: column;
86 | justify-content: flex-end;
87 | height: 20px;
88 | }
89 |
90 | .notice-swiper swiper-item{
91 | width: 100%;
92 | height: 20px;
93 | }
94 |
95 | .close-tips{
96 | display: flex;
97 | flex-direction: row;
98 | align-items: center;
99 | height: 50rpx;
100 | border-bottom: 1px dotted #EFF0F2;
101 | border-top: 1px dotted #EFF0F2;
102 | padding-left: 20rpx;
103 | }
104 |
--------------------------------------------------------------------------------
/templates/coupon/pick-item/coupon-item-template.wxss:
--------------------------------------------------------------------------------
1 | /*父容器*/
2 | .coupon-item-container{
3 | position: relative;
4 | display: flex;
5 | flex-direction: row;
6 | align-items: flex-start;
7 | margin:20rpx 20rpx 0 20rpx;
8 | background-color: #FFF;
9 | height: 200rpx;
10 | border: 1px solid #E7E7E7;
11 | border-radius: 5px;
12 | overflow: hidden;
13 | }
14 | /*左侧容器*/
15 | .coupon-main-container{
16 | display: flex;
17 | flex-direction: column;
18 | align-items: center;
19 | justify-content: center;
20 | width: 255rpx;
21 | height: 100%;
22 | background: linear-gradient(to right, #2F80ED, #1296db);
23 | }
24 |
25 | /*单位*/
26 | .coupon-value-unit{
27 | color: #FFF;
28 | font-size: 30rpx;
29 | }
30 |
31 | /*金额*/
32 | .coupon-value-text{
33 | color:#FFF;
34 | font-size: 75rpx;
35 | }
36 |
37 | /*限制条件*/
38 | .coupon-limit-text{
39 | color: #FFF;
40 | font-size: 28rpx;
41 | margin-top: 10rpx;
42 | }
43 |
44 | /*右侧容器*/
45 | .coupon-info-container{
46 | flex: 1;
47 | padding: 32rpx 20rpx 32rpx 20rpx;
48 | height: 135rpx;
49 | display: flex;
50 | flex-direction: column;
51 | justify-content: space-between;
52 |
53 | }
54 | /*标题容器*/
55 |
56 | /*标题*/
57 | .coupon-title-text{
58 | color: #000311;
59 | z-index: 100;
60 | font-size: 26rpx;
61 | }
62 | /*时间限制*/
63 | .coupon-time-text{
64 | color: #9e9e9e;
65 | font-size: 24rpx;
66 | }
67 | /*分隔符*/
68 | .coupon-desc-gap{
69 | margin-top: 5rpx;
70 | border-top: 1px dotted #EFF0F2;
71 | }
72 | /*详情栏*/
73 | .coupon-detial-container{
74 | display: flex;
75 | justify-content: space-between;
76 | align-items: center;
77 | flex-direction: row;
78 | height: 50rpx;
79 | }
80 | .coupon-detial-text{
81 | font-size: 24rpx;
82 | }
83 | .coupon-detial-icon{
84 | width: 26rpx;
85 | height: 26rpx;
86 | }
87 |
88 |
89 |
90 | /*领取*/
91 | .coupon-item-pick{
92 | border: 1px solid #1296db;
93 | border-radius: 10px;
94 | color: #1296db;
95 | font-size: 26rpx;
96 | display: inline-block;
97 | padding: 10rpx;
98 | }
99 |
100 | .coupon-picked-icon{
101 | position: absolute;
102 | right: 0;
103 | top: -10px;
104 | height: 128rpx;
105 | width: 128rpx;
106 | z-index: 10;
107 | }
--------------------------------------------------------------------------------
/class/service/AddressService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | import Pagination from "../entity/Page";
3 |
4 | /**
5 | * 购物车服务类
6 | */
7 | export default class AddressService extends BaseService {
8 | constructor() {
9 | super();
10 | }
11 |
12 | /**
13 | * 返回分页对象
14 | */
15 | page() {
16 | const url = `${this.baseUrl}/addresses`;
17 | return new Pagination(url, this._processAddress.bind(this));
18 | }
19 |
20 | /**
21 | * 新增地址
22 | */
23 | save(address) {
24 | const url = `${this.baseUrl}/addresses`;
25 | return this.post(url, address);
26 | }
27 |
28 | /**
29 | * 更新地址对象
30 | */
31 | update(addrId, address) {
32 | const url = `${this.baseUrl}/addresses/${addrId}`;
33 | return this.put(url, address);
34 | }
35 |
36 | /**
37 | * 设置默认
38 | */
39 | setDefault(id) {
40 | const url = `${this.baseUrl}/addresses/${id}/default`;
41 | return this.put(url);
42 | }
43 |
44 | /**
45 | * 获取默认
46 | */
47 | getDefault() {
48 | const url = `${this.baseUrl}/addresses/default`;
49 | return this.get(url).then(data => data != '' ? data : this.getFirstAddress());
50 | }
51 |
52 | /**
53 | * 获取第一个地址
54 | */
55 | getFirstAddress() {
56 | const url = `${this.baseUrl}/addresses`;
57 | return this.get(url).then(data => data.length > 0 ? data[0] : Promise.reject('NO_ADDRESS'));
58 | }
59 |
60 | /**
61 | * 删除地址对象
62 | */
63 | remove(id) {
64 | const url = `${this.baseUrl}/addresses/${id}`;
65 | return this.delete(url);
66 | }
67 |
68 | /**
69 | * 选择微信地址
70 | */
71 | wxAddress() {
72 | return new Promise((resolve, reject) => {
73 | wx.chooseAddress({
74 | success: data => {
75 | resolve({
76 | name: data.userName,
77 | phone: data.telNumber,
78 | province: data.provinceName,
79 | city: data.cityName,
80 | country: data.countyName,
81 | detail: data.detailInfo,
82 | isDefault: 0
83 | });
84 | },
85 | fail: reject
86 | });
87 | });
88 | }
89 |
90 | /**
91 | * 处理地址数据
92 | */
93 | _processAddress(data) {
94 | return data.data;
95 | }
96 | }
--------------------------------------------------------------------------------
/pages/order/trade/trade.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/address/item/address-item-template.wxss";
2 | @import "/templates/trade/item/order-item-template.wxss";
3 |
4 | page{
5 | height: 100%;
6 | background-color: #F4F4F4;
7 | }
8 |
9 | .container{
10 | display: flex;
11 | flex-direction: column;
12 | padding-bottom: 150rpx;
13 | }
14 |
15 | /*收货地址间隔*/
16 | .address-hr{
17 | width: 100%;
18 | height: 5px;
19 | margin-bottom: 15rpx;
20 | }
21 |
22 | /*订单详情面板*/
23 | .zan-panel__top{
24 | border-top: none;
25 | margin-top: 0;
26 | }
27 |
28 | /*订单小计*/
29 | .tarde-summary-container{
30 | display: flex;
31 | flex-direction: row;
32 | justify-content: flex-end;
33 | }
34 | .tarde-summary-text{
35 | color:#000311;
36 | margin-left: 20rpx;
37 | font-size: 28rpx;
38 | }
39 | .tarde-summary-price{
40 | color:#ff6200;
41 | font-size: 28rpx;
42 | }
43 |
44 | /*买家留言*/
45 | .trade-note-container{
46 | background-color: #FFF;
47 | display: flex;
48 | padding:0 10rpx 20rpx 10rpx;
49 | flex-direction: column;
50 | }
51 | .text-bar{
52 | height: 60rpx;
53 | }
54 |
55 | .text-major{
56 | line-height: 60rpx;
57 | }
58 |
59 |
60 | /*汇总栏*/
61 | .summary-container{
62 | padding: 10px 15px;
63 | }
64 | .summary-container text{
65 | font-size: 30rpx;
66 | color: #303030;
67 | }
68 | .summary-container .summary-text{
69 | color: #FF6600;
70 | }
71 | .summary-line-container{
72 | display: flex;
73 | flex-direction: row;
74 | justify-content: space-between;
75 | padding:5rpx 0;
76 | }
77 |
78 | /*购买栏*/
79 | .tarde-action-bar{
80 | position: fixed;
81 | z-index: 10000;
82 | bottom: 0px;
83 | display: flex;
84 | flex-direction: row;
85 | justify-content: flex-end;
86 | align-items: center;
87 | height: 100rpx;
88 | width: 100%;
89 | background-color: #FAFAFA;
90 | border-top: 1px solid #DCDCDC;
91 |
92 | }
93 | .trade-confirm-button{
94 | height: 100%;
95 | width: 240rpx;
96 | line-height: 100rpx;
97 | text-align: center;
98 | background-color: #1296db;
99 | color: #FFF;
100 | }
101 | .trade-confirm-disable{
102 | background-color: #B0B0B0;
103 | }
104 | .trade-confirm-button text{
105 | color: #FFF;
106 | font-size: 34rpx;
107 | }
108 | .tarde-total-text{
109 | font-size: 34rpx;
110 | color: #000311;
111 | }
112 | .tarde-total-price{
113 | color:#ff6200;
114 | font-size: 34rpx;
115 | font-weight: bold;
116 | margin-right: 20rpx;
117 | }
118 |
--------------------------------------------------------------------------------
/pages/cart/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
19 |
20 |
21 |
22 |
23 | 购物车是空的
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 | 全选
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | 总计:
52 | ¥{{cart.price}}
53 |
54 | 不含运费,已优惠¥0.00
55 |
56 |
57 |
58 | 去结算
59 | 未营业
60 | ¥{{cart.limitPrice}} 起送
61 | ({{cart.num}})
62 |
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/templates/coupon/item/coupon-item-template.wxss:
--------------------------------------------------------------------------------
1 | /*父容器*/
2 | .coupon-item-container{
3 | position: relative;
4 | display: flex;
5 | flex-direction: row;
6 | align-items: center;
7 | margin:20rpx 20rpx 0 20rpx;
8 | background-color: #FFF;
9 | height: 220rpx;
10 | border: 1px solid #E7E7E7;
11 | border-radius: 5px;
12 | overflow: hidden;
13 | }
14 | /*左侧容器*/
15 | .coupon-main-container{
16 | display: flex;
17 | flex-direction: column;
18 | align-items: center;
19 | justify-content: center;
20 | width: 255rpx;
21 | height: 100%;
22 | background: linear-gradient(to right, #2F80ED, #1296db);
23 | }
24 |
25 | /*单位*/
26 | .coupon-value-unit{
27 | color: #FFF;
28 | font-size: 30rpx;
29 | }
30 |
31 | /*金额*/
32 | .coupon-value-text{
33 | color:#FFF;
34 | font-size: 75rpx;
35 | }
36 |
37 | /*限制条件*/
38 | .coupon-limit-text{
39 | color: #FFF;
40 | font-size: 28rpx;
41 | margin-top: 10rpx;
42 | }
43 |
44 | /*右侧容器*/
45 | .coupon-info-container{
46 | flex: 1;
47 | padding: 10rpx 20rpx 0 20rpx;
48 | display: flex;
49 | height: 200rpx;
50 | flex-direction: column;
51 | justify-content: space-between;
52 |
53 | }
54 | /*标题容器*/
55 |
56 | /*标题*/
57 | .coupon-title-text{
58 | color: #000311;
59 | font-size: 26rpx;
60 | }
61 | /*时间限制*/
62 | .coupon-time-text{
63 | color: #9e9e9e;
64 | font-size: 24rpx;
65 | }
66 | /*分隔符*/
67 | .coupon-desc-gap{
68 | margin-top: 5rpx;
69 | border-top: 1px dotted #EFF0F2;
70 | }
71 | /*详情栏*/
72 | .coupon-detial-container{
73 | display: flex;
74 | justify-content: space-between;
75 | align-items: center;
76 | flex-direction: row;
77 | height: 50rpx;
78 | }
79 | .coupon-detial-text{
80 | font-size: 24rpx;
81 | }
82 | .coupon-detial-icon{
83 | width: 26rpx;
84 | height: 26rpx;
85 | }
86 |
87 | /*新卷角落*/
88 | .coupon-new-icon{
89 | height: 75rpx;
90 | width: 75rpx;
91 | position: absolute;
92 | top: 0;
93 | right: 0;
94 | }
95 |
96 | /*已使用/已过期情况调整*/
97 | .coupon-item-disable{
98 | overflow: hidden;
99 | }
100 | .coupon-item-disable .coupon-main-container{
101 | background: #C2C2C2;
102 | }
103 | .coupon-item-disable .coupon-main-container text{
104 | color: #FFF;
105 | }
106 | .coupon-item-disable .zan-label--primary{
107 | background: #C2C2C2;
108 | color: #FFF;
109 | border-color: #C2C2C2;
110 | }
111 | .coupon-item-disable .coupon-title-text{
112 | color: #A7A7A7;
113 | }
114 | .coupon-used-icon{
115 | height: 64px;
116 | width: 64px;
117 | position: absolute;
118 | top: 2px;
119 | right: -8px;
120 | }
121 |
122 | .coupon-item-disable .coupon-detial-text{
123 | color: #A7A7A7;
124 | }
--------------------------------------------------------------------------------
/templates/order/list-item/order-item-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | 取消订单
39 | 确认付款
40 |
41 |
42 |
43 |
44 | 取消订单
45 |
46 |
47 |
48 |
49 |
50 | 确认收货
51 |
52 |
53 |
54 |
55 | 评价订单
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/templates/goods/buy-panel/goods-buy-panel-template.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{name}}
17 | ¥{{sku.isReady ? sku.detail.price: priceLable}}
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{label.key}}:
31 |
32 |
33 |
34 | {{skuValue}}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 购买数量:
44 | {{sku.stockText}}
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 | 下一步
55 |
56 |
57 | 确定
58 |
59 |
60 |
61 |
62 | 未营业
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/pages/customer/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{userInfo.nickName}}
9 |
10 |
11 |
12 |
13 |
14 |
15 | 收货地址
16 |
17 |
18 |
19 |
20 |
21 |
22 | 我的收藏
23 |
24 |
25 |
26 |
27 |
28 |
29 | 浏览历史
30 |
31 |
32 |
33 |
34 |
35 |
36 | 优惠券
37 |
38 |
39 |
40 |
41 |
42 |
43 | 会员卡
44 |
45 |
46 |
47 |
48 |
49 |
66 |
67 |
73 |
74 |
75 |
76 |
77 |
--------------------------------------------------------------------------------
/class/service/ShopService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | const app = getApp();
3 |
4 | /**
5 | * 店铺服务类
6 | */
7 | export default class ShopService extends BaseService {
8 |
9 | constructor() {
10 | super();
11 | }
12 |
13 | /**
14 | * 访问店铺
15 | */
16 | visit() {
17 | const url = `${this.baseUrl}/visit_shops`;
18 | wx.getSystemInfo({
19 | success: (res) => {
20 | this.post(url, res).then(_ => { });
21 | }
22 | });
23 | }
24 |
25 |
26 |
27 | /**
28 | * 获取店铺详情
29 | */
30 | getInfo() {
31 | const cacheShop = this.app.globalData.shop.info;
32 | if (cacheShop) {
33 | return new Promise(resolve => resolve(cacheShop));
34 | }
35 | else {
36 | const url = `${this.baseUrl}/shops`;
37 | return this.get(url, {}).then(shop => {
38 | shop = this._processShopInfo(shop);
39 | this.app.globalData.shop.info = shop;
40 | return shop;
41 | });
42 | }
43 |
44 | }
45 |
46 | status() {
47 | const url = `${this.baseUrl}/shops/status`;
48 | return this.get(url).then(data => {
49 | if (data.status == 'CLOSE') {
50 | data.closeTips = '店铺已休息,请稍后再来';
51 | } else if (data.status == 'NORMAL' && !data.status.open) {
52 | data.closeTips = `店铺已休息,营业时间:${data.beginTime} - ${data.endTime}`;
53 | }
54 | return data;
55 | });
56 | }
57 |
58 | /**
59 | * 店铺限价
60 | */
61 | limitPrice() {
62 | const url = `${this.baseUrl}/delivery/limit_price`;
63 | return this.get(url).then(data => {
64 | const arr = [];
65 | if (data.SELF != null) {
66 | arr.push(data.SELF);
67 | }
68 | if (data.CITY != null) {
69 | arr.push(data.CITY);
70 | }
71 | if (data.EXPRESS != null) {
72 | arr.push(data.EXPRESS);
73 | }
74 | let limitPrice = Math.min(...arr);
75 | if (!limitPrice || Number.isNaN(limitPrice)) {
76 | limitPrice = 0;
77 | }
78 | app.globalData.shop.limitPrice = limitPrice;
79 | return limitPrice;
80 | });
81 | }
82 |
83 | /**
84 | * 获取店铺公告(第一个)
85 | */
86 | notices() {
87 | const url = `${this.baseUrl}/notices`;
88 | return this.get(url, {}).then(data => {
89 | if (data == null || data.length < 1) {
90 | return [{ content: '暂无公告' }]
91 | } else {
92 | return data;
93 | }
94 | });
95 | }
96 |
97 | /**
98 | * 处理商店信息
99 | */
100 | _processShopInfo(shop) {
101 | if (shop.avatar == null) {
102 | shop.avatar = '/images/shop/shop-logo.png';
103 | }
104 | return shop;
105 | }
106 |
107 | }
--------------------------------------------------------------------------------
/templates/steps/wxss/step.wxss:
--------------------------------------------------------------------------------
1 | .zan-steps--steps.zan-steps--5 .zan-steps__step {
2 | width: 25%;
3 | }
4 |
5 | .zan-steps--steps.zan-steps--4 .zan-steps__step {
6 | width: 33%;
7 | }
8 |
9 | .zan-steps--steps.zan-steps--3 .zan-steps__step {
10 | width: 50%;
11 | }
12 |
13 | .zan-steps--steps .zan-steps__step {
14 | position: relative;
15 | float: left;
16 | padding-bottom: 25px;
17 | color: #b1b1b1;
18 | }
19 |
20 | .zan-steps--steps .zan-steps__title {
21 | transform: translateX(-50%);
22 | font-size: 10px;
23 | text-align: center;
24 | }
25 |
26 | .zan-steps--steps .zan-steps__icons {
27 | position: absolute;
28 | top: 30px;
29 | left: -10px;
30 | padding: 0 8px;
31 | background-color: #fff;
32 | z-index: 10;
33 | }
34 |
35 | .zan-steps--steps .zan-steps__circle {
36 | display: block;
37 | position: relative;
38 | width: 5px;
39 | height: 5px;
40 | background-color: #e5e5e5;
41 | border-radius: 50%;
42 | }
43 |
44 | .zan-steps--steps .zan-steps__line {
45 | position: absolute;
46 | left: 0px;
47 | top: 32px;
48 | width: 100%;
49 | height: 1px;
50 | background-color: #e5e5e5;
51 | }
52 |
53 |
54 | /* 已完成的steps */
55 | .zan-steps--steps .zan-steps__step--done {
56 | color: #333;
57 | }
58 |
59 | .zan-steps--steps .zan-steps__step--done .zan-steps__line {
60 | background-color: #06bf04;
61 | }
62 |
63 | .zan-steps--steps .zan-steps__step--done .zan-steps__circle {
64 | width: 5px;
65 | height: 5px;
66 | background-color: #09bb07;
67 | }
68 |
69 | /* 正在进行中的steps */
70 | .zan-steps--steps .zan-steps__step--cur .zan-steps__icons {
71 | top: 25px;
72 | left: -14px;
73 | }
74 |
75 | .zan-steps--steps .zan-steps__step--cur .zan-steps__circle {
76 | width: 13px;
77 | height: 13px;
78 | background-image: url("https://b.yzcdn.cn/v2/image/wap/success_small@2x.png");
79 | background-size: 13px 13px;
80 | }
81 |
82 | .zan-steps--steps .zan-steps__step--cur .zan-steps__line {
83 | background-color: #e5e5e5;
84 | }
85 |
86 | /* 各种不同位置的 */
87 | .zan-steps--steps .zan-steps__step--first-child .zan-steps__title {
88 | margin-left: 0;
89 | transform: none;
90 | text-align: left;
91 | }
92 |
93 | .zan-steps--steps .zan-steps__step--first-child .zan-steps__icons {
94 | left: -7px;
95 | }
96 |
97 | .zan-steps--steps .zan-steps__step--last-child {
98 | position: absolute;
99 | right: 0;
100 | top: 0;
101 | text-align: right;
102 | }
103 |
104 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__title {
105 | transform: none;
106 | text-align: right;
107 | }
108 |
109 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__icons {
110 | left: auto;
111 | right: -6px;
112 | }
113 |
114 | .zan-steps--steps .zan-steps__step--last-child .zan-steps__line {
115 | display: none;
116 | }
117 |
118 | /* 有描述的step */
119 | .zan-steps--steps .zan-steps__step--db-title {
120 | min-height: 29px;
121 | }
122 |
123 | .zan-steps--steps .zan-steps__step--db-title .zan-steps__line {
124 | top: 45px;
125 | }
126 |
127 | .zan-steps--steps .zan-steps__step--db-title .zan-steps__icons {
128 | top: 43px;
129 | }
130 |
131 | .zan-steps--steps .zan-steps__step--db-title.zan-steps__step--cur .zan-steps__icons {
132 | top: 39px;
133 | }
134 |
--------------------------------------------------------------------------------
/class/utils/Router.js:
--------------------------------------------------------------------------------
1 | const app = getApp();
2 | const notification = require("./WxNotificationCenter.js");
3 | /**
4 | * 路由导航
5 | */
6 | export default class Router {
7 | constructor() {
8 | this.shopId = app.globalData.shopId;
9 | }
10 |
11 | //商品详情
12 | static goodsIndex(goodsId) {
13 | this.goto(`/pages/goods/index/index?goodsId=${goodsId}`);
14 | }
15 |
16 | static goodsIndexRedirect(goodsId) {
17 | this.redirectTo(`/pages/goods/index/index?goodsId=${goodsId}`);
18 | }
19 |
20 | //店铺详情
21 | static shopDetail() {
22 | this.goto(`/pages/shop/detail/detail?shopId=${this.shopId}`);
23 | }
24 | //创建订单
25 | static createTrade(trade) {
26 | this.goto(`/pages/order/trade/trade?trade=${trade}`);
27 | }
28 |
29 |
30 | //订单列表(刷新)
31 | static orderIndexRefresh() {
32 | notification.postNotificationName("ON_ORDER_UPDATE");
33 | this.orderIndex();
34 | }
35 |
36 | //订单列表
37 | static orderIndex() {
38 | wx.switchTab({
39 | url: "/pages/order/index/index"
40 | });
41 | }
42 | //订单详情
43 | static orderDetail(orderId) {
44 | this.goto(`/pages/order/detail/detail?orderId=${orderId}`);
45 | }
46 | //订单详情(跳转)
47 | static orderDetailRedirect(orderId) {
48 | notification.postNotificationName("ON_ORDER_UPDATE");
49 | this.redirectTo(`/pages/order/detail/detail?orderId=${orderId}`);
50 | }
51 | //订单物流信息
52 | static orderTrace(order) {
53 | this.goto(`/pages/order/trace/trace?order=${order}`);
54 | }
55 |
56 | /**
57 | * 退款页面
58 | */
59 | static refundApply(refund){
60 | this.goto(`/pages/refund/apply/apply?refund=${refund}`);
61 | }
62 |
63 | /**
64 | * 退款详情页面
65 | */
66 | static refundDetail(refund){
67 | this.goto(`/pages/refund/detail/detail?refund=${refund}`);
68 | }
69 |
70 | //购物车
71 | static cartIndex() {
72 | const cache = app.globalData.order;
73 | wx.switchTab({
74 | url: "/pages/cart/index/index"
75 | });
76 | }
77 |
78 | /**
79 | * 地址列表(跳转)
80 | */
81 | static addressIndexRedirect(reload = false) {
82 | this.redirectTo(`/pages/address/index/index?reload=${reload}`);
83 | }
84 |
85 | /**
86 | * 地址列表
87 | */
88 | static addressIndex(mode = 'none') {
89 | this.goto(`/pages/address/index/index?mode=${mode}`);
90 | }
91 |
92 | /**
93 | * 地址详情页面
94 | */
95 | static addressEdit(address) {
96 | this.goto(`/pages/address/edit/edit?addr=${address}`);
97 | }
98 |
99 | /**
100 | * 选择优惠券
101 | */
102 | static couponsUse(coupons){
103 | this.goto(`/pages/coupon/use/use?coupons=${coupons}`);
104 | }
105 |
106 |
107 |
108 |
109 | static goto(url) {
110 | wx.navigateTo({
111 | url: url
112 | });
113 | }
114 |
115 | static redirectTo(url) {
116 | wx.redirectTo({
117 | url: url
118 | });
119 | }
120 |
121 | //返回一次
122 | static back() {
123 | wx.navigateBack({
124 | delta: 1,
125 | });
126 | }
127 | }
--------------------------------------------------------------------------------
/pages/cart/index/index.wxss:
--------------------------------------------------------------------------------
1 | @import "/templates/cart/item/cart-item-template.wxss";
2 |
3 |
4 | page{
5 | height: 100%;
6 | width: 750rpx;
7 | background-color: #F5F5F5;
8 | overflow-x: hidden;
9 | }
10 |
11 | .container{
12 | padding-bottom: 120rpx;
13 | width: 750rpx;
14 | overflow-x: hidden;
15 | }
16 |
17 | /*占位*/
18 | .cart-empty-tips{
19 | position: fixed;
20 | top: 300rpx;
21 | width: 100%;
22 | height: 300rpx;
23 | display: flex;
24 | flex-direction: row;
25 | align-items: center;
26 | justify-content: center;
27 | }
28 | .cart-empty-tips image{
29 | width:200rpx;
30 | height: 200rpx;
31 | }
32 | .cart-empty-tips text{
33 | color: #656565;
34 | font-size: 40rpx;
35 | margin-left: 30rpx;
36 | }
37 |
38 | /*
39 | * 底部购买栏样式
40 | */
41 | .cart-bar-container{
42 | display: flex;
43 | flex-direction: row;
44 | justify-content: space-between;
45 | align-items: center;
46 | position: fixed;
47 | bottom: 0;
48 | height: 100rpx;
49 | width: 100%;
50 | background: #FEFEFE;
51 | border-top: 1px solid #DCDCDC;
52 | border-bottom: 1px solid #EEEEEE;
53 | z-index: 100;
54 | }
55 |
56 | /*选择框容器*/
57 | .cart-check-all-container{
58 | display: flex;
59 | flex-direction: column;
60 | width: 80rpx;
61 | margin-right: 20rpx;
62 | text-align: center;
63 | }
64 |
65 |
66 | /*购买框容器*/
67 | .bar-buy-container{
68 | display: flex;
69 | flex-direction: row;
70 | align-items: center;
71 | justify-content: center;
72 | height: 100%;
73 | width: 250rpx;
74 | background-color: #1296db;
75 | color: #FFF;
76 | }
77 | /*购买按钮*/
78 | .bar-buy-container text{
79 | color: #FFF;
80 | }
81 | .bar-buy-container .text-btn{
82 | font-size: 40rpx;
83 | }
84 |
85 | /*汇总信息*/
86 | .cart-check-info-container{
87 | display: flex;
88 | flex:1;
89 | flex-direction: column;
90 | justify-content: center;
91 | align-items: flex-end;
92 | padding-right: 30rpx;
93 | }
94 | /*汇总信息文字*/
95 | .cart-check-price-container text{
96 | font-size: 35rpx;
97 | }
98 | .cart-check-tips-text{
99 | font-size: 26rpx;
100 | color: #A6A6A6;
101 | }
102 | .goods-price{
103 | color:#ff6200;
104 | }
105 |
106 | /*没有购买物品的情况*/
107 | .bar-buy-empty{
108 | background-color: #B0B0B0;
109 | }
110 |
111 | /*顶栏*/
112 | .cart-header-container{
113 | padding-right: 25rpx;
114 | padding-left: 20rpx;
115 | display: flex;
116 | flex-direction: row;
117 | justify-content: space-between;
118 | align-items: center;
119 | height: 85rpx;
120 | background-color: #FBFBFB;
121 | margin-top: 20rpx;
122 | }
123 |
124 | .cart-shop-info-container{
125 | display: flex;
126 | flex-direction: row;
127 | align-items: center;
128 | }
129 |
130 | /*顶栏图片*/
131 | .shop-info-icon{
132 | height: 40rpx;
133 | width: 40rpx;
134 | vertical-align: middle;
135 | }
136 |
137 | /*顶栏店铺名称*/
138 | .shop-info-name{
139 | margin-left: 10rpx;
140 | margin-right: 20rpx;
141 | font-size: 28rpx;
142 | color:#262626;
143 | }
144 |
145 |
146 | /*批量编辑*/
147 | .cart-batch-edit{
148 | font-size: 28rpx;
149 | color: #A3A3A3;
150 | }
151 |
152 | /*批量编辑栏样式*/
153 | .cart-batch-btn-container{
154 | padding-right: 10rpx;
155 | }
--------------------------------------------------------------------------------
/pages/order/trade/trade.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 | 支付方式
21 | {{trade.paymentText}}
22 |
23 |
24 |
25 | 配送方式
26 |
27 | {{seletedDelilvery.name}} {{seletedDelilvery.fee != 0 ? ' +¥' + seletedDelilvery.fee : '免邮' }}
28 | 请选择收货地址
29 |
30 |
31 | 起送金额¥{{limitPrice}}
32 |
33 |
34 |
35 |
36 | 优惠券
37 | {{selectedCoupon ? '已选择' : coupons.length + '张可用'}}
38 |
39 | {{coupons.length>0 ? ( selectedCoupon ? '-¥' + selectedCoupon.price : '未使用') : '无可用'}}
40 |
41 |
42 | 买家留言
43 |
44 |
45 |
46 |
47 |
48 |
49 | 商品金额
50 | ¥{{trade.dealPrice}}
51 |
52 |
53 | 运费
54 | +¥{{trade.postFee}}
55 |
56 |
57 | 优惠券
58 | -¥{{trade.couponPrice}}
59 |
60 |
61 |
62 |
63 |
64 |
65 | 实付款:
66 | ¥{{trade.finalPrice}}
67 |
68 |
69 | 立即下单
70 |
71 |
72 |
--------------------------------------------------------------------------------
/class/utils/Http.js:
--------------------------------------------------------------------------------
1 | import Tips from '../utils/Tips';
2 |
3 | const app = getApp();
4 |
5 | // HTTP工具类
6 | export default class Http {
7 |
8 | constructor() {
9 | }
10 |
11 |
12 | static request(method, url, data) {
13 | return new Promise((resolve, reject) => {
14 | const header = this.createAuthHeader();
15 | wx.request({
16 | url: url,
17 | method: method,
18 | header: header,
19 | data: data,
20 | success: (res) => {
21 | //微信状态校验
22 | const wxCode = res.statusCode;
23 | if (wxCode != 200) {
24 | console.error('服务端请求错误', res);
25 | this.handleHttpException(res);
26 | reject(res);
27 | }
28 | else {
29 | //服务端状态校验
30 | const wxData = res.data;
31 | const code = wxData.code;
32 | if (code != 0) {
33 | console.error('服务端业务错误', res);
34 | reject(res);
35 | }
36 | else {
37 | //服务端的内部数据
38 | const serverData = wxData.data;
39 | resolve(serverData);
40 | }
41 | }
42 | },
43 | fail: (res) => {
44 | console.error('网络请求发起失败', res);
45 | reject(res);
46 | }
47 | });
48 | });
49 | }
50 |
51 | /**
52 | * 错误处理器
53 | */
54 | static handleHttpException(res) {
55 | const status = res.statusCode;
56 | switch (status) {
57 | case 403:
58 | this.handleHttp403Exception(res);
59 | break;
60 | case 500:
61 | this.handleHttp500Exception(res);
62 | break;
63 | default:
64 | console.info('其他错误', res);
65 |
66 | }
67 | }
68 |
69 | /**
70 | * 403无权限错误
71 | */
72 | static handleHttp403Exception(res) {
73 | //需要区分两403之间的区别
74 | console.error(`403-权限错误:${res.data.message}`);
75 | }
76 |
77 | /**
78 | * 500内部错误
79 | */
80 | static handleHttp500Exception(res) {
81 | console.error(`500-服务器内部错误:${res.data.message}`);
82 | }
83 |
84 | /**
85 | * 构造权限头部
86 | */
87 | static createAuthHeader() {
88 | const loginCode = app.globalData.auth.login_code;
89 | var header = {};
90 | if (loginCode) {
91 | header["login_code"] = loginCode;
92 | }
93 | return header;
94 | }
95 |
96 | static get(url, data) {
97 | return this.request("GET", url, data);
98 | }
99 |
100 | static put(url, data) {
101 | return this.request("PUT", url, data);
102 | }
103 |
104 | static post(url, data) {
105 | return this.request("POST", url, data);
106 | }
107 |
108 | static patch(url, data) {
109 | return this.request("PATCH", url, data);
110 | }
111 |
112 | static delete(url, data) {
113 | return this.request("DELETE", url, data);
114 | }
115 |
116 | }
--------------------------------------------------------------------------------
/class/service/ExpressService.js:
--------------------------------------------------------------------------------
1 | import BaseService from "./BaseService";
2 | /**
3 | * 快递信息服务类
4 | */
5 | export default class ExpressService extends BaseService {
6 |
7 | constructor() {
8 | super();
9 |
10 | }
11 | /*********************** 对外方法 ***********************/
12 |
13 |
14 |
15 | /**
16 | * 构造当前物流状态
17 | */
18 |
19 | createCurrentTrace(express) {
20 | if (express == null) {
21 | return;
22 | }
23 | const steps = express.expressBases;
24 | if (steps == null || steps.length < 1) {
25 | return { text: '尚未查询到物流信息' };
26 | }
27 | const currentStep = steps[0];
28 | return {
29 | text: currentStep.status,
30 | timestape: currentStep.time,
31 | };
32 | }
33 |
34 | /**
35 | * 查询订单当前的物流状态
36 | */
37 | queryCurrentTrace(orderId) {
38 | return this._queryExpressInfo(orderId).then(express => {
39 | return this.createCurrentTrace(express);
40 | });
41 | }
42 |
43 |
44 |
45 | /**
46 | * 构造订单跟踪李彪
47 | */
48 | createTrace(express) {
49 | if (express == null) {
50 | return;
51 | }
52 | const info = this._createExpressInfo(express);
53 | const steps = this._createTraceSteps(express);
54 | return {
55 | steps: steps,
56 | info: info
57 | };
58 | }
59 |
60 |
61 | /**
62 | * 查询订单跟踪列表
63 | */
64 | queryTrace(orderId) {
65 | return this._queryExpressInfo(orderId).then(data => this.createTrace(data));
66 | }
67 |
68 |
69 | /*********************** 对象构造方法 ***********************/
70 |
71 | /**
72 | * 创建物流页面展现的基本信息
73 | */
74 | createExpressOrderPreview(order) {
75 | const imageUrl = order.orderGoodsInfos[0].imageUrl;
76 | const goodsCount = order.orderGoodsInfos.length;
77 | return {
78 | imageUrl: imageUrl,
79 | goodsCount: goodsCount,
80 | orderId: order.orderId
81 | }
82 | }
83 |
84 | /*********************** 数据处理方法 ***********************/
85 |
86 | /**
87 | * 查询物流信息
88 | */
89 |
90 | _queryExpressInfo(orderId) {
91 | const url = `${this.baseUrl}/express`;
92 | const param = { order_id: orderId };
93 | return this.get(url, param);
94 | }
95 |
96 |
97 | /**
98 | * 提取步骤信息
99 | */
100 | _createTraceSteps(data) {
101 | if (!data.expressBases) {
102 | return null;
103 | }
104 |
105 | //映射每个步骤
106 | const steps = data.expressBases.map(this._processTraceStep);
107 |
108 | //改变最后一个状态
109 | const lastStep = steps[0];
110 | lastStep.done = true;
111 | lastStep.current = true;
112 |
113 | return steps;
114 | }
115 |
116 | /**
117 | * 处理每个步骤
118 | */
119 | _processTraceStep(item) {
120 | return {
121 | text: item.status,
122 | timestape: item.time,
123 | done: false,
124 | current: false
125 | };
126 | }
127 |
128 | /**
129 | * 提取物流基本信息
130 | */
131 | _createExpressInfo(data) {
132 | return {
133 | expTextName: data.expressType,
134 | mailNo: data.expressNo,
135 | status: data.status,
136 | tel: data.telPhone,
137 | }
138 | }
139 | }
--------------------------------------------------------------------------------
/templates/goods/buy-panel/goods-buy-panel-template.wxss:
--------------------------------------------------------------------------------
1 | /*购买面板*/
2 | .goods-buy-panel-container{
3 | position: fixed;
4 | background: #FFF;
5 | bottom: 0px;
6 | width: 100%;
7 | z-index: 1000;
8 | transform: translateY(150%);
9 | transition: all 0.4s ease;
10 | }
11 | .goods-buy-panel-show{
12 | transform: translateY(0);
13 | }
14 |
15 | /*遮罩层*/
16 | .goods-buy-panel-cover{
17 | width: 100%;
18 | height: 100%;
19 | position: fixed;
20 | top: 0;
21 | background-color: black;
22 | -webkit-filter:opacity(.6);
23 | z-index: 100;
24 | }
25 |
26 | /*信息面板*/
27 | .buy-panel-info-container{
28 | margin-left: 30rpx;
29 | border-bottom: 1px solid #E2E2E2;
30 | display: flex;
31 | flex-direction: row;
32 | }
33 |
34 | /*面板图片*/
35 | .buy-panel-icon{
36 | position: relative;
37 | top: -20rpx;
38 | height: 170rpx;
39 | width: 170rpx;
40 | border-radius: 5px;
41 | border: 1px solid #E2E2E2;
42 | }
43 |
44 | /*信息-价格/标题面板*/
45 | .buy-panel-title-price{
46 | display: flex;
47 | flex:1;
48 | flex-direction: column;
49 | padding-left: 30rpx;
50 | padding-top: 28rpx;
51 | }
52 |
53 | /*商品标题*/
54 | .buy-panel-title{
55 | font-size: 30rpx;
56 | text-overflow: ellipsis;
57 | word-break:keep-all;/* 不换行 */
58 | white-space:nowrap;/* 不换行 */
59 | overflow:hidden;/* 内容超出宽度时隐藏超出部分的内容 */
60 | color:#1F1F1F;
61 | }
62 | /*关闭图标*/
63 | .buy-panel-close-container{
64 | padding-top: 28rpx;
65 | width: 100rpx;
66 | text-align: center;
67 | }
68 | .buy-panel-close-icon{
69 | height: 45rpx;
70 | width: 45rpx;
71 | }
72 |
73 | /**
74 | * 商品价格
75 | */
76 | .buy-panel-price{
77 | margin-top: 20rpx;
78 | font-size: 35rpx;
79 | color:#ff6200;
80 | }
81 |
82 | /*SKU展示区域*/
83 | .buy-panel-sku-container{
84 | display: flex;
85 | flex-direction: column;
86 | margin-left: 30rpx;
87 | padding-top: 25rpx;
88 | border-bottom: 1px solid #E2E2E2;
89 | }
90 |
91 | /*SKU列表*/
92 | .buy-panel-sku-list{
93 | padding-top: 15rpx;
94 | display: flex;
95 | flex-direction: row;
96 | flex-wrap: wrap;
97 | }
98 | .buy-panel-sku-list view {
99 | margin-bottom: 15rpx;
100 | }
101 |
102 | /*SKU标题容器*/
103 | .buy-panel-sku-title{
104 |
105 | }
106 |
107 | /*SKU标题文字*/
108 | .buy-panel-sku-title-text{
109 | font-size: 30rpx;
110 | color: #1F1F1F;
111 | }
112 |
113 | /*购买数量*/
114 | .buy-panel-num-container{
115 | display: flex;
116 | flex-direction: row;
117 | justify-content: space-between;
118 | align-items: center;
119 | margin-left: 30rpx;
120 | padding-top: 30rpx;
121 | padding-bottom: 30rpx;
122 | padding-right: 30rpx;
123 | }
124 |
125 | /*购买数量/剩余 容器*/
126 | .buy-panel-num-title{
127 | display: flex;
128 | height: 82rpx;
129 | justify-content: flex-start;
130 | flex-direction: column;
131 | }
132 | /*购买数量文字*/
133 | .buy-panel-num-text{
134 | font-size: 30rpx;
135 | color: #1F1F1F;
136 | }
137 | /*剩余数量文字*/
138 | .buy-panel-stock-text{
139 | margin-top: 10rpx;
140 | }
141 |
142 |
143 |
144 | /*购买栏底部*/
145 | .buy-panel-next{
146 | background-color: #1296db;
147 | height: 100rpx;
148 | width: 100%;
149 | display: flex;
150 | justify-content: center;
151 | align-items: center;
152 | }
153 | .buy-panel-next text{
154 | font-size: 36rpx;
155 | color: #FFF;
156 | }
157 |
158 | /*购买栏为空*/
159 | .buy-panel-empty{
160 | background-color: #B0B0B0;
161 | }
162 |
--------------------------------------------------------------------------------
/pages/address/edit/edit.wxml:
--------------------------------------------------------------------------------
1 |
44 |
45 |
46 | 取消
47 | 确定
48 |
49 |
50 |
51 |
52 | {{item}}
53 |
54 |
55 |
56 | {{item}}
57 |
58 |
59 |
60 | {{item}}
61 |
62 |
63 |
64 |
65 | {{messageContent}}
--------------------------------------------------------------------------------