├── pages ├── index │ ├── index.json │ ├── index.wxss │ ├── index.wxml │ └── index.js ├── pre-order │ ├── pre-order.json │ ├── pre-order.wxml │ ├── pre-order.wxss │ └── pre-order.js ├── order-detail │ ├── order-detail.json │ ├── order-detail.wxss │ ├── order-detail.wxml │ └── order-detail.js ├── order-success │ ├── order-success.json │ ├── order-success.wxml │ ├── order-success.js │ └── order-success.wxss ├── people-number │ ├── people-number.json │ ├── people-number.js │ ├── people-number.wxml │ └── people-number.wxss ├── history-orders │ ├── history-orders.json │ ├── history-orders.wxml │ ├── history-orders.wxss │ └── history-orders.js ├── dishes │ ├── dishes.json │ ├── dishes.wxss │ ├── dishes.wxml │ ├── dishes.js │ └── data.js └── dish-detail │ ├── dish-detail.json │ ├── dish-detail.wxml │ ├── dish-detail.js │ └── dish-detail.wxss ├── images ├── bg.jpg ├── add2@3x.png ├── add@3x.png ├── img2@3x.png ├── logo@3x.png ├── map@3x.png ├── minus@3x.png ├── order@3x.png ├── shop@3x.png ├── tel@3x.png ├── trash@3x.png ├── user@3x.png ├── minus2@3x.png ├── btn-bill@3x.png ├── down-arrow@3x.png ├── line-left@3x.png ├── line-right@3x.png ├── vegetable@3x.png ├── scan-qr-code@3x.png ├── user-single@3x.png ├── order-success@3x.png └── user-multiple@3x.png ├── components └── title-bar │ ├── title-bar.json │ ├── title-bar.wxss │ ├── title-bar.wxml │ └── title-bar.js ├── sitemap.json ├── README.md ├── .gitignore ├── app.wxss ├── app.json ├── utils ├── util.js ├── cart.js └── request.js ├── project.config.json └── app.js /pages/index/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true 3 | } -------------------------------------------------------------------------------- /images/bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/bg.jpg -------------------------------------------------------------------------------- /components/title-bar/title-bar.json: -------------------------------------------------------------------------------- 1 | { 2 | "component": true, 3 | "usingComponents": {} 4 | } -------------------------------------------------------------------------------- /images/add2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/add2@3x.png -------------------------------------------------------------------------------- /images/add@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/add@3x.png -------------------------------------------------------------------------------- /images/img2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/img2@3x.png -------------------------------------------------------------------------------- /images/logo@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/logo@3x.png -------------------------------------------------------------------------------- /images/map@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/map@3x.png -------------------------------------------------------------------------------- /images/minus@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/minus@3x.png -------------------------------------------------------------------------------- /images/order@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/order@3x.png -------------------------------------------------------------------------------- /images/shop@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/shop@3x.png -------------------------------------------------------------------------------- /images/tel@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/tel@3x.png -------------------------------------------------------------------------------- /images/trash@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/trash@3x.png -------------------------------------------------------------------------------- /images/user@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/user@3x.png -------------------------------------------------------------------------------- /images/minus2@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/minus2@3x.png -------------------------------------------------------------------------------- /images/btn-bill@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/btn-bill@3x.png -------------------------------------------------------------------------------- /images/down-arrow@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/down-arrow@3x.png -------------------------------------------------------------------------------- /images/line-left@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/line-left@3x.png -------------------------------------------------------------------------------- /images/line-right@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/line-right@3x.png -------------------------------------------------------------------------------- /images/vegetable@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/vegetable@3x.png -------------------------------------------------------------------------------- /pages/pre-order/pre-order.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "订单确认" 4 | } -------------------------------------------------------------------------------- /images/scan-qr-code@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/scan-qr-code@3x.png -------------------------------------------------------------------------------- /images/user-single@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/user-single@3x.png -------------------------------------------------------------------------------- /pages/order-detail/order-detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "订单详情" 4 | } -------------------------------------------------------------------------------- /pages/order-success/order-success.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "下单成功" 4 | } -------------------------------------------------------------------------------- /pages/people-number/people-number.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "选择人数" 4 | } -------------------------------------------------------------------------------- /images/order-success@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/order-success@3x.png -------------------------------------------------------------------------------- /images/user-multiple@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/zkboys/weixin-order-food/HEAD/images/user-multiple@3x.png -------------------------------------------------------------------------------- /pages/history-orders/history-orders.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "我的订单" 4 | } -------------------------------------------------------------------------------- /pages/dishes/dishes.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "点餐", 4 | "usingComponents": { 5 | "title-bar": "../../components/title-bar/title-bar" 6 | } 7 | } -------------------------------------------------------------------------------- /pages/dish-detail/dish-detail.json: -------------------------------------------------------------------------------- 1 | { 2 | "disableScroll": true, 3 | "navigationBarTitleText": "菜品详情", 4 | "usingComponents": { 5 | "title-bar": "../../components/title-bar/title-bar" 6 | } 7 | } -------------------------------------------------------------------------------- /sitemap.json: -------------------------------------------------------------------------------- 1 | { 2 | "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", 3 | "rules": [{ 4 | "action": "allow", 5 | "page": "*" 6 | }] 7 | } -------------------------------------------------------------------------------- /components/title-bar/title-bar.wxss: -------------------------------------------------------------------------------- 1 | .title-bar { 2 | text-align: center; 3 | padding: 10rpx; 4 | background: #fff; 5 | } 6 | 7 | .bar-icon { 8 | width: 74rpx; 9 | height: 17rpx; 10 | } 11 | 12 | .bar-text { 13 | margin: 0 34rpx; 14 | font-size: 28rpx; 15 | color: #D1A646; 16 | } -------------------------------------------------------------------------------- /components/title-bar/title-bar.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{title}} 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weixin-order-food 2 | 微信小程序-扫码点餐 3 | 4 | ## TODO 5 | - [ ] 多人同步点餐,购物车、确认订单中,是否显示点餐人头像? 6 | - [ ] 系统稍作改造可以支持服务员点餐 7 | - 后端指定微信用户为服务员 8 | - 小程序中,检测为服务员之后,提交订单 不发起微信支付,直接下单,后端直接打印小票 9 | 10 | 11 | - [ ] 微信小程序获取到的数据问题: 12 | - type === '02',里面的data 属性没有必要吧?一层就可以了 13 | - type === '03',指的是推荐菜品,系统上只能设置一个推荐菜品: 推荐名称 + 推荐内包含的菜品列表 -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | Thumbs.db 2 | .DS_Store 3 | .gradle 4 | build/ 5 | classes/ 6 | .idea 7 | *.iml 8 | *.ipr 9 | *.iws 10 | .project 11 | .settings 12 | .classpath 13 | bin/ 14 | .git/ 15 | catalina* 16 | logs/ 17 | *.log 18 | *.cache 19 | gradle 20 | /gradlew 21 | gradlew* 22 | .apt_generated 23 | .factorypath 24 | .springBeans 25 | .lock 26 | out/ 27 | *.bak 28 | -------------------------------------------------------------------------------- /components/title-bar/title-bar.js: -------------------------------------------------------------------------------- 1 | // components/title-bar/title-bar.js 2 | Component({ 3 | /** 4 | * 组件的属性列表 5 | */ 6 | properties: { 7 | title: { 8 | type: String, 9 | value: '', 10 | }, 11 | titleStyle: { 12 | type: String, 13 | value: '', 14 | } 15 | }, 16 | 17 | /** 18 | * 组件的初始数据 19 | */ 20 | data: { 21 | 22 | }, 23 | 24 | /** 25 | * 组件的方法列表 26 | */ 27 | methods: { 28 | 29 | } 30 | }) 31 | -------------------------------------------------------------------------------- /app.wxss: -------------------------------------------------------------------------------- 1 | /**app.wxss**/ 2 | .container { 3 | height: 100vh; 4 | display: flex; 5 | flex-direction: column; 6 | align-items: center; 7 | justify-content: space-between; 8 | box-sizing: border-box; 9 | font-family: Helvetica,"Microsoft YaHei", Arial, Helvetica, sans-serif; 10 | color: #D1A646; 11 | } 12 | .container-bg{ 13 | position: absolute; 14 | top: 0; 15 | bottom: 0; 16 | height: 100%; 17 | width: 100%; 18 | z-index: -1; 19 | background-color: #000; 20 | } 21 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "pages": [ 3 | "pages/index/index", 4 | "pages/people-number/people-number", 5 | "pages/dishes/dishes", 6 | "pages/dish-detail/dish-detail", 7 | "pages/pre-order/pre-order", 8 | "pages/order-success/order-success", 9 | "pages/history-orders/history-orders", 10 | "pages/order-detail/order-detail" 11 | ], 12 | "window": { 13 | "backgroundTextStyle": "light", 14 | "backgroundColor": "#333", 15 | "navigationBarBackgroundColor": "#000", 16 | "navigationBarTitleText": "小行点餐", 17 | "navigationBarTextStyle": "white" 18 | }, 19 | "sitemapLocation": "sitemap.json" 20 | } -------------------------------------------------------------------------------- /pages/people-number/people-number.js: -------------------------------------------------------------------------------- 1 | const app = getApp(); 2 | 3 | Page({ 4 | 5 | /** 6 | * 页面的初始数据 7 | */ 8 | data: { 9 | userInfo: {}, 10 | hasUserInfo: false, 11 | peopleNumber: '', 12 | }, 13 | 14 | /** 15 | * 生命周期函数--监听页面加载 16 | */ 17 | onLoad: function (options) { 18 | if (app.globalData.userInfo) { 19 | this.setData({ 20 | userInfo: app.globalData.userInfo, 21 | hasUserInfo: true 22 | }) 23 | } 24 | }, 25 | 26 | handleNumberClick: function (e) { 27 | const {number} = e.currentTarget.dataset; 28 | this.setData({peopleNumber: number}); 29 | 30 | wx.setStorageSync('peopleNumber', number); 31 | wx.navigateTo({ 32 | url: '/pages/dishes/dishes', 33 | }) 34 | }, 35 | }); -------------------------------------------------------------------------------- /pages/people-number/people-number.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 请选择用餐人数 7 | 8 | 9 | 10 | 17 | {{row * 4 + col}}人 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /pages/people-number/people-number.wxss: -------------------------------------------------------------------------------- 1 | .container{ 2 | display: flex; 3 | flex-direction: column; 4 | justify-content: center; 5 | } 6 | .title{ 7 | text-align: center; 8 | } 9 | 10 | .avatar { 11 | flex-basis: 95rpx; 12 | flex-shrink: 0; 13 | width: 95rpx; 14 | height: 95rpx; 15 | border-radius: 50%; 16 | } 17 | 18 | .tip { 19 | margin-top: 25rpx; 20 | font-size: 24rpx; 21 | color: #D1A646; 22 | } 23 | 24 | .number-box { 25 | margin-top: 50rpx; 26 | } 27 | 28 | .number-item { 29 | display: inline-block; 30 | width: 85rpx; 31 | height: 70rpx; 32 | line-height: 70rpx; 33 | margin: 24rpx 26rpx; 34 | color: #D1A646; 35 | border: 1rpx solid #D1A646; 36 | border-radius: 6rpx; 37 | font-size: 24rpx; 38 | text-align: center; 39 | } 40 | 41 | .number-item.active{ 42 | background: #D1A646; 43 | color: #fff; 44 | } 45 | 46 | .btn-ok{ 47 | padding: 22rpx 0; 48 | margin: 70rpx 20rpx 0 20rpx; 49 | background: #D1A646; 50 | border-radius: 6rpx; 51 | font-size: 32rpx; 52 | color: #fff; 53 | text-align: center; 54 | } -------------------------------------------------------------------------------- /pages/history-orders/history-orders.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | {{item.name}} 11 | 12 | 13 | 14 | 15 | {{item.storeName}} 16 | 17 | 18 | {{item.orderTime}} 19 | {{item.priceStr}} 20 | 21 | 22 | 店内自助 23 | {{item.status}} 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /pages/order-success/order-success.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 下单成功,感谢您的光临! 5 | 6 | 7 | 已下单({{dishTotalCount}}) 8 | 9 | 10 | 下单时间:{{orderTime}} 11 | 桌号:{{deskNo}} 12 | 13 | 14 | 15 | 16 | {{dish.name}} 17 | /{{dish.unit}} 18 | 19 | 20 | 21 | {{dish.priceStr}} 22 | x 23 | {{dish.count}} 24 | 25 | 26 | 27 | 28 | 小计:{{dishTotalPriceStr}} 29 | 30 | 31 | 继续点餐 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /pages/history-orders/history-orders.wxss: -------------------------------------------------------------------------------- 1 | .history-order-container{ 2 | height: 100vh; 3 | display: flex; 4 | flex-direction: column; 5 | font-weight: normal; 6 | background-color: rgba(246,246,246,1); 7 | } 8 | 9 | .tab-container { 10 | display: flex; 11 | flex-shrink: 0; 12 | background: #fff; 13 | margin-bottom: 10rpx; 14 | } 15 | 16 | .tab-container .tab { 17 | flex-grow: 1; 18 | padding: 25rpx 0; 19 | text-align: center; 20 | color: #666; 21 | font-size: 32rpx; 22 | } 23 | 24 | .tab-container .tab.active { 25 | color: #D1A646; 26 | border-bottom: 2rpx solid #D1A646; 27 | } 28 | 29 | .order-list { 30 | flex-grow: 1; 31 | overflow: auto; 32 | -webkit-overflow-scrolling: touch; 33 | } 34 | 35 | .order-item { 36 | background: #fff; 37 | margin-bottom: 10rpx; 38 | } 39 | 40 | .store-name{ 41 | color: #333; 42 | font-size: 28rpx; 43 | padding: 20rpx 30rpx; 44 | border-bottom: 1rpx solid #DFE2E5; 45 | } 46 | 47 | .time-money, .type-status { 48 | display: flex; 49 | justify-content: space-between; 50 | font-size: 24rpx; 51 | padding: 30rpx; 52 | } 53 | 54 | .time-money { 55 | padding-bottom: 15rpx; 56 | color: #A1A1A1; 57 | } 58 | 59 | .time-money .money{ 60 | color: #535353; 61 | } 62 | 63 | .type-status { 64 | padding-top: 0; 65 | color: #333333; 66 | } 67 | 68 | .type-status .status { 69 | color: #535353; 70 | } -------------------------------------------------------------------------------- /pages/index/index.wxss: -------------------------------------------------------------------------------- 1 | /**index.wxss**/ 2 | .user-info { 3 | position:relative; 4 | display: flex; 5 | width: 100%; 6 | padding-top: 50rpx; 7 | padding-left: 100rpx; 8 | align-items: center; 9 | } 10 | .user-info button { 11 | position: absolute; 12 | top: 0; 13 | right: 50%; 14 | bottom: 0; 15 | left: 0; 16 | opacity: 0; 17 | } 18 | .avatar { 19 | flex-basis: 95rpx; 20 | flex-shrink: 0; 21 | width: 95rpx; 22 | height: 95rpx; 23 | border-radius: 50%; 24 | } 25 | .welcome { 26 | padding-left: 30rpx; 27 | color: #D1A646; 28 | font-size: 28rpx; 29 | } 30 | 31 | .store-info { 32 | display: flex; 33 | flex-direction: column; 34 | align-items: center; 35 | } 36 | 37 | .store-logo { 38 | width: 241rpx; 39 | height: 194rpx; 40 | } 41 | 42 | .store-name { 43 | margin-top: 26rpx; 44 | font-size: 31rpx; 45 | } 46 | 47 | .store-desk { 48 | margin-top: 74rpx; 49 | font-size: 28rpx; 50 | } 51 | 52 | .btn-operator-group { 53 | display: flex; 54 | align-items: center; 55 | justify-content: space-between; 56 | padding-bottom: 200rpx; 57 | } 58 | .btn-operator { 59 | display: flex; 60 | flex-direction: column; 61 | align-items: center; 62 | margin: 0 80rpx; 63 | } 64 | 65 | .order { 66 | width: 120rpx; 67 | height: 120rpx; 68 | } 69 | 70 | .order-text{ 71 | margin-top: 18rpx; 72 | font-size: 30rpx; 73 | } 74 | 75 | .scan-qr-code{ 76 | width: 250rpx; 77 | height: 250rpx; 78 | } -------------------------------------------------------------------------------- /pages/order-success/order-success.js: -------------------------------------------------------------------------------- 1 | const cart = require('../../utils/cart'); 2 | const {formatCurrency, formatTime} = require('../../utils/util'); 3 | 4 | Page({ 5 | 6 | /** 7 | * 页面的初始数据 8 | */ 9 | data: { 10 | orderTime: '', 11 | deskNo: '', 12 | dishes: [], 13 | dishTotalCount: 0, 14 | dishTotalPrice: 0, 15 | dishTotalPriceStr: '¥0.00', 16 | }, 17 | 18 | /** 19 | * 生命周期函数--监听页面加载 20 | */ 21 | onLoad: function (options) { 22 | 23 | const dishTotalPrice = cart.getTotalPrice(); 24 | const dishTotalCount = cart.getTotalCount(); 25 | const dishes = cart.getDataSource(); 26 | const deskNo = wx.getStorageSync('deskNo'); 27 | const dishTotalPriceStr = formatCurrency(dishTotalPrice); 28 | const orderTime = formatTime(new Date()); 29 | 30 | dishes.forEach(dish => { 31 | dish.priceStr = formatCurrency(dish.price, {prefix: ''}); 32 | }); 33 | 34 | this.setData({ 35 | deskNo, 36 | dishes, 37 | dishTotalCount, 38 | dishTotalPrice, 39 | dishTotalPriceStr, 40 | orderTime, 41 | }, () => { 42 | // 清除本次流程存储的相关数据, 其他数据应该不用清除 43 | cart.clear(); // cart clear 用到 storeId 了 44 | // 清除storeId deskNo之后,需要重新扫码 45 | wx.removeStorageSync('storeId'); 46 | wx.removeStorageSync('deskNo'); 47 | }); 48 | }, 49 | 50 | handleReOrder: function () { 51 | wx.navigateTo({ 52 | url: '/pages/index/index', 53 | }) 54 | }, 55 | }) 56 | -------------------------------------------------------------------------------- /pages/pre-order/pre-order.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 待下单({{dishTotalCount}}) 4 | 5 | 桌号:{{deskNo}} 6 | 7 | 8 | 9 | 10 | 11 | {{dish.name}} 12 | /{{dish.unit}} 13 | 14 | 15 | 16 | {{dish.priceStr}} 17 | x 18 | {{dish.count}} 19 | 20 | 21 | 22 | 23 | 小计:{{dishTotalPriceStr}} 24 | 25 | 26 | 27 | 人数: 28 | {{peopleNumber}} 29 | 30 | 31 | 32 | 33 | 备注: 34 | 35 | 36 | 37 | 38 | {{dishTotalPriceStr}} 39 | 40 | 41 | 提交订单 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /pages/dish-detail/dish-detail.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | {{dish.name}} 7 | 8 | 9 | 10 | {{item.dishName}} 11 | 12 | 13 | 14 | {{item.label}} 22 | 23 | 24 | 25 | 暂无菜品介绍 26 | 27 | 28 | 菜品介绍 29 | 30 | {{dish.presentation}} 31 | 32 | 33 | 34 | 35 | 36 | 单价: 37 | {{dish.priceStr}} 38 | 39 | 40 | 41 | 42 | 43 | {{dish.count}} 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /pages/order-detail/order-detail.wxss: -------------------------------------------------------------------------------- 1 | .order-detail-container{ 2 | height: 100vh; 3 | display: flex; 4 | flex-direction: column; 5 | font-weight: normal; 6 | background-color: rgba(246,246,246,1); 7 | } 8 | .store-msg { 9 | text-align: center; 10 | padding-top: 50rpx; 11 | background: #fff; 12 | flex-shrink: 0; 13 | border-bottom: 1rpx solid #DFE2E5; 14 | } 15 | .mobile-position{ 16 | display: flex; 17 | padding-bottom: 30rpx; 18 | color: #A1A1A1; 19 | font-size: 24rpx; 20 | } 21 | 22 | .mobile-position view.mp-item{ 23 | display:flex; 24 | align-items: center; 25 | justify-content: center; 26 | flex-grow: 1; 27 | } 28 | 29 | .mobile-position view.mp-item.first{ 30 | border-right: 1px solid #A1A1A1; 31 | } 32 | 33 | .store-name { 34 | color: #333; 35 | font-size: 28rpx; 36 | margin-bottom: 30rpx; 37 | } 38 | .mobile-position image { 39 | width: 20rpx; 40 | height: 25rpx; 41 | margin-right: 10rpx; 42 | } 43 | 44 | .block{ 45 | flex-grow: 1; 46 | overflow: auto; 47 | -webkit-overflow-scrolling: touch; 48 | } 49 | 50 | .order-msg, 51 | .dish-msg 52 | { 53 | margin-top: 10rpx; 54 | background: #ffff; 55 | } 56 | .order-msg .title, 57 | .dish-msg .title 58 | { 59 | display: flex; 60 | justify-content: space-between; 61 | padding: 20rpx 30rpx; 62 | color: #333; 63 | font-size: 28rpx; 64 | border-bottom: 1rpx solid #DFE2E5; 65 | } 66 | 67 | .dish-msg .money { 68 | color: #ED3E39; 69 | } 70 | 71 | .order-msg{ 72 | margin-bottom: 50rpx; 73 | } 74 | .item { 75 | display: flex; 76 | justify-content: space-between; 77 | align-items: center; 78 | padding: 20rpx 30rpx; 79 | background: #fff; 80 | } 81 | 82 | .item .label{ 83 | color: #A1A1A1; 84 | font-size: 24rpx; 85 | } 86 | 87 | .item .value{ 88 | color: #333; 89 | font-size: 24rpx; 90 | } 91 | 92 | .dish-msg .item .value { 93 | flex-basis: 150rpx; 94 | flex-shrink: 0; 95 | text-align: right; 96 | } 97 | .dish-name { 98 | color: #333; 99 | } 100 | 101 | .money-prefix{ 102 | color: #A1A1A1; 103 | } -------------------------------------------------------------------------------- /pages/order-success/order-success.wxss: -------------------------------------------------------------------------------- 1 | .order-success-container{ 2 | height: 100vh; 3 | display: flex; 4 | flex-direction: column; 5 | font-weight: normal; 6 | background-color: rgba(246,246,246,1); 7 | } 8 | 9 | .success-tip{ 10 | padding: 50rpx 0; 11 | background: #fff; 12 | text-align: center; 13 | color: #333; 14 | font-size: 32rpx; 15 | border-bottom: 1px solid rgba(246,246,246,1); 16 | } 17 | 18 | .success-tip image { 19 | width: 85rpx; 20 | height: 85rpx; 21 | margin-bottom: 30rpx; 22 | } 23 | 24 | .title { 25 | padding: 30rpx 0; 26 | margin-top: 15rpx; 27 | color: #333333; 28 | font-size: 28rpx; 29 | text-align: center; 30 | background: #fff; 31 | } 32 | 33 | .desk-number { 34 | display: flex; 35 | justify-content: space-between; 36 | align-items: center; 37 | padding-right: 30rpx; 38 | padding-left: 30rpx; 39 | padding-bottom: 20rpx; 40 | color: #A1A1A1; 41 | font-size: 24rpx; 42 | background: #fff; 43 | text-align: right; 44 | border-bottom: 1rpx solid #DFE2E5; 45 | } 46 | .dish-list{ 47 | flex-grow: 1; 48 | overflow: auto; 49 | -webkit-overflow-scrolling: touch; 50 | background: #fff; 51 | } 52 | 53 | .dish-item{ 54 | display: flex; 55 | justify-content: space-between; 56 | align-items: center; 57 | padding: 25rpx 30rpx; 58 | } 59 | 60 | .dish-msg { 61 | flex-grow: 1; 62 | font-size: 28rpx; 63 | } 64 | 65 | .dish-name{ 66 | color: #333; 67 | } 68 | 69 | .dish-unit{ 70 | color: #A1A1A1; 71 | } 72 | 73 | .dish-money { 74 | flex-basis: 150rpx; 75 | flex-shrink: 0; 76 | font-size: 26rpx; 77 | color: #333; 78 | text-align: right; 79 | } 80 | 81 | .money-prefix { 82 | color: #A1A1A1; 83 | } 84 | 85 | .dish-total{ 86 | margin-top: 30rpx; 87 | margin-bottom: 30rpx; 88 | padding-right: 30rpx; 89 | font-size: 28rpx; 90 | color: #ED3E39; 91 | text-align: right; 92 | } 93 | 94 | 95 | .reorder { 96 | flex-basis: 104rpx; 97 | flex-shrink: 0; 98 | line-height: 104rpx; 99 | z-index: 999; 100 | background: #D1A646; 101 | text-align: center; 102 | color: #fff; 103 | font-size: 32rpx; 104 | } 105 | -------------------------------------------------------------------------------- /pages/index/index.wxml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |