瀏覽代碼

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

xing.li 4 年之前
父節點
當前提交
391fe1b185

+ 5 - 0
api/order.js

@@ -45,6 +45,11 @@ class order extends request {
         return res
     }
 
+    static async createFoodOrder(data) {
+        const res = await this.postRequest(`${this.BASE_URL}Order/createFoodOrder`,data)
+        return res.data
+    }
+
 }
 
 export default order

+ 10 - 0
api/product.js

@@ -19,6 +19,16 @@ class product extends request {
         const res = await this.getRequest(`${this.BASE_URL}Product/typeList?page=${page}&pageSize=${pageSize}&type=${type}`)
         return res.data;
     }
+
+    static async getCart(data) {
+        const res= await this.postRequest(`${this.BASE_URL}Order/getCart`,data)
+        return res.data
+    }
+
+    static async updateCart(data) {
+        const res = await this.postRequest(`${this.BASE_URL}Order/updateCart`,data)
+        return res.data
+    }
     
 
 }

+ 2 - 1
app.json

@@ -12,7 +12,8 @@
     "pages/shopinfo/shopinfo",
     "pages/shop/shop",
     "pages/prompt/prompt",
-    "pages/food/food"
+    "pages/food/food",
+    "pages/foodOrder/foodOrder"
    
   
   ],

二進制
images/good.png


+ 57 - 861
pages/food/food.js

