(window.webpackJsonp=window.webpackJsonp||[]).push([[37],{415:function(e,t,r){},459:function(e,t,r){"use strict";var n=r(415);r.n(n).a},504:function(e,t,r){"use strict";r.r(t);r(30);var n=r(3),l={data:function(){return{ruleForm:{},rules:{},items:[],shows:!0,tab:"item",packages:[]}},mounted:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.getList();case 2:case"end":return t.stop()}}),t)})))()},methods:{submitForm:function(e){var t=this;switch(e){case"item":this.$post("/api/admin/user_credit/update_setting",{type:"item",content:JSON.stringify(this.items)}).then((function(e){t.$message({message:"更新成功",type:"success"})}));break;case"package":this.$post("/api/admin/user_credit/update_setting",{type:"package",content:this.packages}).then((function(e){t.$message({message:"更新成功",type:"success"})}))}},getList:function(){var e=this;return Object(n.a)(regeneratorRuntime.mark((function t(){var r;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.$post("/api/admin/user_credit/get_credit_list",{page:1,size:100});case 2:r=t.sent,e.items=r.data.items,e.packages=r.data.packages;case 5:case"end":return t.stop()}}),t)})))()}}},c=(r(459),r(2)),component=Object(c.a)(l,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"vip-setting"}},[r("el-radio-group",{attrs:{size:"small"},model:{value:e.tab,callback:function(t){e.tab=t},expression:"tab"}},[r("el-radio-button",{attrs:{label:"item"}},[e._v("技术信用")]),e._v(" "),r("el-radio-button",{attrs:{label:"package"}},[e._v("套餐配置")])],1),e._v(" "),"item"==e.tab?r("el-form",{ref:"ruleForm",staticStyle:{"padding-top":"1%"},attrs:{rules:e.rules}},[r("h3",[e._v("技术信用定价")]),r("br"),e._v(" "),e._l(e.items,(function(t,i){return[r("div",{staticStyle:{width:"150px","margin-bottom":"20px"}},[r("label",{staticStyle:{"margin-right":"20px"}},[e._v(e._s(t.name))])]),e._v(" "),r("div",{staticStyle:{"margin-left":"20px"}},[r("el-form-item",{attrs:{label:"原价(分)",prop:"original_price"}},[r("el-input",{attrs:{type:"number"},model:{value:e.items[i].original_price,callback:function(t){e.$set(e.items[i],"original_price",t)},expression:"items[i].original_price"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"现价(分)",prop:"real_price"}},[r("el-input",{attrs:{type:"number"},model:{value:e.items[i].real_price,callback:function(t){e.$set(e.items[i],"real_price",t)},expression:"items[i].real_price"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"can_buy"}},[r("el-checkbox",{attrs:{label:"支持购买"},model:{value:e.items[i].status_bool,callback:function(t){e.$set(e.items[i],"status_bool",t)},expression:"items[i].status_bool"}})],1)],1),e._v(" "),r("br")]})),e._v(" "),r("br"),e._v(" "),r("el-form-item",{attrs:{"label-width":"150px"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("item")}}},[e._v("保存")])],1)],2):e._e(),e._v(" "),"package"==e.tab?r("el-form",{ref:"ruleForm",staticStyle:{"padding-top":"1%"},attrs:{rules:e.rules}},[r("h3",[e._v("套餐定价")]),r("br"),e._v(" "),e._l(e.packages,(function(t,i){return[r("el-form-item",{attrs:{label:t.name}},[r("el-form-item",{attrs:{label:"原价(分)",prop:"original_price"}},[r("el-input",{attrs:{disabled:"",type:"number"},model:{value:e.packages[i].original_price,callback:function(t){e.$set(e.packages[i],"original_price",t)},expression:"packages[i].original_price"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"现价(分)",prop:"real_price"}},[r("el-input",{attrs:{type:"number"},model:{value:e.packages[i].real_price,callback:function(t){e.$set(e.packages[i],"real_price",t)},expression:"packages[i].real_price"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"套餐内容",prop:"real_price"}},[r("el-input",{model:{value:e.packages[i].items,callback:function(t){e.$set(e.packages[i],"items",t)},expression:"packages[i].items"}})],1),e._v(" "),r("el-form-item",{attrs:{prop:"can_buy"}},[r("el-checkbox",{attrs:{label:"支持购买"},model:{value:e.packages[i].status_bool,callback:function(t){e.$set(e.packages[i],"status_bool",t)},expression:"packages[i].status_bool"}})],1)],1)]})),e._v(" "),r("br"),e._v(" "),r("el-form-item",{attrs:{"label-width":"150px"}},[r("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.submitForm("package")}}},[e._v("保存")])],1)],2):e._e()],1)}),[],!1,null,null,null);t.default=component.exports}}]);