(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["admin/setting/level"],{3592:function(t,n,i){"use strict";i.r(n);var e=i("d694"),o=i.n(e);for(var r in e)["default"].indexOf(r)<0&&function(t){i.d(n,t,(function(){return e[t]}))}(r);n["default"]=o.a},"84e0":function(t,n,i){"use strict";var e=i("b5aa"),o=i.n(e);o.a},"869b":function(t,n,i){"use strict";i.r(n);var e=i("d64b"),o=i("3592");for(var r in o)["default"].indexOf(r)<0&&function(t){i.d(n,t,(function(){return o[t]}))}(r);i("84e0");var s,u=i("0095"),a=Object(u["a"])(o["default"],e["b"],e["c"],!1,null,"7d5ffd6c",null,!1,e["a"],s);n["default"]=a.exports},a293:function(t,n,i){"use strict";(function(t){i("6cdc");e(i("4a15"));var n=e(i("869b"));function e(t){return t&&t.__esModule?t:{default:t}}t(n.default)}).call(this,i("f3be")["createPage"])},b5aa:function(t,n,i){},d64b:function(t,n,i){"use strict";var e;i.d(n,"b",(function(){return o})),i.d(n,"c",(function(){return r})),i.d(n,"a",(function(){return e}));var o=function(){var t=this,n=t.$createElement,i=(t._self._c,t.$util.isEmpty(t.list)),e=i?t.$util.isEmpty(t.list):null;t.$mp.data=Object.assign({},{$root:{g0:i,g1:e}})},r=[]},d694:function(t,n,i){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;i("7736");var e=i("cf45"),o=i("caac"),r=function(){i.e("components/module/app-vip").then(function(){return resolve(i("d9e5"))}.bind(null,i)).catch(i.oe)},s=function(){i.e("components/app-wrapper-empty").then(function(){return resolve(i("c078"))}.bind(null,i)).catch(i.oe)},u=function(){i.e("components/plugin/modal").then(function(){return resolve(i("3a8f"))}.bind(null,i)).catch(i.oe)},a={name:"level-setting",components:{appVipModule:r,AppWrapperEmpty:s,ModalModule:u},data:function(){return{isModify:!1,list:[],addList:{level:0,growth:0,discount:0},showPrompt:!1}},onLoad:function(){},methods:{init:function(){this._getList()},_getList:function(){var t=this;return(0,o.getList)().then((function(n){var i=n.data;if(!i)return!1;t.isModify=0!=n.data.gradeSwitch,i=(0,e.bubbleSort)(i.list),t.list=i}))},delFn:function(t){if(0==t)return this.$msg("最少要保留一个"),!1;this.list.splice(t,1),this.$msg("删除成功!")},addFn:function(){var t=JSON.parse(JSON.stringify(this.addList));if(t.level=this.list.length+1,t.level>9)return this.$msg("最多9个等级"),!1;this.list.push(t)},confirmFn:function(){var t=this;for(var n in this.list)this.list[n].level=parseInt(n)+1;var i=[];for(var e in this.list){var r=this.list[e],s=r.level,u=r.growth,a=r.discount;i.push([s,u,a])}(0,o.updateLevel)({list:i}).then((function(n){t.isModify=!1,t.$msg("设置成功!"),t.showPrompt=!1}))},showPromptFn:function(){this.showPrompt=!0},promptModalClick:function(t){var n=t.index;0===n?this.showPrompt=!1:this.confirmFn()}}};n.default=a}},[["a293","common/runtime","common/vendor"]]]);