(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/index"],{"04c3":function(t,n,o){"use strict";o.r(n);var e=o("1d13"),i=o("b31f");for(var s in i)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return i[t]}))}(s);o("145f"),o("f260");var a=o("828b"),u=Object(a["a"])(i["default"],e["b"],e["c"],!1,null,"6eccc79f",null,!1,e["a"],void 0);n["default"]=u.exports},"145f":function(t,n,o){"use strict";var e=o("7fb0"),i=o.n(e);i.a},"1d13":function(t,n,o){"use strict";o.d(n,"b",(function(){return i})),o.d(n,"c",(function(){return s})),o.d(n,"a",(function(){return e}));var e={navBar:function(){return o.e("components/navBar/navBar").then(o.bind(null,"11bc"))},uSearch:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-search/u-search")]).then(o.bind(null,"62ff"))},uTabs:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-tabs/u-tabs")]).then(o.bind(null,"8a2d"))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"0456"))},uEmpty:function(){return Promise.all([o.e("common/vendor"),o.e("uni_modules/uview-ui/components/u-empty/u-empty")]).then(o.bind(null,"f5c5"))}},i=function(){var t=this.$createElement,n=(this._self._c,this.goodsList.length);this.$mp.data=Object.assign({},{$root:{g0:n}})},s=[]},"4cd3":function(t,n,o){"use strict";(function(t,n){var e=o("47a9");o("9c57");e(o("3240"));var i=e(o("04c3"));t.__webpack_require_UNI_MP_PLUGIN__=o,n(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"7fb0":function(t,n,o){},b31f:function(t,n,o){"use strict";o.r(n);var e=o("f5df"),i=o.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(s);n["default"]=i.a},c98b:function(t,n,o){},f260:function(t,n,o){"use strict";var e=o("c98b"),i=o.n(e);i.a},f5df:function(t,n,o){"use strict";(function(t){var e=o("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e(o("af34")),s={components:{},data:function(){return{formData:{keyword:"",status:0,page:1},tabList:[{name:"全部",id:0},{name:"销售中",id:1},{name:"已下架",id:2},{name:"审核中",id:3},{name:"审核不通过",id:4}],goodsList:[],operationIndex:-1}},onReachBottom:function(){this.formData.page++,this.getGoodsList()},onLoad:function(){this.getGoodsList()},methods:{getGoodsList:function(){var t=this;this.$util.get("merchant_admin/goods/getList",this.formData).then((function(n){1==n.code?1==t.formData.page?t.goodsList=n.data.list:t.goodsList=[].concat((0,i.default)(t.goodsList),(0,i.default)(n.data.list)):t.$util.toast(n.message)}))},refreshGoodsList:function(t){this.formData.page=1,this.goodsList=[],this.getGoodsList()},tabChange:function(t){this.formData.status=t.id,this.formData.page=1,this.getGoodsList()},searchGoods:function(){this.formData.page=1,this.getGoodsList()},addGoods:function(){t.navigateTo({url:"/pages/goods/postGoods"})},editGoods:function(n){t.navigateTo({url:"/pages/goods/postGoods?id="+n.id})},showOperation:function(t){-1==t||t==this.operationIndex?this.operationIndex=-1:this.operationIndex=t},deleteGoods:function(n){var o=this;t.showModal({title:"提示",content:"确定删除商品：《"+n.title+"》吗？",success:function(t){t.confirm&&o.$util.get("merchant_admin/goods/delete",{id:n.id}).then((function(t){1==t.code?(o.refreshGoodsList(!0),o.$util.toast(t.message)):o.$util.toast(t.message,2e3)}))}})}}};n.default=s}).call(this,o("df3c")["default"])}},[["4cd3","common/runtime","common/vendor"]]]);