@@ -8,98 +8,19 @@ var utils = require('../../utils/util.js');
 let globalInterval = {};
 Page({
   data: {
-    check_index:true,
-    toViewss:'',
-    userInfo: {},
-    hasUserInfo: false,
-    canIUse: wx.canIUse('button.open-type.getUserInfo'),
-    series: [],
-    scrollTop:"",
-    toView: 'series1',
-    toViews: '1',
-    showMyCar: 'false',
-    showSpec: true,
-    flavor: [
-    ],
-    plactice: [
-    ],
-    productList: [],//所有产品列表
-    remainDecMoney:0,
-    remainDecMoneyReduce:0,
-    remainDecMoneyHas: 0,
-    product_no: '',
-    array_flavore: [],//已选择的口味
-    array_plactice: [],//选择做法列表
-    choose_plactice: '',//选择的做法
-    choose_product_list: [],//已选择产品列表
-    chooseProduct: '',//当前选择的产品编号
-    chooseProductSpecPrice: '17',//有规格时的产品总价格
-    chooseProductPrice: '17',//有规格时产品单价
-    all_price: 0,//订单总价
-    haveChooseOrderDetail: [],//已点产品订单
-    haveChooseOrderDetailNum: '0',//已点产品的总数
-    canChooseProduct:true,
-    // showModal: true,
     currentTab: 0,
-    base_img_url: app.globalData.base_img_url,
-
-    indicatorDots: true,
-    autoplay: true,
-    interval: 5000,
-    duration: 1000,
-    scroll_tops: 0,
-    heightTopSwiper: "35%",
-    topSeriesScroll: "37%",
-    topProductScroll: "37%",
-    heightSeriesScroll: "63%",
-    seriesBottom:"0",
-    menuBotDisplay:"none",
-    check_tying:false,
-    tyingOrderDetail:[],
-    check_mobile:false,//是否已有注册
-    scrollText:'',
-    viewStyle:{
-      second:0,
-      total:0
-    },
-    navActive:0,
-    loopLeft:-100,
     activeTab:0,
     showCart:false,
-    mask:true
+    mask:true,
+    series:[],
+
   },
 
 
-  onChooseTeacher:function(){
-     this.setData({
-       showModal: false,
-     })
-  },
-  onLoadImg: function () {
-    var productList = this.data.productList;
-    for (var i in productList) {
-      productList[i].img = (!productList[i].imgOrg) ? '/static/index/images/img02.jpg' : productList[i].imgOrg;
-    }
-    this.setData({
-      productList: productList,
-    });
-  },
-  onReady:function(){
-    
-  },
-  onHide:function(){
-    console.log('清理定时器');
-    clearInterval(globalInterval);
-  },
   onShow: function () {
-
-    var order_no = wx.getStorageSync('order_no');
     var that = this;
-
     var mobile = wx.getStorageSync('mobile');
-    var member_openid = wx.getStorageSync('member_openid');
-    console.log(mobile + "/////////" + member_openid);
-    //if (!mobile || !member_openid) {
+    console.log(mobile + "/////////" );
       if (!mobile) {
       that.setData({
         check_mobile: false
@@ -109,818 +30,93 @@ Page({
         check_mobile: true
       })
     }
-    console.log(order_no)
-    if (order_no) {
-      console.log(order_no);
-      wx.request({
-        url: app.globalData.base_url + '/smdd/index/getOrder',//上线的话必须是https,没有appId的本地请求貌似不受影响
-        data: {
-          check:true,//将加购产品删除
-          bloc_code: app.globalData.bloc_code,
-          order_no: order_no
-        },
-        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-        header: app.globalData.header, // 设置请求的 header
-        success: function (res) {
-          var list = res.data.data.productList;
-          // var list = JSON.stringify(list);
-          // console.log(list);
-          var order_no = res.data.data.order_no;
-          wx.setStorageSync('order_no', order_no);
-          console.log(res.data.data.productList);
-
-          that.setData({
-            haveChooseOrderDetail: list,
-            haveChooseOrderDetails: res.data.data.chooseProductList,
-            haveChooseNoCar: res.data.data.product,
-            haveChooseOrderDetailNum: res.data.data.count,
-            all_price: res.data.data.all_price,
-            remainDecMoney: res.data.data.remainDecMoney.remain,
-            remainDecMoneyReduce: res.data.data.remainDecMoney.dec,
-            remainDecMoneyHas: res.data.data.remainDecMoney.has
-          })
-          if (res.data.data.count > 0){
-           that.setData({
-             menuBotDisplay: "block",
-           })
-          }else{
-            that.setData({
-              menuBotDisplay: "none",
-            })
-          }
-        },
-        fail: function () {
-          // fail
-        },
-        complete: function () {
-          // complete
-        }
-      })
-    } else {
-      that.setData({
-        haveChooseOrderDetail: [],
-        haveChooseOrderDetails: [],
-        haveChooseNoCar:[],
-        haveChooseOrderDetailNum: 0
-      })
-    }
-
-    console.log(that.data.check_tying)
-    if (that.data.check_tying) {
-      var caont = that.data.tyingOrderDetail;
-      console.log(caont);
-      console.log("///");
-      if (caont.tips) {
-        var content = caont.tips;
-      } else {
-        var content = "亲," + caont.product_name + caont.tying_price + "元起~客官可随意挑选";
-      }
-      wx.showModal({
-        title: '',
-        content: content,
-        showCancel: true,
-        // cancelText:'cancel',
-        // confirmText:'sure',
-        success: function (e) {
-          if (!e.cancel) {
-            wx.navigateTo({
-              url: '../../pages/package/package?product_no=' + caont.tying_product_no +'&package_id='+caont.is_package
-            })
-          }
-        }
-      })
-    }
-
-    wx.showShareMenu({
-      withShareTicket: true
-    })
+   
+    
   },
 
-
+   //商品分类列表
   productTypeList: async function(){
     let self = this
     let rs = await productApi.getProductTypeList(1,10000,2)
-    console.log(rs.list);
     self.setData({
       series: rs.list
     })
   },
-  
+
+   //商品列表
   getProductList: async function (refresh = false) {
     const self = this
-    
     let prolist = await productApi.getProductList(0,1,10000,2);
     self.setData({
       productList:prolist.list
     })
-    
-  },
-  onLoad: async function (options) {
-    
-    if (options.store_id && options.table_id){
-      wx.removeStorageSync('order_no');
-      wx.setStorageSync("store_id", options.store_id);
-      wx.setStorageSync("table_id", options.table_id);
-    }
-
-    wx.showLoading({
-      title: 'loading',
-    });
-    var that = this;
-  
-    await this.productTypeList();
-    await this.getProductList();
     await this.initProduct();
+  },
 
-    var order_no = wx.getStorageSync('order_no');
-
-    if (order_no) {
-      console.log(order_no);
-      wx.request({
-        url: app.globalData.base_url + '/smdd/index/getOrder',//上线的话必须是https,没有appId的本地请求貌似不受影响
-        data: {
-          bloc_code: app.globalData.bloc_code,
-          order_no: order_no
-        },
-        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-        header: app.globalData.header, // 设置请求的 header
-        success: function (res) {
-          var list = res.data.data.productList;
-          // var list = JSON.stringify(list);
-          // console.log(list);
-          var order_no = res.data.data.order_no;
-          wx.setStorageSync('order_no', order_no);
-          //console.log(res.data.data.productList);
-
-          that.setData({
-            haveChooseOrderDetail: list,
-            haveChooseOrderDetails: res.data.data.chooseProductList,
-            haveChooseOrderDetailNum: res.data.data.count,
-            all_price: res.data.data.all_price,
-            remainDecMoney: res.data.data.remainDecMoney.remain,
-            remainDecMoneyReduce: res.data.data.remainDecMoney.dec,
-            remainDecMoneyHas: res.data.data.remainDecMoney.has
-          })
-        },
-        fail: function () {
-          // fail
-        },
-        complete: function () {
-          // complete
-        }
-      })
-    } else {
-      that.setData({
-        haveChooseOrderDetail: [],
-        haveChooseOrderDetails: [],
-        haveChooseOrderDetailNum: 0
-      })
+  // 获取购物车
+  getCart: async function(){
+    let self = this;
+    let data = {
+      tableId: this.data.tableId,
+      storeId: this.data.storeId
     }
-    that.setData({
-      check_index:false
-    })
-  },
-  getUserInfo: function (e) {
-    console.log(e)
-    app.globalData.userInfo = e.detail.userInfo
-    this.setData({
-      userInfo: e.detail.userInfo,
-      hasUserInfo: true
+    const rs = await productApi.getCart(data)
+    console.log(rs);
+    self.setData({
+      cartId:rs.id,
+      cartList:rs.list,
+      cartListNum:rs.count?rs.count:0,
     })
   },
-  loop:function(){
-    let millisecond = this.data.viewStyle.second*1000;
-    let total = this.data.viewStyle.total;
-    let speed = 1000;
-    let _self = this;
-
-    globalInterval = setInterval(function(){
-      let iv = total / (millisecond / speed);
-      _self.data.loopLeft -= iv;
-      if (Math.abs(_self.data.loopLeft) >= total){
-        _self.data.loopLeft = 300;
-      }
 
-      _self.setData({
-        loopLeft: _self.data.loopLeft
-      });
-    }, speed);
+  // 更新购物车 type类型1增加 2减少
+  updateCart: async function(productId,type=1,num=1){
+    let data = {
+      productId : productId,
+      num : num,
+      cartId  : this.data.cartId,
+      type   : type 
+    }
+     await productApi.updateCart(data)
   },
-  showMyCarClick: function (e) {
-    var istrue = e.target.dataset.istrue;
-    console.log(istrue);
-    this.setData({
-      showMyCar: !istrue,
-      showSpec: true,
-    })
 
+  updateCartClick :async function(e){
+    let productId = e.target.dataset.no;
+    let type = e.target.dataset.type;
+    //  wx.showLoading({
+    //   title: '加入购物车',
+    //   mask: true
+    // });
+    await this.updateCart(productId,type);
+    await this.getCart();
+   
   },
-  goMember: function (e) {
-    wx.navigateTo({
-      url: '/pages/newIndexs/newIndexs',
-      // url:'/pages/memberIndex/memberIndex'
-    })
-  },
-
-  showSpecClick: function (e) {
-    var istrue = e.target.dataset.showspec;
-    var plactice = this.data.choose_plactice;
-    var flavor = this.data.flavor;
-
-    if (istrue == true) {
-      var price = e.target.dataset.price
-      var product_no = e.target.dataset.no;
-      var that = this;
-      wx.request({
-        url: app.globalData.base_url + '/smdd/index/getAddProduct',//上线的话必须是https,没有appId的本地请求貌似不受影响
-        data: {
-          bloc_code: app.globalData.bloc_code,
-          product_no: product_no,//大华店
-        },
-        method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-        header: app.globalData.header, // 设置请求的 header
-        success: function (res) {
-          console.log(res.data.data)
-          console.log(res.data.code);
-          if (res.data.code == '200') {
-            if (res.data.data) {
-              var flavor = [];//口味
-              var plactice = [];//做法
-              var add_arr = res.data.data;
-              for (let i = 0; i < add_arr.length; i++) {
-                console.log(add_arr[i].img);
-                if (add_arr[i]['type'] == 1) {//口味
-                  flavor[i] = add_arr[i];
-                  flavor[i]['is_select'] = "false";
-                } else if (add_arr[i]['type'] == 2) {
-                  plactice[i] = add_arr[i];
-                  plactice[i]['is_select'] = "false";
-                }
-              }
-              that.setData({
-                flavor: flavor,
-                plactice: plactice,
-                chooseProductPrice: price,//有规格时产品单价
-                chooseProductSpecPrice: price,//有规格时的产品总价格
-                showSpec: !istrue,
-                chooseProduct: product_no,
-                choose_plactice: '',
-                array_plactice: []
-              })
-            }
-          }
-
-        },
-      })
-    } else {
-      this.setData({
-        showSpec: !istrue,
-      })
-      var product_no = e.target.dataset.no;
-      var arr = this.getChooseAdd();
-      console.log(arr);
-      if (product_no > 0) {
-        // 不可以重复下单
-        this.setData({
-          canChooseProduct:false
-        })
-        this.chooseProduct(product_no, arr);
-      }
 
-    }
-  },
-  tap: function (e) {
-    var id = e.currentTarget.dataset.id;
-    var index = e.currentTarget.dataset.index;
-    this.setData({
-      toView: id,
-      navActive: index
-    });
-  },
-  clickScroll: function (e) {
-    var id = e.currentTarget.dataset.id
-    var action = e.currentTarget.dataset.action
-    console.log(e);
+  onLoad: async function (options) {
     this.setData({
-      toView: id,
-      toViews: action,
-      seriesClickToView:id
+      tableId:options.table_id,
+      storeId:options.store_id
     })
-  },
-  scroll: function (e) {
-    var scrollTop = e.detail.scrollTop;
-    var scrollArr = this.data.hightArr;
-
-    var active = "";
-    for (var i = 0; i < scrollArr.length; i++) {
-      if (scrollTop >= 0 && scrollTop < scrollArr[1] - scrollArr[0]-50) {
-        active = 0;
-
-      } else if (scrollTop >= scrollArr[i] - scrollArr[0]-50 && scrollTop < scrollArr[i + 1] - scrollArr[0]-50) {
-        active = i;
+    await this.productTypeList();
+    await this.getProductList();
+    await this.getCart();
 
-      } else if (scrollTop >= scrollArr[scrollArr.length - 1] - scrollArr[0]-50) {
-        active = scrollArr.length - 1;
-      }
-    }
-    console.log(active);
-    this.setData({
-      navActive: active
-    })
-  },
-  scrolls:function(e){
-     console.log(e);
-  },
-  onPageScroll: function (e) {
-  },
-  onPullDownRefresh: function (e) {
-    cosole.log(e)
-  },
-  leftMenu: function (rightId) {
-  },
-  flavorClick: function (e) {
-    console.log(e);
-    var arrs = this.data.array_flavore;
-    console.log(arrs);
-    var ids = e.target.dataset.id;
-    var chec = 2;
-    if (arrs) {
-      for (let i = 0; i < arrs.length; i++) {
-        console.log(arrs[i]);
-        if (arrs[i] == ids) {
-          arrs.splice(i, 1)
-          chec = 1;
-        }
-      }
-    }
-    if (chec == 2) {
-      arrs.push(ids);
-    }
-    if (arrs) {
-      var flavore_arr = [];
-      var flavore = this.data.flavor;
-      console.log(flavore);
-      for (let i = 0; i < flavore.length; i++) {
-        // console.log(1111);
-        var check_flo = 1;
-        for (let j = 0; j < arrs.length; j++) {
-          if (arrs[j] == flavore[i]["add_id"]) {
-            check_flo = 2;
-          }
-        }
-        if (check_flo == 1) {
-          flavore[i]["is_select"] = 'false';
-        } else {
-          flavore[i]["is_select"] = 'true';
-        }
-        flavore_arr[i] = flavore[i];
-      }
-      this.setData({
-        flavor: flavore_arr,
-      })
-    }
-    console.log(this.data.array_flavore);
-    this.colmProudtcPrice();
-  },
-  placticeClick: function (e) {
-    console.log(e);
-    var ids = e.target.dataset.id;
-    e.target.dataset.name = "check";
-    this.setData({
-      array_plactice: ["ids"],
-      choose_plactice: ids
-    })
-    this.colmProudtcPrice();
-  },
-  colmProudtcPrice: function () {//计算有规格的产品的价格
-    var spec_price = 0;//选择规则的价格
-    var chooseProductPrice = this.data.chooseProductPrice;//产品单价
-    var choose_plactice = this.data.choose_plactice;//选择的做法no【单选】
-    var flavore = this.data.flavor;//做法数组
-    var plactice = this.data.plactice;//口味数组
-    console.log(choose_plactice);
-    console.log(plactice);
-    if (flavore) {
-      for (let i = 0; i < flavore.length; i++) {
-        if (flavore[i]['is_select'] == "true") {
-          spec_price = spec_price * 1 + flavore[i]['price'] * 1;
-        }
-      }
-    }
-    if (plactice && choose_plactice) {
-      for (let j = 0; j < plactice.length; j++) {
-        if (plactice[j]['add_id'] == choose_plactice) {
-          spec_price = spec_price * 1 + plactice[j]['price'] * 1;
-        }
-      }
-    }
-    console.log(spec_price + "///" + chooseProductPrice);
-    this.setData({
-      chooseProductSpecPrice: spec_price * 1 + chooseProductPrice * 1
-    })
-  },
-  getChooseAdd: function () {
-    var flavore = this.data.flavor;//做法数组
-    var choose_plactice = this.data.choose_plactice;//选择的做法no【单选】
-    var plactice = this.data.plactice;//口味数组
-    console.log(choose_plactice);
-    console.log(plactice);
-    var arr = [];
-    var j = 0;
-    if (flavore) {
-      for (let i = 0; i < flavore.length; i++) {
-        if (flavore[i]['is_select'] == "true") {
-          arr[j] = flavore[i]['add_id'];
-          j++;
-        }
-      }
-    }
-    if (choose_plactice) {
-      arr.push(choose_plactice);
-    }
-    return arr;
-  },
-  productDetail:function(e){
-    var product_no = e.target.dataset.no;
-    wx.navigateTo({
-      url: '../indexbaixiong/productDetail/productDetail?product_no=' + product_no
-    })
   },
-  packages: function (e) {
-    var package_id = e.target.dataset.id;
-    var product_no = e.target.dataset.no;
-    var haveChooseProduct = this.data.haveChooseOrderDetail;
-    var choose_num = 0;
-    var that = this;
-    if (package_id > 0) {
+  
+  startOrder: function (e) {
+
+    if(this.data.cartList.length>0){
       wx.navigateTo({
-        url: '../indexbaixiong/package/package?package_id=' + package_id + '&product_no=' + product_no
+        url: '/pages/foodOrder/foodOrder?tableId='+this.data.tableId+"&storeId="+this.data.storeId+"&cartId="+this.data.cartId
       })
-    } else {
-      // 不可以重复下单
-      this.setData({
-        canChooseProduct:false
+    }else{
+      wx.showModal({
+        content: '请选择产品',
       })
-      this.chooseProduct(product_no, '');
     }
-
-  },
-  chooseProduct: function (product_no, add) {
-
-    var order_no = wx.getStorageSync('order_no');
-    var tableInfo = wx.getStorageSync('tableInfo');
-    var add = JSON.stringify(add);
-    wx.showLoading({
-      title: '加入购物车',
-      mask: true
-    });
-    console.log('<-----------here----------->');
-    var haveChooseProduct = this.data.haveChooseOrderDetail;
-    var that = this;
-    wx.request({
-      url: app.globalData.base_url + '/smdd/index/OrderDetail',//上线的话必须是https,没有appId的本地请求貌似不受影响
-      data: {
-        bloc_code: app.globalData.bloc_code,
-        product_no: product_no,
-        add_array: add,
-        order_no: order_no,
-        tableInfo: tableInfo,
-        store_id: wx.getStorageSync('store_id'),
-        mobile: wx.getStorageSync('mobile')
-      },
-      method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-      header: app.globalData.header, // 设置请求的 header
-      success: function (res) {
-        wx.hideLoading();
-         console.log(res.data.data);
-        // console.log(res.data.code);
-        if (res.data.code == '200') {
-          var list = res.data.data.productList;
-          var order_no = res.data.data.order_no;
-          wx.setStorageSync('order_no', order_no);
-          console.log(res.data.data.productList);
-          that.setData({
-            haveChooseOrderDetails: res.data.data.chooseProductList,
-            haveChooseNoCar: res.data.data.product,
-            haveChooseOrderDetail: list,
-            haveChooseOrderDetailNum: res.data.data.count,
-            menuBotDisplay:"block",
-            all_price: res.data.data.all_price,
-            remainDecMoney: res.data.data.remainDecMoney.remain,
-            remainDecMoneyReduce: res.data.data.remainDecMoney.dec,
-            remainDecMoneyHas: res.data.data.remainDecMoney.has
-          })
-
-          if (res.data.data.check_tying == true){
-            // that.setData({
-            //   tyingProduct_no: res.data.data.tyingProductList.product_no,
-            //   tyingSeries_id: res.data.data.tyingProductList.series_id
-            // })
-            if (res.data.data.tyingProductList.tips) {
-              var content = res.data.data.tyingProductList.tips;
-            } else {
-              var content = "亲," + res.data.data.tyingProductList.product_name + res.data.data.tyingProductList.tying_price + "元起~客官可随意挑选";
-            }
-            wx.showModal({
-              title: '',
-              content: content,
-              showCancel:true,
-              // cancelText:'cancel',
-              // confirmText:'sure',
-              success:function(e){
-                if(!e.cancel){
-                  wx.navigateTo({
-                    url: '../../pages/productDetail/productDetail?product_no=' + res.data.data.tyingProductList.tying_product_no + '&check=1&tying_price=' + res.data.data.tyingProductList.tying_price
-                  })
-                }
-              }
-            })
-          }
-        }else{
-          wx.showModal({
-            title: '提示',
-            content: res.data.msg,
-            showCancel:false
-          })
-        }
-        that.setData({
-          canChooseProduct:true
-        })
-      },
-    })
-  },
-  deleteProduct: function (e) {
-    wx.showLoading({
-      title: 'loading',
-      mask: true
-    })
-    var no = e.target.dataset.no;
-    var id = e.target.dataset.id;
-    var order_no = wx.getStorageSync('order_no');
-    var that = this;
-    console.log(no);
-    wx.request({
-      url: app.globalData.base_url + '/smdd/index/deleteProduct',//上线的话必须是https,没有appId的本地请求貌似不受影响
-      data: {
-        bloc_code: app.globalData.bloc_code,
-        product_no: no,//
-        order_no: order_no,
-        id: id
-      },
-      method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-      header: app.globalData.header, // 设置请求的 header
-      success: function (res) {
-        console.log(res);
-        if (res.data.code == '200') {
-          var list = res.data.data.productList;
-          that.setData({
-            haveChooseOrderDetail: list,
-            haveChooseOrderDetails: res.data.data.chooseProductList,
-            haveChooseNoCar: res.data.data.product,
-            haveChooseOrderDetailNum: res.data.data.count,
-            all_price: res.data.data.all_price,
-            remainDecMoney: res.data.data.remainDecMoney.remain,
-            remainDecMoneyReduce: res.data.data.remainDecMoney.dec,
-            remainDecMoneyHas: res.data.data.remainDecMoney.has
-          })
-          if (res.data.data.count > 0) {
-            that.setData({
-              menuBotDisplay: "block",
-            })
-          } else {
-            that.setData({
-              menuBotDisplay: "none",
-            })
-          }
-          if (res.data.data.first_check_tying == true){
-             wx.showModal({
-               title: '',
-               content: res.data.data.first_check_tying_name+"将被恢复原价",
-             })
-          }
-        }
-      }
-    })
-    wx.hideLoading();
-  },
-  start_order: function (e) {
-    // wx.requestSubscribeMessage({
-    //   tmplIds: ['JpCFOwqltafef9abxKme6LFXHA-i9lKH2Z7IbngLKu0'],
-    //   success(res) {
-    //     console.log(res);
-    //     console.log("111");
-    //   },
-    //   complete(ress) {
-    //     console.log(ress)
-    //     console.log("222");
-    //   }
-    // })
-    var order_no = wx.getStorageSync('order_no');
-if(this.data.haveChooseOrderDetails.length>0){
-  wx.navigateTo({
-    url: '/pages/order/order'
-  })
-}else{
-  wx.showModal({
-    content: '请选择产品',
-  })
-}
-    // if (order_no) {
-    // }
-  },
-  order: function () {
-    wx.navigateTo({
-      url: '../records/records'
-    })
-  },
-
-  clearAll: function () {
-    var order_no = wx.getStorageSync('order_no');
-    var that = this;
-    wx.showModal({
-      title: '提示',
-      content: "确定清除吗",
-      success: function (res) {
-        if (res.confirm) {
-          wx.showLoading({
-            title: 'loading',
-            mask: true
-          })
-          wx.request({
-            url: app.globalData.base_url + '/smdd/index/clearAll',//上线的话必须是https,没有appId的本地请求貌似不受影响
-            data: {
-              bloc_code: app.globalData.bloc_code,
-              order_no: order_no
-            },
-            method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-            header: app.globalData.header, // 设置请求的 header
-            success: function (res) {
-              if (res.data.code == '200') {
-                wx.setStorageSync('order_no', '');
-                that.setData({
-                  haveChooseOrderDetail: [],
-                  haveChooseOrderDetails: [],
-                  haveChooseNoCar:[],
-                  haveChooseOrderDetailNum: 0,
-                  all_price: 0
-                })
-              }
-              wx.hideLoading()
-            }
-          })
-        }
-      }
-    })
-  },
-  noStartOrder: function () {
-    wx.showModal({
-      title: '提示',
-      content: "请选择产品",
-      showCancel: false,
-      success: function (res) {
-        if (res.confirm) {
-          console.log('用户点击确定')
-        }
-      }
-    })
-  },
-  clickTuiImg:function(e){
-    console.log(e);
-  },
-    clickImg: function (e) {
-     var no = e.target.dataset.url;
-      if(no){
-        this.setData({
-          toView: "series" + no,
-          toViews: no,
-        })
-      }
-    console.log(e);
-  },
-
-  getPhoneNumber:function(e){
-    var store_id = this.data.store_id;
-    this.checkLogin(e,store_id);
-   // console.log(e.detail.encryptedData);
-  },
-  checkLogin:function(e,store_id){
-    var that=this;
-    wx.login({
-      success: function (res) {
-        var code = res.code;
-        console.log(res);
-        //console.log(111);
-        if(code){
-          wx.request({
-            url: app.globalData.base_url + '/smdd/index/getOpenid',//上线的话必须是https,没有appId的本地请求貌似不受影响
-            data: {
-              code: res.code,
-              encryptedData: e.detail.encryptedData,
-              iv: e.detail.iv,
-              types: "smdd",
-              "bloc_code": app.globalData.bloc_code,
-              api_code: app.globalData.bloc_code,
-            },
-            method: 'POST', // OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, CONNECT
-            header: app.globalData.header, // 设置请求的 header
-            success: function (res) {
-              console.log(res);
-              if (res.data.code == 400) {
-                wx.showModal({
-                  title: '提示',
-                  content: res.data.msg,
-                  success: function (res) {
-                    if (res.confirm) {
-                      console.log('用户点击确定')
-                    }
-                  }
-                })
-              } else {
-                wx.setStorageSync("mobile", res.data.data.mobile);
-                wx.setStorageSync("openid", res.data.data.openid);
-                that.setData({
-                  check_mobile: true
-                })
-
-                //console.log(res.data.data.openid);
-                // if (!store_id) {
-                  /*
-                wx.redirectTo({
-                  url: '../getIntoUser/getIntoUser',
-                })
-                */
-
-                // } else {
-                //   wx.redirectTo({
-                //     url: '../index/index',
-                //   })
-                // }
-              }
-            },
-            fail: function () {
-              // fail
-            },
-            complete: function () {
-              // complete
-            }
-          })
-        }else{
-          var check_num = that.check_num * 1+1*1;
-          if(check_num>2){
-            wx.showModal({
-              title: '',
-              content: '授权失败,请退出重试',
-            })
-          }else{
-            that.setData({
-              check_num: check_num,
-            });
-            that.getPhoneNumber(e);
-          }
-        }
-
-      }
-    })
-  },
-
-  getMobile: function () {
-    var mobile = wx.getStorageSync('mobile');
-          wx.setStorageSync('check_go_where', 'index');
-          if (!mobile) {
-            wx.navigateTo({
-              url: '../getInto/getInto',
-            })
-          } else {
-            wx.navigateTo({
-              url: '../getIntoUser/getIntoUser',
-            })
-          }
-  },
-  getMobileX: function () {
-    var mobile = wx.getStorageSync('mobile');
-          //点击取消,默认隐藏弹框
-          wx.setStorageSync('check_go_where', 'index');
-          if (!mobile) {
-            wx.navigateTo({
-              url: '../getInto/getInto',
-            })
-          } else {
-            wx.navigateTo({
-              url: '../getIntoUser/getIntoUser',
-            })
-          }
-  },
-
-  handleTabClick: function (e) {
-    let index = e.currentTarget.dataset.index;
-    this.activeTab(index);
-    this.setData({ activeTab: index });
-  },
-  handleSwiperChange: function (e) {
-    var index = e.detail.current;
-    this.activeTab(index);
-    this.setData({ activeTab: index });
+    
   },
+ 
   activeTab: function (_activeTab) {
     var len = this.data.series.length;
     if (len === 0) return;

+ 22 - 38
pages/food/food.wxml

@@ -10,9 +10,9 @@
                </view>
             </block>
          </scroll-view>
-         <view class="icon">
+         <!-- <view class="icon">
             <icon class="icon-small" type="search" size="18" color="black"></icon>
-         </view>
+         </view> -->
      </view>
      <swiper class="product_list" current="{{activeTab}}" duration="600" bindchange="handleSwiperChange" circular="true" >
          <swiper-item wx:for="{{series}}" skip-hidden-item-layout="true" >
@@ -21,9 +21,7 @@
                 <block wx:for="{{currentProductList[index]}}" wx:key="product_id" wx:for-index="idx">
                 <view class="product-info">
                   <block wx:if="{{item.productName}}">
-                   <view class="product_img_dir">
-                      <image  class="product_img" wx:if="{{!item.productImg}}" src="{{idx > 1 ? '../../images/good.png': '../../images/good2.png'}}" ></image>
-                      
+                   <view class="product_img_dir"> 
                      <image class="product_img" wx:if="{{item.productImg}}" src="{{item.productImg}}"></image>
                      </view>
                    <view class="good_name">
@@ -32,8 +30,7 @@
                    <view class="good_price">¥{{item.currentPrice}}
                    </view>
                    <view class="add-cart">
-                     <image bindtap="packages"  data-id="{{item.is_package}}" data-price="{{item.currentPrice}}" data-no="{{item.id}}" class="add-cart-size" src='../../images/jias.png'></image>
-                  
+                     <image bindtap="updateCartClick"  data-type ="1" data-no="{{item.id}}" class="add-cart-size" src='../../images/jias.png'></image>
                    </view>
                   </block>
                 </view>
@@ -47,16 +44,16 @@
             <image class="cart-icon-size" src="../../images/cart.png"></image>
          </view>
          <view class="cart-num cart-mar" bindtap="openCartDialog" data-type="open">
-            <text class="cart-num-txt" wx:if="{{haveChooseOrderDetails.length == 0}}">购物车空空如也~~~</text>
-            <text class="cart-num-txt" wx:if="{{haveChooseOrderDetails.length > 0}}">已点{{haveChooseOrderDetailNum}}个产品,点击查看详情</text>
+            <text class="cart-num-txt" wx:if="{{cartList.length == 0}}">购物车空空如也~~~</text>
+            <text class="cart-num-txt" wx:if="{{cartList.length > 0}}">已点{{cartListNum}}个商品,点击查看详情</text>
          </view>
-         <view class="buy-cart cart-mar" bindtap="start_order" wx:if="{{check_mobile}}">
+         <view class="buy-cart cart-mar" bindtap="startOrder">
             <text class="buy-cart-txt">点好了</text>
          </view>
          
-         <view class="buy-cart cart-mar" wx:if="{{!check_mobile}}">
+         <!-- <view class="buy-cart cart-mar" wx:if="{{!check_mobile}}">
             <button class="buy-cart-txt" style="background:none" open-type='getPhoneNumber' bindgetphonenumber="getPhoneNumber">点好了</button> 
-         </view>
+         </view> -->
      </view>
  </view>
 
@@ -67,52 +64,39 @@
   <view class="weui-mask init" wx:if="{{mask}}" bindtap="openCartDialog" data-type="close"></view>
   <view class="weui-half-screen-dialog cart-dialog">
     <view class="weui-half-screen-dialog__hd cart-hd" >
-       <view class="discount-txt" wx:if="{{remainDecMoneyHas>0}}">已为您减免{{remainDecMoneyHas}}元</view>
-       <view class="discount-txt" wx:if="{{!remainDecMoneyHas>0 && !remainDecMoney>0}}"></view>
-       <view class="discount-txt" wx:if="{{remainDecMoney>0}}">再点{{remainDecMoney}}元,可减免{{remainDecMoneyReduce}}元</view>
- 
-      <!-- <view class="weui-half-screen-dialog__hd__side" bindtap="close" data-type="close"> -->
+       <view class="discount-txt">已点{{cartListNum}}个商品</view>
       <view bindtap="openCartDialog" data-type="close">
         <view class=" weui-icon-btn_close">关闭</view>
         </view>
-      <!-- </view> -->
+    
     </view>
     <view class="weui-half-screen-dialog__bd" style="margin-top: 81rpx;max-height: 633rpx;">
       <block>     
-         <view wx:for="{{haveChooseOrderDetails}}" class="weui-half-screen-dialog__desc cart-bd">
-           <image class="cart-good-img" wx:if="{{item.img}}" src="{{base_img_url}}{{item.img}}"></image>
-           <image class="cart-good-img" wx:if="{{!item.img}}" src="../../images/good.png"></image>
+         <view wx:for="{{cartList}}" class="weui-half-screen-dialog__desc cart-bd">
+           <image class="cart-good-img"  src="{{item.productImg}}"></image>
            <view class="cart-info">
               <view class="cart-good-name">
-                 {{item.product_name}}
+                 {{item.productName}}
               </view>
-              <view wx:if="{{item.add}}">
-                <text wx:for="{{item.add}}" wx:for-item="add_item" style="margin-left:30rpx;font-weight:normal;font-size:30rpx">{{add_item.add_name}}</text>
-              </view>
-
               <view class="cart-good-row">
-                 <view class="cart-good-price">{{item.product_price}}</view>
+                 <view class="cart-good-price">{{item.currentPrice}}</view>
                  <view class="cart-good-jia">
-                   <image class="add-cart-size" bindtap="{{canChooseProduct?'packages':''}}" wx:if="{{item.check_add == false}}" data-id="{{item.is_package}}" data-no="{{item.product_no}}" src='../../images/jias.png' ></image>
-                   <image class="add-cart-size" bindtap="{{canChooseProduct?'packages':''}}" wx:if="{{item.check_add == true}}" data-id="{{item.is_package}}" data-no="{{item.product_no}}" src='../../images/jias.png' ></image>
-                    <text class="cart-good-num">{{item.choose_num}}</text>
-                    <image class="add-cart-size" bindtap="deleteProduct" data-id="{{item.order_detail_id}}" data-no="{{item.product_no}}" src='../../images/cart-jian.png' ></image>
-
-
-
+                   <image class="add-cart-size" bindtap="updateCartClick" data-type="1" data-no="{{item.productId}}" src='../../images/jias.png' ></image>
+                    <text class="cart-good-num">{{item.num}}</text>
+                    <image class="add-cart-size" bindtap="updateCartClick" data-type="2" data-no="{{item.productId}}" src='../../images/cart-jian.png' ></image>
                  </view>
               </view>
            </view>
          </view>
       </block>
     </view>
-    <view class="weui-half-screen-dialog__ft" style="height: 50rpx;" wx:if="{{check_mobile}}" bindtap="start_order">
+    <view class="weui-half-screen-dialog__ft" style="height: 50rpx;"  bindtap="startOrder">
       <button type="warn">去支付 </button>
     </view>
 
-         <view class="weui-half-screen-dialog__ft" wx:if="{{!check_mobile}}">
-            <button style="color: #fff;background-color: #e64340;" open-type='getPhoneNumber' bindgetphonenumber="getPhoneNumber">去支付</button> 
-         </view>
+   <!-- <view class="weui-half-screen-dialog__ft" wx:if="{{!check_mobile}}">
+      <button style="color: #fff;background-color: #e64340;" open-type='getPhoneNumber' bindgetphonenumber="getPhoneNumber">去支付</button> 
+   </view> -->
 
   </view>
 </view>

+ 3 - 2
pages/food/food.wxss

@@ -857,15 +857,16 @@ width: 100%;
   line-height: 90rpx;
   z-index: 9999;
   opacity: 0.9;
-  width: 92%;
+  width: 100%;
   display: inline-flex;
 }
 
 .menu_item{
-    padding: 0 17rpx;
     height: 90rpx;
     display: inline-block;
     background: #d3c2b8;
+    min-width: 25%;
+    text-align: center;
 }
 .weui-tabs-bar__title{display:inline-block;border-bottom-width:2px;border-bottom-style:solid;border-bottom-color:transparent}
 

+ 105 - 0
pages/foodOrder/foodOrder.js

@@ -0,0 +1,105 @@
+
+const app = getApp()
+import {
+  default as productApi
+} from "../../api/product"
+import {
+  default as storeApi
+} from "../../api/store"
+import {
+  default as orderApi
+} from "../../api/order"
+Page({
+  data: { 
+  
+    is_confirms:true,
+    cartList:[]
+  },
+  onShow:function(){
+    this.setData({
+      is_confirms:true
+    })
+  },
+    // 获取购物车
+    getCart: async function(){
+      let self = this;
+      let data = {
+        tableId: this.data.tableId,
+        storeId: this.data.storeId
+      }
+      const rs = await productApi.getCart(data)
+      
+      self.setData({
+        cartId:rs.id,
+        cartList:rs.list
+      })
+    },
+  onLoad : async function (options) {
+    this.setData({
+      tableId:options.tableId,
+      storeId:options.storeId,
+    })
+    const rs = await storeApi.getStoreById(options.storeId)
+      this.setData({
+        storeInfo: rs.info
+      })
+
+       this.getCart();
+
+    wx.showLoading({
+      title: 'loading',
+      mask:true
+    });
+    
+  },
+  showMoreHandle:function(){
+      this.setData({
+        showMore:!this.data.showMore
+      })
+  },
+  
+  confirms:async function(){
+    wx.showLoading({
+      title: 'loading',
+      mask:true
+    });
+    this.setData({
+      is_confirms:false
+    })
+    let self = this;
+    let data = {
+      productIdAndNum : cartList,
+      storeId: self.data.shopId,
+      mobile: self.data.mobile
+    }
+    const rs = await orderApi.createFoodOrder(data)
+    let orderId = rs.orderId;
+    wx.requestPayment({
+      timeStamp: rs.timeStamp,
+      nonceStr: rs.nonceStr,
+      package: rs.package,
+      signType: rs.signType,
+      paySign: rs.paySign,
+      success (res) {
+        setTimeout(()=>{
+          wx.navigateTo({
+            url: '../order/order?id=' + orderId,
+          })
+        },2000) 
+      },
+      fail (res) { 
+        wx.navigateTo({
+          url: '../order/order?id=' + orderId,
+        })
+      }
+    })
+   
+  },
+
+
+  goMenu(){
+    wx.navigateBack({
+      delta: 1
+    })
+  }
+})

+ 3 - 0
pages/foodOrder/foodOrder.json

@@ -0,0 +1,3 @@
+{
+  "navigationBarTitleText": "订单"
+}

+ 60 - 0
pages/foodOrder/foodOrder.wxml

@@ -0,0 +1,60 @@
+
+<view class="weui-flex main">
+  <view class="order-info weui-flex">
+    <view class="table order-info-wth">
+      <text class="tab-txt">桌台号:{{tableId}}</text>
+    </view>
+    <view class="shop order-info-wth">
+      <text class="shop-name">{{storeInfo.storeName}}</text>
+      <view class="go-menu" bindtap="goMenu">
+        继续点餐
+      </view>
+    </view>
+
+    <view class="good-list order-info-wth">
+      <view class="line"></view>
+        <view class="good-tran">
+          <view class="left-border"></view>
+          <view class="tran-txt">待提交的商品</view>
+        </view>
+        <view class="good-info" wx:for="{{cartList}}">
+          <view style="width:160rpx;float:left">
+            <image class="img-size" src="{{item.productImg}}"></image>
+          </view>
+          <view class="info-db">
+             <view class="good-name">
+               {{item.productName}}
+              </view>
+            
+            <view class="row">
+              <view class="good-money">¥{{item.currentPrice}}</view>
+              <view class="good-num">x{{item.num}}</view>
+            </view>
+          </view>
+        </view>
+    </view>
+    <view class="good-price order-info-wth">
+      <text class="total-money">¥{{price}}</text>
+      <text class="total-txt">总价</text>
+    </view>
+   
+    <!-- <view class=" weui-cell_access remark order-info-wth" bindtap="remarkHandle">
+      <text style="margin-left: 14rpx;">备注</text>
+      <view  style="display: flex;">
+        <text>填写备注要求</text>
+      <view class="weui-cell__ft weui-cell__ft_in-access" style="margin-right: 17rpx;"></view>
+      </view>
+    </view> -->
+    <!-- <view wx:if="{{showRemark}}"   class="order-info-wth"  style="margin-bottom: 10rpx;">
+      <input style="height: 100rpx;background-color: #FFF;" bindinput="getRemarkCon"></input>
+    </view> -->
+    <view style="height:200rpx;"></view>
+  </view>
+</view>
+
+  <view class="order-info-ft">
+    <!-- <view class="ft-p">¥</view> -->
+    <!-- <view class="ft-price">{{price}}</view> -->
+    <!-- <view class="discount">已优惠{{discount_price}}</view> -->
+    <button class="pay" type="warn" bindtap="{{is_confirms == true?'confirms':''}}">去支付</button>
+  </view>

+ 246 - 0
pages/foodOrder/foodOrder.wxss

@@ -0,0 +1,246 @@
+@import '../../weui-wxss/weui.wxss';
+page{
+  width: 100%;
+  height: 100%;
+  background: url("https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2856650628,4120182276&fm=26&gp=0.jpg") no-repeat;
+  background-size:100% 100%;
+  background-position: center center;
+}
+
+.main {
+  justify-content: space-between;
+  background: url("https://ss2.bdstatic.com/70cFvnSh_Q1YnxGkpoWK1HF6hhy/it/u=2856650628,4120182276&fm=26&gp=0.jpg") no-repeat;
+  background-size:100% 100%;
+  background-position: center center;
+}
+
+.order-info {
+  background-color: #f6f6f6;
+  flex-direction: column;
+  width: 96%;
+  margin-left: 16rpx;
+  align-items: center;
+  /* height: 1000rpx; */
+}
+
+.order-info-wth{
+  width: 96%;
+}
+
+.table {
+  background-color: #FFF;
+  height: 100rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  margin-top: 9rpx;
+  border-radius: 14rpx;
+}
+.tab-txt {
+  font-size: 35rpx;
+}
+.shop{
+  margin-top: 10rpx;
+  height: 120rpx;
+  background-color: #FFF;
+  display: flex;
+  justify-content: space-between;
+  align-items:  center;
+  border-top-left-radius: 12rpx;
+  border-top-right-radius: 12rpx;
+
+}
+.line{
+  border-top: 2rpx solid #ededed;
+  width: 93%;
+  height: 2rpx;
+  background-color: #FFF;
+  margin-left: 30rpx;
+}
+.shop-name {
+  margin-left: 20rpx;
+}
+.go-menu {
+  border: 2rpx solid #f96c36;
+  background-color: #FFF;
+  border-radius: 50rpx;
+  width: 194rpx;
+  height: 72rpx;
+  margin-right: 10rpx;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  color: #f96c36;
+  font-size: 29rpx;
+}
+
+.good-list {
+  background-color: #FFF;
+  height: auto;
+  /* overflow: scroll; */
+}
+
+.good-tran {
+  display: flex;
+  padding-top: 20rpx;
+}
+
+.left-border {
+  border-left: 6rpx solid #f96c36;
+  width: 10rpx;
+  height: 41rpx;
+  margin-top: 8rpx;
+}
+
+.tran-txt {
+  font-size: 36rpx;
+  color: #f96c36;
+  padding-left: 10rpx;
+}
+
+.img-size {
+  height: 120rpx;
+  width: 160rpx;
+}
+
+.good-info {
+  /* display: inline-flex; */
+  padding-top: 20rpx;
+  padding-left: 27rpx;
+  width: 93%;
+  clear: both;
+}
+
+.good-name {
+  font-weight: bold;
+  padding-left: 20rpx;
+  font-family: Microsoft yahei,Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
+}
+
+.good-num{
+  padding-right: 63rpx;
+  color: darkgray;
+}
+.good-price {
+  height: 89rpx;
+  background: #fff;
+  margin-top: 20rpx;
+  display: flex;
+  border-radius: 12rpx;
+  flex-direction: row-reverse;
+  align-items: center;
+}
+.total-money {
+  font-size: 40rpx;
+  margin-right: 10rpx;
+  font-weight: bold;
+}
+.total-txt {
+  margin-right: 30rpx;
+}
+.row {
+  display: flex;
+  flex-direction: row-reverse;
+  margin-bottom: 10rpx;
+}
+
+.info-db {
+  display: flex;
+  justify-content: space-between;
+  flex-direction: column;
+  /* width: 100%; */
+  width: 73%;
+margin-left: 1%;
+}
+.top{
+  margin-top: -55rpx;
+  margin-left: 75rpx;
+ }
+ .top::before{
+  content: '';
+  border-top: 10px transparent dashed;
+  border-left: 10px transparent dashed;
+  border-right: 10px transparent dashed;
+  border-bottom: 10px #efefef solid;
+ }
+ .top::before{
+  border-bottom: 10px #efefef solid;
+ }
+
+ .good-attr {
+  background-color: #efefef;
+  width: 647rpx;
+  height: 117rpx;
+  /* margin-left: 20rpx; */
+  margin-top: 12rpx;
+  border-radius: 13rpx;
+  display: flex;
+  justify-content: space-between;
+  align-items: center;
+ }
+
+ .attr-txt{
+   color: #969494;
+   margin-left: 10rpx;
+   font-size: 27rpx;
+ }
+
+ .good-attr-more{
+  border: 2rpx solid #969494;
+  width: 100rpx;
+  border-radius: 40rpx;
+  display: flex;
+  justify-content: center;
+  margin-right: 16rpx;
+ }
+ .remark{
+   background-color: #FFF;
+   margin-top: 20rpx;
+   height: 80rpx;
+   margin-bottom: 20rpx;
+   display: flex;
+   align-items: center;
+   justify-content: space-between;
+ }
+ .order-info-ft{
+  height: 100rpx;
+  background-color: #404040;
+  width: 96%;
+  bottom: 0rpx;
+  position: fixed;
+  display: inline-flex;
+  align-items: center;
+  margin-left: 2%;
+  }
+.good-money {
+  font-weight: bold;
+}
+ .ft-p  {
+  font-size: 26rpx;
+  color: #FFF;
+  margin-bottom: -6rpx;
+  margin-left: 10rpx;
+ }
+
+ .ft-price {
+  color: #FFF;
+  font-size: 37rpx;
+ }
+
+ .discount {
+  color: #a3a3a3;
+  font-size: 32rpx;
+  margin-left: 20rpx;
+
+ }
+
+ .pay {
+    width: 200rpx!important;
+    margin-right: 15rpx!important;
+    float:right!important;
+    background-color: #d81e06!important;
+    justify-content: center!important;
+    align-items: center!important;
+    color:#fff!important;
+    border-radius: 10rpx!important;
+ }

+ 6 - 0
project.private.config.json

@@ -47,6 +47,12 @@
           "pathName": "pages/food/food",
           "query": "store_id=128&table_id=27994",
           "scene": 1011
+        },
+        {
+          "name": "pages/foodOrder/foodOrder",
+          "pathName": "pages/foodOrder/foodOrder",
+          "query": "storeId=128&tableId=27994",
+          "scene": null
         }
       ]
     }