1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-0f50d5b4"],{1195:function(t,e,s){t.exports=s.p+"assets/img/avatar.13881c46.png"},"316e":function(t,e,s){"use strict";var a=s("f2d1"),o=s.n(a);o.a},"3da4":function(t,e,s){"use strict";s.d(e,"d",function(){return n}),s.d(e,"e",function(){return c}),s.d(e,"i",function(){return r}),s.d(e,"a",function(){return d}),s.d(e,"b",function(){return u}),s.d(e,"h",function(){return l}),s.d(e,"g",function(){return h}),s.d(e,"f",function(){return p}),s.d(e,"j",function(){return f}),s.d(e,"c",function(){return g});var a=s("8982"),o="/industryParkApi",i="/wx/WxParkGoodsOrderController";function n(t){return Object(a["a"])({url:o+i+"/getGoodsList",method:"post",data:t})}function c(t){return Object(a["a"])({url:o+i+"/getGoodsTypeList",method:"post",data:t})}function r(t){return Object(a["a"])({url:o+i+"/operateGoodsState",method:"post",data:t})}function d(t){return Object(a["a"])({url:o+i+"/addGoods",method:"post",data:t})}function u(t){return Object(a["a"])({url:o+i+"/getEatOutList",method:"post",data:t})}function l(t){return Object(a["a"])({url:o+i+"/getStoreList",method:"post",data:t})}function h(t){return Object(a["a"])({url:o+i+"/getOrderList",method:"post",data:t})}function p(t){return Object(a["a"])({url:o+i+"/getOrderDetial",method:"post",data:t})}function f(t){return Object(a["a"])({url:o+i+"/orderConsume",method:"post",data:t})}function g(t){return Object(a["a"])({url:o+i+"/getGoodsDetial",method:"post",data:t})}},8982:function(t,e,s){"use strict";s.d(e,"a",function(){return p}),s.d(e,"b",function(){return f});var a=s("795b"),o=s.n(a),i=s("bc3a"),n=s.n(i),c=s("4328"),r=s.n(c),d=s("4360"),u=s("5cab"),l=s("a18c"),h=s("3089");function p(t,e){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["a"].getToken());var s={method:t.method,url:t.url,data:r.a.stringify(t.data)};return e&&(s.data=t.data),t.headers&&(s.headers=t.headers),new o.a(function(e,a){n()(s).then(function(t){if(t&&t.data&&200===t.status){var s=t.data;switch(s.errno){case 501:Object(h["Toast"])(s.errmsg),setTimeout(function(){d["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),a(s.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"])(s.errmsg),a(s.errmsg);break}e(s)}else console.log(t),a(t)}).catch(function(e,s){console.log(t.url+" fail",e,s),Object(h["Toast"])(e),a(e,s)})})}function f(t){t.headers||(t.headers={}),t.headers&&u["a"].getToken()&&(t.headers["RC-Token"]=u["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 o.a(function(s,a){n.a.defaults.withCredentials=!0,n()(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(){d["a"].dispatch("user/logout").then(function(){l["a"].push("/login")})},1500),a(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),a(e.errmsg);break}s(e)}else console.log(t),a(t)}).catch(function(e,s){console.log(t.url+" fail",e,s),Object(h["Toast"])(e),a(e,s)})})}},dcb4:function(t,e,s){"use strict";s.r(e);var a=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"commodity"},[s("div",{staticClass:"part-1 white-box"},[s("div",{staticClass:"right-text"},[s("span",{on:{click:function(e){return t.goNavigator("meal-newProduct-app")}}},[t._v("新增商品 ")])]),s("div",{staticClass:"search-box"},[s("div",{staticClass:"search-input-box"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.requestParam.goodsName,expression:"requestParam.goodsName"}],attrs:{type:"text",placeholder:"名称模糊"},domProps:{value:t.requestParam.goodsName},on:{input:function(e){e.target.composing||t.$set(t.requestParam,"goodsName",e.target.value)}}})]),s("div",{staticClass:"search-icon-box"},[s("i",{staticClass:"iconfont icon-sousuo",on:{click:t.goodsSeach}})])])]),s("div",{staticClass:"white-box part-2"},[s("div",{staticClass:"box-left"},[s("van-sidebar",{model:{value:t.activeKey,callback:function(e){t.activeKey=e},expression:"activeKey"}},t._l(t.goodsTypeList,function(e){return s("van-sidebar-item",{key:e.id,attrs:{title:e.typeName},on:{click:function(s){return t.goodsTypeClick(e.id)}}})}),1)],1),s("div",{staticClass:"box-right"},t._l(t.goodsList,function(e){return s("div",{key:e.id,staticClass:"meal-item"},[s("div",{staticClass:"meal-left",on:{click:function(s){return t.editGoods(e.id)}}},[s("img",{attrs:{src:e.goodsImg,alt:""}}),s("span",{staticClass:"tips"},[t._v("新品")])]),s("div",{staticClass:"meal-right"},[s("div",{staticClass:"title",on:{click:function(s){return t.editGoods(e.id)}}},[s("span",{staticClass:"title-left"},[t._v(" "+t._s(e.goodsName)+" ")]),"2"==e.status?s("span",{staticClass:"title-right",staticStyle:{color:"#f9b052"}},[t._v("待上架")]):t._e(),"1"==e.status?s("span",{staticClass:"title-right",staticStyle:{color:"#bb8dff"}},[t._v("已上架")]):t._e()]),s("div",{staticClass:"tit"},[t._v("\n\t\t\t\t\t\t"+t._s(e.flavor)+"\n\t\t\t\t\t")]),s("div",{staticClass:"info"},[t._v("\n\t\t\t\t\t\t"+t._s(e.weight)+"\n\t\t\t\t\t")]),s("div",{staticClass:"parice-box"},[s("div",{staticClass:"parice-left"},[t._v("¥"+t._s(e.price))]),s("div",{staticClass:"parcie-right"},[s("van-checkbox",{attrs:{"checked-color":"#2A3980","icon-size":"16px"},on:{click:function(s){return t.itemClick(e)}},model:{value:e.checked,callback:function(s){t.$set(e,"checked",s)},expression:"item.checked"}})],1)])])])}),0)]),s("div",{staticClass:"bottom-meun"},[s("div",{staticClass:"menu-left",on:{click:function(e){return t.operateGoods(1)}}},[t._v("上架")]),s("div",{staticClass:"menu-right",on:{click:function(e){return t.operateGoods(2)}}},[t._v("下架")])])])},o=[],i=(s("6b54"),s("3da4")),n=s("3089"),c={data:function(){return{groupId:"870261874875170816",activeKey:0,goodsTypeKey:"",selectIds:[],goodsTypeList:[],requestParam:{pageNum:1,pageSize:10},goodsList:[],list:[{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"1",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"1",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"1",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"2",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"1",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"1",checked:!1,parice:15,num:10},{url:s("1195"),name:"基本套餐",info:"偏甜,1人份",tit:"早餐、中餐、晚餐",type:"3",checked:!1,parice:15,num:10}]}},created:function(){this.getGoodsTypeList()},methods:{getGoodsTypeList:function(){var t=this,e={groupId:this.groupId};Object(i["e"])(e).then(function(e){t.goodsTypeList=e.data,t.goodsTypeList!=[]&&t.goodsTypeList.length>0&&(t.goodsTypeKey=t.goodsTypeList[0].id,t.getGoodsList())})},goodsTypeClick:function(t){this.goodsTypeKey=t,this.getGoodsList()},goodsSeach:function(){this.getGoodsList()},getGoodsList:function(){var t=this;this.requestParam.goodsTypeId=this.goodsTypeKey,Object(i["d"])(this.requestParam).then(function(e){t.goodsList=e.data.list,t.total=e.total})},itemClick:function(t){if(t.checked)this.selectIds.push(t.id);else{var e=this.selectIds.indexOf(t.id);e>-1&&this.selectIds.splice(e,1)}},operateGoods:function(t){var e=this;if(this.selectIds.length<1)Object(n["Toast"])("请先勾选商品");else{var s={id:this.selectIds.toString(),state:t};Object(i["i"])(s).then(function(t){e.getGoodsList(),e.selectIds=[],Object(n["Toast"])("操作成功")})}},editGoods:function(t){var e={goodsId:t};this.$router.push({path:"/meal-app/newProduct",query:e})}}},r=c,d=(s("316e"),s("2877")),u=Object(d["a"])(r,a,o,!1,null,"2811e22a",null);e["default"]=u.exports},f2d1:function(t,e,s){}}]);
|