├── pages
├── user
│ ├── user.json
│ ├── user.wxml
│ ├── user.wxss
│ └── user.js
├── dinner
│ ├── dinner.json
│ ├── dinner.wxml
│ ├── dinner.wxss
│ └── dinner.js
├── index
│ ├── index.json
│ ├── index.wxml
│ ├── index.wxss
│ └── index.js
├── product
│ ├── product.json
│ ├── product.wxml
│ ├── product.wxss
│ └── product.js
├── activity
│ ├── activity.json
│ ├── activity.wxml
│ ├── activity.wxss
│ └── activity.js
├── ordering
│ ├── ordering.json
│ └── ordering.wxml
├── user-address
│ ├── user-address.json
│ ├── user-address.wxss
│ ├── user-address.wxml
│ └── user-address.js
├── coupon
│ ├── coupon.json
│ ├── coupon.wxml
│ ├── coupon.js
│ └── coupon.wxss
├── detail
│ ├── detail.json
│ ├── detail.wxml
│ ├── detail.js
│ └── detail.wxss
├── events
│ ├── events.json
│ ├── events.wxss
│ ├── events.wxml
│ └── events.js
├── order
│ ├── detail.json
│ ├── detail.wxml
│ ├── detail.js
│ └── detail.wxss
├── payorder
│ ├── payorder.json
│ ├── payorder.wxml
│ ├── payorder.wxss
│ └── payorder.js
├── category
│ ├── index.json
│ ├── index.wxml
│ ├── index.wxss
│ └── index.js
├── logs
│ ├── logs.json
│ ├── logs.wxss
│ ├── logs.wxml
│ └── logs.js
├── time_quantum
│ ├── time_quantum.json
│ ├── time_quantum.wxml
│ ├── time_quantum.wxss
│ └── time_quantum.js
├── address
│ ├── address.json
│ ├── user-address
│ │ ├── user-address.json
│ │ ├── user-address.wxss
│ │ ├── user-address.wxml
│ │ └── user-address.js
│ ├── address.wxss
│ ├── address.wxml
│ └── address.js
├── dingdan
│ ├── dingdan.json
│ ├── dingdan.wxss
│ └── dingdan.wxml
├── synopsis
│ ├── synopsis.json
│ ├── synopsis.wxml
│ ├── synopsis.wxss
│ └── synopsis.js
├── particulars
│ ├── particulars.json
│ ├── particulars.wxml
│ ├── particulars.wxss
│ └── particulars.js
├── ritual
│ ├── ritual.json
│ ├── ritual.wxml
│ ├── ritual.js
│ └── ritual.wxss
└── map
│ └── amap-wx.js
├── .gitattributes
├── images
├── 6.iff
├── dui.png
├── g.png
├── gg.png
├── kf.png
├── map.png
├── s.png
├── ding.png
├── dingg.png
├── shou.png
├── shouu.png
├── shangwu.png
├── wanshang.png
└── zhongwu.png
├── wxParse
├── emojis
│ ├── 00.gif
│ ├── 01.gif
│ ├── 02.gif
│ ├── 03.gif
│ ├── 04.gif
│ ├── 05.gif
│ ├── 06.gif
│ ├── 07.gif
│ ├── 08.gif
│ ├── 09.gif
│ ├── 10.gif
│ ├── 11.gif
│ ├── 12.gif
│ ├── 13.gif
│ ├── 14.gif
│ ├── 15.gif
│ ├── 16.gif
│ ├── 17.gif
│ ├── 18.gif
│ ├── 19.gif
│ ├── 20.gif
│ ├── 21.gif
│ ├── 22.gif
│ ├── 23.gif
│ ├── 24.gif
│ ├── 25.gif
│ ├── 26.gif
│ ├── 27.gif
│ ├── 28.gif
│ ├── 29.gif
│ ├── 30.gif
│ ├── 31.gif
│ ├── 32.gif
│ ├── 33.gif
│ ├── 34.gif
│ ├── 35.gif
│ ├── 36.gif
│ ├── 37.gif
│ ├── 38.gif
│ ├── 39.gif
│ ├── 40.gif
│ ├── 41.gif
│ ├── 42.gif
│ ├── 43.gif
│ ├── 44.gif
│ ├── 45.gif
│ ├── 46.gif
│ ├── 47.gif
│ ├── 48.gif
│ ├── 49.gif
│ ├── 50.gif
│ ├── 51.gif
│ ├── 52.gif
│ ├── 53.gif
│ ├── 54.gif
│ ├── 55.gif
│ ├── 56.gif
│ ├── 57.gif
│ ├── 58.gif
│ ├── 59.gif
│ ├── 60.gif
│ ├── 61.gif
│ ├── 62.gif
│ ├── 63.gif
│ ├── 64.gif
│ ├── 65.gif
│ ├── 66.gif
│ ├── 67.gif
│ ├── 68.gif
│ ├── 69.gif
│ ├── 70.gif
│ ├── 71.gif
│ ├── 72.gif
│ ├── 73.gif
│ ├── 74.gif
│ ├── 75.gif
│ ├── 76.gif
│ ├── 77.gif
│ ├── 78.gif
│ ├── 79.gif
│ ├── 80.gif
│ ├── 81.gif
│ ├── 82.gif
│ ├── 83.gif
│ ├── 84.gif
│ ├── 85.gif
│ ├── 86.gif
│ ├── 87.gif
│ ├── 88.gif
│ ├── 89.gif
│ ├── 90.gif
│ ├── 91.gif
│ ├── 92.gif
│ ├── 93.gif
│ ├── 94.gif
│ ├── 95.gif
│ ├── 96.gif
│ ├── 97.gif
│ ├── 98.gif
│ ├── 99.gif
│ ├── 100.gif
│ ├── 101.gif
│ ├── 102.gif
│ ├── 103.gif
│ ├── 104.gif
│ ├── 105.gif
│ ├── 106.gif
│ ├── 107.gif
│ ├── 108.gif
│ ├── 109.gif
│ ├── 110.gif
│ ├── 111.gif
│ ├── 112.gif
│ ├── 113.gif
│ ├── 114.gif
│ ├── 115.gif
│ ├── 116.gif
│ ├── 117.gif
│ ├── 118.gif
│ ├── 119.gif
│ ├── 120.gif
│ ├── 121.gif
│ ├── 122.gif
│ ├── 123.gif
│ ├── 124.gif
│ ├── 125.gif
│ ├── 126.gif
│ ├── 127.gif
│ ├── 128.gif
│ ├── 129.gif
│ ├── 130.gif
│ ├── 131.gif
│ ├── 132.gif
│ ├── 133.gif
│ └── 134.gif
├── wxParse.js
├── wxParse.wxss
├── htmlparser.js
└── wxDiscode.js
├── screen
├── 20170928161947.png
├── 20170928161954.png
├── 20170928161958.png
├── 20170928162004.png
├── 20170928162008.png
└── 20170928162014.png
├── utils
└── util.js
├── README.md
├── app.json
└── app.js
/pages/user/user.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/dinner/dinner.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/index/index.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/product/product.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/activity/activity.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/ordering/ordering.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/user-address/user-address.json:
--------------------------------------------------------------------------------
1 | {}
--------------------------------------------------------------------------------
/pages/coupon/coupon.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText": "优惠劵"}
--------------------------------------------------------------------------------
/pages/detail/detail.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText":"排队取号"}
--------------------------------------------------------------------------------
/pages/events/events.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText": "活动信息"}
--------------------------------------------------------------------------------
/pages/order/detail.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText":"订单详情"}
--------------------------------------------------------------------------------
/pages/payorder/payorder.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText":"确认订单"}
--------------------------------------------------------------------------------
/pages/category/index.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "全部商品"
3 | }
--------------------------------------------------------------------------------
/pages/logs/logs.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "查看启动日志"
3 | }
--------------------------------------------------------------------------------
/pages/time_quantum/time_quantum.json:
--------------------------------------------------------------------------------
1 | {"navigationBarTitleText": "选择座位"}
--------------------------------------------------------------------------------
/pages/address/address.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "联系地址"
3 | }
--------------------------------------------------------------------------------
/pages/dingdan/dingdan.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "订单状态"
3 | }
--------------------------------------------------------------------------------
/pages/synopsis/synopsis.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "关于我们"
3 | }
--------------------------------------------------------------------------------
/pages/user-address/user-address.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user-address/user-address.wxss */
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
--------------------------------------------------------------------------------
/images/6.iff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/6.iff
--------------------------------------------------------------------------------
/images/dui.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/dui.png
--------------------------------------------------------------------------------
/images/g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/g.png
--------------------------------------------------------------------------------
/images/gg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/gg.png
--------------------------------------------------------------------------------
/images/kf.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/kf.png
--------------------------------------------------------------------------------
/images/map.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/map.png
--------------------------------------------------------------------------------
/images/s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/s.png
--------------------------------------------------------------------------------
/pages/particulars/particulars.json:
--------------------------------------------------------------------------------
1 | {
2 | "navigationBarTitleText": "活动详情"
3 | }
--------------------------------------------------------------------------------
/images/ding.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/ding.png
--------------------------------------------------------------------------------
/images/dingg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/dingg.png
--------------------------------------------------------------------------------
/images/shou.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/shou.png
--------------------------------------------------------------------------------
/images/shouu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/shouu.png
--------------------------------------------------------------------------------
/images/shangwu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/shangwu.png
--------------------------------------------------------------------------------
/images/wanshang.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/wanshang.png
--------------------------------------------------------------------------------
/images/zhongwu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/images/zhongwu.png
--------------------------------------------------------------------------------
/wxParse/emojis/00.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/00.gif
--------------------------------------------------------------------------------
/wxParse/emojis/01.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/01.gif
--------------------------------------------------------------------------------
/wxParse/emojis/02.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/02.gif
--------------------------------------------------------------------------------
/wxParse/emojis/03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/03.gif
--------------------------------------------------------------------------------
/wxParse/emojis/04.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/04.gif
--------------------------------------------------------------------------------
/wxParse/emojis/05.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/05.gif
--------------------------------------------------------------------------------
/wxParse/emojis/06.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/06.gif
--------------------------------------------------------------------------------
/wxParse/emojis/07.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/07.gif
--------------------------------------------------------------------------------
/wxParse/emojis/08.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/08.gif
--------------------------------------------------------------------------------
/wxParse/emojis/09.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/09.gif
--------------------------------------------------------------------------------
/wxParse/emojis/10.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/10.gif
--------------------------------------------------------------------------------
/wxParse/emojis/11.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/11.gif
--------------------------------------------------------------------------------
/wxParse/emojis/12.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/12.gif
--------------------------------------------------------------------------------
/wxParse/emojis/13.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/13.gif
--------------------------------------------------------------------------------
/wxParse/emojis/14.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/14.gif
--------------------------------------------------------------------------------
/wxParse/emojis/15.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/15.gif
--------------------------------------------------------------------------------
/wxParse/emojis/16.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/16.gif
--------------------------------------------------------------------------------
/wxParse/emojis/17.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/17.gif
--------------------------------------------------------------------------------
/wxParse/emojis/18.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/18.gif
--------------------------------------------------------------------------------
/wxParse/emojis/19.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/19.gif
--------------------------------------------------------------------------------
/wxParse/emojis/20.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/20.gif
--------------------------------------------------------------------------------
/wxParse/emojis/21.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/21.gif
--------------------------------------------------------------------------------
/wxParse/emojis/22.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/22.gif
--------------------------------------------------------------------------------
/wxParse/emojis/23.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/23.gif
--------------------------------------------------------------------------------
/wxParse/emojis/24.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/24.gif
--------------------------------------------------------------------------------
/wxParse/emojis/25.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/25.gif
--------------------------------------------------------------------------------
/wxParse/emojis/26.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/26.gif
--------------------------------------------------------------------------------
/wxParse/emojis/27.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/27.gif
--------------------------------------------------------------------------------
/wxParse/emojis/28.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/28.gif
--------------------------------------------------------------------------------
/wxParse/emojis/29.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/29.gif
--------------------------------------------------------------------------------
/wxParse/emojis/30.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/30.gif
--------------------------------------------------------------------------------
/wxParse/emojis/31.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/31.gif
--------------------------------------------------------------------------------
/wxParse/emojis/32.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/32.gif
--------------------------------------------------------------------------------
/wxParse/emojis/33.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/33.gif
--------------------------------------------------------------------------------
/wxParse/emojis/34.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/34.gif
--------------------------------------------------------------------------------
/wxParse/emojis/35.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/35.gif
--------------------------------------------------------------------------------
/wxParse/emojis/36.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/36.gif
--------------------------------------------------------------------------------
/wxParse/emojis/37.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/37.gif
--------------------------------------------------------------------------------
/wxParse/emojis/38.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/38.gif
--------------------------------------------------------------------------------
/wxParse/emojis/39.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/39.gif
--------------------------------------------------------------------------------
/wxParse/emojis/40.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/40.gif
--------------------------------------------------------------------------------
/wxParse/emojis/41.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/41.gif
--------------------------------------------------------------------------------
/wxParse/emojis/42.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/42.gif
--------------------------------------------------------------------------------
/wxParse/emojis/43.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/43.gif
--------------------------------------------------------------------------------
/wxParse/emojis/44.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/44.gif
--------------------------------------------------------------------------------
/wxParse/emojis/45.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/45.gif
--------------------------------------------------------------------------------
/wxParse/emojis/46.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/46.gif
--------------------------------------------------------------------------------
/wxParse/emojis/47.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/47.gif
--------------------------------------------------------------------------------
/wxParse/emojis/48.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/48.gif
--------------------------------------------------------------------------------
/wxParse/emojis/49.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/49.gif
--------------------------------------------------------------------------------
/wxParse/emojis/50.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/50.gif
--------------------------------------------------------------------------------
/wxParse/emojis/51.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/51.gif
--------------------------------------------------------------------------------
/wxParse/emojis/52.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/52.gif
--------------------------------------------------------------------------------
/wxParse/emojis/53.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/53.gif
--------------------------------------------------------------------------------
/wxParse/emojis/54.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/54.gif
--------------------------------------------------------------------------------
/wxParse/emojis/55.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/55.gif
--------------------------------------------------------------------------------
/wxParse/emojis/56.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/56.gif
--------------------------------------------------------------------------------
/wxParse/emojis/57.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/57.gif
--------------------------------------------------------------------------------
/wxParse/emojis/58.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/58.gif
--------------------------------------------------------------------------------
/wxParse/emojis/59.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/59.gif
--------------------------------------------------------------------------------
/wxParse/emojis/60.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/60.gif
--------------------------------------------------------------------------------
/wxParse/emojis/61.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/61.gif
--------------------------------------------------------------------------------
/wxParse/emojis/62.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/62.gif
--------------------------------------------------------------------------------
/wxParse/emojis/63.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/63.gif
--------------------------------------------------------------------------------
/wxParse/emojis/64.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/64.gif
--------------------------------------------------------------------------------
/wxParse/emojis/65.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/65.gif
--------------------------------------------------------------------------------
/wxParse/emojis/66.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/66.gif
--------------------------------------------------------------------------------
/wxParse/emojis/67.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/67.gif
--------------------------------------------------------------------------------
/wxParse/emojis/68.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/68.gif
--------------------------------------------------------------------------------
/wxParse/emojis/69.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/69.gif
--------------------------------------------------------------------------------
/wxParse/emojis/70.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/70.gif
--------------------------------------------------------------------------------
/wxParse/emojis/71.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/71.gif
--------------------------------------------------------------------------------
/wxParse/emojis/72.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/72.gif
--------------------------------------------------------------------------------
/wxParse/emojis/73.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/73.gif
--------------------------------------------------------------------------------
/wxParse/emojis/74.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/74.gif
--------------------------------------------------------------------------------
/wxParse/emojis/75.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/75.gif
--------------------------------------------------------------------------------
/wxParse/emojis/76.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/76.gif
--------------------------------------------------------------------------------
/wxParse/emojis/77.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/77.gif
--------------------------------------------------------------------------------
/wxParse/emojis/78.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/78.gif
--------------------------------------------------------------------------------
/wxParse/emojis/79.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/79.gif
--------------------------------------------------------------------------------
/wxParse/emojis/80.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/80.gif
--------------------------------------------------------------------------------
/wxParse/emojis/81.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/81.gif
--------------------------------------------------------------------------------
/wxParse/emojis/82.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/82.gif
--------------------------------------------------------------------------------
/wxParse/emojis/83.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/83.gif
--------------------------------------------------------------------------------
/wxParse/emojis/84.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/84.gif
--------------------------------------------------------------------------------
/wxParse/emojis/85.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/85.gif
--------------------------------------------------------------------------------
/wxParse/emojis/86.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/86.gif
--------------------------------------------------------------------------------
/wxParse/emojis/87.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/87.gif
--------------------------------------------------------------------------------
/wxParse/emojis/88.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/88.gif
--------------------------------------------------------------------------------
/wxParse/emojis/89.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/89.gif
--------------------------------------------------------------------------------
/wxParse/emojis/90.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/90.gif
--------------------------------------------------------------------------------
/wxParse/emojis/91.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/91.gif
--------------------------------------------------------------------------------
/wxParse/emojis/92.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/92.gif
--------------------------------------------------------------------------------
/wxParse/emojis/93.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/93.gif
--------------------------------------------------------------------------------
/wxParse/emojis/94.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/94.gif
--------------------------------------------------------------------------------
/wxParse/emojis/95.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/95.gif
--------------------------------------------------------------------------------
/wxParse/emojis/96.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/96.gif
--------------------------------------------------------------------------------
/wxParse/emojis/97.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/97.gif
--------------------------------------------------------------------------------
/wxParse/emojis/98.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/98.gif
--------------------------------------------------------------------------------
/wxParse/emojis/99.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/99.gif
--------------------------------------------------------------------------------
/pages/address/user-address/user-address.json:
--------------------------------------------------------------------------------
1 | {
2 |
3 | "navigationBarTitleText": "地址管理"
4 |
5 | }
--------------------------------------------------------------------------------
/wxParse/emojis/100.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/100.gif
--------------------------------------------------------------------------------
/wxParse/emojis/101.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/101.gif
--------------------------------------------------------------------------------
/wxParse/emojis/102.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/102.gif
--------------------------------------------------------------------------------
/wxParse/emojis/103.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/103.gif
--------------------------------------------------------------------------------
/wxParse/emojis/104.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/104.gif
--------------------------------------------------------------------------------
/wxParse/emojis/105.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/105.gif
--------------------------------------------------------------------------------
/wxParse/emojis/106.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/106.gif
--------------------------------------------------------------------------------
/wxParse/emojis/107.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/107.gif
--------------------------------------------------------------------------------
/wxParse/emojis/108.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/108.gif
--------------------------------------------------------------------------------
/wxParse/emojis/109.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/109.gif
--------------------------------------------------------------------------------
/wxParse/emojis/110.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/110.gif
--------------------------------------------------------------------------------
/wxParse/emojis/111.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/111.gif
--------------------------------------------------------------------------------
/wxParse/emojis/112.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/112.gif
--------------------------------------------------------------------------------
/wxParse/emojis/113.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/113.gif
--------------------------------------------------------------------------------
/wxParse/emojis/114.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/114.gif
--------------------------------------------------------------------------------
/wxParse/emojis/115.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/115.gif
--------------------------------------------------------------------------------
/wxParse/emojis/116.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/116.gif
--------------------------------------------------------------------------------
/wxParse/emojis/117.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/117.gif
--------------------------------------------------------------------------------
/wxParse/emojis/118.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/118.gif
--------------------------------------------------------------------------------
/wxParse/emojis/119.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/119.gif
--------------------------------------------------------------------------------
/wxParse/emojis/120.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/120.gif
--------------------------------------------------------------------------------
/wxParse/emojis/121.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/121.gif
--------------------------------------------------------------------------------
/wxParse/emojis/122.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/122.gif
--------------------------------------------------------------------------------
/wxParse/emojis/123.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/123.gif
--------------------------------------------------------------------------------
/wxParse/emojis/124.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/124.gif
--------------------------------------------------------------------------------
/wxParse/emojis/125.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/125.gif
--------------------------------------------------------------------------------
/wxParse/emojis/126.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/126.gif
--------------------------------------------------------------------------------
/wxParse/emojis/127.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/127.gif
--------------------------------------------------------------------------------
/wxParse/emojis/128.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/128.gif
--------------------------------------------------------------------------------
/wxParse/emojis/129.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/129.gif
--------------------------------------------------------------------------------
/wxParse/emojis/130.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/130.gif
--------------------------------------------------------------------------------
/wxParse/emojis/131.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/131.gif
--------------------------------------------------------------------------------
/wxParse/emojis/132.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/132.gif
--------------------------------------------------------------------------------
/wxParse/emojis/133.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/133.gif
--------------------------------------------------------------------------------
/wxParse/emojis/134.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/wxParse/emojis/134.gif
--------------------------------------------------------------------------------
/screen/20170928161947.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928161947.png
--------------------------------------------------------------------------------
/screen/20170928161954.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928161954.png
--------------------------------------------------------------------------------
/screen/20170928161958.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928161958.png
--------------------------------------------------------------------------------
/screen/20170928162004.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928162004.png
--------------------------------------------------------------------------------
/screen/20170928162008.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928162008.png
--------------------------------------------------------------------------------
/screen/20170928162014.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Catfeeds/canyin_xcx/HEAD/screen/20170928162014.png
--------------------------------------------------------------------------------
/pages/ritual/ritual.json:
--------------------------------------------------------------------------------
1 | {
2 | "backgroundTextStyle":"light",
3 | "navigationBarTitleText": "购物礼劵"
4 | }
--------------------------------------------------------------------------------
/pages/user-address/user-address.wxml:
--------------------------------------------------------------------------------
1 |
2 | pages/user-address/user-address.wxml
3 |
--------------------------------------------------------------------------------
/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/logs/logs.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | {{index + 1}}. {{log}}
5 |
6 |
7 |
--------------------------------------------------------------------------------
/pages/synopsis/synopsis.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/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/activity/activity.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.name}}
8 | {{item.digest}}
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/particulars/particulars.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{info.name}}
4 |
5 |
6 | 浏览:{{info.click}}
7 | {{info.addtime}}
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/pages/events/events.wxss:
--------------------------------------------------------------------------------
1 | .a{
2 | margin-bottom:100rpx;
3 | background: #ccc;
4 | }
5 |
6 |
7 | .a_b{
8 | width: 100%;
9 | height: 100rpx
10 | }
11 | .a_c{
12 | width: 100%;
13 | height: 300rpx;
14 | }
15 | .a_d{
16 | float: left;
17 | background:rgba(0, 0, 0, 0.5);
18 | height: 50rpx;
19 | position: relative;
20 | top: -60rpx;
21 | color: #fff;
22 | width: 100%;
23 | padding-left: 20rpx;
24 |
25 | }
26 | .a_e{
27 | font-size: 32rpx;
28 | margin: 0 30rpx;
29 | margin-bottom: 30rpx;
30 | }
--------------------------------------------------------------------------------
/pages/particulars/particulars.wxss:
--------------------------------------------------------------------------------
1 | .h1 {
2 | text-align: center;
3 | padding: 30rpx 0;
4 | font-size: 40rpx;
5 | font-family: "微软雅黑";
6 | font-weight: 700;
7 | }
8 | .h3 {
9 | margin-top: 10rpx;
10 | }
11 | .time {
12 | display: flex;
13 | }
14 | .time view {
15 | width: 46%;
16 | text-align: center;
17 | color: #999;
18 | }
19 | page {
20 | font-size: 32rpx;
21 | font-family: "微软雅黑";
22 | }
23 | .particulars {
24 | padding: 0 20rpx;
25 | padding-bottom: 20rpx;
26 | }
27 | .img {
28 | width: 100%;
29 | height: 500rpx;
30 | }
--------------------------------------------------------------------------------
/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/address/address.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background: #efeff4;
3 | }
4 |
5 | /* pages/address/address.wxss */
6 |
7 | .container {
8 | font-size: 12px;
9 | background-color: white;
10 | }
11 |
12 | .section {
13 | height: 100rpx;
14 | border-bottom: 1px lightgrey solid;
15 | display: flex;
16 | align-items: center;
17 | margin: 0 30rpx;
18 | }
19 |
20 |
21 | button {
22 | width: 90%;
23 | color: #fff;
24 | background-color: #fc0;
25 | margin-bottom: 100rpx;
26 | }
27 |
28 | .picker {
29 | width: 600rpx;
30 | height: 100%;
31 | }
32 | .ww{
33 | width: 250px;
34 | }
35 |
36 | .btn-area{
37 | margin-top: 100rpx;
38 | }
--------------------------------------------------------------------------------
/pages/synopsis/synopsis.wxss:
--------------------------------------------------------------------------------
1 | .page {
2 | width: 93%;
3 | height:100%;
4 | background: #fff;
5 | padding: 0 30rpx; font-family: "微软雅黑", "黑体";
6 | }
7 | .ld{
8 | text-align:center;
9 | font-size: 34rpx;
10 | color: #000000;
11 | padding: 30rpx 0;
12 | }
13 | .d{
14 | text-align: center;
15 | font-size: 34rpx;color: #000000;
16 | padding: 30rpx 0;
17 |
18 |
19 | }
20 | p{
21 | display: block;
22 |
23 | }
24 | .ming{
25 | padding: 20rpx 0;
26 | text-align: center;
27 | font-size: 45rpx;
28 | font-weight: 700;
29 | color:#000000;
30 | }
31 | .img{
32 | width: 140rpx;
33 | height: 140rpx;
34 | margin: 0 auto;
35 | display: block;
36 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | 餐饮小程序
2 |
3 | 
4 |
5 | 
6 |
7 | 
8 |
9 | 
10 |
11 | 
12 |
13 | 
14 |
15 |
16 | 技术支持:http://www.obaymagic.com/
17 |
--------------------------------------------------------------------------------
/pages/events/events.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 |
8 |
9 |
10 |
12 |
13 |
14 |
15 | 周年店庆活动
16 |
17 |
18 | 活动信息
19 | [网络] Events; Event Info; Event Information; Activities; action message;
20 | [例句]您还将随时获得乐施会在当地的最新活动信息。
21 | You'll also be kept in touch with local Oxfam events.
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/pages/ritual/ritual.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | {{item.title}}
8 | ¥{{item.amount}}
9 | 优惠券
10 | 满{{item.full_money}}元可用
11 |
12 | 副券
13 | {{item.start_time}}
14 | {{item.end_time}}
15 | 立即领取
16 | 积分兑换
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/pages/category/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{item.name}}
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 | {{data.name}}
17 |
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/pages/user-address/user-address.js:
--------------------------------------------------------------------------------
1 | // pages/user-address/user-address.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 | },
10 |
11 | /**
12 | * 生命周期函数--监听页面加载
13 | */
14 | onLoad: function (options) {
15 |
16 | },
17 |
18 | /**
19 | * 生命周期函数--监听页面初次渲染完成
20 | */
21 | onReady: function () {
22 |
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面显示
27 | */
28 | onShow: function () {
29 |
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面隐藏
34 | */
35 | onHide: function () {
36 |
37 | },
38 |
39 | /**
40 | * 生命周期函数--监听页面卸载
41 | */
42 | onUnload: function () {
43 |
44 | },
45 |
46 | /**
47 | * 页面相关事件处理函数--监听用户下拉动作
48 | */
49 | onPullDownRefresh: function () {
50 |
51 | },
52 |
53 | /**
54 | * 页面上拉触底事件的处理函数
55 | */
56 | onReachBottom: function () {
57 |
58 | },
59 |
60 | /**
61 | * 用户点击右上角分享
62 | */
63 | onShareAppMessage: function () {
64 |
65 | }
66 | })
--------------------------------------------------------------------------------
/pages/activity/activity.wxss:
--------------------------------------------------------------------------------
1 | .activity_center image {
2 | width: 100%;
3 | height: 250rpx;
4 | }
5 | .activity_center {
6 | padding: 20rpx;
7 | background: #fff;
8 | margin-bottom: 40rpx;
9 | }
10 | .activity {
11 | height: 100%;
12 | padding: 20rpx;
13 | background: #eee;
14 | }
15 | page {
16 | font-size: 28rpx;
17 | font-family: "微软雅黑";
18 | }
19 | .button button{
20 | background: orange;
21 | padding: 0 60rpx;
22 | height: 60rpx;
23 | line-height: 60rpx;
24 | border-radius: 0;
25 | }
26 | .button {
27 | float: right;
28 | margin-top: -70rpx;
29 | }
30 | .text_center {
31 | font-size: 35rpx;
32 | font-weight: 700;
33 | margin-top: 10rpx;
34 | display:block;
35 | white-space:nowrap;
36 | overflow:hidden;
37 | text-overflow:ellipsis;
38 | }
39 | .text_bottom {
40 | margin-top: 10rpx;
41 | color: #999;
42 | overflow:hidden;
43 | text-overflow:ellipsis;
44 | display:-webkit-box;
45 | -webkit-line-clamp:2;
46 | -webkit-box-orient:vertical;
47 |
48 | }
--------------------------------------------------------------------------------
/pages/address/user-address/user-address.wxss:
--------------------------------------------------------------------------------
1 | /*地址管理*/
2 |
3 | page {
4 | background-color: #efeff4;
5 | font-size: 10pt;
6 | -webkit-user-select: none;
7 | user-select: none;
8 | width: 100%;
9 | overflow-x: hidden;
10 | }
11 |
12 | .address {
13 | display: flex;
14 | flex-wrap: wrap;
15 | background-color: #fff;
16 | margin-top: 1px;
17 | padding: 30rpx;
18 | margin: 30rpx 0;
19 | }
20 |
21 | .address-icon {
22 | width: 100rpx;
23 | }
24 |
25 | .address-detail {
26 | width: 590rpx;
27 | }
28 |
29 | .address-name-phone {
30 | margin-bottom: 20rpx;
31 | font-size: 11pt;
32 | font-weight: 900;
33 | }
34 |
35 | .address-name{
36 | margin-right: 20rpx;
37 | }
38 |
39 | .address-info {
40 | margin-bottom: 30rpx;
41 | }
42 |
43 | .address-edit {
44 | display: flex;
45 | justify-content: space-between;
46 | flex-wrap: wrap;
47 | border-top: 1px #efeff4 solid;
48 | padding-top: 30rpx;
49 | }
50 |
51 | .add-address {
52 | display: flex;
53 | align-items: center;
54 | margin-top: 20px;
55 | padding: 18rpx;
56 | background-color: #fff;
57 | font-size: 11pt;
58 | font-weight: 900;
59 | }
60 |
61 | .add-address-icon {
62 | height: 20px;
63 | width: 20px;
64 | }
65 |
--------------------------------------------------------------------------------
/pages/category/index.wxss:
--------------------------------------------------------------------------------
1 | .section{ position: absolute; width: 100%; height: 100% ; overflow: hidden;}
2 | .left{ position: absolute; left: 0; top: 0; height: 100%; width: 90px; background: #F6F6F6; text-align: center;font-size:28rpx;}
3 | .left::before{ content: ""; position: absolute; background: #dcdcdc; right: 0; top: 0; height: 100%; border-right: 1rpx solid #dcdcdc;}
4 | .left view.active{ background: #FFF; position: relative; z-index: 2;}
5 | .left view{ display: block; height: 60px; line-height: 60px; border-bottom: 1px solid #dcdcdc;}
6 |
7 | .right{ margin-left: 90px; height: 100%; overflow: hidden; width: auto;background: #fff;}
8 | .right text{ font-size: 13px}
9 | .typeTree{ padding: 10px 20px;width: 100%}
10 | .typeTree .item{ text-align: center; display: inline-block; vertical-align: top;}
11 | .typeTree .brand,
12 | .typeTree .category{ flex-wrap: wrap; overflow: hidden;display: inline-block;width: 40%}
13 | .typeTree .title{ padding: 10px 0; display: block; color: #333;}
14 | .typeTree image { width: 75px; margin: 0 auto;}
15 | .typeTree .brand image{ height: 75px;}
16 | .typeTree .category image{ height: 85px;}
17 | .typeTree .category{ padding-bottom: 10px;}
18 | .item text{ padding-bottom: 10px; display: block;}
19 |
20 |
--------------------------------------------------------------------------------
/pages/synopsis/synopsis.js:
--------------------------------------------------------------------------------
1 | // pages/synopsis/synopsis.js
2 | var app = getApp();
3 | //引入这个插件,使html内容自动转换成wxml内容
4 | var WxParse = require('../../wxParse/wxParse.js');
5 | Page({
6 | data:{
7 |
8 | },
9 |
10 | onLoad:function(options){
11 | // 页面初始化 options为页面跳转所带来的参数
12 | //更改头部标题
13 | var title = options.title;
14 | wx.setNavigationBarTitle({
15 | title: title,
16 | });
17 |
18 | var that = this;
19 | var wedId = options.wedId;
20 | wx.request({
21 | url: app.d.ceshiUrl + '/Api/Web/web',
22 | method: 'post',
23 | data: { web_id: 1 },
24 | header: {
25 | 'Content-Type': 'application/x-www-form-urlencoded'
26 | },
27 | success: function (res) {
28 | var content = res.data.content;
29 | WxParse.wxParse('content', 'html', content, that, 10);
30 | },
31 | fail: function (e) {
32 | wx.showToast({
33 | title: '网络异常!',
34 | duration: 2000
35 | });
36 | }
37 | })
38 | },
39 | onReady:function(){
40 | // 页面渲染完成
41 | },
42 | onShow:function(){
43 | // 页面显示
44 | },
45 | onHide:function(){
46 | // 页面隐藏
47 | },
48 | onUnload:function(){
49 | // 页面关闭
50 | }
51 | })
--------------------------------------------------------------------------------
/pages/product/product.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 | {{info.name}}
13 | {{info.content}}
14 |
15 |
16 |
17 |
18 | ¥{{info.price_yh}}
19 |
20 |
21 |
22 | -
23 |
24 | {{buynum}}
25 |
26 | +
27 |
28 |
29 |
30 |
31 | 预订座位
32 | 加入购物车
33 |
34 |
--------------------------------------------------------------------------------
/pages/index/index.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 | {{mini.classname}}
29 |
30 |
31 |
32 |
33 |
34 | {{item.cname}}
35 | {{item.name}}
36 |
37 |
38 |
--------------------------------------------------------------------------------
/pages/address/user-address/user-address.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{item.name}}
12 | {{item.tel}}
13 |
14 | {{item.address_xq}}
15 |
16 |
17 |
18 |
19 |
20 |
21 | 设置默认
22 | |
23 | 删除
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 | 新增地址
33 |
34 |
--------------------------------------------------------------------------------
/pages/user/user.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{userInfo.nickName}}
6 |
7 |
8 |
9 | 关于我们
10 | >
11 |
12 |
13 |
14 |
15 | 优惠劵
16 | >
17 |
18 |
19 |
20 |
21 | 地址管理
22 | >
23 |
24 |
25 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/pages/user/user.wxss:
--------------------------------------------------------------------------------
1 | /* pages/user/user.wxss */
2 |
3 | .me {
4 | height: 100%;
5 | }
6 |
7 | .userinfo {
8 | position: relative;
9 | width: 750rpx;
10 | height: 320rpx;
11 | background: #f8a519;
12 | color: #fff;
13 | display: flex;
14 | flex-direction: column;
15 | align-items: center;
16 | }
17 |
18 | .userinfo-avatar {
19 | display: block;
20 | width: 160rpx;
21 | height: 160rpx;
22 | margin: 20rpx;
23 | margin-top: 50rpx;
24 | border-radius: 50%;
25 | border: 2px solid #fff;
26 | box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
27 | }
28 |
29 | .userinfo-nickname {
30 | color: #fff;
31 | font-size: 14px;
32 | }
33 |
34 | .sc {
35 | background: #fff;
36 | width: 100%;
37 | font-size: 12px;
38 | line-height: 16px;
39 | color: #666;
40 | padding: 4% 0;
41 | }
42 |
43 | .sc image {
44 | width: 24px;
45 | height: 24px;
46 | display: inline-block;
47 | }
48 |
49 | .bte {
50 | border-top: 1px solid #eee;
51 | }
52 |
53 | .qbdd {
54 | background: #fff;
55 | width: 92%;
56 | font-size: 12px;
57 | color: #666;
58 | padding: 4%;
59 | border-bottom: 1px solid #ccc;
60 | }
61 |
62 | .c9 {
63 | float: right;
64 | }
65 |
66 | /*在线客服*/
67 |
68 | .lll {
69 | width: 71rpx;
70 | height: 69rpx;
71 | position: fixed;
72 | right: 0px;
73 | bottom: 88px;
74 | float: right;
75 | }
76 |
77 | .lll image {
78 | width: 100%;
79 | height: 100%;
80 | }
81 |
82 | contact-button {
83 | position: relative;
84 | top: -35px;
85 | left: 9px;
86 | opacity: 0;
87 | }
88 |
89 | .bottom {
90 | margin-bottom: 10px;
91 | }
92 |
--------------------------------------------------------------------------------
/app.json:
--------------------------------------------------------------------------------
1 | {
2 | "pages": [
3 | "pages/index/index",
4 | "pages/address/address",
5 | "pages/address/user-address/user-address",
6 | "pages/events/events",
7 | "pages/ritual/ritual",
8 | "pages/coupon/coupon",
9 | "pages/detail/detail",
10 | "pages/product/product",
11 | "pages/activity/activity",
12 | "pages/particulars/particulars",
13 | "pages/dinner/dinner",
14 | "pages/time_quantum/time_quantum",
15 | "pages/payorder/payorder",
16 | "pages/order/detail",
17 | "pages/ordering/ordering",
18 | "pages/category/index",
19 | "pages/logs/logs",
20 | "pages/dingdan/dingdan",
21 | "pages/synopsis/synopsis",
22 | "pages/user/user"
23 | ],
24 | "window": {
25 | "backgroundTextStyle": "light",
26 | "navigationBarBackgroundColor": "#F8A519",
27 | "navigationBarTitleText": "餐饮版",
28 | "navigationBarTextStyle": "white"
29 | },
30 | "tabBar": {
31 | "color": "#000",
32 | "selectedColor": "#FF8C00",
33 | "borderStyle": "black",
34 | "backgroundColor": "#fff",
35 | "list": [
36 | {
37 | "pagePath": "pages/index/index",
38 | "iconPath": "./images/shou.png",
39 | "selectedIconPath": "./images/s.png",
40 | "text": "首页"
41 | },
42 | {
43 | "pagePath": "pages/dingdan/dingdan",
44 | "iconPath": "images/ding.png",
45 | "selectedIconPath": "images/dingg.png",
46 | "text": "订单"
47 | },
48 | {
49 | "pagePath": "pages/user/user",
50 | "iconPath": "images/g.png",
51 | "selectedIconPath": "images/gg.png",
52 | "text": "个人中心"
53 | }
54 | ]
55 | },
56 | "debug": false
57 | }
--------------------------------------------------------------------------------
/pages/time_quantum/time_quantum.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | {{info.thedate}}
6 |
7 |
8 | {{info.timedesc}}
9 |
10 | 请选择座位
11 |
12 |
13 |
14 | {{item.tablenum}}{{item.tabletype}}
15 |
16 |
17 |
18 |
19 |
20 | {{mini.title}}
21 | 客服热线:{{mini.tel}}
22 |
23 |
24 |
25 |
26 |
27 |
30 |
31 |
32 |
33 |
34 | 提示
35 |
36 | 你选择的是{{tablenum}}{{tabletype}},是否确认?
37 |
38 |
39 | 支付预定金
40 | (¥100元)
41 |
42 | 提前点餐
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/pages/index/index.wxss:
--------------------------------------------------------------------------------
1 | /*轮播*/
2 | page{
3 | font-family: '微软雅黑'
4 | }
5 |
6 | .address{
7 | background: rgba(0, 0, 0, 0.5);
8 | margin:30rpx 25rpx;
9 | width:93%;
10 | position: absolute;
11 | top: 317rpx;
12 | left: 0rpx;
13 | color: #fff;
14 | font-size: 30rpx;
15 | }
16 | .slide-image {
17 | margin:30rpx 25rpx;
18 | width:93%;
19 | height:89%;
20 | margin-bottom:44rpx;
21 | /*border-radius:20rpx;*/
22 |
23 | }
24 |
25 |
26 | .system{
27 | width: 95%;
28 | margin: 0rpx 40rpx;
29 | }
30 | .system_ding{
31 | width: 50%;
32 | text-align: center;
33 | display: inline-block;
34 | height: 200rpx;
35 | /*border-radius:20rpx; */
36 | }
37 | .system_img{
38 | width:96%;
39 | height:95%;
40 | margin:10rpx;
41 | border-radius:10rpx;
42 | /*box-shadow: 2px 2px 15px #909090;*/
43 |
44 | }
45 |
46 |
47 |
48 | /*滑动*/
49 | .sc {
50 | white-space: nowrap;
51 | height:350rpx;
52 | background: #fff
53 | }
54 |
55 | .miu {
56 | width: 28%;
57 | height: 100%;
58 | display: inline-block;
59 | margin-top: 20rpx;
60 | margin-left: 35rpx;
61 | margin-right: 0px;
62 |
63 | }
64 | .ie{
65 | width:200rpx;
66 | height: 200rpx;
67 | }
68 | .mi{
69 | display: block;
70 | height: 10%;
71 | text-align: center;
72 | font-weight: 700;
73 | /*padding: 10rpx 0;*/
74 | font-size: 28rpx;
75 | color:#707070;
76 | }
77 | .ma{
78 | height: 10%;
79 | text-align: center;
80 | font-weight: 700;
81 | padding: 10rpx 0;
82 | font-size: 30rpx;
83 | display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
84 | }
85 | .xian {
86 | width: 100%;
87 | height: 14rpx;
88 | background: #f0f0f0;
89 | }
90 | .classname {
91 | margin-top:20rpx;
92 | }
93 |
--------------------------------------------------------------------------------
/pages/address/address.wxml:
--------------------------------------------------------------------------------
1 |
2 |
44 |
--------------------------------------------------------------------------------
/pages/dinner/dinner.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | (请留下你宝贵的联系方式已便你能快速用餐)
8 |
53 |
54 |
--------------------------------------------------------------------------------
/pages/dinner/dinner.wxss:
--------------------------------------------------------------------------------
1 | .cont {
2 | width: 100%;
3 | height: 100%;
4 | font-family: '微软雅黑';
5 | }
6 |
7 | .a {
8 | width: 100%;
9 | height: 400rpx;
10 | }
11 |
12 | .a image {
13 | width: 100%;
14 | height: 95%;
15 | margin: 0 auto;
16 | display: block;
17 | }
18 |
19 | .a_b {
20 | font-size: 33rpx;
21 | text-align: center; transform:skewX(-15deg);
22 | }
23 |
24 | .a_c {
25 | font-size: 29rpx;
26 | color: #d4d6d8;
27 | text-align: center;
28 | }
29 |
30 | /*表单*/
31 |
32 |
33 | .myphone{
34 | font-size: 30rpx;
35 | padding: 30rpx;
36 | margin-left: 50rpx;
37 |
38 | }
39 | .myphone_input {
40 | border: 1rpx solid #ccc;
41 | width: 80%;
42 | margin: 0 auto;
43 | background: #fff;
44 | height: 70rpx;
45 | }
46 | input{
47 |
48 | height: 100%;font-size: 26rpx;
49 | padding-left: 10rpx;
50 | }
51 | .nb{
52 | background:#fff;
53 | font-size:30rpx;
54 | /*padding:15rpx 10rpx;*/
55 | }
56 |
57 | .input-placeholder{
58 | font-size: 30rpx;color: #ccc;
59 | }
60 | .xing {
61 | display: flex;
62 | background: #fff;
63 | align-items: center;
64 | padding: 10rpx 0;
65 | font-size: 30rpx;
66 | padding-left: 20rpx;
67 | margin-top: 40rpx;
68 | width: 87%;
69 | margin-left: 31rpx;
70 | border-bottom: 1rpx solid #d4d6d8;
71 | }
72 |
73 | .map {
74 | width: 60rpx;
75 | height: 60rpx;
76 | }
77 |
78 | input {
79 | padding-left: 10rpx;
80 | flex: 0.95;
81 | font-size: 35rpx;
82 | font-family: "微软雅黑"
83 | }
84 | .but{
85 | background: #d81e06;
86 | width: 70%;
87 | color: #fff;
88 | height: 80rpx;
89 | line-height: 80rpx;
90 | margin-top: 100rpx;
91 | margin-bottom: 45rpx;
92 | }
93 |
94 | /*客服*/
95 | /*.cl{
96 | width: 100%;
97 | position: absolute;
98 | bottom: 0%;
99 | text-align: center;
100 | font-size: 40rpx;
101 | color:#bfbfbf;
102 | transform:skewX(-15deg);
103 | }*/
--------------------------------------------------------------------------------
/pages/events/events.js:
--------------------------------------------------------------------------------
1 | // pages/events/events.js
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 |
9 |
10 | ab:[
11 | {
12 | huo: false,
13 | id:0,
14 | },
15 | {
16 | huo: false,
17 | id: 1,
18 | }, {
19 | huo: false,
20 | id: 2,
21 | },
22 |
23 | ]
24 |
25 | },
26 | a:function(e){
27 | var data_id = e.currentTarget.dataset.id;
28 | console.log(e);
29 |
30 | var s=[];
31 |
32 | for (var i = 0; i < this.data.ab.length; i++) {
33 | var pl = {};
34 | pl.id = i + 0;
35 | s.push(pl);
36 | }
37 | if (data_id==0){
38 | s[data_id].id = 0;
39 | s[data_id].huo = true;
40 | this.setData({
41 | ab: s,
42 | })
43 | }
44 | if (data_id == 1) {
45 | s[data_id].id = 1;
46 | s[data_id].huo = true;
47 | this.setData({
48 | ab: s,
49 | })
50 | }
51 | if (data_id == 2) {
52 | s[data_id].id = 2;
53 | s[data_id].huo = true;
54 | this.setData({
55 | ab: s,
56 | })
57 | }
58 | },
59 | /**
60 | * 生命周期函数--监听页面加载
61 | */
62 | onLoad: function (options) {
63 |
64 | },
65 |
66 | /**
67 | * 生命周期函数--监听页面初次渲染完成
68 | */
69 | onReady: function () {
70 |
71 | },
72 |
73 | /**
74 | * 生命周期函数--监听页面显示
75 | */
76 | onShow: function () {
77 |
78 | },
79 |
80 | /**
81 | * 生命周期函数--监听页面隐藏
82 | */
83 | onHide: function () {
84 |
85 | },
86 |
87 | /**
88 | * 生命周期函数--监听页面卸载
89 | */
90 | onUnload: function () {
91 |
92 | },
93 |
94 | /**
95 | * 页面相关事件处理函数--监听用户下拉动作
96 | */
97 | onPullDownRefresh: function () {
98 |
99 | },
100 |
101 | /**
102 | * 页面上拉触底事件的处理函数
103 | */
104 | onReachBottom: function () {
105 |
106 | },
107 |
108 | /**
109 | * 用户点击右上角分享
110 | */
111 | onShareAppMessage: function () {
112 |
113 | }
114 | })
--------------------------------------------------------------------------------
/pages/ritual/ritual.js:
--------------------------------------------------------------------------------
1 | // pages/panic/panic.js
2 | var app = getApp();
3 | Page({
4 | data:{
5 | vou:[],
6 | },
7 | getvou:function(e){
8 | var vid = e.currentTarget.dataset.vid;
9 | var uid = app.d.userId;
10 | wx.request({
11 | url: app.d.ceshiUrl + '/Api/Voucher/get_voucher',
12 | method:'post',
13 | data: {vid:vid,uid:uid},
14 | header: {
15 | 'Content-Type': 'application/x-www-form-urlencoded'
16 | },
17 | success: function (res) {
18 | var status = res.data.status;
19 | if(status==1){
20 | wx.showToast({
21 | title: '领取成功!',
22 | duration: 2000
23 | });
24 | }else{
25 | wx.showToast({
26 | title: res.data.err,
27 | duration: 2000
28 | });
29 | }
30 | //endInitData
31 | },
32 | fail:function(e){
33 | wx.showToast({
34 | title: '网络异常!',
35 | duration: 2000
36 | });
37 | },
38 | });
39 | },
40 |
41 | // 页面初始化 options为页面跳转所带来的参数
42 | onLoad:function(options){
43 | wx.showToast({
44 | title: '加载中...',
45 | icon: 'loading',
46 | });
47 |
48 | var that = this;
49 | wx.request({
50 | url: app.d.ceshiUrl + '/Api/Voucher/index',
51 | method:'post',
52 | data: {},
53 | header: {
54 | 'Content-Type': 'application/x-www-form-urlencoded'
55 | },
56 | success: function (res) {
57 | var vou = res.data.vou;
58 | that.setData({
59 | vou:vou,
60 | });
61 | },
62 | error:function(e){
63 | wx.showToast({
64 | title: '网络异常!',
65 | duration: 2000
66 | });
67 | },
68 | });
69 | },
70 | onReady:function(){
71 | // 页面渲染完成
72 | wx.hideToast();
73 | },
74 | onShow:function(){
75 | // 页面显示
76 | },
77 | onHide:function(){
78 | // 页面隐藏
79 | },
80 | onUnload:function(){
81 | // 页面关闭
82 | }
83 | })
--------------------------------------------------------------------------------
/pages/product/product.wxss:
--------------------------------------------------------------------------------
1 | /*轮播*/
2 | page{
3 | width: 100%;
4 | height: 100%;
5 | font-family: '微软雅黑'
6 | }
7 | .slide-image {
8 | width: 100%;
9 | height: 100%;
10 | }
11 | .a{
12 |
13 | /*width:86%;*/
14 | margin:0 49rpx;
15 | background:#fff;
16 | position:absolute;
17 | bottom:13%;
18 | border-radius: 10rpx;
19 |
20 | }
21 | .a_b{
22 | font-size: 30rpx;
23 | text-align: center;
24 | width: 100%;
25 | padding: 20rpx 0;
26 | }
27 | .a_c{
28 | font-size: 28rpx;
29 | text-align: center;
30 | width: 94%;
31 | margin:0 20rpx;
32 | }
33 |
34 |
35 | /*数量加减*/
36 | .mon{
37 | display: flex;
38 | margin-top:20rpx;
39 | align-content: center;
40 | }
41 | .yuan{
42 | flex: 0.9;
43 | /*display: inline-block;*/
44 | display: flex;
45 | align-items: center;
46 | color: red;
47 |
48 | }
49 |
50 | .stepper {
51 | text-align: right;
52 | display: flex;
53 | flex-direction: row;
54 | justify-content: space-between;
55 | align-items: center;
56 | width: 200rpx;
57 | overflow: hidden;
58 |
59 | border-radius:29rpx;
60 | background: #FCFCFC
61 | }
62 | .stepper .op {
63 | /*background-color: #FF8C00;*/
64 | border: 1px solid #eee;
65 | border-radius:50%;
66 | width: 26px;
67 | height: 26px;
68 | line-height: 26px;
69 | text-align: center;
70 | font-weight: 900;
71 | color: #000;
72 | }
73 |
74 | .stepper .oq {
75 | background-color: #FF8C00;
76 | border: 1px solid #eee;
77 | border-radius:50%;
78 | width: 26px;
79 | height: 26px;
80 | line-height: 26px;
81 | text-align: center;
82 | font-weight: 900;
83 | color: #fff;
84 | }
85 | .stepper input {
86 | width: 30px;
87 | height: 25px;
88 | text-align: center;
89 | }
90 | .bottom{
91 | width: 100%;
92 | position: absolute;
93 | bottom: 0%;
94 | display: flex;
95 | background: #eee;
96 | height: 100rpx;
97 | font-size: 32rpx;
98 | }
99 | .bottom_a{
100 | flex: 1;
101 | background: #eee;
102 | text-align: center;
103 | line-height: 100rpx;
104 | }
105 | .bottom_b{
106 | flex: 1;
107 | background: #FF8C00;
108 | text-align: center;
109 | line-height: 100rpx;
110 | color: #fff;
111 | }
--------------------------------------------------------------------------------
/pages/user/user.js:
--------------------------------------------------------------------------------
1 | // pages/user/user.js
2 | var app = getApp()
3 | Page({
4 | data: {
5 | userInfo: {},
6 | orderInfo: {},
7 | projectSource: 'https://github.com/liuxuanqiang/wechat-weapp-mall',
8 | userListInfo: [{
9 | icon: '../../images/iconfont-dingdan.png',
10 | text: '我的订单',
11 | isunread: true,
12 | unreadNum: 2
13 | }, {
14 | icon: '../../images/iconfont-card.png',
15 | text: '我的代金券',
16 | isunread: false,
17 | unreadNum: 2
18 | }, {
19 | icon: '../../images/iconfont-icontuan.png',
20 | text: '我的拼团',
21 | isunread: true,
22 | unreadNum: 1
23 | }, {
24 | icon: '../../images/iconfont-shouhuodizhi.png',
25 | text: '收货地址管理'
26 | }, {
27 | icon: '../../images/iconfont-kefu.png',
28 | text: '联系客服'
29 | }, {
30 | icon: '../../images/iconfont-help.png',
31 | text: '常见问题'
32 | }],
33 | loadingText: '加载中...',
34 | loadingHidden: false,
35 | },
36 | onLoad: function () {
37 | var that = this
38 | //调用应用实例的方法获取全局数据
39 | app.getUserInfo(function (userInfo) {
40 | //更新数据
41 | that.setData({
42 | userInfo: userInfo,
43 | loadingHidden: true
44 | })
45 | });
46 |
47 | this.loadOrderStatus();
48 | },
49 | onShow: function () {
50 | this.loadOrderStatus();
51 | },
52 | loadOrderStatus: function () {
53 | //获取用户订单数据
54 | var that = this;
55 | wx.request({
56 | url: app.d.ceshiUrl + '/Api/User/getorder',
57 | method: 'post',
58 | data: {
59 | userId: app.d.userId,
60 | },
61 | header: {
62 | 'Content-Type': 'application/x-www-form-urlencoded'
63 | },
64 | success: function (res) {
65 | //--init data
66 | var status = res.data.status;
67 | if (status == 1) {
68 | that.setData({
69 | orderInfo: res.data.orderInfo,
70 | });
71 | } else {
72 | wx.showToast({
73 | title: res.data.err,
74 | duration: 2000
75 | });
76 | }
77 | },
78 | error: function (e) {
79 | wx.showToast({
80 | title: '网络异常!',
81 | duration: 2000
82 | });
83 | }
84 | });
85 | },
86 |
87 | })
--------------------------------------------------------------------------------
/pages/detail/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 | {{ item.kind }}
12 |
13 |
14 | {{ item.desk }}
15 |
16 |
17 | {{ item.number }}{{ item.desk }}
18 |
19 |
20 | 无需等待
21 |
22 |
23 | {{ item.time }}
24 |
25 |
26 |
27 | {{ detailRules }}
28 |
29 |
30 |
31 |
32 |
37 |
38 |
39 |
40 |
41 |
54 |
55 |
56 |
57 |
58 |
59 |
60 | 由欢乐一家人小程序提供服务
61 | 客服热线:020-1321423
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/pages/particulars/particulars.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | //引入这个插件,使html内容自动转换成wxml内容
3 | var WxParse = require('../../wxParse/wxParse.js');
4 | Page({
5 |
6 | /**
7 | * 页面的初始数据
8 | */
9 | data: {
10 | actId:0,
11 | info:{},
12 | },
13 |
14 | /**
15 | * 生命周期函数--监听页面加载
16 | */
17 | onLoad: function (options) {
18 | var actId = options.actId;
19 | this.setData({
20 | actId: actId,
21 | });
22 | },
23 |
24 | /**
25 | * 生命周期函数--监听页面初次渲染完成
26 | */
27 | onReady: function () {
28 | wx.hideToast();
29 | },
30 |
31 | /**
32 | * 生命周期函数--监听页面显示
33 | */
34 | onShow: function () {
35 | wx.showToast({
36 | title: '加载中...',
37 | icon: 'loading',
38 | });
39 | var that = this;
40 | var actId = that.data.actId;
41 | wx.request({
42 | url: app.d.ceshiUrl + '/Api/Activity/detail',
43 | method: 'post',
44 | data: {
45 | id: actId
46 | },
47 | header: {
48 | 'Content-Type': 'application/x-www-form-urlencoded'
49 | },
50 | success: function (res) {
51 | //--init data
52 | var status = res.data.status;
53 | if (status == 1) {
54 | var info = res.data.info;
55 | var content = info.content;
56 | WxParse.wxParse('content', 'html', content, that, 10);
57 | that.setData({
58 | info: info,
59 | });
60 | } else {
61 | wx.showToast({
62 | title: '没有找到相关信息.',
63 | duration: 2000,
64 | });
65 | }
66 | },
67 | error: function (e) {
68 | wx.showToast({
69 | title: '网络异常!',
70 | duration: 2000,
71 | });
72 | },
73 | });
74 | },
75 |
76 | /**
77 | * 页面上拉触底事件的处理函数
78 | */
79 | onReachBottom: function () {
80 |
81 | },
82 |
83 | /**
84 | * 用户点击右上角分享
85 | */
86 | onShareAppMessage: function () {
87 | var title = this.data.info.name;
88 | var id = this.data.info.id;
89 | return {
90 | title: title,
91 | path: '/pages/particulars/particulars?actId='+id,
92 | success: function (res) {
93 | // 分享成功
94 | },
95 | fail: function (res) {
96 | // 分享失败
97 | }
98 | }
99 | }
100 | })
--------------------------------------------------------------------------------
/pages/order/detail.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
6 |
7 | 菜单数量:{{ orderData.procount }}
8 | 订单号: {{ orderData.order_sn }}
9 |
10 |
11 |
12 | 下单时间:{{ orderData.addtime }}
13 |
14 |
15 |
16 | 菜品
17 | 数量
18 | 金额
19 |
20 |
21 | {{ item.name }}
22 | {{ item.num }}
23 | {{ item.zprice }}
24 |
25 |
26 | 配送费
27 |
28 | {{orderData.yunfei}}
29 |
30 |
31 |
32 | 总价
33 | {{ orderData.amount }}
34 |
35 |
36 | 实付金额以买单时为准
37 |
38 |
39 |
40 |
41 | 配送信息:
42 |
43 |
44 |
45 | 姓 名:{{orderData.receiver}}
46 |
47 |
48 |
49 | 手 机:{{orderData.tel}}
50 |
51 |
52 | 配送地址:{{orderData.address_xq}}
53 |
54 |
55 | 备注信息:
56 | {{orderData.remark}}
57 |
58 |
59 |
60 |
61 |
62 |
63 | 预定信息
64 |
65 | 桌位号:100号桌
66 |
67 |
68 | 姓名:wz.文
69 |
70 |
71 | 手机号:1232432432
72 |
73 |
74 | 用餐时间:7月18日18:40
75 |
76 |
77 | 用餐人数:10
78 |
79 |
80 | 备注信息:2321321
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/pages/order/detail.js:
--------------------------------------------------------------------------------
1 | // 获取全局应用程序实例对象
2 | const app = getApp();
3 | // 创建页面实例对象
4 | Page({
5 | /**
6 | * 页面的初始数据
7 | */
8 | data: {
9 | orderId: 0,
10 | orderData: {},
11 | proData: [],
12 | },
13 |
14 | onLoad: function (options) {
15 | this.setData({
16 | orderId: options.orderId,
17 | });
18 | },
19 |
20 | address:function(){
21 | wx.navigateTo({
22 | url: '../address/user-address/user-address',
23 | success: function(res) {},
24 | fail: function(res) {},
25 | complete: function(res) {},
26 | })
27 | },
28 |
29 | /**
30 | * 生命周期函数--监听页面初次渲染完成
31 | */
32 | onReady: function() {
33 | // TODO: onReady
34 | wx.hideToast();
35 | },
36 |
37 |
38 | /**
39 | * 生命周期函数--监听页面显示
40 | */
41 | onShow: function() {
42 | wx.showToast({
43 | title: '加载中...',
44 | icon: 'loading',
45 | });
46 | // TODO: onShow
47 | var that = this;
48 | wx.request({
49 | url: app.d.ceshiUrl + '/Api/Order/order_details',
50 | method: 'post',
51 | data: {
52 | order_id: that.data.orderId,
53 | },
54 | header: {
55 | 'Content-Type': 'application/x-www-form-urlencoded'
56 | },
57 | success: function (res) {
58 | var status = res.data.status;
59 | if (status == 1) {
60 | var pro = res.data.pro;
61 | var ord = res.data.ord;
62 | that.setData({
63 | orderData: ord,
64 | proData: pro
65 | });
66 | } else {
67 | wx.showToast({
68 | title: res.data.err,
69 | duration: 2000
70 | });
71 | }
72 | },
73 | fail: function () {
74 | // fail
75 | wx.showToast({
76 | title: '网络异常!',
77 | duration: 2000
78 | });
79 | }
80 | });
81 | },
82 |
83 |
84 | /**
85 | * 生命周期函数--监听页面隐藏
86 | */
87 | onHide: function onHide() {
88 | // TODO: onHide
89 | },
90 |
91 |
92 | /**
93 | * 生命周期函数--监听页面卸载
94 | */
95 | onUnload: function onUnload() {
96 | // TODO: onUnload
97 | },
98 |
99 |
100 | /**
101 | * 页面相关事件处理函数--监听用户下拉动作
102 | */
103 | onPullDownRefresh: function onPullDownRefresh() {
104 | // TODO: onPullDownRefresh
105 | }
106 | });
107 | //# sourceMappingURL=payorder.js.map
108 |
--------------------------------------------------------------------------------
/pages/category/index.js:
--------------------------------------------------------------------------------
1 | // import ApiList from '../../config/api';
2 | // import request from '../../utils/request.js';
3 |
4 | Page({
5 | data: {
6 | // types: null,
7 | typeTree: {}, // 数据缓存
8 | currType: 0 ,
9 | // 当前类型
10 | "types": [
11 | {
12 | "name":"热销产品",
13 | "typeId":"0",
14 | },
15 | {
16 |
17 | "name":"人气产品",
18 | "typeId":"1",
19 | },
20 | {
21 | "name":"店家推荐",
22 | "typeId":"2",
23 | },
24 | ],
25 | "typeTree": [
26 |
27 | {
28 | 'pic':"../../images/im.jpg",
29 | "shopAddr":"飞马牌服饰",
30 | "name":"PUMA Kids",
31 | "typeId":"1",
32 | },
33 |
34 | {
35 | 'pic':"../../images/im.jpg",
36 | "shopAddr":"飞马牌服饰",
37 | "name":"PUMA Kids",
38 | "typeId":"1",
39 | },
40 |
41 | {
42 | 'pic':"../../images/im.jpg",
43 | "shopAddr":"飞马牌服饰",
44 | "name":"PUMA Kids",
45 | "typeId":"1",
46 | },
47 | ],
48 |
49 |
50 | },
51 |
52 | onLoad (){
53 | var me = this;
54 | request({
55 | url: ApiList.goodsType,
56 | success: function (res) {
57 | me.setData({
58 | types: res.data.data
59 | });
60 | }
61 | });
62 | this.getTypeTree(this.data.currType);
63 | },
64 | tapType(e){
65 | const currType = e.currentTarget.dataset.typeId;
66 | this.setData({
67 | currType: currType
68 | });
69 | this.getTypeTree(currType);
70 | },
71 | // 加载品牌、二级类目数据
72 | getTypeTree (currType) {
73 | const me = this, _data = me.data;
74 | if(!_data.typeTree[currType]){
75 | request({
76 | url: ApiList.goodsTypeTree,
77 | data: {typeId: +currType},
78 | success: function (res) {
79 | _data.typeTree[currType] = res.data.data;
80 | me.setData({
81 | typeTree: _data.typeTree
82 | });
83 | }
84 | });
85 | }
86 | }
87 | })
--------------------------------------------------------------------------------
/pages/ritual/ritual.wxss:
--------------------------------------------------------------------------------
1 |
2 |
3 | /*优惠劵*/
4 |
5 | .demo {
6 | width:100%;
7 | margin:0 auto;
8 | }
9 | .stamp {
10 | padding: 0;
11 | margin: 0;
12 | list-style:none;
13 | font-family:"Microsoft YaHei", 'Source Code Pro', Menlo, Consolas, Monaco, monospace;
14 | }
15 | .stamp {
16 | height: 250rpx;
17 | margin-bottom: 100rpx;
18 | position: relative;
19 | overflow: hidden;
20 | }
21 | .stamp:before {
22 | content: '';
23 | position: absolute;
24 | top:0;
25 | bottom:0;
26 | left:20rpx;
27 | right:20rpx;
28 | z-index: -1;
29 | }
30 | .stamp i {
31 | position: absolute;
32 | left: 20%;
33 | top: 90rpx;
34 | height: 190px;
35 | width: 780rpx;
36 | background-color: rgba(255, 255, 255, .15);
37 | transform: rotate(-30deg);
38 | }
39 | .stamp .par {
40 | float: left;
41 | padding: 25rpx 30rpx;
42 | width: 58%;
43 | border-right:4rpx dashed rgba(0, 0, 0, .3);
44 | text-align: left;
45 | }
46 | .stamp .par p {
47 | color:#fff;
48 | font-size: 32rpx;
49 | line-height: 30rpx;
50 | }
51 | .stamp .par span {
52 | font-size: 70rpx;
53 | color:#fff;
54 | margin-right: 10rpx;
55 | line-height: 130rpx;
56 | }
57 | .stamp .par .sign {
58 | font-size: 50rpx;
59 | }
60 | .stamp .par sub {
61 | position: relative;
62 | top:-5px;
63 | color:rgba(255, 255, 255, .8);
64 | font-size: 30rpx;
65 | }
66 | .stamp .copy {
67 | display: inline-block;
68 | padding:42rpx 28rpx;
69 | width:25%;
70 | vertical-align: text-bottom;
71 | font-size: 60rpx;
72 | color:rgb(255,255,255);
73 | text-align: center;
74 | line-height: initial;
75 | }
76 |
77 |
78 |
79 | .stamp04 {
80 | width:92%;
81 | margin-top:10rpx;
82 | background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0,0, 0) 3px, #da0909 3px);
83 | /*background-size:24rpx 16rpx;*/
84 | background-position:-10rpx 0rem;
85 | margin:40rpx 33rpx;
86 | margin-bottom: 20rpx;
87 | border-bottom: 10rpx solid #ccc
88 |
89 | }
90 | .stamp04:before {
91 | background-color:#da0909;
92 | left: 10rpx;
93 | right: 10rpx;
94 | }
95 | .stamp04 .copy {
96 | padding: 20rpx 12rpx 20rpx 24rpx;
97 | font-size:32rpx;
98 | padding-top: 20rpx;
99 | }
100 | .stamp04 .copy p {
101 | font-size: 22rpx;
102 | margin-top: 10rpx;
103 | margin-bottom: 15rpx;
104 | }
105 | .stamp04 .copy a {
106 | background-color:#fff;
107 | color:#333;
108 | font-size: 28rpx;
109 | text-decoration:none;
110 | padding:10rpx 20rpx;
111 | border-radius:6rpx;
112 | display: block;
113 | }
114 | p{
115 | display: block
116 | }
117 |
118 | .xian{
119 | width: 100%;
120 | height: 10rpx;
121 | background: #ccc
122 | }
--------------------------------------------------------------------------------
/pages/detail/detail.js:
--------------------------------------------------------------------------------
1 | 'use strict';
2 |
3 | // 获取全局应用程序实例对象
4 | // const app = getApp()
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | title: 'detail',
13 | detailRules: '听到叫号请到迎宾台,过号不作废,延三桌安排',
14 | imgUrls: ['http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg', 'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg', 'http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg'],
15 | waitInfo: [{
16 | kind: '餐桌类型',
17 | desk: '等待桌数',
18 | time: '预估时间'
19 | }, {
20 | kind: '小桌(1-2人)',
21 | desk: '桌',
22 | number: '1',
23 | time: '--分钟'
24 | }, {
25 | kind: '中桌(3-4人)',
26 | desk: '桌',
27 | number: '1',
28 | time: '--分钟'
29 | }, {
30 | kind: '大桌(5人以上)',
31 | desk: '桌',
32 | time: '--分钟'
33 | }],
34 | restaurant: {
35 | img: 'http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg',
36 | name: '人马科技大饭堂',
37 | distance: '100',
38 | grade: 'four-star',
39 | address: '汇德商业大厦501',
40 | tel: '1361234567895',
41 | time: '10:00-22:00'
42 | }
43 | },
44 | /**
45 | * 选择桌子取号
46 | */
47 | getdesk: function getdesk(e) {
48 | var index = e.currentTarget.dataset.desk;
49 | var title = null;
50 | if (index === '0') {
51 | title = '小桌取号成功';
52 | } else if (index === '1') {
53 | title = '中桌取号成功';
54 | } else {
55 | title = '大桌取号成功';
56 | }
57 | wx.showToast({
58 | title: title,
59 | icon: 'success',
60 | duration: 2000
61 | });
62 | },
63 | /**
64 | * 拨打电话
65 | */
66 | callPhone: function callPhone() {
67 | wx.makePhoneCall({
68 | phoneNumber: this.data.restaurant.tel
69 | });
70 | },
71 |
72 | /**
73 | * 生命周期函数--监听页面加载
74 | */
75 | onLoad: function onLoad() {
76 | // TODO: onLoad
77 | },
78 |
79 |
80 | /**
81 | * 生命周期函数--监听页面初次渲染完成
82 | */
83 | onReady: function onReady() {
84 | // TODO: onReady
85 | },
86 |
87 |
88 | /**
89 | * 生命周期函数--监听页面显示
90 | */
91 | onShow: function onShow() {
92 | // TODO: onShow
93 | },
94 |
95 |
96 | /**
97 | * 生命周期函数--监听页面隐藏
98 | */
99 | onHide: function onHide() {
100 | // TODO: onHide
101 | },
102 |
103 |
104 | /**
105 | * 生命周期函数--监听页面卸载
106 | */
107 | onUnload: function onUnload() {
108 | // TODO: onUnload
109 | },
110 |
111 |
112 | /**
113 | * 页面相关事件处理函数--监听用户下拉动作
114 | */
115 | onPullDownRefresh: function onPullDownRefresh() {
116 | // TODO: onPullDownRefresh
117 | }
118 | });
119 | //# sourceMappingURL=detail.js.map
120 |
--------------------------------------------------------------------------------
/pages/payorder/payorder.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
10 |
11 |
12 | 当前时间:{{ nowtime }}
13 |
14 |
15 |
16 | 菜品
17 | 数量
18 | 金额
19 |
20 |
21 | {{ item.name }}
22 | {{ item.num }}
23 | {{ item.zprice }}
24 |
25 |
26 | 配送费
27 |
28 | {{yunfei}}
29 |
30 |
31 |
32 | 总价
33 | {{ total }}
34 |
35 |
36 | 实付金额以买单时为准
37 | ( 预计{{ptime}}分钟送达 )
38 |
39 |
40 |
94 |
95 |
--------------------------------------------------------------------------------
/pages/coupon/coupon.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 | {{item.title}}
31 | ¥{{item.amount}}
32 | 优惠券
33 | 满{{item.full_money}}元可用
34 |
35 | 副券
36 | {{item.start_time}}
37 | {{item.end_time}}
38 | 立即使用
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 | {{item.title}}
52 | ¥{{item.amount}}
53 | 优惠券
54 | 满{{item.full_money}}元可用
55 |
56 | 副券
57 | {{item.start_time}}
58 | {{item.end_time}}
59 | 已使用
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 | {{item.title}}
74 | ¥{{item.amount}}
75 | 优惠券
76 | 满{{item.full_money}}元可用
77 |
78 | 副券
79 | {{item.start_time}}
80 | {{item.end_time}}
81 | 已过期
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/pages/activity/activity.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | Page({
3 |
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | list:[],
9 | page: 2,
10 | },
11 |
12 | /**
13 | * 生命周期函数--监听页面加载
14 | */
15 | onLoad: function (options) {
16 | var title = options.title;
17 | if (!title) {
18 | title = '商家活动';
19 | }
20 | wx.setNavigationBarTitle({
21 | title: title,
22 | })
23 | },
24 |
25 | /**
26 | * 生命周期函数--监听页面初次渲染完成
27 | */
28 | onReady: function () {
29 | wx.hideToast();
30 | },
31 |
32 | /**
33 | * 生命周期函数--监听页面显示
34 | */
35 | onShow: function () {
36 | wx.showToast({
37 | title: '加载中...',
38 | icon: 'loading',
39 | });
40 | //获取所有
41 | var that = this;
42 | wx.request({
43 | url: app.d.ceshiUrl + '/Api/Activity/index',
44 | method: 'post',
45 | data: {},
46 | header: {
47 | 'Content-Type': 'application/x-www-form-urlencoded'
48 | },
49 | success: function (res) {
50 | var list = res.data.list;
51 | if(list==''){
52 | wx.showToast({
53 | title: '',
54 | duration: 2000
55 | });
56 | return false;
57 | }
58 | that.setData({
59 | list: list
60 | });
61 | },
62 |
63 | fail: function (err) {
64 | wx.showToast({
65 | title: '网络异常!',
66 | duration: 2000
67 | });
68 | }
69 | })
70 | },
71 |
72 | /**
73 | * 活动详情跳转事件
74 | */
75 | details: function(e) {
76 | var actId = e.currentTarget.dataset.id;
77 | wx.navigateTo({
78 | url: '../particulars/particulars?actId=' + actId,
79 | });
80 | },
81 |
82 | /**
83 | * 页面上拉触底事件的处理函数
84 | */
85 | onReachBottom: function () {
86 | var that = this;
87 | var page = that.data.page;
88 | wx.request({
89 | url: app.d.ceshiUrl + '/Api/Activity/getlist',
90 | method: 'post',
91 | data: { page: page},
92 | header: {
93 | 'Content-Type': 'application/x-www-form-urlencoded'
94 | },
95 | success: function (res) {
96 | var list = res.data.list;
97 | if (list == '') {
98 | return false;
99 | }
100 | that.setData({
101 | list: that.data.list.concat(list),
102 | page: parseInt(page)+1,
103 | });
104 | },
105 |
106 | fail: function (err) {
107 | wx.showToast({
108 | title: '网络异常!',
109 | duration: 2000
110 | });
111 | }
112 | })
113 | },
114 |
115 | /**
116 | * 用户点击右上角分享
117 | */
118 | onShareAppMessage: function () {
119 | return {
120 | title: '商家活动',
121 | path: '/pages/activity/activity',
122 | success: function (res) {
123 | // 分享成功
124 | },
125 | fail: function (res) {
126 | // 分享失败
127 | }
128 | }
129 | }
130 | })
--------------------------------------------------------------------------------
/pages/coupon/coupon.js:
--------------------------------------------------------------------------------
1 | // pages/coupon/coupon.js
2 | var app = getApp();
3 | Page({
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | tabArr: {
9 | curHdIndex: 0,
10 | curBdIndex: 0
11 | },
12 | kk:false,
13 | vou: [],
14 | vouused:[],
15 | offvou:[],
16 | },
17 | tabFun: function (e) {
18 | //获取触发事件组件的dataset属性
19 | var _datasetId = e.target.dataset.id;
20 | var _obj = {};
21 | _obj.curHdIndex = _datasetId;
22 | _obj.curBdIndex = _datasetId;
23 | if (_datasetId=='0'){
24 | var len = this.data.vou.length;
25 | } else if (_datasetId=='1') {
26 | var len = this.data.vouused.length;
27 | } else if (_datasetId=='2') {
28 | var len = this.data.vouused.length;
29 | }
30 |
31 | if (len<=0) {
32 | this.setData({
33 | kk: true,
34 | });
35 | }else {
36 | this.setData({
37 | kk: false,
38 | });
39 | }
40 |
41 | this.setData({
42 | tabArr: _obj
43 | });
44 | },
45 | /**
46 | * 生命周期函数--监听页面加载
47 | */
48 | onLoad: function (options) {
49 |
50 | },
51 |
52 | /**
53 | * 生命周期函数--监听页面初次渲染完成
54 | */
55 | onReady: function () {
56 | wx.hideToast();
57 | },
58 |
59 | /**
60 | * 生命周期函数--监听页面显示
61 | */
62 | onShow: function () {
63 | wx.showToast({
64 | title: '加载中...',
65 | icon: 'loading',
66 | });
67 | // 页面初始化 options为页面跳转所带来的参数
68 | var that = this;
69 | wx.request({
70 | url: app.d.ceshiUrl + '/Api/User/voucher',
71 | method: 'post',
72 | data: { uid: app.d.userId },
73 | header: {
74 | 'Content-Type': 'application/x-www-form-urlencoded'
75 | },
76 | success: function (res) {
77 | var vou = res.data.nouses;
78 | var vouused = res.data.useds;
79 | var offvou = res.data.offdates;
80 | var status = res.data.status;
81 | if (status == 1) {
82 | that.setData({
83 | vou: vou,
84 | vouused: vouused,
85 | offvou: offvou,
86 | });
87 | } else {
88 | wx.showToast({
89 | title: res.data.err,
90 | duration: 2000
91 | });
92 | }
93 | },
94 | error: function (e) {
95 | wx.showToast({
96 | title: '网络异常!',
97 | duration: 2000
98 | });
99 | },
100 | });
101 | },
102 |
103 | //立即使用点击事件
104 | usevou: function() {
105 | wx.navigateTo({
106 | url: '../ordering/ordering',
107 | })
108 | },
109 |
110 | /**
111 | * 生命周期函数--监听页面隐藏
112 | */
113 | onHide: function () {
114 |
115 | },
116 |
117 | /**
118 | * 生命周期函数--监听页面卸载
119 | */
120 | onUnload: function () {
121 |
122 | },
123 |
124 | /**
125 | * 页面相关事件处理函数--监听用户下拉动作
126 | */
127 | onPullDownRefresh: function () {
128 |
129 | },
130 |
131 | /**
132 | * 页面上拉触底事件的处理函数
133 | */
134 | onReachBottom: function () {
135 |
136 | },
137 |
138 | /**
139 | * 用户点击右上角分享
140 | */
141 | onShareAppMessage: function () {
142 |
143 | }
144 | })
--------------------------------------------------------------------------------
/pages/index/index.js:
--------------------------------------------------------------------------------
1 | //index.js
2 | //获取应用实例
3 | var app = getApp()
4 | Page({
5 | data: {
6 | imgUrls: [],
7 | indicatorDots: true,
8 | autoplay: true,
9 | interval: 2000,
10 | duration: 1000,
11 | imgUrls: [],
12 | indeximg: [],
13 | prolist: [],
14 | mini: {},
15 | },
16 |
17 |
18 |
19 | //事件处理函数
20 | onLoad: function () {
21 |
22 | },
23 |
24 | //页面加载时间
25 | onShow: function () {
26 | wx.showToast({
27 | title: '加载中...',
28 | icon: 'loading'
29 | });
30 | // 生命周期函数--监听页面显示
31 | var that = this;
32 | wx.request({
33 | url: app.d.ceshiUrl + '/Api/Index/index',
34 | method: 'post',
35 | data: {
36 | uid: app.d.userId
37 | },
38 | header: {
39 | 'Content-Type': 'application/x-www-form-urlencoded'
40 | },
41 | success: function (res) {
42 | var ggtop = res.data.ggtop;
43 | var indeximg = res.data.indeximg;
44 | var prolist = res.data.prolist;
45 | var mini = res.data.mini;
46 | that.setData({
47 | imgUrls: ggtop,
48 | indeximg: indeximg,
49 | prolist: prolist,
50 | mini: mini,
51 | });
52 | },
53 | fail: function (e) {
54 | wx.showToast({
55 | title: '网络异常!',
56 | duration: 2000
57 | });
58 | },
59 | });
60 | },
61 |
62 | system: function (e) {
63 | var ptype = e.currentTarget.dataset.ptype;
64 | //预约座位
65 | if (ptype == 'ydzw') {
66 | wx.navigateTo({
67 | url: '../dinner/dinner',
68 | success: function (res) { },
69 | fail: function (res) { },
70 | complete: function (res) { },
71 | })
72 | }
73 | //菜单列表
74 | if (ptype == 'ksdc'){
75 | wx.navigateTo({
76 | url: '../ordering/ordering',
77 | success: function(res) {},
78 | fail: function(res) {},
79 | complete: function(res) {},
80 | })
81 | }
82 | //商家活动
83 | if (ptype == 'dphd') {
84 | wx.navigateTo({
85 | url: '../activity/activity',
86 | success: function (res) { },
87 | fail: function (res) { },
88 | complete: function (res) { },
89 | })
90 | }
91 | //优惠券
92 | if (ptype == 'vou') {
93 | wx.navigateTo({
94 | url: '../ritual/ritual',
95 | success: function (res) { },
96 | fail: function (res) { },
97 | complete: function (res) { },
98 | })
99 | }
100 | },
101 |
102 | //菜品详情页
103 | jj:function(e) {
104 | var pid = e.currentTarget.dataset.id;
105 | var title = e.currentTarget.dataset.name;
106 | wx.navigateTo({
107 | url: '../product/product?proId=' + pid + '&title=' + title,
108 | })
109 | },
110 |
111 | onReady: function () {
112 | //页面渲染完成
113 | wx.hideToast();
114 | },
115 |
116 | onShareAppMessage: function () {
117 | return {
118 | title: '餐饮版',
119 | desc: '餐饮版!',
120 | path: '/pages/index/index',
121 | success: function (res) {
122 | // 分享成功
123 | },
124 | fail: function (res) {
125 | // 分享失败
126 | }
127 | }
128 | }
129 | })
130 |
--------------------------------------------------------------------------------
/pages/time_quantum/time_quantum.wxss:
--------------------------------------------------------------------------------
1 | .cont {
2 | width: 100%;
3 | height: 100%;
4 | font-family: '微软雅黑'
5 | }
6 |
7 | .a {
8 | width: 100%;
9 | margin:30rpx 0;
10 | text-align:center;
11 | }
12 |
13 | .a_img {
14 | width: 100%;
15 | height: 100%;
16 | margin: 0 auto;
17 | }
18 |
19 | .b {
20 | font-size: 40rpx;
21 | font-weight: 900;
22 | width: 100%;
23 | text-align: center;
24 | background: #ccc;
25 | padding: 20rpx 0;
26 | }
27 |
28 | /*供求*/
29 |
30 | .tab {
31 | flex-direction: row;
32 | width: 100%;
33 | }
34 |
35 | .tab-left {
36 | width: 100%;
37 | line-height: 160%;
38 | font-size: 25rpx;
39 | }
40 |
41 | .tab-left .n {
42 | text-align: center;
43 | display: inline-block;
44 | width: 20%;
45 | padding: 15rpx 0;
46 | border: 1px solid #ccc;
47 | margin: 20rpx 0rpx;
48 | margin-left: 72rpx;
49 | border-radius: 40rpx;
50 | }
51 |
52 | .tab-left .active {
53 | color: #fff;
54 | background: #8e8e38;
55 | }
56 |
57 | .tab-left .actives {
58 | color: #fff;
59 | background: #707070;
60 | }
61 |
62 | .jinee {
63 | text-align: center;
64 | display: inline-block;
65 | width: 20%;
66 | /*padding:15rpx 0;*/
67 | border: 1px solid #ccc;
68 | margin-left: 72rpx;
69 | border-radius: 10rpx;
70 | }
71 |
72 | .start-pay {
73 | width: 60%;
74 | line-height: 70rpx;
75 | text-align: center;
76 | color: #fff;
77 | border-radius: 10rpx;
78 | background-color: #f00;
79 | margin: 0 auto;
80 | margin-top: 100rpx;
81 | }
82 |
83 | /*mask*/
84 |
85 | .drawer_screen {
86 | width: 100%;
87 | height: 100%;
88 | position: fixed;
89 | top: 0;
90 | left: 0;
91 | z-index: 1000;
92 | background: #000;
93 | opacity: 0.5;
94 | overflow: hidden;
95 | }
96 |
97 | /*content*/
98 |
99 | .drawer_box {
100 | width: 650rpx;
101 | overflow: hidden;
102 | position: fixed;
103 | top: 50%;
104 | left: 0;
105 | z-index: 1001;
106 | background: #fafafa;
107 | margin: -150px 50rpx 0 50rpx;
108 | border-radius: 3px;
109 | }
110 |
111 | .btn_ok {
112 | padding: 10px;
113 | font: 35rpx "microsoft yahei";
114 | text-align: center;
115 | border-top: 1px solid #e8e8ea;
116 | color: #3cc51f;
117 | }
118 |
119 | /*提示*/
120 |
121 | .c {
122 | margin: 10rpx 20rpx;
123 | font-size: 32rpx;
124 | }
125 |
126 | .d {
127 | width: 100%;
128 | text-align: center;
129 | padding: 10rpx 0;
130 | font-weight: 700;
131 | }
132 |
133 | .e {
134 | width: 100%;
135 | text-align: center;
136 | padding: 20rpx 0; border-bottom: 1rpx solid #e8e8ea
137 | }
138 |
139 | .f {
140 | display: flex; padding: 20rpx 0;
141 | align-items: center;
142 | }
143 |
144 | .f_a {
145 | flex: 1;
146 | text-align: center;
147 | border-right:1rpx solid #e8e8ea
148 | }
149 |
150 | .f_b {
151 | flex: 1; text-align: center;
152 | color: #3cc51f
153 | }
154 | .cl{
155 | width: 100%;
156 | position: absolute;
157 | bottom: 0%;
158 | text-align: center;
159 | font-size: 30rpx;
160 | color:#bfbfbf;
161 | transform:skewX(-15deg);
162 | padding-bottom: 30rpx;
163 | }
164 | .cll{
165 | width: 100%;
166 | position: absolute;
167 | bottom: 5%;
168 | text-align: center;
169 | font-size: 35rpx;
170 | color:#bfbfbf;
171 | transform:skewX(-15deg);padding-bottom:30rpx;
172 |
173 | }
--------------------------------------------------------------------------------
/pages/detail/detail.wxss:
--------------------------------------------------------------------------------
1 | .d-wait {
2 | display: flex;
3 | flex-direction: column;
4 | border-bottom: 11rpx solid #eee;
5 | }
6 | .d-wait > view {
7 | display: flex;
8 | align-items: center;
9 | justify-content: space-around;
10 | border-bottom: 1rpx solid #eee;
11 | line-height: 56rpx;
12 | }
13 | .d-wait > view .kind,
14 | .d-wait > view .desk,
15 | .d-wait > view .time {
16 | width: 33.33%;
17 | text-align: center;
18 | font-size: 30rpx;
19 | color: #666;
20 | padding:20rpx 0;
21 |
22 | }
23 | .d-wait > view .desk > text {
24 | color: #ed4d30;
25 | }
26 | .d-wait > view:nth-child(1) {
27 | background-color: #eee;
28 | }
29 | .d-wait > view:nth-child(1) .kind,
30 | .d-wait > view:nth-child(1) .desk,
31 | .d-wait > view:nth-child(1) .time {
32 | color: #333;
33 | }
34 | .d-wait > text {
35 | color: #999;
36 | font-size: 22rpx;
37 | line-height: 55rpx;
38 | padding-left: 46rpx;
39 | }
40 | .d-wait > text::before {
41 | display: inline-block;
42 | content: '';
43 | width: 8rpx;
44 | height: 8rpx;
45 | background-color: #a0a0a0;
46 | border-radius: 50%;
47 | transform: translate(-11rpx, -2rpx);
48 | }
49 | .restaurant-info .top {
50 | display: flex;
51 | padding: 20rpx;
52 | border-bottom: 1rpx solid #eee;
53 | align-items: center;
54 | }
55 | .restaurant-info .top image {
56 | width: 70rpx;
57 | height: 70rpx;
58 | border-radius: 50%;
59 | }
60 | .restaurant-info .top .top-center {
61 | display: flex;
62 | flex-direction: column;
63 | padding-left: 30rpx;
64 | }
65 | .restaurant-info .top .top-center .top-center-name {
66 | font-size: 26rpx;
67 | color: #333;
68 | line-height: 50rpx;
69 | }
70 | .restaurant-info .top .top-center .restaurant-grade {
71 | position: relative;
72 | overflow: hidden;
73 | font-size: 26rpx;
74 | color: #ccc;
75 | }
76 | .restaurant-info .top .distance {
77 | flex: 1;
78 | text-align: right;
79 | color: #999;
80 | font-size: 26rpx;
81 | }
82 | .restaurant-info .r-i-address,
83 | .restaurant-info .r-i-tel,
84 | .restaurant-info .r-i-time {
85 | line-height: 60rpx;
86 | border-bottom: 1rpx solid #e5e5e5;
87 | padding-left: 65rpx;
88 | font-size: 24rpx;
89 | }
90 | .restaurant-info .triangle::after {
91 | right: 30rpx;
92 | }
93 | .restaurant-info .r-i-address::before,
94 | .restaurant-info .r-i-tel::before,
95 | .restaurant-info .r-i-time::before {
96 | display: inline-block;
97 | color: #333;
98 | font-size: 30rpx;
99 | transform: translateX(-20rpx);
100 | }
101 | .take-number {
102 | position: fixed;
103 | bottom: 0;
104 | width: 100%;
105 | background-color: #ed4d30;
106 | color: #fff;
107 | font-size: 30rpx;
108 | font-weight: 700;
109 | line-height: 72rpx;
110 | text-align: center;
111 | }
112 |
113 | /*排队*/
114 |
115 | .menu0 {
116 | padding: 0 50rpx;
117 | }
118 | .menu0 view {
119 | box-sizing: border-box;
120 | width: 100%;
121 | line-height: 70rpx;
122 | background-color: #f00;
123 | color: #fff;
124 | /*font-weight: 700;*/
125 | margin-top: 40rpx;
126 | border-radius: 70rpx;
127 | text-align: center;
128 | }
129 |
130 |
131 |
132 | .cl{
133 | width: 100%;
134 | position: absolute;
135 | bottom: 0%;
136 | text-align: center;
137 | font-size: 30rpx;
138 | color:#bfbfbf;
139 | transform:skewX(-15deg);
140 | }
141 | .cll{
142 | width: 100%;
143 | position: absolute;
144 | bottom: 5%;
145 | text-align: center;
146 | font-size: 35rpx;
147 | color:#bfbfbf;
148 | transform:skewX(-15deg);
149 | }
--------------------------------------------------------------------------------
/pages/order/detail.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background-color: #eee;
3 | padding: 24rpx;
4 | box-sizing: border-box;
5 | font-family: '微软雅黑';
6 | }
7 |
8 | .xing {
9 | display: flex;
10 | align-items: center;
11 | padding: 10rpx 0;
12 | font-size: 30rpx;
13 | padding-left: 20rpx;
14 | margin-top: 20rpx;
15 | margin-left: 31rpx;
16 | border-bottom: 1rpx solid #d4d6d8;
17 | }
18 | .map{
19 | width:60rpx;
20 | height: 60rpx;
21 | }
22 |
23 | input {
24 | padding-left: 10rpx;
25 | flex: 0.95;
26 | }
27 |
28 | .payorder .restaurant {
29 | font-size: 28rpx;
30 | color: #333;
31 | padding-top: 20rpx;
32 | }
33 |
34 | .payorder .ocunt {
35 | line-height: 75rpx;
36 | display: flex;
37 | align-items: center;
38 | justify-content: space-between;
39 | color: #999;
40 | font-size: 24rpx;
41 | }
42 |
43 | .payorder .orderList {
44 | background-color: #fff;
45 | margin: 0 50rpx;
46 | position: relative;
47 | }
48 |
49 | .payorder .orderList .time {
50 | position: relative;
51 | margin: 0 20rpx;
52 | text-align: center;
53 | line-height: 70rpx;
54 | font-size: 24rpx;
55 | color: #999;
56 | border-bottom: 1rpx dashed #eee;
57 | }
58 |
59 | .payorder .orderList .time::after, .payorder .orderList .time::before {
60 | content: '';
61 | display: block;
62 | position: absolute;
63 | width: 30rpx;
64 | height: 30rpx;
65 | background-color: #eee;
66 | border-radius: 50%;
67 | top: 60rpx;
68 | }
69 |
70 | .payorder .orderList .time::before {
71 | left: -37rpx;
72 | }
73 |
74 | .payorder .orderList .time::after {
75 | right: -37rpx;
76 | }
77 |
78 | .payorder .orderList .orderList-item-top,
79 | .payorder .orderList .orderList-item-one {
80 | display: flex;
81 | justify-content: space-around;
82 | }
83 |
84 | .payorder .orderList .orderList-item-top > text,
85 | .payorder .orderList .orderList-item-one > text {
86 | width: 33.33%;
87 | text-align: center;
88 | font-size: 24rpx;
89 | color: #999;
90 | line-height: 60rpx;
91 | }
92 |
93 | .payorder .orderList .bottom {
94 | display: flex;
95 | justify-content: space-between;
96 | border-top: 1rpx dashed #eee;
97 | line-height: 70rpx;
98 | font-size: 24rpx;
99 | padding: 0 50rpx;
100 | padding-right: 70rpx;
101 | }
102 |
103 | .payorder .orderList::after, .payorder .orderList::before {
104 | content: '';
105 | position: absolute;
106 | top: 0;
107 | }
108 |
109 | .payorder .orderList::after {
110 | width: 110%;
111 | height: 10rpx;
112 | left: -30rpx;
113 | border-radius: 5rpx;
114 | background-color: #d4d6d8;
115 | z-index: 99;
116 | }
117 |
118 | .payorder .orderList::before {
119 | top: 7rpx;
120 | width: 105%;
121 | height: 5rpx;
122 | left: -15rpx;
123 | border-radius: 5rpx;
124 | background-color: #adb3b9;
125 | z-index: 100;
126 | }
127 |
128 | .tip {
129 | padding: 0 50rpx;
130 | text-align: left;
131 | font-size: 24rpx;
132 | color: #999;
133 | line-height: 80rpx;
134 | }
135 |
136 | .start-pay {
137 | /*position: fixed;*//*bottom: 0;*/
138 | width: 93%;
139 | line-height: 70rpx;
140 | text-align: center;
141 | color: #fff;
142 | border-radius: 10rpx;
143 | background-color: #f00;
144 | margin: 0 auto;
145 | margin-top: 100rpx;
146 | }
147 |
148 |
149 | /*预定*/
150 | .y{
151 | width: 86%;
152 | background-color:#fff;
153 | margin:0 50rpx;
154 | position:relative;
155 | padding-bottom: 20rpx ;
156 | color: #999
157 | }
158 | .y_a{
159 | text-align: center;
160 | font-size: 30rpx;
161 | background: #d4d6d8;
162 | padding: 20rpx 0;
163 | }
164 | .y_b{
165 | font-size: 26rpx;
166 | margin: 20rpx 0;
167 | padding-left:20rpx;
168 |
169 | }
--------------------------------------------------------------------------------
/pages/payorder/payorder.wxss:
--------------------------------------------------------------------------------
1 | page {
2 | background-color: #eee;
3 | padding: 24rpx;
4 | box-sizing: border-box;
5 | font-family: '微软雅黑';
6 | }
7 |
8 | .xing {
9 | display: flex;
10 | background: #fff;
11 | align-items: center;
12 | padding: 10rpx 0;
13 | font-size: 30rpx;
14 | padding-left: 20rpx;
15 | margin-top: 40rpx;
16 | width: 87%;
17 | margin-left: 31rpx;
18 | border-bottom: 1rpx solid #d4d6d8;
19 | }
20 | .map{
21 | width:60rpx;
22 | height: 60rpx;
23 | }
24 |
25 | input {
26 | padding-left: 10rpx;
27 | flex: 0.95;
28 | }
29 |
30 | .payorder .restaurant {
31 | font-size: 28rpx;
32 | color: #333;
33 | padding-top: 20rpx;
34 | }
35 |
36 | .payorder .ocunt {
37 | line-height: 75rpx;
38 | display: flex;
39 | align-items: center;
40 | justify-content: space-between;
41 | color: #999;
42 | font-size: 24rpx;
43 | }
44 |
45 | .payorder .orderList {
46 | background-color: #fff;
47 | margin: 0 50rpx;
48 | position: relative;
49 | }
50 |
51 | .payorder .orderList .time {
52 | position: relative;
53 | margin: 0 20rpx;
54 | text-align: center;
55 | line-height: 70rpx;
56 | font-size: 24rpx;
57 | color: #999;
58 | border-bottom: 1rpx dashed #eee;
59 | }
60 |
61 | .payorder .orderList .time::after, .payorder .orderList .time::before {
62 | content: '';
63 | display: block;
64 | position: absolute;
65 | width: 30rpx;
66 | height: 30rpx;
67 | background-color: #eee;
68 | border-radius: 50%;
69 | top: 60rpx;
70 | }
71 |
72 | .payorder .orderList .time::before {
73 | left: -37rpx;
74 | }
75 |
76 | .payorder .orderList .time::after {
77 | right: -37rpx;
78 | }
79 |
80 | .payorder .orderList .orderList-item-top,
81 | .payorder .orderList .orderList-item-one {
82 | display: flex;
83 | justify-content: space-around;
84 | }
85 |
86 | .payorder .orderList .orderList-item-top > text,
87 | .payorder .orderList .orderList-item-one > text {
88 | width: 33.33%;
89 | text-align: center;
90 | font-size: 24rpx;
91 | color: #999;
92 | line-height: 60rpx;
93 | }
94 |
95 | .payorder .orderList .bottom {
96 | display: flex;
97 | justify-content: space-between;
98 | border-top: 1rpx dashed #eee;
99 | line-height: 70rpx;
100 | font-size: 24rpx;
101 | padding: 0 50rpx;
102 | padding-right: 70rpx;
103 | }
104 |
105 | .payorder .orderList::after, .payorder .orderList::before {
106 | content: '';
107 | position: absolute;
108 | top: 0;
109 | }
110 |
111 | .payorder .orderList::after {
112 | width: 110%;
113 | height: 10rpx;
114 | left: -30rpx;
115 | border-radius: 5rpx;
116 | background-color: #d4d6d8;
117 | z-index: 99;
118 | }
119 |
120 | .payorder .orderList::before {
121 | top: 7rpx;
122 | width: 105%;
123 | height: 5rpx;
124 | left: -15rpx;
125 | border-radius: 5rpx;
126 | background-color: #adb3b9;
127 | z-index: 100;
128 | }
129 |
130 | .tip {
131 | padding: 0 50rpx;
132 | text-align: right;
133 | font-size: 24rpx;
134 | color: #999;
135 | line-height: 80rpx;
136 | }
137 |
138 | .start-pay {
139 | /*position: fixed;*//*bottom: 0;*/
140 | width: 93%;
141 | line-height: 70rpx;
142 | text-align: center;
143 | color: #fff;
144 | border-radius: 10rpx;
145 | background-color: #f00;
146 | margin: 0 auto;
147 | margin-top: 100rpx;
148 | }
149 |
150 |
151 | /*预定*/
152 | .y{
153 | width: 86%;
154 | background-color:#fff;
155 | margin:0 50rpx;
156 | position:relative;
157 | padding-bottom: 20rpx ;
158 | color: #999
159 | }
160 | .y_a{
161 | text-align: center;
162 | font-size: 30rpx;
163 | background: #d4d6d8;
164 | padding: 20rpx 0;
165 | }
166 | .y_b{
167 | font-size: 26rpx;
168 | margin: 20rpx 0;
169 | padding-left:20rpx;
170 |
171 | }
--------------------------------------------------------------------------------
/pages/coupon/coupon.wxss:
--------------------------------------------------------------------------------
1 | page{
2 | font-family: "微软雅黑"
3 | }
4 |
5 |
6 | /*切换*/
7 | .img{
8 | height: 50rpx;
9 | width: 50rpx;
10 | display: block;
11 | margin: 0 auto;
12 | }
13 | .tab {
14 | flex-direction: row;
15 | width: 100%;
16 | position: fixed;
17 | top: 0rpx;
18 | z-index:100;
19 | background: #fff;
20 | height: 80rpx;
21 | }
22 |
23 | .tab-left {
24 | width: 100%;
25 | height: 80rpx;
26 | font-size: 30rpx;
27 | border-bottom: 1px solid #ccc;
28 | line-height: 80rpx;
29 | }
30 |
31 | .tab-left .a {
32 | text-align: center;
33 | display: inline-block;
34 | width: 33.333%;
35 | }
36 |
37 | .tab-left .active {
38 | color: #f00;
39 | }
40 |
41 | .tab-right {
42 | line-height: 108%;
43 | padding-top: 80rpx;
44 | }
45 |
46 | .tab-right .right-item {
47 | /*padding: 15rpx; */
48 | display: none;
49 | }
50 |
51 | .tab-right .right-item.active {
52 | display: block;
53 | background: white;
54 | }
55 |
56 |
57 |
58 |
59 | /*优惠劵*/
60 |
61 | .demo {
62 | width:100%;
63 | margin:0 auto;
64 | }
65 | .stamp {
66 | padding: 0;
67 | margin: 0;
68 | list-style:none;
69 | font-family:"Microsoft YaHei", 'Source Code Pro', Menlo, Consolas, Monaco, monospace;
70 | }
71 | .stamp {
72 | height: 250rpx;
73 | margin-bottom: 100rpx;
74 | position: relative;
75 | overflow: hidden;
76 | }
77 | .stamp:before {
78 | content: '';
79 | position: absolute;
80 | top:0;
81 | bottom:0;
82 | left:20rpx;
83 | right:20rpx;
84 | z-index: -1;
85 | }
86 | .stamp i {
87 | position: absolute;
88 | left: 20%;
89 | top: 90rpx;
90 | height: 190px;
91 | width: 780rpx;
92 | background-color: rgba(255, 255, 255, .15);
93 | transform: rotate(-30deg);
94 | }
95 | .stamp .par {
96 | float: left;
97 | padding: 25rpx 30rpx;
98 | width: 58%;
99 | border-right:4rpx dashed rgba(0, 0, 0, .3);
100 | text-align: left;
101 | }
102 | .stamp .par p {
103 | color:#fff;
104 | font-size: 32rpx;
105 | line-height: 30rpx;
106 | }
107 | .stamp .par span {
108 | font-size: 70rpx;
109 | color:#fff;
110 | margin-right: 10rpx;
111 | line-height: 130rpx;
112 | }
113 | .stamp .par .sign {
114 | font-size: 50rpx;
115 | }
116 | .stamp .par sub {
117 | position: relative;
118 | top:-5px;
119 | color:rgba(255, 255, 255, .8);
120 | font-size: 30rpx;
121 | }
122 | .stamp .copy {
123 | display: inline-block;
124 | padding:42rpx 28rpx;
125 | width:25%;
126 | vertical-align: text-bottom;
127 | font-size: 60rpx;
128 | color:rgb(255,255,255);
129 | text-align: center;
130 | line-height: initial;
131 | }
132 |
133 |
134 |
135 | .stamp04 {
136 | width:92%;
137 | margin-top:10rpx;
138 | background:radial-gradient(rgba(0, 0, 0, 0) 0, rgba(0, 0,0, 0) 3px, #da0909 3px);
139 | /*background-size:24rpx 16rpx;*/
140 | background-position:-10rpx 0rem;
141 | margin:40rpx 33rpx;
142 |
143 | }
144 | .stamp04:before {
145 | background-color:#da0909;
146 | left: 10rpx;
147 | right: 10rpx;
148 | }
149 | .stamp04 .copy {
150 | padding: 20rpx 12rpx 20rpx 24rpx;
151 | font-size:32rpx;
152 | padding-top: 20rpx;
153 | }
154 | .stamp04 .copy p {
155 | font-size: 22rpx;
156 | margin-top: 10rpx;
157 | margin-bottom: 15rpx;
158 | }
159 | .stamp04 .copy a {
160 | background-color:#fff;
161 | color:#333;
162 | font-size: 28rpx;
163 | text-decoration:none;
164 | padding:10rpx 20rpx;
165 | border-radius:6rpx;
166 | display: block;
167 | }
168 | p{
169 | display: block
170 | }
171 |
172 | /*广告*/
173 | .cla{
174 | width: 100%;
175 | height: 300rpx;
176 | position: absolute;
177 | bottom: 1%;
178 | }
179 | .cla image{
180 | width: 100%;
181 | height: 100%;
182 | }
183 |
184 |
185 | .mei{
186 | width: 100%;
187 | height: 300rpx;
188 | text-align: center;
189 | }
190 | .mei image{
191 | width: 300rpx;
192 | height: 300rpx;
193 | position: relative;
194 | top: 180rpx;
195 |
196 | }
197 | .zan{
198 | position: relative;
199 | top: 200rpx;
200 | color: #ccc
201 |
202 | }
--------------------------------------------------------------------------------
/pages/dingdan/dingdan.wxss:
--------------------------------------------------------------------------------
1 | .on {
2 | color: #dd2727;
3 | border-bottom: 5rpx solid #dd2727;
4 | }
5 |
6 | .swiper-box {
7 | display: block;
8 | height: 100%;
9 | width: 100%;
10 | overflow: hidden;
11 | }
12 |
13 | .clearbutton {
14 | background: #fff;
15 | display: inline-block;
16 | margin: 3% 3% 2% 3%;
17 | color: #dd2727;
18 | font-size: 14px;
19 | width: 94%;
20 | }
21 |
22 | .shop {
23 | background: #fff;
24 | padding: 4%;
25 | margin-bottom: 10px;
26 | border-bottom: 1px solid #eee;
27 |
28 | display: -webkit-box;
29 | display: -webkit-flex;
30 | display: -ms-flexbox;
31 | display: flex;
32 |
33 | }
34 |
35 | .shop checkbox {
36 | margin-top: 27px;
37 | }
38 |
39 | .sh_slt {
40 | width: 80px;
41 | height: 80px;
42 | overflow: hidden;
43 | border-radius: 5px;
44 | margin-right: 4%;
45 | float: left;
46 | }
47 |
48 | .sp_text {
49 | float: left;
50 | line-height: 20px;
51 | width: 100%;
52 | text-align: left;
53 | }
54 |
55 | .sp_tit {
56 | width: 100%;
57 | overflow: hidden;
58 | font-size: 14px;
59 | text-overflow:ellipsis;
60 | display:-webkit-box;
61 | -webkit-box-orient:vertical;
62 | -webkit-line-clamp:2;
63 | }
64 |
65 | .sp_neb {
66 | width: 100%;
67 | overflow: hidden;
68 | font-size: 12px;
69 | color: #999;
70 | }
71 |
72 | .sp_jg {
73 | width: 100%;
74 | overflow: hidden;
75 | font-size: 14px;
76 | color: #fc0628;
77 | }
78 |
79 | .dle {
80 | color: #999;
81 | font-size: 12px;
82 | float: right;
83 | }
84 |
85 | .dle image {
86 | width: 18px;
87 | height: 18px;
88 | vertical-align: sub;
89 | }
90 |
91 | .jk_bottom {
92 | position: fixed;
93 | bottom: 0;
94 | background: #fff;
95 | width: 100%;
96 | display: inline-flex;
97 | border-bottom: 1px solid #eee;
98 | font-size: 14px;
99 | color: #999;
100 | }
101 |
102 | .jk_bottom checkbox {
103 | margin: 4% 0 4% 4%;
104 | }
105 |
106 | .jk_bottom .heji {
107 | margin-top: 5.5%;
108 | width: 30%;
109 | text-align: right;
110 | }
111 |
112 | .jk_bottom .all {
113 | margin-top: 5.5%;
114 | padding-left: 2%;
115 | }
116 |
117 | .jk_bottom .js_button {
118 | background: #dd2727;
119 | float: right;
120 | color: #fff;
121 | font-size: 16px;
122 | text-align: center;
123 | width: 40%;
124 | position: absolute;
125 | right: 0;
126 | line-height: 50px;
127 | }
128 |
129 | .c_t60 {
130 | clear: both;
131 | height: 1px;
132 | padding-top: 48px;
133 | }
134 |
135 | .blue {
136 | color: #42b1ff;
137 | }
138 |
139 | .mr_5 {
140 | margin-right: 5px;
141 | }
142 |
143 | .mt10 {
144 | margin: 0 auto;
145 | text-align: center;
146 | height: 70rpx;
147 | width: 450rpx;
148 | line-height: 70rpx;
149 | border-radius: 10rpx;
150 | border: 1px solid #999;
151 | font-size: 30rpx;
152 | margin-top: 30rpx;
153 | }
154 |
155 | /*供求*/
156 |
157 | .tab {
158 | flex-direction: row;
159 | width: 100%;
160 | }
161 |
162 | .tab-left {
163 | width: 100%;
164 | line-height: 160%;
165 | font-size: 34rpx;
166 | border-bottom: 1px solid #ccc;
167 | }
168 | .df_1{
169 |
170 |
171 | margin-left: 32rpx;
172 | }
173 | .tab-left view {
174 | text-align: center;
175 | display: inline-block;
176 | width: 20%;
177 | padding: 15rpx 0;
178 | font-size: 30rpx;
179 | }
180 |
181 | .tab-left .active {
182 | color: #f00;
183 | }
184 |
185 | .tab-right {
186 | line-height: 160%;
187 | }
188 |
189 | .tab-right .right-item {
190 | display: none;
191 | }
192 |
193 | .tab-right .right-item.active {
194 | display: block;
195 | }
196 |
197 | /*没有订单时候*/
198 | .search_no{
199 | width: 100%;
200 | display: block;
201 | color: #666;
202 | text-align: center;
203 | font-size: 14px;
204 | }
205 | .scimg{
206 | width: 130rpx;
207 | height: 130rpx;
208 | display: inline-block;
209 | background-size:100px;
210 | padding-top:150rpx;
211 | }
212 | .fl_r{ float: right;
213 | font-size: 28rpx;
214 | }
--------------------------------------------------------------------------------
/pages/dinner/dinner.js:
--------------------------------------------------------------------------------
1 | var app = getApp();
2 | Page({
3 |
4 | data:{
5 | index: 0,
6 | date: '2017-01-01',
7 | time: '00:00',
8 | listArr: [],//时间段数组
9 | listId: [],//时间段id数组
10 | listIndex: 0,
11 | timeid:0,
12 | img: {},
13 | offtime: "2100-01-01",
14 | },
15 |
16 | //页面加载完成
17 | onShow: function() {
18 | var that = this;
19 | //获取数据
20 | wx.request({
21 | url: app.d.ceshiUrl + '/Api/User/dinner',
22 | data: {},
23 | method: 'POST',
24 | success: function (res) {
25 | var img = res.data.img;
26 | var list = res.data.list;
27 | var nowtime = res.data.nowtime;
28 | var offtime = res.data.offtime;
29 | var sArr = [];
30 | var sId = [];
31 | sArr.push('请选择');
32 | sId.push('0');
33 | for (var i = 0; i < list.length; i++) {
34 | sArr.push(list[i].name);
35 | sId.push(list[i].id);
36 | }
37 | that.setData({
38 | listArr: sArr,
39 | listId: sId,
40 | date: nowtime,
41 | offtime: offtime,
42 | img: img,
43 | })
44 | },
45 | fail: function () {
46 | // fail
47 | wx.showToast({
48 | title: '网络异常!',
49 | duration: 2000
50 | });
51 | },
52 | })
53 | },
54 |
55 | // 表单
56 | reg: function (e) {
57 | console.log(e.detail.value);
58 | //存储数据
59 | var that = this;
60 | var tel = e.detail.value.tel;
61 | var name = e.detail.value.name;
62 | var timeid = e.detail.value.timeid;
63 | if (!tel || !name) {
64 | wx.showToast({
65 | title: "请先完善预订信息!",
66 | duration: 2000
67 | });
68 | return false;
69 | }
70 | if(!timeid) {
71 | wx.showToast({
72 | title: "请先选择时间段!",
73 | duration: 2000
74 | });
75 | return false;
76 | }
77 |
78 | //创建订单
79 | wx.request({
80 | url: app.d.ceshiUrl + '/Api/User/book',
81 | method: 'post',
82 | data: {
83 | uid: app.d.userId,
84 | name: name,
85 | tel: tel,
86 | thetime: that.data.date, //用餐日期
87 | timeid: timeid,
88 | remark: e.detail.value.remark,//用户备注
89 | arrive: that.data.time, //预计到店时间
90 | people: e.detail.value.people,
91 | },
92 | header: {
93 | 'Content-Type': 'application/x-www-form-urlencoded'
94 | },
95 | success: function (res) {
96 | wx.hideToast();
97 | //--init data
98 | var data = res.data;
99 | if (data.status == 1) {
100 | var bookId = data.bookid;
101 | wx.navigateTo({
102 | url: '../time_quantum/time_quantum?bookId=' + bookId,
103 | });
104 | } else {
105 | wx.showToast({
106 | title: res.data.err,
107 | duration: 2300
108 | });
109 | }
110 | },
111 | fail: function (e) {
112 | wx.hideToast();
113 | wx.showToast({
114 | title: '网络异常!err:createProductOrder',
115 | duration: 2000
116 | });
117 | }
118 | });
119 | },
120 | // 下一步
121 | showTopTips:function(){
122 | wx.navigateTo({
123 | url: '../time_quantum/time_quantum',
124 | success: function(res) {},
125 | fail: function(res) {},
126 | complete: function(res) {},
127 | })
128 | },
129 |
130 | calling:function(){
131 | wx.makePhoneCall({
132 | phoneNumber: '12345678900', //此号码并非真实电话号码,仅用于测试
133 | success:function(){
134 | console.log("拨打电话成功!")
135 | },
136 | fail:function(){
137 | console.log("拨打电话失败!")
138 | }
139 | })
140 | },
141 |
142 | //时间段change事件
143 | bindChange: function (e) {
144 | console.log(e.detail.value);
145 | this.setData({
146 | timeid: e.detail.value,
147 | listIndex: e.detail.value,
148 | })
149 | },
150 |
151 | bindDateChange: function (e) {
152 | this.setData({
153 | date: e.detail.value
154 | })
155 | },
156 |
157 | bindTimeChange: function (e) {
158 | this.setData({
159 | time: e.detail.value
160 | })
161 | }
162 | })
--------------------------------------------------------------------------------
/app.js:
--------------------------------------------------------------------------------
1 | // app.js
2 | App({
3 | d: {
4 | userId: 0,
5 | appId: "",
6 | appKey: "",
7 | ceshiUrl: 'https://xxx.xxx.com/index.php',
8 | },
9 | onLaunch: function () {
10 | //调用API从本地缓存中获取数据
11 | var logs = wx.getStorageSync('logs') || []
12 | logs.unshift(Date.now())
13 | wx.setStorageSync('logs', logs);
14 | //login
15 | //this.getUserInfo();
16 | },
17 | getUserInfo: function (cb) {
18 | var that = this
19 | if (this.globalData.userInfo) {
20 | typeof cb == "function" && cb(this.globalData.userInfo)
21 | } else {
22 | //调用登录接口
23 | wx.login({
24 | success: function (res) {
25 | var code = res.code;
26 | //get wx user simple info
27 | wx.getUserInfo({
28 | success: function (res) {
29 | that.globalData.userInfo = res.userInfo
30 | typeof cb == "function" && cb(that.globalData.userInfo);
31 | //get user sessionKey
32 | //get sessionKey
33 | that.getUserSessionKey(code);
34 | }
35 | });
36 | }
37 | });
38 | }
39 | },
40 |
41 | getUserSessionKey: function (code) {
42 | //用户的订单状态
43 | var that = this;
44 | wx.request({
45 | url: that.d.ceshiUrl + '/Api/Login/getsessionkey',
46 | method: 'post',
47 | data: {
48 | code: code
49 | },
50 | header: {
51 | 'Content-Type': 'application/x-www-form-urlencoded'
52 | },
53 | success: function (res) {
54 | //--init data
55 | var data = res.data;
56 | if (data.status == 0) {
57 | wx.showToast({
58 | title: data.err,
59 | duration: 2000
60 | });
61 | return false;
62 | }
63 |
64 | that.globalData.userInfo['sessionId'] = data.session_key;
65 | that.globalData.userInfo['openid'] = data.openid;
66 | that.onLoginUser();
67 | },
68 | fail: function (e) {
69 | wx.showToast({
70 | title: '网络异常!err:getsessionkeys',
71 | duration: 2000
72 | });
73 | },
74 | });
75 | },
76 | onLoginUser: function () {
77 | var that = this;
78 | var user = that.globalData.userInfo;
79 | wx.request({
80 | url: that.d.ceshiUrl + '/Api/Login/authlogin',
81 | method: 'post',
82 | data: {
83 | SessionId: user.sessionId,
84 | gender: user.gender,
85 | NickName: user.nickName,
86 | HeadUrl: user.avatarUrl,
87 | openid: user.openid
88 | },
89 | header: {
90 | 'Content-Type': 'application/x-www-form-urlencoded'
91 | },
92 | success: function (res) {
93 | //--init data
94 | var data = res.data.arr;
95 | var status = res.data.status;
96 | if (status != 1) {
97 | wx.showToast({
98 | title: res.data.err,
99 | duration: 3000
100 | });
101 | return false;
102 | }
103 | that.globalData.userInfo['id'] = data.ID;
104 | that.globalData.userInfo['NickName'] = data.NickName;
105 | that.globalData.userInfo['HeadUrl'] = data.HeadUrl;
106 | var userId = data.ID;
107 | if (!userId) {
108 | wx.showToast({
109 | title: '登录失败!',
110 | duration: 3000
111 | });
112 | return false;
113 | }
114 | that.d.userId = userId;
115 | },
116 | fail: function (e) {
117 | wx.showToast({
118 | title: '网络异常!err:authlogin',
119 | duration: 2000
120 | });
121 | },
122 | });
123 | },
124 | getOrBindTelPhone: function (returnUrl) {
125 | var user = this.globalData.userInfo;
126 | if (!user.tel) {
127 | wx.navigateTo({
128 | url: 'pages/binding/binding'
129 | });
130 | }
131 | },
132 |
133 | globalData: {
134 | userInfo: null
135 | },
136 |
137 | onPullDownRefresh: function () {
138 | wx.stopPullDownRefresh();
139 | }
140 |
141 | });
142 |
143 |
144 |
145 |
146 |
147 |
--------------------------------------------------------------------------------
/pages/dingdan/dingdan.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | 待付款
6 | 待配送
7 | 配送中
8 | 已预订
9 | 已完成
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 | 没有退款订单/(ㄒoㄒ)/~~
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | {{item.name}}
32 |
33 | 产品:×{{item.pro_count}} 属性:{{item.pro_buff}}
34 | ¥ {{item.price}}
35 | 已退款
36 | 退款处理中
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 | 没有可用订单/(ㄒoㄒ)/~~
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 | {{item.name}}
60 |
61 | 产品:×{{item.pro_count}} 属性:{{item.pro_buff}}
62 | ¥ {{item.price}}
63 | 微信支付
64 | 取消订单
65 | 确认送达
66 | 确认消费
67 |
68 | 订单详情
69 |
70 |
71 |
72 |
73 |
74 |
--------------------------------------------------------------------------------
/pages/ordering/ordering.wxml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
70 |
71 |
72 |
73 |
74 |
75 | {{ cartnum }}
76 |
77 | ¥{{cartmoney}}元
78 |
79 | ( 配送费:{{fee}}元 )
80 |
81 | 提交
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/pages/product/product.js:
--------------------------------------------------------------------------------
1 | // pages/product/product.js
2 | var app = getApp();
3 | Page({
4 | /**
5 | * 页面的初始数据
6 | */
7 | data: {
8 | imgUrls: [],
9 | indicatorDots: true,
10 | autoplay: true,
11 | interval: 2000,
12 | duration: 1000,
13 | buynum:1,
14 | proId:0,
15 | info:{},
16 | },
17 |
18 | // 加减
19 | changeNum: function (e) {
20 | var that = this;
21 | if (e.target.dataset.alphaBeta == 0) {
22 | if (this.data.buynum <= 1) {
23 | buynum: 1
24 | } else {
25 | this.setData({
26 | buynum: this.data.buynum - 1
27 | })
28 | };
29 | } else {
30 | this.setData({
31 | buynum: this.data.buynum + 1
32 | })
33 | };
34 | },
35 |
36 |
37 | /**
38 | * 生命周期函数--监听页面加载
39 | */
40 | onLoad: function (options) {
41 | var proId = options.proId;
42 | var title = options.title;
43 | wx.setNavigationBarTitle({
44 | title: title,
45 | })
46 | this.setData({
47 | proId: proId,
48 | });
49 | },
50 |
51 | /**
52 | * 生命周期函数--监听页面初次渲染完成
53 | */
54 | onReady: function () {
55 | wx.hideToast();
56 | },
57 |
58 | /**
59 | * 生命周期函数--监听页面显示
60 | */
61 | onShow: function () {
62 | wx.showToast({
63 | title: '加载中...',
64 | icon: 'loading',
65 | });
66 | var that = this;
67 | var proId = that.data.proId;
68 | wx.request({
69 | url: app.d.ceshiUrl + '/Api/Product/index',
70 | method: 'post',
71 | data: {
72 | pro_id: proId,
73 | },
74 | header: {
75 | 'Content-Type': 'application/x-www-form-urlencoded'
76 | },
77 | success: function (res) {
78 | var status = res.data.status;
79 | if (status == 1) {
80 | var pro = res.data.pro;
81 | console.log(pro);
82 | that.setData({
83 | info: pro,
84 | imgUrls: pro.img_arr,
85 | });
86 | } else {
87 | wx.showToast({
88 | title: res.data.err,
89 | duration: 2000,
90 | });
91 | }
92 | },
93 | error: function (e) {
94 | wx.showToast({
95 | title: '网络异常!',
96 | duration: 2000,
97 | });
98 | },
99 | });
100 | },
101 |
102 | //预订座位
103 | ydzw: function() {
104 | wx.navigateTo({
105 | url: '../dinner/dinner',
106 | })
107 | },
108 |
109 | addShopCart: function (e) { //添加到购物车
110 | var that = this;
111 | var ptype = e.currentTarget.dataset.type;
112 | wx.request({
113 | url: app.d.ceshiUrl + '/Api/Shopping/add',
114 | method: 'post',
115 | data: {
116 | uid: app.d.userId,
117 | pid: that.data.proId,
118 | num: that.data.buynum,
119 | ptype: ptype
120 | },
121 | header: {
122 | 'Content-Type': 'application/x-www-form-urlencoded'
123 | },
124 | success: function (res) {
125 | // //--init data
126 | var data = res.data;
127 | if (data.status == 1) {
128 | if (ptype == 'buynow') {
129 | wx.redirectTo({
130 | url: '../order/pay?cartId=' + data.cart_id
131 | });
132 | return;
133 | } else {
134 | wx.showModal({
135 | title: '提示',
136 | content: '加入成功,点击确定进入购物车结算!',
137 | cancelText: '再看看',
138 | cancelColor: "#D0D0D0",
139 | success: function (res) {
140 | if (res.confirm) {
141 | wx.navigateTo({
142 | url: '../ordering/ordering?cartId=' + data.cart_id,
143 | })
144 | }
145 | }
146 | })
147 | }
148 | } else {
149 | wx.showToast({
150 | title: data.err,
151 | duration: 2000
152 | });
153 | }
154 | },
155 | fail: function () {
156 | // fail
157 | wx.showToast({
158 | title: '网络异常!',
159 | duration: 2000
160 | });
161 | }
162 | });
163 | },
164 |
165 | /**
166 | * 用户点击右上角分享
167 | */
168 | onShareAppMessage: function () {
169 | var title = this.data.info.name;
170 | var proId = this.data.info.id;
171 | return {
172 | title: title,
173 | path: '/pages/product/product?proId=' + proId,
174 | success: function (res) {
175 | // 分享成功
176 | },
177 | fail: function (res) {
178 | // 分享失败
179 | }
180 | }
181 | }
182 | })
--------------------------------------------------------------------------------
/wxParse/wxParse.js:
--------------------------------------------------------------------------------
1 | /**
2 | * author: Di (微信小程序开发工程师)
3 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
4 | * 垂直微信小程序开发交流社区
5 | *
6 | * github地址: https://github.com/icindy/wxParse
7 | *
8 | * for: 微信小程序富文本解析
9 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
10 | */
11 |
12 | /**
13 | * utils函数引入
14 | **/
15 | import showdown from './showdown.js';
16 | import HtmlToJson from './html2json.js';
17 | /**
18 | * 配置及公有属性
19 | **/
20 | /**
21 | * 主函数入口区
22 | **/
23 | function wxParse(bindName = 'wxParseData', type='html', data='
数据不能为空
', target,imagePadding) {
24 | var that = target;
25 | var transData = {};//存放转化后的数据
26 | if (type == 'html') {
27 | transData = HtmlToJson.html2json(data, bindName);
28 | //console.log(JSON.stringify(transData, ' ', ' '));
29 | } else if (type == 'md' || type == 'markdown') {
30 | var converter = new showdown.Converter();
31 | var html = converter.makeHtml(data);
32 | transData = HtmlToJson.html2json(html, bindName);
33 | //console.log(JSON.stringify(transData, ' ', ' '));
34 | }
35 | transData.view = {};
36 | transData.view.imagePadding = 0;
37 | if(typeof(imagePadding) != 'undefined'){
38 | transData.view.imagePadding = imagePadding
39 | }
40 | var bindData = {};
41 | bindData[bindName] = transData;
42 | that.setData(bindData)
43 | that.wxParseImgLoad = wxParseImgLoad;
44 | that.wxParseImgTap = wxParseImgTap;
45 | }
46 | // 图片点击事件
47 | function wxParseImgTap(e) {
48 | var that = this;
49 | var nowImgUrl = e.target.dataset.src;
50 | var tagFrom = e.target.dataset.from;
51 | if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) {
52 | wx.previewImage({
53 | current: nowImgUrl, // 当前显示图片的http链接
54 | urls: that.data[tagFrom].imageUrls // 需要预览的图片http链接列表
55 | })
56 | }
57 | }
58 |
59 | /**
60 | * 图片视觉宽高计算函数区
61 | **/
62 | function wxParseImgLoad(e) {
63 | var that = this;
64 | var tagFrom = e.target.dataset.from;
65 | var idx = e.target.dataset.idx;
66 | if (typeof (tagFrom) != 'undefined' && tagFrom.length > 0) {
67 | calMoreImageInfo(e, idx, that, tagFrom)
68 | }
69 | }
70 | // 假循环获取计算图片视觉最佳宽高
71 | function calMoreImageInfo(e, idx, that, bindName) {
72 | var temData = that.data[bindName];
73 | if (temData.images.length == 0) {
74 | return;
75 | }
76 | var temImages = temData.images;
77 | //因为无法获取view宽度 需要自定义padding进行计算,稍后处理
78 | var recal = wxAutoImageCal(e.detail.width, e.detail.height,that,bindName);
79 | temImages[idx].width = recal.imageWidth;
80 | temImages[idx].height = recal.imageheight;
81 | temData.images = temImages;
82 | var bindData = {};
83 | bindData[bindName] = temData;
84 | that.setData(bindData);
85 | }
86 |
87 | // 计算视觉优先的图片宽高
88 | function wxAutoImageCal(originalWidth, originalHeight,that,bindName) {
89 | //获取图片的原始长宽
90 | var windowWidth = 0, windowHeight = 0;
91 | var autoWidth = 0, autoHeight = 0;
92 | var results = {};
93 | wx.getSystemInfo({
94 | success: function (res) {
95 | var padding = that.data[bindName].view.imagePadding;
96 | windowWidth = res.windowWidth-2*padding;
97 | windowHeight = res.windowHeight;
98 | //判断按照那种方式进行缩放
99 | console.log("windowWidth" + windowWidth);
100 | if (originalWidth > windowWidth) {//在图片width大于手机屏幕width时候
101 | autoWidth = windowWidth;
102 | console.log("autoWidth" + autoWidth);
103 | autoHeight = (autoWidth * originalHeight) / originalWidth;
104 | console.log("autoHeight" + autoHeight);
105 | results.imageWidth = autoWidth;
106 | results.imageheight = autoHeight;
107 | } else {//否则展示原来的数据
108 | results.imageWidth = originalWidth;
109 | results.imageheight = originalHeight;
110 | }
111 | }
112 | })
113 | return results;
114 | }
115 |
116 | function wxParseTemArray(temArrayName,bindNameReg,total,that){
117 | var array = [];
118 | var temData = that.data;
119 | var obj = null;
120 | for(var i = 0; i < total; i++){
121 | var simArr = temData[bindNameReg+i].nodes;
122 | array.push(simArr);
123 | }
124 |
125 | temArrayName = temArrayName || 'wxParseTemArray';
126 | obj = JSON.parse('{"'+ temArrayName +'":""}');
127 | obj[temArrayName] = array;
128 | that.setData(obj);
129 | }
130 |
131 | /**
132 | * 配置emojis
133 | *
134 | */
135 |
136 | function emojisInit(reg='',baseSrc="/wxParse/emojis/",emojis){
137 | HtmlToJson.emojisInit(reg,baseSrc,emojis);
138 | }
139 |
140 | module.exports = {
141 | wxParse: wxParse,
142 | wxParseTemArray:wxParseTemArray,
143 | emojisInit:emojisInit
144 | }
145 |
146 |
147 |
--------------------------------------------------------------------------------
/pages/address/user-address/user-address.js:
--------------------------------------------------------------------------------
1 | // pages/address/user-address/user-address.js
2 | var app = getApp()
3 | Page({
4 | data: {
5 | address: [],
6 | radioindex: '',
7 | pro_id:0,
8 | num:0,
9 | cartId:0
10 | },
11 | onLoad: function (options) {
12 | var that = this;
13 | // 页面初始化 options为页面跳转所带来的参数
14 | var cartId = options.cartId;
15 | wx.request({
16 | url: app.d.ceshiUrl + '/Api/Address/index',
17 | data: {
18 | user_id:app.d.userId,
19 | },
20 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
21 | header: {// 设置请求的 header
22 | 'Content-Type': 'application/x-www-form-urlencoded'
23 | },
24 |
25 | success: function (res) {
26 | // success
27 | var address = res.data.adds;
28 | if (address == '') {
29 | var address = []
30 | }
31 | that.setData({
32 | address: address,
33 | cartId: cartId,
34 | })
35 | },
36 | fail: function () {
37 | // fail
38 | wx.showToast({
39 | title: '网络异常!',
40 | duration: 2000
41 | });
42 | }
43 | })
44 |
45 | },
46 |
47 | onReady: function () {
48 | // 页面渲染完成
49 | },
50 | setDefault: function(e) {
51 | var that = this;
52 | var addrId = e.currentTarget.dataset.id;
53 | wx.request({
54 | url: app.d.ceshiUrl + '/Api/Address/set_default',
55 | data: {
56 | uid:app.d.userId,
57 | addr_id:addrId
58 | },
59 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
60 | header: {// 设置请求的 header
61 | 'Content-Type': 'application/x-www-form-urlencoded'
62 | },
63 |
64 | success: function (res) {
65 | // success
66 | var status = res.data.status;
67 | var cartId = that.data.cartId;
68 | if(status==1){
69 | if (cartId) {
70 | wx.redirectTo({
71 | url: '../../payorder/payorder?cartId=' + cartId,
72 | });
73 | return false;
74 | }
75 |
76 | wx.showToast({
77 | title: '操作成功!',
78 | duration: 2000
79 | });
80 |
81 | that.DataonLoad();
82 | }else{
83 | wx.showToast({
84 | title: res.data.err,
85 | duration: 2000
86 | });
87 | }
88 | },
89 | fail: function () {
90 | // fail
91 | wx.showToast({
92 | title: '网络异常!',
93 | duration: 2000
94 | });
95 | }
96 | })
97 | },
98 | delAddress: function (e) {
99 | var that = this;
100 | var addrId = e.currentTarget.dataset.id;
101 | wx.showModal({
102 | title: '提示',
103 | content: '你确认移除吗',
104 | success: function(res) {
105 | res.confirm && wx.request({
106 | url: app.d.ceshiUrl + '/Api/Address/del_adds',
107 | data: {
108 | user_id:app.d.userId,
109 | id_arr:addrId
110 | },
111 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
112 | header: {// 设置请求的 header
113 | 'Content-Type': 'application/x-www-form-urlencoded'
114 | },
115 |
116 | success: function (res) {
117 | // success
118 | var status = res.data.status;
119 | if(status==1){
120 | that.DataonLoad();
121 | }else{
122 | wx.showToast({
123 | title: res.data.err,
124 | duration: 2000
125 | });
126 | }
127 | },
128 | fail: function () {
129 | // fail
130 | wx.showToast({
131 | title: '网络异常!',
132 | duration: 2000
133 | });
134 | }
135 | });
136 | }
137 | });
138 |
139 | },
140 | DataonLoad: function () {
141 | var that = this;
142 | // 页面初始化 options为页面跳转所带来的参数
143 | wx.request({
144 | url: app.d.ceshiUrl + '/Api/Address/index',
145 | data: {
146 | user_id:app.d.userId,
147 | },
148 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
149 | header: {// 设置请求的 header
150 | 'Content-Type': 'application/x-www-form-urlencoded'
151 | },
152 |
153 | success: function (res) {
154 | // success
155 | var address = res.data.adds;
156 | if (address == '') {
157 | var address = []
158 | }
159 | that.setData({
160 | address: address,
161 | })
162 | },
163 | fail: function () {
164 | // fail
165 | wx.showToast({
166 | title: '网络异常!',
167 | duration: 2000
168 | });
169 | }
170 | })
171 |
172 | },
173 | })
--------------------------------------------------------------------------------
/wxParse/wxParse.wxss:
--------------------------------------------------------------------------------
1 |
2 | /**
3 | * author: Di (微信小程序开发工程师)
4 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
5 | * 垂直微信小程序开发交流社区
6 | *
7 | * github地址: https://github.com/icindy/wxParse
8 | *
9 | * for: 微信小程序富文本解析
10 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
11 | */
12 |
13 | .wxParse{
14 | margin: 0 5px;
15 | font-family: Helvetica,sans-serif;
16 | font-size: 28rpx;
17 | color: #666;
18 | line-height: 1.8;
19 | }
20 | view{
21 | word-break:break-all; overflow:auto;
22 | }
23 | .wxParse-inline{
24 | display: inline;
25 | margin: 0;
26 | padding: 0;
27 | }
28 | /*//标题 */
29 | .wxParse-div{margin: 0;padding: 0;}
30 | .wxParse-h1{ font-size:2em; margin: .67em 0 }
31 | .wxParse-h2{ font-size:1.5em; margin: .75em 0 }
32 | .wxParse-h3{ font-size:1.17em; margin: .83em 0 }
33 | .wxParse-h4{ margin: 1.12em 0}
34 | .wxParse-h5 { font-size:.83em; margin: 1.5em 0 }
35 | .wxParse-h6{ font-size:.75em; margin: 1.67em 0 }
36 |
37 | .wxParse-h1 {
38 | font-size: 18px;
39 | font-weight: 400;
40 | margin-bottom: .9em;
41 | }
42 | .wxParse-h2 {
43 | font-size: 16px;
44 | font-weight: 400;
45 | margin-bottom: .34em;
46 | }
47 | .wxParse-h3 {
48 | font-weight: 400;
49 | font-size: 15px;
50 | margin-bottom: .34em;
51 | }
52 | .wxParse-h4 {
53 | font-weight: 400;
54 | font-size: 14px;
55 | margin-bottom: .24em;
56 | }
57 | .wxParse-h5 {
58 | font-weight: 400;
59 | font-size: 13px;
60 | margin-bottom: .14em;
61 | }
62 | .wxParse-h6 {
63 | font-weight: 400;
64 | font-size: 12px;
65 | margin-bottom: .04em;
66 | }
67 |
68 | .wxParse-h1, .wxParse-h2, .wxParse-h3, .wxParse-h4, .wxParse-h5, .wxParse-h6, .wxParse-b, .wxParse-strong { font-weight: bolder }
69 |
70 | .wxParse-i,.wxParse-cite,.wxParse-em,.wxParse-var,.wxParse-address{font-style:italic}
71 | .wxParse-pre,.wxParse-tt,.wxParse-code,.wxParse-kbd,.wxParse-samp{font-family:monospace}
72 | .wxParse-pre{white-space:pre}
73 | .wxParse-big{font-size:1.17em}
74 | .wxParse-small,.wxParse-sub,.wxParse-sup{font-size:.83em}
75 | .wxParse-sub{vertical-align:sub}
76 | .wxParse-sup{vertical-align:super}
77 | .wxParse-s,.wxParse-strike,.wxParse-del{text-decoration:line-through}
78 | /*wxparse-自定义个性化的css样式*/
79 | /*增加video的css样式*/
80 | .wxParse-strong,.wxParse-s{display: inline}
81 | .wxParse-a{
82 | color: deepskyblue;
83 | word-break:break-all;
84 | overflow:auto;
85 | }
86 |
87 | .wxParse-video{
88 | text-align: center;
89 | margin: 10px 0;
90 | }
91 |
92 | .wxParse-video-video{
93 | width:100%;
94 | }
95 |
96 | .wxParse-img{
97 | background-color: #efefef;
98 | overflow: hidden;
99 | }
100 |
101 | .wxParse-blockquote {
102 | margin: 0;
103 | padding:10px 0 10px 5px;
104 | font-family:Courier, Calibri,"宋体";
105 | background:#f5f5f5;
106 | border-left: 3px solid #dbdbdb;
107 | }
108 |
109 | .wxParse-code,.wxParse-wxxxcode-style{
110 | display: inline;
111 | background:#f5f5f5;
112 | }
113 | .wxParse-ul{
114 | margin: 20rpx 10rpx;
115 | }
116 |
117 | .wxParse-li,.wxParse-li-inner{
118 | display: flex;
119 | align-items: baseline;
120 | margin: 10rpx 0;
121 | }
122 | .wxParse-li-text{
123 |
124 | align-items: center;
125 | line-height: 20px;
126 | }
127 |
128 | .wxParse-li-circle{
129 | display: inline-flex;
130 | width: 5px;
131 | height: 5px;
132 | background-color: #333;
133 | margin-right: 5px;
134 | }
135 |
136 | .wxParse-li-square{
137 | display: inline-flex;
138 | width: 10rpx;
139 | height: 10rpx;
140 | background-color: #333;
141 | margin-right: 5px;
142 | }
143 | .wxParse-li-ring{
144 | display: inline-flex;
145 | width: 10rpx;
146 | height: 10rpx;
147 | border: 2rpx solid #333;
148 | border-radius: 50%;
149 | background-color: #fff;
150 | margin-right: 5px;
151 | }
152 |
153 | /*.wxParse-table{
154 | width: 100%;
155 | height: 400px;
156 | }
157 | .wxParse-thead,.wxParse-tfoot,.wxParse-tr{
158 | display: flex;
159 | flex-direction: row;
160 | }
161 | .wxParse-th,.wxParse-td{
162 | display: flex;
163 | width: 580px;
164 | overflow: auto;
165 | }*/
166 |
167 | .wxParse-u {
168 | text-decoration: underline;
169 | }
170 | .wxParse-hide{
171 | display: none;
172 | }
173 | .WxEmojiView{
174 | align-items: center;
175 | }
176 | .wxEmoji{
177 | width: 16px;
178 | height:16px;
179 | }
180 | .wxParse-tr{
181 | display: flex;
182 | border-right:1px solid #e0e0e0;
183 | border-bottom:1px solid #e0e0e0;
184 | border-top:1px solid #e0e0e0;
185 | }
186 | .wxParse-th,
187 | .wxParse-td{
188 | flex:1;
189 | padding:5px;
190 | font-size:28rpx;
191 | border-left:1px solid #e0e0e0;
192 | word-break: break-all;
193 | }
194 | .wxParse-td:last{
195 | border-top:1px solid #e0e0e0;
196 | }
197 | .wxParse-th{
198 | background:#f0f0f0;
199 | border-top:1px solid #e0e0e0;
200 | }
201 |
202 |
--------------------------------------------------------------------------------
/wxParse/htmlparser.js:
--------------------------------------------------------------------------------
1 | /**
2 | *
3 | * htmlParser改造自: https://github.com/blowsie/Pure-JavaScript-HTML5-Parser
4 | *
5 | * author: Di (微信小程序开发工程师)
6 | * organization: WeAppDev(微信小程序开发论坛)(http://weappdev.com)
7 | * 垂直微信小程序开发交流社区
8 | *
9 | * github地址: https://github.com/icindy/wxParse
10 | *
11 | * for: 微信小程序富文本解析
12 | * detail : http://weappdev.com/t/wxparse-alpha0-1-html-markdown/184
13 | */
14 | // Regular Expressions for parsing tags and attributes
15 | var startTag = /^<([-A-Za-z0-9_]+)((?:\s+[a-zA-Z_:][-a-zA-Z0-9_:.]*(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)>/,
16 | endTag = /^<\/([-A-Za-z0-9_]+)[^>]*>/,
17 | attr = /([a-zA-Z_:][-a-zA-Z0-9_:.]*)(?:\s*=\s*(?:(?:"((?:\\.|[^"])*)")|(?:'((?:\\.|[^'])*)')|([^>\s]+)))?/g;
18 |
19 | // Empty Elements - HTML 5
20 | var empty = makeMap("area,base,basefont,br,col,frame,hr,img,input,link,meta,param,embed,command,keygen,source,track,wbr");
21 |
22 | // Block Elements - HTML 5
23 | var block = makeMap("a,address,code,article,applet,aside,audio,blockquote,button,canvas,center,dd,del,dir,div,dl,dt,fieldset,figcaption,figure,footer,form,frameset,h1,h2,h3,h4,h5,h6,header,hgroup,hr,iframe,ins,isindex,li,map,menu,noframes,noscript,object,ol,output,p,pre,section,script,table,tbody,td,tfoot,th,thead,tr,ul,video");
24 |
25 | // Inline Elements - HTML 5
26 | var inline = makeMap("abbr,acronym,applet,b,basefont,bdo,big,br,button,cite,del,dfn,em,font,i,iframe,img,input,ins,kbd,label,map,object,q,s,samp,script,select,small,span,strike,strong,sub,sup,textarea,tt,u,var");
27 |
28 | // Elements that you can, intentionally, leave open
29 | // (and which close themselves)
30 | var closeSelf = makeMap("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr");
31 |
32 | // Attributes that have their values filled in disabled="disabled"
33 | var fillAttrs = makeMap("checked,compact,declare,defer,disabled,ismap,multiple,nohref,noresize,noshade,nowrap,readonly,selected");
34 |
35 | // Special Elements (can contain anything)
36 | var special = makeMap("wxxxcode-style,script,style,view,scroll-view,block");
37 |
38 | function HTMLParser(html, handler) {
39 | var index, chars, match, stack = [], last = html;
40 | stack.last = function () {
41 | return this[this.length - 1];
42 | };
43 |
44 | while (html) {
45 | chars = true;
46 |
47 | // Make sure we're not in a script or style element
48 | if (!stack.last() || !special[stack.last()]) {
49 |
50 | // Comment
51 | if (html.indexOf("");
53 |
54 | if (index >= 0) {
55 | if (handler.comment)
56 | handler.comment(html.substring(4, index));
57 | html = html.substring(index + 3);
58 | chars = false;
59 | }
60 |
61 | // end tag
62 | } else if (html.indexOf("") == 0) {
63 | match = html.match(endTag);
64 |
65 | if (match) {
66 | html = html.substring(match[0].length);
67 | match[0].replace(endTag, parseEndTag);
68 | chars = false;
69 | }
70 |
71 | // start tag
72 | } else if (html.indexOf("<") == 0) {
73 | match = html.match(startTag);
74 |
75 | if (match) {
76 | html = html.substring(match[0].length);
77 | match[0].replace(startTag, parseStartTag);
78 | chars = false;
79 | }
80 | }
81 |
82 | if (chars) {
83 | index = html.indexOf("<");
84 | var text = ''
85 | while (index === 0) {
86 | text += "<";
87 | html = html.substring(1);
88 | index = html.indexOf("<");
89 | }
90 | text += index < 0 ? html : html.substring(0, index);
91 | html = index < 0 ? "" : html.substring(index);
92 |
93 | if (handler.chars)
94 | handler.chars(text);
95 | }
96 |
97 | } else {
98 |
99 | html = html.replace(new RegExp("([\\s\\S]*?)<\/" + stack.last() + "[^>]*>"), function (all, text) {
100 | text = text.replace(/|/g, "$1$2");
101 | if (handler.chars)
102 | handler.chars(text);
103 |
104 | return "";
105 | });
106 |
107 |
108 | parseEndTag("", stack.last());
109 | }
110 |
111 | if (html == last)
112 | throw "Parse Error: " + html;
113 | last = html;
114 | }
115 |
116 | // Clean up any remaining tags
117 | parseEndTag();
118 |
119 | function parseStartTag(tag, tagName, rest, unary) {
120 | tagName = tagName.toLowerCase();
121 |
122 | if (block[tagName]) {
123 | while (stack.last() && inline[stack.last()]) {
124 | parseEndTag("", stack.last());
125 | }
126 | }
127 |
128 | if (closeSelf[tagName] && stack.last() == tagName) {
129 | parseEndTag("", tagName);
130 | }
131 |
132 | unary = empty[tagName] || !!unary;
133 |
134 | if (!unary)
135 | stack.push(tagName);
136 |
137 | if (handler.start) {
138 | var attrs = [];
139 |
140 | rest.replace(attr, function (match, name) {
141 | var value = arguments[2] ? arguments[2] :
142 | arguments[3] ? arguments[3] :
143 | arguments[4] ? arguments[4] :
144 | fillAttrs[name] ? name : "";
145 |
146 | attrs.push({
147 | name: name,
148 | value: value,
149 | escaped: value.replace(/(^|[^\\])"/g, '$1\\\"') //"
150 | });
151 | });
152 |
153 | if (handler.start) {
154 | handler.start(tagName, attrs, unary);
155 | }
156 |
157 | }
158 | }
159 |
160 | function parseEndTag(tag, tagName) {
161 | // If no tag name is provided, clean shop
162 | if (!tagName)
163 | var pos = 0;
164 |
165 | // Find the closest opened tag of the same type
166 | else {
167 | tagName = tagName.toLowerCase();
168 | for (var pos = stack.length - 1; pos >= 0; pos--)
169 | if (stack[pos] == tagName)
170 | break;
171 | }
172 | if (pos >= 0) {
173 | // Close all the open elements, up the stack
174 | for (var i = stack.length - 1; i >= pos; i--)
175 | if (handler.end)
176 | handler.end(stack[i]);
177 |
178 | // Remove the open elements from the stack
179 | stack.length = pos;
180 | }
181 | }
182 | };
183 |
184 |
185 | function makeMap(str) {
186 | var obj = {}, items = str.split(",");
187 | for (var i = 0; i < items.length; i++)
188 | obj[items[i]] = true;
189 | return obj;
190 | }
191 |
192 | module.exports = HTMLParser;
193 |
--------------------------------------------------------------------------------
/pages/address/address.js:
--------------------------------------------------------------------------------
1 | //城市选择
2 | var app = getApp();
3 | Page({
4 | data: {
5 | shengArr: [],//省级数组
6 | shengId: [],//省级id数组
7 | shiArr: [],//城市数组
8 | shiId: [],//城市id数组
9 | quArr: [],//区数组
10 | shengIndex: 0,
11 | shiIndex: 0,
12 | quIndex: 0,
13 | mid: 0,
14 | sheng:0,
15 | city:0,
16 | area:0,
17 | code:0,
18 | cartId:0
19 | },
20 | formSubmit: function (e) {
21 | var adds = e.detail.value;
22 | var cartId = this.data.cartId;
23 | wx.request({
24 | url: app.d.ceshiUrl + '/Api/Address/add_adds',
25 | data: {
26 | user_id:app.d.userId,
27 | receiver: adds.name,
28 | tel: adds.phone,
29 | sheng: this.data.sheng,
30 | city: this.data.city,
31 | quyu: this.data.area,
32 | adds: adds.address,
33 | code: this.data.code,
34 | },
35 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
36 | header: {// 设置请求的 header
37 | 'Content-Type': 'application/x-www-form-urlencoded'
38 | },
39 | success: function (res) {
40 | // success
41 | var status = res.data.status;
42 | if(status==1){
43 | wx.showToast({
44 | title: '保存成功!',
45 | duration: 2000
46 | });
47 | }else{
48 | wx.showToast({
49 | title: res.data.err,
50 | duration: 2000
51 | });
52 | }
53 | wx.redirectTo({
54 | url: 'user-address/user-address?cartId=' + cartId
55 | });
56 | },
57 | fail: function () {
58 | // fail
59 | wx.showToast({
60 | title: '网络异常!',
61 | duration: 2000
62 | });
63 | }
64 | })
65 |
66 |
67 | },
68 | onLoad: function (options) {
69 | // 生命周期函数--监听页面加载
70 | var that = this;
71 | that.setData({
72 | cartId: options.cartId
73 | })
74 | //获取省级城市
75 | wx.request({
76 | url: app.d.ceshiUrl + '/Api/Address/get_province',
77 | data: {},
78 | method: 'POST',
79 | success: function (res) {
80 | var status = res.data.status;
81 | var province = res.data.list;
82 | var sArr = [];
83 | var sId = [];
84 | sArr.push('请选择');
85 | sId.push('0');
86 | for (var i = 0; i < province.length; i++) {
87 | sArr.push(province[i].name);
88 | sId.push(province[i].id);
89 | }
90 | that.setData({
91 | shengArr: sArr,
92 | shengId: sId
93 | })
94 | },
95 | fail: function () {
96 | // fail
97 | wx.showToast({
98 | title: '网络异常!',
99 | duration: 2000
100 | });
101 | },
102 | })
103 |
104 | },
105 |
106 | bindPickerChangeshengArr: function (e) {
107 | this.setData({
108 | shengIndex: e.detail.value,
109 | shiArr: [],
110 | shiId: [],
111 | quArr:[],
112 | quiId: []
113 | });
114 | var that = this;
115 | wx.request({
116 | url: app.d.ceshiUrl + '/Api/Address/get_city',
117 | data: {sheng:e.detail.value},
118 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
119 | header: {// 设置请求的 header
120 | 'Content-Type': 'application/x-www-form-urlencoded'
121 | },
122 | success: function (res) {
123 | // success
124 | var status = res.data.status;
125 | var city = res.data.city_list;
126 |
127 | var hArr = [];
128 | var hId = [];
129 | hArr.push('请选择');
130 | hId.push('0');
131 | for (var i = 0; i < city.length; i++) {
132 | hArr.push(city[i].name);
133 | hId.push(city[i].id);
134 | }
135 | that.setData({
136 | sheng:res.data.sheng,
137 | shiArr: hArr,
138 | shiId: hId
139 | })
140 | },
141 | fail: function () {
142 | // fail
143 | wx.showToast({
144 | title: '网络异常!',
145 | duration: 2000
146 | });
147 | },
148 |
149 | })
150 | },
151 | bindPickerChangeshiArr: function (e) {
152 | this.setData({
153 | shiIndex: e.detail.value,
154 | quArr:[],
155 | quiId: []
156 | })
157 | var that = this;
158 | wx.request({
159 | url: app.d.ceshiUrl + '/Api/Address/get_area',
160 | data: {
161 | city:e.detail.value,
162 | sheng:this.data.sheng
163 | },
164 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
165 | header: {// 设置请求的 header
166 | 'Content-Type': 'application/x-www-form-urlencoded'
167 | },
168 | success: function (res) {
169 | var status = res.data.status;
170 | var area = res.data.area_list;
171 |
172 | var qArr = [];
173 | var qId = [];
174 | qArr.push('请选择');
175 | qId.push('0');
176 | for (var i = 0; i < area.length; i++) {
177 | qArr.push(area[i].name)
178 | qId.push(area[i].id)
179 | }
180 | that.setData({
181 | city:res.data.city,
182 | quArr: qArr,
183 | quiId: qId
184 | })
185 | },
186 | fail: function () {
187 | // fail
188 | wx.showToast({
189 | title: '网络异常!',
190 | duration: 2000
191 | });
192 | }
193 | })
194 | },
195 | bindPickerChangequArr: function (e) {
196 | console.log(this.data.city)
197 | this.setData({
198 | quIndex: e.detail.value
199 | });
200 | var that = this;
201 | wx.request({
202 | url: app.d.ceshiUrl + '/Api/Address/get_code',
203 | data: {
204 | quyu:e.detail.value,
205 | city:this.data.city
206 | },
207 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
208 | header: {// 设置请求的 header
209 | 'Content-Type': 'application/x-www-form-urlencoded'
210 | },
211 | success: function (res) {
212 | that.setData({
213 | area:res.data.area,
214 | code:res.data.code
215 | })
216 | },
217 | fail: function () {
218 | // fail
219 | wx.showToast({
220 | title: '网络异常!',
221 | duration: 2000
222 | });
223 | }
224 | })
225 | }
226 |
227 | })
--------------------------------------------------------------------------------
/wxParse/wxDiscode.js:
--------------------------------------------------------------------------------
1 | // HTML 支持的数学符号
2 | function strNumDiscode(str){
3 | str = str.replace(/∀/g, '∀');
4 | str = str.replace(/∂/g, '∂');
5 | str = str.replace(/&exists;/g, '∃');
6 | str = str.replace(/∅/g, '∅');
7 | str = str.replace(/∇/g, '∇');
8 | str = str.replace(/∈/g, '∈');
9 | str = str.replace(/∉/g, '∉');
10 | str = str.replace(/∋/g, '∋');
11 | str = str.replace(/∏/g, '∏');
12 | str = str.replace(/∑/g, '∑');
13 | str = str.replace(/−/g, '−');
14 | str = str.replace(/∗/g, '∗');
15 | str = str.replace(/√/g, '√');
16 | str = str.replace(/∝/g, '∝');
17 | str = str.replace(/∞/g, '∞');
18 | str = str.replace(/∠/g, '∠');
19 | str = str.replace(/∧/g, '∧');
20 | str = str.replace(/∨/g, '∨');
21 | str = str.replace(/∩/g, '∩');
22 | str = str.replace(/∩/g, '∪');
23 | str = str.replace(/∫/g, '∫');
24 | str = str.replace(/∴/g, '∴');
25 | str = str.replace(/∼/g, '∼');
26 | str = str.replace(/≅/g, '≅');
27 | str = str.replace(/≈/g, '≈');
28 | str = str.replace(/≠/g, '≠');
29 | str = str.replace(/≤/g, '≤');
30 | str = str.replace(/≥/g, '≥');
31 | str = str.replace(/⊂/g, '⊂');
32 | str = str.replace(/⊃/g, '⊃');
33 | str = str.replace(/⊄/g, '⊄');
34 | str = str.replace(/⊆/g, '⊆');
35 | str = str.replace(/⊇/g, '⊇');
36 | str = str.replace(/⊕/g, '⊕');
37 | str = str.replace(/⊗/g, '⊗');
38 | str = str.replace(/⊥/g, '⊥');
39 | str = str.replace(/⋅/g, '⋅');
40 | return str;
41 | }
42 |
43 | //HTML 支持的希腊字母
44 | function strGreeceDiscode(str){
45 | str = str.replace(/Α/g, 'Α');
46 | str = str.replace(/Β/g, 'Β');
47 | str = str.replace(/Γ/g, 'Γ');
48 | str = str.replace(/Δ/g, 'Δ');
49 | str = str.replace(/Ε/g, 'Ε');
50 | str = str.replace(/Ζ/g, 'Ζ');
51 | str = str.replace(/Η/g, 'Η');
52 | str = str.replace(/Θ/g, 'Θ');
53 | str = str.replace(/Ι/g, 'Ι');
54 | str = str.replace(/Κ/g, 'Κ');
55 | str = str.replace(/Λ/g, 'Λ');
56 | str = str.replace(/Μ/g, 'Μ');
57 | str = str.replace(/Ν/g, 'Ν');
58 | str = str.replace(/Ξ/g, 'Ν');
59 | str = str.replace(/Ο/g, 'Ο');
60 | str = str.replace(/Π/g, 'Π');
61 | str = str.replace(/Ρ/g, 'Ρ');
62 | str = str.replace(/Σ/g, 'Σ');
63 | str = str.replace(/Τ/g, 'Τ');
64 | str = str.replace(/Υ/g, 'Υ');
65 | str = str.replace(/Φ/g, 'Φ');
66 | str = str.replace(/Χ/g, 'Χ');
67 | str = str.replace(/Ψ/g, 'Ψ');
68 | str = str.replace(/Ω/g, 'Ω');
69 |
70 | str = str.replace(/α/g, 'α');
71 | str = str.replace(/β/g, 'β');
72 | str = str.replace(/γ/g, 'γ');
73 | str = str.replace(/δ/g, 'δ');
74 | str = str.replace(/ε/g, 'ε');
75 | str = str.replace(/ζ/g, 'ζ');
76 | str = str.replace(/η/g, 'η');
77 | str = str.replace(/θ/g, 'θ');
78 | str = str.replace(/ι/g, 'ι');
79 | str = str.replace(/κ/g, 'κ');
80 | str = str.replace(/λ/g, 'λ');
81 | str = str.replace(/μ/g, 'μ');
82 | str = str.replace(/ν/g, 'ν');
83 | str = str.replace(/ξ/g, 'ξ');
84 | str = str.replace(/ο/g, 'ο');
85 | str = str.replace(/π/g, 'π');
86 | str = str.replace(/ρ/g, 'ρ');
87 | str = str.replace(/ς/g, 'ς');
88 | str = str.replace(/σ/g, 'σ');
89 | str = str.replace(/τ/g, 'τ');
90 | str = str.replace(/υ/g, 'υ');
91 | str = str.replace(/φ/g, 'φ');
92 | str = str.replace(/χ/g, 'χ');
93 | str = str.replace(/ψ/g, 'ψ');
94 | str = str.replace(/ω/g, 'ω');
95 | str = str.replace(/ϑ/g, 'ϑ');
96 | str = str.replace(/ϒ/g, 'ϒ');
97 | str = str.replace(/ϖ/g, 'ϖ');
98 | str = str.replace(/·/g, '·');
99 | return str;
100 | }
101 |
102 | //
103 |
104 | function strcharacterDiscode(str){
105 | // 加入常用解析
106 | str = str.replace(/ /g, ' ');
107 | str = str.replace(/"/g, "'");
108 | str = str.replace(/&/g, '&');
109 | // str = str.replace(/</g, '‹');
110 | // str = str.replace(/>/g, '›');
111 |
112 | str = str.replace(/</g, '<');
113 | str = str.replace(/>/g, '>');
114 |
115 | return str;
116 | }
117 |
118 | // HTML 支持的其他实体
119 | function strOtherDiscode(str){
120 | str = str.replace(/Œ/g, 'Œ');
121 | str = str.replace(/œ/g, 'œ');
122 | str = str.replace(/Š/g, 'Š');
123 | str = str.replace(/š/g, 'š');
124 | str = str.replace(/Ÿ/g, 'Ÿ');
125 | str = str.replace(/ƒ/g, 'ƒ');
126 | str = str.replace(/ˆ/g, 'ˆ');
127 | str = str.replace(/˜/g, '˜');
128 | str = str.replace(/ /g, '');
129 | str = str.replace(/ /g, '');
130 | str = str.replace(/ /g, '');
131 | str = str.replace(//g, '');
132 | str = str.replace(//g, '');
133 | str = str.replace(//g, '');
134 | str = str.replace(//g, '');
135 | str = str.replace(/–/g, '–');
136 | str = str.replace(/—/g, '—');
137 | str = str.replace(/‘/g, '‘');
138 | str = str.replace(/’/g, '’');
139 | str = str.replace(/‚/g, '‚');
140 | str = str.replace(/“/g, '“');
141 | str = str.replace(/”/g, '”');
142 | str = str.replace(/„/g, '„');
143 | str = str.replace(/†/g, '†');
144 | str = str.replace(/‡/g, '‡');
145 | str = str.replace(/•/g, '•');
146 | str = str.replace(/…/g, '…');
147 | str = str.replace(/‰/g, '‰');
148 | str = str.replace(/′/g, '′');
149 | str = str.replace(/″/g, '″');
150 | str = str.replace(/‹/g, '‹');
151 | str = str.replace(/›/g, '›');
152 | str = str.replace(/‾/g, '‾');
153 | str = str.replace(/€/g, '€');
154 | str = str.replace(/™/g, '™');
155 |
156 | str = str.replace(/←/g, '←');
157 | str = str.replace(/↑/g, '↑');
158 | str = str.replace(/→/g, '→');
159 | str = str.replace(/↓/g, '↓');
160 | str = str.replace(/↔/g, '↔');
161 | str = str.replace(/↵/g, '↵');
162 | str = str.replace(/⌈/g, '⌈');
163 | str = str.replace(/⌉/g, '⌉');
164 |
165 | str = str.replace(/⌊/g, '⌊');
166 | str = str.replace(/⌋/g, '⌋');
167 | str = str.replace(/◊/g, '◊');
168 | str = str.replace(/♠/g, '♠');
169 | str = str.replace(/♣/g, '♣');
170 | str = str.replace(/♥/g, '♥');
171 |
172 | str = str.replace(/♦/g, '♦');
173 |
174 | return str;
175 | }
176 |
177 | function strMoreDiscode(str){
178 | str = str.replace(/\r\n/g,"");
179 | str = str.replace(/\n/g,"");
180 |
181 | str = str.replace(/code/g,"wxxxcode-style");
182 | return str;
183 | }
184 |
185 | function strDiscode(str){
186 | str = strNumDiscode(str);
187 | str = strGreeceDiscode(str);
188 | str = strcharacterDiscode(str);
189 | str = strOtherDiscode(str);
190 | str = strMoreDiscode(str);
191 | return str;
192 | }
193 | function urlToHttpUrl(url,rep){
194 |
195 | var patt1 = new RegExp("^//");
196 | var result = patt1.test(url);
197 | if(result){
198 | url = rep+":"+url;
199 | }
200 | return url;
201 | }
202 |
203 | module.exports = {
204 | strDiscode:strDiscode,
205 | urlToHttpUrl:urlToHttpUrl
206 | }
--------------------------------------------------------------------------------
/pages/map/amap-wx.js:
--------------------------------------------------------------------------------
1 | function AMapWX(a){this.key=a.key,this.requestConfig={key:a.key,s:"rsx",platform:"WXJS",appname:a.key,sdkversion:"1.2.0",logversion:"2.0"}}AMapWX.prototype.getWxLocation=function(a,b){wx.getLocation({type:"gcj02",success:function(a){var c=a.longitude+","+a.latitude;wx.setStorage({key:"userLocation",data:c}),b(c)},fail:function(c){wx.getStorage({key:"userLocation",success:function(a){a.data&&b(a.data)}}),a.fail({errCode:"0",errMsg:c.errMsg||""})}})},AMapWX.prototype.getRegeo=function(a){function c(c){var d=b.requestConfig;wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:c,extensions:"all",s:d.s,platform:d.platform,appname:b.key,sdkversion:d.sdkversion,logversion:d.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var d,e,f,g,h,i,j,k;b.data.status&&"1"==b.data.status?(d=b.data.regeocode,e=d.addressComponent,f=[],g=d.roads[0].name+"附近",h=c.split(",")[0],i=c.split(",")[1],d.pois&&d.pois[0]&&(g=d.pois[0].name+"附近",j=d.pois[0].location,j&&(h=parseFloat(j.split(",")[0]),i=parseFloat(j.split(",")[1]))),e.provice&&f.push(e.provice),e.city&&f.push(e.city),e.district&&f.push(e.district),e.streetNumber&&e.streetNumber.street&&e.streetNumber.number?(f.push(e.streetNumber.street),f.push(e.streetNumber.number)):f.push(d.roads[0].name),f=f.join(""),k=[{iconPath:a.iconPath,width:a.iconWidth,height:a.iconHeight,name:f,desc:g,longitude:h,latitude:i,id:0,regeocodeData:d}],a.success(k)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this;a.location?c(a.location):b.getWxLocation(a,function(a){c(a)})},AMapWX.prototype.getWeather=function(a){function d(d){var e="base";a.type&&"forecast"==a.type&&(e="all"),wx.request({url:"https://restapi.amap.com/v3/weather/weatherInfo",data:{key:b.key,city:d,extensions:e,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){function c(a){var b={city:{text:"城市",data:a.city},weather:{text:"天气",data:a.weather},temperature:{text:"温度",data:a.temperature},winddirection:{text:"风向",data:a.winddirection+"风"},windpower:{text:"风力",data:a.windpower+"级"},humidity:{text:"湿度",data:a.humidity+"%"}};return b}var d,e;b.data.status&&"1"==b.data.status?b.data.lives?(d=b.data.lives,d&&d.length>0&&(d=d[0],e=c(d),e["liveData"]=d,a.success(e))):b.data.forecasts&&b.data.forecasts[0]&&a.success({forecast:b.data.forecasts[0]}):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}function e(e){wx.request({url:"https://restapi.amap.com/v3/geocode/regeo",data:{key:b.key,location:e,extensions:"all",s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion},method:"GET",header:{"content-type":"application/json"},success:function(b){var c,e;b.data.status&&"1"==b.data.status?(e=b.data.regeocode,e.addressComponent?c=e.addressComponent.adcode:e.aois&&e.aois.length>0&&(c=e.aois[0].adcode),d(c)):a.fail({errCode:b.data.infocode,errMsg:b.data.info})},fail:function(b){a.fail({errCode:"0",errMsg:b.errMsg||""})}})}var b=this,c=b.requestConfig;a.city?d(a.city):b.getWxLocation(a,function(a){e(a)})},AMapWX.prototype.getPoiAround=function(a){function d(d){var e={key:b.key,location:d,s:c.s,platform:c.platform,appname:b.key,sdkversion:c.sdkversion,logversion:c.logversion};a.querytypes&&(e["types"]=a.querytypes),a.querykeywords&&(e["keywords"]=a.querykeywords),wx.request({url:"https://restapi.amap.com/v3/place/around",data:e,method:"GET",header:{"content-type":"application/json"},success:function(b){var c,d,e,f;if(b.data.status&&"1"==b.data.status){if(b=b.data,b&&b.pois){for(c=[],d=0;d0){
25 | var content = '您选择的是 ' + tablenum + tabletype + ' ,预订金:' + price+' , 是否确认?';
26 | }else{
27 | var content = '您选择的是 ' + tablenum + tabletype + ' ,是否确认?';
28 | }
29 | var bookId = that.data.bookId;
30 | wx.showModal({
31 | title: '提示',
32 | content: content,
33 | success: function (res) {
34 | res.confirm && wx.request({
35 | url: app.d.ceshiUrl + '/Api/User/setseat',
36 | method: 'post',
37 | data: {
38 | bookId: bookId,
39 | tablenum: id,
40 | },
41 | header: {
42 | 'Content-Type': 'application/x-www-form-urlencoded'
43 | },
44 | success: function (res) {
45 | //--init data
46 | var status = res.data.status;
47 | if (status == 1) {
48 | wx.showToast({
49 | title: '预订成功!',
50 | duration: 2000
51 | });
52 | if (price>0) {
53 | setTimeout(function () {
54 | that.wxpay(order);
55 | }, 2300);
56 | }else {
57 | setTimeout(function () {
58 | that.onShow();
59 | }, 2300);
60 | }
61 | } else {
62 | wx.showToast({
63 | title: res.data.err,
64 | duration: 2000
65 | });
66 | }
67 | },
68 | fail: function () {
69 | // fail
70 | wx.showToast({
71 | title: '网络异常!',
72 | duration: 2000
73 | });
74 | }
75 | });
76 | }
77 | });
78 | },
79 |
80 | //调起微信支付
81 | wxpay: function (order) {
82 | wx.request({
83 | url: app.d.ceshiUrl + '/Api/Wxpay/wxpay',
84 | data: {
85 | order_id: order.order_id,
86 | order_sn: order.order_sn,
87 | uid: app.d.userId,
88 | },
89 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
90 | header: {
91 | 'Content-Type': 'application/x-www-form-urlencoded'
92 | }, // 设置请求的 header
93 | success: function (res) {
94 | if (res.data.status == 1) {
95 | var order = res.data.arr;
96 | wx.requestPayment({
97 | timeStamp: order.timeStamp,
98 | nonceStr: order.nonceStr,
99 | package: order.package,
100 | signType: 'MD5',
101 | paySign: order.paySign,
102 | success: function (res) {
103 | wx.showToast({
104 | title: "支付成功!",
105 | duration: 2000,
106 | });
107 | setTimeout(function () {
108 | wx.navigateTo({
109 | url: '../dingdan/dingdan?currentTab=1&otype=deliver',
110 | });
111 | }, 2300);
112 | },
113 | fail: function (res) {
114 | wx.showToast({
115 | title: res,
116 | duration: 2000
117 | })
118 | }
119 | })
120 | } else {
121 | wx.showToast({
122 | title: res.data.err,
123 | duration: 2000
124 | });
125 | }
126 | },
127 | fail: function () {
128 | // fail
129 | wx.showToast({
130 | title: '网络异常!err:wxpay',
131 | duration: 2000
132 | });
133 | }
134 | })
135 | },
136 |
137 | util: function (currentStatu) {
138 | /* 动画部分 */
139 | // 第1步:创建动画实例
140 | var animation = wx.createAnimation({
141 | duration: 200, //动画时长
142 | timingFunction: "linear", //线性
143 | delay: 0 //0则不延迟
144 | });
145 |
146 | // 第2步:这个动画实例赋给当前的动画实例
147 | this.animation = animation;
148 |
149 | // 第3步:执行第一组动画
150 | animation.opacity(0).rotateX(-100).step();
151 |
152 | // 第4步:导出动画对象赋给数据对象储存
153 | this.setData({
154 | animationData: animation.export()
155 | })
156 |
157 | // 第5步:设置定时器到指定时候后,执行第二组动画
158 | setTimeout(function () {
159 | // 执行第二组动画
160 | animation.opacity(1).rotateX(0).step();
161 | // 给数据对象储存的第一组动画,更替为执行完第二组动画的动画对象
162 | this.setData({
163 | animationData: animation
164 | })
165 |
166 | //关闭
167 | if (currentStatu == "close") {
168 | this.setData(
169 | {
170 | showModalStatus: false
171 | }
172 | );
173 | }
174 | }.bind(this), 200)
175 |
176 | // 显示
177 | if (currentStatu == "open") {
178 | this.setData(
179 | {
180 | showModalStatus: true
181 | }
182 | );
183 | }
184 | },
185 | // tab切换
186 | tabFun: function (e) {
187 | //获取触发事件组件的dataset属性
188 | var _datasetId = e.target.dataset.id;
189 | console.log("----" + _datasetId + "----");
190 | var _obj = {};
191 | _obj.curHdIndex = _datasetId;
192 | _obj.curBdIndex = _datasetId;
193 | this.setData({
194 | tabArr: _obj
195 | });
196 | },
197 |
198 |
199 | tiqian:function(){
200 | wx.navigateTo({
201 | url: '../ordering/ordering',
202 | success: function(res) {},
203 | fail: function(res) {},
204 | complete: function(res) {},
205 | })
206 | },
207 | /**
208 | * 生命周期函数--监听页面加载
209 | */
210 | onLoad: function (options) {
211 | var bookId = options.bookId;
212 | this.setData({
213 | bookId: bookId,
214 | });
215 | },
216 |
217 | /**
218 | * 生命周期函数--监听页面初次渲染完成
219 | */
220 | onReady: function () {
221 | wx.hideToast();
222 | },
223 |
224 | /**
225 | * 生命周期函数--监听页面显示
226 | */
227 | onShow: function () {
228 | wx.showToast({
229 | title: '加载中...',
230 | icon: 'loading',
231 | });
232 | var that = this;
233 | var bookId = that.data.bookId;
234 | wx.request({
235 | url: app.d.ceshiUrl + '/Api/User/getseat',
236 | method: 'post',
237 | data: {
238 | bookId: bookId,
239 | },
240 | header: {
241 | 'Content-Type': 'application/x-www-form-urlencoded'
242 | },
243 | success: function (res) {
244 | var status = res.data.status;
245 | if (status == 1) {
246 | var info = res.data.info;
247 | var list = res.data.list;
248 | var mini = res.data.mini;
249 | that.setData({
250 | info: info,
251 | list: list,
252 | mini: mini
253 | });
254 | } else {
255 | wx.showToast({
256 | title: res.data.err,
257 | duration: 2000,
258 | });
259 | }
260 | },
261 | error: function (e) {
262 | wx.showToast({
263 | title: '网络异常!',
264 | duration: 2000,
265 | });
266 | },
267 | });
268 | },
269 |
270 | /**
271 | * 生命周期函数--监听页面隐藏
272 | */
273 | onHide: function () {
274 |
275 | },
276 |
277 | /**
278 | * 生命周期函数--监听页面卸载
279 | */
280 | onUnload: function () {
281 |
282 | },
283 |
284 | /**
285 | * 页面相关事件处理函数--监听用户下拉动作
286 | */
287 | onPullDownRefresh: function () {
288 |
289 | },
290 |
291 | /**
292 | * 页面上拉触底事件的处理函数
293 | */
294 | onReachBottom: function () {
295 |
296 | },
297 |
298 | /**
299 | * 用户点击右上角分享
300 | */
301 | onShareAppMessage: function () {
302 |
303 | }
304 | })
--------------------------------------------------------------------------------
/pages/payorder/payorder.js:
--------------------------------------------------------------------------------
1 | var QQMapWX = require('../map/qqmap-wx-jssdk.js');
2 |
3 | // 获取全局应用程序实例对象
4 | const app = getApp();
5 |
6 | // 创建页面实例对象
7 | Page({
8 | /**
9 | * 页面的初始数据
10 | */
11 | data: {
12 | kk:1,
13 | address:'',
14 | otype:'wm',
15 | pro: [],
16 | total: 0,
17 | vprice: 0,
18 | vou: [],
19 | addressInfo: {},
20 | addrId: 0,
21 | nowtime: '',
22 | yunfei: 0,
23 | ptime: 0,
24 | cartId: 0,
25 | vid: 0,
26 | },
27 | /**
28 | * 支付货款
29 | */
30 | payMoney: function payMoney() {
31 | // todo 付款流程
32 | // wx.requestPayment({
33 | // 'timeStamp': '',
34 | // 'nonceStr': '',
35 | // 'package': '',
36 | // 'signType': 'MD5',
37 | // 'paySign': '',
38 | // 'success':function(res){
39 | // },
40 | // 'fail':function(res){
41 | // }
42 | // })
43 | },
44 |
45 |
46 | an:function(){
47 | var that = this
48 | var qqmapsdk = new QQMapWX({
49 | key: '3F4BZ-6RBR6-Q3HSQ-ML5JH-KF22H-YTBRQ'
50 | });
51 |
52 | wx.getLocation({
53 | type: 'gcj02',
54 | success: function (res) {
55 | that.setData({
56 | longitude: res.longitude,
57 | latitude: res.latitude,
58 | });
59 | console.log(res.longitude + " " + res.latitude);
60 |
61 | qqmapsdk.reverseGeocoder({
62 | location: {
63 | latitude: res.latitude,
64 | longitude: res.longitude
65 | },
66 | success: function (res) {
67 | var a = res.result.address_component.district;
68 | var b = res.result.address_component.street_number;
69 | var c = res.result.address_component.city;
70 | console.log(a + b);
71 | that.setData({
72 | address: c+a + b
73 | });
74 | },
75 | fail: function (res) {
76 | console.log(res);
77 | },
78 | complete: function (res) {
79 | console.log(res);
80 | },
81 | });
82 | }
83 | })
84 |
85 | },
86 |
87 | onLoad: function (options) {
88 | var otype = options.otype;
89 | if (otype != '' && otype != 'undefined') {
90 | this.setData({
91 | otype: otype,
92 | });
93 | }
94 | },
95 |
96 | // 创建订单,调起微信支付
97 | reg: function (e) {
98 | // wx.showModal({
99 | // title: '注意',
100 | // content: '此模版仅供展示,未开通微信支付,无法完成支付操作',
101 | // showCancel:false
102 | // })
103 | // return false;
104 | wx.showToast({
105 | title: '订单生成中...',
106 | icon: 'loading',
107 | });
108 | //创建订单
109 | var that = this;
110 | var address = that.data.address;
111 | var otype = that.data.otype;
112 | if ((address == '' || address == "undefined") && otype=="wm") {
113 | wx.showToast({
114 | title: '请填写送餐地址!',
115 | duration: 2000,
116 | });
117 | return false;
118 | }
119 | //创建订单
120 | wx.request({
121 | url: app.d.ceshiUrl + '/Api/Payment/payment',
122 | method: 'post',
123 | data: {
124 | uid: app.d.userId,
125 | cart_id: that.data.cartId,
126 | type: 'weixin',
127 | address: address, //地址的id
128 | name: e.detail.value.name,
129 | tel: e.detail.value.tel,
130 | remark: e.detail.value.remark,//用户备注
131 | price: that.data.total,//总价
132 | vid: that.data.vid,//优惠券ID
133 | otype: otype,
134 | },
135 | header: {
136 | 'Content-Type': 'application/x-www-form-urlencoded'
137 | },
138 | success: function (res) {
139 | wx.hideToast();
140 | //--init data
141 | var data = res.data;
142 | if (data.status == 1) {
143 | //创建订单成功
144 | if (data.arr.pay_type == 'cash') {
145 | wx.showToast({
146 | title: "请自行联系商家进行配送!",
147 | duration: 3000
148 | });
149 | return false;
150 | }
151 | if (data.arr.pay_type == 'weixin') {
152 | //微信支付
153 | that.wxpay(data.arr);
154 | }
155 | } else {
156 | wx.showToast({
157 | title: res.data.err,
158 | duration: 2500
159 | });
160 | }
161 | },
162 | fail: function (e) {
163 | wx.hideToast();
164 | wx.showToast({
165 | title: '网络异常!err:createProductOrder',
166 | duration: 2000
167 | });
168 | }
169 | });
170 | },
171 |
172 | //调起微信支付
173 | wxpay: function (order) {
174 | wx.request({
175 | url: app.d.ceshiUrl + '/Api/Wxpay/wxpay',
176 | data: {
177 | order_id: order.order_id,
178 | order_sn: order.order_sn,
179 | uid: this.data.userId,
180 | },
181 | method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
182 | header: {
183 | 'Content-Type': 'application/x-www-form-urlencoded'
184 | }, // 设置请求的 header
185 | success: function (res) {
186 | if (res.data.status == 1) {
187 | var order = res.data.arr;
188 | wx.requestPayment({
189 | timeStamp: order.timeStamp,
190 | nonceStr: order.nonceStr,
191 | package: order.package,
192 | signType: 'MD5',
193 | paySign: order.paySign,
194 | success: function (res) {
195 | wx.showToast({
196 | title: "支付成功!",
197 | duration: 2000,
198 | });
199 | setTimeout(function () {
200 | wx.navigateTo({
201 | url: '../dingdan/dingdan?currentTab=1&otype=deliver',
202 | });
203 | }, 2300);
204 | },
205 | fail: function (res) {
206 | wx.showToast({
207 | title: res,
208 | duration: 2000
209 | })
210 | }
211 | })
212 | } else {
213 | wx.showToast({
214 | title: res.data.err,
215 | duration: 2000
216 | });
217 | }
218 | },
219 | fail: function () {
220 | // fail
221 | wx.showToast({
222 | title: '网络异常!err:wxpay',
223 | duration: 2000
224 | });
225 | }
226 | })
227 | },
228 |
229 | address:function(){
230 | var cartId = this.data.cartId;
231 | wx.navigateTo({
232 | url: '../address/user-address/user-address?cartId=' + cartId,
233 | })
234 | },
235 |
236 | /**
237 | * 生命周期函数--监听页面初次渲染完成
238 | */
239 | onReady: function() {
240 | // TODO: onReady
241 | wx.hideToast();
242 | },
243 |
244 |
245 | /**
246 | * 生命周期函数--监听页面显示
247 | */
248 | onShow: function() {
249 | // TODO: onShow
250 | wx.showToast({
251 | title: '加载中...',
252 | icon: 'loading',
253 | });
254 | var that = this;
255 | wx.request({
256 | url: app.d.ceshiUrl + '/Api/Payment/buy_cart',
257 | method: 'post',
258 | data: {
259 | uid: app.d.userId,
260 | cart_id: that.data.cartId,
261 | otype: that.data.otype,
262 | },
263 | header: {
264 | 'Content-Type': 'application/x-www-form-urlencoded'
265 | },
266 | success: function (res) {
267 | var adds = res.data.adds;
268 | if (adds) {
269 | var addrId = adds.id;
270 | that.setData({
271 | addressInfo: adds,
272 | addrId: addrId,
273 | address: adds.quyuname+adds.address,
274 | });
275 | }
276 | that.setData({
277 | pro: res.data.pro,
278 | total: res.data.price,
279 | vprice: res.data.price,
280 | vou: res.data.vou,
281 | nowtime: res.data.nowtime,
282 | yunfei: res.data.yun,
283 | ptime: res.data.ptime,
284 | cartId: res.data.cartId,
285 | });
286 | },
287 | });
288 | },
289 |
290 |
291 | /**
292 | * 生命周期函数--监听页面隐藏
293 | */
294 | onHide: function onHide() {
295 | // TODO: onHide
296 | },
297 |
298 |
299 | /**
300 | * 生命周期函数--监听页面卸载
301 | */
302 | onUnload: function onUnload() {
303 | // TODO: onUnload
304 | },
305 |
306 |
307 | /**
308 | * 页面相关事件处理函数--监听用户下拉动作
309 | */
310 | onPullDownRefresh: function onPullDownRefresh() {
311 | // TODO: onPullDownRefresh
312 | }
313 | });
314 | //# sourceMappingURL=payorder.js.map
315 |
--------------------------------------------------------------------------------