├── common
├── common.js
├── footer
│ ├── footer.wxml
│ └── footer.wxss
├── itemList
│ ├── itemList.js
│ ├── itemList.wxss
│ ├── cartModel.js
│ └── itemList.wxml
└── header
│ ├── header.wxml
│ └── header.wxss
├── .gitignore
├── pages
├── home
│ ├── home.json
│ ├── index.json
│ ├── home.wxss
│ ├── home.wxml
│ └── home.js
├── main
│ ├── main.json
│ ├── main.wxml
│ ├── main.wxss
│ └── main.js
├── hello
│ ├── hello.json
│ ├── hello.wxml
│ └── hello.wxss
├── history
│ ├── history.json
│ ├── history.wxss
│ ├── history.wxml
│ └── history.js
├── mapView
│ ├── mapView.json
│ ├── mapView.wxss
│ ├── mapView.wxml
│ └── mapView.js
├── message
│ ├── message.json
│ ├── message.wxss
│ └── message.wxml
├── publish
│ └── publish.json
├── favorite
│ ├── favorite.json
│ ├── favorite.wxml
│ ├── favorite.wxss
│ └── favorite.js
├── goods
│ ├── search
│ │ ├── search.json
│ │ ├── search.wxml
│ │ ├── search.wxss
│ │ └── search.js
│ ├── labelGoodsList
│ │ ├── labelGoodsList.json
│ │ ├── labelGoodsList.wxml
│ │ ├── labelGoodsList.wxss
│ │ └── labelGoodsList.js
│ ├── goodsSearch
│ │ ├── goodsSearch.json
│ │ ├── goodsSearch.wxml
│ │ └── goodsSearch.wxss
│ ├── goodsDetail
│ │ └── goodsDetail.json
│ └── goodsList
│ │ └── goodsList.json
├── index
│ └── index.json
├── petDoctor
│ └── petDoctor.json
├── register
│ ├── register.json
│ ├── register.js
│ ├── register.wxml
│ └── register.wxss
├── messageList
│ ├── messageList.json
│ └── messageList.wxml
├── petArticle
│ ├── petArticle.json
│ ├── petArticle.wxml
│ └── petArticle.wxss
├── order
│ ├── orderDetail
│ │ ├── orderDetail.json
│ │ ├── orderDetail.js
│ │ ├── orderDetail.wxml
│ │ └── orderDetail.wxss
│ ├── confirmOrder
│ │ └── confirmOrder.json
│ └── paymentOrder
│ │ ├── paymentOrder.json
│ │ └── paymentOrder.wxml
├── petArticleHome
│ ├── petArticleHome.json
│ ├── petArticleHome.wxml
│ └── petArticleHome.wxss
├── petArticleList
│ ├── petArticleList.json
│ ├── petArticleList.wxml
│ └── petArticleList.wxss
├── publishSuccess
│ ├── publishSuccess.json
│ ├── publishSuccess.wxml
│ ├── publishSuccess.wxss
│ └── publishSuccess.js
├── petDoctorSuccess
│ ├── petDoctorSuccess.json
│ ├── petDoctorSuccess.wxml
│ ├── petDoctorSuccess.wxss
│ └── petDoctorSuccess.js
├── labelDetail
│ ├── labelDetail.json
│ ├── labelDetail.wxml
│ └── labelDetail.wxss
├── userCenter
│ ├── userCenter
│ │ ├── userCenter.json
│ │ ├── userCenter.wxml
│ │ ├── userCenter.js
│ │ └── userCenter.wxss
│ ├── orderList
│ │ └── orderList.json
│ ├── personal
│ │ ├── personal.json
│ │ ├── personal.wxss
│ │ └── personal.wxml
│ ├── addAddress
│ │ ├── addAddress.json
│ │ ├── addAddress.wxss
│ │ └── addAddress.wxml
│ └── addressList
│ │ ├── addressList.json
│ │ ├── addressList.wxss
│ │ ├── addressList.wxml
│ │ └── addressList.js
├── cart
│ └── cart.json
├── cate
│ ├── cate.json
│ └── cate.wxml
├── logs
│ ├── logs.json
│ ├── logs.wxss
│ ├── logs.wxml
│ └── logs.js
├── cateList
│ └── cateList.json
├── protocol
│ ├── protocol.json
│ ├── protocol.wxml
│ ├── protocol.wxss
│ └── protocol.js
├── labelList
│ ├── labelList.json
│ ├── labelList.wxss
│ ├── labelList.wxml
│ └── labelList.js
├── login
│ ├── login.json
│ ├── login.wxml
│ └── login.wxss
├── comment
│ ├── comment.json
│ └── comment.wxml
├── services
│ ├── services.json
│ ├── services.wxss
│ ├── services.wxml
│ └── services.js
├── coupon
│ ├── myCoupon
│ │ ├── myCoupon.json
│ │ ├── myCoupon.wxss
│ │ ├── myCoupon.js
│ │ └── myCoupon.wxml
│ └── couponList
│ │ ├── couponList.json
│ │ ├── couponList.wxml
│ │ ├── couponList.wxss
│ │ └── couponList.js
├── serviceDetail
│ ├── serviceDetail.json
│ ├── serviceDetail.wxml
│ ├── serviceDetail.wxss
│ └── serviceDetail.js
├── test
│ ├── test.js
│ ├── test.wxml
│ └── test.wxss
└── template
│ └── template.js
├── utils
├── .idea
│ ├── .name
│ ├── scopes
│ │ └── scope_settings.xml
│ ├── encodings.xml
│ ├── vcs.xml
│ ├── misc.xml
│ ├── modules.xml
│ └── utils.iml
├── config.js
├── util.js
├── wxLogin.js
└── tools.js
├── static
├── images
│ ├── add.png
│ ├── home.png
│ ├── kefu.png
│ ├── more.jpg
│ ├── my
│ │ ├── 1.jpg
│ │ ├── 2.jpg
│ │ ├── 2.png
│ │ ├── 3.jpg
│ │ ├── 4.png
│ │ ├── btn.png
│ │ ├── car.png
│ │ ├── dot.png
│ │ ├── jia.png
│ │ ├── off.png
│ │ ├── call.png
│ │ ├── camera.png
│ │ ├── cart.png
│ │ ├── check.png
│ │ ├── coupon.png
│ │ ├── half.png
│ │ ├── jian.png
│ │ ├── jians.png
│ │ ├── jias.png
│ │ ├── kong.png
│ │ ├── mall.png
│ │ ├── money.png
│ │ ├── more.png
│ │ ├── normal.png
│ │ ├── order.png
│ │ ├── order2.png
│ │ ├── person.png
│ │ ├── phone.png
│ │ ├── qian.jpg
│ │ ├── rarrow.png
│ │ ├── rmoney.png
│ │ ├── select.png
│ │ ├── shop.png
│ │ ├── text.png
│ │ ├── tiao.jpg
│ │ ├── user.png
│ │ ├── address.png
│ │ ├── checked.png
│ │ ├── checking.png
│ │ ├── coupon1.png
│ │ ├── coupon2.png
│ │ ├── coupon3.png
│ │ ├── daiFaHuo.png
│ │ ├── ex_goods.jpg
│ │ ├── head_img.jpg
│ │ ├── homepage.png
│ │ ├── my_order.png
│ │ ├── off_icon.png
│ │ ├── order-1.png
│ │ ├── order-2.png
│ │ ├── order-3.png
│ │ ├── order-4.png
│ │ ├── order-5.png
│ │ ├── register.jpg
│ │ ├── selected.png
│ │ ├── service.png
│ │ ├── shopping.png
│ │ ├── yiFaHuo.png
│ │ ├── about_icon.png
│ │ ├── ad-checked.png
│ │ ├── ad-checking.png
│ │ ├── cart_icon.png
│ │ ├── cate_icon.jpg
│ │ ├── coupon_top.jpg
│ │ ├── coupon_top.png
│ │ ├── daiFuKuan.png
│ │ ├── down_arrow.png
│ │ ├── error_tip.png
│ │ ├── forbidden.png
│ │ ├── login_code.png
│ │ ├── login_pass.png
│ │ ├── order_num.png
│ │ ├── orders_icon.png
│ │ ├── right_arrow.png
│ │ ├── selecteds.png
│ │ ├── talkphone.png
│ │ ├── user_icon.png
│ │ ├── yiWanCheng.png
│ │ ├── address_icon.png
│ │ ├── address_info.png
│ │ ├── collect_icon.png
│ │ ├── discount_icon.png
│ │ ├── login_account.png
│ │ ├── password_eye.png
│ │ ├── cash_coupon_icon.png
│ │ ├── coupon_bg_small.png
│ │ └── coupon_bg_small-1.png
│ ├── text.png
│ ├── addimg.jpg
│ ├── check.png
│ ├── delete.png
│ ├── hello.jpg
│ ├── hello1.png
│ ├── more2.jpg
│ ├── nodata.png
│ ├── scroll.png
│ ├── contact.png
│ ├── publish.png
│ ├── sell_out.png
│ ├── success.png
│ ├── number
│ │ ├── dot1.png
│ │ ├── dot2.png
│ │ ├── dot3.png
│ │ ├── dot4.png
│ │ ├── dot5.png
│ │ ├── dot6.png
│ │ ├── dot7.png
│ │ ├── dot8.png
│ │ └── dot9.png
│ ├── scroll_pic.png
│ ├── usercenter.png
│ ├── tabBar
│ │ ├── tab_my_normal.png
│ │ ├── tab_home_normal.png
│ │ ├── tab_home_selected.png
│ │ ├── tab_mall_normal.png
│ │ ├── tab_mall_selected.png
│ │ ├── tab_my_selected.png
│ │ ├── tab_search_normal.png
│ │ ├── tab_category_normal.png
│ │ ├── tab_search_selected.png
│ │ ├── tab_category_selected.png
│ │ ├── tab_shoppingcart_normal.png
│ │ └── tab_shoppingcart_selected.png
│ └── tab_category_selected.png
├── fonts
│ ├── iconfont.eot
│ ├── iconfont.ttf
│ └── iconfont.woff
└── icon.wxss
├── jsconfig.json
├── .vscode
└── settings.json
├── project.config.json
├── app.js
├── app.json
└── app.wxss
/common/common.js:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | *swp
2 |
--------------------------------------------------------------------------------
/pages/home/home.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/home/index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/main/main.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/utils/.idea/.name:
--------------------------------------------------------------------------------
1 | utils
--------------------------------------------------------------------------------
/pages/hello/hello.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/history/history.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/mapView/mapView.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/message/message.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/publish/publish.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/favorite/favorite.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/goods/search/search.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {
2 | }
--------------------------------------------------------------------------------
/pages/petDoctor/petDoctor.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/register/register.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/messageList/messageList.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/petArticle/petArticle.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/order/orderDetail/orderDetail.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/petArticleHome/petArticleHome.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/petArticleList/petArticleList.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/publishSuccess/publishSuccess.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/goods/labelGoodsList/labelGoodsList.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/home/home.wxss:
--------------------------------------------------------------------------------
1 | /* pages/home/home.wxss */
--------------------------------------------------------------------------------
/pages/petDoctorSuccess/petDoctorSuccess.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/labelDetail/labelDetail.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | }
--------------------------------------------------------------------------------
/pages/history/history.wxss:
--------------------------------------------------------------------------------
1 | /* pages/history/history.wxss */
--------------------------------------------------------------------------------
/pages/userCenter/userCenter/userCenter.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 |
4 | }
--------------------------------------------------------------------------------
/pages/cart/cart.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "购物车"
3 | }
--------------------------------------------------------------------------------
/pages/cate/cate.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "宠物分类"
3 | }
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/pages/cateList/cateList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "有宠日志"
3 | }
--------------------------------------------------------------------------------
/pages/protocol/protocol.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "协议和须知"
3 | }
--------------------------------------------------------------------------------
/pages/goods/goodsSearch/goodsSearch.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "搜索列表"
3 | }
--------------------------------------------------------------------------------
/static/images/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/add.png
--------------------------------------------------------------------------------
/static/images/home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/home.png
--------------------------------------------------------------------------------
/static/images/kefu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/kefu.png
--------------------------------------------------------------------------------
/static/images/more.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/more.jpg
--------------------------------------------------------------------------------
/static/images/my/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/1.jpg
--------------------------------------------------------------------------------
/static/images/my/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/2.jpg
--------------------------------------------------------------------------------
/static/images/my/2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/2.png
--------------------------------------------------------------------------------
/static/images/my/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/3.jpg
--------------------------------------------------------------------------------
/static/images/my/4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/4.png
--------------------------------------------------------------------------------
/static/images/text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/text.png
--------------------------------------------------------------------------------
/pages/labelList/labelList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "微胖女神很旺家"
3 | }
--------------------------------------------------------------------------------
/static/images/addimg.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/addimg.jpg
--------------------------------------------------------------------------------
/static/images/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/check.png
--------------------------------------------------------------------------------
/static/images/delete.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/delete.png
--------------------------------------------------------------------------------
/static/images/hello.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/hello.jpg
--------------------------------------------------------------------------------
/static/images/hello1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/hello1.png
--------------------------------------------------------------------------------
/static/images/more2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/more2.jpg
--------------------------------------------------------------------------------
/static/images/my/btn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/btn.png
--------------------------------------------------------------------------------
/static/images/my/car.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/car.png
--------------------------------------------------------------------------------
/static/images/my/dot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/dot.png
--------------------------------------------------------------------------------
/static/images/my/jia.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/jia.png
--------------------------------------------------------------------------------
/static/images/my/off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/off.png
--------------------------------------------------------------------------------
/static/images/nodata.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/nodata.png
--------------------------------------------------------------------------------
/static/images/scroll.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/scroll.png
--------------------------------------------------------------------------------
/static/fonts/iconfont.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/fonts/iconfont.eot
--------------------------------------------------------------------------------
/static/fonts/iconfont.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/fonts/iconfont.ttf
--------------------------------------------------------------------------------
/static/fonts/iconfont.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/fonts/iconfont.woff
--------------------------------------------------------------------------------
/static/images/contact.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/contact.png
--------------------------------------------------------------------------------
/static/images/my/call.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/call.png
--------------------------------------------------------------------------------
/static/images/my/camera.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/camera.png
--------------------------------------------------------------------------------
/static/images/my/cart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/cart.png
--------------------------------------------------------------------------------
/static/images/my/check.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/check.png
--------------------------------------------------------------------------------
/static/images/my/coupon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon.png
--------------------------------------------------------------------------------
/static/images/my/half.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/half.png
--------------------------------------------------------------------------------
/static/images/my/jian.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/jian.png
--------------------------------------------------------------------------------
/static/images/my/jians.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/jians.png
--------------------------------------------------------------------------------
/static/images/my/jias.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/jias.png
--------------------------------------------------------------------------------
/static/images/my/kong.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/kong.png
--------------------------------------------------------------------------------
/static/images/my/mall.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/mall.png
--------------------------------------------------------------------------------
/static/images/my/money.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/money.png
--------------------------------------------------------------------------------
/static/images/my/more.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/more.png
--------------------------------------------------------------------------------
/static/images/my/normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/normal.png
--------------------------------------------------------------------------------
/static/images/my/order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order.png
--------------------------------------------------------------------------------
/static/images/my/order2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order2.png
--------------------------------------------------------------------------------
/static/images/my/person.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/person.png
--------------------------------------------------------------------------------
/static/images/my/phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/phone.png
--------------------------------------------------------------------------------
/static/images/my/qian.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/qian.jpg
--------------------------------------------------------------------------------
/static/images/my/rarrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/rarrow.png
--------------------------------------------------------------------------------
/static/images/my/rmoney.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/rmoney.png
--------------------------------------------------------------------------------
/static/images/my/select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/select.png
--------------------------------------------------------------------------------
/static/images/my/shop.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/shop.png
--------------------------------------------------------------------------------
/static/images/my/text.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/text.png
--------------------------------------------------------------------------------
/static/images/my/tiao.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/tiao.jpg
--------------------------------------------------------------------------------
/static/images/my/user.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/user.png
--------------------------------------------------------------------------------
/static/images/publish.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/publish.png
--------------------------------------------------------------------------------
/static/images/sell_out.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/sell_out.png
--------------------------------------------------------------------------------
/static/images/success.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/success.png
--------------------------------------------------------------------------------
/jsconfig.json:
--------------------------------------------------------------------------------
1 | {
2 | "compilerOptions": {
3 | "target": "es2015",
4 | "module": "commonjs"
5 | }
6 | }
--------------------------------------------------------------------------------
/static/images/my/address.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/address.png
--------------------------------------------------------------------------------
/static/images/my/checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/checked.png
--------------------------------------------------------------------------------
/static/images/my/checking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/checking.png
--------------------------------------------------------------------------------
/static/images/my/coupon1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon1.png
--------------------------------------------------------------------------------
/static/images/my/coupon2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon2.png
--------------------------------------------------------------------------------
/static/images/my/coupon3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon3.png
--------------------------------------------------------------------------------
/static/images/my/daiFaHuo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/daiFaHuo.png
--------------------------------------------------------------------------------
/static/images/my/ex_goods.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/ex_goods.jpg
--------------------------------------------------------------------------------
/static/images/my/head_img.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/head_img.jpg
--------------------------------------------------------------------------------
/static/images/my/homepage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/homepage.png
--------------------------------------------------------------------------------
/static/images/my/my_order.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/my_order.png
--------------------------------------------------------------------------------
/static/images/my/off_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/off_icon.png
--------------------------------------------------------------------------------
/static/images/my/order-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order-1.png
--------------------------------------------------------------------------------
/static/images/my/order-2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order-2.png
--------------------------------------------------------------------------------
/static/images/my/order-3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order-3.png
--------------------------------------------------------------------------------
/static/images/my/order-4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order-4.png
--------------------------------------------------------------------------------
/static/images/my/order-5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order-5.png
--------------------------------------------------------------------------------
/static/images/my/register.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/register.jpg
--------------------------------------------------------------------------------
/static/images/my/selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/selected.png
--------------------------------------------------------------------------------
/static/images/my/service.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/service.png
--------------------------------------------------------------------------------
/static/images/my/shopping.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/shopping.png
--------------------------------------------------------------------------------
/static/images/my/yiFaHuo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/yiFaHuo.png
--------------------------------------------------------------------------------
/static/images/number/dot1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot1.png
--------------------------------------------------------------------------------
/static/images/number/dot2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot2.png
--------------------------------------------------------------------------------
/static/images/number/dot3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot3.png
--------------------------------------------------------------------------------
/static/images/number/dot4.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot4.png
--------------------------------------------------------------------------------
/static/images/number/dot5.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot5.png
--------------------------------------------------------------------------------
/static/images/number/dot6.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot6.png
--------------------------------------------------------------------------------
/static/images/number/dot7.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot7.png
--------------------------------------------------------------------------------
/static/images/number/dot8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot8.png
--------------------------------------------------------------------------------
/static/images/number/dot9.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/number/dot9.png
--------------------------------------------------------------------------------
/static/images/scroll_pic.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/scroll_pic.png
--------------------------------------------------------------------------------
/static/images/usercenter.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/usercenter.png
--------------------------------------------------------------------------------
/static/images/my/about_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/about_icon.png
--------------------------------------------------------------------------------
/static/images/my/ad-checked.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/ad-checked.png
--------------------------------------------------------------------------------
/static/images/my/ad-checking.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/ad-checking.png
--------------------------------------------------------------------------------
/static/images/my/cart_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/cart_icon.png
--------------------------------------------------------------------------------
/static/images/my/cate_icon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/cate_icon.jpg
--------------------------------------------------------------------------------
/static/images/my/coupon_top.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon_top.jpg
--------------------------------------------------------------------------------
/static/images/my/coupon_top.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon_top.png
--------------------------------------------------------------------------------
/static/images/my/daiFuKuan.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/daiFuKuan.png
--------------------------------------------------------------------------------
/static/images/my/down_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/down_arrow.png
--------------------------------------------------------------------------------
/static/images/my/error_tip.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/error_tip.png
--------------------------------------------------------------------------------
/static/images/my/forbidden.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/forbidden.png
--------------------------------------------------------------------------------
/static/images/my/login_code.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/login_code.png
--------------------------------------------------------------------------------
/static/images/my/login_pass.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/login_pass.png
--------------------------------------------------------------------------------
/static/images/my/order_num.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/order_num.png
--------------------------------------------------------------------------------
/static/images/my/orders_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/orders_icon.png
--------------------------------------------------------------------------------
/static/images/my/right_arrow.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/right_arrow.png
--------------------------------------------------------------------------------
/static/images/my/selecteds.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/selecteds.png
--------------------------------------------------------------------------------
/static/images/my/talkphone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/talkphone.png
--------------------------------------------------------------------------------
/static/images/my/user_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/user_icon.png
--------------------------------------------------------------------------------
/static/images/my/yiWanCheng.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/yiWanCheng.png
--------------------------------------------------------------------------------
/static/images/my/address_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/address_icon.png
--------------------------------------------------------------------------------
/static/images/my/address_info.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/address_info.png
--------------------------------------------------------------------------------
/static/images/my/collect_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/collect_icon.png
--------------------------------------------------------------------------------
/static/images/my/discount_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/discount_icon.png
--------------------------------------------------------------------------------
/static/images/my/login_account.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/login_account.png
--------------------------------------------------------------------------------
/static/images/my/password_eye.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/password_eye.png
--------------------------------------------------------------------------------
/static/images/my/cash_coupon_icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/cash_coupon_icon.png
--------------------------------------------------------------------------------
/static/images/my/coupon_bg_small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon_bg_small.png
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "*.wxml": "html",
4 | "*.wxss": "css"
5 | }
6 | }
--------------------------------------------------------------------------------
/pages/goods/goodsDetail/goodsDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "有宠物日志",
3 | "enablePullDownRefresh": false
4 | }
--------------------------------------------------------------------------------
/static/images/my/coupon_bg_small-1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/my/coupon_bg_small-1.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_my_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_my_normal.png
--------------------------------------------------------------------------------
/static/images/tab_category_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tab_category_selected.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_home_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_home_normal.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_home_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_home_selected.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_mall_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_mall_normal.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_mall_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_mall_selected.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_my_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_my_selected.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_search_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_search_normal.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_category_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_category_normal.png
--------------------------------------------------------------------------------
/static/images/tabBar/tab_search_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_search_selected.png
--------------------------------------------------------------------------------
/pages/home/home.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/pages/login/login.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "登录",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/static/images/tabBar/tab_category_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_category_selected.png
--------------------------------------------------------------------------------
/pages/comment/comment.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "商品评价",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/static/images/tabBar/tab_shoppingcart_normal.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_shoppingcart_normal.png
--------------------------------------------------------------------------------
/pages/services/services.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "便民服务",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/static/images/tabBar/tab_shoppingcart_selected.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/luopf/pet-xcx/HEAD/static/images/tabBar/tab_shoppingcart_selected.png
--------------------------------------------------------------------------------
/pages/coupon/myCoupon/myCoupon.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "我的购物券",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/goods/goodsList/goodsList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "商品搜索",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/history/history.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/pages/logs/logs.wxss:
--------------------------------------------------------------------------------
1 | .log-list {
2 | display: flex;
3 | flex-direction: column;
4 | padding: 40rpx;
5 | }
6 | .log-item {
7 | margin: 10rpx;
8 | }
9 |
--------------------------------------------------------------------------------
/pages/coupon/couponList/couponList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "领券中心",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/serviceDetail/serviceDetail.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "便民服务",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/userCenter/orderList/orderList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "订单列表",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/userCenter/personal/personal.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "个人资料",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/mapView/mapView.wxss:
--------------------------------------------------------------------------------
1 | /* pages/mapView/mapView.wxss */
2 | page{
3 | width: 100%;
4 | height: 100%;
5 | }
6 | .mapview{
7 | width: 100%;
8 | height: 100%;
9 | }
--------------------------------------------------------------------------------
/pages/order/confirmOrder/confirmOrder.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "确认订单",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/order/paymentOrder/paymentOrder.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "微信支付",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/userCenter/addAddress/addAddress.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "地址管理",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/pages/userCenter/addressList/addressList.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "管理收货地址",
3 | "enablePullDownRefresh": false,
4 | "backgroundTextStyle": "dark"
5 | }
--------------------------------------------------------------------------------
/utils/.idea/scopes/scope_settings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/utils/config.js:
--------------------------------------------------------------------------------
1 | const CONFIG = {
2 | API_URL : {
3 | BASE_URL: "https://cwly.mengyayuer.com/",
4 | IMG_URL:"https://cwly.mengyayuer.com/upload"
5 | },
6 | }
7 | module.exports = CONFIG;
--------------------------------------------------------------------------------
/pages/petArticle/petArticle.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/utils/.idea/encodings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/pages/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/protocol/protocol.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/utils/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/common/footer/footer.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/main/main.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
9 |
10 |
--------------------------------------------------------------------------------
/pages/mapView/mapView.wxml:
--------------------------------------------------------------------------------
1 |
2 |
10 |
--------------------------------------------------------------------------------
/pages/hello/hello.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/utils/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/common/itemList/itemList.js:
--------------------------------------------------------------------------------
1 | var cartModel = require('cartModel.js');
2 |
3 | var itemList = {
4 | //添加购物车
5 | add:function(e){
6 | cartModel.add(e);
7 | },
8 |
9 | //减车
10 | sub:function(){
11 | cartModel.sub();
12 | }
13 |
14 | }
15 |
16 | module.exports = itemList;
--------------------------------------------------------------------------------
/utils/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/pages/publishSuccess/publishSuccess.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 发布成功,等待审核
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/pages/protocol/protocol.wxss:
--------------------------------------------------------------------------------
1 | @import "../../app.wxss";
2 | @import "../../wxParse/wxParse.wxss";
3 | page {
4 | background: #f1f1f1;
5 | height: 100%;
6 | font-size: 28rpx;
7 | }
8 | .wrap {
9 | height: 100%;
10 | display: flex;
11 | flex-direction: column;
12 | padding-bottom: 100rpx;
13 | box-sizing: border-box;
14 | }
15 |
--------------------------------------------------------------------------------
/utils/.idea/utils.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/pages/logs/logs.js:
--------------------------------------------------------------------------------
1 | //logs.js
2 | var util = require('../../utils/util.js')
3 | Page({
4 | data: {
5 | logs: []
6 | },
7 | onLoad: function () {
8 | this.setData({
9 | logs: (wx.getStorageSync('logs') || []).map(function (log) {
10 | return util.formatTime(new Date(log))
11 | })
12 | })
13 | }
14 | })
15 |
--------------------------------------------------------------------------------
/pages/home/home.js:
--------------------------------------------------------------------------------
1 | // pages/home/home.js
2 | Page({
3 | data:{},
4 | onLoad:function(options){
5 | // 页面初始化 options为页面跳转所带来的参数
6 | },
7 | onReady:function(){
8 | // 页面渲染完成
9 | },
10 | onShow:function(){
11 | // 页面显示
12 | },
13 | onHide:function(){
14 | // 页面隐藏
15 | },
16 | onUnload:function(){
17 | // 页面关闭
18 | }
19 | })
--------------------------------------------------------------------------------
/pages/petDoctorSuccess/petDoctorSuccess.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 提交成功
8 |
9 |
10 |
--------------------------------------------------------------------------------
/pages/test/test.js:
--------------------------------------------------------------------------------
1 | Page({
2 | data:{
3 | text:"Page test",
4 | // lodding:true
5 | },
6 | onLoad:function(options){
7 | // 页面初始化 options为页面跳转所带来的参数
8 | },
9 | onReady:function(){
10 | // 页面渲染完成
11 | },
12 | onShow:function(){
13 | // 页面显示
14 | },
15 | onHide:function(){
16 | // 页面隐藏
17 | },
18 | onUnload:function(){
19 | // 页面关闭
20 | }
21 | })
22 |
23 |
--------------------------------------------------------------------------------
/common/header/header.wxml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/pages/test/test.wxml:
--------------------------------------------------------------------------------
1 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/pages/serviceDetail/serviceDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | {{tip}}
10 |
11 |
--------------------------------------------------------------------------------
/pages/main/main.wxss:
--------------------------------------------------------------------------------
1 | /**index.wxss**/
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 200rpx 0;
9 | box-sizing: border-box;
10 | }
11 | .userinfo {
12 | display: flex;
13 | flex-direction: column;
14 | align-items: center;
15 | }
16 | .userinfo-avatar {
17 | width: 128rpx;
18 | height: 128rpx;
19 | margin: 20rpx;
20 | border-radius: 50%;
21 | }
22 | .userinfo-nickname {
23 | color: #aaa;
24 | }
25 |
--------------------------------------------------------------------------------
/pages/services/services.wxss:
--------------------------------------------------------------------------------
1 | /* pages/services/services.wxss */
2 | page{
3 | background: #EFEFEF;
4 | }
5 | swiper{
6 | height: 480rpx;
7 | }
8 | image {
9 | width:100%;
10 | height:100%;
11 | display:inline-block;
12 | overflow:hidden;
13 | }
14 |
15 | .service-centent{
16 | display: flex;
17 | background: #EFEFEF;
18 | flex-direction:column;
19 | width: 100%;
20 | }
21 | .service-box {
22 | width: 100%;
23 | margin-top: 45rpx;
24 | }
25 | .service-box .service-icon{
26 | width: 33.3%;
27 | height: 240rpx;
28 |
29 | }
--------------------------------------------------------------------------------
/pages/hello/hello.wxss:
--------------------------------------------------------------------------------
1 | /* pages/hello/hello.wxss */
2 | .wrap{
3 | position: relative;
4 | width: 100%;
5 | height: 100%;
6 |
7 | }
8 | .wrap .image{
9 | width: 100%;
10 | height: 550rpx;
11 | }
12 | .wrap .oprator{
13 | display: flex;
14 | flex-direction: row;
15 | justify-content: center;
16 | align-items: center;
17 | position: fixed;
18 | bottom: 150rpx;
19 | left: 50%;
20 | }
21 | .wrap button{
22 | position: absolute;
23 | bottom: 10rpx;
24 | width: 200rpx;
25 | background-color: #FF9191;
26 | color: white;
27 | }
--------------------------------------------------------------------------------
/utils/util.js:
--------------------------------------------------------------------------------
1 | function formatTime(date) {
2 | var year = date.getFullYear()
3 | var month = date.getMonth() + 1
4 | var day = date.getDate()
5 |
6 | var hour = date.getHours()
7 | var minute = date.getMinutes()
8 | var second = date.getSeconds()
9 |
10 |
11 | return [year, month, day].map(formatNumber).join('/') + ' ' + [hour, minute, second].map(formatNumber).join(':')
12 | }
13 |
14 | function formatNumber(n) {
15 | n = n.toString()
16 | return n[1] ? n : '0' + n
17 | }
18 |
19 | module.exports = {
20 | formatTime: formatTime
21 | }
22 |
--------------------------------------------------------------------------------
/pages/labelList/labelList.wxss:
--------------------------------------------------------------------------------
1 | @import "../template/template.wxss";
2 | .container {
3 | height: 100%;
4 | display: flex;
5 | flex-direction: column;
6 | align-items: center;
7 | justify-content: space-between;
8 | padding: 0;
9 | margin: 0;
10 | box-sizing: border-box;
11 | }
12 | .wrap{
13 | width: 100%;
14 | padding:35rpx 20rpx 20rpx 20rpx;
15 | background-color: #fff;
16 | display: block;
17 | }
18 | .wrap image{
19 | height: 290rpx;
20 | }
21 | .goods-name{
22 | padding-top:20rpx;
23 | color: #222;
24 | font-size:30rpx;
25 | }
26 |
--------------------------------------------------------------------------------
/pages/labelList/labelList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{item.name}}
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/pages/publishSuccess/publishSuccess.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/icon.wxss";
2 | @import "/pages/template/template.wxss";
3 | /* 头部区 */
4 | page{
5 | font-family: "微软雅黑";
6 | background: white;
7 | }
8 |
9 | .iconfont{
10 | color: #36D49F;
11 | font-size: 50rpx;
12 | }
13 |
14 | .content{
15 | margin-top: 200rpx;
16 | display: flex;
17 | flex-direction: column;
18 | justify-content: center;
19 | align-items: center;
20 | }
21 | .content .content-image{
22 | width: 100rpx;
23 | height: 100rpx;
24 | }
25 | .content .content-text{
26 | margin-top: 50rpx;
27 | color: #9E9E9E;
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/pages/petDoctorSuccess/petDoctorSuccess.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/icon.wxss";
2 | @import "/pages/template/template.wxss";
3 | /* 头部区 */
4 | page{
5 | font-family: "微软雅黑";
6 | background: white;
7 | }
8 |
9 | .iconfont{
10 | color: #36D49F;
11 | font-size: 50rpx;
12 | }
13 |
14 | .content{
15 | margin-top: 200rpx;
16 | display: flex;
17 | flex-direction: column;
18 | justify-content: center;
19 | align-items: center;
20 | }
21 | .content .content-image{
22 | width: 100rpx;
23 | height: 100rpx;
24 | }
25 | .content .content-text{
26 | margin-top: 50rpx;
27 | color: #9E9E9E;
28 |
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/pages/serviceDetail/serviceDetail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/serviceDetail/serviceDetail.wxss */
2 | .service-centent{
3 | /* background: #EDEDED; */
4 | }
5 | .img-box{
6 | display: flex;
7 | justify-content: center;
8 | flex-direction:column;
9 | align-items: center;
10 | width: 100%;
11 | padding-bottom: 25rpx;
12 | }
13 | .if-view{
14 | display: flex;
15 | justify-content: center;
16 | flex-direction:column;
17 | align-items: center;
18 | width: 100%;
19 | }
20 | .service-img{
21 | display: flex;
22 | margin-top: 25rpx;
23 | width: 90%;
24 | }
25 | .no-data{
26 | margin-top: 10rpx;
27 | margin-bottom: 10rpx;
28 | }
--------------------------------------------------------------------------------
/common/footer/footer.wxss:
--------------------------------------------------------------------------------
1 | .footer{
2 | width:100%;
3 | height:100rpx;
4 | background: red;
5 | position: fixed;
6 | bottom: 0;
7 | left: 0;
8 | background-color: #fafafa;
9 | display: flex;
10 | flex-direction: row;
11 | flex-wrap: nowrap;
12 | justify-content: space-around;
13 | align-items: center;
14 | }
15 | .footer .item{
16 | display: flex;
17 | flex-direction:column;
18 | flex-wrap: nowrap;
19 | justify-content: center;
20 | align-items: center;
21 | }
22 | .footer .item .img{
23 | width:40rpx;
24 | height: 40rpx;
25 | margin-bottom: 10rpx;
26 | }
27 | .footer .item .name{
28 | font-size: 26rpx;
29 | }
--------------------------------------------------------------------------------
/project.config.json:
--------------------------------------------------------------------------------
1 | {
2 | "description": "项目配置文件。",
3 | "packOptions": {
4 | "ignore": []
5 | },
6 | "setting": {
7 | "urlCheck": true,
8 | "es6": true,
9 | "postcss": true,
10 | "minified": true,
11 | "newFeature": true
12 | },
13 | "compileType": "miniprogram",
14 | "libVersion": "2.0.9",
15 | "appid": "wxfba00556cd93a6a5",
16 | "projectname": "pet1",
17 | "isGameTourist": false,
18 | "condition": {
19 | "search": {
20 | "current": -1,
21 | "list": []
22 | },
23 | "conversation": {
24 | "current": -1,
25 | "list": []
26 | },
27 | "game": {
28 | "currentL": -1,
29 | "list": []
30 | },
31 | "miniprogram": {
32 | "current": -1,
33 | "list": []
34 | }
35 | }
36 | }
--------------------------------------------------------------------------------
/pages/petArticle/petArticle.wxss:
--------------------------------------------------------------------------------
1 | /* pages/petArticle/petArticle.wxss */
2 | @import "../../wxParse/wxParse.wxss";
3 | page{
4 | font-family: "微软雅黑";
5 | background: white;
6 | }
7 | .wrap {
8 | height: 100%;
9 |
10 | }
11 | .top .top-title{
12 | display: flex;
13 | flex-direction: row;
14 | justify-content: center;
15 | }
16 | .top .top-date{
17 | display: flex;
18 | flex-direction: row;
19 | justify-content: center;
20 | }
21 | .top .top-date{
22 | display: flex;
23 | flex-direction: row;
24 |
25 | }
26 | .top .top-date .author{
27 | color: #C1C1C1;
28 | margin-right: 10rpx;
29 | }
30 | .top .top-date .date{
31 | color: #C1C1C1;
32 | }
33 | .top .top-title .title{
34 | font-size: 35rpx;
35 | }
36 | .content{
37 | flex: 1;
38 | margin-top: 10rpx;
39 | padding:20rpx;
40 |
41 | }
--------------------------------------------------------------------------------
/pages/order/orderDetail/orderDetail.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 商品详情页js
3 | * @author micheal
4 | * @since 2017-01-23
5 | */
6 | var CONFIG = require('../../../utils/config.js');
7 | var app = getApp();
8 | var base_url = CONFIG.API_URL.BASE_URL;
9 |
10 | Page({
11 | data: {
12 | base_url: base_url,
13 | },
14 | onLoad: function (options) {
15 | // 页面初始化 options为页面跳转所带来的参数
16 | var that = this;
17 | var id = options.id;//订单id
18 |
19 | //获取商品信息
20 | wx.request({
21 | url: base_url + 'index.php?c=wxApp&a=findOrder',
22 | data: { "id": id },
23 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
24 | // header: {}, // 设置请求的 header
25 | success: function (result) {
26 | var orderInfo = result.data.data;
27 | that.setData({ orderInfo: orderInfo});
28 | }
29 | })
30 | }
31 | })
--------------------------------------------------------------------------------
/pages/main/main.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../utils/config.js');
2 | var base_url = CONFIG.API_URL.BASE_URL;
3 | var app = getApp()
4 | Page({
5 | data: {
6 | motto: 'Hello WeApp',
7 | userInfo: {},
8 | base_url: base_url,
9 | token:'',
10 |
11 | },
12 | formSubmit:function(e){
13 | let fromid = e.detail.formId;
14 |
15 | wx.request({
16 | url: base_url +'index.php/admin/Test/sendTempleMess',
17 | data: {form_id: fromid},
18 | header: {
19 | 'Content-Type': 'application/json'
20 | },
21 | success: function (res) {
22 |
23 | console.log(res,'成功');
24 |
25 | },
26 | fail: function (error) {
27 |
28 | console.log(error,'失败');
29 | },
30 |
31 | })
32 |
33 | },
34 | onLoad:function(){
35 |
36 | },
37 | onShow:function(){},
38 |
39 |
40 |
41 | })
42 |
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | //app.js
2 | var CONFIG = require('utils/config.js');
3 | var base_url = CONFIG.API_URL.BASE_URL;
4 | App({
5 | onLaunch: function () {
6 | //调用API从本地缓存中获取数据
7 | var logs = wx.getStorageSync('logs') || []
8 | logs.unshift(Date.now())
9 | wx.setStorageSync('logs', logs)
10 | },
11 | // 获取用户所有未读消息
12 | getUserNoReadNews:function(user_id, that){
13 | // 查找当前用户的所有未读消息并用数字的方式显示提醒
14 | let newCount = 0;
15 | wx.request({
16 | url: base_url + 'index.php/front/News/getCountForUserNoRead',
17 | data: {
18 | 'user_id': user_id,
19 | },
20 | method: "POST",
21 | success: function (res) {
22 |
23 | newCount = res.data.data;
24 | let nav_active = {
25 | newsCount: newCount
26 | };
27 | that.setData({
28 | nav_active: nav_active
29 | });
30 | }
31 | })
32 |
33 | }
34 |
35 |
36 |
37 |
38 | });
--------------------------------------------------------------------------------
/pages/labelList/labelList.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../utils/config.js');
2 | var Fun = require('../../utils/common.js')
3 | var app = getApp();
4 | var base_url = CONFIG.API_URL.BASE_URL;
5 | Page({
6 | data:{
7 | base_url: base_url,
8 | templateData:{ loadingBall:1 }
9 | },
10 | onLoad:function(options){
11 | var that = this;
12 | let url = base_url + 'index.php?c=wxApp&a=discountList';
13 | let cData = {pageSize: 3};
14 | // 页面初始化 options为页面跳转所带来的参数
15 | Fun.CurlPaging( that, url, cData, false);
16 | console.log('-------------------', that.data.list);
17 |
18 | },
19 | onReady:function(){
20 | // 页面渲染完成
21 | },
22 | onShow:function(){
23 | // 页面显示
24 | },
25 | onHide:function(){
26 | // 页面隐藏
27 | },
28 | onUnload:function(){
29 | // 页面关闭
30 | },
31 | onReachBottom: function(){
32 | //下拉加载
33 | var that = this;
34 | let cData = {pageSize: 3};
35 | Fun.CurlReachBottom(that, cData,)
36 | }
37 | })
--------------------------------------------------------------------------------
/pages/petDoctorSuccess/petDoctorSuccess.js:
--------------------------------------------------------------------------------
1 | // pages/petDoctorSuccess/petDoctorSuccess.js
2 | var CONFIG = require('../../utils/config.js');
3 | var Fun = require('../../utils/common.js')
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 |
11 | },
12 |
13 | /**
14 | * 生命周期函数--监听页面加载
15 | */
16 | onLoad: function (options) {
17 |
18 | },
19 |
20 | /**
21 | * 生命周期函数--监听页面初次渲染完成
22 | */
23 | onReady: function () {
24 |
25 | },
26 |
27 | /**
28 | * 生命周期函数--监听页面显示
29 | */
30 | onShow: function () {
31 |
32 | },
33 |
34 | /**
35 | * 生命周期函数--监听页面隐藏
36 | */
37 | onHide: function () {
38 |
39 | },
40 |
41 | /**
42 | * 生命周期函数--监听页面卸载
43 | */
44 | onUnload: function () {
45 |
46 | },
47 |
48 | /**
49 | * 页面相关事件处理函数--监听用户下拉动作
50 | */
51 | onPullDownRefresh: function () {
52 |
53 | },
54 |
55 | /**
56 | * 页面上拉触底事件的处理函数
57 | */
58 | onReachBottom: function () {
59 |
60 | },
61 |
62 | /**
63 | * 用户点击右上角分享
64 | */
65 | onShareAppMessage: function () {
66 |
67 | }
68 | })
--------------------------------------------------------------------------------
/pages/labelDetail/labelDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{desc || '专题详情'}}
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.title}}
19 | {{item.name}}
20 |
21 | ¥{{item.price}}
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/main/main",
4 | "pages/index/index",
5 | "pages/userCenter/userCenter/userCenter",
6 | "pages/goods/goodsDetail/goodsDetail",
7 | "pages/history/history",
8 | "pages/cateList/cateList",
9 | "pages/petArticle/petArticle",
10 | "pages/petArticleHome/petArticleHome",
11 | "pages/petArticleList/petArticleList",
12 | "pages/publishSuccess/publishSuccess",
13 | "pages/publish/publish",
14 | "pages/petDoctorSuccess/petDoctorSuccess",
15 | "pages/petDoctor/petDoctor",
16 | "pages/cate/cate",
17 | "pages/favorite/favorite",
18 | "pages/messageList/messageList",
19 | "pages/message/message",
20 |
21 | "pages/mapView/mapView"
22 |
23 | ],
24 | "window": {
25 | "backgroundTextStyle": "light",
26 | "navigationBarBackgroundColor": "#fff",
27 | "navigationBarTitleText": "宠物之家领养中心",
28 | "navigationBarTextStyle": "black"
29 | },
30 |
31 | "networkTimeout": {
32 | "request": 10000,
33 | "connectSocket": 10000,
34 | "uploadFile": 10000,
35 | "downloadFile": 10000
36 | },
37 | "debug": true
38 | }
--------------------------------------------------------------------------------
/common/header/header.wxss:
--------------------------------------------------------------------------------
1 |
2 | .header {
3 | height:80rpx;
4 | width:100%;
5 | position:fixed;
6 | top:0;
7 | left:0;
8 | z-index:99;
9 | background:#FE7774;
10 |
11 |
12 | }
13 | .header .main {
14 | display: flex;
15 | flex-direction: row;
16 | flex-wrap: nowrap;
17 | justify-content: space-between;
18 | align-items: center;
19 | width: 695rpx;
20 | height: 56rpx;
21 | color: #fff;
22 | font-weight: normal;
23 | margin: 0 auto;
24 | margin-top: 12rpx;
25 | padding: 0 18rpx;
26 | border-radius: 8rpx;
27 | font-size: 35rpx;
28 | background-color: rgba(255,255,255,.36);
29 | }
30 | .header .main .input {
31 | flex:1;
32 | margin-left:10rpx;
33 | font-size:10pt;
34 | color:#fff;
35 |
36 | }
37 | .header .main .place-holder {
38 | color: #fff;
39 | }
40 | .search{
41 | width: 50rpx;
42 | height: 50rpx;
43 | right:10rpx;
44 | padding: 0 5rpx;
45 | position: absolute;
46 | z-index: 999999;
47 | }
48 | .serach-button {
49 | width:20px;
50 | height:20px;
51 | display:inline-block;
52 | overflow:hidden;
53 |
54 | }
55 |
--------------------------------------------------------------------------------
/pages/login/login.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{phoneWarning}}
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 | {{getNum}}
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/pages/goods/labelGoodsList/labelGoodsList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{item.name}}
11 | 原价:¥{{item.ori_price}}
12 | 现价:¥{{item.price}}
13 | 下单
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 拼命加载中..
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/register/register.js:
--------------------------------------------------------------------------------
1 | var app = getApp()
2 | Page({
3 | data: {
4 | motto: 'Hello WeApp',
5 | userInfo: {},
6 | phoneWarning: "",
7 | },
8 | onButtonTap: function() {
9 | wx.navigateTo({
10 | url: '../logs/logs'
11 | })
12 | },
13 | listenerPhoneInput: function (e) {
14 | this.data.phone = e.detail.value;
15 | if (this.data.phone.length > 11 ) {
16 | this.setData({phoneWarning:'手机号码输入有误'});
17 | } else {
18 | this.setData({phoneWarning:''});
19 | }
20 | },
21 | getSmsCode:function(e) {
22 |
23 | },
24 | onLoad: function () {
25 | var that = this;
26 | //登录
27 | wx.login({
28 | success: function () {
29 | wx.getUserInfo({
30 | success: function (res) {
31 | that.setData({userInfo: res.userInfo})
32 | that.update()
33 | }
34 | })
35 | },
36 | fail: function (res) {
37 | console.log(res)
38 | }
39 | });
40 | }
41 | })
42 |
--------------------------------------------------------------------------------
/pages/protocol/protocol.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 商品详情页js
3 | * @author Moon
4 | *
5 | */
6 | var WxParse = require('../../wxParse/wxParse.js');
7 | var CONFIG = require('../../utils/config.js');
8 | // var WxParse = require('../../../wxParse/wxParse.js');
9 | var app = getApp();
10 | var base_url = CONFIG.API_URL.BASE_URL;
11 |
12 |
13 |
14 | Page({
15 | data: {
16 | base_url: base_url,
17 | current: 0,//记录当前tab的index
18 | hidden: true,//无评价时显示暂无评价,
19 | commentHidden: true,
20 | list: [],
21 | count: 1,//商品数量,默认为1
22 | firstIndex: -1,
23 | attrValueList: [],
24 | maskHidden: true,
25 | },
26 | /**
27 | * 生命周期函数--监听页面加载
28 | */
29 | onLoad: function (options) {
30 | var that = this;
31 | //获取商品详情
32 | wx.request({
33 | url: base_url + 'index.php?c=wxApp&a=getProtocol',
34 | data: {},
35 | method: 'GET',
36 | success: function ( res ) {
37 | var data = res.data.data;
38 | console.log('res:', res);
39 | //富文本信息转化
40 | WxParse.wxParse('detail_desc', 'html', data.item_value, that, 0);
41 | }
42 | });
43 | },
44 |
45 | /**
46 | * 生命周期函数--监听页面显示
47 | */
48 | onShow: function( ) {},
49 |
50 | /**
51 | * 生命周期函数--监听页面关闭
52 | */
53 | onUnload: function ( ) {},
54 |
55 | /**
56 | * 隐藏了
57 | */
58 | onHide: function () {},
59 |
60 | })
61 |
62 |
--------------------------------------------------------------------------------
/pages/goods/labelGoodsList/labelGoodsList.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | padding:0px;
3 | }
4 |
5 | .recommend-goods-diplay-area{
6 | padding: 10rpx ;
7 | background: #fff;
8 | }
9 | .recommend-goods-diplay-area .recommend-title{
10 | margin-top: 10rpx;
11 | padding: 5rpx 0;
12 | width: 100%;
13 | display: flex;
14 | font-size: 11pt;
15 | border-bottom: 1rpx solid #e5e5e5;
16 | margin-bottom: 5rpx;
17 | }
18 | .recommend-goods-diplay-area .recommend-goods-list{
19 |
20 | display: flex;
21 | flex-direction: row;
22 | flex-wrap: wrap;
23 |
24 | }
25 | image {
26 | width:100%;
27 | height:240rpx;
28 | display:inline-block;
29 | overflow:hidden;
30 |
31 | }
32 |
33 | .recommend-goods-list .goods-item{
34 | width: 46%;
35 | padding: 7rpx;
36 | float: left;
37 | font-size: 10pt;
38 | overflow: hidden;
39 | white-space: nowrap;
40 | text-overflow: ellipsis;
41 | position: relative;
42 | border-radius: 3rpx;
43 | margin: 5rpx;
44 | border: 1rpx solid #e7e7e7;
45 | }
46 | .goods-ori-price{
47 | text-decoration:line-through;
48 | color:#aaa;
49 | }
50 | .goods-price{
51 | color:#f45341;
52 | }
53 | .buy-now{
54 | position: absolute;
55 | background: #FF5C00;
56 | right: 10rpx;
57 | color:#fff;
58 | padding: 4rpx;
59 | border-radius: 5rpx;
60 | bottom: 10rpx;
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/common/itemList/itemList.wxss:
--------------------------------------------------------------------------------
1 | /** 购物车列表 **/
2 | /** 1、基础布局 **/
3 |
4 |
5 | /***商品推荐商品样式***/
6 | .recommend-goods-diplay-area{
7 | padding: 10rpx ;
8 | background: #fff;
9 | }
10 | .recommend-goods-diplay-area .recommend-title{
11 | margin-top: 10rpx;
12 | padding: 5rpx 0;
13 | width: 100%;
14 | display: flex;
15 | font-size: 11pt;
16 | border-bottom: 1rpx solid #e5e5e5;
17 | margin-bottom: 5rpx;
18 | }
19 | .recommend-goods-diplay-area .recommend-goods-list{
20 |
21 | display: flex;
22 | flex-direction: row;
23 | flex-wrap: wrap;
24 |
25 | }
26 | image {
27 | width:100%;
28 | height:240rpx;
29 | display:inline-block;
30 | overflow:hidden;
31 |
32 | }
33 |
34 | .recommend-goods-list .goods-item{
35 | width: 46%;
36 | padding: 7rpx;
37 | float: left;
38 | font-size: 10pt;
39 | overflow: hidden;
40 | white-space: nowrap;
41 | text-overflow: ellipsis;
42 | position: relative;
43 | border-radius: 3rpx;
44 | margin: 5rpx;
45 | border: 1rpx solid #e7e7e7;
46 | }
47 | .goods-ori-price{
48 | text-decoration:line-through;
49 | color:#aaa;
50 | }
51 | .goods-price{
52 | color:#f45341;
53 | }
54 | .buy-now{
55 | position: absolute;
56 | background: #FF5C00;
57 | right: 10rpx;
58 | color:#fff;
59 | padding: 4rpx;
60 | border-radius: 5rpx;
61 | bottom: 10rpx;
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/common/itemList/cartModel.js:
--------------------------------------------------------------------------------
1 | //购物车模型
2 | // 主要处理用户购买逻辑,同步数据到本地存储
3 | function CartModel(){
4 |
5 | }
6 | CartModel.prototype = {
7 | constructor:CartModel,
8 |
9 | init:function(){},
10 |
11 | //添加购物车车
12 | add:function(e){
13 | console.log(e);
14 | },
15 |
16 | //减少购物车
17 | sub:function(){},
18 |
19 | //购物车删除
20 | remove:function(){},
21 |
22 | //购物车清空
23 | empty:function(){},
24 |
25 | //批量添加到购物车车
26 | batchAdd:function(){},
27 |
28 | //是否可以添加到购物车
29 | canAdd:function(){},
30 |
31 | //storage key
32 | KEY:'model-cart-buy-counter',
33 |
34 | //保存到微信存储,异步进行
35 | setLocal:function(data){
36 | wx.setStorage({
37 | key: this.KEY,
38 | data: data,
39 | success: function(res){
40 | // success
41 | },
42 | fail: function() {
43 | // fail
44 | },
45 | complete: function() {
46 | // complete
47 | }
48 | })
49 | },
50 |
51 | //从微信取数据,异步进行
52 | getLocal:function(){
53 | wx.getStorage({
54 | key: this.KEY,
55 | success: function(res){
56 | // success
57 | },
58 | fail: function() {
59 | // fail
60 | },
61 | complete: function() {
62 | // complete
63 | }
64 | })
65 | }
66 | }
67 | module.exports = new CartModel();
--------------------------------------------------------------------------------
/pages/history/history.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../utils/config.js');
2 | var Fun = require('../../utils/common.js');
3 | var WxParse = require('../../wxParse/wxParse.js');
4 | //index.js
5 | var app = getApp();
6 | var base_url = CONFIG.API_URL.BASE_URL;
7 | var img_url = CONFIG.API_URL.IMG_URL;
8 | var elasticInfo = {};
9 | var pageIndex = 1;
10 | var pageSize = 10;
11 | var allPages = 0;
12 |
13 | Page({
14 | data: {
15 | headerBgOpacity: 0,
16 | home: "active",
17 | base_url: base_url,
18 | img_url: img_url,
19 | hidden: true,
20 | aid: 0,
21 | sliderInfo:'',
22 | aticleContent: '',
23 | templateData: {
24 | lodingBall: 1
25 | },
26 |
27 | },
28 |
29 | onShow: function () {
30 | var that = this;
31 |
32 |
33 |
34 |
35 | },
36 |
37 | onLoad: function (options) {
38 | var that = this;
39 | var id = options.urlid;
40 | console.log(options);
41 |
42 | //获取slide详情
43 | wx.request({
44 | url: base_url + 'index.php/front/slide/getSlideInfo',
45 | data: {
46 | 'id': id,
47 | },
48 | method: 'POST',
49 | success: function (res) {
50 | let data = res.data.data;
51 | that.setData({
52 | sliderInfo: data
53 | });
54 | console.log(data,"===========");
55 | }
56 | });
57 |
58 |
59 |
60 |
61 |
62 | },
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 | })
83 |
--------------------------------------------------------------------------------
/pages/coupon/couponList/couponList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{item.name}}
15 | ¥ {{item['value']}}
16 |
17 |
18 |
19 | 满{{item['condition_value']}}元使用
20 | {{item['btn_text']}}
21 |
22 | 有效期{{item['valid_start']}}~{{item['valid_end']}}
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | 我的优惠券
32 | 去使用
33 |
--------------------------------------------------------------------------------
/pages/mapView/mapView.js:
--------------------------------------------------------------------------------
1 | // pages/mapView/mapView.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | latitude: 23.099994,
9 | longitude: 113.324520,
10 | markers: [{
11 | id: 1,
12 | latitude: 23.099994,
13 | longitude: 113.324520,
14 | name: '定位地址'
15 | }],
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function (options) {
22 | var that = this;
23 | var latitude = parseFloat(options.latitude) ;
24 | var longitude = parseFloat(options.longitude);
25 | that.setData({
26 | latitude: latitude,
27 | longitude: longitude,
28 | markers: [{
29 | id: 1,
30 | latitude: latitude,
31 | longitude: latitude,
32 | name: '定位地址'
33 | }],
34 | });
35 | },
36 |
37 | /**
38 | * 生命周期函数--监听页面初次渲染完成
39 | */
40 | onReady: function () {
41 |
42 | },
43 |
44 | /**
45 | * 生命周期函数--监听页面显示
46 | */
47 | onShow: function () {
48 |
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面隐藏
53 | */
54 | onHide: function () {
55 |
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面卸载
60 | */
61 | onUnload: function () {
62 |
63 | },
64 |
65 | /**
66 | * 页面相关事件处理函数--监听用户下拉动作
67 | */
68 | onPullDownRefresh: function () {
69 |
70 | },
71 |
72 | /**
73 | * 页面上拉触底事件的处理函数
74 | */
75 | onReachBottom: function () {
76 |
77 | },
78 |
79 | /**
80 | * 用户点击右上角分享
81 | */
82 | onShareAppMessage: function () {
83 |
84 | }
85 | })
--------------------------------------------------------------------------------
/pages/register/register.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{phoneWarning}}
5 |
6 |
7 |
8 | 获取验证码
9 |
10 |
11 |
12 |
13 |
14 |
16 |
20 |
21 | {{item}}
22 |
23 |
24 | {{item}}
25 |
26 |
27 | {{item}}
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/goods/search/search.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 | {{item.name}}
19 | 原价:¥{{item.ori_price}}
20 | 现价:¥{{item.price}}
21 | 下单
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 拼命加载中..
30 |
31 |
32 |
--------------------------------------------------------------------------------
/pages/services/services.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 |
47 |
48 |
--------------------------------------------------------------------------------
/pages/login/login.wxss:
--------------------------------------------------------------------------------
1 | @import '/static/icon.wxss';
2 | @import '../template/template.wxss';
3 | .container{
4 | background: #fff;
5 | padding-top: 100rpx;
6 | }
7 | .container .item{
8 | position: relative;
9 | border-bottom: 1px solid #E7E7E7;
10 | width: 90%;
11 | padding: 40rpx 0 20rpx;
12 | }
13 | .container .icon-info{
14 | padding-right: 20rpx;
15 | display: inline-block;
16 | }
17 | .container .input-info{
18 | display: inline-block;
19 | width: 60%;
20 | }
21 | .phcolor{
22 | color: #C6C6C6;
23 | }
24 | .container .border-left{
25 | color: #E8065A;
26 |
27 | }
28 | .container .right-info{
29 | position: absolute;
30 | right: 10rpx;
31 | display: inline-block;
32 | }
33 | button{
34 | margin-top: 80rpx;
35 | width: 90%;
36 | }
37 | .container .icon-main {
38 | width: 50rpx;
39 | height: 50rpx;
40 | background-repeat: no-repeat;
41 | background-size: 100% 100%;
42 | }
43 | .register {
44 | display: flex;
45 | flex-direction: row;
46 | align-items: center;
47 | }
48 | .register input {
49 | flex: 1;
50 | display: flex;
51 | }
52 | .register image {
53 | width: 140rpx;
54 | height: 60rpx;
55 | }
56 | .register-wrap {
57 | display: flex;
58 | flex-direction: row;
59 | border-bottom: 1px solid #E7E7E7;
60 | width: 90%;
61 | height: 120rpx;
62 | align-items: center;
63 | }
64 | .register-wrap .icon {
65 | width: 50rpx;
66 | height: 50rpx;
67 | margin-right: 20rpx;
68 | }
69 | .register-wrap .img {
70 | width: 150rpx;
71 | }
72 | .register-wrap input {
73 | flex: 1;
74 | }
75 | .container .login-button{
76 | background-color: #E8065A;
77 | color: #fff;
78 | border-radius: 50rpx;
79 | }
--------------------------------------------------------------------------------
/pages/userCenter/userCenter/userCenter.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
14 |
52 |
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/pages/userCenter/personal/personal.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/personal/personal.wxss */
2 | .info-my,html{
3 | background-color: #EDEDED;
4 | }
5 | page{
6 | background: #EDEDED;
7 | font-family: "微软雅黑";
8 | }
9 | .info-item{
10 | padding: 25rpx 15rpx;
11 | border-bottom: 1px solid #EDEDED;
12 | background: #ffffff;
13 | overflow: hidden;
14 | }
15 | .info-item .item-intro{
16 | float: left;
17 | }
18 | .info-item .name-cont,.info-item .head-img-url{
19 | float: right;
20 | }
21 | .info-item .head-img-url{
22 | width: 60rpx;
23 | height: 60rpx;
24 | border-radius: 50%;
25 | }
26 | .head-img{
27 | line-height: 60rpx;
28 | }
29 | .info-item .edit-cont{
30 | text-align: right;
31 | }
32 | .btn-save{
33 | text-align: center;
34 | margin: 40rpx auto;
35 | padding: 16rpx;
36 | background: #EB4746;
37 | border-radius: 10rpx;
38 | color: #fff;
39 | width: 94%;
40 | }
41 | .place {
42 | display: flex;
43 | flex-direction: row;
44 | justify-content: space-between;
45 | }
46 | .place .item-right {
47 | flex: 1;
48 | text-align: right;
49 | }
50 |
51 | /* 选择器 */
52 | .citypickers{
53 | position: fixed;
54 | height: 100%;
55 | width: 100%;
56 | min-height: 100%;
57 | background-color: red;
58 | }
59 |
60 | .citypicker{
61 |
62 | }
63 | .citybody {
64 | position: fixed;
65 | bottom: 0px;
66 | background: #f2f2f2;
67 | z-index: 500;
68 | }
69 | .citybody view {
70 | text-align: center;
71 | }
72 |
73 | .cityheader {
74 | box-sizing: border-box;
75 | position: absolute;
76 | top:0px;
77 | width: 100%;
78 | z-index: 4;
79 | display: flex;
80 | flex-direction: row;
81 | justify-content: space-between;
82 | padding: 10rpx;
83 | font-size: 32rpx;
84 | /* background: #ccc; */
85 | border-top: 1px solid #dbdbdb;
86 | }
87 |
88 |
--------------------------------------------------------------------------------
/pages/order/orderDetail/orderDetail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | 订单时间{{orderInfo.add_time}}
7 | {{orderInfo.state_text}}
8 |
9 |
10 |
11 |
12 |
13 |
14 | {{goods.goods_name}}
15 |
16 |
17 | {{property.name}}:{{property.value}}
18 |
19 |
20 |
21 | ¥{{goods.price}}
22 | x{{goods.count}}
23 |
24 |
25 |
26 |
27 | {{orderInfo.address_text}}
28 | 快递公司:{{orderInfo.express_company}}
29 | 快递单号:{{orderInfo.express_number}}
30 |
31 |
37 |
38 |
--------------------------------------------------------------------------------
/pages/userCenter/addAddress/addAddress.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/addAddress/addAddress.wxss */
2 | page {
3 | /* background-color: #f0f0f0; */
4 | -webkit-text-size-adjust: 100%;
5 | font-family: "微软雅黑";
6 | }
7 | .container {
8 | padding: 0;
9 | background-color: #fff;
10 | }
11 | .input{
12 | display: flex;
13 | align-items: center;
14 | width: 100%;
15 | padding-left: 30rpx;
16 | padding-top: 28rpx;
17 | }
18 | .container .address-view {
19 | position: relative;
20 | height: 170rpx;
21 | line-height: 2;
22 | }
23 |
24 | .container .address-view input {
25 | border: 1px solid #ccc;
26 | padding: 7rpx 0;
27 | border-radius: 6rpx;
28 | padding-left: 5rpx;
29 | }
30 |
31 | .container .address-view .address {
32 | width: 500rpx;
33 | position: absolute;
34 | top: 20rpx;
35 | left: 150rpx;
36 | }
37 |
38 | .container .address-view .detail {
39 | width: 500rpx;
40 | position: absolute;
41 | top: 100rpx;
42 | left: 150rpx;
43 | }
44 |
45 | .container .save-address {
46 | width: 50%;
47 | color: #fff;
48 | background-color: #E8065A;
49 | line-height: 2;
50 | margin-top: 100rpx;
51 | border-radius: 0;
52 | }
53 |
54 | /* 选择器 */
55 | .citypickers{
56 | position: fixed;
57 | height: 100%;
58 | width: 100%;
59 | min-height: 100%;
60 | background-color: red;
61 | }
62 |
63 | .citypicker{
64 |
65 | }
66 | .citybody {
67 | position: fixed;
68 | bottom: 0px;
69 | background: #fff;
70 | }
71 | .citybody view {
72 | text-align: center;
73 | }
74 |
75 | .cityheader {
76 | box-sizing: border-box;
77 | position: absolute;
78 | top:0px;
79 | width: 100%;
80 | z-index: 4;
81 | display: flex;
82 | flex-direction: row;
83 | justify-content: space-between;
84 | padding: 10rpx;
85 | font-size: 32rpx;
86 | }
87 |
88 |
--------------------------------------------------------------------------------
/pages/petArticleHome/petArticleHome.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | {{currentCity}}
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 | {{item.name}}
41 |
42 |
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/pages/userCenter/userCenter/userCenter.js:
--------------------------------------------------------------------------------
1 | // pages/userCenter/userCenter.js
2 | var app = getApp();
3 | var CONFIG = require('../../../utils/config.js');
4 | var tools = require('../../../utils/tools.js');
5 | var wxLogin = require('../../../utils/wxLogin.js');
6 | var base_url = CONFIG.API_URL.BASE_URL;
7 | var userInfo = '';
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | userInfo:''
15 | },
16 | // 进入发布列表
17 | enter_messgeList:function(e){
18 | var status = e.currentTarget.dataset.status;
19 | wx.navigateTo({
20 | url: '../../messageList/messageList?status=' + status,
21 | })
22 | },
23 |
24 | enter_main:function(e){
25 | console.log("test");
26 | wx.navigateTo({
27 | url: '../../main/main',
28 | })
29 | },
30 | // 进入收藏列表
31 | enter_favorite:function(e){
32 | let that = this;
33 |
34 |
35 | wx.navigateTo({
36 | url: '../../favorite/favorite',
37 | })
38 | },
39 |
40 | /**
41 | * 生命周期函数--监听页面加载
42 | */
43 | onLoad: function (options) {
44 | var that = this;
45 | var userInfo = wx.getStorageSync('userInfo');
46 | if (userInfo.id == 0 || userInfo.id == 1 || userInfo.id == null || userInfo.id == undefined) {
47 | wx.redirectTo({
48 | url: '../pages/index/index'
49 | })
50 | }
51 | that.setData({
52 | userInfo: userInfo
53 | });
54 |
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面显示
59 | */
60 | onShow: function () {
61 | var that = this;
62 | let userInfo = that.data.userInfo;
63 | let user_id = userInfo.id;
64 | app.getUserNoReadNews(user_id, that);
65 | //设置底部导航信息:
66 | let nav_active = {
67 | center: 'active',
68 | circle: '',
69 |
70 | };
71 | that.setData({ nav_active: nav_active });
72 | },
73 |
74 |
75 |
76 |
77 |
78 |
79 | })
--------------------------------------------------------------------------------
/pages/template/template.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../utils/config.js');
2 | var Fun = require('../../utils/common.js');
3 | var app = getApp();
4 | var base_url = CONFIG.API_URL.BASE_URL;
5 | var img_url = CONFIG.API_URL.IMG_URL;
6 | Page({
7 | data:{
8 | text:"Page template",
9 | base_url: base_url,
10 | img_url: img_url,
11 | userInfo:'',
12 | },
13 | onLoad:function(options){
14 | // 页面初始化 options为页面跳转所带来的参数
15 | var that = this;
16 | let userInfo = wx.getStorageSync('userInfo');
17 | if (userInfo.id == 0 || userInfo.id == null || userInfo.id == undefined) {
18 | wx.redirectTo({
19 | url: '../pages/index/index'
20 | })
21 | }
22 | that.setData({
23 | userInfo: userInfo
24 | });
25 | console.log(userInfo,"============");
26 | // 查找当前用户的所有未读消息并用数字的方式显示提醒
27 | // wx.request({
28 | // url: base_url + 'index.php/front/message/paggingMessage',
29 | // data: {
30 | // 'city': city,
31 | // 'pageIndex': pageIndex,
32 | // 'pageSize': pageSize,
33 | // 'content': content,
34 | // 'status': 1,
35 | // },
36 | // method: "POST",
37 | // success: function (res) {
38 |
39 | // var data = res.data.data;
40 | // var dataList = data.dataList;
41 | // var messageList = that.data.messageList;
42 | // allPages = data.pageInfo.all_pages;
43 | // for (var i = 0; i < dataList.length; i++) {
44 | // messageList.push(dataList[i]);
45 | // }
46 | // that.setData({ messageList: messageList });
47 | // }
48 | // })
49 |
50 |
51 |
52 | },
53 | onReady:function(){
54 | // 页面渲染完成
55 | },
56 | onShow:function(){
57 | // 页面显示
58 | },
59 | onHide:function(){
60 | // 页面隐藏
61 | },
62 | onUnload:function(){
63 | // 页面关闭
64 | }
65 | })
--------------------------------------------------------------------------------
/common/itemList/itemList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 推荐商品
5 |
6 |
7 |
8 |
9 | {{item.name}}
10 | 原价:¥{{item.ori_price}}
11 | 现价:¥{{item.price}}
12 | 下单
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | {{item.name}}
23 |
24 |
25 |
26 |
27 | {{item.name}}
28 | 原价:¥{{item.ori_price}}
29 | 现价:¥{{item.price}}
30 | 下单
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/pages/register/register.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | /* background-color: #f0f0f0; */
3 | -webkit-text-size-adjust: 100%;
4 | font-family: "微软雅黑";
5 | }
6 | .container {
7 | padding: 0 60rpx;
8 | background-color: #fff;
9 | }
10 | .container .input{
11 | display: flex;
12 | align-items: center;
13 | width: 100%;
14 | padding: 40rpx 0 20rpx;
15 | border-bottom: 1px solid #DADADA;
16 | }
17 | .container .warning{
18 | color: #E8065A;
19 | }
20 | .container input{
21 | flex: 1;
22 | }
23 | .container .address-view {
24 | position: relative;
25 | height: 170rpx;
26 | line-height: 2;
27 | }
28 |
29 | .container .address-view input {
30 | border: 1px solid #ccc;
31 | padding: 7rpx 0;
32 | border-radius: 6rpx;
33 | padding-left: 5rpx;
34 | }
35 |
36 | .container .address-view .address {
37 | width: 500rpx;
38 | position: absolute;
39 | top: 20rpx;
40 | left: 150rpx;
41 | }
42 |
43 | .container .address-view .detail {
44 | width: 500rpx;
45 | position: absolute;
46 | top: 100rpx;
47 | left: 150rpx;
48 | }
49 |
50 | .container .save-address {
51 | width: 100%;
52 | color: #fff;
53 | background-color: #E8065A;
54 | line-height: 2;
55 | margin-top: 100rpx;
56 | border-radius: 0;
57 | }
58 |
59 | /* 选择器 */
60 | .citypickers{
61 | position: fixed;
62 | height: 100%;
63 | width: 100%;
64 | min-height: 100%;
65 | background-color: red;
66 | }
67 |
68 | .citypicker{
69 |
70 | }
71 | .citybody {
72 | position: fixed;
73 | bottom: 0px;
74 | background: #fff;
75 | }
76 | .citybody view {
77 | text-align: center;
78 | }
79 |
80 | .cityheader {
81 | box-sizing: border-box;
82 | position: absolute;
83 | top:0px;
84 | width: 100%;
85 | z-index: 4;
86 | display: flex;
87 | flex-direction: row;
88 | justify-content: space-between;
89 | padding: 10rpx;
90 | font-size: 32rpx;
91 | }
--------------------------------------------------------------------------------
/pages/goods/goodsSearch/goodsSearch.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 | 搜索
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 | {{goods.name}}
20 |
21 |
22 |
23 | {{goods.goods_count}}
24 |
25 |
26 |
27 |
28 | ¥{{goods.price}}
29 | ¥{{goods.ori_price}}
30 |
31 |
32 |
33 |
34 | {{tip}}
35 |
36 |
37 |
38 |
39 |
40 |
41 | {{count}}
42 |
43 |
44 |
--------------------------------------------------------------------------------
/pages/petArticleList/petArticleList.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 | {{item.title}}
38 |
39 |
40 |
41 | {{item.aticle_desc}}
42 |
43 |
44 |
45 |
46 |
47 | {{item.add_time}}
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
--------------------------------------------------------------------------------
/pages/userCenter/addAddress/addAddress.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 收件人:
6 |
7 |
8 |
9 | 手机号:
10 |
11 |
12 |
13 | 微信号:
14 |
15 |
16 |
17 | 省市区:
18 | {{province}} {{city}} {{county}}
19 |
20 |
21 | 详细地址:
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
31 |
35 |
36 | {{item}}
37 |
38 |
39 | {{item}}
40 |
41 |
42 | {{item}}
43 |
44 |
45 |
--------------------------------------------------------------------------------
/pages/userCenter/addressList/addressList.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/addressList/addressList.wxss */
2 | page {
3 | background-color: #f0f0f0;
4 | -webkit-text-size-adjust: 100%;
5 | font-family: "微软雅黑";
6 | }
7 | .container {
8 | padding: 0rpx;
9 | padding-bottom: 100rpx;
10 | width: 750rpx;
11 | background-color: #f3f3f3;
12 | height: 100%;
13 | }
14 | .container .separator{
15 | padding: 5px;
16 | width: 100%;
17 | background-color: #F2F2F2;
18 | }
19 | .container radio-group{
20 | width: 100%;
21 | }
22 | .container .address {
23 | /* width: 690rpx; */
24 | /* width: 100%; */
25 | /* margin: 20rpx 20rpx 0 20rpx; */
26 | /* border: 1rpx solid #ccc; */
27 | /* border-radius: 10rpx; */
28 | background-color: #fff;
29 | color: #656565;
30 | padding: 0 20rpx;
31 | }
32 |
33 | .container .address .address-content {
34 | border-bottom: 1rpx solid #ccc;
35 | padding: 10rpx 0;
36 | line-height: 1.7;
37 | }
38 |
39 | .container .address .address-content .address-name {
40 | color: black;
41 | font-size: 1.2em;
42 | justify-content: space-between;
43 | display: flex;
44 | padding: 20rpx 0;
45 | }
46 | .container .address .address-detail{
47 | padding-bottom: 20rpx;
48 | }
49 | .container .address .address-operate {
50 | padding: 20rpx 0;
51 | display: flex;
52 | /* position: relative; */
53 | line-height: 1.7;
54 | margin-bottom: 10rpx;
55 | }
56 | .container .address .address-operate .checkbox{
57 | display: flex;
58 | align-items: center;
59 | }
60 | .container .address .address-operate .radio-image{
61 | width: 38rpx;
62 | height: 38rpx;
63 | padding-right: 8rpx;
64 | }
65 | .container .address .address-operate .edit-address {
66 | position: absolute;
67 | right: 140rpx;
68 | /*color: #e43339;*/
69 | border: 1rpx #ccc solid;
70 | padding: 0rpx 10rpx;
71 | }
72 |
73 | .container .address .address-operate .delete-address {
74 | position: absolute;
75 | right: 20rpx;
76 | /*color: #e43339;*/
77 | border: 1rpx #ccc solid;
78 | padding: 0rpx 10rpx;
79 | }
80 |
81 | .container .add-address {
82 | color: #010105;
83 | background-color: #fff;
84 | width: 100%;
85 | text-align: center;
86 | position: fixed;
87 | bottom: 0;
88 | /* border-radius: 10rpx; */
89 | line-height: 80rpx;
90 | left: 0;
91 | }
92 |
--------------------------------------------------------------------------------
/pages/userCenter/addressList/addressList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 | {{address.call_name}}
11 | {{address.phone}}
12 |
13 |
14 | {{address.wechat_number}}
15 |
16 |
17 | {{address.address.city}}{{address.address.detail}}
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 |
--------------------------------------------------------------------------------
/pages/order/paymentOrder/paymentOrder.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | 收货人:{{address.call_name}}
8 | {{address.phone}}
9 |
10 |
11 | 收货地址:{{address.address}}
12 |
13 |
14 |
15 |
16 |
17 |
18 | 订单号码:{{order_num}}
19 | 订单时间:{{add_time}}
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 | {{goods.goods_name}}
31 |
32 |
33 | {{property.name}}:{{property.value}}
34 |
35 |
36 |
37 |
38 | ¥{{goods.price}}
39 | ×{{goods.count}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 订单金额:
49 | {{real_money}}
50 |
51 |
52 | 减免:
53 | -{{min}}
54 |
55 |
56 | 运费:
57 | +{{fee}}
58 |
59 |
60 | 需支付:
61 | {{money}}
62 |
63 |
64 |
65 |
68 |
69 |
70 | 微信支付
71 | 货到付款
72 |
73 |
74 |
--------------------------------------------------------------------------------
/pages/coupon/myCoupon/myCoupon.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/orderList/orderList.wxss */
2 | page{
3 | font-family: "微软雅黑";
4 | display: block;
5 | min-height: 100%;
6 | background-color: #f3f3f3;
7 | }
8 | .container {
9 | padding: 0;
10 | padding-top: 100rpx;
11 | padding-bottom: 160rpx;
12 | background-color: #f3f3f3;
13 | }
14 |
15 | /*导航栏样式*/
16 |
17 | .swiper-tab {
18 | width: 100%;
19 | border-bottom: 2rpx solid #EAEAEA;
20 | text-align: center;
21 | line-height: 80rpx;
22 | position: fixed;
23 | z-index: 10;
24 | top: -1rpx;
25 | background: #fff;
26 | }
27 |
28 | .swiper-tab-list {
29 | font-size: 30rpx;
30 | display: inline-block;
31 | width: 25%;
32 | color: #777;
33 | }
34 |
35 | .on {
36 | color: #EB4746;
37 | border-bottom: 5rpx solid #EB4746;
38 | }
39 |
40 | /*订单样式*/
41 |
42 | .coupon-list .coupon {
43 | position: relative;
44 | margin-bottom: 10px;
45 | color: #ffffff;
46 | min-height: 160px;
47 | padding: 0 10px;
48 | }
49 | .coupon-list image {
50 | box-sizing: border-box;
51 | width: 100%;
52 | height: 160px;
53 | float: left;
54 | border-radius: 8px;
55 | -webkit-border-radius: 8px;
56 | -moz-border-radius: 8px;
57 | }
58 |
59 | .coupon-list .coupon-content {
60 | color: #EC4045;
61 | position: absolute;
62 | left: 0;
63 | top: 10px;
64 | height: 100%;
65 | width: 100%;
66 | }
67 | .coupon-list .coupon-content .coupon-top{
68 | font-size: 22px;
69 | height: 70px;
70 | padding: 0 20px;
71 | display: flex;
72 | align-items: center;
73 | justify-content: space-between;
74 | }
75 | .coupon-list .coupon-content .coupon-bottom{
76 | display: flex;
77 | flex-direction: column;
78 | justify-content: flex-end;
79 | height: 65px;
80 | padding: 0 20px;
81 | }
82 | .coupon-list .coupon-content .coupon-bottom .top-info{
83 | padding-bottom: 6px;
84 | font-size: 16px;
85 | }
86 | .coupon-list .coupon-content .coupon-bottom .bottom-info{
87 | font-size: 11px;
88 | color: #989898;
89 | }
90 | .cf{
91 | color: #989898;
92 | }
93 | .btnText{
94 | position: fixed;
95 | bottom: 0px;
96 | z-index: 2;
97 | background: #fff;
98 | display: flex;
99 | justify-content: center;
100 | align-items: center;
101 | height: 50px;
102 | width: 100%;
103 | font-size: 20px;
104 | border: 1px solid #EBEBEB;
105 | }
--------------------------------------------------------------------------------
/pages/message/message.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/icon.wxss";
2 | @import "/pages/template/template.wxss";
3 | page{
4 | width: 100%;
5 | height: 100%;
6 | padding-bottom: 75rpx;
7 | background: #F4F4F4;
8 | }
9 | .wrap{
10 | background:white;
11 | }
12 | .wrap .space-line{
13 | width:750rpx;
14 | height: 5rpx;
15 | background: #F0F0F0;
16 | }
17 | .wrap .wrap-header {
18 |
19 | padding:10rpx 85rpx;
20 |
21 |
22 | }
23 | .wrap .wrap-header .wrap-header-content{
24 | display:flex;
25 | flex-direction:row;
26 | align-items:center;
27 | border: 1rpx solid #ffd343;
28 | border-radius: 20rpx;
29 | z-index: 999;
30 | }
31 |
32 | .wrap .wrap-header .wrap-header-content .wrap-view{
33 | border-left: 1rpx solid #ffd343;
34 | border-right: 1rpx solid #ffd343;
35 | display: flex;
36 | flex-direction: row;
37 | justify-content: center;
38 | align-items: center;
39 | color: #ffd343;
40 | background: white;
41 | z-index: 888;
42 | width: 33.3%;
43 | height: 50rpx;
44 | }
45 | .wrap .wrap-header .wrap-header-content .wrap-view.selected{
46 | border: 0;
47 | color: white;
48 | background: #ffd343;
49 |
50 | }
51 | .wrap .wrap-header .wrap-header-content .wrap-left{
52 | border-left: 0;
53 | border-top-left-radius:20rpx;
54 | border-bottom-left-radius: 20rpx;
55 | }
56 | .wrap .wrap-header .wrap-header-content .wrap-right{
57 | border-right: 0;
58 | border-top-right-radius:20rpx;
59 | border-bottom-right-radius: 20rpx;
60 |
61 | }
62 | .wrap .wrap-header .wrap-header-content .wrap-middle{
63 | border-left: 0;
64 | border-right: 0;
65 | }
66 | .content{
67 | padding: 0rpx 40rpx;
68 | }
69 | .content .content-item{
70 | display: flex;
71 | flex-direction: column;
72 | border-bottom: 2rpx solid #F0F0F0;
73 |
74 | }
75 | .content .content-item .content-top{
76 | display:flex;
77 | flex-direction:row;
78 | justify-content:space-between;
79 | height:60rpx;
80 | align-items:center;
81 |
82 | }
83 | .content .content-item .content-top .content-top-left{
84 | color: #666666;
85 | font-size: 30rpx;
86 | }
87 | .content .content-item .content-top .content-top-right{
88 | color: #999999;
89 | }
90 | .content .content-item .content-bottom{
91 | color: #999999;
92 | padding-bottom: 20rpx;
93 | }
--------------------------------------------------------------------------------
/pages/test/test.wxss:
--------------------------------------------------------------------------------
1 | /* 基本样式 */
2 |
3 | .loding-wrap.loaded {
4 | transition: opacity .25s linear;
5 | opacity: 1;
6 | display: flex;
7 | flex-direction:row;
8 | justify-content: center;
9 | }
10 |
11 | .loding-wrap .loader {
12 | box-sizing: border-box;
13 | display: flex;
14 | flex: 0 1 auto;
15 | flex-direction: column;
16 | flex-grow: 1;
17 | flex-shrink: 0;
18 | flex-basis: 25%;
19 | width: 25%;
20 | height: 100rpx;
21 | align-items: center;
22 | justify-content: center;
23 | }
24 |
25 | /* 动画效果:Curl */
26 |
27 | @-webkit-keyframes scale {
28 | 0% {
29 | -webkit-transform: scale(1);
30 | transform: scale(1);
31 | opacity: 1; }
32 |
33 | 45% {
34 | -webkit-transform: scale(0.1);
35 | transform: scale(0.1);
36 | opacity: 0.7; }
37 |
38 | 80% {
39 | -webkit-transform: scale(1);
40 | transform: scale(1);
41 | opacity: 1; } }
42 | @keyframes scale {
43 | 0% {
44 | -webkit-transform: scale(1);
45 | transform: scale(1);
46 | opacity: 1; }
47 |
48 | 45% {
49 | -webkit-transform: scale(0.1);
50 | transform: scale(0.1);
51 | opacity: 0.7; }
52 |
53 | 80% {
54 | -webkit-transform: scale(1);
55 | transform: scale(1);
56 | opacity: 1; } }
57 |
58 | .ball-pulse > view:nth-child(0) {
59 | -webkit-animation: scale 0.99s 0s infinite cubic-bezier(.2, .68, .18, 1.08);
60 | animation: scale 0.99s 0s infinite cubic-bezier(.2, .68, .18, 1.08); }
61 | .ball-pulse > view:nth-child(1) {
62 | -webkit-animation: scale 0.99s 0.12s infinite cubic-bezier(.2, .68, .18, 1.08);
63 | animation: scale 0.99s 0.12s infinite cubic-bezier(.2, .68, .18, 1.08); }
64 | .ball-pulse > view:nth-child(2) {
65 | -webkit-animation: scale 0.99s 0.24s infinite cubic-bezier(.2, .68, .18, 1.08);
66 | animation: scale 0.99s 0.24s infinite cubic-bezier(.2, .68, .18, 1.08); }
67 | .ball-pulse > view:nth-child(3) {
68 | -webkit-animation: scale 0.99s 0.36s infinite cubic-bezier(.2, .68, .18, 1.08);
69 | animation: scale 0.99s 0.36s infinite cubic-bezier(.2, .68, .18, 1.08); }
70 | .ball-pulse > view {
71 | background-color: #999; /*小球颜色*/
72 | width: 15px;
73 | height: 15px;
74 | border-radius: 100%;
75 | margin: 2px;
76 | -webkit-animation-fill-mode: both;
77 | animation-fill-mode: both;
78 | display: inline-block; }
79 |
--------------------------------------------------------------------------------
/pages/publishSuccess/publishSuccess.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../utils/config.js');
2 | var Fun = require('../../utils/common.js')
3 | //index.js
4 | var app = getApp();
5 | var base_url = CONFIG.API_URL.BASE_URL;
6 | var img_url = CONFIG.API_URL.IMG_URL;
7 | var elasticInfo = {};
8 | var pageIndex = 1;
9 | var pageSize = 10;
10 | var allPages = 0;
11 | Page({
12 | data: {
13 | headerBgOpacity: 0,
14 | home: "active",
15 | base_url: base_url,
16 | img_url: img_url,
17 | hidden: true,
18 | messageList: [],
19 | currentCity: '',
20 | templateData: {
21 | lodingBall: 1
22 | },
23 | inputContent: '',
24 | },
25 |
26 | inputContent: function (e) {
27 | var that = this;
28 | that.setData({
29 | inputContent: e.detail.value
30 | });
31 |
32 | },
33 | //enter_petDoctor进入宠物医生
34 | enter_petDoctor: function () {
35 | var that = this;
36 | wx.navigateTo({
37 | url: '../petDoctor/petDoctor',
38 | })
39 | },
40 |
41 |
42 |
43 |
44 | onShow: function () {
45 | var that = this;
46 | //设置底部导航信息:
47 | let nav_active = {
48 | home: 'active',
49 | circle: '',
50 | center: ''
51 | };
52 | that.setData({ nav_active: nav_active });
53 |
54 |
55 |
56 |
57 | },
58 | // 点击进入宠物百科页面
59 | enter_petarticleList: function (e) {
60 | var cid = e.currentTarget.dataset.cid;
61 | console.log(cid);
62 | wx.navigateTo({
63 | url: '../petArticleHome/petArticleHome?cid=' + cid,
64 | })
65 | },
66 | onLoad: function (options) {
67 | var that = this;
68 |
69 | // Fun.CurlPaging(that,base_url+'index.php?c=wxApp&a=pagingLabel', cData, false);
70 |
71 | // 分页展示
72 |
73 |
74 |
75 | //获取页面公共数据
76 | Fun.getAppElastic(that, base_url, that.commonSet);
77 |
78 |
79 | },
80 |
81 | //测试方法:回调
82 | commonSet: function (elasticInfo) {
83 | var that = this;
84 | //1. 设置页头
85 | // wx.setNavigationBarTitle({
86 | // title: elasticInfo.pageTitle,
87 | // success: function(res) {
88 | // // success
89 | // }
90 | // })
91 | // //2. 版权信息设置
92 | // that.setData({
93 | // copyrightInfo: elasticInfo.copyright
94 | // });
95 | },
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 | })
114 |
--------------------------------------------------------------------------------
/pages/userCenter/addressList/addressList.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('../../../utils/config.js');
2 | var base_url = CONFIG.API_URL.BASE_URL;
3 | var app = getApp();
4 | var userInfo = wx.getStorageSync('userInfo');
5 |
6 | var loadPage = function(that){
7 | wx.request({
8 | url: base_url + 'index.php?c=wxApp&a=addressList',
9 | data: { id: userInfo.id },
10 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
11 | success: function (res) {
12 | console.log('res.data:', res.data);
13 | that.setData({
14 | list: res.data
15 | });
16 | }
17 | })
18 | };
19 | Page({
20 | data: {},
21 | onLoad: function (options) {
22 | var that = this;
23 | loadPage(that);
24 | },
25 | onShow:function(){
26 | var that = this;
27 | loadPage(that);
28 | },
29 | changeRadio: function (e) {//点击单选按钮 改变默认地址
30 | var checkedId = e.currentTarget.dataset.id;
31 | console.log('e:', e);
32 | console.log('checkedId:', checkedId);
33 | var that = this;
34 | wx.request({
35 | url: base_url + 'index.php?c=wxApp&a=setDefaultAddress',
36 | data: {
37 | id: checkedId,
38 | user_id: userInfo.id
39 | },
40 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
41 | success: function (res) {
42 | var list = that.data.list;
43 | console.log('list', that.data.list);
44 | for (var i = 0; i < list.length; i++){
45 | list[i].is_default = checkedId == list[i].id ? 1 : 0;
46 | }
47 | that.setData({ list: list });
48 | }
49 | })
50 | },
51 | eidtAddress: function (e) {//跳转到编辑地址页面
52 | wx.navigateTo({ url: '../addAddress/addAddress?id=' + e.target.dataset.id });
53 | },
54 | addAddress: function () {//跳转到添加地址页面
55 | wx.navigateTo({ url: '../addAddress/addAddress' });
56 | },
57 | deleteAddress: function (e) {//删除地址
58 | var id = e.target.dataset.id;
59 | var that = this;
60 | wx.request({
61 | url: base_url + 'index.php?c=wxApp&a=deleteAddress',
62 | data: { id: id, user_id: userInfo.id },
63 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
64 | success: function (res) {
65 | var list = that.data.list;
66 | console.log(list);
67 | for (var i = 0; i < list.length; i++) {
68 | if (list[i].id == id) {
69 | list.splice(i, 1);
70 | break;
71 | }
72 | }
73 | that.setData({ list: list });
74 | }
75 | })
76 | }
77 | })
--------------------------------------------------------------------------------
/pages/coupon/myCoupon/myCoupon.js:
--------------------------------------------------------------------------------
1 |
2 | var CONFIG = require('../../../utils/config.js');
3 | //index.js
4 | var app = getApp();
5 | var base_url = CONFIG.API_URL.BASE_URL;
6 | var userInfo = wx.getStorageSync('userInfo');
7 | var state = '';
8 | var page = 1;
9 | var pageSize = 6;
10 | var allPages = 0;
11 | var optionData = '';
12 |
13 | var pagingGoods = function ( that) {
14 | wx.request({
15 | url: base_url + 'index.php?c=wxApp&a=pagingMyCoupon',
16 | data: {
17 | user_id: userInfo.id,
18 | state:state,
19 | pageIndex: page,
20 | pageSize: pageSize,
21 | },
22 | method: 'GET',
23 | success: function (res) {
24 | var data = res.data.data;
25 | // console.log(res,'resss');
26 | var dataList = data.dataList;
27 | var list = that.data.list;
28 | allPages = data.pageInfo.all_pages;
29 | for (var i = 0; i < dataList.length; i++) {
30 | list.push(dataList[i])
31 | }
32 | that.setData({ list: list });
33 | console.log('list:', list);
34 | page++;
35 | }
36 | })
37 | };
38 |
39 | Page({
40 | data: {
41 | currentTab:99,
42 | headerBgOpacity: 0,
43 | base_url: base_url,
44 | list: []
45 | },
46 |
47 | onLoad: function (options) {
48 | optionData = options;
49 | },
50 | onUnload: function () {
51 | page = 1;
52 | pageSize = 6;
53 | allPages=0;
54 | this.setData({
55 | list:[],
56 | })
57 | },
58 |
59 | /**
60 | * 生命周期函数--监听页面显示
61 | */
62 | onShow: function () {
63 | page = 1;
64 | this.setData({
65 | list: [],
66 | })
67 | var that = this;
68 | state = optionData.currentTab;
69 | state = state == 99 ? '' : state;
70 | pagingGoods( that)
71 | },
72 |
73 |
74 | /**
75 | * 触底加载
76 | */
77 | onReachBottom: function (options) {
78 | var that = this;
79 | if (page > allPages) {
80 | return false;
81 | } else {
82 | pagingGoods( that);
83 | }
84 | },
85 |
86 | /**
87 | * 点击切换排序
88 | */
89 | swichNav: function (e, options) {
90 | var that = this;
91 | state = e.currentTarget.dataset.current;
92 | //设置页面显示样式 分页数据初始化
93 | that.setData({ currentTab:state,list: [] });
94 | state = state == 99 ? '' : state;
95 | page = 1;
96 | pagingGoods( that);
97 |
98 | },
99 | //去领券中心
100 | goCoupon: function () {
101 | wx.navigateTo({
102 | url: '/pages/coupon/couponList/couponList',
103 | });
104 | },
105 | })
--------------------------------------------------------------------------------
/pages/goods/search/search.wxss:
--------------------------------------------------------------------------------
1 | .container{
2 | padding:35px 0;
3 | }
4 |
5 | .recommend-goods-diplay-area{
6 | padding: 10rpx ;
7 | background: #fff;
8 | }
9 | .recommend-goods-diplay-area .recommend-title{
10 | margin-top: 10rpx;
11 | padding: 5rpx 0;
12 | width: 100%;
13 | display: flex;
14 | font-size: 11pt;
15 | border-bottom: 1rpx solid #e5e5e5;
16 | margin-bottom: 5rpx;
17 | }
18 | .recommend-goods-diplay-area .recommend-goods-list{
19 |
20 | display: flex;
21 | flex-direction: row;
22 | flex-wrap: wrap;
23 |
24 | }
25 | image {
26 | width:100%;
27 | height:240rpx;
28 | display:inline-block;
29 | overflow:hidden;
30 |
31 | }
32 |
33 | .recommend-goods-list .goods-item{
34 | width: 46%;
35 | padding: 7rpx;
36 | float: left;
37 | font-size: 10pt;
38 | overflow: hidden;
39 | white-space: nowrap;
40 | text-overflow: ellipsis;
41 | position: relative;
42 | border-radius: 3rpx;
43 | margin: 5rpx;
44 | border: 1rpx solid #e7e7e7;
45 | }
46 | .goods-ori-price{
47 | text-decoration:line-through;
48 | color:#aaa;
49 | }
50 | .goods-price{
51 | color:#f45341;
52 | }
53 | .buy-now{
54 | position: absolute;
55 | background: #FF5C00;
56 | right: 10rpx;
57 | color:#fff;
58 | padding: 4rpx;
59 | border-radius: 5rpx;
60 | bottom: 10rpx;
61 | }
62 | .header {
63 | height:80rpx;
64 | width:100%;
65 | position:fixed;
66 | top:0;
67 | left:0;
68 | z-index:99;
69 | background:#FE7774;
70 |
71 |
72 | }
73 | .header .main {
74 | display: flex;
75 | flex-direction: row;
76 | flex-wrap: nowrap;
77 | justify-content: space-between;
78 | align-items: center;
79 | width: 695rpx;
80 | height: 56rpx;
81 | color: #fff;
82 | font-weight: normal;
83 | margin: 0 auto;
84 | margin-top: 12rpx;
85 | padding: 0 18rpx;
86 | border-radius: 8rpx;
87 | font-size: 35rpx;
88 | background-color: rgba(255,255,255,.36);
89 | }
90 | .header .main .input {
91 | flex:1;
92 | margin-left:10rpx;
93 | font-size:10pt;
94 | color:#fff;
95 |
96 | }
97 | .header .main .place-holder {
98 | color: #fff;
99 | }
100 | .search{
101 | width: 50rpx;
102 | height: 50rpx;
103 | right:10rpx;
104 | padding: 0 5rpx;
105 | position: absolute;
106 | z-index: 999999;
107 | }
108 | .serach-button {
109 | width:20px;
110 | height:20px;
111 | display:inline-block;
112 | overflow:hidden;
113 |
114 | }
115 |
--------------------------------------------------------------------------------
/pages/userCenter/personal/personal.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 | {{province}} {{city}} {{county}}
39 |
40 |
41 |
42 |
43 | 我的地址
44 |
45 |
46 |
47 | 保存
48 |
49 |
50 |
51 |
52 |
56 |
57 | {{item}}
58 |
59 |
60 | {{item}}
61 |
62 |
63 | {{item}}
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/pages/comment/comment.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | {{goods.goods_name}}
9 |
10 |
11 | {{property.name}}:{{property.value}}
12 |
13 |
14 |
15 |
16 | ¥{{goods.price}}
17 | ×{{goods.count}}
18 |
19 |
20 |
21 |
22 |
23 |
24 | 描述相符
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ×
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 | 匿名
59 |
60 |
61 |
62 | 发表评论
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/pages/coupon/myCoupon/myCoupon.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 | {{item.name}}
27 | ¥ {{item['value']}}
28 |
29 |
30 | 满{{item['condition_value']}}元使用
31 | 有效期{{item['valid_start']}}~{{item['valid_end']}}
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 现金抵扣券
45 | ¥ {{item['value']}}
46 |
47 |
48 | 满{{item['condition_value']}}元使用
49 | 有效期 {{item['valid_start']}}~{{item['valid_end']}}
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | 去领券中心
--------------------------------------------------------------------------------
/pages/order/orderDetail/orderDetail.wxss:
--------------------------------------------------------------------------------
1 | /* pages/order/orderDetail/orderDetail.wxss */
2 |
3 | .container {
4 | padding: 20rpx;
5 | }
6 |
7 | .goods-item {
8 | margin-top:20rpx;
9 | background-color: #fff;
10 | }
11 |
12 | .goods-item .order-head {
13 | display: flex;
14 | font-size: 28rpx;
15 | line-height: 60rpx;
16 | position: relative;
17 | padding: 0 20rpx;
18 | border-bottom: 1rpx solid #eee;
19 | border-top: 1rpx solid #eee;
20 | }
21 |
22 | .goods-item .order-head .order-time {
23 | }
24 |
25 | .goods-item .order-head .order-state {
26 | color: #4caf50;
27 | position: absolute;
28 | right: 180rpx;
29 | }
30 |
31 | .goods-item .order-head .order-detail {
32 | position: absolute;
33 | right: 20rpx;
34 | top: 10rpx;
35 | background: #4caf50;
36 | width: 140rpx;
37 | line-height: 40rpx;
38 | border-radius: 6rpx;
39 | color: #fff;
40 | text-align: center;
41 | text-decoration: none;
42 | }
43 |
44 | .goods-item .order-body {
45 | font-size: 28rpx;
46 | padding: 20rpx;
47 | }
48 |
49 | .goods-item .order-body .goods {
50 | display: flex;
51 | }
52 |
53 | .goods-item .order-body .goods .img {
54 | width: 240rpx;
55 | height: 160rpx;
56 | border-radius: 10rpx;
57 | margin-right: 10px;
58 | }
59 |
60 | .goods-item .order-body .goods .goods-info {
61 | padding-top: 20rpx;
62 | }
63 |
64 | .goods-item .order-body .goods .goods-info .name {
65 | font-size: 30rpx;
66 | }
67 |
68 | .goods-item .order-body .goods .goods-info .price-num {
69 | width: 490rpx;
70 | position: relative;
71 | display: flex;
72 | }
73 |
74 | .goods-item .order-body .goods .goods-info .price-num .goods-num {
75 | position: absolute;
76 | right: 20rpx;
77 | }
78 |
79 | .goods-item .order-foot {
80 | font-size: 28rpx;
81 | padding: 20rpx;
82 | border-top: 1rpx solid #eee;
83 | border-bottom: 1rpx solid #eee;
84 | }
85 |
86 | .goods-item .order-foot .total-price {
87 | position: relative;
88 | display: flex;
89 | }
90 |
91 | .goods-item .order-foot .total-price .total-money {
92 | position: absolute;
93 | right: 20rpx;
94 | color: #ff6000;
95 | }
96 |
97 | .goods-item .order-foot .option button {
98 | font-size: 28rpx;
99 | width: 175rpx;
100 | line-height: 46rpx;
101 | margin-right: 0rpx;
102 | margin-top:10rpx;
103 | border:1rpx solid #ccc;
104 | }
105 | .goods-item .order-foot .option button.refund_order{
106 | color:#fff;
107 | background-color:#FF2525;
108 | }
109 |
110 | .goods-item .order-foot .option button.confirm_order{
111 | color:#fff;
112 | background-color:#31B0D5;
113 | }
114 |
115 | .goods-item .order-foot .option button.success_order{
116 | color:#fff;
117 | background-color:#7AB900;
118 | }
119 |
--------------------------------------------------------------------------------
/pages/serviceDetail/serviceDetail.js:
--------------------------------------------------------------------------------
1 | // pages/services/services.js
2 | var itemList = require('../../common/itemList/itemList.js');
3 | var CONFIG = require('../../utils/config.js');
4 |
5 | var app = getApp();
6 | var base_url = CONFIG.API_URL.BASE_URL;
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | base_url: base_url,
15 | flag: 0,
16 | noData: false
17 | },
18 |
19 | /**
20 | * 生命周期函数--监听页面加载
21 | */
22 | onLoad: function (options) {
23 | var _that = this;
24 | _that.setData({
25 | id: options.id
26 | }),
27 | //获取服务图片信息
28 | wx.request({
29 | url: base_url + 'index.php?c=wxApp&a=getServicesImg',
30 | data: { id: options.id},
31 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
32 | // header: {}, // 设置请求的 header
33 | success: function (res) {
34 | //console.log(res);
35 | var data = res.data.data;
36 | // console.log(data);
37 | // console.log(data.img.length);
38 | if (data.img.length<=0){
39 | _that.setData({
40 | flag: 0,
41 | noData: true,
42 | tip: '暂无数据!'
43 | });
44 | }else{
45 | _that.setData({
46 | serviceInfo: data,
47 | flag: 1,
48 | noData: false
49 | });
50 | };
51 | // wx.setNavigationBarTitle({
52 | // title: data.ser.name,
53 | // })
54 | }
55 | })
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面初次渲染完成
60 | */
61 | onReady: function () {
62 |
63 | },
64 |
65 | /**
66 | * 生命周期函数--监听页面显示
67 | */
68 | onShow: function () {
69 |
70 | },
71 |
72 | /**
73 | * 生命周期函数--监听页面隐藏
74 | */
75 | onHide: function () {
76 |
77 | },
78 |
79 | /**
80 | * 生命周期函数--监听页面卸载
81 | */
82 | onUnload: function () {
83 |
84 | },
85 |
86 | /**
87 | * 页面相关事件处理函数--监听用户下拉动作
88 | */
89 | onPullDownRefresh: function () {
90 |
91 | },
92 |
93 | /**
94 | * 页面上拉触底事件的处理函数
95 | */
96 | onReachBottom: function () {
97 |
98 | },
99 |
100 | /**
101 | * 用户点击右上角分享
102 | */
103 | onShareAppMessage: function () {
104 |
105 | },
106 |
107 | /**
108 | * 转发
109 | */
110 | onShareAppMessage: function (res) {
111 | if (res.from === 'button') {
112 | // 来自页面内转发按钮
113 | console.log(res.target)
114 | }
115 | return {
116 | title: 'Mu连锁便利店',
117 | path: '',
118 | success: function (res) {
119 | // 转发成功
120 | },
121 | fail: function (res) {
122 | // 转发失败
123 | }
124 | }
125 | }
126 | })
--------------------------------------------------------------------------------
/utils/wxLogin.js:
--------------------------------------------------------------------------------
1 | //定义登录方法
2 | var CONFIG = require('./config.js');
3 | var base_url = CONFIG.API_URL.BASE_URL;
4 | var wxLogin = {
5 | _login: function(did,callback) {
6 | // 调用接口获取登录凭证(code)进而换取用户登录态信息,包括用户的唯一标识(openid) 及本次登录的
7 | // 会话密钥(session_key)等。用户数据的加解密通讯需要依赖会话密钥完成。
8 |
9 | // 注:调用 login 会引起登录态的刷新,之前的 sessionKey 可能会失效。
10 | wx.login({
11 | success: function(res) {
12 | if(res.code) {
13 | var code = res.code;
14 | wx.request({
15 | url: base_url + 'index.php?c=wxApp&a=wx_login',
16 | data: {js_code: code},
17 | method: 'GET',
18 | success: function (res) {
19 | var data = res.data;
20 | console.log(data);
21 | //后台传回thirdRD_session存入storage,用于后续通信使用
22 | wx.setStorageSync('thirdRD_session', data);
23 | // 此前有调用过 wx.login 且登录态尚未过期,此时返回的数据会包含 encryptedData, iv 等敏感信息
24 | wx.getUserInfo({
25 | success: function (res) {
26 | // success
27 | var encryptedData = res.encryptedData;
28 | var iv = res.iv; //加密算法的初始向量
29 | var thridRDSession = wx.getStorageSync('thirdRD_session');
30 | wx.request({
31 | url: base_url + 'index.php?c=wxApp&a=decryptUserInfo&thridRDSession=' + thridRDSession + "&encryptedData=" + encryptedData + "&iv=" + iv,
32 | data: {
33 | thridRDSession: thridRDSession,
34 | encryptedData: encryptedData,
35 | iv: iv,
36 | did:did
37 | },
38 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
39 | header: {
40 | 'content-type': 'application/json'
41 | }, // 设置请求的 header
42 | success: function (res) {
43 |
44 | if (userInfo != "" || userInfo != null) {
45 | var ws = res.data;
46 | var json = ws.replace(/^[\s\uFEFF\xa0\u3000]+|[\uFEFF\xa0\u3000\s]+$/g, "");
47 | var userInfo = JSON.parse(json);
48 | console.log(userInfo,'userInfo');
49 | callback ? callback(userInfo) : '';
50 | wx.setStorage({
51 | key: "userInfo",
52 | data: userInfo
53 | })
54 | }
55 | // success
56 | }
57 | })
58 | },
59 | });
60 | },
61 | fail: function () {
62 | // fail
63 | },
64 | complete: function () {
65 | // complete
66 | }
67 | });
68 | } else {
69 | console.log('获取用户登录态失败!' + res.errMsg)
70 | }
71 | }
72 | });
73 | },
74 | //测试
75 | _testUser:function(){
76 | var userInfo = [];
77 | userInfo['id'] = 1;
78 | userInfo['nick_name'] = '罗鹏飞';
79 | return userInfo;
80 | }
81 |
82 | };
83 | module.exports = wxLogin;
--------------------------------------------------------------------------------
/pages/message/message.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 | 消息通知
44 |
45 |
46 |
47 | {{item.time_desc}}
48 |
49 |
50 |
51 |
52 |
53 | 尊敬的用户,您好!你在{{item.time_desc}}所发布的信息已成功,祝你生活愉快~
54 |
55 |
56 | 尊敬的用户,您好!你在{{item.time_desc}}所发布的信息已通过审核,即将发布,祝你生活愉快~
57 |
58 |
59 | 尊敬的用户,您好!你在{{item.time_desc}}所发布的信息有新的留言,请及时查看,祝你生活愉快~
60 |
61 |
62 | 您的宠物医生给你的回复:{{item.new_content}}
63 |
64 |
65 |
66 |
67 |
68 |
69 |
--------------------------------------------------------------------------------
/pages/labelDetail/labelDetail.wxss:
--------------------------------------------------------------------------------
1 | @import "../../common/itemList/itemList.wxss";
2 | @import "../template/template.wxss";
3 | page,.page {
4 | height: 100%;
5 | font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'Droid Sans Fallback', 'Microsoft Yahei', sans-serif;
6 | }
7 | .page-bottom{
8 | height: 100%;
9 | width: 750rpx;
10 | position: fixed;
11 | background-color: rgb(0, 68, 97);
12 | z-index: 0;
13 | }
14 | .wc{
15 | font-size: 10pt;
16 | color:white;
17 |
18 | padding:30rpx 0 30rpx 40rpx;
19 | border-bottom:0.5px solid #e7e7e7;
20 |
21 | }
22 | .page-content{
23 | padding-top: 5rpx;
24 | }
25 | .page-top{
26 | height: 100%;
27 | position: fixed;
28 | width: 750rpx;
29 | background-color: rgb(255, 255, 255);
30 | z-index: 0;
31 | transition: All 0.4s ease;
32 | -webkit-transition: All 0.4s ease;
33 | }
34 | /* 标签头部信息 */
35 | .label_detail{
36 | color: #222;
37 | font-size: 30rpx;
38 | padding: 20rpx;
39 | display: block;
40 | line-height: 1.5em;
41 | letter-spacing:1px;
42 | }
43 | /* 商品列表 */
44 | .goods-list {
45 | display: flex;
46 | flex-direction: row;
47 | flex-wrap: wrap;
48 | justify-content: space-between;
49 | margin-top: 2rpx;
50 | padding: 0 10rpx;
51 | }
52 | .goods-list .goods-item {
53 | display: flex;
54 | flex-direction: column;
55 | box-sizing: border-box;
56 | width: 49.5%;
57 | padding-bottom: 60rpx;
58 | background: #ffffff;
59 | margin-bottom: 2rpx;
60 | }
61 | /* .goods-list .goods-item.item1 {
62 | border-right: 1rpx solid #f1f1f1;
63 | }
64 | .goods-list .goods-item.item2 {
65 | border-left: 1rpx solid #f1f1f1;
66 | }*/
67 | .goods-list .goods-item .goods-img {
68 | width: 100%;
69 | }
70 | .goods-list .goods-item .goods-name {
71 | box-sizing: border-box;
72 | padding: 3rpx 3rpx 10rpx 3rpx;
73 | font-size: 25rpx;
74 | overflow: hidden;
75 | text-overflow: ellipsis;
76 | /* white-space: nowrap; */
77 | font-weight: 300;
78 | }
79 | .goods-list .goods-item .item-bottom {
80 | display: flex;
81 | flex-direction: row;
82 | padding: 5rpx 10rpx;
83 | align-items: center;
84 | }
85 | .goods-item .item-bottom .price {
86 | color: #FF2526;
87 | }
88 | .goods-item .item-bottom .cart-icon {
89 | width: 50rpx;
90 | height: 50rpx;
91 | padding: 5rpx;
92 | box-sizing: border-box;
93 | border: 1rpx solid #ccc;
94 | border-radius: 6rpx;
95 | }
96 | .goods-item .item-bottom .cart-icon image {
97 | width: 100%;
98 | height: 100%;
99 | }
100 | /*go-buy*/
101 | .goods-item .item-bottom text{
102 | padding: 5rpx 10rpx;
103 | color: #777;
104 | }
105 | .goods-item .item-bottom .go-pay{
106 | background-color: #FF4A35;
107 | color: #fff;
108 | padding: 5rpx 15rpx;
109 | border-radius: 10rpx;
110 | margin-left:15rpx;
111 | }
--------------------------------------------------------------------------------
/pages/coupon/couponList/couponList.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/orderList/orderList.wxss */
2 | page{
3 | font-family: "微软雅黑";
4 | display: block;
5 | min-height: 100%;
6 | background-color: #FEF5FA;
7 | }
8 | .container {
9 | padding: 0 0;
10 | padding-bottom: 120rpx;
11 | background-color: #FEF5FA;
12 | }
13 |
14 |
15 | /*订单样式*/
16 | .top-img{
17 | width: 100%;
18 | }
19 | .top-img image{
20 | width: 100%;
21 | height: 460rpx;
22 | }
23 | .coupon-list .coupon {
24 | position: relative;
25 | margin-bottom: 10px;
26 | color: #ffffff;
27 | min-height: 160px;
28 | padding: 0 10px;
29 | }
30 | .coupon-list image {
31 | box-sizing: border-box;
32 | width: 100%;
33 | height: 160px;
34 | float: left;
35 | border-radius: 8px;
36 | -webkit-border-radius: 8px;
37 | -moz-border-radius: 8px;
38 | }
39 |
40 | .coupon-list .coupon-content {
41 | color: #EC4045;
42 | position: absolute;
43 | left: 0;
44 | top: 10px;
45 | height: 100%;
46 | width: 100%;
47 | }
48 | .coupon-list .coupon-content .coupon-top{
49 | font-size: 22px;
50 | height: 70px;
51 | padding: 0 20px;
52 | display: flex;
53 | align-items: center;
54 | justify-content: space-between;
55 | }
56 | .coupon-list .coupon-content .coupon-bottom{
57 | display: flex;
58 | flex-direction: column;
59 | justify-content: flex-end;
60 | height: 65px;
61 | padding: 0 20px;
62 | }
63 | .coupon-list .coupon-content .coupon-bottom .top-info{
64 | padding-bottom: 6px;
65 | font-size: 16px;
66 | display: flex;
67 | flex-direction: row;
68 | justify-content: space-between;
69 | align-items: center;
70 | }
71 | .coupon-list .coupon-content .coupon-bottom .btn{
72 | padding: 2px 10px;
73 | font-size: 11px;
74 | color: #fff;
75 | background: #F2474D;
76 | border-radius: 10px;
77 | display: flex;
78 | align-items: center;
79 | }
80 | .coupon-list .coupon-content .coupon-bottom .btn_text{
81 | padding: 2px 10px;
82 | font-size: 11px;
83 | color: #fff;
84 | background: #FF8B22;
85 | border-radius: 10px;
86 | display: flex;
87 | align-items: center;
88 | }
89 | .coupon-list .coupon-content .coupon-bottom .bottom-info{
90 | font-size: 11px;
91 | color: #989898;
92 | }
93 | .cf{
94 | color: #989898;
95 | }
96 | .btnText{
97 | position: fixed;
98 | bottom: 0px;
99 | z-index: 2;
100 | background: #fff;
101 | height: 50px;
102 | width: 100%;
103 | font-size: 16px;
104 | border: 1px solid #EBEBEB;
105 | display: flex;
106 | justify-content: space-between;
107 | align-items: center;
108 |
109 | }
110 | .btn-left{
111 | width: 50%;
112 | display: flex;
113 | justify-content: center;
114 | border-right: 1px solid #989898;
115 | }
116 | .btn-right{
117 | width: 50%;
118 | display: flex;
119 | justify-content: center;
120 | }
--------------------------------------------------------------------------------
/pages/userCenter/userCenter/userCenter.wxss:
--------------------------------------------------------------------------------
1 | /* pages/userCenter/userCenter.wxss */
2 | @import "/static/icon.wxss";
3 | @import "/pages/template/template.wxss";
4 | page {
5 | -webkit-text-size-adjust: 100%;
6 | font-family: "微软雅黑";
7 | box-sizing:border-box;
8 | font-size:28rpx;
9 | width:100%;
10 | height:100%;
11 | background:#F0F0F0;
12 | }
13 | .content-wrap{
14 | display: flex;
15 | flex-direction: column;
16 | flex-wrap: nowrap;
17 | background:white;
18 |
19 |
20 | }
21 | .content-wrap .header{
22 | width:100%;
23 | height:300rpx;
24 | background:#ff6600;
25 | display:flex;
26 | flex-direction:row;
27 | justify-content:center;
28 | align-content:center;
29 | }
30 |
31 | .content-wrap .header .bg-img-view{
32 | width:100%;
33 | }
34 | .content-wrap .header .bg-img-view .bg-img{
35 | width:100%;
36 | height:310rpx;
37 |
38 | }
39 | .content-wrap .user-info{
40 | width: 100%;
41 | display: flex;
42 | flex-direction: column;
43 | justify-content: center;
44 | align-items: center;
45 |
46 | }
47 |
48 | .content-wrap .header .user-info .user-img-view{
49 |
50 |
51 | }
52 | .content-wrap .user-info .user-img{
53 | width: 150rpx;
54 | height: 150rpx;
55 | border-radius: 75rpx;
56 | border: 2rpx solid white;
57 | }
58 | .content-wrap .user-info .user-name{
59 | margin-top:30rpx;
60 | color:white;
61 |
62 | }
63 | .content-wrap .space-line .line{
64 | height: 5rpx;
65 | background: #f0f0f0;
66 | }
67 | .content-wrap .menu-area{
68 | background: white;
69 | }
70 | .content-wrap .menu-area .menu-item-view{
71 | width: 100%;
72 | }
73 | .content-wrap .menu-area .menu-item-view .menu-item-view-header{
74 | width: 100%;
75 | height: 70rpx;
76 | padding-left: 20rpx;
77 | display:flex;
78 | flex-direction: row;
79 | align-items: center;
80 | border: 1rpx solid #f0f0f0;
81 | }
82 | .content-wrap .menu-area .menu-item-view .menu-item-view-content{
83 | display: flex;
84 | flex-direction: row;
85 | align-items: center;
86 | }
87 | .content-wrap .menu-area .menu-item-view .menu-item-view-content .menu-item{
88 | display: flex;
89 | flex-direction: column;
90 | justify-content: center;
91 | align-items: center;
92 | margin-left: 10%;
93 | padding: 20rpx;
94 |
95 | }
96 | .content-wrap .menu-area .menu-item-view .menu-item-view-content .menu-item .iconfont{
97 | font-size:40rpx;
98 | color:#f0f0f0;
99 |
100 | }
101 | .content-wrap .menu-area .menu-item-view .menu-item-view-content .menu-item .iconfont.icon-fav-1{
102 | font-size: 45rpx;
103 | }
104 | .content-wrap .menu-area .menu-item-view .menu-item-view-content .menu-item .menu-item-text-show{
105 | font-size: 25rpx;
106 | }
107 | .content-wrap .menu-area .space-line{
108 | width: 100%;
109 | height: 10rpx;
110 | background: #f0f0f0;
111 | }
112 | .nav-list{
113 | border-top:5px solid #f0f0f0;
114 | }
--------------------------------------------------------------------------------
/pages/services/services.js:
--------------------------------------------------------------------------------
1 | // pages/services/services.js
2 | var itemList = require('../../common/itemList/itemList.js');
3 | var CONFIG = require('../../utils/config.js');
4 |
5 | var app = getApp();
6 | var base_url = CONFIG.API_URL.BASE_URL;
7 |
8 | Page({
9 |
10 | /**
11 | * 页面的初始数据
12 | */
13 | data: {
14 | base_url: base_url,
15 | is_swiper: true
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面加载
20 | */
21 | onLoad: function (options) {
22 | var that = this;
23 | //获取幻灯片信息
24 | wx.request({
25 | url: base_url + 'index.php?c=wxApp&a=serviceSlideList',
26 | data: {},
27 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
28 | // header: {}, // 设置请求的 header
29 | success: function (res) {
30 |
31 | var data = res.data.data;
32 | if(data.length == 0){
33 | that.setData({
34 | is_swiper: false
35 | })
36 | }
37 | that.setData({
38 | sliderList: data
39 | })
40 | }
41 | }),
42 | //获取服务信息
43 | wx.request({
44 | url: base_url + 'index.php?c=wxApp&a=getServicesList',
45 | data: {},
46 | method: 'GET', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
47 | // header: {}, // 设置请求的 header
48 | success: function (res) {
49 | var data = res.data.data;
50 | that.setData({
51 | serviceList: data
52 | })
53 | }
54 | })
55 | },
56 |
57 | /**
58 | * 生命周期函数--监听页面初次渲染完成
59 | */
60 | onReady: function () {
61 |
62 | },
63 |
64 | /**
65 | * 生命周期函数--监听页面显示
66 | */
67 | onShow: function () {
68 |
69 | },
70 |
71 | /**
72 | * 生命周期函数--监听页面隐藏
73 | */
74 | onHide: function () {
75 |
76 | },
77 |
78 | /**
79 | * 生命周期函数--监听页面卸载
80 | */
81 | onUnload: function () {
82 |
83 | },
84 |
85 | /**
86 | * 页面相关事件处理函数--监听用户下拉动作
87 | */
88 | onPullDownRefresh: function () {
89 |
90 | },
91 |
92 | /**
93 | * 页面上拉触底事件的处理函数
94 | */
95 | onReachBottom: function () {
96 |
97 | },
98 |
99 | /**
100 | * 用户点击右上角分享
101 | */
102 | onShareAppMessage: function () {
103 |
104 | },
105 |
106 | /**
107 | * 点击查看详情
108 | */
109 | serviceImg: function (e) {
110 | var sid = e.currentTarget.dataset.sid;
111 | wx.navigateTo({
112 | url: '../serviceDetail/serviceDetail?id=' + sid,
113 | })
114 | },
115 |
116 | /**
117 | * 转发
118 | */
119 | onShareAppMessage: function (res) {
120 | if (res.from === 'button') {
121 | // 来自页面内转发按钮
122 | console.log(res.target)
123 | }
124 | return {
125 | title: 'Mu连锁便利店',
126 | path: '',
127 | success: function (res) {
128 | // 转发成功
129 | },
130 | fail: function (res) {
131 | // 转发失败
132 | }
133 | }
134 | }
135 |
136 | })
--------------------------------------------------------------------------------
/pages/favorite/favorite.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | {{item.nick_name}}
16 |
17 |
18 | 已收藏
19 |
20 |
21 |
22 |
23 | {{item.text_content}}
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | {{item.address_text}}
33 |
34 |
35 | {{item.time_desc}}
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | 浏览{{item.check_num}}次
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 | {{item.message_num}}
53 |
54 |
55 |
56 | {{item.like_num}}
57 |
58 |
59 |
60 | {{item.report_num}}
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
--------------------------------------------------------------------------------
/pages/goods/labelGoodsList/labelGoodsList.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 标签商品列表页js
3 | * @author micheal
4 | * @since 2017-01-16
5 | */
6 | var CONFIG = require('../../../utils/config.js');
7 | var app = getApp();
8 | var base_url = CONFIG.API_URL.BASE_URL;
9 |
10 | //页面初始化数据
11 | var page = 1;
12 | var page_size = 8;
13 | var is_more = true; //数据还能不能加载了了
14 | // var get_info = "正在加载中..";//加载提示 正在加载中 下拉加载更多 没有更多了
15 | var label_id; //标签id
16 |
17 | // 获取数据
18 | var GetList = function(that){
19 | if(is_more){
20 | that.setData({
21 | hidden:false
22 | });
23 | wx.request({
24 | url:base_url+'index.php?c=wxApp&a=pagingLabelGoods',
25 | data:{
26 | pageIndex : page,
27 | pageSize : page_size,
28 | id : label_id
29 | },
30 | success:function(res){
31 | console.log(res);
32 | var dataList = res.data.data.dataList;
33 | if(dataList.length > 0){
34 | var list = that.data.list;
35 | for(var i = 0; i < dataList.length; i++){
36 | list.push(dataList[i]);
37 | }
38 | console.log(list);
39 | that.setData({
40 | list : list
41 | });
42 | page ++;
43 | that.setData({
44 | hidden:true
45 | });
46 | }else{
47 | is_more = false;
48 | that.setData({
49 | hidden:true
50 | });
51 | }
52 | }
53 | });
54 | }
55 | }
56 | Page({
57 | data:{
58 | base_url:base_url,
59 | hidden:true,
60 | list:[],
61 | scrollTop : 0,
62 | scrollHeight:0
63 | },
64 | onLoad:function(data){
65 | // 这里要非常注意,微信的scroll-view必须要设置高度才能监听滚动事件,所以,需要在页面的onLoad事件中给scroll-view的高度赋值
66 | var that = this;
67 | label_id = data.id;
68 | wx.getSystemInfo({
69 | success:function(res){
70 | console.info(res.windowHeight);
71 | that.setData({
72 | scrollHeight:res.windowHeight
73 | });
74 | }
75 | });
76 | },
77 | onShow:function(){
78 | // 在页面展示之后先获取一次数据
79 | var that = this;
80 | page = 1; //没次进入页面的时候 因为有缓存 要重新赋值
81 | GetList(that);
82 | },
83 | bindDownLoad:function(){
84 | // 该方法绑定了页面滑动到底部的事件
85 | var that = this;
86 | if(is_more)
87 | GetList(that);
88 | },
89 | scroll:function(event){
90 | // 该方法绑定了页面滚动时的事件,我这里记录了当前的position.y的值,为了请求数据之后把页面定位到这里来。
91 | this.setData({
92 | scrollTop : event.detail.scrollTop
93 | });
94 | },
95 | refresh:function(event){
96 | // 该方法绑定了页面滑动到顶部的事件,然后做上拉刷新
97 | page = 1;
98 | this.setData({
99 | list : [],
100 | scrollTop : 0
101 | });
102 | GetList(this)
103 | },
104 | // 跳转到商品详情页
105 | goodsDetail: function (data) {
106 | wx.navigateTo({ url: '../goodsDetail/goodsDetail?id=' + data.currentTarget.dataset.id });
107 | }
108 | })
--------------------------------------------------------------------------------
/pages/cate/cate.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 | {{item.name}}
29 | {{item.ename}}
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | {{item.name}}
39 | {{item.ename}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 | {{item.name}}
48 | {{item.ename}}
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | {{item.name}}
57 | {{item.ename}}
58 |
59 |
60 |
61 |
62 |
63 | {{item.name}}
64 | {{item.ename}}
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
--------------------------------------------------------------------------------
/pages/messageList/messageList.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{item.nick_name}}
17 |
18 |
19 |
20 | 审核中
21 | 已发布
22 |
23 |
24 |
25 |
26 |
27 | {{item.text_content}}
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {{item.address_text}}
37 |
38 |
39 | {{item.time_desc}}
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 | 浏览{{item.check_num}}次
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 | {{item.message_num}}
57 |
58 |
59 |
60 | {{item.like_num}}
61 |
62 |
63 |
64 | {{item.report_num}}
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | 暂无数据
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/pages/favorite/favorite.wxss:
--------------------------------------------------------------------------------
1 | /* pages/favorite/favorite.wxss */
2 | @import "/static/icon.wxss";
3 | @import "/pages/template/template.wxss";
4 | .message-item{
5 | padding-top: 25rpx;
6 | padding-bottom: 10rpx;
7 | display: flex;
8 | flex-direction: row;
9 | justify-content: space-between;
10 | border-bottom: 2rpx solid #F7F7F7;
11 | }
12 | .message-item .item-image{
13 | width: 100rpx;
14 | height: 100rpx;
15 | }
16 | .message-item .item-left{
17 | width: 120rpx;
18 | padding-left: 20rpx;
19 | }
20 | .message-item .item-right{
21 | margin-left: 10rpx;
22 | flex: 1;
23 | padding-right:25rpx;
24 |
25 |
26 | }
27 | .message-item .item-right .item-right-head{
28 | display: flex;
29 | flex-direction: row;
30 | justify-content: space-between;
31 |
32 | }
33 | .message-item .item-right .item-right-head .item-username{
34 | font-size: 30rpx;
35 | color: #3077c8;
36 | margin-top:10rpx;
37 |
38 | }
39 | .message-item .item-right .item-right-head .item-button{
40 | display: flex;
41 | flex-direction: row;
42 | }
43 | .message-item .item-right .item-right-head .item-button .favorite{
44 | border:1rpx solid #FF6565;
45 | color:#FF6565;
46 | padding:11rpx;
47 | border-radius:10rpx;
48 |
49 | }
50 | .message-item .item-right .item-right-head .contact-img{
51 | width: 120rpx;
52 | height: 50rpx;
53 | }
54 | .message-item .item-right .item-right-head .item-phone{
55 | width: 150rpx;
56 | height: 60rpx;
57 | font-size: 25rpx;
58 | margin-right: 10rpx;
59 | float: right;
60 | background: #FF5F5F;
61 | color: white;
62 | }
63 | .message-item .item-right .item-right-head .item-label{
64 | width: 160rpx;
65 | height: 60rpx;
66 | font-size: 25rpx;
67 | margin-right: 10rpx;
68 | float: right;
69 | border: 2rpx solid #FF5F5F;
70 | background: white;
71 | color: #FF5F5F;
72 | }
73 | .message-item .item-right .item-right-content{
74 | padding-top: 10rpx;
75 | width: 100%;
76 | flex: 1;
77 | }
78 | .message-item .item-right .item-right-content .item-imagelist{
79 | display: flex;
80 | flex-direction: row;
81 | flex-wrap:wrap-reverse;
82 | flex: 1;
83 | }
84 | .message-item .item-imagelist-img{
85 | width: 160rpx;
86 | height: 160rpx;
87 | margin: 10rpx;
88 |
89 | }
90 | .message-item .item-address .item-addressicon{
91 | color: #367BC9;
92 | }
93 |
94 | .message-item .item-address .item-addresstext{
95 | color: #367BC9;
96 | font-size: 23rpx;
97 | }
98 | .message-item .item-time {
99 | margin-top: 15rpx;
100 | }
101 | .message-item .item-time .item-timetext{
102 | color: #C8C8C8;
103 | font-size: 25rpx;
104 | }
105 | .message-item .item-bottom{
106 | padding-top: 10rpx;
107 | display: flex;
108 | flex-direction: row;
109 | justify-content: space-between;
110 | }
111 | .message-item .item-bottom {
112 | font-size: 24rpx;
113 | color: #C8C8C8;
114 | }
115 | .message-item .item-bottom .item-nums{
116 | display: flex;
117 | flex-direction: row;
118 | justify-content: space-between;
119 | align-items: center;
120 | width: 100%;
121 | }
122 | .message-item .item-bottom .item-nums .item-num{
123 | display: flex;
124 | flex-direction: row;
125 | align-items: center;
126 | }
127 | .message-item .item-bottom .item-nums .item-nums-right{
128 | display: flex;
129 | flex-direction: row;
130 | align-items: center;
131 | }
132 | .message-item .item-bottom .icon{
133 | font-size: 30rpx;
134 | margin-right:0rpx;
135 | color:#999999;
136 | }
137 | .message-item .item-bottom .item-nums-text{
138 | padding-right:20rpx;
139 | padding-left:8rpx;
140 | font-size:25rpx;
141 | color:#999999;
142 |
143 |
144 | }
145 |
--------------------------------------------------------------------------------
/utils/tools.js:
--------------------------------------------------------------------------------
1 | var CONFIG = require('./config.js');
2 | var base_url = CONFIG.API_URL.BASE_URL;
3 | var tools = {
4 | fetchHttpCilent: function (params) {
5 | var _this = this;
6 | return new Promise((resolve, reject) => {
7 | wx.request({
8 | url: params.API_URL,
9 | data: Object.assign({}, params.data),
10 | header: {
11 | 'Content-Type': 'application/json'
12 | },
13 | success: resolve,
14 | fail: reject
15 | });
16 | });
17 | },
18 | result: function (params) {
19 | var _this = this;
20 | return _this.fetchHttpCilent(params).then(res => res);
21 | },
22 | //返回顶部
23 | backTop: function () {
24 | wx.pageScrollTo({
25 | scrollTop: 0
26 | })
27 | },
28 | //一键拨号
29 | makePhoneCall: function (phoneNumber) {
30 | wx.makePhoneCall({
31 | phoneNumber: phoneNumber
32 | })
33 | },
34 | //操作成功提示
35 | showSuccessToast: function (title = "恭喜操作成功!") {
36 | wx.showToast({
37 | title: title,
38 | icon: 'success',
39 | duration: 1500
40 | }),
41 | setTimeout(function () {
42 | wx.hideToast();
43 | }, 2000)
44 | },
45 | //操作失败提示
46 | showFailToast: function (title = "对不起操作失败!") {
47 | wx.showToast({
48 | title: title,
49 | image: '../../static/images/common/fails.png',
50 | duration: 1500
51 | }),
52 | setTimeout(function () {
53 | wx.hideToast();
54 | }, 2000)
55 | },
56 | /**
57 | * request请求
58 | */
59 | httpClient(url,data,callback) {
60 | wx.request({
61 | url: base_url + url,
62 | data: data,
63 | header: {
64 | "Content-Type": "application/json"
65 | },
66 | method: "GET",
67 | dataType: 'json',
68 | success: function ( res ) {
69 | callback( null, res.data )
70 | },
71 | fail: function ( error ) {
72 | callback( error )
73 | }
74 | })
75 | },
76 | /**
77 | * 获取坐标
78 | */
79 | getLocation(call ) {
80 | wx.getLocation({
81 | type: 'gcj02',
82 | success: function(res) {
83 | call(res);
84 | },
85 | })
86 | },
87 |
88 |
89 | // /**
90 | // * 重新获取授权
91 | // */
92 | // getAuthor(author) {
93 | // wx.getSetting({
94 | // success(res) {
95 | // if(!res.authSetting['scope.userLocation']) {
96 | // wx.openSetting({
97 | // success: (res) => {
98 | // console.log(res)
99 | // if(!res.authSetting['scope.userLocation']) {
100 | // wx.showModal({
101 | // title: '温馨提醒',
102 | // content: '需要获取您的地理位置才能使用小程序',
103 | // cancelText: '不使用',
104 | // confirmText: '获取位置',
105 | // success: function(res) {
106 | // if(res.confirm) {
107 | // //getAuthor();
108 | // console.log('确认授权啦');
109 |
110 | // } else if(res.cancel) {
111 | // wx.showToast({
112 | // title: '您可点击左下角 定位按钮 重新获取位置',
113 | // icon: 'success',
114 | // duration: 3000
115 | // })
116 | // }
117 | // }
118 | // })
119 | // }
120 | // }
121 | // })
122 | // }
123 | // }
124 | // })
125 |
126 | // }
127 | }
128 | module.exports = tools;
--------------------------------------------------------------------------------
/pages/petArticleList/petArticleList.wxss:
--------------------------------------------------------------------------------
1 | /* pages/petArticleList/petArticleList.wxss */
2 |
3 | page{
4 | font-family: "微软雅黑";
5 | background: #F1F1F1;
6 | }
7 | .wrap {
8 | height: 100%;
9 |
10 | }
11 |
12 | .head-box{
13 | position:relative;
14 | height:384rpx;
15 | width:750rpx;
16 |
17 | }
18 | swiper{
19 | height:400rpx;
20 | width:750rpx;
21 |
22 | }
23 |
24 | .search-wrap{
25 | box-sizing: border-box;
26 | width: 100%;
27 | display: flex;
28 | flex-direction: row;
29 | background: white;
30 | align-items: center;
31 | padding:20rpx;
32 | margin-top:15rpx;
33 |
34 |
35 | }
36 |
37 | .search-wrap .location-city{
38 | width:25%;
39 | height: 65rpx;
40 | background-color:#ffd343;
41 | padding:10rpx;
42 | display:flex;
43 | flex-direction:row;
44 | align-items:center;
45 | background:#ffd343;
46 | padding-top: 20rpx;
47 | padding-bottom: 20rpx;
48 | border-radius:20rpx;
49 |
50 | }
51 | .search-wrap .location-city .location-icon{
52 | margin-left:15rpx;
53 | font-size:30rpx;
54 | }
55 | .search-wrap .location-city .city-text{
56 | margin-right:23rpx;
57 | color:white;
58 | font-size:30rpx;
59 |
60 | }
61 | .location-city .location-icon{
62 | color: white;
63 | }
64 |
65 | .search-wrap .search-inner{
66 | width: 100%;
67 | height: 65rpx;
68 | display: flex;
69 | flex-direction: row;
70 | background-color: #fff;
71 | box-sizing: border-box;
72 | padding: 10rpx;
73 | align-items: center;
74 | border-radius: 20rpx;
75 | border: 1rpx solid #ffd343;
76 | justify-content: center;
77 | }
78 | .search-wrap .search-icon{
79 | width: 50rpx;
80 | height: 50rpx;
81 | }
82 | .search-wrap input{
83 | display: flex;
84 | flex: 1;
85 | height: 50rpx;
86 | line-height: 50rpx;
87 | padding-left: 10rpx;
88 | }
89 | .search-wrap .search-inner .search-input{
90 | display: flex;
91 | flex: 1;
92 | height: 60rpx;
93 | line-height: 60rpx;
94 | color: #CCCCCC;
95 |
96 | }
97 | .search-wrap .search-button{
98 | font-size:28rpx;
99 | width:188rpx;
100 | height:64rpx;
101 | margin-top:-4rpx;
102 | margin-right:-10rpx;
103 | border-radius:20rpx;
104 | background-color:#ffd343;
105 | color:white;
106 | }
107 | .search-wrap .search-inner .search-inner-text{
108 | font-size: 30rpx;
109 | }
110 | .search-input{
111 | padding-top: 1rpx;
112 | height: 100%;
113 | }
114 |
115 | .cate-line{
116 | width: 100%;
117 | height: 20rpx;
118 | background: #F0F0F0;
119 | }
120 | scroll-view{
121 | margin-top: 20rpx;
122 | }
123 | .aticle-item{
124 | background: white;
125 | display: flex;
126 | flex-direction: row;
127 | justify-content: space-between;
128 | align-items: flex-start;
129 | padding: 20rpx;
130 | margin-bottom: 10rpx;
131 | }
132 | .aticle-item .item-left{
133 |
134 | display: flex;
135 | flex-direction: column;
136 | padding-left: 20rpx;
137 | }
138 | .aticle-item .item-left .item-middle{
139 |
140 | }
141 | .aticle-item .item-left .item-middle .item-desc .item-desc-text{
142 | text-indent: 50rpx;
143 | display:block;
144 | }
145 | .aticle-item .item-left .item-title{
146 | font-size: 35rpx;
147 | font-weight: 5rpx;
148 | }
149 | .aticle-item .item-left .item-desc{
150 | font-size: 30rpx;
151 | color: #6E6E6E;
152 | }
153 | .aticle-item .item-left .item-date{
154 | font-size: 25rpx;
155 | color: #C1C1C1;
156 | }
157 | .aticle-item .item-left .item-bottom{
158 | margin-top:-30rpx;
159 |
160 | }
161 | .aticle-item .item-right{
162 | width: 30%;
163 | margin-left: 10rpx;
164 | padding-right: 20rpx;
165 | }
166 |
167 |
168 | .aticle-item .item-right .item-thumb{
169 | width: 200rpx;
170 | height: 200rpx;
171 | }
172 |
--------------------------------------------------------------------------------
/pages/favorite/favorite.js:
--------------------------------------------------------------------------------
1 | // pages/cate/cate.js
2 | //引入域名信息
3 | var CONFIG = require('../../utils/config.js');
4 | //引入通用工具类js
5 | var tools = require('../../utils/tools.js');
6 | var app = getApp();
7 | //获取域名信息
8 | var base_url = CONFIG.API_URL.BASE_URL;
9 | var img_url = CONFIG.API_URL.IMG_URL;
10 | var pageIndex = 1;
11 | var pageSize = 10;
12 | var allPages = 0;
13 | //定义请求的数据
14 | var cData = {};
15 | var gids = '';
16 | var firId = 0;
17 | var secId = 0;
18 | var bStop = true;
19 |
20 | Page({
21 |
22 | /**
23 | * 页面的初始数据
24 | */
25 | data: {
26 | base_url: base_url,
27 | //设置第一个分类为默认选中
28 | on: 0,
29 | img_url: img_url,
30 | list: [],
31 | key: 0,
32 | index: 1,
33 | messageList: [],
34 | longitude: '',//经度
35 | latitude: '',//纬度
36 | lid: '',
37 | labelInfo: '',
38 | inputContent: '',
39 | userInfo:''
40 | },
41 |
42 | // 点击进入发布消息详情页
43 | messageDetail: function (e) {
44 | var mid = e.currentTarget.dataset.mid;
45 | wx.navigateTo({
46 | url: '../goods/goodsDetail/goodsDetail?mid=' + mid,
47 | })
48 | },
49 |
50 |
51 |
52 |
53 | // 分页展示发布消息
54 | //请求分页数据
55 | pagingMessage: function (user_id,pageIndex, pageSize) {
56 | var that = this;
57 | wx.request({
58 | url: base_url + 'index.php/front/message/paggingMessage',
59 | data: {
60 | 'user_id': user_id,
61 | 'pageIndex': pageIndex,
62 | 'pageSize': pageSize,
63 |
64 | },
65 | method: "POST",
66 | success: function (res) {
67 | var data = res.data.data;
68 | var dataList = data.dataList;
69 |
70 | var messageList = that.data.messageList;
71 |
72 | allPages = data.pageInfo.all_pages;
73 |
74 | for (var i = 0; i < dataList.length; i++) {
75 | messageList.push(dataList[i]);
76 | }
77 | console.log(that.data.messageList);
78 | that.setData({ messageList: messageList });
79 | }
80 | })
81 | },
82 | getUserFavorite:function(user_id){
83 | let that = this;
84 | wx.request({
85 | url: base_url + 'index.php/front/favorite/findUserAllFavorite',
86 | data: {
87 | 'user_id': user_id,
88 | },
89 | method: "POST",
90 | success: function (res) {
91 | let messageList = res.data;
92 | console.log(messageList);
93 | that.setData({ messageList: messageList });
94 | }
95 | })
96 | },
97 |
98 |
99 | /**
100 | * 生命周期函数--监听页面加载
101 | */
102 | onLoad: function (options) {
103 | var that = this;
104 | var userInfo = wx.getStorageSync('userInfo');
105 | that.setData({
106 | userInfo: userInfo,
107 | });
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 | // that.pagingMessage(user_id,pageIndex,pageSize);
118 |
119 | },
120 |
121 |
122 |
123 |
124 |
125 | onShow: function () {
126 | var that = this;
127 | let userInfo = that.data.userInfo;
128 | let user_id = userInfo['id'];
129 | that.getUserFavorite(user_id);
130 |
131 | },
132 |
133 |
134 | /**
135 | * 下拉加载更多标签
136 | */
137 | onReachBottom: function () {
138 | // var that = this;
139 | // let userInfo = that.data.userInfo;
140 | // let user_id = userInfo.id;
141 | // if (pageIndex + 1 > allPages) {
142 | // return false;
143 | // } else {
144 | // pageIndex++;
145 | // that.pagingMessage(user_id, pageIndex, pageSize);
146 | // }
147 |
148 | },
149 |
150 |
151 | /**
152 | * 生命周期函数--监听页面关闭
153 | */
154 | onUnload: function () {
155 | this.setData({ messageList: [] });
156 | pageIndex = 1;
157 | allPages = 0;
158 | },
159 |
160 |
161 |
162 |
163 |
164 | })
--------------------------------------------------------------------------------
/pages/goods/goodsSearch/goodsSearch.wxss:
--------------------------------------------------------------------------------
1 | /* pages/goods/goodsSearch/goodsSearch.wxss */
2 | page{
3 | font-family: "微软雅黑";
4 | }
5 | /*搜索*/
6 | .search-wrap{
7 | background-color: #F0F0F0;
8 | padding: 10px 15px;
9 | display: flex;
10 | flex-direction: row;
11 | height: 30px;
12 | }
13 |
14 | .search-wrap .search-left{
15 |
16 | padding-left: 40rpx;
17 | position: relative;
18 | background: #ffffff;
19 | border-radius: 10rpx;
20 | /*padding-top: 5px;
21 | padding-bottom: 5px;*/
22 | width: 80%;
23 | }
24 |
25 | .search-wrap .search-left image{
26 | position: absolute;
27 | width: 20px;
28 | height: 20px;
29 | top:6px;
30 | left:5px;
31 | }
32 |
33 | .search-wrap .search-left input{
34 | padding-left:10px;
35 | height: 20px ! important;
36 | line-height: 30px;
37 | min-height: 30px;
38 | vertical-align:middle;
39 | font-size: 13px;
40 | }
41 |
42 | .place-holder{
43 | line-height: 20px;
44 | vertical-align: middle;
45 | }
46 |
47 | .search-wrap .search-right{
48 | width: 20%;
49 | margin-left: 26rpx;
50 | background-color: #FFEB00;
51 | text-align: center;
52 | font-size: 15px;
53 | line-height:30px;
54 | }
55 | /*商品*/
56 | .goods-list{
57 | width: 100%;
58 | -moz-box-sizing: border-box;
59 | -webkit-box-sizing: border-box;
60 | box-sizing: border-box;
61 | padding: 0 10rpx;
62 | }
63 | .goods-list .goods-item{
64 | display: flex;
65 | flex-direction: column;
66 | position: relative;
67 | -moz-box-sizing: border-box;
68 | -webkit-box-sizing: border-box;
69 | box-sizing: border-box;
70 | height: 100px;
71 | border-bottom: 1px solid #ECECEC;
72 | padding: 10px 8px 10px 110px;
73 | }
74 | .goods-list .goods-item .goods-img{
75 | width: 100px;
76 | height: 80px;
77 | position: absolute;
78 | top: 10px;
79 | left: 0px;
80 | }
81 | .goods-list .goods-item .goods-name{
82 | font-size: 12px;
83 | display: block;
84 | color: #666666;
85 | height: 30px;
86 | line-height: 13px;
87 | overflow: hidden;
88 | }
89 | .goods-list .goods-item .add-box{
90 | height: 30px;
91 | font-size: 13px;
92 | text-align: right;
93 | line-height: 30px;
94 | margin-top: 5px;
95 | }
96 | .goods-list .goods-item .add-box image{
97 | display: inline-block;
98 | width: 30px;
99 | height: 30px;
100 | }
101 | .goods-list .goods-item .add-box .goods-count{
102 | padding: 0 10px;
103 | display: inline-block;
104 | height: 30px;
105 | line-height: 30px;
106 | position: relative;
107 | top: -10px;
108 | text-align: center;
109 | }
110 | .goods-list .goods-item .price-box{
111 | font-size: 12px;
112 | color: #666;
113 | }
114 | .goods-list .goods-item .price-box .now-price{
115 | font-size: 14px;
116 | color: #F54702;
117 | }
118 | .goods-list .goods-item .price-box .pre-price{
119 | position: relative;
120 | margin-left: 10px;
121 | }
122 | .goods-list .goods-item .price-box .pre-price:after{
123 | position: absolute;
124 | width: 110%;
125 | content:"";
126 | height: 2rpx;
127 | background: #666666;
128 | left: 0rpx;
129 | top: 50%;
130 | /*margin-top: -1rpx;*/
131 | }
132 | .tip-text{
133 | text-align: center;
134 | font-size: 12px;
135 | color: #999999;
136 | padding-top: 5px;
137 | }
138 |
139 | /*购物车*/
140 | .cart-box{
141 | width: 40px;
142 | height: 40px;
143 | position: fixed;
144 | z-index: 500;
145 | bottom: 10px;
146 | left: 10px;
147 | }
148 | .cart-box image{
149 | width: 100%;
150 | height: 100%;
151 | }
152 | .cart-box text{
153 | width: 20px;
154 | height: 20px;
155 | border-radius: 50%;
156 | background: #E8010C;
157 | position: fixed;
158 | z-index: 600;
159 | text-align: center;
160 | line-height: 20px;
161 | color: #fff;
162 | font-size: 12px;
163 | bottom:40px;
164 | left:30px;
165 | }
--------------------------------------------------------------------------------
/pages/goods/search/search.js:
--------------------------------------------------------------------------------
1 | /**
2 | * 标签商品列表页js
3 | * @author micheal
4 | * @since 2017-01-16
5 | */
6 | var CONFIG = require('../../../utils/config.js');
7 | var app = getApp();
8 | var base_url = CONFIG.API_URL.BASE_URL;
9 |
10 | //页面初始化数据
11 | var page = 1;
12 | var page_size = 8;
13 | var is_more = true; //数据还能不能加载了了
14 | // var get_info = "正在加载中..";//加载提示 正在加载中 下拉加载更多 没有更多了
15 | var keyword =-1; //关键词
16 |
17 | // 获取数据
18 | var GetList = function(that){
19 | if(is_more = true){
20 | that.setData({
21 | hidden:false
22 | });
23 |
24 | wx.request({
25 | url:base_url+'index.php?c=wxApp&a=pagingSearchGoods',
26 | data:{
27 | pageIndex : page,
28 | pageSize : page_size,
29 | keyword:keyword
30 | },
31 | success:function(res){
32 |
33 | var dataList = res.data.data.goodsList;
34 | if(dataList.length > 0){
35 | var list = that.data.list;
36 | for(var i = 0; i < dataList.length; i++){
37 | list.push(dataList[i]);
38 | }
39 | that.setData({
40 | list : dataList
41 | });
42 | page ++;
43 | that.setData({
44 | hidden:true
45 | });
46 | }else{
47 | is_more = false;
48 | that.setData({
49 | hidden:true
50 | });
51 | }
52 | }
53 | });
54 | }
55 | }
56 | Page({
57 | data:{
58 | base_url:base_url,
59 | hidden:true,
60 | list:[],
61 | scrollTop : 0,
62 | scrollHeight:0
63 | },
64 | onLoad:function(data){
65 | // 这里要非常注意,微信的scroll-view必须要设置高度才能监听滚动事件,所以,需要在页面的onLoad事件中给scroll-view的高度赋值
66 | var that = this;
67 | if(data.keyword>0){
68 | keyword = data.keyword;
69 | }else{
70 | keyword = -1;
71 | }
72 | wx.getSystemInfo({
73 | success:function(res){
74 | console.info(res.windowHeight);
75 | that.setData({
76 | scrollHeight:res.windowHeight
77 | });
78 | }
79 | });
80 | },
81 | onShow:function(){
82 | // 在页面展示之后先获取一次数据
83 | var that = this;
84 | page = 1; //没次进入页面的时候 因为有缓存 要重新赋值
85 | GetList(that);
86 | },
87 | bindDownLoad:function(){
88 | // 该方法绑定了页面滑动到底部的事件
89 | var that = this;
90 | if(is_more)
91 | GetList(that);
92 | },
93 | scroll:function(event){
94 | // 该方法绑定了页面滚动时的事件,我这里记录了当前的position.y的值,为了请求数据之后把页面定位到这里来。
95 | this.setData({
96 | scrollTop : event.detail.scrollTop
97 | });
98 | },
99 | refresh:function(event){
100 | // 该方法绑定了页面滑动到顶部的事件,然后做上拉刷新
101 | page = 1;
102 | this.setData({
103 | list : [],
104 | scrollTop : 0
105 | });
106 | GetList(this)
107 | },
108 | inputKeyWord:function(e){
109 | this.setData({
110 | keyWord:e.detail.value
111 | });
112 | },
113 | searchGoodsTap:function(data){
114 | var that = this;
115 | keyword = data.currentTarget.dataset.keyword;
116 | if(keyword){//keyword存在
117 | keyword = data.currentTarget.dataset.keyword;
118 | }else{
119 | keyword = -1;
120 | }
121 | GetList(that);
122 | that.refresh();//刷新页面
123 |
124 | },
125 |
126 |
127 |
128 | // 跳转到商品详情页
129 | goodsDetail: function (data) {
130 | wx.navigateTo({ url: '../goodsDetail/goodsDetail?id=' + data.currentTarget.dataset.id });
131 | }
132 | })
--------------------------------------------------------------------------------
/pages/petArticleHome/petArticleHome.wxss:
--------------------------------------------------------------------------------
1 | @import "/static/icon.wxss";
2 | @import "/pages/template/template.wxss";
3 | .cate-wrap{
4 | display:flex;
5 | padding-top:30rpx;
6 | background:#FFFFFF;
7 | flex-wrap:wrap;
8 | flex-direction:row;
9 | justify-content:space-between;
10 | align-items:center;
11 | padding-left:20rpx;
12 | padding-right:20rpx;
13 |
14 | }
15 | .head-box{
16 | position:relative;
17 | height:384rpx;
18 | width:750rpx;
19 |
20 | }
21 | swiper{
22 | height:400rpx;
23 | width:750rpx;
24 |
25 | }
26 |
27 | .search-wrap{
28 | box-sizing: border-box;
29 | width: 100%;
30 | display: flex;
31 | flex-direction: row;
32 | background: white;
33 | align-items: center;
34 | padding:20rpx;
35 |
36 |
37 | }
38 | .search-wrap .location-city{
39 | width:25%;
40 | height: 65rpx;
41 | background-color:#ffd343;
42 | padding:10rpx;
43 | display:flex;
44 | flex-direction:row;
45 | align-items:center;
46 | background:#ffd343;
47 | padding-top: 20rpx;
48 | padding-bottom: 20rpx;
49 | border-radius:20rpx;
50 |
51 | }
52 | .search-wrap .location-city .location-icon{
53 | margin-left:15rpx;
54 | font-size:30rpx;
55 | }
56 | .search-wrap .location-city .city-text{
57 | margin-right:23rpx;
58 | color:white;
59 | font-size:30rpx;
60 |
61 | }
62 | .location-city .location-icon{
63 | color: white;
64 | }
65 |
66 | .search-wrap .search-inner{
67 | width: 70%;
68 | height: 65rpx;
69 | display: flex;
70 | flex-direction: row;
71 | background-color: #fff;
72 | box-sizing: border-box;
73 | padding: 10rpx;
74 | align-items: center;
75 | border-radius: 20rpx;
76 | border: 1rpx solid #ffd343;
77 | margin-left: 35rpx;
78 | }
79 | .search-wrap .search-icon{
80 | width: 50rpx;
81 | height: 50rpx;
82 | }
83 | .search-wrap input{
84 | display: flex;
85 | flex: 1;
86 | height: 50rpx;
87 | line-height: 50rpx;
88 | padding-left: 10rpx;
89 | }
90 | .search-wrap .search-inner .search-input{
91 | display: flex;
92 | flex: 1;
93 | height: 60rpx;
94 | line-height: 60rpx;
95 | color: #CCCCCC;
96 |
97 | }
98 | .search-wrap .search-button{
99 | font-size:28rpx;
100 | width:188rpx;
101 | height:64rpx;
102 | margin-top:-4rpx;
103 | margin-right:-10rpx;
104 | border-radius:20rpx;
105 | background-color:#ffd343;
106 | color:white;
107 | }
108 | .search-wrap .search-inner .search-inner-text{
109 | font-size: 30rpx;
110 | }
111 | .search-input{
112 | padding-top: 1rpx;
113 | height: 100%;
114 | }
115 |
116 | .cate-line{
117 | width: 100%;
118 | height: 20rpx;
119 | background: #F0F0F0;
120 | }
121 | .cate-wrap .cate-item{
122 | display: inline-block;
123 | width: 192rpx;
124 | height: 192rpx;
125 | box-sizing: border-box;
126 | padding: 10rpx 40rpx;
127 | text-align: center;
128 | white-space: normal;
129 | margin-bottom: 30rpx;
130 | border-width: 1px;
131 | border-color: rgb(234, 234, 234);
132 | border-style: solid;
133 | border-radius: 10px;
134 | box-shadow: 0px 0px 4.75px 0.25px rgba(0, 0, 0, 0.11);
135 | z-index: 45;
136 |
137 | }
138 | .cate-wrap .cate-item:nth-child(3n+0){
139 | border-right: none;
140 | }
141 | .cate-wrap .cate-item image{
142 | width: 100%;
143 | color: #2E2E2E;
144 | height: 100%;
145 | }
146 | .cate-wrap .cate-item .cate-name{
147 | width: 100%;
148 | display: block;
149 | text-align: center;
150 | margin-top: 10rpx;
151 | font-size: 26rpx;
152 | color: #2E2E2E;
153 | overflow: hidden;
154 | text-overflow: ellipsis;
155 | white-space: nowrap;
156 | }
157 | .cate-wrap .cate-item .cate-ename{
158 | width: 100%;
159 | display: block;
160 | text-align: center;
161 | margin-top: 10rpx;
162 | font-size: 20rpx;
163 | }
--------------------------------------------------------------------------------
/app.wxss:
--------------------------------------------------------------------------------
1 | /**app.wxss**/
2 | view{
3 | box-sizing: border-box;
4 | }
5 | .container {
6 | height: 100%;
7 | display: flex;
8 | flex-direction: column;
9 | align-items: center;
10 | justify-content: space-between;
11 | padding: 200rpx 0;
12 | box-sizing: border-box !important;
13 | background-color: #F2F2F2;
14 | }
15 | .hidden{
16 | display: none !important;
17 | }
18 |
19 | /**公共flex方法**/
20 | .flex-row{
21 | display: flex;
22 | flex-direction: row;
23 | /* flex-wrap: nowrap; */
24 | }
25 | .a-center{
26 | align-items: center;
27 | }
28 | .flex-column{
29 | display: flex;
30 | flex-direction:column;
31 | /* flex-wrap:nowrap; */
32 | }
33 | .flex-js-between{
34 | justify-content: space-between;
35 | }
36 | .flex-ai-around{
37 | align-items: space-between;
38 | }
39 | page,.place-holder {
40 | font-family: "微软雅黑";
41 | }
42 | page {
43 | background-color: #fff;
44 | box-sizing: border-box;
45 | font-size: 28rpx;
46 | }
47 | .inline{
48 | display: inline-block;
49 | }
50 |
51 | /* 我的 */
52 | .icon{
53 | margin-right: 10rpx;
54 | }
55 | .icon.search-icon{
56 | width: auto;
57 | height: auto;
58 | }
59 | .icon-line{
60 | display: inline-block;
61 | }
62 | .list-img-wrap{
63 | width: 160rpx;
64 | }
65 | .list-img{
66 | width: 100%;
67 | border-radius: 6rpx;
68 | }
69 | /* 一行两列图片wrap */
70 | .img-2-wrap{
71 | /* border: 1px solid red; */
72 | height: 360rpx;
73 | width: 100%;
74 | display: flex;
75 | padding:0 30rpx;
76 | flex-direction: column;
77 | justify-content: center;
78 | }
79 | .img-2-wrap image{
80 | width: 100%;
81 | }
82 | /* 图片默认样式修改 */
83 | image{
84 | width: 100%;
85 | height: 106px;
86 | }
87 | /* 模态框 */
88 | #marsk{
89 | width:100%;
90 | height:100%;
91 | background:rgba(0,0,0,0.6);
92 | position:fixed;
93 | left:0px;
94 | top:0px;
95 | z-index:1000;
96 | }
97 | #marsk-inner-wrap{
98 | border-radius: 6rpx;
99 | width: 450rpx;
100 | height: 560rpx;
101 | z-index: 99999;
102 | position: fixed;
103 | margin: 0 auto;
104 | left: 0rpx;
105 | right: 0rpx;
106 | top: 300rpx;
107 | bottom: 300rpx;
108 | }
109 |
110 | /* 普通左右padding */
111 | .norm-wrap{
112 | padding: 11rpx;
113 | }
114 |
115 | /* 限制行数:单行带省略号,多行待省略号 */
116 | .limit-text-2{
117 | overflow : hidden;
118 | text-overflow: ellipsis;
119 | display: -webkit-box;
120 | -webkit-line-clamp: 2;
121 | -webkit-box-orient: vertical;
122 | width: 100%;
123 | }
124 | .limit-text-1{
125 | overflow : hidden;
126 | text-overflow: ellipsis;
127 | display: -webkit-box;
128 | -webkit-line-clamp: 1;
129 | -webkit-box-orient: vertical;
130 | }
131 |
132 | /*下拉加载状态显示:别扯了,我们也是有底线的*/
133 | .tip-text{
134 | padding: 100rpx;
135 | color: #777;
136 | text-align: center;
137 | font-size: 32rpx;
138 | }
139 |
140 | /*列表标题右侧的:更多*/
141 | .get-more{
142 | padding: 30rpx 10rpx;
143 | text-align:center;
144 | color: #888;
145 | /* background-color: #fff; */
146 | }
147 |
148 | /* 公共样式颜色 */
149 | .price-val{
150 | color: #222222;
151 | }
152 | .brand{
153 | color: #333;
154 | font-size: 26rpx;
155 | }
156 | .goods-name{
157 | color: #666;
158 | }
159 | .points-val{
160 | color: #FB6D09;
161 | }
162 | .flex{
163 | flex:1;
164 | }
165 | /* 按钮包装 */
166 | .btn-wrap{
167 | width: 100%;
168 | box-sizing: border-box;
169 | padding: 20rpx;
170 | }
171 | .btn-wrap button:nth-child(n+1){
172 | margin-top:20rpx;
173 | }
174 | button[type="warn"] {
175 | color:#FFFFFF;
176 | background-color:#EA5F72;
177 | }
178 | /* 搜索框 */
179 | .center{
180 | /* display: flex; */
181 | justify-content: center;
182 | align-items: center;
183 | text-align: center;
184 | }
185 | /* item样式 */
186 | .item-1{
187 | width: 100%;
188 | height: 80rpx;
189 | }
190 | .item-2{
191 | width: 50%;
192 | height: 80rpx;
193 | padding: 10rpx;
194 | }
--------------------------------------------------------------------------------
/static/icon.wxss:
--------------------------------------------------------------------------------
1 |
2 | @font-face {
3 | font-family: 'iconfont'; /* project id 664686 */
4 | src: url('//at.alicdn.com/t/font_664686_r0e0lmj4xzd.eot');
5 | src: url('//at.alicdn.com/t/font_664686_r0e0lmj4xzd.eot?#iefix') format('embedded-opentype'),
6 | url('//at.alicdn.com/t/font_664686_r0e0lmj4xzd.woff') format('woff'),
7 | url('//at.alicdn.com/t/font_664686_r0e0lmj4xzd.ttf') format('truetype'),
8 | url('//at.alicdn.com/t/font_664686_r0e0lmj4xzd.svg#iconfont') format('svg');
9 | }
10 |
11 | .iconfont {
12 | font-family:"iconfont" !important;
13 | font-size:16px;
14 | font-style:normal;
15 | -webkit-font-smoothing: antialiased;
16 | -moz-osx-font-smoothing: grayscale;
17 | }
18 |
19 | .icon-yifabu:before { content: "\e618"; }
20 |
21 | .icon-fav-1:before { content: "\e60e"; }
22 |
23 | .icon-leimupinleifenleileibie:before { content: "\e7f9"; }
24 |
25 | .icon-chakan:before { content: "\e6a5"; }
26 |
27 | .icon-sanjiaoxing-down:before { content: "\e791"; }
28 |
29 | .icon-shenhezhong:before { content: "\e617"; }
30 |
31 | .icon-zanwushuju:before { content: "\e6b0"; }
32 |
33 | .icon-chongwu:before { content: "\e677"; }
34 |
35 | .icon-zanwushuju1:before { content: "\e64c"; }
36 |
37 | .icon-dianzan-copy-copy:before { content: "\e60d"; }
38 |
39 | .icon-fenxiang1:before { content: "\e784"; }
40 |
41 | .icon-gou:before { content: "\e632"; }
42 |
43 | .icon-xuanzhongyuandian:before { content: "\e623"; }
44 |
45 | .icon-leimupinleifenleileibie1:before { content: "\e600"; }
46 |
47 | .icon-gou1:before { content: "\e779"; }
48 |
49 | .icon-mao:before { content: "\e77e"; }
50 |
51 | .icon-zanwushuju2:before { content: "\e607"; }
52 |
53 | .icon-xiaoxi-pressed:before { content: "\e601"; }
54 |
55 | .icon-yifabu1:before { content: "\e61d"; }
56 |
57 | .icon-chongwuyiyuan1:before { content: "\e602"; }
58 |
59 | .icon-yifabu2:before { content: "\e645"; }
60 |
61 | .icon-shenhezhong1:before { content: "\e647"; }
62 |
63 | .icon-wode:before { content: "\e603"; }
64 |
65 | .icon-zhifuchenggong:before { content: "\e624"; }
66 |
67 | .icon-delete-black:before { content: "\e692"; }
68 |
69 | .icon-dianhua:before { content: "\e94a"; }
70 |
71 | .icon-kefu:before { content: "\e699"; }
72 |
73 | .icon-kefu3:before { content: "\e67c"; }
74 |
75 | .icon-shouye:before { content: "\e616"; }
76 |
77 | .icon-zanwushuju-:before { content: "\e60c"; }
78 |
79 | .icon-kefu1:before { content: "\e7b0"; }
80 |
81 | .icon-chakan1:before { content: "\e61e"; }
82 |
83 | .icon-dianzan_active:before { content: "\e605"; }
84 |
85 | .icon-zanwushuju3:before { content: "\e696"; }
86 |
87 | .icon-dianzan:before { content: "\e61f"; }
88 |
89 | .icon-icon:before { content: "\e60b"; }
90 |
91 | .icon-liuyan1:before { content: "\e641"; }
92 |
93 | .icon-touxiang:before { content: "\e65a"; }
94 |
95 | .icon-dianhua1:before { content: "\e626"; }
96 |
97 | .icon-zhifubao:before { content: "\e60a"; }
98 |
99 | .icon-fenxiang:before { content: "\e66c"; }
100 |
101 | .icon-sousuo:before { content: "\e7e2"; }
102 |
103 | .icon-riqi:before { content: "\e620"; }
104 |
105 | .icon-dianhua2:before { content: "\e6f5"; }
106 |
107 | .icon-dingwei:before { content: "\e604"; }
108 |
109 | .icon-kefu2:before { content: "\e62f"; }
110 |
111 | .icon-kefu4:before { content: "\e646"; }
112 |
113 | .icon-xuanzhong:before { content: "\e622"; }
114 |
115 | .icon-wode6:before { content: "\e608"; }
116 |
117 | .icon-zanwushuju4:before { content: "\e621"; }
118 |
119 | .icon-shouye3:before { content: "\e609"; }
120 |
121 | .icon-fabu1:before { content: "\eb6a"; }
122 |
123 | .icon-xiaoxi2:before { content: "\e613"; }
124 |
125 | .icon-pinglunguanli:before { content: "\e635"; }
126 |
127 | .icon-fabu:before { content: "\e61c"; }
128 |
129 | .icon-shouye1:before { content: "\e654"; }
130 |
131 | .icon-tianjiajiahaowubiankuang:before { content: "\e606"; }
132 |
133 | .icon-chakan2:before { content: "\e663"; }
134 |
135 | .icon-weixuan1:before { content: "\e6b7"; }
136 |
137 | .icon-yuanjiaojuxingkaobei:before { content: "\e63f"; }
138 |
139 | .icon-tianjiajia:before { content: "\e706"; }
140 |
141 | .icon-zhifuchenggong-copy:before { content: "\eb6b"; }
142 |
143 |
--------------------------------------------------------------------------------
/pages/coupon/couponList/couponList.js:
--------------------------------------------------------------------------------
1 |
2 | var CONFIG = require('../../../utils/config.js');
3 | //index.js
4 | var app = getApp();
5 | var base_url = CONFIG.API_URL.BASE_URL;
6 | var userInfo = wx.getStorageSync('userInfo');
7 | var page = 1;
8 | var pageSize = 6;
9 | var allPages = 0;
10 |
11 | //请求数据
12 | var pagingGoods = function (options, that) {
13 | wx.request({
14 | url: base_url + 'index.php?c=wxApp&a=pagingCoupon',
15 | data: {
16 | pageIndex: page,
17 | pageSize: pageSize,
18 | user_id: userInfo.id,
19 | },
20 | method: 'GET',
21 | success: function (res) {
22 | var data = res.data.data;
23 | console.log(res,'res');
24 | var dataList = data.dataList;
25 | var list = that.data.list;
26 | allPages = data.pageInfo.all_pages;
27 | for (var i = 0; i < dataList.length; i++) {
28 | if (dataList[i]['is_get'] == 0){
29 | dataList[i]['btn_text'] = "立即领取";
30 | dataList[i]['listener_text'] = 'getCoupon';
31 | dataList[i]['class_text'] = 'btn';
32 | } else if (dataList[i]['is_get'] == 1){
33 | dataList[i]['btn_text'] = "已领取";
34 | dataList[i]['listener_text'] = 'sendCoupon';
35 | dataList[i]['class_text'] = 'btn_text';
36 | }
37 |
38 | list.push(dataList[i])
39 | }
40 | that.setData({ list: list });
41 | // console.log( that.data.list )
42 | page++;
43 | }
44 | })
45 | };
46 |
47 | Page({
48 | data: {
49 | headerBgOpacity: 0,
50 | base_url: base_url,
51 | hidden: true,//输入框关闭按钮默认不显示
52 | list: []
53 | },
54 |
55 | onLoad: function (options) {
56 | var that = this;
57 | pagingGoods(options, that);
58 |
59 | },
60 |
61 | onUnload: function () {
62 | page = 1;
63 | pageSize = 6;
64 | allPages = 0;
65 | this.setData({
66 | list: [],
67 | })
68 | },
69 | /**
70 | * 触底加载
71 | */
72 | onReachBottom: function (options) {
73 | var that = this;
74 | if (page > allPages) {
75 | return false;
76 | } else {
77 | pagingGoods(options, that);
78 | }
79 | },
80 |
81 | //领取优惠券
82 | getCoupon: function (e) {
83 | var id = e.currentTarget.dataset.id;
84 | var index = e.currentTarget.dataset.index;
85 | var that = this;
86 | var dataList = this.data.list;
87 | console.log(index);
88 | console.log(that);
89 | wx.request({
90 | url: base_url + 'index.php?c=wxApp&a=getCoupon',
91 | data: {
92 | 'couponId': id,
93 | 'user_id': userInfo.id,
94 | 'nick_name': userInfo.nick_name
95 | },
96 | method: 'GET',
97 | success: function (res) {
98 | console.log(res);
99 | if (res.data.errorCode == 0) {
100 | dataList[index]['btn_text'] = "已领取";
101 | dataList[index]['listener_text'] = 'sendCoupon';
102 | dataList[index]['class_text'] = 'btn_text';
103 | that.setData({ list: dataList });
104 | console.log(that.data.list);
105 | wx.showToast({
106 | title: '领取成功',
107 | icon: 'success',
108 | duration: 2000
109 | });
110 |
111 | } else if (res.data.errorCode == 1) {
112 | wx.showToast({
113 | title: res.data.errorInfo,
114 | image: '../../../static/images/my/error_tip.png',
115 | duration: 1000
116 | })
117 | }
118 | }
119 | })
120 | },
121 |
122 | //已领过的优惠券
123 | sendCoupon: function (e) {
124 | var id = e.currentTarget.dataset.id;
125 | wx.showToast({
126 | title: '该优惠券已领过啦',
127 | image: '../../../static/images/my/error_tip.png',
128 | duration: 1000
129 | })
130 |
131 | },
132 |
133 |
134 | //去使用
135 | goIndex: function () {
136 | wx.reLaunch({
137 | url: '../../index/index',
138 | });
139 | },
140 | //我的优惠卷
141 | myCoupon: function () {
142 | wx.navigateBack({
143 | delta: 1
144 | })
145 | // wx.reLaunch({
146 | // url: '/pages/coupon/myCoupon/myCoupon?currentTab=99',
147 | // });
148 | },
149 | })
150 |
151 |
152 |
153 |
154 |
155 |
156 |
157 |
158 |
159 |
160 |
161 |
162 |
--------------------------------------------------------------------------------