1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/app_admin/goods-cat/goods-cat"],{"1a4b":function(t,e,i){"use strict";i.r(e);var n=i("7db6"),c=i.n(n);for(var a in n)"default"!==a&&function(t){i.d(e,t,(function(){return n[t]}))}(a);e["default"]=c.a},2518:function(t,e,i){"use strict";var n=i("a441"),c=i.n(n);c.a},"49ef":function(t,e,i){"use strict";var n,c=function(){var t=this,e=t.$createElement;t._self._c},a=[];i.d(e,"b",(function(){return c})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return n}))},"7db6":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i("2f62");function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function a(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){s(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function s(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var l={data:function(){var t;return t={iphone_x:!1,cat:[],sec_list:[],third_list:[],list:[],index:[0,0,0]},s(t,"index",-1),s(t,"dialog",!1),s(t,"index_1",0),s(t,"index_2",0),s(t,"index_3",0),t},computed:a({},(0,n.mapState)({theme:function(t){return t.mallConfig.theme}})),methods:{cancel:function(){this.dialog=!1,sec_list=[],third_list=[],index_1=0,index_2=0,index_3=0},toAdd:function(){var t=this.cat[this.index_1],e=this.sec_list[this.index_2],i=this.third_list[this.index_3];"未选择"==e.label?this.list.push(t):"未选择"==i.label?this.list.push(e):this.list.push(i),this.dialog=!1},getCat:function(){var e=this;e.$request({url:e.$api.app_admin.cat}).then((function(i){e.$hideLoading(),0==i.code?e.cat=i.data.list:t.showToast({title:i.msg,icon:"none",duration:1e3})})).catch((function(t){e.$hideLoading()}))},delCat:function(t){this.list.splice(t,1)},bindChange:function(t){var e=this;e.index_1==t.detail.value[0]?e.index_2==t.detail.value[1]?e.index_3=t.detail.value[2]:(e.index_2=t.detail.value[1],e.index_3=0,e.third_list=[{label:"未选择",value:""}],e.sec_list[e.index_2].children&&(e.third_list=e.third_list.concat(e.sec_list[e.index_2].children))):(e.index_1=t.detail.value[0],e.index_2=0,e.index_3=0,e.sec_list=[{label:"未选择",value:""}],e.third_list=[{label:"未选择",value:""}],e.cat[e.index_1].children&&(e.sec_list=e.sec_list.concat(e.cat[e.index_1].children),e.sec_list[0].children&&(e.third_list=e.third_list.concat(e.sec_list[0].children))))},save:function(){t.setStorage({key:"goods_cat",data:this.list}),setTimeout((function(){t.navigateBack()}),500)},add:function(){this.dialog=!0,this.sec_list=[{label:"未选择",value:""}],this.third_list=[{label:"未选择",value:""}],this.cat[0].children&&(this.sec_list=this.sec_list.concat(this.cat[0].children),this.sec_list[0].children&&(this.third_list=this.third_list.concat(this.sec_list[0].children)))}},onLoad:function(e){var i=this;i.$showLoading({type:"global",text:"加载中..."}),t.getStorage({key:"goods_cat",success:function(t){i.list=t.data}}),t.getSystemInfo({success:function(t){(t.model.indexOf("iPhone X")>-1||t.model.indexOf("iPhone 11")>-1||t.model.indexOf("iPhone11")>-1||t.model.indexOf("iPhone12")>-1||t.model.indexOf("Unknown Device")>-1)&&(i.iphone_x=!0)}}),i.getCat()}};e.default=l}).call(this,i("543d")["default"])},a441:function(t,e,i){},b4bd:function(t,e,i){"use strict";i.r(e);var n=i("49ef"),c=i("1a4b");for(var a in c)"default"!==a&&function(t){i.d(e,t,(function(){return c[t]}))}(a);i("2518");var s,l=i("f0c5"),o=Object(l["a"])(c["default"],n["b"],n["c"],!1,null,"6add8286",null,!1,n["a"],s);e["default"]=o.exports},fec4:function(t,e,i){"use strict";(function(t){i("8748");n(i("66fd"));var e=n(i("b4bd"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,i("543d")["createPage"])}},[["fec4","common/runtime","common/vendor"]]]);
|