Browse Source

feat(康道足浴) 添加确认点餐功能

xing.li 4 years ago
parent
commit
7a7882f018
7 changed files with 27 additions and 11 deletions
  1. 2 2
      api/order.js
  2. 2 3
      pages/food/food.js
  3. 1 0
      pages/order/order.js
  4. 5 2
      pages/order/order.wxml
  5. 7 0
      pages/order/order.wxss
  6. 3 3
      project.config.json
  7. 7 1
      project.private.config.json

+ 2 - 2
api/order.js

@@ -2,8 +2,8 @@ import request from '../utils/request.js'
 
 class order extends request {
 
-    static async getOrderList(page = 1, pageSize = 10, orderStatus, writeOffStatus) {
-        const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}&orderStatus=${orderStatus}&writeOffStatus=${writeOffStatus}`)
+    static async getOrderList(page = 1, pageSize = 10, orderStatus, writeOffStatus,foodOrder=2) {
+        const res = await this.getRequest(`${this.BASE_URL}Order/index?page=${page}&pageSize=${pageSize}&orderStatus=${orderStatus}&writeOffStatus=${writeOffStatus}&foodOrder=${foodOrder}`)
 
         return res.data
     }

+ 2 - 3
pages/food/food.js

@@ -187,7 +187,7 @@ Page({
   },
   openCartDialog: function(e){
     let type = e.currentTarget.dataset.type;
-    if (type === 'open'){
+    if (type == 'open'){
       if(this.data.cartList.length==0){
         wx.showToast({
           title: '请选择产品',
@@ -207,8 +207,7 @@ Page({
  * 点击商品+号购物车摆动
  * @return void 
  */
-cartWwing: function()
-{
+cartWwing: function(){
  
  // 创建动画实例(animation)
  var animation = wx.createAnimation({

+ 1 - 0
pages/order/order.js

@@ -164,6 +164,7 @@ Page({
   orderInfo: async function(){
     var orderId = this.data.orderId;
     let order = await orderApi.getOrderById(orderId);
+    console.log(order)
     this.setData({
       order: order.info,
       orderStatus: order.info.status,

+ 5 - 2
pages/order/order.wxml

@@ -55,8 +55,11 @@
         </view>
     </view>
     <view class="shop-info card">
-        <view class="shop f17">{{ order.storeName}}</view>
-        <view class="shop f17" wx:if="{{order.orderType ==3}}">桌号:{{ order.tableId}}</view>
+        <view class="store-name-table">
+            <view class="shop f17">{{ order.storeName}}</view>
+             <view class="shop f17" wx:if="{{order.orderType ==3}}">桌号:{{ order.tableId}}</view>
+        </view>
+       
         <view class="address f14 c-707070 " bindtap="guide">
             <image src="../../images/icons/location.png"></image>
             {{order.address}}

+ 7 - 0
pages/order/order.wxss

@@ -201,4 +201,11 @@
 .pro  {
   width: 600rpx;
   margin-left: 90rpx;
+}
+.store-name-table{
+  height:50rpx;
+  display:flex;
+  flex-flow:row nowrap;
+  justify-content:space-between;
+  padding-right:30rpx
 }

+ 3 - 3
project.config.json

@@ -14,12 +14,12 @@
     "enhance": true,
     "postcss": true,
     "preloadBackgroundData": false,
-    "minified": true,
+    "minified": false,
     "newFeature": false,
     "coverView": true,
     "nodeModules": true,
     "autoAudits": false,
-    "showShadowRootInWxmlPanel": true,
+    "showShadowRootInWxmlPanel": false,
     "scopeDataCheck": false,
     "uglifyFileName": false,
     "checkInvalidKey": true,
@@ -42,7 +42,7 @@
     "userConfirmedBundleSwitch": false,
     "packNpmManually": false,
     "packNpmRelationList": [],
-    "minifyWXSS": true
+    "minifyWXSS": false
   },
   "compileType": "miniprogram",
   "libVersion": "2.16.0",

+ 7 - 1
project.private.config.json

@@ -45,7 +45,7 @@
         {
           "name": "购买食物",
           "pathName": "pages/food/food",
-          "query": "store_id=128&table_id=27994",
+          "query": "storeId=1&tableId=1",
           "scene": 1011
         },
         {
@@ -53,6 +53,12 @@
           "pathName": "pages/foodOrder/foodOrder",
           "query": "storeId=128&tableId=27994",
           "scene": null
+        },
+        {
+          "name": "pages/order/order",
+          "pathName": "pages/order/order",
+          "query": "id=272",
+          "scene": null
         }
       ]
     }