chunk-347de826.a9ba3932.js 6.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-347de826"],{1233:function(t,e,a){"use strict";var o=a("1b1d"),s=a.n(o);s.a},"1b1d":function(t,e,a){},"3da4":function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"e",function(){return i}),a.d(e,"i",function(){return c}),a.d(e,"a",function(){return u}),a.d(e,"b",function(){return d}),a.d(e,"h",function(){return l}),a.d(e,"g",function(){return h}),a.d(e,"f",function(){return f}),a.d(e,"j",function(){return g}),a.d(e,"c",function(){return p});var o=a("8982"),s="/industryParkApi",n="/wx/WxParkGoodsOrderController";function r(t){return Object(o["a"])({url:s+n+"/getGoodsList",method:"post",data:t})}function i(t){return Object(o["a"])({url:s+n+"/getGoodsTypeList",method:"post",data:t})}function c(t){return Object(o["a"])({url:s+n+"/operateGoodsState",method:"post",data:t})}function u(t){return Object(o["a"])({url:s+n+"/addGoods",method:"post",data:t})}function d(t){return Object(o["a"])({url:s+n+"/getEatOutList",method:"post",data:t})}function l(t){return Object(o["a"])({url:s+n+"/getStoreList",method:"post",data:t})}function h(t){return Object(o["a"])({url:s+n+"/getOrderList",method:"post",data:t})}function f(t){return Object(o["a"])({url:s+n+"/getOrderDetial",method:"post",data:t})}function g(t){return Object(o["a"])({url:s+n+"/orderConsume",method:"post",data:t})}function p(t){return Object(o["a"])({url:s+n+"/getGoodsDetial",method:"post",data:t})}},"878a":function(t,e,a){"use strict";a.r(e);var o=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"meal"},[a("div",{staticClass:"part-1"},[a("van-dropdown-menu",[a("van-dropdown-item",{ref:"vanDropdownItemRef",attrs:{title:t.date},on:{open:t.dataOpen}}),a("van-popup",{attrs:{"close-on-click-overlay":!1,position:"bottom"},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[a("van-datetime-picker",{attrs:{type:"date"},on:{confirm:function(e){return t.onConfirm(e)},cancel:function(e){t.show=!1}},model:{value:t.currentDate,callback:function(e){t.currentDate=e},expression:"currentDate"}})],1),a("van-dropdown-item",{attrs:{options:t.storeList},on:{change:t.storeClick},model:{value:t.storeValue,callback:function(e){t.storeValue=e},expression:"storeValue"}})],1)],1),a("div",{staticClass:"white-box part-2"},[a("div",{staticClass:"box-left"},[a("van-sidebar",{model:{value:t.activeKey,callback:function(e){t.activeKey=e},expression:"activeKey"}},t._l(t.goodsTypeList,function(e){return a("van-sidebar-item",{key:e.id,attrs:{title:e.typeName},on:{click:function(a){return t.goodsTypeClick(e.id)}}})}),1)],1),a("div",{staticClass:"box-right"},t._l(t.goodsList,function(e){return a("div",{key:e,staticClass:"meal-item",on:{click:function(e){return t.goNavigator("orderAMeal-detail")}}},[a("div",{staticClass:"meal-left"},[a("img",{attrs:{src:e.goods_img,alt:""}}),a("span",{staticClass:"tips"},[t._v("新品")])]),a("div",{staticClass:"meal-right"},[a("div",{staticClass:"title"},[t._v("\n "+t._s(e.goods_name)+"\n ")]),a("div",{staticClass:"info"},[t._v("\n "+t._s(e.flavor)+", "+t._s(e.weight)+"\n ")]),a("div",{staticClass:"parice-box"},[a("div",{staticClass:"parice-left"},[t._v("¥"+t._s(e.price))]),a("div",{staticClass:"parcie-right"},[t._v("X"+t._s(e.sum_num))])])])])}),0)])])},s=[],n=(a("ac6a"),a("3da4")),r={data:function(){return{show:!1,minDate:new Date(2e3,0,1),maxDate:new Date(2222,0,31),date:"",currentDate:new Date,activeKey:0,groupId:"870261874875170816",goodsList:[],goodsTypeList:[],goodsTypeKey:"",storeList:[],value1:0,storeValue:"",option1:[{text:"2012-10-22",value:0}]}},mounted:function(){this.date=this.formatDate(new Date),this.getList(),this.getGoodsTypeList(),this.getStore()},methods:{dataOpen:function(){this.show=!0},formatDate:function(t){return"".concat(t.getFullYear(),"-").concat(t.getMonth()+1,"-").concat(t.getDate())},onConfirm:function(t){this.show=!1,this.date=this.formatDate(t),this.$refs.vanDropdownItemRef.toggle(),this.getList()},goodsTypeClick:function(t){this.goodsTypeKey=t,this.getList()},getGoodsTypeList:function(){var t=this,e={groupId:this.groupId};Object(n["e"])(e).then(function(e){t.goodsTypeList=[];var a={typeName:"全部",id:""};t.goodsTypeList.push(a),e.data.forEach(function(e){t.goodsTypeList.push(e)})})},storeClick:function(t){this.getList(t)},getStore:function(){var t=this,e={groupId:this.groupId};Object(n["h"])(e).then(function(e){t.storeList=[];var a={text:"全部",value:""};t.storeList.push(a),e.data.forEach(function(e){var a={text:e.storeName,value:e.id};t.storeList.push(a)})})},getList:function(t){var e=this,a={eatTime:this.date,storeId:t,goodsTypeId:this.goodsTypeKey,pageSize:10,pageNum:1};Object(n["b"])(a).then(function(t){e.goodsList=[],e.goodsList=t.data.list})}}},i=r,c=(a("1233"),a("2877")),u=Object(c["a"])(i,o,s,!1,null,"1e15ceb6",null);e["default"]=u.exports},8982:function(t,e,a){"use strict";a.d(e,"a",function(){return f}),a.d(e,"b",function(){return g});var o=a("795b"),s=a.n(o),n=a("bc3a"),r=a.n(n),i=a("4328"),c=a.n(i),u=a("4360"),d=a("5cab"),l=a("a18c"),h=a("3089");function f(t,e){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var a={method:t.method,url:t.url,data:c.a.stringify(t.data)};return e&&(a.data=t.data),t.headers&&(a.headers=t.headers),new s.a(function(e,o){r()(a).then(function(t){if(t&&t.data&&200===t.status){var a=t.data;switch(a.errno){case 501:Object(h["Toast"])(a.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),o(a.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(a.errmsg),o(a.errmsg);break}e(a)}else console.log(t),o(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(h["Toast"])(e),o(e,a)})})}function g(t){t.headers||(t.headers={}),t.headers&&d["a"].getToken()&&(t.headers["RC-Token"]=d["a"].getToken());var e={method:t.method,url:t.url};return e.data=t.data,t.headers&&(e.headers=t.headers,e.headers["MVVM-Key"]=String((new Date).getTime()),e.headers["xx"]="anything",e.headers["Content-Type"]="application/json;charset=UTF-8"),console.log("request: ",t),new s.a(function(a,o){r.a.defaults.withCredentials=!0,r()(e).then(function(t){if(console.log("response:",t),t&&t.data&&200===t.status){var e=t.data;switch(e.errno){case 501:Object(h["Toast"])(e.errmsg),setTimeout(function(){u["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),o(e.errmsg);break;case 401:case 402:case 502:case 503:case 504:case 505:case 506:case 507:case 508:case 801:Object(h["Toast"])(e.errmsg),o(e.errmsg);break}a(e)}else console.log(t),o(t)}).catch(function(e,a){console.log(t.url+" fail",e,a),Object(h["Toast"])(e),o(e,a)})})}}}]);