Commit fbe211cd authored by wangwei's avatar wangwei

续课 后台编辑

parent 73110c80
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.1295c42d8334d473da7d78ac3f2c8c0a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.fa3d3c6f98d02bf28af8.js></script><script type=text/javascript src=/static/js/vendor.f24ca1a9ea210948d5fd.js></script><script type=text/javascript src=/static/js/app.1b45806a154e61e86aa4.js></script></body><script>let el = document.getElementsByTagName("script");
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.1295c42d8334d473da7d78ac3f2c8c0a.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.fe562e5431101c149a4e.js></script><script type=text/javascript src=/static/js/vendor.f24ca1a9ea210948d5fd.js></script><script type=text/javascript src=/static/js/app.1b45806a154e61e86aa4.js></script></body><script>let el = document.getElementsByTagName("script");
el.onerror = function(a,b,c){
console.log('error:',a,b,c);
};
......
webpackJsonp([25],{"1djJ":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=o("CCn6"),i=o("+TkF"),n=o("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,goodsList:[],form:{name:"",goods_type:1,goods_desc:{desc:"",imgLesson:[],img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",img:[],refImg:[]},desc:{detail:"",qa:"",customer_service:[],after_goods_id:"",before_goods_id:""}},lessonList:[],goOn_goods_Id:{after_goods_id:"",before_goods_id:""}}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form)+"");switch(t.desc.before_goods_id=this.goOn_goods_Id.before_goods_id,t.desc.after_goods_id=this.goOn_goods_Id.after_goods_id,t.original_price=(100*t.original_price).toFixed(0),t.current_price=(100*t.current_price).toFixed(0),t.invite_earnings=(100*t.invite_earnings).toFixed(0),t.goods_desc=JSON.stringify(t.goods_desc),t.desc=JSON.stringify(t.desc),t.share_desc=JSON.stringify(t.share_desc),this.dialogObj.type){case 1:Object(s.Q)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(s.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},removeFileMain:function(e){var t=this.form.goods_desc.img.findIndex(function(t){return t.name===e.name});this.form.goods_desc.img.splice(t,1)},uploadFileLesson:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.imgLesson=[{name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}],t.$message({message:"上传成功",type:"success"})})},removeFileLesson:function(){this.form.goods_desc.imgLesson=[]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img.push({name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}),t.$message({message:"上传成功",type:"success"})})},removeFileShareRef:function(){this.form.share_desc.refImg=[]},uploadFileMainShareRef:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.refImg?t.form.share_desc.refImg[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.refImg=[],t.form.share_desc.refImg[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainService:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.desc.customer_service?t.form.desc.customer_service[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.desc.customer_service=[],t.form.desc.customer_service[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},initDialog:function(){var e=this;switch(Object(s._17)({limit:9999}).then(function(t){e.goodsList=t.list}),this.dialogObj.type){case 0:this.loading=!1,this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},this.getLessonList();break;case 1:case 2:this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},Object(s._16)(this.dialogObj.id).then(function(t){e.loading=!1;var o=JSON.parse(t.share_desc);o.refImg||(o.refImg=[]),e.form={name:t.name,goods_type:t.goods_type,goods_desc:JSON.parse(t.goods_desc),course_id:t.course_id,course_type:t.course_type,watch_num:t.watch_num,duration_num:t.duration_num,original_price:t.original_price/100,current_price:t.current_price/100,is_real:t.is_real,is_auth_user:t.is_auth_user,share_desc:JSON.parse(t.share_desc),desc:JSON.parse(t.desc),invite_earnings:t.invite_earnings/100,is_auth_teacher:t.is_auth_teacher},e.form.desc.before_goods_id&&(e.goOn_goods_Id.before_goods_id=e.form.desc.before_goods_id),e.form.desc.after_goods_id&&(e.goOn_goods_Id.after_goods_id=e.form.desc.after_goods_id),e.getLessonList()});break;case 3:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2}},changeLessonType:function(){this.getLessonList()},getLessonList:function(){var e=this;Object(s._18)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[o("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[o("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品名称"}},[o("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品描述"}},[o("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"课程类型"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[o("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),o("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"课程"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return o("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"观看时长(节)"}},[o("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续看时长(天)"}},[o("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"课程封面(750*600)"}},[o("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileLesson,"on-remove":e.removeFileLesson,limit:1,"file-list":e.form.goods_desc.imgLesson}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"主图(750*600)"}},[o("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMain,"on-remove":e.removeFileMain,"file-list":e.form.goods_desc.img}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"客服(200*200)"}},[o("el-upload",{staticClass:"upload-demo",class:e.form.desc.customer_service&&e.form.desc.customer_service.length>0?"uploadService":"",attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品类型"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[o("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),o("el-option",{attrs:{label:"团购商品",value:2}}),e._v(" "),o("el-option",{attrs:{label:"续课商品",value:3}})],1)],1)],1)],1),e._v(" "),3===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续课已购商品"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.before_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"before_goods_id",t)},expression:"goOn_goods_Id.before_goods_id"}},e._l(e.goodsList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续购商品"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.after_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"after_goods_id",t)},expression:"goOn_goods_Id.after_goods_id"}},e._l(e.goodsList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1)],1):e._e(),e._v(" "),1===e.form.goods_type?o("el-form-item",{attrs:{label:"推荐奖金(元)"}},[o("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),o("el-form-item",{attrs:{label:"是否配置实物"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),o("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"原价(元)":"单买价格(元)"}},[o("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[o("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"成团人数(人)"}},[o("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[o("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"分享标题"}},[o("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"分享内容"}},[o("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"分享主图(300*300)"}},[o("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.img,"http-request":e.uploadFileMainShare}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"分享海报"}},[o("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.refImg,"http-request":e.uploadFileMainShareRef}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:24}},[o("el-form-item",{attrs:{label:"商品详情"}},[o("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:24}},[o("el-form-item",{attrs:{label:"购买须知"}},[o("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])};l._withStripped=!0;var r={render:l,staticRenderFns:[]},c=r;var d=!1;var u=o("VU/8")(a,c,!1,function(e){d||o("7XPy")},"data-v-0134c3a4",null);u.options.__file="src\\components\\shop\\dialog.vue";var m=u.exports,f={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,chooseDialog:{show:!1,title:"",id:"",form:{value:"",list:[]},type:0},dialogObj:{type:0,show:!1,title:"",id:""},classList:[]}},components:{page:n.a,dialogCom:m},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser(),this.getClassList()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},onSizeChange:function(e){this.limit=e,this.nowPage=1,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.s)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="https://wechat-test.changchangenglish.com/#/buyDetail?shopId="+e,o=document.createElement("input");o.value=t,document.body.appendChild(o),o.select(),document.execCommand("Copy"),this.$message({message:"已成功复制到剪切板",type:"success"}),o.remove()},dialogSub:function(){var e=this;switch(this.chooseDialog.type){case 0:Object(s.o)(this.chooseDialog.id,this.chooseDialog.form.value).then(function(t){e.$message({message:"绑定成功",type:"success"}),e.chooseDialog.show=!1}),this.getUser();break;case 1:var t={conflict_goods_ids:this.chooseDialog.form.list.toString()};Object(s.r)(this.chooseDialog.id,t).then(function(t){e.$message({message:"设置成功",type:"success"}),e.chooseDialog.show=!1,e.getUser()})}},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),this.searchFrom.course_id&&(t.course_id=this.searchFrom.course_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.current_price&&(t.current_price=100*this.searchFrom.current_price),Object(s._17)(t).then(function(t){t.list.forEach(function(e){""===e.conflict_goods_ids?e.conflict_goods_ids=[]:e.conflict_goods_ids=e.conflict_goods_ids.split(",")}),e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.H)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s._53)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.J)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},bindOther:function(e){this.chooseDialog={show:!0,title:"绑定商品",id:e.id,form:{value:"",list:[]},type:0}},conflict:function(e){this.chooseDialog={show:!0,title:"冲突商品",id:e.id,form:{value:"",list:e.conflict_goods_ids},type:1}},getClassList:function(){var e=this;Object(s._18)({limit:2e3,page:1}).then(function(t){e.classList=t.list})}}},p=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"user"},[o("el-form",{ref:"searchFrom",staticClass:"search-form",attrs:{model:e.searchFrom,"label-width":"100px",inline:""}},[o("el-form-item",{attrs:{label:"商品名称"}},[o("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"课程"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.course_id,callback:function(t){e.$set(e.searchFrom,"course_id",t)},expression:"searchFrom.course_id"}},[o("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),e._l(e.classList,function(e,t){return o("el-option",{key:t,attrs:{label:e.title,value:e.id}})})],2)],1),e._v(" "),o("el-form-item",{attrs:{label:"商品状态"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},[o("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),o("el-option",{attrs:{value:"0",label:"编辑中"}}),e._v(" "),o("el-option",{attrs:{value:"1",label:"上架"}}),e._v(" "),o("el-option",{attrs:{value:"2",label:"下架"}})],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"商品现价/团购价","label-width":"120px"}},[o("el-input-number",{model:{value:e.searchFrom.current_price,callback:function(t){e.$set(e.searchFrom,"current_price",t)},expression:"searchFrom.current_price"}})],1),e._v(" "),o("el-form-item",[o("div",{staticClass:"search-btn-block"},[o("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-search"},on:{click:e.getUser}},[e._v("搜索")])],1)])],1),e._v(" "),o("div",{staticClass:"new-block"},[e.$store.state.readonly?e._e():o("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1),e._v(" "),o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[o("el-table-column",{attrs:{prop:"name",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("router-link",{attrs:{to:{name:"periods",query:{goods_id:t.row.id}}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),o("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-popover",{attrs:{placement:"top",width:"600"}},[o("div",{staticStyle:{"text-align":"center"}},[o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.copyUrl(t.row.id)}}},[e._v("\n 复制链接\n ")]),e._v(" "),e.$store.state.readonly?e._e():[2===t.row.status||0===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),1===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),o("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(o){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),o("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(o){e.copyShop(t.row)}}},[e._v("\n 复制商品\n ")]),e._v(" "),2===t.row.status?o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.bindOther(t.row)}}},[e._v("\n 绑定商品\n ")]):e._e(),e._v(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.conflict(t.row)}}},[e._v("\n 冲突商品\n ")]),e._v(" "),e.$store.state.deletePermission?o("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(o){e.onDel(t.row)}}},[e._v("\n 删除\n ")]):e._e()]],2),e._v(" "),o("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),o("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}}),e._v(" "),o("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}),e._v(" "),o("el-dialog",{attrs:{title:e.chooseDialog.title,visible:e.chooseDialog.show,width:"30%"},on:{"update:visible":function(t){e.$set(e.chooseDialog,"show",t)}}},[o("el-form",{ref:"form",attrs:{"label-width":"80px"}},[0===e.chooseDialog.type?o("el-form-item",{attrs:{label:"绑定商品"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.chooseDialog.form.value,callback:function(t){e.$set(e.chooseDialog.form,"value",t)},expression:"chooseDialog.form.value"}},e._l(e.userList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),1===e.chooseDialog.type?o("el-form-item",{attrs:{label:"冲突商品"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",multiple:""},model:{value:e.chooseDialog.form.list,callback:function(t){e.$set(e.chooseDialog.form,"list",t)},expression:"chooseDialog.form.list"}},e._l(e.userList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id.toString()}})}))],1):e._e()],1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.chooseDialog.show=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogSub()}}},[e._v("确 定")])],1)],1)],1)};p._withStripped=!0;var _={render:p,staticRenderFns:[]},g=_;var h=!1;var b=o("VU/8")(f,g,!1,function(e){h||o("Y727")},"data-v-7fddce5c",null);b.options.__file="src\\components\\shop\\index.vue";t.default=b.exports},"7XPy":function(e,t,o){var s=o("bG7/");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);o("rjj0")("4763fb45",s,!1,{})},Y727:function(e,t,o){var s=o("totp");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);o("rjj0")("5f457a2b",s,!1,{})},"bG7/":function(e,t,o){(e.exports=o("FZ+f")(!0)).push([e.i,"\n.el-col[data-v-0134c3a4] {\n min-height: 50px;\n text-align: center;\n margin-bottom: 10px;\n line-height: 40px;\n}\n.el-col .el-select[data-v-0134c3a4],\n.el-col .el-select[data-v-0134c3a4] {\n width: 100%;\n}\n.el-col img[data-v-0134c3a4] {\n width: 50px;\n border-radius: 100px;\n}\n.el-col label[data-v-0134c3a4] {\n color: #5982e6;\n}\n.dialog-footer[data-v-0134c3a4] {\n display: block;\n text-align: center;\n}\n.size[data-v-0134c3a4] {\n color: #666;\n font-size: 14px;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/shop/dialog.vue"],names:[],mappings:";AACA;EACE,iBAAiB;EACjB,mBAAmB;EACnB,oBAAoB;EACpB,kBAAkB;CACnB;AACD;;EAEE,YAAY;CACb;AACD;EACE,YAAY;EACZ,qBAAqB;CACtB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;EACf,mBAAmB;CACpB;AACD;EACE,YAAY;EACZ,gBAAgB;CACjB",file:"dialog.vue",sourcesContent:["\n.el-col[data-v-0134c3a4] {\n min-height: 50px;\n text-align: center;\n margin-bottom: 10px;\n line-height: 40px;\n}\n.el-col .el-select[data-v-0134c3a4],\n.el-col .el-select[data-v-0134c3a4] {\n width: 100%;\n}\n.el-col img[data-v-0134c3a4] {\n width: 50px;\n border-radius: 100px;\n}\n.el-col label[data-v-0134c3a4] {\n color: #5982e6;\n}\n.dialog-footer[data-v-0134c3a4] {\n display: block;\n text-align: center;\n}\n.size[data-v-0134c3a4] {\n color: #666;\n font-size: 14px;\n}\n"],sourceRoot:""}])},totp:function(e,t,o){(e.exports=o("FZ+f")(!0)).push([e.i,'\n.search-btn-block[data-v-7fddce5c] {\n margin-left: 20px;\n}\n.search-form[data-v-7fddce5c] {\n background: white;\n padding: 10px;\n margin: 10px 0;\n}\n.new-block[data-v-7fddce5c] {\n margin: 10px;\n text-align: right;\n}\n.fl-r[data-v-7fddce5c] {\n float: right;\n}\n.text-c[data-v-7fddce5c] {\n text-align: center;\n}\n.main-block[data-v-7fddce5c] {\n margin: 5px;\n background: white;\n padding: 5px;\n}\nhtml[data-v-7fddce5c] {\n font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\\5FAE\\8F6F\\96C5\\9ED1", Arial, sans-serif;\n}\n.clear-both[data-v-7fddce5c]:after {\n content: \'\';\n display: block;\n clear: both;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-track-piece {\n border-radius: 10px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-thumb {\n background-color: #999;\n border-radius: 10px;\n height: 10px;\n min-height: 10px;\n}\n.user[data-v-7fddce5c] {\n height: 100%;\n overflow: auto;\n padding: 20px 0;\n}\n.user .btn-content[data-v-7fddce5c] {\n text-align: center;\n}\n',"",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/shop/index.vue"],names:[],mappings:";AACA;EACE,kBAAkB;CACnB;AACD;EACE,kBAAkB;EAClB,cAAc;EACd,eAAe;CAChB;AACD;EACE,aAAa;EACb,kBAAkB;CACnB;AACD;EACE,aAAa;CACd;AACD;EACE,mBAAmB;CACpB;AACD;EACE,YAAY;EACZ,kBAAkB;EAClB,aAAa;CACd;AACD;EACE,0IAA0H;CAC3H;AACD;EACE,YAAY;EACZ,eAAe;EACf,YAAY;CACb;AACD;EACE,oBAAoB;CACrB;AACD;EACE,WAAW;EACX,YAAY;CACb;AACD;EACE,uBAAuB;EACvB,oBAAoB;EACpB,aAAa;EACb,iBAAiB;CAClB;AACD;EACE,aAAa;EACb,eAAe;EACf,gBAAgB;CACjB;AACD;EACE,mBAAmB;CACpB",file:"index.vue",sourcesContent:['\n.search-btn-block[data-v-7fddce5c] {\n margin-left: 20px;\n}\n.search-form[data-v-7fddce5c] {\n background: white;\n padding: 10px;\n margin: 10px 0;\n}\n.new-block[data-v-7fddce5c] {\n margin: 10px;\n text-align: right;\n}\n.fl-r[data-v-7fddce5c] {\n float: right;\n}\n.text-c[data-v-7fddce5c] {\n text-align: center;\n}\n.main-block[data-v-7fddce5c] {\n margin: 5px;\n background: white;\n padding: 5px;\n}\nhtml[data-v-7fddce5c] {\n font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;\n}\n.clear-both[data-v-7fddce5c]:after {\n content: \'\';\n display: block;\n clear: both;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-track-piece {\n border-radius: 10px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-thumb {\n background-color: #999;\n border-radius: 10px;\n height: 10px;\n min-height: 10px;\n}\n.user[data-v-7fddce5c] {\n height: 100%;\n overflow: auto;\n padding: 20px 0;\n}\n.user .btn-content[data-v-7fddce5c] {\n text-align: center;\n}\n'],sourceRoot:""}])}});
\ No newline at end of file
webpackJsonp([25],{"1djJ":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=o("CCn6"),i=o("+TkF"),n=o("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,goodsList:[],form:{name:"",goods_type:1,goods_desc:{desc:"",imgLesson:[],img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",img:[],refImg:[]},desc:{detail:"",qa:"",customer_service:[],after_goods_id:"",before_goods_id:""}},lessonList:[],goOn_goods_Id:{after_goods_id:"",before_goods_id:""}}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form)+"");switch(t.desc.before_goods_id=this.goOn_goods_Id.before_goods_id,t.desc.after_goods_id=this.goOn_goods_Id.after_goods_id,t.original_price=(100*t.original_price).toFixed(0),t.current_price=(100*t.current_price).toFixed(0),t.invite_earnings=(100*t.invite_earnings).toFixed(0),t.goods_desc=JSON.stringify(t.goods_desc),t.desc=JSON.stringify(t.desc),t.share_desc=JSON.stringify(t.share_desc),this.dialogObj.type){case 1:Object(s.Q)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(s.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},removeFileMain:function(e){var t=this.form.goods_desc.img.findIndex(function(t){return t.name===e.name});this.form.goods_desc.img.splice(t,1)},uploadFileLesson:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.imgLesson=[{name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}],t.$message({message:"上传成功",type:"success"})})},removeFileLesson:function(){this.form.goods_desc.imgLesson=[]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img.push({name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}),t.$message({message:"上传成功",type:"success"})})},removeFileShareRef:function(){this.form.share_desc.refImg=[]},uploadFileMainShareRef:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.refImg?t.form.share_desc.refImg[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.refImg=[],t.form.share_desc.refImg[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainService:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.desc.customer_service?t.form.desc.customer_service[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.desc.customer_service=[],t.form.desc.customer_service[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},initDialog:function(){var e=this;switch(Object(s._17)({limit:9999}).then(function(t){e.goodsList=t.list}),this.dialogObj.type){case 0:this.loading=!1,this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},this.getLessonList();break;case 1:case 2:this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},Object(s._16)(this.dialogObj.id).then(function(t){e.loading=!1;var o=JSON.parse(t.share_desc);o.refImg||(o.refImg=[]),e.form={name:t.name,goods_type:t.goods_type,goods_desc:JSON.parse(t.goods_desc),course_id:t.course_id,course_type:t.course_type,watch_num:t.watch_num,duration_num:t.duration_num,original_price:t.original_price/100,current_price:t.current_price/100,is_real:t.is_real,is_auth_user:t.is_auth_user,share_desc:JSON.parse(t.share_desc),desc:JSON.parse(t.desc),invite_earnings:t.invite_earnings/100,is_auth_teacher:t.is_auth_teacher},e.form.desc.before_goods_id&&(e.goOn_goods_Id.before_goods_id=e.form.desc.before_goods_id),e.form.desc.after_goods_id&&(e.goOn_goods_Id.after_goods_id=e.form.desc.after_goods_id),e.getLessonList()});break;case 3:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2}},changeLessonType:function(){this.getLessonList()},getLessonList:function(){var e=this;Object(s._18)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[o("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[o("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品名称"}},[o("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品描述"}},[o("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"课程类型"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[o("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),o("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"课程"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return o("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"观看时长(节)"}},[o("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续看时长(天)"}},[o("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"课程封面(750*600)"}},[o("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileLesson,"on-remove":e.removeFileLesson,limit:1,"file-list":e.form.goods_desc.imgLesson}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"主图(750*600)"}},[o("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMain,"on-remove":e.removeFileMain,"file-list":e.form.goods_desc.img}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"客服(200*200)"}},[o("el-upload",{staticClass:"upload-demo",class:e.form.desc.customer_service&&e.form.desc.customer_service.length>0?"uploadService":"",attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"商品类型"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[o("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),o("el-option",{attrs:{label:"团购商品",value:2}}),e._v(" "),o("el-option",{attrs:{label:"续课商品",value:3}})],1)],1)],1)],1),e._v(" "),3===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续课已购商品"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.before_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"before_goods_id",t)},expression:"goOn_goods_Id.before_goods_id"}},e._l(e.goodsList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"续购商品"}},[o("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.after_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"after_goods_id",t)},expression:"goOn_goods_Id.after_goods_id"}},e._l(e.goodsList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1)],1):e._e(),e._v(" "),1===e.form.goods_type||3===e.form.goods_type?o("el-form-item",{attrs:{label:"推荐奖金(元)"}},[o("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),o("el-form-item",{attrs:{label:"是否配置实物"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),o("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type||3===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[o("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"原价(元)":"单买价格(元)"}},[o("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[o("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"成团人数(人)"}},[o("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[o("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),o("el-row",[o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"分享标题"}},[o("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),o("el-col",{attrs:{span:12}},[o("el-form-item",{attrs:{label:"分享内容"}},[o("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"分享主图(300*300)"}},[o("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.img,"http-request":e.uploadFileMainShare}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-form-item",{attrs:{label:"分享海报"}},[o("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.refImg,"http-request":e.uploadFileMainShareRef}},[o("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:24}},[o("el-form-item",{attrs:{label:"商品详情"}},[o("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),o("el-row",[o("el-col",{attrs:{span:24}},[o("el-form-item",{attrs:{label:"购买须知"}},[o("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])};l._withStripped=!0;var r={render:l,staticRenderFns:[]},c=r;var d=!1;var u=o("VU/8")(a,c,!1,function(e){d||o("7XPy")},"data-v-0134c3a4",null);u.options.__file="src\\components\\shop\\dialog.vue";var m=u.exports,f={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,chooseDialog:{show:!1,title:"",id:"",form:{value:"",list:[]},type:0},dialogObj:{type:0,show:!1,title:"",id:""},classList:[]}},components:{page:n.a,dialogCom:m},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser(),this.getClassList()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},onSizeChange:function(e){this.limit=e,this.nowPage=1,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.s)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="https://wechat-test.changchangenglish.com/#/buyDetail?shopId="+e,o=document.createElement("input");o.value=t,document.body.appendChild(o),o.select(),document.execCommand("Copy"),this.$message({message:"已成功复制到剪切板",type:"success"}),o.remove()},dialogSub:function(){var e=this;switch(this.chooseDialog.type){case 0:Object(s.o)(this.chooseDialog.id,this.chooseDialog.form.value).then(function(t){e.$message({message:"绑定成功",type:"success"}),e.chooseDialog.show=!1}),this.getUser();break;case 1:var t={conflict_goods_ids:this.chooseDialog.form.list.toString()};Object(s.r)(this.chooseDialog.id,t).then(function(t){e.$message({message:"设置成功",type:"success"}),e.chooseDialog.show=!1,e.getUser()})}},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),this.searchFrom.course_id&&(t.course_id=this.searchFrom.course_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.current_price&&(t.current_price=100*this.searchFrom.current_price),Object(s._17)(t).then(function(t){t.list.forEach(function(e){""===e.conflict_goods_ids?e.conflict_goods_ids=[]:e.conflict_goods_ids=e.conflict_goods_ids.split(",")}),e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.H)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s._53)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.J)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},bindOther:function(e){this.chooseDialog={show:!0,title:"绑定商品",id:e.id,form:{value:"",list:[]},type:0}},conflict:function(e){this.chooseDialog={show:!0,title:"冲突商品",id:e.id,form:{value:"",list:e.conflict_goods_ids},type:1}},getClassList:function(){var e=this;Object(s._18)({limit:2e3,page:1}).then(function(t){e.classList=t.list})}}},p=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"user"},[o("el-form",{ref:"searchFrom",staticClass:"search-form",attrs:{model:e.searchFrom,"label-width":"100px",inline:""}},[o("el-form-item",{attrs:{label:"商品名称"}},[o("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1),e._v(" "),o("el-form-item",{attrs:{label:"课程"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.course_id,callback:function(t){e.$set(e.searchFrom,"course_id",t)},expression:"searchFrom.course_id"}},[o("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),e._l(e.classList,function(e,t){return o("el-option",{key:t,attrs:{label:e.title,value:e.id}})})],2)],1),e._v(" "),o("el-form-item",{attrs:{label:"商品状态"}},[o("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},[o("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),o("el-option",{attrs:{value:"0",label:"编辑中"}}),e._v(" "),o("el-option",{attrs:{value:"1",label:"上架"}}),e._v(" "),o("el-option",{attrs:{value:"2",label:"下架"}})],1)],1),e._v(" "),o("el-form-item",{attrs:{label:"商品现价/团购价","label-width":"120px"}},[o("el-input-number",{model:{value:e.searchFrom.current_price,callback:function(t){e.$set(e.searchFrom,"current_price",t)},expression:"searchFrom.current_price"}})],1),e._v(" "),o("el-form-item",[o("div",{staticClass:"search-btn-block"},[o("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-search"},on:{click:e.getUser}},[e._v("搜索")])],1)])],1),e._v(" "),o("div",{staticClass:"new-block"},[e.$store.state.readonly?e._e():o("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1),e._v(" "),o("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[o("el-table-column",{attrs:{prop:"name",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("router-link",{attrs:{to:{name:"periods",query:{goods_id:t.row.id}}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),o("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),o("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-popover",{attrs:{placement:"top",width:"600"}},[o("div",{staticStyle:{"text-align":"center"}},[o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.copyUrl(t.row.id)}}},[e._v("\n 复制链接\n ")]),e._v(" "),e.$store.state.readonly?e._e():[2===t.row.status||0===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),1===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),o("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(o){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),o("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(o){e.copyShop(t.row)}}},[e._v("\n 复制商品\n ")]),e._v(" "),2===t.row.status?o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.bindOther(t.row)}}},[e._v("\n 绑定商品\n ")]):e._e(),e._v(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.conflict(t.row)}}},[e._v("\n 冲突商品\n ")]),e._v(" "),e.$store.state.deletePermission?o("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(o){e.onDel(t.row)}}},[e._v("\n 删除\n ")]):e._e()]],2),e._v(" "),o("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),o("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}}),e._v(" "),o("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}),e._v(" "),o("el-dialog",{attrs:{title:e.chooseDialog.title,visible:e.chooseDialog.show,width:"30%"},on:{"update:visible":function(t){e.$set(e.chooseDialog,"show",t)}}},[o("el-form",{ref:"form",attrs:{"label-width":"80px"}},[0===e.chooseDialog.type?o("el-form-item",{attrs:{label:"绑定商品"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.chooseDialog.form.value,callback:function(t){e.$set(e.chooseDialog.form,"value",t)},expression:"chooseDialog.form.value"}},e._l(e.userList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),1===e.chooseDialog.type?o("el-form-item",{attrs:{label:"冲突商品"}},[o("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",multiple:""},model:{value:e.chooseDialog.form.list,callback:function(t){e.$set(e.chooseDialog.form,"list",t)},expression:"chooseDialog.form.list"}},e._l(e.userList,function(e){return o("el-option",{key:e.id,attrs:{label:e.name,value:e.id.toString()}})}))],1):e._e()],1),e._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(t){e.chooseDialog.show=!1}}},[e._v("取 消")]),e._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogSub()}}},[e._v("确 定")])],1)],1)],1)};p._withStripped=!0;var _={render:p,staticRenderFns:[]},g=_;var h=!1;var b=o("VU/8")(f,g,!1,function(e){h||o("Y727")},"data-v-7fddce5c",null);b.options.__file="src\\components\\shop\\index.vue";t.default=b.exports},"7XPy":function(e,t,o){var s=o("bG7/");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);o("rjj0")("4763fb45",s,!1,{})},Y727:function(e,t,o){var s=o("totp");"string"==typeof s&&(s=[[e.i,s,""]]),s.locals&&(e.exports=s.locals);o("rjj0")("5f457a2b",s,!1,{})},"bG7/":function(e,t,o){(e.exports=o("FZ+f")(!0)).push([e.i,"\n.el-col[data-v-0134c3a4] {\n min-height: 50px;\n text-align: center;\n margin-bottom: 10px;\n line-height: 40px;\n}\n.el-col .el-select[data-v-0134c3a4],\n.el-col .el-select[data-v-0134c3a4] {\n width: 100%;\n}\n.el-col img[data-v-0134c3a4] {\n width: 50px;\n border-radius: 100px;\n}\n.el-col label[data-v-0134c3a4] {\n color: #5982e6;\n}\n.dialog-footer[data-v-0134c3a4] {\n display: block;\n text-align: center;\n}\n.size[data-v-0134c3a4] {\n color: #666;\n font-size: 14px;\n}\n","",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/shop/dialog.vue"],names:[],mappings:";AACA;EACE,iBAAiB;EACjB,mBAAmB;EACnB,oBAAoB;EACpB,kBAAkB;CACnB;AACD;;EAEE,YAAY;CACb;AACD;EACE,YAAY;EACZ,qBAAqB;CACtB;AACD;EACE,eAAe;CAChB;AACD;EACE,eAAe;EACf,mBAAmB;CACpB;AACD;EACE,YAAY;EACZ,gBAAgB;CACjB",file:"dialog.vue",sourcesContent:["\n.el-col[data-v-0134c3a4] {\n min-height: 50px;\n text-align: center;\n margin-bottom: 10px;\n line-height: 40px;\n}\n.el-col .el-select[data-v-0134c3a4],\n.el-col .el-select[data-v-0134c3a4] {\n width: 100%;\n}\n.el-col img[data-v-0134c3a4] {\n width: 50px;\n border-radius: 100px;\n}\n.el-col label[data-v-0134c3a4] {\n color: #5982e6;\n}\n.dialog-footer[data-v-0134c3a4] {\n display: block;\n text-align: center;\n}\n.size[data-v-0134c3a4] {\n color: #666;\n font-size: 14px;\n}\n"],sourceRoot:""}])},totp:function(e,t,o){(e.exports=o("FZ+f")(!0)).push([e.i,'\n.search-btn-block[data-v-7fddce5c] {\n margin-left: 20px;\n}\n.search-form[data-v-7fddce5c] {\n background: white;\n padding: 10px;\n margin: 10px 0;\n}\n.new-block[data-v-7fddce5c] {\n margin: 10px;\n text-align: right;\n}\n.fl-r[data-v-7fddce5c] {\n float: right;\n}\n.text-c[data-v-7fddce5c] {\n text-align: center;\n}\n.main-block[data-v-7fddce5c] {\n margin: 5px;\n background: white;\n padding: 5px;\n}\nhtml[data-v-7fddce5c] {\n font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "\\5FAE\\8F6F\\96C5\\9ED1", Arial, sans-serif;\n}\n.clear-both[data-v-7fddce5c]:after {\n content: \'\';\n display: block;\n clear: both;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-track-piece {\n border-radius: 10px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-thumb {\n background-color: #999;\n border-radius: 10px;\n height: 10px;\n min-height: 10px;\n}\n.user[data-v-7fddce5c] {\n height: 100%;\n overflow: auto;\n padding: 20px 0;\n}\n.user .btn-content[data-v-7fddce5c] {\n text-align: center;\n}\n',"",{version:3,sources:["D:/myproject/changchang-admin-new/src/components/shop/index.vue"],names:[],mappings:";AACA;EACE,kBAAkB;CACnB;AACD;EACE,kBAAkB;EAClB,cAAc;EACd,eAAe;CAChB;AACD;EACE,aAAa;EACb,kBAAkB;CACnB;AACD;EACE,aAAa;CACd;AACD;EACE,mBAAmB;CACpB;AACD;EACE,YAAY;EACZ,kBAAkB;EAClB,aAAa;CACd;AACD;EACE,0IAA0H;CAC3H;AACD;EACE,YAAY;EACZ,eAAe;EACf,YAAY;CACb;AACD;EACE,oBAAoB;CACrB;AACD;EACE,WAAW;EACX,YAAY;CACb;AACD;EACE,uBAAuB;EACvB,oBAAoB;EACpB,aAAa;EACb,iBAAiB;CAClB;AACD;EACE,aAAa;EACb,eAAe;EACf,gBAAgB;CACjB;AACD;EACE,mBAAmB;CACpB",file:"index.vue",sourcesContent:['\n.search-btn-block[data-v-7fddce5c] {\n margin-left: 20px;\n}\n.search-form[data-v-7fddce5c] {\n background: white;\n padding: 10px;\n margin: 10px 0;\n}\n.new-block[data-v-7fddce5c] {\n margin: 10px;\n text-align: right;\n}\n.fl-r[data-v-7fddce5c] {\n float: right;\n}\n.text-c[data-v-7fddce5c] {\n text-align: center;\n}\n.main-block[data-v-7fddce5c] {\n margin: 5px;\n background: white;\n padding: 5px;\n}\nhtml[data-v-7fddce5c] {\n font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;\n}\n.clear-both[data-v-7fddce5c]:after {\n content: \'\';\n display: block;\n clear: both;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-track-piece {\n border-radius: 10px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n}\n[data-v-7fddce5c]::-webkit-scrollbar-thumb {\n background-color: #999;\n border-radius: 10px;\n height: 10px;\n min-height: 10px;\n}\n.user[data-v-7fddce5c] {\n height: 100%;\n overflow: auto;\n padding: 20px 0;\n}\n.user .btn-content[data-v-7fddce5c] {\n text-align: center;\n}\n'],sourceRoot:""}])}});
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,n,r){for(var t,b,o,i=0,u=[];i<a.length;i++)b=a[i],d[b]&&u.push(d[b][0]),d[b]=0;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);for(c&&c(a,n,r);u.length;)u.shift()();if(r)for(i=0;i<r.length;i++)o=f(f.s=r[i]);return o};var a={},d={39:0};function f(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=d[e]=[a,f]});c[2]=a;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,f.nc&&r.setAttribute("nonce",f.nc),r.src=f.p+"static/js/"+e+"."+{0:"682c9db1b596d6ccea80",1:"65d02bf3ab42eef3e8d1",2:"42cad276cc70c5a4a69e",3:"59785b64ab4d79c651ee",4:"db215147f8308b14e0a4",5:"022d5a21efe8f82f8d4e",6:"1741e48fb08b0a2de138",7:"afe7c14969ada89161f1",8:"23ed2abfb17f38e74608",9:"9ffac010c8948205dd5b",10:"5347820d51049bfcd023",11:"f34fc374ed35b0797ae9",12:"123af0a13c1eb163af46",13:"b1b323d5f92b483449a1",14:"4d751448decc0d1e79a5",15:"2adf7b1eb12e40ed3a15",16:"61cb723e6d73753b90da",17:"0001adbd2c61dbb2e0cd",18:"537b99b7140d87ae77ba",19:"5db37fafec06cc47f122",20:"5a44a3556475ecbb4569",21:"bc4925aefd8cb6035b47",22:"213279a76cd1f3ef71d2",23:"ff8b235c5eeaf1926bc1",24:"46b08a228ee5d6b085c3",25:"f50ed2c79c18970b2fc8",26:"8dc2dccb7b04d18c70c3",27:"ae7dce45182d6d0e528b",28:"fa4fa4448b5dd2b492a7",29:"d67b2b9bdacf7e220cf6",30:"7d604c1634a7f4842b5f",31:"7d605cd1ba3324f19fc7",32:"a71e52950e9219ad363f",33:"3dc8c2fce74697c3dd67",34:"c8baf2b2f12cfe0bd2fa",35:"dce4e1784ec7a98260a9",36:"ebba859e92483da4aa80"}[e]+".js";var t=setTimeout(b,12e4);function b(){r.onerror=r.onload=null,clearTimeout(t);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return r.onerror=r.onload=b,n.appendChild(r),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="/",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,n,r){for(var t,b,o,i=0,u=[];i<c.length;i++)b=c[i],d[b]&&u.push(d[b][0]),d[b]=0;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);for(a&&a(c,n,r);u.length;)u.shift()();if(r)for(i=0;i<r.length;i++)o=f(f.s=r[i]);return o};var c={},d={39:0};function f(a){if(c[a])return c[a].exports;var d=c[a]={i:a,l:!1,exports:{}};return e[a].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var a=d[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,f){a=d[e]=[c,f]});a[2]=c;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,f.nc&&r.setAttribute("nonce",f.nc),r.src=f.p+"static/js/"+e+"."+{0:"682c9db1b596d6ccea80",1:"65d02bf3ab42eef3e8d1",2:"42cad276cc70c5a4a69e",3:"59785b64ab4d79c651ee",4:"db215147f8308b14e0a4",5:"022d5a21efe8f82f8d4e",6:"1741e48fb08b0a2de138",7:"afe7c14969ada89161f1",8:"23ed2abfb17f38e74608",9:"9ffac010c8948205dd5b",10:"5347820d51049bfcd023",11:"f34fc374ed35b0797ae9",12:"123af0a13c1eb163af46",13:"b1b323d5f92b483449a1",14:"4d751448decc0d1e79a5",15:"2adf7b1eb12e40ed3a15",16:"61cb723e6d73753b90da",17:"0001adbd2c61dbb2e0cd",18:"537b99b7140d87ae77ba",19:"5db37fafec06cc47f122",20:"5a44a3556475ecbb4569",21:"bc4925aefd8cb6035b47",22:"213279a76cd1f3ef71d2",23:"ff8b235c5eeaf1926bc1",24:"46b08a228ee5d6b085c3",25:"52ab755ffe6b127b4dde",26:"8dc2dccb7b04d18c70c3",27:"ae7dce45182d6d0e528b",28:"fa4fa4448b5dd2b492a7",29:"d67b2b9bdacf7e220cf6",30:"7d604c1634a7f4842b5f",31:"7d605cd1ba3324f19fc7",32:"a71e52950e9219ad363f",33:"3dc8c2fce74697c3dd67",34:"c8baf2b2f12cfe0bd2fa",35:"dce4e1784ec7a98260a9",36:"ebba859e92483da4aa80"}[e]+".js";var t=setTimeout(b,12e4);function b(){r.onerror=r.onload=null,clearTimeout(t);var a=d[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return r.onerror=r.onload=b,n.appendChild(r),c},f.m=e,f.c=c,f.d=function(e,a,c){f.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},f.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(a,"a",a),a},f.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},f.p="/",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.3bcd8e25ac840908ee86cbd36c6d41aa.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.d07590f1e564b46f5dda.js></script><script type=text/javascript src=/static/js/vendor.19b2456e976962f3ee99.js></script><script type=text/javascript src=/static/js/app.ec2311f45fb7f9e921d0.js></script></body><script>let el = document.getElementsByTagName("script");
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><meta name=referrer content=never><link rel=stylesheet href=https://at.alicdn.com/t/font_746649_7dsnjecwkpg.css><title>唱唱启蒙-后台</title><link href=/static/css/app.f1b86ab05c6470b837da89263517a685.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.fe035345059b5c16a84d.js></script><script type=text/javascript src=/static/js/vendor.19b2456e976962f3ee99.js></script><script type=text/javascript src=/static/js/app.04a2f7b92667dcf79283.js></script></body><script>let el = document.getElementsByTagName("script");
el.onerror = function(a,b,c){
console.log('error:',a,b,c);
};
......
webpackJsonp([26],{"1djJ":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s("CCn6"),i=s("+TkF"),l=s("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,goodsList:[],form:{name:"",goods_type:1,goods_desc:{desc:"",imgLesson:[],img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",img:[],refImg:[]},desc:{detail:"",qa:"",customer_service:[],after_goods_id:"",before_goods_id:""}},lessonList:[],goOn_goods_Id:{after_goods_id:"",before_goods_id:""}}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form)+"");switch(t.desc.before_goods_id=this.goOn_goods_Id.before_goods_id,t.desc.after_goods_id=this.goOn_goods_Id.after_goods_id,t.original_price=(100*t.original_price).toFixed(0),t.current_price=(100*t.current_price).toFixed(0),t.invite_earnings=(100*t.invite_earnings).toFixed(0),t.goods_desc=JSON.stringify(t.goods_desc),t.desc=JSON.stringify(t.desc),t.share_desc=JSON.stringify(t.share_desc),this.dialogObj.type){case 1:Object(o.Q)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(o.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},removeFileMain:function(e){var t=this.form.goods_desc.img.findIndex(function(t){return t.name===e.name});this.form.goods_desc.img.splice(t,1)},uploadFileLesson:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.imgLesson=[{name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}],t.$message({message:"上传成功",type:"success"})})},removeFileLesson:function(){this.form.goods_desc.imgLesson=[]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img.push({name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}),t.$message({message:"上传成功",type:"success"})})},removeFileShareRef:function(){this.form.share_desc.refImg=[]},uploadFileMainShareRef:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.refImg?t.form.share_desc.refImg[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.refImg=[],t.form.share_desc.refImg[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainService:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.desc.customer_service?t.form.desc.customer_service[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.desc.customer_service=[],t.form.desc.customer_service[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},initDialog:function(){var e=this;switch(Object(o._17)({limit:9999}).then(function(t){e.goodsList=t.list}),this.dialogObj.type){case 0:this.loading=!1,this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},this.getLessonList();break;case 1:case 2:this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},Object(o._16)(this.dialogObj.id).then(function(t){e.loading=!1;var s=JSON.parse(t.share_desc);s.refImg||(s.refImg=[]),e.form={name:t.name,goods_type:t.goods_type,goods_desc:JSON.parse(t.goods_desc),course_id:t.course_id,course_type:t.course_type,watch_num:t.watch_num,duration_num:t.duration_num,original_price:t.original_price/100,current_price:t.current_price/100,is_real:t.is_real,is_auth_user:t.is_auth_user,share_desc:JSON.parse(t.share_desc),desc:JSON.parse(t.desc),invite_earnings:t.invite_earnings/100,is_auth_teacher:t.is_auth_teacher},e.form.desc.before_goods_id&&(e.goOn_goods_Id.before_goods_id=e.form.desc.before_goods_id),e.form.desc.after_goods_id&&(e.goOn_goods_Id.after_goods_id=e.form.desc.after_goods_id),e.getLessonList()});break;case 3:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2}},changeLessonType:function(){this.getLessonList()},getLessonList:function(){var e=this;Object(o._18)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品描述"}},[s("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[s("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),s("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"观看时长(节)"}},[s("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续看时长(天)"}},[s("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"课程封面(750*600)"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileLesson,"on-remove":e.removeFileLesson,limit:1,"file-list":e.form.goods_desc.imgLesson}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"主图(750*600)"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMain,"on-remove":e.removeFileMain,"file-list":e.form.goods_desc.img}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"客服(200*200)"}},[s("el-upload",{staticClass:"upload-demo",class:e.form.desc.customer_service&&e.form.desc.customer_service.length>0?"uploadService":"",attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[s("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),s("el-option",{attrs:{label:"团购商品",value:2}}),e._v(" "),s("el-option",{attrs:{label:"续课商品",value:3}})],1)],1)],1)],1),e._v(" "),3===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续课已购商品"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.before_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"before_goods_id",t)},expression:"goOn_goods_Id.before_goods_id"}},e._l(e.goodsList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续购商品"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.after_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"after_goods_id",t)},expression:"goOn_goods_Id.after_goods_id"}},e._l(e.goodsList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1)],1):e._e(),e._v(" "),1===e.form.goods_type?s("el-form-item",{attrs:{label:"推荐奖金(元)"}},[s("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"是否配置实物"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),s("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"原价(元)":"单买价格(元)"}},[s("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[s("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"成团人数(人)"}},[s("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[s("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享标题"}},[s("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享内容"}},[s("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"分享主图(300*300)"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.img,"http-request":e.uploadFileMainShare}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"分享海报"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.refImg,"http-request":e.uploadFileMainShareRef}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"商品详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"购买须知"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var n=s("VU/8")(a,r,!1,function(e){s("R06P")},"data-v-20a800ea",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,chooseDialog:{show:!1,title:"",id:"",form:{value:"",list:[]},type:0},dialogObj:{type:0,show:!1,title:"",id:""},classList:[]}},components:{page:l.a,dialogCom:n},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser(),this.getClassList()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},onSizeChange:function(e){this.limit=e,this.nowPage=1,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.s)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="https://wechat.changchangenglish.com/#/buyDetail?shopId="+e,s=document.createElement("input");s.value=t,document.body.appendChild(s),s.select(),document.execCommand("Copy"),this.$message({message:"已成功复制到剪切板",type:"success"}),s.remove()},dialogSub:function(){var e=this;switch(this.chooseDialog.type){case 0:Object(o.o)(this.chooseDialog.id,this.chooseDialog.form.value).then(function(t){e.$message({message:"绑定成功",type:"success"}),e.chooseDialog.show=!1}),this.getUser();break;case 1:var t={conflict_goods_ids:this.chooseDialog.form.list.toString()};Object(o.r)(this.chooseDialog.id,t).then(function(t){e.$message({message:"设置成功",type:"success"}),e.chooseDialog.show=!1,e.getUser()})}},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),this.searchFrom.course_id&&(t.course_id=this.searchFrom.course_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.current_price&&(t.current_price=100*this.searchFrom.current_price),Object(o._17)(t).then(function(t){t.list.forEach(function(e){""===e.conflict_goods_ids?e.conflict_goods_ids=[]:e.conflict_goods_ids=e.conflict_goods_ids.split(",")}),e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.H)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o._53)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.J)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},bindOther:function(e){this.chooseDialog={show:!0,title:"绑定商品",id:e.id,form:{value:"",list:[]},type:0}},conflict:function(e){this.chooseDialog={show:!0,title:"冲突商品",id:e.id,form:{value:"",list:e.conflict_goods_ids},type:1}},getClassList:function(){var e=this;Object(o._18)({limit:2e3,page:1}).then(function(t){e.classList=t.list})}}},u={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"user"},[s("el-form",{ref:"searchFrom",staticClass:"search-form",attrs:{model:e.searchFrom,"label-width":"100px",inline:""}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.course_id,callback:function(t){e.$set(e.searchFrom,"course_id",t)},expression:"searchFrom.course_id"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),e._l(e.classList,function(e,t){return s("el-option",{key:t,attrs:{label:e.title,value:e.id}})})],2)],1),e._v(" "),s("el-form-item",{attrs:{label:"商品状态"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),s("el-option",{attrs:{value:"0",label:"编辑中"}}),e._v(" "),s("el-option",{attrs:{value:"1",label:"上架"}}),e._v(" "),s("el-option",{attrs:{value:"2",label:"下架"}})],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"商品现价/团购价","label-width":"120px"}},[s("el-input-number",{model:{value:e.searchFrom.current_price,callback:function(t){e.$set(e.searchFrom,"current_price",t)},expression:"searchFrom.current_price"}})],1),e._v(" "),s("el-form-item",[s("div",{staticClass:"search-btn-block"},[s("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-search"},on:{click:e.getUser}},[e._v("搜索")])],1)])],1),e._v(" "),s("div",{staticClass:"new-block"},[e.$store.state.readonly?e._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"name",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("router-link",{attrs:{to:{name:"periods",query:{goods_id:t.row.id}}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),s("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-popover",{attrs:{placement:"top",width:"600"}},[s("div",{staticStyle:{"text-align":"center"}},[s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.copyUrl(t.row.id)}}},[e._v("\n 复制链接\n ")]),e._v(" "),e.$store.state.readonly?e._e():[2===t.row.status||0===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),1===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(s){e.copyShop(t.row)}}},[e._v("\n 复制商品\n ")]),e._v(" "),2===t.row.status?s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.bindOther(t.row)}}},[e._v("\n 绑定商品\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.conflict(t.row)}}},[e._v("\n 冲突商品\n ")]),e._v(" "),e.$store.state.deletePermission?s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.onDel(t.row)}}},[e._v("\n 删除\n ")]):e._e()]],2),e._v(" "),s("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}}),e._v(" "),s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}),e._v(" "),s("el-dialog",{attrs:{title:e.chooseDialog.title,visible:e.chooseDialog.show,width:"30%"},on:{"update:visible":function(t){e.$set(e.chooseDialog,"show",t)}}},[s("el-form",{ref:"form",attrs:{"label-width":"80px"}},[0===e.chooseDialog.type?s("el-form-item",{attrs:{label:"绑定商品"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.chooseDialog.form.value,callback:function(t){e.$set(e.chooseDialog.form,"value",t)},expression:"chooseDialog.form.value"}},e._l(e.userList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),1===e.chooseDialog.type?s("el-form-item",{attrs:{label:"冲突商品"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",multiple:""},model:{value:e.chooseDialog.form.list,callback:function(t){e.$set(e.chooseDialog.form,"list",t)},expression:"chooseDialog.form.list"}},e._l(e.userList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id.toString()}})}))],1):e._e()],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.chooseDialog.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogSub()}}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var d=s("VU/8")(c,u,!1,function(e){s("K6A+")},"data-v-5f536b82",null);t.default=d.exports},"K6A+":function(e,t){},R06P:function(e,t){}});
\ No newline at end of file
webpackJsonp([22],{"1djJ":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s("CCn6"),i=s("+TkF"),l=s("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,goodsList:[],form:{name:"",goods_type:1,goods_desc:{desc:"",imgLesson:[],img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",img:[],refImg:[]},desc:{detail:"",qa:"",customer_service:[],after_goods_id:"",before_goods_id:""}},lessonList:[],goOn_goods_Id:{after_goods_id:"",before_goods_id:""}}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form)+"");switch(t.desc.before_goods_id=this.goOn_goods_Id.before_goods_id,t.desc.after_goods_id=this.goOn_goods_Id.after_goods_id,t.original_price=(100*t.original_price).toFixed(0),t.current_price=(100*t.current_price).toFixed(0),t.invite_earnings=(100*t.invite_earnings).toFixed(0),t.goods_desc=JSON.stringify(t.goods_desc),t.desc=JSON.stringify(t.desc),t.share_desc=JSON.stringify(t.share_desc),this.dialogObj.type){case 1:Object(o.Q)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(o.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},removeFileMain:function(e){var t=this.form.goods_desc.img.findIndex(function(t){return t.name===e.name});this.form.goods_desc.img.splice(t,1)},uploadFileLesson:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.imgLesson=[{name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}],t.$message({message:"上传成功",type:"success"})})},removeFileLesson:function(){this.form.goods_desc.imgLesson=[]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img.push({name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}),t.$message({message:"上传成功",type:"success"})})},removeFileShareRef:function(){this.form.share_desc.refImg=[]},uploadFileMainShareRef:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.refImg?t.form.share_desc.refImg[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.refImg=[],t.form.share_desc.refImg[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileMainService:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.desc.customer_service?t.form.desc.customer_service[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.desc.customer_service=[],t.form.desc.customer_service[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},uploadFileShare:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._58)({file:e.file,type:"local"}).then(function(e){t.$message({message:"上传成功",type:"success"}),t.form.share_desc.img?t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.share_desc.img=[],t.form.share_desc.img[0]={name:e.url,url:"https://cdn.singsingenglish.com/"+e.url,title:"",lable:""})})},initDialog:function(){var e=this;switch(Object(o._17)({limit:9999}).then(function(t){e.goodsList=t.list}),this.dialogObj.type){case 0:this.loading=!1,this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},this.getLessonList();break;case 1:case 2:this.goOn_goods_Id.after_goods_id="",this.goOn_goods_Id.before_goods_id="",this.form={name:"",goods_type:1,goods_desc:{desc:"",img:[]},course_id:"",course_type:0,watch_num:"",duration_num:0,original_price:"",current_price:"",is_real:0,is_auth_user:0,share_desc:{title:"",content:"",refImg:[],img:[]},desc:{detail:"",qa:"",customer_service:[],before_goods_id:0,after_goods_id:0}},Object(o._16)(this.dialogObj.id).then(function(t){e.loading=!1;var s=JSON.parse(t.share_desc);s.refImg||(s.refImg=[]),e.form={name:t.name,goods_type:t.goods_type,goods_desc:JSON.parse(t.goods_desc),course_id:t.course_id,course_type:t.course_type,watch_num:t.watch_num,duration_num:t.duration_num,original_price:t.original_price/100,current_price:t.current_price/100,is_real:t.is_real,is_auth_user:t.is_auth_user,share_desc:JSON.parse(t.share_desc),desc:JSON.parse(t.desc),invite_earnings:t.invite_earnings/100,is_auth_teacher:t.is_auth_teacher},e.form.desc.before_goods_id&&(e.goOn_goods_Id.before_goods_id=e.form.desc.before_goods_id),e.form.desc.after_goods_id&&(e.goOn_goods_Id.after_goods_id=e.form.desc.after_goods_id),e.getLessonList()});break;case 3:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2}},changeLessonType:function(){this.getLessonList()},getLessonList:function(){var e=this;Object(o._18)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品描述"}},[s("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[s("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),s("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"观看时长(节)"}},[s("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续看时长(天)"}},[s("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"课程封面(750*600)"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileLesson,"on-remove":e.removeFileLesson,limit:1,"file-list":e.form.goods_desc.imgLesson}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"主图(750*600)"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMain,"on-remove":e.removeFileMain,"file-list":e.form.goods_desc.img}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"客服(200*200)"}},[s("el-upload",{staticClass:"upload-demo",class:e.form.desc.customer_service&&e.form.desc.customer_service.length>0?"uploadService":"",attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[s("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),s("el-option",{attrs:{label:"团购商品",value:2}}),e._v(" "),s("el-option",{attrs:{label:"续课商品",value:3}})],1)],1)],1)],1),e._v(" "),3===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续课已购商品"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.before_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"before_goods_id",t)},expression:"goOn_goods_Id.before_goods_id"}},e._l(e.goodsList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续购商品"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.goOn_goods_Id.after_goods_id,callback:function(t){e.$set(e.goOn_goods_Id,"after_goods_id",t)},expression:"goOn_goods_Id.after_goods_id"}},e._l(e.goodsList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1)],1)],1):e._e(),e._v(" "),1===e.form.goods_type||3===e.form.goods_type?s("el-form-item",{attrs:{label:"推荐奖金(元)"}},[s("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"是否配置实物"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),s("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type||3===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"原价(元)":"单买价格(元)"}},[s("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type||3===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[s("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"成团人数(人)"}},[s("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[s("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享标题"}},[s("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享内容"}},[s("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"分享主图(300*300)"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.img,"http-request":e.uploadFileMainShare}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"分享海报"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload",limit:1,"file-list":e.form.share_desc.refImg,"http-request":e.uploadFileMainShareRef}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"商品详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"购买须知"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var n=s("VU/8")(a,r,!1,function(e){s("yi97")},"data-v-77f61cb8",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,chooseDialog:{show:!1,title:"",id:"",form:{value:"",list:[]},type:0},dialogObj:{type:0,show:!1,title:"",id:""},classList:[]}},components:{page:l.a,dialogCom:n},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser(),this.getClassList()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},onSizeChange:function(e){this.limit=e,this.nowPage=1,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.s)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="https://wechat.changchangenglish.com/#/buyDetail?shopId="+e,s=document.createElement("input");s.value=t,document.body.appendChild(s),s.select(),document.execCommand("Copy"),this.$message({message:"已成功复制到剪切板",type:"success"}),s.remove()},dialogSub:function(){var e=this;switch(this.chooseDialog.type){case 0:Object(o.o)(this.chooseDialog.id,this.chooseDialog.form.value).then(function(t){e.$message({message:"绑定成功",type:"success"}),e.chooseDialog.show=!1}),this.getUser();break;case 1:var t={conflict_goods_ids:this.chooseDialog.form.list.toString()};Object(o.r)(this.chooseDialog.id,t).then(function(t){e.$message({message:"设置成功",type:"success"}),e.chooseDialog.show=!1,e.getUser()})}},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),this.searchFrom.course_id&&(t.course_id=this.searchFrom.course_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.current_price&&(t.current_price=100*this.searchFrom.current_price),Object(o._17)(t).then(function(t){t.list.forEach(function(e){""===e.conflict_goods_ids?e.conflict_goods_ids=[]:e.conflict_goods_ids=e.conflict_goods_ids.split(",")}),e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.H)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o._53)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.J)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},bindOther:function(e){this.chooseDialog={show:!0,title:"绑定商品",id:e.id,form:{value:"",list:[]},type:0}},conflict:function(e){this.chooseDialog={show:!0,title:"冲突商品",id:e.id,form:{value:"",list:e.conflict_goods_ids},type:1}},getClassList:function(){var e=this;Object(o._18)({limit:2e3,page:1}).then(function(t){e.classList=t.list})}}},d={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"user"},[s("el-form",{ref:"searchFrom",staticClass:"search-form",attrs:{model:e.searchFrom,"label-width":"100px",inline:""}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.course_id,callback:function(t){e.$set(e.searchFrom,"course_id",t)},expression:"searchFrom.course_id"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),e._l(e.classList,function(e,t){return s("el-option",{key:t,attrs:{label:e.title,value:e.id}})})],2)],1),e._v(" "),s("el-form-item",{attrs:{label:"商品状态"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:e.getUser},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),s("el-option",{attrs:{value:"0",label:"编辑中"}}),e._v(" "),s("el-option",{attrs:{value:"1",label:"上架"}}),e._v(" "),s("el-option",{attrs:{value:"2",label:"下架"}})],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"商品现价/团购价","label-width":"120px"}},[s("el-input-number",{model:{value:e.searchFrom.current_price,callback:function(t){e.$set(e.searchFrom,"current_price",t)},expression:"searchFrom.current_price"}})],1),e._v(" "),s("el-form-item",[s("div",{staticClass:"search-btn-block"},[s("el-button",{attrs:{type:"primary",plain:"",icon:"el-icon-search"},on:{click:e.getUser}},[e._v("搜索")])],1)])],1),e._v(" "),s("div",{staticClass:"new-block"},[e.$store.state.readonly?e._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"name",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("router-link",{attrs:{to:{name:"periods",query:{goods_id:t.row.id}}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),s("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-popover",{attrs:{placement:"top",width:"600"}},[s("div",{staticStyle:{"text-align":"center"}},[s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.copyUrl(t.row.id)}}},[e._v("\n 复制链接\n ")]),e._v(" "),e.$store.state.readonly?e._e():[2===t.row.status||0===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),1===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"success"},on:{click:function(s){e.copyShop(t.row)}}},[e._v("\n 复制商品\n ")]),e._v(" "),2===t.row.status?s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.bindOther(t.row)}}},[e._v("\n 绑定商品\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.conflict(t.row)}}},[e._v("\n 冲突商品\n ")]),e._v(" "),e.$store.state.deletePermission?s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.onDel(t.row)}}},[e._v("\n 删除\n ")]):e._e()]],2),e._v(" "),s("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}}),e._v(" "),s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}),e._v(" "),s("el-dialog",{attrs:{title:e.chooseDialog.title,visible:e.chooseDialog.show,width:"30%"},on:{"update:visible":function(t){e.$set(e.chooseDialog,"show",t)}}},[s("el-form",{ref:"form",attrs:{"label-width":"80px"}},[0===e.chooseDialog.type?s("el-form-item",{attrs:{label:"绑定商品"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择"},model:{value:e.chooseDialog.form.value,callback:function(t){e.$set(e.chooseDialog.form,"value",t)},expression:"chooseDialog.form.value"}},e._l(e.userList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})}))],1):e._e(),e._v(" "),1===e.chooseDialog.type?s("el-form-item",{attrs:{label:"冲突商品"}},[s("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",multiple:""},model:{value:e.chooseDialog.form.list,callback:function(t){e.$set(e.chooseDialog.form,"list",t)},expression:"chooseDialog.form.list"}},e._l(e.userList,function(e){return s("el-option",{key:e.id,attrs:{label:e.name,value:e.id.toString()}})}))],1):e._e()],1),e._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.chooseDialog.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:function(t){e.dialogSub()}}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var u=s("VU/8")(c,d,!1,function(e){s("K6A+")},"data-v-5f536b82",null);t.default=u.exports},"K6A+":function(e,t){},yi97:function(e,t){}});
\ No newline at end of file
webpackJsonp([22],{Uj1Q:function(t,e){},XxBP:function(t,e){},"sg/1":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("CCn6"),o=(s("+TkF"),{name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",title:"",loading:!0,form:{key:"no_lesson_date",value:"no_lesson_date",desc:[]},noLessonDate:[],rules:{noLessonDate:[{required:!0,message:"请选择日期",trigger:"change"}]},pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}}}},components:{page:s("kmJW").a},methods:{save:function(){var t=this;if(0!==this.noLessonDate.length){var e={key:this.form.key,value:this.form.value},s=this.form.desc||[];this.noLessonDate.length>0&&(s=s.concat(this.noLessonDate),s=this.dedupe(s)),e.desc=JSON.stringify(s),this.id?Object(i._54)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._47)(e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1})}else this.$message({type:"error",message:"请选择不上课时间!"})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.title=this.dialogObj.title,this.form.desc=this.dialogObj.desc,this.noLessonDate=this.form.desc,this.loading=!1},dedupe:function(t){return Array.from(new Set(t))}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(t){this.$emit("changeShow",t)}}}),n={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",{attrs:{title:t.title,center:"","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"append-to-body":"",visible:t.show,width:"800px"},on:{"update:visible":function(e){t.show=e}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[s("el-row",[s("el-col",{attrs:{span:4}},[s("label",[t._v("不上课日期")])]),t._v(" "),s("el-col",{attrs:{span:20}},[s("el-form-item",[s("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"dates","value-format":"yyyy-MM-dd","picker-options":t.pickerOptions1,placeholder:"选择日期"},model:{value:t.noLessonDate,callback:function(e){t.noLessonDate=e},expression:"noLessonDate"}})],1)],1)],1)],1),t._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(e){t.show=!1}}},[t._v("取 消")]),t._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)])},staticRenderFns:[]};var a={name:"index",data:function(){return{dialogObj:{value:"",desc:"",show:!1,id:""},list:[],id:""}},components:{dialogCom:s("VU/8")(o,n,!1,function(t){s("Uj1Q")},"data-v-e9aa269a",null).exports},mounted:function(){this.getList()},methods:{changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(i._12)({key:"no_lesson_date"}).then(function(e){if(e.list.length>0){var s=e.list[0].desc;t.id=e.list[0].id,t.list=s?JSON.parse(s):[]}})},add:function(){this.dialogObj.title="添加不上课日期",this.dialogObj.desc=this.list||[],this.dialogObj.show=!0,this.list.length>0?this.dialogObj.id=this.id:this.dialogObj.id=""},edit:function(t){var e=this;Object(i._11)(t.id).then(function(t){e.dialogObj.title="修改不上课日期",e.dialogObj.desc=t.desc,e.dialogObj.show=!0})},del:function(t){var e=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var s={key:"no_lesson_date",value:"no_lesson_date"},o=[];e.list.forEach(function(e){e!==t&&o.push(e)}),s.desc=JSON.stringify(o),Object(i._54)(e.id,s).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getList()})})}}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{classs:"noLesson"}},[s("el-row",{staticClass:"add-btn",attrs:{type:"flex",justify:"end"}},[s("el-col",{attrs:{span:6}},[t.$store.state.readonly?t._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加不上课日期")])],1)],1),t._v(" "),s("div",{staticClass:"card"},t._l(t.list,function(e,i){return s("el-card",{key:i,attrs:{"body-style":{padding:"0px"}}},[s("span",{staticClass:"time"},[t._v(t._s(e))]),t._v(" "),s("div",{staticClass:"bottom clearfix"},[t.$store.state.deletePermission&&!t.$store.state.readonly?s("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(s){t.del(e)}}},[t._v("删除")]):t._e()],1)])})),t._v(" "),s("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}})],1)},staticRenderFns:[]};var d=s("VU/8")(a,l,!1,function(t){s("XxBP")},"data-v-4c22ba2e",null);e.default=d.exports}});
\ No newline at end of file
webpackJsonp([23],{Uj1Q:function(t,e){},XxBP:function(t,e){},"sg/1":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("CCn6"),o=(s("+TkF"),{name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",title:"",loading:!0,form:{key:"no_lesson_date",value:"no_lesson_date",desc:[]},noLessonDate:[],rules:{noLessonDate:[{required:!0,message:"请选择日期",trigger:"change"}]},pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}}}},components:{page:s("kmJW").a},methods:{save:function(){var t=this;if(0!==this.noLessonDate.length){var e={key:this.form.key,value:this.form.value},s=this.form.desc||[];this.noLessonDate.length>0&&(s=s.concat(this.noLessonDate),s=this.dedupe(s)),e.desc=JSON.stringify(s),this.id?Object(i._54)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._47)(e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1})}else this.$message({type:"error",message:"请选择不上课时间!"})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.title=this.dialogObj.title,this.form.desc=this.dialogObj.desc,this.noLessonDate=this.form.desc,this.loading=!1},dedupe:function(t){return Array.from(new Set(t))}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(t){this.$emit("changeShow",t)}}}),n={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",{attrs:{title:t.title,center:"","close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"append-to-body":"",visible:t.show,width:"800px"},on:{"update:visible":function(e){t.show=e}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[s("el-row",[s("el-col",{attrs:{span:4}},[s("label",[t._v("不上课日期")])]),t._v(" "),s("el-col",{attrs:{span:20}},[s("el-form-item",[s("el-date-picker",{staticStyle:{width:"100%"},attrs:{type:"dates","value-format":"yyyy-MM-dd","picker-options":t.pickerOptions1,placeholder:"选择日期"},model:{value:t.noLessonDate,callback:function(e){t.noLessonDate=e},expression:"noLessonDate"}})],1)],1)],1)],1),t._v(" "),s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(e){t.show=!1}}},[t._v("取 消")]),t._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("确 定")])],1)],1)])},staticRenderFns:[]};var a={name:"index",data:function(){return{dialogObj:{value:"",desc:"",show:!1,id:""},list:[],id:""}},components:{dialogCom:s("VU/8")(o,n,!1,function(t){s("Uj1Q")},"data-v-e9aa269a",null).exports},mounted:function(){this.getList()},methods:{changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(i._12)({key:"no_lesson_date"}).then(function(e){if(e.list.length>0){var s=e.list[0].desc;t.id=e.list[0].id,t.list=s?JSON.parse(s):[]}})},add:function(){this.dialogObj.title="添加不上课日期",this.dialogObj.desc=this.list||[],this.dialogObj.show=!0,this.list.length>0?this.dialogObj.id=this.id:this.dialogObj.id=""},edit:function(t){var e=this;Object(i._11)(t.id).then(function(t){e.dialogObj.title="修改不上课日期",e.dialogObj.desc=t.desc,e.dialogObj.show=!0})},del:function(t){var e=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var s={key:"no_lesson_date",value:"no_lesson_date"},o=[];e.list.forEach(function(e){e!==t&&o.push(e)}),s.desc=JSON.stringify(o),Object(i._54)(e.id,s).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.getList()})})}}},l={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{classs:"noLesson"}},[s("el-row",{staticClass:"add-btn",attrs:{type:"flex",justify:"end"}},[s("el-col",{attrs:{span:6}},[t.$store.state.readonly?t._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加不上课日期")])],1)],1),t._v(" "),s("div",{staticClass:"card"},t._l(t.list,function(e,i){return s("el-card",{key:i,attrs:{"body-style":{padding:"0px"}}},[s("span",{staticClass:"time"},[t._v(t._s(e))]),t._v(" "),s("div",{staticClass:"bottom clearfix"},[t.$store.state.deletePermission&&!t.$store.state.readonly?s("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(s){t.del(e)}}},[t._v("删除")]):t._e()],1)])})),t._v(" "),s("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}})],1)},staticRenderFns:[]};var d=s("VU/8")(a,l,!1,function(t){s("XxBP")},"data-v-4c22ba2e",null);e.default=d.exports}});
\ No newline at end of file
webpackJsonp([23],{Xhqp:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),a={name:"resource",data:function(){return{mediaList:[],nowPage:1,total:0,limit:5,loading:!1,type:"news",imageList:[],uploadParam:{type:"wechat",chunk:0,count:1},fileUid:null,showProgress:!1,typeText:{image:"图片",video:"视频",voice:"语音"}}},components:{page:i("kmJW").a},mounted:function(){this.getMediaList(this.type)},computed:{progress:function(){var t=this;return this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num<100?this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num:100}},methods:{getMediaType:function(t){this.type=t,this.nowPage=1,this.getMediaList(t)},onPageChange:function(t){this.nowPage=t,this.getMediaList(this.type)},onSizeChange:function(t){this.nowPage=1,this.limit=t,this.getMediaList(this.type)},getMediaList:function(t){var e=this,i={type:t,page:this.nowPage,limit:this.limit};this.loading=!0,Object(s._20)(i).then(function(i){e.loading=!1,e.type=t,e.mediaList=i.item,e.total=i.total_count,0===i.item.length&&e.$message({showClose:!0,message:"暂无数据"})}).catch(function(){e.loading=!1})},handleUploadSuccess:function(t){200===t.code&&(this.imageList=[{name:t.data.url,url:"https://cdn.singsingenglish.com/"+t.data.url}])},uploadFile:function(t){var e=this;this.loading=!0,this.$store.dispatch("setProgress",{type:"new",id:t.file.uid}),this.fileUid=t.file.uid,this.showProgress=!0,Object(s._58)({file:t.file,type:"wechat"}).then(function(t){e.imageList=[{name:t.url,url:"https://cdn.singsingenglish.com/"+t.url}],e.getMediaList(e.type),e.loading=!1,e.showProgress=!1,e.$message({type:"success",message:"上传成功!"})}).catch(function(){e.loading=!1,e.showProgress=!1})}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"media"},[i("h2",{staticClass:"media-title"},[t._v("素材管理")]),t._v(" "),i("div",[i("ul",{staticClass:"media-navs"},[i("li",{staticClass:"media-nav js_top",class:"news"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("news")}}},[t._m(0)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"image"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("image")}}},[t._m(1)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"voice"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("voice")}}},[t._m(2)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"video"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("video")}}},[t._m(3)])]),t._v(" "),i("div",{staticClass:"media-panel"},[i("div",{staticClass:"media-panel-top flex-bt"},[i("div",{staticClass:"media-panel-top-left"},[t._v("\n "+t._s(t.typeText[t.type])+"(共"+t._s(t.total)+"条)\n ")]),t._v(" "),t.showProgress?i("div",{staticClass:"progress"},[i("el-progress",{attrs:{percentage:t.progress,status:"success"}})],1):t._e(),t._v(" "),"news"!==t.type?i("div",{staticClass:"media-panel-top-right"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:"/api/public/upload/zone","http-request":t.uploadFile,"show-file-list":!1,data:t.uploadParam}},[t.$store.state.readonly?t._e():i("el-button",{staticStyle:{order:"2"},attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")])],1)],1):t._e()]),t._v(" "),t.mediaList.length>0&&"news"===t.type?i("div",{staticClass:"d-start",staticStyle:{"margin-bottom":"20px"}},t._l(t.mediaList,function(e,s){return i("div",{key:s,staticClass:"news-media"},[i("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(e.content.news_item,function(s,a){return i("div",{staticStyle:{position:"relative"}},[1===e.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(s.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:s.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(s.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:s.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):e.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===a?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:s.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(s.title))])]):i("div",{staticClass:"next-cover"},[i("span",{staticClass:"next-title"},[t._v(t._s(s.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:s.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:s.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))],1)})):t._e(),t._v(" "),t.mediaList.length>0&&"news"===t.type?i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}}):t._e(),t._v(" "),t.mediaList.length>0&&"news"!==t.type?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList}},[i("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),i("el-table-column",{attrs:{prop:"media_id",label:"mediaId"}}),t._v(" "),i("el-table-column",{attrs:{label:"URL"},scopedSlots:t._u([{key:"default",fn:function(e){return["image"===t.type?i("a",{attrs:{href:e.row.url,target:"_blank"}},[i("img",{staticStyle:{width:"60px"},attrs:{src:e.row.url}})]):t._e(),t._v(" "),"video"===t.type&&e.row.info&&e.row.info.down_url?i("a",{attrs:{href:e.row.info.down_url,target:"_blank"}},[t._v("\n "+t._s(e.row.info.title)+"\n ")]):t._e(),t._v(" "),"voice"===t.type?i("audio",{attrs:{id:"myAudio",controls:""}},[i("source",{attrs:{src:e.row.url}}),t._v("\n Your browser does not support the audio element.\n ")]):t._e()]}}])})],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}})],1):t._e()],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("图文消息"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("图片"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("语音"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("视频"),e("br")])}]};var o=i("VU/8")(a,n,!1,function(t){i("nYpX"),i("q2HM")},"data-v-44f59173",null);e.default=o.exports},nYpX:function(t,e){},q2HM:function(t,e){}});
\ No newline at end of file
webpackJsonp([24],{Xhqp:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),a={name:"resource",data:function(){return{mediaList:[],nowPage:1,total:0,limit:5,loading:!1,type:"news",imageList:[],uploadParam:{type:"wechat",chunk:0,count:1},fileUid:null,showProgress:!1,typeText:{image:"图片",video:"视频",voice:"语音"}}},components:{page:i("kmJW").a},mounted:function(){this.getMediaList(this.type)},computed:{progress:function(){var t=this;return this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num<100?this.$store.state.progressList.find(function(e){return e.id===t.fileUid}).num:100}},methods:{getMediaType:function(t){this.type=t,this.nowPage=1,this.getMediaList(t)},onPageChange:function(t){this.nowPage=t,this.getMediaList(this.type)},onSizeChange:function(t){this.nowPage=1,this.limit=t,this.getMediaList(this.type)},getMediaList:function(t){var e=this,i={type:t,page:this.nowPage,limit:this.limit};this.loading=!0,Object(s._20)(i).then(function(i){e.loading=!1,e.type=t,e.mediaList=i.item,e.total=i.total_count,0===i.item.length&&e.$message({showClose:!0,message:"暂无数据"})}).catch(function(){e.loading=!1})},handleUploadSuccess:function(t){200===t.code&&(this.imageList=[{name:t.data.url,url:"https://cdn.singsingenglish.com/"+t.data.url}])},uploadFile:function(t){var e=this;this.loading=!0,this.$store.dispatch("setProgress",{type:"new",id:t.file.uid}),this.fileUid=t.file.uid,this.showProgress=!0,Object(s._58)({file:t.file,type:"wechat"}).then(function(t){e.imageList=[{name:t.url,url:"https://cdn.singsingenglish.com/"+t.url}],e.getMediaList(e.type),e.loading=!1,e.showProgress=!1,e.$message({type:"success",message:"上传成功!"})}).catch(function(){e.loading=!1,e.showProgress=!1})}}},n={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"media"},[i("h2",{staticClass:"media-title"},[t._v("素材管理")]),t._v(" "),i("div",[i("ul",{staticClass:"media-navs"},[i("li",{staticClass:"media-nav js_top",class:"news"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("news")}}},[t._m(0)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"image"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("image")}}},[t._m(1)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"voice"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("voice")}}},[t._m(2)]),t._v(" "),i("li",{staticClass:"media-nav js_top",class:"video"===t.type?"media-current-nav":"",on:{click:function(e){t.getMediaType("video")}}},[t._m(3)])]),t._v(" "),i("div",{staticClass:"media-panel"},[i("div",{staticClass:"media-panel-top flex-bt"},[i("div",{staticClass:"media-panel-top-left"},[t._v("\n "+t._s(t.typeText[t.type])+"(共"+t._s(t.total)+"条)\n ")]),t._v(" "),t.showProgress?i("div",{staticClass:"progress"},[i("el-progress",{attrs:{percentage:t.progress,status:"success"}})],1):t._e(),t._v(" "),"news"!==t.type?i("div",{staticClass:"media-panel-top-right"},[i("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{action:"/api/public/upload/zone","http-request":t.uploadFile,"show-file-list":!1,data:t.uploadParam}},[t.$store.state.readonly?t._e():i("el-button",{staticStyle:{order:"2"},attrs:{slot:"trigger",size:"small",type:"primary"},slot:"trigger"},[t._v("选取文件")])],1)],1):t._e()]),t._v(" "),t.mediaList.length>0&&"news"===t.type?i("div",{staticClass:"d-start",staticStyle:{"margin-bottom":"20px"}},t._l(t.mediaList,function(e,s){return i("div",{key:s,staticClass:"news-media"},[i("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(e.content.news_item,function(s,a){return i("div",{staticStyle:{position:"relative"}},[1===e.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(s.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:s.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(s.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:s.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):e.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===a?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:s.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(s.title))])]):i("div",{staticClass:"next-cover"},[i("span",{staticClass:"next-title"},[t._v(t._s(s.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:s.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:s.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))],1)})):t._e(),t._v(" "),t.mediaList.length>0&&"news"===t.type?i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}}):t._e(),t._v(" "),t.mediaList.length>0&&"news"!==t.type?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList}},[i("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),i("el-table-column",{attrs:{prop:"media_id",label:"mediaId"}}),t._v(" "),i("el-table-column",{attrs:{label:"URL"},scopedSlots:t._u([{key:"default",fn:function(e){return["image"===t.type?i("a",{attrs:{href:e.row.url,target:"_blank"}},[i("img",{staticStyle:{width:"60px"},attrs:{src:e.row.url}})]):t._e(),t._v(" "),"video"===t.type&&e.row.info&&e.row.info.down_url?i("a",{attrs:{href:e.row.info.down_url,target:"_blank"}},[t._v("\n "+t._s(e.row.info.title)+"\n ")]):t._e(),t._v(" "),"voice"===t.type?i("audio",{attrs:{id:"myAudio",controls:""}},[i("source",{attrs:{src:e.row.url}}),t._v("\n Your browser does not support the audio element.\n ")]):t._e()]}}])})],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange,sizeChange:t.onSizeChange}})],1):t._e()],1)])])},staticRenderFns:[function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("图文消息"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("图片"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("语音"),e("br")])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{attrs:{href:"javascript:void(0);"}},[this._v("视频"),e("br")])}]};var o=i("VU/8")(a,n,!1,function(t){i("nYpX"),i("q2HM")},"data-v-44f59173",null);e.default=o.exports},nYpX:function(t,e){},q2HM:function(t,e){}});
\ No newline at end of file
webpackJsonp([24],{"89rD":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("CCn6"),s={name:"index",components:{page:a("kmJW").a},data:function(){return{nowPage:1,total:0,limit:10,refundTypeList:[{id:0,value:"退款中"},{id:1,value:"退款成功"},{id:2,value:"退款失败"}],searchFrom:{nickname:"",user_id:"",out_trade_no:"",status:1},list:[]}},filters:{filterStatus:function(e){var t="";return 0===e?t="退款中":1===e?t="退款成功":2===e&&(t="退款失败"),t}},mounted:function(){this.getRefundList()},methods:{editComment:function(e,t){var a=this;this.$prompt("编辑备注","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputType:"textarea",inputValue:t}).then(function(t){var s=t.value;Object(n.S)(e,"refund",{desc:s}).then(function(e){a.$message({type:"success",message:"编辑备注成功"}),a.getRefundList()})})},onPageChange:function(e){this.nowPage=e,this.getRefundList()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.getRefundList()},getRefundList:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.nickname&&(t.nickname=this.searchFrom.nickname),this.searchFrom.user_id&&(t.user_id=this.searchFrom.user_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.out_trade_no&&(t.out_trade_no=this.searchFrom.out_trade_no),Object(n._30)(t).then(function(t){e.total=t.total,e.list=t.list})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"refund"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户昵称"}},[a("el-input",{model:{value:e.searchFrom.nickname,callback:function(t){e.$set(e.searchFrom,"nickname",t)},expression:"searchFrom.nickname"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{model:{value:e.searchFrom.user_id,callback:function(t){e.$set(e.searchFrom,"user_id",t)},expression:"searchFrom.user_id"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"订单编号"}},[a("el-input",{model:{value:e.searchFrom.out_trade_no,callback:function(t){e.$set(e.searchFrom,"out_trade_no",t)},expression:"searchFrom.out_trade_no"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"退款状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.getRefundList},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},e._l(e.refundTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getRefundList}},[e._v("搜索")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{prop:"refund_no",label:"退款编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"out_trade_no",label:"订单号"}}),e._v(" "),a("el-table-column",{attrs:{label:"用户信息","min-width":"140",className:"userInfo"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("img",{staticClass:"avatar",attrs:{src:t.row.user_avatar}}),e._v("\n "+e._s(t.row.user_nickname)+"(ID:"+e._s(t.row.user_id)+")\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"order_money",label:"订单金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(parseFloat(t.row.order_money/100))+"元\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"refund_money",label:"退款金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(parseFloat(t.row.refund_money/100))+"元\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"desc",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{label:"退款状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("filterStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"success_at",label:"退款成功时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{label:"操作","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"warning",plain:"",size:"mini"},on:{click:function(a){e.editComment(t.row.id,t.row.desc)}}},[e._v("\n 备注\n ")])]}}])})],1),e._v(" "),a("page",{attrs:{nowPage:e.nowPage,total:e.total},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var o=a("VU/8")(s,r,!1,function(e){a("Y/RT"),a("Fbz1")},"data-v-302d47d3",null);t.default=o.exports},Fbz1:function(e,t){},"Y/RT":function(e,t){}});
\ No newline at end of file
webpackJsonp([25],{"89rD":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a("CCn6"),s={name:"index",components:{page:a("kmJW").a},data:function(){return{nowPage:1,total:0,limit:10,refundTypeList:[{id:0,value:"退款中"},{id:1,value:"退款成功"},{id:2,value:"退款失败"}],searchFrom:{nickname:"",user_id:"",out_trade_no:"",status:1},list:[]}},filters:{filterStatus:function(e){var t="";return 0===e?t="退款中":1===e?t="退款成功":2===e&&(t="退款失败"),t}},mounted:function(){this.getRefundList()},methods:{editComment:function(e,t){var a=this;this.$prompt("编辑备注","提示",{confirmButtonText:"确定",cancelButtonText:"取消",inputType:"textarea",inputValue:t}).then(function(t){var s=t.value;Object(n.S)(e,"refund",{desc:s}).then(function(e){a.$message({type:"success",message:"编辑备注成功"}),a.getRefundList()})})},onPageChange:function(e){this.nowPage=e,this.getRefundList()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.getRefundList()},getRefundList:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.nickname&&(t.nickname=this.searchFrom.nickname),this.searchFrom.user_id&&(t.user_id=this.searchFrom.user_id),this.searchFrom.status&&(t.status=this.searchFrom.status),this.searchFrom.out_trade_no&&(t.out_trade_no=this.searchFrom.out_trade_no),Object(n._30)(t).then(function(t){e.total=t.total,e.list=t.list})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"refund"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户昵称"}},[a("el-input",{model:{value:e.searchFrom.nickname,callback:function(t){e.$set(e.searchFrom,"nickname",t)},expression:"searchFrom.nickname"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"用户ID"}},[a("el-input",{model:{value:e.searchFrom.user_id,callback:function(t){e.$set(e.searchFrom,"user_id",t)},expression:"searchFrom.user_id"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"订单编号"}},[a("el-input",{model:{value:e.searchFrom.out_trade_no,callback:function(t){e.$set(e.searchFrom,"out_trade_no",t)},expression:"searchFrom.out_trade_no"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"退款状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.getRefundList},model:{value:e.searchFrom.status,callback:function(t){e.$set(e.searchFrom,"status",t)},expression:"searchFrom.status"}},e._l(e.refundTypeList,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getRefundList}},[e._v("搜索")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{prop:"refund_no",label:"退款编号"}}),e._v(" "),a("el-table-column",{attrs:{prop:"out_trade_no",label:"订单号"}}),e._v(" "),a("el-table-column",{attrs:{label:"用户信息","min-width":"140",className:"userInfo"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("img",{staticClass:"avatar",attrs:{src:t.row.user_avatar}}),e._v("\n "+e._s(t.row.user_nickname)+"(ID:"+e._s(t.row.user_id)+")\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"order_money",label:"订单金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(parseFloat(t.row.order_money/100))+"元\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"refund_money",label:"退款金额"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(parseFloat(t.row.refund_money/100))+"元\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"desc",label:"备注"}}),e._v(" "),a("el-table-column",{attrs:{label:"退款状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("filterStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"success_at",label:"退款成功时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{label:"操作","min-width":"80"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"warning",plain:"",size:"mini"},on:{click:function(a){e.editComment(t.row.id,t.row.desc)}}},[e._v("\n 备注\n ")])]}}])})],1),e._v(" "),a("page",{attrs:{nowPage:e.nowPage,total:e.total},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var o=a("VU/8")(s,r,!1,function(e){a("Y/RT"),a("Fbz1")},"data-v-302d47d3",null);t.default=o.exports},Fbz1:function(e,t){},"Y/RT":function(e,t){}});
\ No newline at end of file
webpackJsonp([25],{F8nD:function(e,t){},YQOW:function(e,t){},gaNG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("CCn6"),o=(a("+TkF"),a("kmJW")),s={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",loading:!0,form:{key:"",value:"",desc:""},mediaList:[],rules:{value:[{required:!0,message:"请输入关键词",trigger:"change"}],desc:[{required:!0,message:"请输入描述",trigger:"change"}],key:[{required:!0,message:"请输入Key",trigger:"change"}]}}},components:{page:o.a},methods:{save:function(){var e=this;this.dialogObj.id?this.$refs.form.validate(function(t){t&&Object(i._54)(e.id,e.form).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})}):this.$refs.form.validate(function(t){t&&Object(i._47)(e.form).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("Key")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"key"}},[a("el-input",{model:{value:e.form.key,callback:function(t){e.$set(e.form,"key",t)},expression:"form.key"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("关键词")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"value"}},[a("el-input",{model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("描述")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)])},staticRenderFns:[]};var n={name:"sysConfig",data:function(){return{total:0,nowPage:1,limit:10,dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:a("VU/8")(s,l,!1,function(e){a("F8nD")},"data-v-47365745",null).exports,page:o.a},mounted:function(){this.getList()},methods:{changeShow:function(e){this.dialogObj.show=e},getList:function(){var e=this,t={limit:this.limit,page:this.nowPage};Object(i._12)(t).then(function(t){e.list=t.list,e.total=t.total})},onPageChange:function(e){this.nowPage=e,this.getList()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.getList()},add:function(){this.dialogObj.id="",this.dialogObj.key="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(e){var t=this;Object(i._11)(e.id).then(function(e){t.dialogObj.id=e.id,t.dialogObj.key=e.key,t.dialogObj.value=e.value,t.dialogObj.desc=e.desc,t.dialogObj.show=!0})},del:function(e){var t=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.G)(e.id).then(function(e){t.getList(),t.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys"},[a("div",{staticClass:"clear-both top"},[e.$store.state.readonly?e._e():a("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加配置")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left"}},[a("el-form-item",{attrs:{label:"Key"}},[a("span",[e._v(e._s(t.row.key))])]),e._v(" "),a("el-form-item",{attrs:{label:"关键词"}},[a("span",[e._v(e._s(t.row.value))])]),e._v(" "),a("el-form-item",{attrs:{label:"描述"}},[a("span",[e._v(e._s(t.row.desc))])])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"ID",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"Key",prop:"key"}}),e._v(" "),a("el-table-column",{attrs:{label:"关键词",prop:"value"}}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),e.$store.state.deletePermission?a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.del(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])})],1),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getList}}),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var c=a("VU/8")(n,r,!1,function(e){a("YQOW")},"data-v-287f4b28",null);t.default=c.exports}});
\ No newline at end of file
webpackJsonp([26],{F8nD:function(e,t){},YQOW:function(e,t){},gaNG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("CCn6"),o=(a("+TkF"),a("kmJW")),s={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",loading:!0,form:{key:"",value:"",desc:""},mediaList:[],rules:{value:[{required:!0,message:"请输入关键词",trigger:"change"}],desc:[{required:!0,message:"请输入描述",trigger:"change"}],key:[{required:!0,message:"请输入Key",trigger:"change"}]}}},components:{page:o.a},methods:{save:function(){var e=this;this.dialogObj.id?this.$refs.form.validate(function(t){t&&Object(i._54)(e.id,e.form).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})}):this.$refs.form.validate(function(t){t&&Object(i._47)(e.form).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("Key")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"key"}},[a("el-input",{model:{value:e.form.key,callback:function(t){e.$set(e.form,"key",t)},expression:"form.key"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("关键词")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"value"}},[a("el-input",{model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("描述")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)])},staticRenderFns:[]};var n={name:"sysConfig",data:function(){return{total:0,nowPage:1,limit:10,dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:a("VU/8")(s,l,!1,function(e){a("F8nD")},"data-v-47365745",null).exports,page:o.a},mounted:function(){this.getList()},methods:{changeShow:function(e){this.dialogObj.show=e},getList:function(){var e=this,t={limit:this.limit,page:this.nowPage};Object(i._12)(t).then(function(t){e.list=t.list,e.total=t.total})},onPageChange:function(e){this.nowPage=e,this.getList()},onSizeChange:function(e){this.nowPage=1,this.limit=e,this.getList()},add:function(){this.dialogObj.id="",this.dialogObj.key="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(e){var t=this;Object(i._11)(e.id).then(function(e){t.dialogObj.id=e.id,t.dialogObj.key=e.key,t.dialogObj.value=e.value,t.dialogObj.desc=e.desc,t.dialogObj.show=!0})},del:function(e){var t=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.G)(e.id).then(function(e){t.getList(),t.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys"},[a("div",{staticClass:"clear-both top"},[e.$store.state.readonly?e._e():a("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加配置")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left"}},[a("el-form-item",{attrs:{label:"Key"}},[a("span",[e._v(e._s(t.row.key))])]),e._v(" "),a("el-form-item",{attrs:{label:"关键词"}},[a("span",[e._v(e._s(t.row.value))])]),e._v(" "),a("el-form-item",{attrs:{label:"描述"}},[a("span",[e._v(e._s(t.row.desc))])])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"ID",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"Key",prop:"key"}}),e._v(" "),a("el-table-column",{attrs:{label:"关键词",prop:"value"}}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),e.$store.state.deletePermission?a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.del(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])})],1),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getList}}),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange,sizeChange:e.onSizeChange}})],1)},staticRenderFns:[]};var c=a("VU/8")(n,r,!1,function(e){a("YQOW")},"data-v-287f4b28",null);t.default=c.exports}});
\ No newline at end of file
webpackJsonp([38],{IcnI:function(e,n,t){"use strict";var o=t("7+uW"),a=t("NYxO"),r=t("zSLJ"),i={setToken:function(e,n){e.token=n,r.a.set("cc_token",n)},setUserName:function(e,n){e.userName=n,r.a.set("cc_user_name",n)},setPermission:function(e,n){e.progressList=n,localStorage.setItem("permission",JSON.stringify(n))},setMenu:function(e,n){e.menuList=n},readonly:function(e,n){e.readonly=n},deletePermission:function(e,n){e.deletePermission=n},mainCanShow:function(e){e.mainLoad=!1},mainUnShow:function(e){e.mainLoad=!0},changeParentRouter:function(e,n){e.menuList.find(function(e){return e.name===n.name}).routerName=n.to.name},progress:function(e,n){switch(n.type){case"new":e.progressList.push({num:0,id:n.id});break;case"change":e.progressList.find(function(e){return e.id===n.id}).num=n.num;break;case"delete":e.progressList.find(function(e){return e.id===n.id})}}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",orderRefund:!1,permission:!1,readonly:!0,deletePermission:!1,mainLoad:!0,menuList:[],menuType:!1,nowTab:"first",progressList:[],openedTab:[{value:"首页",routerName:"first",name:"first",delNo:!0,path:"/index"}]},mutations:i,actions:{setToken:function(e,n){(0,e.commit)("setToken",n)},setUserName:function(e,n){(0,e.commit)("setUserName",n)},setProgress:function(e,n){(0,e.commit)("progress",n)},setPermission:function(e,n){(0,e.commit)("setPermission",n)},setMenu:function(e,n){(0,e.commit)("setMenu",n)},readonly:function(e,n){(0,e.commit)("readonly",n)},deletePermission:function(e,n){(0,e.commit)("deletePermission",n)}}})},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("7+uW"),a=[{name:"",value:"教研管理",icon:"icon-material",list:[{value:"教材列表",routerName:"resources",path:"/resources",cover:"1-1",router:{path:"/resources",name:"resources",component:function(e){return Promise.all([t.e(0),t.e(2)]).then(function(){var n=[t("z5EG")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"商品课程",icon:"icon-shangpin1",list:[{value:"课程列表",routerName:"lesson",path:"/lesson",cover:"2-1",router:{path:"/lesson",name:"lesson",component:function(e){return Promise.all([t.e(0),t.e(5)]).then(function(){var n=[t("AbSL")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"商品列表",routerName:"shop",path:"/shop",cover:"4-1",router:{path:"/shop",name:"shop",component:function(e){return Promise.all([t.e(0),t.e(26)]).then(function(){var n=[t("1djJ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"期数管理",icon:"icon-kecheng",list:[{value:"期数列表",routerName:"periods",path:"/periods",cover:"2-2",router:{path:"/periods",name:"periods",component:function(e){return Promise.all([t.e(0),t.e(16)]).then(function(){var n=[t("ayGs")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"班级列表",routerName:"class",path:"/class",cover:"2-3",router:{path:"/class",name:"class",component:function(e){return Promise.all([t.e(0),t.e(11)]).then(function(){var n=[t("OX9A")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"不上课日期",routerName:"noLesson",path:"/noLesson",cover:"2-4",router:{path:"/noLesson",name:"noLesson",component:function(e){return Promise.all([t.e(0),t.e(22)]).then(function(){var n=[t("sg/1")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"人员管理",icon:"icon-laoshi",list:[{value:"教师列表",routerName:"teacher",path:"/teacher",cover:"3-1",router:{path:"/teacher",name:"teacher",component:function(e){return Promise.all([t.e(0),t.e(13)]).then(function(){var n=[t("Y0Vi")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"用户列表",routerName:"user",path:"/user",cover:"3-2",router:{path:"/user",name:"user",component:function(e){return Promise.all([t.e(0),t.e(8)]).then(function(){var n=[t("jFLA")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"订单管理",icon:"icon-dingdan",list:[{value:"订单列表",routerName:"order",path:"/order",cover:"5-1",router:{path:"/order",name:"order",component:function(e){return Promise.all([t.e(0),t.e(3)]).then(function(){var n=[t("2qmY")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"退款列表",routerName:"refund",path:"/refund",cover:"5-2",router:{path:"/refund",name:"refund",component:function(e){return Promise.all([t.e(0),t.e(24)]).then(function(){var n=[t("89rD")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"提现列表",routerName:"putForward",path:"/putForward",cover:"5-3",router:{path:"/putForward",name:"putForward",component:function(e){return Promise.all([t.e(0),t.e(18)]).then(function(){var n=[t("F5pf")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"发货管理",routerName:"consignment",path:"/consignment",cover:"5-4",router:{path:"/consignment",name:"consignment",component:function(e){return t.e(34).then(function(){var n=[t("usUK")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"订单统计",routerName:"orderCount",path:"/orderCount",cover:"5-5",router:{path:"/orderCount",name:"orderCount",component:function(e){return Promise.all([t.e(0),t.e(32)]).then(function(){var n=[t("s7i+")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"实物管理",icon:"icon-shu",list:[{value:"单品列表",routerName:"single",path:"/single",cover:"6-1",router:{path:"/single",name:"single",component:function(e){return Promise.all([t.e(0),t.e(10)]).then(function(){var n=[t("B31M")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"盒子列表",routerName:"box",path:"/box",cover:"6-2",router:{path:"/box",name:"box",component:function(e){return Promise.all([t.e(0),t.e(9)]).then(function(){var n=[t("+vCD")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"公众号",icon:"icon-ai-weixin",list:[{value:"自动回复",routerName:"focusReply",path:"/focusReply",cover:"7-1",router:{path:"/focusReply",name:"focusReply",component:function(e){return Promise.all([t.e(0),t.e(15)]).then(function(){var n=[t("CK6D")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"关键词回复",routerName:"autoReply",path:"/autoReply",cover:"7-2",router:{path:"/autoReply",name:"autoReply",component:function(e){return Promise.all([t.e(0),t.e(12)]).then(function(){var n=[t("65NY")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"公众号菜单",routerName:"weChat",path:"/weChat",cover:"7-3",router:{path:"/weChat",name:"weChat",component:function(e){return Promise.all([t.e(0),t.e(17)]).then(function(){var n=[t("q5av")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"素材管理",routerName:"weChatResource",path:"/weChatResource",cover:"7-4",router:{path:"/weChatResource",name:"weChatResource",component:function(e){return Promise.all([t.e(0),t.e(23)]).then(function(){var n=[t("Xhqp")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"Banner管理",routerName:"banner",path:"/banner",cover:"7-5",router:{path:"/banner",name:"banner",component:function(e){return Promise.all([t.e(0),t.e(21)]).then(function(){var n=[t("CGL6")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"二维码管理",routerName:"qrcode",path:"/qrcode",cover:"7-6",router:{path:"/qrcode",name:"qrcode",component:function(e){return Promise.all([t.e(0),t.e(7)]).then(function(){var n=[t("lNiQ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"群发助手",routerName:"groupSend",path:"/groupSend",cover:"7-7",router:{path:"/groupSend",name:"groupSend",component:function(e){return Promise.all([t.e(0),t.e(28)]).then(function(){var n=[t("oerw")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"关注取关统计",routerName:"watchCount",path:"/watchCount",cover:"7-8",router:{path:"/watchCount",name:"watchCount",component:function(e){return Promise.all([t.e(0),t.e(33)]).then(function(){var n=[t("Dq6T")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"系统管理",icon:"icon-shezhi",list:[{value:"账号管理",routerName:"admin",path:"/admin",cover:"8-1",router:{path:"/admin",name:"admin",component:function(e){return Promise.all([t.e(0),t.e(35)]).then(function(){var n=[t("+jTk")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"角色管理",routerName:"role",path:"/role",cover:"8-2",router:{path:"/role",name:"role",component:function(e){return Promise.all([t.e(0),t.e(36)]).then(function(){var n=[t("Vt1u")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"菜单管理",routerName:"menu",path:"/menu",cover:"8-3",router:{path:"/menu",name:"menu",component:function(e){return Promise.all([t.e(0),t.e(30)]).then(function(){var n=[t("aTXs")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"系统配置",routerName:"sysConfig",path:"/sysConfig",cover:"8-4",router:{path:"/sysConfig",name:"sysConfig",component:function(e){return Promise.all([t.e(0),t.e(25)]).then(function(){var n=[t("gaNG")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"操作日志",routerName:"adminLog",path:"/adminLog",cover:"8-5",router:{path:"/adminLog",name:"adminLog",component:function(e){return Promise.all([t.e(0),t.e(27)]).then(function(){var n=[t("WZgi")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]}],r={name:"App",data:function(){return{}},mounted:function(){var e=this;if(window.location.href.indexOf("login")<0){var n=this.$store.state.progressList,o=[];this.$router.options.routes[0].children=[];var r=n.find(function(e){return"5-1"===e.cover});r&&r.refund&&(this.$store.state.orderRefund=!0);var i={path:"/userDetail/:id",name:"userDetail",component:function(e){return Promise.all([t.e(0),t.e(14)]).then(function(){var n=[t("9PRC")];e.apply(null,n)}.bind(this)).catch(t.oe)}},u={path:"/teacher/:id",name:"teacherDetail",component:function(e){return Promise.all([t.e(0),t.e(19)]).then(function(){var n=[t("hFUZ")];e.apply(null,n)}.bind(this)).catch(t.oe)}};a.forEach(function(t){var a=!1,r=[];t.list.forEach(function(t){var o=n.find(function(e){return e.cover===t.cover});o&&(t.router.meta={},t.router.meta.readonly=o.readonly,t.router.meta.delete=!!o.delete,r.push(t),"3-1"===o.cover&&(u.meta={},u.meta.readonly=o.readonly,u.meta.delete=!!o.delete,e.$router.options.routes[0].children.push(u)),"3-2"===o.cover&&(i.meta={},i.meta.readonly=o.readonly,i.meta.delete=!!o.delete,e.$router.options.routes[0].children.push(i)),e.$router.options.routes[0].children.push(t.router),a=!0)}),a&&(t.list=r,o.push(t))}),this.$router.addRoutes([this.$router.options.routes[0]]),this.$store.dispatch("setMenu",o)}}},i={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]};var u=t("VU/8")(r,i,!1,function(e){t("mx6z")},null,null).exports,c=t("YaEn"),s=t("zL8q"),l=t.n(s),p=(t("tvR6"),t("IcnI"));o.default.use(l.a),o.default.config.productionTip=!1,new o.default({el:"#app",store:p.a,router:c.a,components:{App:u},template:"<App/>"})},YaEn:function(e,n,t){"use strict";var o=t("7+uW"),a=t("IcnI"),r=t("/ocq"),i=t("zSLJ");o.default.use(r.a);var u=new r.a({routes:[{path:"/",name:"index",component:function(e){return Promise.all([t.e(0),t.e(6)]).then(function(){var n=[t("jHcp")];e.apply(null,n)}.bind(this)).catch(t.oe)},redirect:{name:"first"},children:[{path:"",name:"first",component:function(e){return t.e(4).then(function(){var n=[t("sJm1")];e.apply(null,n)}.bind(this)).catch(t.oe)}}]},{path:"/login",name:"login",component:function(e){return Promise.all([t.e(0),t.e(20)]).then(function(){var n=[t("0HId")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}},{path:"/outManager",name:"outManager",component:function(e){return Promise.all([t.e(0),t.e(29)]).then(function(){var n=[t("hLMI")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}},{path:"/preview/:id",name:"preview",component:function(e){return Promise.all([t.e(1),t.e(0)]).then(function(){var n=[t("pjYA")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{}},{path:"/upload",name:"upload",component:function(e){return Promise.all([t.e(0),t.e(31)]).then(function(){var n=[t("iPJD")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}}]});u.beforeEach(function(e,n,t){if(a.a.commit("mainCanShow"),i.a.get("cc_token")&&(a.a.dispatch("setToken",i.a.get("cc_token")),a.a.dispatch("setPermission",JSON.parse(localStorage.getItem("permission"))),null!==i.a.get("cc_user_name")&&a.a.dispatch("setUserName",i.a.get("cc_user_name"))),a.a.state.nowTab=e.name,e.matched.length>1&&"first"!==e.name){for(var o=void 0,r=0;r<a.a.state.menuList.length;r++)for(var u=a.a.state.menuList[r],c=0;c<u.list.length;c++){var s=u.list[c];s.path===e.path&&(o=s)}a.a.state.openedTab.indexOf(o)<0&&a.a.state.openedTab.push(o)}if(e.meta.readonly?a.a.dispatch("readonly",!0):a.a.dispatch("readonly",!1),"userDetail"===e.name){var l=JSON.parse(localStorage.getItem("permission")).find(function(e){return"3-2"===e.cover}).readonly;a.a.dispatch("readonly",l)}e.meta.delete?a.a.dispatch("deletePermission",!0):a.a.dispatch("deletePermission",!1),e.matched.some(function(e){return!0!==e.meta.skip_auth})&&!a.a.state.token?t({path:"/login"}):t()}),u.onError(function(e){var n=e.message.match(/Loading chunk (\d)+ failed/g),t=u.history.pending.fullPath;n&&u.replace(t)}),n.a=u},mx6z:function(e,n){},tvR6:function(e,n){},zSLJ:function(e,n,t){"use strict";n.a={set:function(e,n,t){var o=new Date;o.setTime(o.getTime()+864e5*t),window.document.cookie=e+"="+n+";path=/;expires="+o.toGMTString()},get:function(e){var n=window.document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return n?n[2]:null},delete:function(e){this.set(e,"",-1)}}}},["NHnr"]);
\ No newline at end of file
webpackJsonp([38],{IcnI:function(e,n,t){"use strict";var o=t("7+uW"),a=t("NYxO"),r=t("zSLJ"),i={setToken:function(e,n){e.token=n,r.a.set("cc_token",n)},setUserName:function(e,n){e.userName=n,r.a.set("cc_user_name",n)},setPermission:function(e,n){e.progressList=n,localStorage.setItem("permission",JSON.stringify(n))},setMenu:function(e,n){e.menuList=n},readonly:function(e,n){e.readonly=n},deletePermission:function(e,n){e.deletePermission=n},mainCanShow:function(e){e.mainLoad=!1},mainUnShow:function(e){e.mainLoad=!0},changeParentRouter:function(e,n){e.menuList.find(function(e){return e.name===n.name}).routerName=n.to.name},progress:function(e,n){switch(n.type){case"new":e.progressList.push({num:0,id:n.id});break;case"change":e.progressList.find(function(e){return e.id===n.id}).num=n.num;break;case"delete":e.progressList.find(function(e){return e.id===n.id})}}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",orderRefund:!1,permission:!1,readonly:!0,deletePermission:!1,mainLoad:!0,menuList:[],menuType:!1,nowTab:"first",progressList:[],openedTab:[{value:"首页",routerName:"first",name:"first",delNo:!0,path:"/index"}]},mutations:i,actions:{setToken:function(e,n){(0,e.commit)("setToken",n)},setUserName:function(e,n){(0,e.commit)("setUserName",n)},setProgress:function(e,n){(0,e.commit)("progress",n)},setPermission:function(e,n){(0,e.commit)("setPermission",n)},setMenu:function(e,n){(0,e.commit)("setMenu",n)},readonly:function(e,n){(0,e.commit)("readonly",n)},deletePermission:function(e,n){(0,e.commit)("deletePermission",n)}}})},NHnr:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var o=t("7+uW"),a=[{name:"",value:"教研管理",icon:"icon-material",list:[{value:"教材列表",routerName:"resources",path:"/resources",cover:"1-1",router:{path:"/resources",name:"resources",component:function(e){return Promise.all([t.e(0),t.e(2)]).then(function(){var n=[t("z5EG")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"商品课程",icon:"icon-shangpin1",list:[{value:"课程列表",routerName:"lesson",path:"/lesson",cover:"2-1",router:{path:"/lesson",name:"lesson",component:function(e){return Promise.all([t.e(0),t.e(5)]).then(function(){var n=[t("AbSL")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"商品列表",routerName:"shop",path:"/shop",cover:"4-1",router:{path:"/shop",name:"shop",component:function(e){return Promise.all([t.e(0),t.e(22)]).then(function(){var n=[t("1djJ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"期数管理",icon:"icon-kecheng",list:[{value:"期数列表",routerName:"periods",path:"/periods",cover:"2-2",router:{path:"/periods",name:"periods",component:function(e){return Promise.all([t.e(0),t.e(16)]).then(function(){var n=[t("ayGs")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"班级列表",routerName:"class",path:"/class",cover:"2-3",router:{path:"/class",name:"class",component:function(e){return Promise.all([t.e(0),t.e(11)]).then(function(){var n=[t("OX9A")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"不上课日期",routerName:"noLesson",path:"/noLesson",cover:"2-4",router:{path:"/noLesson",name:"noLesson",component:function(e){return Promise.all([t.e(0),t.e(23)]).then(function(){var n=[t("sg/1")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"人员管理",icon:"icon-laoshi",list:[{value:"教师列表",routerName:"teacher",path:"/teacher",cover:"3-1",router:{path:"/teacher",name:"teacher",component:function(e){return Promise.all([t.e(0),t.e(13)]).then(function(){var n=[t("Y0Vi")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"用户列表",routerName:"user",path:"/user",cover:"3-2",router:{path:"/user",name:"user",component:function(e){return Promise.all([t.e(0),t.e(8)]).then(function(){var n=[t("jFLA")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"订单管理",icon:"icon-dingdan",list:[{value:"订单列表",routerName:"order",path:"/order",cover:"5-1",router:{path:"/order",name:"order",component:function(e){return Promise.all([t.e(0),t.e(3)]).then(function(){var n=[t("2qmY")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"退款列表",routerName:"refund",path:"/refund",cover:"5-2",router:{path:"/refund",name:"refund",component:function(e){return Promise.all([t.e(0),t.e(25)]).then(function(){var n=[t("89rD")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"提现列表",routerName:"putForward",path:"/putForward",cover:"5-3",router:{path:"/putForward",name:"putForward",component:function(e){return Promise.all([t.e(0),t.e(18)]).then(function(){var n=[t("F5pf")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"发货管理",routerName:"consignment",path:"/consignment",cover:"5-4",router:{path:"/consignment",name:"consignment",component:function(e){return t.e(34).then(function(){var n=[t("usUK")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"订单统计",routerName:"orderCount",path:"/orderCount",cover:"5-5",router:{path:"/orderCount",name:"orderCount",component:function(e){return Promise.all([t.e(0),t.e(32)]).then(function(){var n=[t("s7i+")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"实物管理",icon:"icon-shu",list:[{value:"单品列表",routerName:"single",path:"/single",cover:"6-1",router:{path:"/single",name:"single",component:function(e){return Promise.all([t.e(0),t.e(10)]).then(function(){var n=[t("B31M")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"盒子列表",routerName:"box",path:"/box",cover:"6-2",router:{path:"/box",name:"box",component:function(e){return Promise.all([t.e(0),t.e(9)]).then(function(){var n=[t("+vCD")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"公众号",icon:"icon-ai-weixin",list:[{value:"自动回复",routerName:"focusReply",path:"/focusReply",cover:"7-1",router:{path:"/focusReply",name:"focusReply",component:function(e){return Promise.all([t.e(0),t.e(15)]).then(function(){var n=[t("CK6D")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"关键词回复",routerName:"autoReply",path:"/autoReply",cover:"7-2",router:{path:"/autoReply",name:"autoReply",component:function(e){return Promise.all([t.e(0),t.e(12)]).then(function(){var n=[t("65NY")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"公众号菜单",routerName:"weChat",path:"/weChat",cover:"7-3",router:{path:"/weChat",name:"weChat",component:function(e){return Promise.all([t.e(0),t.e(17)]).then(function(){var n=[t("q5av")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"素材管理",routerName:"weChatResource",path:"/weChatResource",cover:"7-4",router:{path:"/weChatResource",name:"weChatResource",component:function(e){return Promise.all([t.e(0),t.e(24)]).then(function(){var n=[t("Xhqp")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"Banner管理",routerName:"banner",path:"/banner",cover:"7-5",router:{path:"/banner",name:"banner",component:function(e){return Promise.all([t.e(0),t.e(21)]).then(function(){var n=[t("CGL6")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"二维码管理",routerName:"qrcode",path:"/qrcode",cover:"7-6",router:{path:"/qrcode",name:"qrcode",component:function(e){return Promise.all([t.e(0),t.e(7)]).then(function(){var n=[t("lNiQ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"群发助手",routerName:"groupSend",path:"/groupSend",cover:"7-7",router:{path:"/groupSend",name:"groupSend",component:function(e){return Promise.all([t.e(0),t.e(28)]).then(function(){var n=[t("oerw")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"关注取关统计",routerName:"watchCount",path:"/watchCount",cover:"7-8",router:{path:"/watchCount",name:"watchCount",component:function(e){return Promise.all([t.e(0),t.e(33)]).then(function(){var n=[t("Dq6T")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]},{name:"",value:"系统管理",icon:"icon-shezhi",list:[{value:"账号管理",routerName:"admin",path:"/admin",cover:"8-1",router:{path:"/admin",name:"admin",component:function(e){return Promise.all([t.e(0),t.e(35)]).then(function(){var n=[t("+jTk")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"角色管理",routerName:"role",path:"/role",cover:"8-2",router:{path:"/role",name:"role",component:function(e){return Promise.all([t.e(0),t.e(36)]).then(function(){var n=[t("Vt1u")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"菜单管理",routerName:"menu",path:"/menu",cover:"8-3",router:{path:"/menu",name:"menu",component:function(e){return Promise.all([t.e(0),t.e(30)]).then(function(){var n=[t("aTXs")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"系统配置",routerName:"sysConfig",path:"/sysConfig",cover:"8-4",router:{path:"/sysConfig",name:"sysConfig",component:function(e){return Promise.all([t.e(0),t.e(26)]).then(function(){var n=[t("gaNG")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"操作日志",routerName:"adminLog",path:"/adminLog",cover:"8-5",router:{path:"/adminLog",name:"adminLog",component:function(e){return Promise.all([t.e(0),t.e(27)]).then(function(){var n=[t("WZgi")];e.apply(null,n)}.bind(this)).catch(t.oe)}}}]}],r={name:"App",data:function(){return{}},mounted:function(){var e=this;if(window.location.href.indexOf("login")<0){var n=this.$store.state.progressList,o=[];this.$router.options.routes[0].children=[];var r=n.find(function(e){return"5-1"===e.cover});r&&r.refund&&(this.$store.state.orderRefund=!0);var i={path:"/userDetail/:id",name:"userDetail",component:function(e){return Promise.all([t.e(0),t.e(14)]).then(function(){var n=[t("9PRC")];e.apply(null,n)}.bind(this)).catch(t.oe)}},u={path:"/teacher/:id",name:"teacherDetail",component:function(e){return Promise.all([t.e(0),t.e(19)]).then(function(){var n=[t("hFUZ")];e.apply(null,n)}.bind(this)).catch(t.oe)}};a.forEach(function(t){var a=!1,r=[];t.list.forEach(function(t){var o=n.find(function(e){return e.cover===t.cover});o&&(t.router.meta={},t.router.meta.readonly=o.readonly,t.router.meta.delete=!!o.delete,r.push(t),"3-1"===o.cover&&(u.meta={},u.meta.readonly=o.readonly,u.meta.delete=!!o.delete,e.$router.options.routes[0].children.push(u)),"3-2"===o.cover&&(i.meta={},i.meta.readonly=o.readonly,i.meta.delete=!!o.delete,e.$router.options.routes[0].children.push(i)),e.$router.options.routes[0].children.push(t.router),a=!0)}),a&&(t.list=r,o.push(t))}),this.$router.addRoutes([this.$router.options.routes[0]]),this.$store.dispatch("setMenu",o)}}},i={render:function(){var e=this.$createElement,n=this._self._c||e;return n("div",{attrs:{id:"app"}},[n("router-view")],1)},staticRenderFns:[]};var u=t("VU/8")(r,i,!1,function(e){t("mx6z")},null,null).exports,c=t("YaEn"),s=t("zL8q"),l=t.n(s),p=(t("tvR6"),t("IcnI"));o.default.use(l.a),o.default.config.productionTip=!1,new o.default({el:"#app",store:p.a,router:c.a,components:{App:u},template:"<App/>"})},YaEn:function(e,n,t){"use strict";var o=t("7+uW"),a=t("IcnI"),r=t("/ocq"),i=t("zSLJ");o.default.use(r.a);var u=new r.a({routes:[{path:"/",name:"index",component:function(e){return Promise.all([t.e(0),t.e(6)]).then(function(){var n=[t("jHcp")];e.apply(null,n)}.bind(this)).catch(t.oe)},redirect:{name:"first"},children:[{path:"",name:"first",component:function(e){return t.e(4).then(function(){var n=[t("sJm1")];e.apply(null,n)}.bind(this)).catch(t.oe)}}]},{path:"/login",name:"login",component:function(e){return Promise.all([t.e(0),t.e(20)]).then(function(){var n=[t("0HId")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}},{path:"/outManager",name:"outManager",component:function(e){return Promise.all([t.e(0),t.e(29)]).then(function(){var n=[t("hLMI")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}},{path:"/preview/:id",name:"preview",component:function(e){return Promise.all([t.e(1),t.e(0)]).then(function(){var n=[t("pjYA")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{}},{path:"/upload",name:"upload",component:function(e){return Promise.all([t.e(0),t.e(31)]).then(function(){var n=[t("iPJD")];e.apply(null,n)}.bind(this)).catch(t.oe)},meta:{skip_auth:!0}}]});u.beforeEach(function(e,n,t){if(a.a.commit("mainCanShow"),i.a.get("cc_token")&&(a.a.dispatch("setToken",i.a.get("cc_token")),a.a.dispatch("setPermission",JSON.parse(localStorage.getItem("permission"))),null!==i.a.get("cc_user_name")&&a.a.dispatch("setUserName",i.a.get("cc_user_name"))),a.a.state.nowTab=e.name,e.matched.length>1&&"first"!==e.name){for(var o=void 0,r=0;r<a.a.state.menuList.length;r++)for(var u=a.a.state.menuList[r],c=0;c<u.list.length;c++){var s=u.list[c];s.path===e.path&&(o=s)}a.a.state.openedTab.indexOf(o)<0&&a.a.state.openedTab.push(o)}if(e.meta.readonly?a.a.dispatch("readonly",!0):a.a.dispatch("readonly",!1),"userDetail"===e.name){var l=JSON.parse(localStorage.getItem("permission")).find(function(e){return"3-2"===e.cover}).readonly;a.a.dispatch("readonly",l)}e.meta.delete?a.a.dispatch("deletePermission",!0):a.a.dispatch("deletePermission",!1),e.matched.some(function(e){return!0!==e.meta.skip_auth})&&!a.a.state.token?t({path:"/login"}):t()}),u.onError(function(e){var n=e.message.match(/Loading chunk (\d)+ failed/g),t=u.history.pending.fullPath;n&&u.replace(t)}),n.a=u},mx6z:function(e,n){},tvR6:function(e,n){},zSLJ:function(e,n,t){"use strict";n.a={set:function(e,n,t){var o=new Date;o.setTime(o.getTime()+864e5*t),window.document.cookie=e+"="+n+";path=/;expires="+o.toGMTString()},get:function(e){var n=window.document.cookie.match("(^|;) ?"+e+"=([^;]*)(;|$)");return n?n[2]:null},delete:function(e){this.set(e,"",-1)}}}},["NHnr"]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,r,t){for(var f,o,b,i=0,u=[];i<a.length;i++)o=a[i],d[o]&&u.push(d[o][0]),d[o]=0;for(f in r)Object.prototype.hasOwnProperty.call(r,f)&&(e[f]=r[f]);for(c&&c(a,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var a={},d={39:0};function n(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,n),d.l=!0,d.exports}n.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,n){c=d[e]=[a,n]});c[2]=a;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"f1c683cb89eda4523419",1:"f98a3a075ba9d55a9d22",2:"50cff5bce39f61c7d839",3:"48f8b346406ac9a42f4a",4:"f7de107bf23fce922b15",5:"414d7fc44d6445ac39f8",6:"ad94b8f1ea4c3ed83503",7:"d8d6721326f79880eb4e",8:"b6984c4558657c5de318",9:"bf67b8fd9896e9b1caaf",10:"db7dac749a718d28a9d5",11:"763202fa905a29a8d6de",12:"33b952cc64b80ac01be1",13:"a3119050ce4ea8191982",14:"9e83a790cbef2c3573e6",15:"f32e93be6b7fee85031f",16:"6c4839f0f6c00da9129c",17:"d82fe20f937e4ecae454",18:"3cd06f93d54fbda09874",19:"1c1cdc77c16fdd3ad3e9",20:"12422698fd83e9d5e8e3",21:"56d35741e30d2642f8be",22:"3ec8ac155a26307cac59",23:"596ec0d8b06bd333e030",24:"24470849cd37d16fdba5",25:"571cd0c7938258d0d13b",26:"5e0c92a864d43c586261",27:"fad93421de9cd4adb768",28:"173999b998a72b100541",29:"04c783825609287b116c",30:"26c8cdcca5e508e55740",31:"04c9f5d4840ae3246a0d",32:"4e45a27cffec17f47137",33:"ba873198d73abbeede3d",34:"8e82e17774dbd94c6b74",35:"67c637b6f2f4d9599bfd",36:"49cdb1af7d65390e55cc"}[e]+".js";var f=setTimeout(o,12e4);function o(){t.onerror=t.onload=null,clearTimeout(f);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return t.onerror=t.onload=o,r.appendChild(t),a},n.m=e,n.c=a,n.d=function(e,c,a){n.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},n.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(c,"a",c),c},n.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(a,n,r){for(var t,o,b,i=0,u=[];i<a.length;i++)o=a[i],d[o]&&u.push(d[o][0]),d[o]=0;for(t in n)Object.prototype.hasOwnProperty.call(n,t)&&(e[t]=n[t]);for(c&&c(a,n,r);u.length;)u.shift()();if(r)for(i=0;i<r.length;i++)b=f(f.s=r[i]);return b};var a={},d={39:0};function f(c){if(a[c])return a[c].exports;var d=a[c]={i:c,l:!1,exports:{}};return e[c].call(d.exports,d,d.exports,f),d.l=!0,d.exports}f.e=function(e){var c=d[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var a=new Promise(function(a,f){c=d[e]=[a,f]});c[2]=a;var n=document.getElementsByTagName("head")[0],r=document.createElement("script");r.type="text/javascript",r.charset="utf-8",r.async=!0,r.timeout=12e4,f.nc&&r.setAttribute("nonce",f.nc),r.src=f.p+"static/js/"+e+"."+{0:"f1c683cb89eda4523419",1:"f98a3a075ba9d55a9d22",2:"50cff5bce39f61c7d839",3:"48f8b346406ac9a42f4a",4:"f7de107bf23fce922b15",5:"414d7fc44d6445ac39f8",6:"ad94b8f1ea4c3ed83503",7:"d8d6721326f79880eb4e",8:"b6984c4558657c5de318",9:"bf67b8fd9896e9b1caaf",10:"db7dac749a718d28a9d5",11:"763202fa905a29a8d6de",12:"33b952cc64b80ac01be1",13:"a3119050ce4ea8191982",14:"9e83a790cbef2c3573e6",15:"f32e93be6b7fee85031f",16:"6c4839f0f6c00da9129c",17:"d82fe20f937e4ecae454",18:"3cd06f93d54fbda09874",19:"1c1cdc77c16fdd3ad3e9",20:"12422698fd83e9d5e8e3",21:"56d35741e30d2642f8be",22:"bd503c7cd84072a35b51",23:"7b947fcdd0b4b4fa2b04",24:"4bed2188b7c04ee2ab86",25:"5fe608c129da830c73b7",26:"5ac748b0f3791961b9c9",27:"fad93421de9cd4adb768",28:"173999b998a72b100541",29:"04c783825609287b116c",30:"26c8cdcca5e508e55740",31:"04c9f5d4840ae3246a0d",32:"4e45a27cffec17f47137",33:"ba873198d73abbeede3d",34:"8e82e17774dbd94c6b74",35:"67c637b6f2f4d9599bfd",36:"49cdb1af7d65390e55cc"}[e]+".js";var t=setTimeout(o,12e4);function o(){r.onerror=r.onload=null,clearTimeout(t);var c=d[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),d[e]=void 0)}return r.onerror=r.onload=o,n.appendChild(r),a},f.m=e,f.c=a,f.d=function(e,c,a){f.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:a})},f.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return f.d(c,"a",c),c},f.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},f.p="/",f.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -141,7 +141,7 @@
</el-form-item>
</el-col>
</el-row>
<el-form-item label="推荐奖金(元)" v-if="form.goods_type === 1">
<el-form-item label="推荐奖金(元)" v-if="form.goods_type === 1 || form.goods_type === 3 ">
<el-input-number v-model="form.invite_earnings" label="推荐奖金"></el-input-number>
</el-form-item>
<el-form-item label="是否配置实物">
......@@ -151,7 +151,7 @@
:inactive-value="0">
</el-switch> <span style="font-size: 12px;">打开后提示用户填写具体住址</span>
</el-form-item>
<el-row v-if="form.goods_type === 1">
<el-row v-if="form.goods_type === 1 || form.goods_type === 3 ">
<el-col :span="12">
<el-form-item label="是否允许用户推广" label-width="200">
<el-switch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment