Commit 05595e8f authored by wangwei's avatar wangwei

上传最大时间修改 打包

parent a5defc82
<!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.91ebf43f2430658a7d3994c68fc43506.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.30d8f4b4acb905dcb31b.js></script><script type=text/javascript src=/static/js/vendor.9122c146b78876133e6f.js></script><script type=text/javascript src=/static/js/app.e2a2bd2e3d79c9d8a333.js></script></body></html>
\ 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.3e8fd391de029b654288c8e1051b84d6.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.87b008980ec4cce9cfc8.js></script><script type=text/javascript src=/static/js/vendor.9122c146b78876133e6f.js></script><script type=text/javascript src=/static/js/app.e34331e88af91f274670.js></script></body></html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([0],{"+TkF":function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"l",function(){return o}),n.d(e,"i",function(){return i}),n.d(e,"e",function(){return u}),n.d(e,"h",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"m",function(){return f}),n.d(e,"f",function(){return c}),n.d(e,"j",function(){return d}),n.d(e,"b",function(){return p}),n.d(e,"c",function(){return l}),n.d(e,"k",function(){return h}),n.d(e,"g",function(){return m});var r={0:"启用",1:"冻结"},o={0:"老师",1:"新星妈妈",2:"推广人",3:"市场"},i={0:"月课",1:"日课"},u={1:"普通商品",2:"团购商品"},a={0:"否",1:"是"},s={0:"编辑中",1:"在售",2:"下架"},f={0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"},c={0:"用户",1:"老师",2:"推广渠道"},d={0:"待付款",1:"付款成功",2:"付款失败",3:"退款成功"},p={1:"单买",2:"团购"},l=[{id:1,value:"单买"},{id:2,value:"团购"}],h=[{id:0,value:"待付款"},{id:1,value:"付款成功"},{id:2,value:"付款失败"},{id:3,value:"退款成功"}],m=[{id:0,value:"用户"},{id:1,value:"老师"},{id:2,value:"推广渠道"}]},"21It":function(t,e,n){"use strict";var r=n("FtD3");t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},"5VQ+":function(t,e,n){"use strict";var r=n("cGG2");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},"7GwW":function(t,e,n){"use strict";var r=n("cGG2"),o=n("21It"),i=n("DQCr"),u=n("oJlt"),a=n("GHBc"),s=n("FtD3"),f="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("thJu");t.exports=function(t){return new Promise(function(e,c){var d=t.data,p=t.headers;r.isFormData(d)&&delete p["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||a(t.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),t.auth){var y=t.auth.username||"",g=t.auth.password||"";p.Authorization="Basic "+f(y+":"+g)}if(l.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:t,request:l};o(e,c,r),l=null}},l.onerror=function(){c(s("Network Error",t,null,l)),l=null},l.ontimeout=function(){c(s("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var _=n("p1b6"),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;v&&(p[t.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(p,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete p[e]:l.setRequestHeader(e,t)}),t.withCredentials&&(l.withCredentials=!0),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){l&&(l.abort(),c(t),l=null)}),void 0===d&&(d=null),l.send(d)})}},CCn6:function(t,e,n){"use strict";var r=n("7+uW"),o=n("mtWM"),i=n.n(o),u=n("NC6I"),a=n.n(u),s=n("IcnI"),f=n("zL8q"),c=n("YaEn"),d=n("zSLJ");i.a.defaults.timeout=5e4,i.a.defaults.baseURL="",i.a.interceptors.request.use(function(t){var e=d.a.get("cc_token");if(t.headers["Content-Type"]||(t.headers={"Content-Type":"application/json"}),e&&(t.headers.token=e),"get"===t.method&&"/api/admin/login"!==t.url){t.params=t.params||{};var n=JSON.parse(JSON.stringify(t.params));for(var r in n){/^[0-9]+$/.test(n[r])&&(n[r]=Number(n[r])),null===n[r]&&(n[r]=""),n[r]=a()(n[r].toString())}n.sing="singsingenglish21000",t.params.param_token=a()(JSON.stringify(n))}else if("/api/admin/login"!==t.url){t.data=t.data||{};var o=JSON.parse(JSON.stringify(t.data));for(var i in o){/^[0-9]+$/.test(o[i])&&(o[i]=Number(o[i])),null===o[i]&&(o[i]=""),o[i]=a()(o[i].toString())}o.sing="singsingenglish21000",t.data.param_token=a()(JSON.stringify(o))}return t},function(t){return Promise.reject(t)}),i.a.interceptors.response.use(function(t){return 501===t.data.code&&c.a.push({name:"login"}),t},function(t){return Promise.reject(t)}),n.d(e,"_31",function(){return p}),n.d(e,"_32",function(){return l}),n.d(e,"V",function(){return h}),n.d(e,"J",function(){return m}),n.d(e,"a",function(){return y}),n.d(e,"s",function(){return g}),n.d(e,"R",function(){return _}),n.d(e,"_29",function(){return v}),n.d(e,"_28",function(){return E}),n.d(e,"_27",function(){return A}),n.d(e,"_26",function(){return b}),n.d(e,"n",function(){return w}),n.d(e,"T",function(){return R}),n.d(e,"D",function(){return S}),n.d(e,"_13",function(){return $}),n.d(e,"_14",function(){return C}),n.d(e,"P",function(){return H}),n.d(e,"G",function(){return x}),n.d(e,"j",function(){return B}),n.d(e,"_12",function(){return O}),n.d(e,"_11",function(){return T}),n.d(e,"i",function(){return N}),n.d(e,"O",function(){return M}),n.d(e,"F",function(){return k}),n.d(e,"_40",function(){return F}),n.d(e,"H",function(){return D}),n.d(e,"_3",function(){return U}),n.d(e,"e",function(){return P}),n.d(e,"v",function(){return j}),n.d(e,"_39",function(){return I}),n.d(e,"_2",function(){return X}),n.d(e,"h",function(){return G}),n.d(e,"_10",function(){return L}),n.d(e,"N",function(){return J}),n.d(e,"y",function(){return W}),n.d(e,"_25",function(){return q}),n.d(e,"_24",function(){return z}),n.d(e,"C",function(){return Y}),n.d(e,"m",function(){return V}),n.d(e,"S",function(){return K}),n.d(e,"_1",function(){return Q}),n.d(e,"_0",function(){return Z}),n.d(e,"c",function(){return tt}),n.d(e,"u",function(){return et}),n.d(e,"Z",function(){return nt}),n.d(e,"L",function(){return rt}),n.d(e,"_20",function(){return ot}),n.d(e,"_37",function(){return it}),n.d(e,"_8",function(){return ut}),n.d(e,"_35",function(){return at}),n.d(e,"_41",function(){return st}),n.d(e,"E",function(){return ft}),n.d(e,"_7",function(){return ct}),n.d(e,"_15",function(){return dt}),n.d(e,"_44",function(){return pt}),n.d(e,"_16",function(){return lt}),n.d(e,"_36",function(){return ht}),n.d(e,"_42",function(){return mt}),n.d(e,"z",function(){return yt}),n.d(e,"_23",function(){return gt}),n.d(e,"_38",function(){return _t}),n.d(e,"_43",function(){return vt}),n.d(e,"_22",function(){return Et}),n.d(e,"B",function(){return At}),n.d(e,"Y",function(){return bt}),n.d(e,"b",function(){return wt}),n.d(e,"K",function(){return Rt}),n.d(e,"X",function(){return St}),n.d(e,"t",function(){return $t}),n.d(e,"_33",function(){return Ct}),n.d(e,"_18",function(){return Ht}),n.d(e,"U",function(){return xt}),n.d(e,"_9",function(){return Bt}),n.d(e,"A",function(){return Ot}),n.d(e,"_5",function(){return Tt}),n.d(e,"_19",function(){return Nt}),n.d(e,"w",function(){return Mt}),n.d(e,"f",function(){return kt}),n.d(e,"M",function(){return Ft}),n.d(e,"_4",function(){return Dt}),n.d(e,"_6",function(){return Ut}),n.d(e,"g",function(){return Pt}),n.d(e,"p",function(){return jt}),n.d(e,"x",function(){return It}),n.d(e,"_17",function(){return Xt}),n.d(e,"Q",function(){return Gt}),n.d(e,"_34",function(){return Lt}),n.d(e,"I",function(){return Jt}),n.d(e,"_45",function(){return Wt}),n.d(e,"_21",function(){return qt}),n.d(e,"_30",function(){return zt}),n.d(e,"d",function(){return Yt}),n.d(e,"l",function(){return Vt}),n.d(e,"W",function(){return Kt}),n.d(e,"o",function(){return Qt}),n.d(e,"q",function(){return Zt}),n.d(e,"k",function(){return te}),n.d(e,"r",function(){return ee});r.default.prototype.$post=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.post(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$fetch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.get(t,{params:e}).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)}).catch(function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$patch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.patch(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$put=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.put(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$del=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.delete(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$upload=function(t,e){return new Promise(function(n,r){var o=parseInt(Number(e.file.size)/Number(10485760)+1),u=0;!function a(){var c=new FormData,d=e.file.slice(1024*u*1024*10,1024*(u+1)*1024*10);c.append("chunk",u),c.append("file_name",e.file.name),c.append("count",o),c.append("type",e.type),c.append("file",d),i.a.post(t,c,{headers:{"Content-Type":"multipart/form-data"},timeout:1e5,onUploadProgress:function(t){if(s.a.state.progressList.find(function(t){return t.id===e.file.uid})){var n=(Number(t.loaded)+Number(1024*u*1024*10))/Number(e.file.size)*100|0;s.a.dispatch("setProgress",{type:"change",id:e.file.uid,num:n})}}}).then(function(t){200===t.data.code?u+1<o?(u++,a()):(u=0,n(t.data.data)):f.Message.error(t.data.msg)}).catch(function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})}()})};var p=function(t){return r.default.prototype.$post("/api/admin/login",{username:t.username,passwd:t.password})},l=function(){return r.default.prototype.$post("/api/admin/logout")},h=function(t){return r.default.prototype.$fetch("/api/admin/user/list",t)},m=function(t,e){return r.default.prototype.$put("/api/admin/user/info/"+t,e)},y=function(t){return r.default.prototype.$post("/api/admin/user/add",t)},g=function(t){return r.default.prototype.$del("/api/admin/user/"+t)},_=function(t,e){return r.default.prototype.$patch("/api/admin/user/passwd/"+t,e)},v=function(t){return r.default.prototype.$fetch("/api/admin/student/list",t)},E=function(t){return r.default.prototype.$fetch("/api/admin/student/info/"+t)},A=function(t){return r.default.prototype.$fetch("/api/admin/teacher/list",t)},b=function(t,e){return r.default.prototype.$fetch("/api/admin/teacher/info/"+t,e)},w=function(t){return r.default.prototype.$post("/api/admin/teacher/add",t)},R=function(t,e){return r.default.prototype.$put("/api/admin/teacher/info/"+t,e)},S=function(t){return r.default.prototype.$del("/api/admin/teacher/"+t)},$=function(t){return r.default.prototype.$fetch("/api/admin/course/list",t)},C=function(t,e){return r.default.prototype.$fetch("/api/admin/course/info/"+t,e)},H=function(t,e){return r.default.prototype.$put("/api/admin/course/info/"+t,e)},x=function(t){return r.default.prototype.$del("/api/admin/course/"+t)},B=function(t){return r.default.prototype.$post("/api/admin/course/add",t)},O=function(t){return r.default.prototype.$fetch("/api/admin/goods/list",t)},T=function(t,e){return r.default.prototype.$fetch("/api/admin/goods/info/"+t,e)},N=function(t){return r.default.prototype.$post("/api/admin/goods/add",t)},M=function(t,e){return r.default.prototype.$put("/api/admin/goods/info/"+t,e)},k=function(t){return r.default.prototype.$del("/api/admin/goods/"+t)},F=function(t){return r.default.prototype.$patch("/api/admin/goods/putaway/"+t)},D=function(t){return r.default.prototype.$patch("/api/admin/goods/soldout/"+t)},U=function(t){return r.default.prototype.$fetch("/api/admin/category/list/0",{pid:t})},P=function(t){return r.default.prototype.$post("/api/admin/category/add/0",t)},j=function(t){return r.default.prototype.$del("/api/admin/category/"+t)},I=function(t){return r.default.prototype.$patch("/api/admin/category/sort",t)},X=function(t){return r.default.prototype.$fetch("/api/admin/element/list/0",t)},G=function(t,e){return r.default.prototype.$post("/api/admin/element/add/"+e,t)},L=function(t){return r.default.prototype.$fetch("/api/admin/element/"+t)},J=function(t,e){return r.default.prototype.$put("/api/admin/element/"+e,t)},W=function(t){return r.default.prototype.$del("/api/admin/element/"+t)},q=function(t){return r.default.prototype.$fetch("/api/admin/item/stock/list",t)},z=function(t){return r.default.prototype.$fetch("/api/admin/item/stock/info/"+t)},Y=function(t){return r.default.prototype.$del("/api/admin/item/stock/"+t)},V=function(t){return r.default.prototype.$post("/api/admin/item/stock/add",t)},K=function(t,e){return r.default.prototype.$put("/api/admin/item/stock/info/"+t,e)},Q=function(){return r.default.prototype.$fetch("/api/admin/category/list/1")},Z=function(t){return r.default.prototype.$fetch("/api/admin/item/box/list/"+t)},tt=function(t,e){return r.default.prototype.$post("/api/admin/item/box/add/"+t,e)},et=function(t){return r.default.prototype.$del("/api/admin/item/box/"+t)},nt=function(t){return r.default.prototype.$fetch("/api/admin/item/box/info/"+t)},rt=function(t,e){return r.default.prototype.$put("/api/admin/item/box/info/"+t,e)},ot=function(){return r.default.prototype.$fetch("/api/admin/open/menu")},it=function(t){return r.default.prototype.$post("/api/admin/open/menu",t)},ut=function(t){return r.default.prototype.$fetch("/api/admin/sys/config/list",t)},at=function(t){return r.default.prototype.$post("/api/admin/sys/config",t)},st=function(t,e){return r.default.prototype.$put("/api/admin/sys/config/"+t,e)},ft=function(t){return r.default.prototype.$del("/api/admin/sys/config/"+t)},ct=function(t){return r.default.prototype.$fetch("/api/admin/sys/config/"+t)},dt=function(t){return r.default.prototype.$fetch("/api/admin/open/media/list",t)},pt=function(t){return r.default.prototype.$upload("/api/public/upload/zone",t)},lt=function(){return r.default.prototype.$fetch("/api/admin/category/list/2")},ht=function(t){return r.default.prototype.$post("/api/admin/category/add/2",t)},mt=function(t,e){return r.default.prototype.$put("/api/admin/category/"+t,e)},yt=function(t){return r.default.prototype.$del("/api/admin/category/"+t)},gt=function(t){return r.default.prototype.$fetch("/api/admin/role/list",t)},_t=function(t){return r.default.prototype.$post("/api/admin/role/add",t)},vt=function(t,e){return r.default.prototype.$put("/api/admin/role/info/"+t,e)},Et=function(t){return r.default.prototype.$fetch("/api/admin/role/info/"+t)},At=function(t){return r.default.prototype.$del("/api/admin/role/"+t)},bt=function(t){return r.default.prototype.$fetch("/api/admin/banner/list",t)},wt=function(t){return r.default.prototype.$post("/api/admin/banner/add",t)},Rt=function(t,e){return r.default.prototype.$put("/api/admin/banner/info/"+t,e)},St=function(t){return r.default.prototype.$fetch("/api/admin/banner/info/"+t)},$t=function(t){return r.default.prototype.$del("/api/admin/banner/"+t)},Ct=function(t,e){return r.default.prototype.$patch("/api/admin/banner/sort",{banner_up_id:t,banner_down_id:e})},Ht=function(t){return r.default.prototype.$fetch("/api/admin/periods/list",t)},xt=function(t,e){return r.default.prototype.$post("/api/admin/periods/add/"+t,e)},Bt=function(t,e){return r.default.prototype.$put("/api/admin/periods/info/"+t,e)},Ot=function(t){return r.default.prototype.$del("/api/admin/periods/"+t)},Tt=function(t,e){return r.default.prototype.$fetch("/api/admin/periods/class/list/"+t,e)},Nt=function(t){return r.default.prototype.$fetch("/api/admin/periods/teacher/list/"+t)},Mt=function(t){return r.default.prototype.$del("/api/admin/periods/class/"+t)},kt=function(t,e){return r.default.prototype.$post("/api/admin/periods/class/add/"+t,e)},Ft=function(t,e){return r.default.prototype.$put("/api/admin/periods/class/info/"+t,e)},Dt=function(t,e){return r.default.prototype.$fetch("/api/admin/periods/class/info/"+t,e)},Ut=function(t){return r.default.prototype.$fetch("/api/admin/class/user/list/"+t)},Pt=function(t,e,n){return r.default.prototype.$post("/api/admin/class/user/add/"+t+"/"+e,n)},jt=function(t,e){return r.default.prototype.$put("/api/admin/class/user/"+t,e)},It=function(t){return r.default.prototype.$del("/api/admin/class/user/"+t)},Xt=function(t){return r.default.prototype.$fetch("/api/admin/order/list",t)},Gt=function(t,e,n){return r.default.prototype.$put("/api/admin/order/desc/"+t+"/"+e,n)},Lt=function(t,e){return r.default.prototype.$post("/api/admin/bill/refund/"+t,e)},Jt=function(t,e){return r.default.prototype.$put("/api/admin/order/address/"+t,e)},Wt=function(t,e){return r.default.prototype.$post("//api/admin/order/withdraw/"+t,e)},qt=function(t){return r.default.prototype.$fetch("/api/admin/order/refund/list",t)},zt=function(t){return r.default.prototype.$fetch("/api/admin/order/withdraw/list",t)},Yt=function(t){return r.default.prototype.$post("/api/admin/category/add/1",t)},Vt=function(t,e){return r.default.prototype.$put("/api/admin/student/bind/"+t,e)},Kt=function(t){return r.default.prototype.$fetch("/api/admin/user/log",t)},Qt=function(t,e){return r.default.prototype.$patch("/api/admin/goods/bind/"+t+"/"+e)},Zt=function(t,e){return r.default.prototype.$patch("/api/admin/goods/conflict/"+t,e)},te=function(t,e){return r.default.prototype.$put("/api/admin/class/user/desc/"+t,e)},ee=function(t){return r.default.prototype.$post("/api/admin/goods/copy/"+t)}},DQCr:function(t,e,n){"use strict";var r=n("cGG2");function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var u=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),u.push(o(e)+"="+o(t))}))}),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},FtD3:function(t,e,n){"use strict";var r=n("t8qj");t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},GHBc:function(t,e,n){"use strict";var r=n("cGG2");t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},"JP+z":function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},JnGA:function(t,e){},KCLY:function(t,e,n){"use strict";(function(e){var r=n("cGG2"),o=n("5VQ+"),i={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,s={adapter:("undefined"!=typeof XMLHttpRequest?a=n("7GwW"):void 0!==e&&(a=n("7GwW")),a),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(u(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){s.headers[t]={}}),r.forEach(["post","put","patch"],function(t){s.headers[t]=r.merge(i)}),t.exports=s}).call(e,n("W2nU"))},NC6I:function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
webpackJsonp([0],{"+TkF":function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"l",function(){return o}),n.d(e,"i",function(){return i}),n.d(e,"e",function(){return u}),n.d(e,"h",function(){return a}),n.d(e,"d",function(){return s}),n.d(e,"m",function(){return f}),n.d(e,"f",function(){return c}),n.d(e,"j",function(){return d}),n.d(e,"b",function(){return p}),n.d(e,"c",function(){return l}),n.d(e,"k",function(){return h}),n.d(e,"g",function(){return m});var r={0:"启用",1:"冻结"},o={0:"老师",1:"新星妈妈",2:"推广人",3:"市场"},i={0:"月课",1:"日课"},u={1:"普通商品",2:"团购商品"},a={0:"否",1:"是"},s={0:"编辑中",1:"在售",2:"下架"},f={0:"周日",1:"周一",2:"周二",3:"周三",4:"周四",5:"周五",6:"周六"},c={0:"用户",1:"老师",2:"推广渠道"},d={0:"待付款",1:"付款成功",2:"付款失败",3:"退款成功"},p={1:"单买",2:"团购"},l=[{id:1,value:"单买"},{id:2,value:"团购"}],h=[{id:0,value:"待付款"},{id:1,value:"付款成功"},{id:2,value:"付款失败"},{id:3,value:"退款成功"}],m=[{id:0,value:"用户"},{id:1,value:"老师"},{id:2,value:"推广渠道"}]},"21It":function(t,e,n){"use strict";var r=n("FtD3");t.exports=function(t,e,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?e(r("Request failed with status code "+n.status,n.config,null,n.request,n)):t(n)}},"5VQ+":function(t,e,n){"use strict";var r=n("cGG2");t.exports=function(t,e){r.forEach(t,function(n,r){r!==e&&r.toUpperCase()===e.toUpperCase()&&(t[e]=n,delete t[r])})}},"7GwW":function(t,e,n){"use strict";var r=n("cGG2"),o=n("21It"),i=n("DQCr"),u=n("oJlt"),a=n("GHBc"),s=n("FtD3"),f="undefined"!=typeof window&&window.btoa&&window.btoa.bind(window)||n("thJu");t.exports=function(t){return new Promise(function(e,c){var d=t.data,p=t.headers;r.isFormData(d)&&delete p["Content-Type"];var l=new XMLHttpRequest,h="onreadystatechange",m=!1;if("undefined"==typeof window||!window.XDomainRequest||"withCredentials"in l||a(t.url)||(l=new window.XDomainRequest,h="onload",m=!0,l.onprogress=function(){},l.ontimeout=function(){}),t.auth){var y=t.auth.username||"",g=t.auth.password||"";p.Authorization="Basic "+f(y+":"+g)}if(l.open(t.method.toUpperCase(),i(t.url,t.params,t.paramsSerializer),!0),l.timeout=t.timeout,l[h]=function(){if(l&&(4===l.readyState||m)&&(0!==l.status||l.responseURL&&0===l.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in l?u(l.getAllResponseHeaders()):null,r={data:t.responseType&&"text"!==t.responseType?l.response:l.responseText,status:1223===l.status?204:l.status,statusText:1223===l.status?"No Content":l.statusText,headers:n,config:t,request:l};o(e,c,r),l=null}},l.onerror=function(){c(s("Network Error",t,null,l)),l=null},l.ontimeout=function(){c(s("timeout of "+t.timeout+"ms exceeded",t,"ECONNABORTED",l)),l=null},r.isStandardBrowserEnv()){var _=n("p1b6"),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?_.read(t.xsrfCookieName):void 0;v&&(p[t.xsrfHeaderName]=v)}if("setRequestHeader"in l&&r.forEach(p,function(t,e){void 0===d&&"content-type"===e.toLowerCase()?delete p[e]:l.setRequestHeader(e,t)}),t.withCredentials&&(l.withCredentials=!0),t.responseType)try{l.responseType=t.responseType}catch(e){if("json"!==t.responseType)throw e}"function"==typeof t.onDownloadProgress&&l.addEventListener("progress",t.onDownloadProgress),"function"==typeof t.onUploadProgress&&l.upload&&l.upload.addEventListener("progress",t.onUploadProgress),t.cancelToken&&t.cancelToken.promise.then(function(t){l&&(l.abort(),c(t),l=null)}),void 0===d&&(d=null),l.send(d)})}},CCn6:function(t,e,n){"use strict";var r=n("7+uW"),o=n("mtWM"),i=n.n(o),u=n("NC6I"),a=n.n(u),s=n("IcnI"),f=n("zL8q"),c=n("YaEn"),d=n("zSLJ");i.a.defaults.timeout=5e4,i.a.defaults.baseURL="",i.a.interceptors.request.use(function(t){var e=d.a.get("cc_token");if(t.headers["Content-Type"]||(t.headers={"Content-Type":"application/json"}),e&&(t.headers.token=e),"get"===t.method&&"/api/admin/login"!==t.url){t.params=t.params||{};var n=JSON.parse(JSON.stringify(t.params));for(var r in n){/^[0-9]+$/.test(n[r])&&(n[r]=Number(n[r])),null===n[r]&&(n[r]=""),n[r]=a()(n[r].toString())}n.sing="singsingenglish21000",t.params.param_token=a()(JSON.stringify(n))}else if("/api/admin/login"!==t.url){t.data=t.data||{};var o=JSON.parse(JSON.stringify(t.data));for(var i in o){/^[0-9]+$/.test(o[i])&&(o[i]=Number(o[i])),null===o[i]&&(o[i]=""),o[i]=a()(o[i].toString())}o.sing="singsingenglish21000",t.data.param_token=a()(JSON.stringify(o))}return t},function(t){return Promise.reject(t)}),i.a.interceptors.response.use(function(t){return 501===t.data.code&&c.a.push({name:"login"}),t},function(t){return Promise.reject(t)}),n.d(e,"_31",function(){return p}),n.d(e,"_32",function(){return l}),n.d(e,"V",function(){return h}),n.d(e,"J",function(){return m}),n.d(e,"a",function(){return y}),n.d(e,"s",function(){return g}),n.d(e,"R",function(){return _}),n.d(e,"_29",function(){return v}),n.d(e,"_28",function(){return E}),n.d(e,"_27",function(){return A}),n.d(e,"_26",function(){return b}),n.d(e,"n",function(){return w}),n.d(e,"T",function(){return R}),n.d(e,"D",function(){return S}),n.d(e,"_13",function(){return $}),n.d(e,"_14",function(){return C}),n.d(e,"P",function(){return H}),n.d(e,"G",function(){return x}),n.d(e,"j",function(){return B}),n.d(e,"_12",function(){return O}),n.d(e,"_11",function(){return T}),n.d(e,"i",function(){return N}),n.d(e,"O",function(){return M}),n.d(e,"F",function(){return k}),n.d(e,"_40",function(){return F}),n.d(e,"H",function(){return D}),n.d(e,"_3",function(){return U}),n.d(e,"e",function(){return P}),n.d(e,"v",function(){return j}),n.d(e,"_39",function(){return I}),n.d(e,"_2",function(){return X}),n.d(e,"h",function(){return G}),n.d(e,"_10",function(){return L}),n.d(e,"N",function(){return J}),n.d(e,"y",function(){return W}),n.d(e,"_25",function(){return q}),n.d(e,"_24",function(){return z}),n.d(e,"C",function(){return Y}),n.d(e,"m",function(){return V}),n.d(e,"S",function(){return K}),n.d(e,"_1",function(){return Q}),n.d(e,"_0",function(){return Z}),n.d(e,"c",function(){return tt}),n.d(e,"u",function(){return et}),n.d(e,"Z",function(){return nt}),n.d(e,"L",function(){return rt}),n.d(e,"_20",function(){return ot}),n.d(e,"_37",function(){return it}),n.d(e,"_8",function(){return ut}),n.d(e,"_35",function(){return at}),n.d(e,"_41",function(){return st}),n.d(e,"E",function(){return ft}),n.d(e,"_7",function(){return ct}),n.d(e,"_15",function(){return dt}),n.d(e,"_44",function(){return pt}),n.d(e,"_16",function(){return lt}),n.d(e,"_36",function(){return ht}),n.d(e,"_42",function(){return mt}),n.d(e,"z",function(){return yt}),n.d(e,"_23",function(){return gt}),n.d(e,"_38",function(){return _t}),n.d(e,"_43",function(){return vt}),n.d(e,"_22",function(){return Et}),n.d(e,"B",function(){return At}),n.d(e,"Y",function(){return bt}),n.d(e,"b",function(){return wt}),n.d(e,"K",function(){return Rt}),n.d(e,"X",function(){return St}),n.d(e,"t",function(){return $t}),n.d(e,"_33",function(){return Ct}),n.d(e,"_18",function(){return Ht}),n.d(e,"U",function(){return xt}),n.d(e,"_9",function(){return Bt}),n.d(e,"A",function(){return Ot}),n.d(e,"_5",function(){return Tt}),n.d(e,"_19",function(){return Nt}),n.d(e,"w",function(){return Mt}),n.d(e,"f",function(){return kt}),n.d(e,"M",function(){return Ft}),n.d(e,"_4",function(){return Dt}),n.d(e,"_6",function(){return Ut}),n.d(e,"g",function(){return Pt}),n.d(e,"p",function(){return jt}),n.d(e,"x",function(){return It}),n.d(e,"_17",function(){return Xt}),n.d(e,"Q",function(){return Gt}),n.d(e,"_34",function(){return Lt}),n.d(e,"I",function(){return Jt}),n.d(e,"_45",function(){return Wt}),n.d(e,"_21",function(){return qt}),n.d(e,"_30",function(){return zt}),n.d(e,"d",function(){return Yt}),n.d(e,"l",function(){return Vt}),n.d(e,"W",function(){return Kt}),n.d(e,"o",function(){return Qt}),n.d(e,"q",function(){return Zt}),n.d(e,"k",function(){return te}),n.d(e,"r",function(){return ee});r.default.prototype.$post=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.post(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$fetch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.get(t,{params:e}).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)}).catch(function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$patch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.patch(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$put=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.put(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$del=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Promise(function(n,r){i.a.delete(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?c.a.push({name:"login"}):503===t.data.code?f.Message.error("请勿平凡操作"):f.Message.error(t.data.msg)},function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})})},r.default.prototype.$upload=function(t,e){return new Promise(function(n,r){var o=parseInt(Number(e.file.size)/Number(10485760)+1),u=0;!function a(){var c=new FormData,d=e.file.slice(1024*u*1024*10,1024*(u+1)*1024*10);c.append("chunk",u),c.append("file_name",e.file.name),c.append("count",o),c.append("type",e.type),c.append("file",d),i.a.post(t,c,{headers:{"Content-Type":"multipart/form-data"},timeout:1e7,onUploadProgress:function(t){if(s.a.state.progressList.find(function(t){return t.id===e.file.uid})){var n=(Number(t.loaded)+Number(1024*u*1024*10))/Number(e.file.size)*100|0;s.a.dispatch("setProgress",{type:"change",id:e.file.uid,num:n})}}}).then(function(t){200===t.data.code?u+1<o?(u++,a()):(u=0,n(t.data.data)):f.Message.error(t.data.msg)}).catch(function(t){r(t);var e="请求失败!请检查网络";t.response&&(e=t.response.data.message),Object(f.MessageBox)({title:"错误!",message:e,type:"error"})})}()})};var p=function(t){return r.default.prototype.$post("/api/admin/login",{username:t.username,passwd:t.password})},l=function(){return r.default.prototype.$post("/api/admin/logout")},h=function(t){return r.default.prototype.$fetch("/api/admin/user/list",t)},m=function(t,e){return r.default.prototype.$put("/api/admin/user/info/"+t,e)},y=function(t){return r.default.prototype.$post("/api/admin/user/add",t)},g=function(t){return r.default.prototype.$del("/api/admin/user/"+t)},_=function(t,e){return r.default.prototype.$patch("/api/admin/user/passwd/"+t,e)},v=function(t){return r.default.prototype.$fetch("/api/admin/student/list",t)},E=function(t){return r.default.prototype.$fetch("/api/admin/student/info/"+t)},A=function(t){return r.default.prototype.$fetch("/api/admin/teacher/list",t)},b=function(t,e){return r.default.prototype.$fetch("/api/admin/teacher/info/"+t,e)},w=function(t){return r.default.prototype.$post("/api/admin/teacher/add",t)},R=function(t,e){return r.default.prototype.$put("/api/admin/teacher/info/"+t,e)},S=function(t){return r.default.prototype.$del("/api/admin/teacher/"+t)},$=function(t){return r.default.prototype.$fetch("/api/admin/course/list",t)},C=function(t,e){return r.default.prototype.$fetch("/api/admin/course/info/"+t,e)},H=function(t,e){return r.default.prototype.$put("/api/admin/course/info/"+t,e)},x=function(t){return r.default.prototype.$del("/api/admin/course/"+t)},B=function(t){return r.default.prototype.$post("/api/admin/course/add",t)},O=function(t){return r.default.prototype.$fetch("/api/admin/goods/list",t)},T=function(t,e){return r.default.prototype.$fetch("/api/admin/goods/info/"+t,e)},N=function(t){return r.default.prototype.$post("/api/admin/goods/add",t)},M=function(t,e){return r.default.prototype.$put("/api/admin/goods/info/"+t,e)},k=function(t){return r.default.prototype.$del("/api/admin/goods/"+t)},F=function(t){return r.default.prototype.$patch("/api/admin/goods/putaway/"+t)},D=function(t){return r.default.prototype.$patch("/api/admin/goods/soldout/"+t)},U=function(t){return r.default.prototype.$fetch("/api/admin/category/list/0",{pid:t})},P=function(t){return r.default.prototype.$post("/api/admin/category/add/0",t)},j=function(t){return r.default.prototype.$del("/api/admin/category/"+t)},I=function(t){return r.default.prototype.$patch("/api/admin/category/sort",t)},X=function(t){return r.default.prototype.$fetch("/api/admin/element/list/0",t)},G=function(t,e){return r.default.prototype.$post("/api/admin/element/add/"+e,t)},L=function(t){return r.default.prototype.$fetch("/api/admin/element/"+t)},J=function(t,e){return r.default.prototype.$put("/api/admin/element/"+e,t)},W=function(t){return r.default.prototype.$del("/api/admin/element/"+t)},q=function(t){return r.default.prototype.$fetch("/api/admin/item/stock/list",t)},z=function(t){return r.default.prototype.$fetch("/api/admin/item/stock/info/"+t)},Y=function(t){return r.default.prototype.$del("/api/admin/item/stock/"+t)},V=function(t){return r.default.prototype.$post("/api/admin/item/stock/add",t)},K=function(t,e){return r.default.prototype.$put("/api/admin/item/stock/info/"+t,e)},Q=function(){return r.default.prototype.$fetch("/api/admin/category/list/1")},Z=function(t){return r.default.prototype.$fetch("/api/admin/item/box/list/"+t)},tt=function(t,e){return r.default.prototype.$post("/api/admin/item/box/add/"+t,e)},et=function(t){return r.default.prototype.$del("/api/admin/item/box/"+t)},nt=function(t){return r.default.prototype.$fetch("/api/admin/item/box/info/"+t)},rt=function(t,e){return r.default.prototype.$put("/api/admin/item/box/info/"+t,e)},ot=function(){return r.default.prototype.$fetch("/api/admin/open/menu")},it=function(t){return r.default.prototype.$post("/api/admin/open/menu",t)},ut=function(t){return r.default.prototype.$fetch("/api/admin/sys/config/list",t)},at=function(t){return r.default.prototype.$post("/api/admin/sys/config",t)},st=function(t,e){return r.default.prototype.$put("/api/admin/sys/config/"+t,e)},ft=function(t){return r.default.prototype.$del("/api/admin/sys/config/"+t)},ct=function(t){return r.default.prototype.$fetch("/api/admin/sys/config/"+t)},dt=function(t){return r.default.prototype.$fetch("/api/admin/open/media/list",t)},pt=function(t){return r.default.prototype.$upload("/api/public/upload/zone",t)},lt=function(){return r.default.prototype.$fetch("/api/admin/category/list/2")},ht=function(t){return r.default.prototype.$post("/api/admin/category/add/2",t)},mt=function(t,e){return r.default.prototype.$put("/api/admin/category/"+t,e)},yt=function(t){return r.default.prototype.$del("/api/admin/category/"+t)},gt=function(t){return r.default.prototype.$fetch("/api/admin/role/list",t)},_t=function(t){return r.default.prototype.$post("/api/admin/role/add",t)},vt=function(t,e){return r.default.prototype.$put("/api/admin/role/info/"+t,e)},Et=function(t){return r.default.prototype.$fetch("/api/admin/role/info/"+t)},At=function(t){return r.default.prototype.$del("/api/admin/role/"+t)},bt=function(t){return r.default.prototype.$fetch("/api/admin/banner/list",t)},wt=function(t){return r.default.prototype.$post("/api/admin/banner/add",t)},Rt=function(t,e){return r.default.prototype.$put("/api/admin/banner/info/"+t,e)},St=function(t){return r.default.prototype.$fetch("/api/admin/banner/info/"+t)},$t=function(t){return r.default.prototype.$del("/api/admin/banner/"+t)},Ct=function(t,e){return r.default.prototype.$patch("/api/admin/banner/sort",{banner_up_id:t,banner_down_id:e})},Ht=function(t){return r.default.prototype.$fetch("/api/admin/periods/list",t)},xt=function(t,e){return r.default.prototype.$post("/api/admin/periods/add/"+t,e)},Bt=function(t,e){return r.default.prototype.$put("/api/admin/periods/info/"+t,e)},Ot=function(t){return r.default.prototype.$del("/api/admin/periods/"+t)},Tt=function(t,e){return r.default.prototype.$fetch("/api/admin/periods/class/list/"+t,e)},Nt=function(t){return r.default.prototype.$fetch("/api/admin/periods/teacher/list/"+t)},Mt=function(t){return r.default.prototype.$del("/api/admin/periods/class/"+t)},kt=function(t,e){return r.default.prototype.$post("/api/admin/periods/class/add/"+t,e)},Ft=function(t,e){return r.default.prototype.$put("/api/admin/periods/class/info/"+t,e)},Dt=function(t,e){return r.default.prototype.$fetch("/api/admin/periods/class/info/"+t,e)},Ut=function(t){return r.default.prototype.$fetch("/api/admin/class/user/list/"+t)},Pt=function(t,e,n){return r.default.prototype.$post("/api/admin/class/user/add/"+t+"/"+e,n)},jt=function(t,e){return r.default.prototype.$put("/api/admin/class/user/"+t,e)},It=function(t){return r.default.prototype.$del("/api/admin/class/user/"+t)},Xt=function(t){return r.default.prototype.$fetch("/api/admin/order/list",t)},Gt=function(t,e,n){return r.default.prototype.$put("/api/admin/order/desc/"+t+"/"+e,n)},Lt=function(t,e){return r.default.prototype.$post("/api/admin/bill/refund/"+t,e)},Jt=function(t,e){return r.default.prototype.$put("/api/admin/order/address/"+t,e)},Wt=function(t,e){return r.default.prototype.$post("//api/admin/order/withdraw/"+t,e)},qt=function(t){return r.default.prototype.$fetch("/api/admin/order/refund/list",t)},zt=function(t){return r.default.prototype.$fetch("/api/admin/order/withdraw/list",t)},Yt=function(t){return r.default.prototype.$post("/api/admin/category/add/1",t)},Vt=function(t,e){return r.default.prototype.$put("/api/admin/student/bind/"+t,e)},Kt=function(t){return r.default.prototype.$fetch("/api/admin/user/log",t)},Qt=function(t,e){return r.default.prototype.$patch("/api/admin/goods/bind/"+t+"/"+e)},Zt=function(t,e){return r.default.prototype.$patch("/api/admin/goods/conflict/"+t,e)},te=function(t,e){return r.default.prototype.$put("/api/admin/class/user/desc/"+t,e)},ee=function(t){return r.default.prototype.$post("/api/admin/goods/copy/"+t)}},DQCr:function(t,e,n){"use strict";var r=n("cGG2");function o(t){return encodeURIComponent(t).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}t.exports=function(t,e,n){if(!e)return t;var i;if(n)i=n(e);else if(r.isURLSearchParams(e))i=e.toString();else{var u=[];r.forEach(e,function(t,e){null!==t&&void 0!==t&&(r.isArray(t)?e+="[]":t=[t],r.forEach(t,function(t){r.isDate(t)?t=t.toISOString():r.isObject(t)&&(t=JSON.stringify(t)),u.push(o(e)+"="+o(t))}))}),i=u.join("&")}return i&&(t+=(-1===t.indexOf("?")?"?":"&")+i),t}},FtD3:function(t,e,n){"use strict";var r=n("t8qj");t.exports=function(t,e,n,o,i){var u=new Error(t);return r(u,e,n,o,i)}},GHBc:function(t,e,n){"use strict";var r=n("cGG2");t.exports=r.isStandardBrowserEnv()?function(){var t,e=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(t){var r=t;return e&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=o(window.location.href),function(e){var n=r.isString(e)?o(e):e;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}},"JP+z":function(t,e,n){"use strict";t.exports=function(t,e){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return t.apply(e,n)}}},JnGA:function(t,e){},KCLY:function(t,e,n){"use strict";(function(e){var r=n("cGG2"),o=n("5VQ+"),i={"Content-Type":"application/x-www-form-urlencoded"};function u(t,e){!r.isUndefined(t)&&r.isUndefined(t["Content-Type"])&&(t["Content-Type"]=e)}var a,s={adapter:("undefined"!=typeof XMLHttpRequest?a=n("7GwW"):void 0!==e&&(a=n("7GwW")),a),transformRequest:[function(t,e){return o(e,"Content-Type"),r.isFormData(t)||r.isArrayBuffer(t)||r.isBuffer(t)||r.isStream(t)||r.isFile(t)||r.isBlob(t)?t:r.isArrayBufferView(t)?t.buffer:r.isURLSearchParams(t)?(u(e,"application/x-www-form-urlencoded;charset=utf-8"),t.toString()):r.isObject(t)?(u(e,"application/json;charset=utf-8"),JSON.stringify(t)):t}],transformResponse:[function(t){if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,validateStatus:function(t){return t>=200&&t<300}};s.headers={common:{Accept:"application/json, text/plain, */*"}},r.forEach(["delete","get","head"],function(t){s.headers[t]={}}),r.forEach(["post","put","patch"],function(t){s.headers[t]=r.merge(i)}),t.exports=s}).call(e,n("W2nU"))},NC6I:function(module,exports,__webpack_require__){(function(process,global){var __WEBPACK_AMD_DEFINE_RESULT__;
/**
* [js-md5]{@link https://github.com/emn178/js-md5}
*
......
webpackJsonp([20],{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._41)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._35)(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._8)({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._7)(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._41)(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([19],{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._41)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._35)(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._8)({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._7)(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._41)(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([19],{"1djJ":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=o("CCn6"),i=o("+TkF"),l=o("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,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:"",img:[]},desc:{detail:"",qa:"",customer_service:[]}},lessonList:[]}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form));switch(t.original_price=100*t.original_price,t.current_price=100*t.current_price,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.O)(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})}},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._44)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img?t.form.goods_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.goods_desc.img=[],t.form.goods_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._44)({file:e.file,type:"local"}).then(function(e){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._44)({file:e.file,type:"local"}).then(function(e){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(this.dialogObj.type){case 0:this.loading=!1,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:"",img:[]},desc:{detail:"",qa:"",customer_service:[]}},this.getLessonList();break;case 1:case 2:Object(s._11)(this.dialogObj.id).then(function(t){e.loading=!1,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,is_auth_teacher:t.is_auth_teacher},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._13)({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)}}},n={render: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.uploadFileMain,"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}})],1)],1)],1)],1),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?"原价(元)":"单买价格(元)"}},[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?"现价(元)":"拼团价格(元)"}},[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.uploadFileMain}},[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)])},staticRenderFns:[]};var r=o("VU/8")(a,n,!1,function(e){o("jb20")},"data-v-4fed980b",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:""}}},components:{page:l.a,dialogCom:r},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()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.r)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="http://wechat.test.singsingenglish.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.q)(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),Object(s._12)(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(",")}),console.log(t.list),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.F)(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._40)(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.H)(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}}}},u={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"user"},[o("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[o("el-row",[o("el-col",{attrs:{span:4}},[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)],1),e._v(" "),o("el-col",{attrs:{span:4}},[o("el-form-item",[o("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),o("el-col",{attrs:{span:4,offset:12}},[o("el-form-item",[e.$store.state.readonly?e._e():o("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1)],1)],1)],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(" "),e.$store.state.readonly?e._e():o("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-popover",{attrs:{placement:"top",width:"550"}},[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(" "),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(" "),0===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(o){e.edit(t.row)}}},[e._v("\n 编辑\n ")]):e._e(),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(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.copyUrl(t.row.id)}}},[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}}),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)},staticRenderFns:[]};var m=o("VU/8")(c,u,!1,function(e){o("NliR")},"data-v-64659c90",null);t.default=m.exports},NliR:function(e,t){},jb20:function(e,t){}});
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
webpackJsonp([20],{"1djJ":function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=o("CCn6"),i=o("+TkF"),l=o("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,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:"",img:[]},desc:{detail:"",qa:"",customer_service:[]}},lessonList:[]}},methods:{sub:function(){var e=this,t=JSON.parse(JSON.stringify(this.form));switch(t.original_price=100*t.original_price,t.current_price=100*t.current_price,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.O)(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})}},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(s._44)({file:e.file,type:"local"}).then(function(e){t.form.goods_desc.img?t.form.goods_desc.img[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}:(t.form.goods_desc.img=[],t.form.goods_desc.img[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._44)({file:e.file,type:"local"}).then(function(e){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._44)({file:e.file,type:"local"}).then(function(e){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._44)({file:e.file,type:"local"}).then(function(e){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(this.dialogObj.type){case 0:this.loading=!1,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:"",img:[]},desc:{detail:"",qa:"",customer_service:[]}},this.getLessonList();break;case 1:case 2:Object(s._11)(this.dialogObj.id).then(function(t){e.loading=!1,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,is_auth_teacher:t.is_auth_teacher},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._13)({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)}}},n={render: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.uploadFileMain,"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}})],1)],1)],1)],1),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?"原价(元)":"单买价格(元)"}},[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?"现价(元)":"拼团价格(元)"}},[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-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)])},staticRenderFns:[]};var r=o("VU/8")(a,n,!1,function(e){o("Wbb3")},"data-v-3b5e4e7e",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:""}}},components:{page:l.a,dialogCom:r},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()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},copyShop:function(e){var t=this;this.$confirm("此操作将复制该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.r)(e.id).then(function(e){t.$message({type:"success",message:"复制成功!"})}),t.getUser()})},copyUrl:function(e){var t="http://wechat.test.singsingenglish.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.q)(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),Object(s._12)(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(",")}),console.log(t.list),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.F)(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._40)(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.H)(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}}}},u={render:function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"user"},[o("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[o("el-row",[o("el-col",{attrs:{span:4}},[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)],1),e._v(" "),o("el-col",{attrs:{span:4}},[o("el-form-item",[o("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),o("el-col",{attrs:{span:4,offset:12}},[o("el-form-item",[e.$store.state.readonly?e._e():o("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1)],1)],1)],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(" "),e.$store.state.readonly?e._e():o("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[o("el-popover",{attrs:{placement:"top",width:"550"}},[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(" "),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(" "),0===t.row.status?o("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(o){e.edit(t.row)}}},[e._v("\n 编辑\n ")]):e._e(),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(" "),o("el-button",{attrs:{size:"mini",plain:""},on:{click:function(o){e.copyUrl(t.row.id)}}},[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}}),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)},staticRenderFns:[]};var m=o("VU/8")(c,u,!1,function(e){o("NCrJ")},"data-v-ced7882e",null);t.default=m.exports},NCrJ:function(e,t){},Wbb3:function(e,t){}});
\ No newline at end of file
webpackJsonp([3],{"7pUS":function(t,e){},AgH1:function(t,e){},"C+jy":function(t,e,i){"use strict";var s={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"ly-emotion"},[this._t("default")],2)},staticRenderFns:[]};var a=i("VU/8")({name:"ly-emotion",mounted:function(){var t=this,e=this.$el.innerHTML,i='<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif">';this.$nextTick(function(){t.$el.innerHTML=i})}},s,!1,function(t){i("AgH1")},"data-v-4281e520",null).exports,n={props:{height:{type:Number,default:200}},data:function(){return{list:[["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴"],["睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过"]["傲慢"],["饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂"],["疑问","嘘","晕","折磨","衰","骷髅","敲打","再见"],["擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠"],["鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀"],["西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰"],["凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀"],["足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强"],["弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你"],["NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈"],["磕头","回头","跳绳","挥手","激动","街舞","左太极","右太极"]]}},methods:{clickHandler:function(t){var e="/"+t;this.$emit("emotion",e)}},components:{Emotion:a}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"emotion-box",style:{height:t.height+"px"}},t._l(t.list,function(e,s){return i("div",{key:s,staticClass:"emotion-box-line"},t._l(e,function(e,s){return i("emotion",{key:s,staticClass:"emotion-item",nativeOn:{click:function(i){t.clickHandler(e)}}},[t._v(t._s(e))])}))}))])},staticRenderFns:[]};var l=i("VU/8")(n,o,!1,function(t){i("zxdA")},"data-v-34dd999b",null);e.a=l.exports},CK6D:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),a=i("kmJW"),n=i("C+jy"),o={name:"focusReplyDialog",props:["dialogObj"],data:function(){return{show:!1,loading:!1,showEmotion:!1,total:0,nowPage:1,limit:3,id:null,list:[],index:-1,form:{key:"",value:"",desc:""},content:"",imageContent:"",newsContent:"",type:"text",mediaList:[],mediaListMock:[],showMedia:!1,pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]}}},components:{page:a.a,emotion:n.a},mounted:function(){this.initDialog()},filters:{},methods:{addTeacherName:function(){this.content+="{my_teacher_name}"},addTeacherAlias:function(){this.content+="{my_teacher_alias}"},handleEmotion:function(t){this.content+=t},initDialog:function(){if(this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.index=this.dialogObj.index,this.list=this.dialogObj.list||[],-1===this.index)this.type="text",this.content="";else if(this.type=this.list[this.index].type,"text"===this.type)this.content=this.list[this.index].content;else if("image"===this.type){var t={type:"image"};this.list[this.index].content&&(t.content=this.list[this.index].content),this.list[this.index].media_id&&(t.media_id=this.list[this.index].media_id),this.list[this.index].variable&&(t.variable=this.list[this.index].variable),this.imageContent=t}},close:function(){this.$emit("changeShow",!1)},save:function(){var t=this,e=this.form,i=this.list||[];if("text"===this.type){if(!this.content)return void this.$message({showClose:!0,message:"请输入文本内容"});var a={type:this.type,content:this.content};this.index>-1?i[this.index]=a:i.push(a)}else if("image"===this.type){if(!this.imageContent)return void this.$message({showClose:!0,message:"请选择图片"});this.index>-1?i[this.index]=this.imageContent:i.push(this.imageContent)}else if("news"===this.type){if(!this.newsContent)return void this.$message({showClose:!0,message:"请选择图文"});this.index>-1?i[this.index]=this.newsContent:i.push(this.newsContent)}e.desc=JSON.stringify(i),this.id?Object(s._41)(this.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.$emit("changeShow",!1),t.show=!1}):Object(s._35)(e).then(function(e){t.$message({type:"success",message:"保存成功!"}),t.$emit("reflash"),t.$emit("changeShow",!1)})},onPageChange:function(t){this.nowPage=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._15)(i).then(function(i){e.loading=!1,e.type=t,e.total=i.total_count,0===i.item.length?(e.$message({showClose:!0,message:"暂无数据"}),e.showMedia=!1):(e.showMedia=!0,e.mediaList=i.item)}).catch(function(){e.loading=!1,e.showMedia=!1})},onChooseMedia:function(t){"news"===this.type?this.addContent(this.type,t.content,t.media_id):this.addContent(this.type,t.url,t.media_id),this.showMedia=!1},addTeacherQrcode:function(){this.imageContent={type:"image",variable:"my_teacher"}},addContent:function(t,e,i){var s={};e&&(s={type:t,content:e}),i&&(s.media_id=i),"news"===t?this.newsContent=s:this.imageContent=s}}},l={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:"自动回复",center:"",visible:t.dialogObj.show,width:"800px"},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("div",{staticClass:"focus-reply"},[i("div",{staticClass:"content"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"inner"},[i("ul",{staticClass:"weui-desktop-msg-sender__tabs"},[i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_text",class:"news"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="news"}}},[t._v("图文")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_text",class:"text"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="text"}}},[t._v("文字")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img",class:"image"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="image"}}},[t._v("图片")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img",class:"voice"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="voice"}}},[t._v("语音")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img",class:"video"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="video"}}},[t._v("视频")])]),t._v(" "),i("div",{staticClass:"inner-bottom"},["image"===t.type?i("div",{staticClass:"img-action"},[t.imageContent?[t.imageContent.variable?i("div",{staticClass:"my-teacher"},[t._v("我的老师二维码")]):t._e(),t._v(" "),t.imageContent.content?i("img",{staticStyle:{"max-width":"80%"},attrs:{src:t.imageContent.content}}):t._e()]:t._e(),t._v(" "),i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList("image")}}},[t._v("从素材库中选择")])]),t._v(" "),t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:t.addTeacherQrcode}},[t._v("添加老师二维码")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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(t){return[i("a",{attrs:{href:t.row.url,target:"_blank"}},[i("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()],2):t._e(),t._v(" "),"news"===t.type?i("div",{staticClass:"img-action"},[t.newsContent&&t.newsContent.content?[i("div",{staticClass:"news-media"},t._l(t.newsContent.content.news_item,function(e,s){return i("div",{staticStyle:{position:"relative"}},[1===t.newsContent.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(e.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t.newsContent.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===s?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(e.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:e.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))]:t._e(),t._v(" "),i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList(t.type)}}},[t._v("从素材库中选择")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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",className:"news-media"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.content.news_item,function(s,a){return i("div",{staticStyle:{position:"relative"}},[1===e.row.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.row.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 clear-both"},[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._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()],2):t._e(),t._v(" "),"voice"===t.type||"video"===t.type?i("div",{staticClass:"img-action"},[i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList(t.type)}}},[t._v("从素材库中选择")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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(t){return[i("a",{attrs:{href:t.row.url,target:"_blank"}},[i("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]):"text"===t.type?i("div",{staticClass:"inner-emotion_editor"},[i("div",{staticClass:"inner-edit_area"},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t._v(" "),i("div",{staticStyle:{float:"right"}},[i("el-popover",{attrs:{placement:"bottom-end",width:"400",offset:10,trigger:"manual"},model:{value:t.showEmotion,callback:function(e){t.showEmotion=e},expression:"showEmotion"}},[i("div",[i("emotion",{attrs:{height:200},on:{emotion:t.handleEmotion}})],1),t._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},on:{click:function(e){t.showEmotion=!t.showEmotion}},slot:"reference"},[i("span",{staticClass:"icon_emotion emotion_switch"})])],1),t._v(" "),i("el-button",{attrs:{type:"warning",plain:""},on:{click:t.addTeacherName}},[t._v("添加老师名字")]),t._v(" "),i("el-button",{attrs:{type:"success",plain:""},on:{click:t.addTeacherAlias}},[t._v("添加老师别名")])],1)]):t._e()]),t._v(" "),i("div",{staticClass:"tool_bar"},[i("el-button",{on:{click:t.close}},[t._v("取 消")]),t._v(" "),i("el-button",{staticClass:"weui-desktop-btn weui-desktop-btn_primary",on:{click:t.save}},[t._v("保存")])],1)])])])])},staticRenderFns:[]};var c=i("VU/8")(o,l,!1,function(t){i("jE+0"),i("HYz/")},"data-v-2fcf553f",null).exports,r={name:"focusReply",data:function(){return{loading:!1,total:0,nowPage:1,limit:10,activeName:"focus_reply_new",id:null,list:[],form:{key:"focus_reply_new",value:"focus_reply_new",desc:""},content:"",imageContent:"",type:"text",mediaList:[],mediaListMock:[{media_id:"hQb3Pbdb4E5Ivxi2sagL5sTdtW5W9pKJNA6Z8nBo6Ao",name:"xx.jpg",update_time:1535351431,url:"http://mmbiz.qpic.cn/mmbiz_jpg/qNgYSw5sicibUGtiaRYRY9QEZUoqgGdvkTE5Zvg58tUciaAXFslmwuiadgU6turtsF7mXFeicKa9RQTTG1gKSLqPiabpA/0?wx_fmt=jpeg"},{media_id:"hQb3Pbdb4E5Ivxi2sagL5p2poL7GllXYm4SETNmf210",name:"z.jpg",update_time:1535351316,url:"http://mmbiz.qpic.cn/mmbiz_jpg/qNgYSw5sicibUGtiaRYRY9QEZUoqgGdvkTE5mTOB0jnmfdH30s54N5FIr2Tsbd9QcBFDiapicYWJ6sCZRMGTIlj179g/0?wx_fmt=jpeg"}],showMedia:!1,rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]},dialogObj:{show:!1,id:"",index:-1,list:[]}}},components:{page:a.a,dialogCom:c},mounted:function(){this.getList()},filters:{typeFilter:function(t){return t?"text"===t?"文字":"image"===t?"图片":"news"===t?"图文":val:""},contentFilter:function(t){return"text"===t.type?t.content:"image"===t.type?"<img src='"+t.content+"'>":void 0}},methods:{emotion:function(t){var e=t.replace(/\//gi,"");return'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif" align="middle">'},handleClick:function(t){console.log(t.name),this.form={key:t.name,value:t.name,desc:""},this.nowPage=1,this.getList(),this.id=""},save:function(){var t=this,e=this.form,i=[];if("text"===this.type){if(!this.content)return void this.$message({showClose:!0,message:"请输入文本内容"});i[0]={type:this.type,content:this.content}}else if("image"===this.type){if(!this.imageContent)return void this.$message({showClose:!0,message:"请选择图片"});i[0]=this.imageContent}e.desc=JSON.stringify(i),this.id?Object(s._41)(this.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"})}):Object(s._35)(e).then(function(e){t.$message({type:"success",message:"保存成功!"})})},onChooseMedia:function(t){this.addContent(this.type,t.url,t.media_id),this.showMedia=!1},addContent:function(t,e,i){var s={};e&&(s={type:t,content:e}),i&&(s.media_id=i),this.imageContent=s},getList:function(){var t=this;Object(s._8)({key:this.form.key}).then(function(e){if(e.list.length>0){t.id=e.list[0].id;var i=JSON.parse(e.list[0].desc);t.list=i||[]}else t.list=[]})},add:function(){this.dialogObj={show:!0,id:this.id?this.id:null,index:-1,list:this.list,key:this.form.key,value:this.form.value}},editRow:function(t,e){this.dialogObj={show:!0,id:this.id,index:t,list:this.list,key:this.form.key,value:this.form.value}},deleteRow:function(t,e){var i=this;this.$confirm("此操作将删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var a=e;a.splice(t,1);var n={key:i.form.key,value:i.form.value};n.desc=JSON.stringify(a),Object(s._41)(i.id,n).then(function(t){i.$message({type:"success",message:"删除成功!"}),i.getList()})}).catch(function(){i.$message({type:"success",message:"已取消删除!"})})},moveRow:function(t,e){var i=this,a=this.list[t],n=this.list[e];this.list[t]=n,this.list[e]=a;var o=this.list,l={key:this.form.key,value:this.form.value};l.desc=JSON.stringify(o),Object(s._41)(this.id,l).then(function(t){i.$message({type:"success",message:"保存成功!"}),i.getList()})},changeShow:function(t){this.dialogObj.show=t}}},d={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"focus-reply"},[i("div",{staticClass:"clear-both top"},[i("span",{staticClass:"title"},[t._v("自动回复")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加回复")])],1),t._v(" "),i("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[i("el-tab-pane",{attrs:{label:"新用户",name:"focus_reply_new"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"无课用户",name:"focus_reply_no_course"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"有课用户",name:"focus_reply_course"}})],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list,"max-height":"800"}},[i("el-table-column",{attrs:{fixed:"",label:"类型",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"内容"},scopedSlots:t._u([{key:"default",fn:function(e){return["text"===e.row.type?i("div",{domProps:{innerHTML:t._s(e.row.content.replace(/\/[\u4E00-\u9FA5]{1,3}/gi,t.emotion))}}):"image"===e.row.type&&e.row.content?i("a",{attrs:{href:e.row.content,target:"_blank"}},[i("img",{staticClass:"shotcut",attrs:{src:e.row.content}})]):"image"===e.row.type&&e.row.variable?i("div",[t._v("\n 老师二维码\n ")]):"news"===e.row.type?i("div",[t._v("\n 图文消息\n ")]):t._e()]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{fixed:"right",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.editRow(e.$index,t.list)}}},[t._v("\n 编辑\n ")]),t._v(" "),t.$store.state.deletePermission?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.deleteRow(e.$index,t.list)}}},[t._v("\n 移除\n ")]):t._e(),t._v(" "),0!==e.$index?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.moveRow(e.$index-1,e.$index)}}},[t._v("\n 上移\n ")]):t._e(),t._v(" "),e.$index!==t.list.length-1?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.moveRow(e.$index,e.$index+1)}}},[t._v("\n 下移\n ")]):t._e()]}}])})],1),t._v(" "),t.dialogObj.show?i("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}}):t._e()],1)},staticRenderFns:[]};var m=i("VU/8")(r,d,!1,function(t){i("7pUS")},"data-v-163a0a9f",null);e.default=m.exports},"HYz/":function(t,e){},"jE+0":function(t,e){},zxdA:function(t,e){}});
\ No newline at end of file
webpackJsonp([3],{"1xDv":function(t,e){},"1yDE":function(t,e){},AgH1:function(t,e){},"C+jy":function(t,e,i){"use strict";var s={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"ly-emotion"},[this._t("default")],2)},staticRenderFns:[]};var n=i("VU/8")({name:"ly-emotion",mounted:function(){var t=this,e=this.$el.innerHTML,i='<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif">';this.$nextTick(function(){t.$el.innerHTML=i})}},s,!1,function(t){i("AgH1")},"data-v-4281e520",null).exports,a={props:{height:{type:Number,default:200}},data:function(){return{list:[["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴"],["睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过"]["傲慢"],["饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂"],["疑问","嘘","晕","折磨","衰","骷髅","敲打","再见"],["擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠"],["鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀"],["西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰"],["凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀"],["足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强"],["弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你"],["NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈"],["磕头","回头","跳绳","挥手","激动","街舞","左太极","右太极"]]}},methods:{clickHandler:function(t){var e="/"+t;this.$emit("emotion",e)}},components:{Emotion:n}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"emotion-box",style:{height:t.height+"px"}},t._l(t.list,function(e,s){return i("div",{key:s,staticClass:"emotion-box-line"},t._l(e,function(e,s){return i("emotion",{key:s,staticClass:"emotion-item",nativeOn:{click:function(i){t.clickHandler(e)}}},[t._v(t._s(e))])}))}))])},staticRenderFns:[]};var l=i("VU/8")(a,o,!1,function(t){i("zxdA")},"data-v-34dd999b",null);e.a=l.exports},CK6D:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),n=i("kmJW"),a=i("C+jy"),o={name:"focusReplyDialog",props:["dialogObj"],data:function(){return{show:!1,loading:!1,showEmotion:!1,total:0,nowPage:1,limit:3,id:null,list:[],index:-1,form:{key:"",value:"",desc:""},content:"",imageContent:"",newsContent:"",videoContent:"",voiceContent:"",type:"news",mediaList:[],mediaListMock:[],showMedia:!1,pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]}}},components:{page:n.a,emotion:a.a},mounted:function(){this.initDialog()},filters:{},methods:{addTeacherName:function(){this.content+="{my_teacher_name}"},addTeacherAlias:function(){this.content+="{my_teacher_alias}"},handleEmotion:function(t){this.content+=t},initDialog:function(){if(this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.index=this.dialogObj.index,this.list=this.dialogObj.list||[],-1===this.index)this.type="news",this.newsContent="";else if(this.type=this.list[this.index].type,"text"===this.type)this.content=this.list[this.index].content;else{var t={type:this.type};this.list[this.index].content&&(t.content=this.list[this.index].content),this.list[this.index].media_id&&(t.media_id=this.list[this.index].media_id),this.list[this.index].variable&&(t.variable=this.list[this.index].variable),"image"===this.type?this.imageContent=t:"news"===this.type?this.newsContent=t:"voice"===this.type?this.voiceContent=t:"video"===this.type&&(this.videoContent=t)}},close:function(){this.$emit("changeShow",!1)},save:function(){var t=this,e=this.form,i=this.list||[];if("text"===this.type){if(!this.content)return void this.$message({showClose:!0,message:"请输入文本内容"});var n={type:this.type,content:this.content};this.index>-1?i[this.index]=n:i.push(n)}else if("image"===this.type){if(!this.imageContent)return void this.$message({showClose:!0,message:"请选择图片"});this.index>-1?i[this.index]=this.imageContent:i.push(this.imageContent)}else if("news"===this.type){if(!this.newsContent)return void this.$message({showClose:!0,message:"请选择图文"});this.index>-1?i[this.index]=this.newsContent:i.push(this.newsContent)}else if("video"===this.type){if(!this.videoContent)return void this.$message({showClose:!0,message:"请选择视频"});this.index>-1?i[this.index]=this.videoContent:i.push(this.videoContent)}e.desc=JSON.stringify(i),this.id?Object(s._41)(this.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.$emit("changeShow",!1),t.show=!1}):Object(s._35)(e).then(function(e){t.$message({type:"success",message:"保存成功!"}),t.$emit("reflash"),t.$emit("changeShow",!1)})},onPageChange:function(t){this.nowPage=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._15)(i).then(function(i){e.loading=!1,e.type=t,e.total=i.total_count,0===i.item.length?(e.$message({showClose:!0,message:"暂无数据"}),e.showMedia=!1):(e.showMedia=!0,e.mediaList=i.item)}).catch(function(){e.loading=!1,e.showMedia=!1})},onChooseMedia:function(t){"news"===this.type?this.addContent(this.type,t.content,t.media_id):"video"===this.type?this.addContent(this.type,t.info,t.media_id):this.addContent(this.type,t.url,t.media_id),this.showMedia=!1},addTeacherQrcode:function(){this.imageContent={type:"image",variable:"my_teacher"}},addContent:function(t,e,i){var s={};e&&(s={type:t,content:e}),i&&(s.media_id=i),"news"===t?this.newsContent=s:"video"===t?this.videoContent=s:this.imageContent=s}}},l={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:"自动回复",center:"",visible:t.dialogObj.show,width:"800px"},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("div",{staticClass:"focus-reply"},[i("div",{staticClass:"content"},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"inner"},[i("ul",{staticClass:"weui-desktop-msg-sender__tabs"},[i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_appmsg",class:"news"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="news"}}},[t._v("图文")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_text",class:"text"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="text"}}},[t._v("文字")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_img",class:"image"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="image"}}},[t._v("图片")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_audio",class:"voice"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="voice"}}},[t._v("语音")]),t._v(" "),i("li",{staticClass:"weui-desktop-msg-sender__tab weui-desktop-msg-sender__tab_video",class:"video"===t.type?"weui-desktop-msg-sender__tab_selected":"",on:{click:function(e){t.type="video"}}},[t._v("视频")])]),t._v(" "),i("div",{staticClass:"inner-bottom"},["image"===t.type?i("div",{staticClass:"img-action"},[t.imageContent?[t.imageContent.variable?i("div",{staticClass:"my-teacher"},[t._v("我的老师二维码")]):t._e(),t._v(" "),t.imageContent.content?i("img",{staticStyle:{"max-width":"80%"},attrs:{src:t.imageContent.content}}):t._e()]:t._e(),t._v(" "),i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList("image")}}},[t._v("从素材库中选择")])]),t._v(" "),t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:t.addTeacherQrcode}},[t._v("添加老师二维码")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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(t){return[i("a",{attrs:{href:t.row.url,target:"_blank"}},[i("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()],2):t._e(),t._v(" "),"news"===t.type?i("div",{staticClass:"img-action"},[t.newsContent&&t.newsContent.content?[i("div",{staticClass:"news-media"},t._l(t.newsContent.content.news_item,function(e,s){return i("div",{staticStyle:{position:"relative"}},[1===t.newsContent.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(e.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t.newsContent.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===s?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(e.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:e.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))]:t._e(),t._v(" "),i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList(t.type)}}},[t._v("从素材库中选择")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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:"图文",className:"news-media"},scopedSlots:t._u([{key:"default",fn:function(e){return t._l(e.row.content.news_item,function(s,n){return i("div",{staticStyle:{position:"relative"}},[1===e.row.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.row.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===n?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 clear-both"},[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._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()],2):t._e(),t._v(" "),"video"===t.type?i("div",{staticClass:"img-action",staticStyle:{"text-align":"left"}},[t.videoContent&&t.videoContent.content?[t.videoContent.content&&t.videoContent.content.down_url?i("a",{attrs:{href:t.videoContent.content.down_url,target:"_blank"}},[t._v("\n "+t._s(t.videoContent.content.title)+"\n ")]):t._e()]:t._e(),t._v(" "),i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList(t.type)}}},[t._v("从素材库中选择")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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[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()]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()],2):t._e(),t._v(" "),"voice"===t.type?i("div",{staticClass:"img-action",staticStyle:{"text-align":"left"}},[i("div",{staticClass:"display-b"},[t.showMedia?t._e():i("div",{staticClass:"img-create-access"},[i("a",{staticClass:"img-create-access__link",attrs:{href:"javascript:;"},on:{click:function(e){t.getMediaList(t.type)}}},[t._v("从素材库中选择")])])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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[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()]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]):"text"===t.type?i("div",{staticClass:"inner-emotion_editor"},[i("div",{staticClass:"inner-edit_area"},[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}})],1),t._v(" "),i("div",{staticStyle:{float:"right"}},[i("el-popover",{attrs:{placement:"bottom-end",width:"400",offset:10,trigger:"manual"},model:{value:t.showEmotion,callback:function(e){t.showEmotion=e},expression:"showEmotion"}},[i("div",[i("emotion",{attrs:{height:200},on:{emotion:t.handleEmotion}})],1),t._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},on:{click:function(e){t.showEmotion=!t.showEmotion}},slot:"reference"},[i("span",{staticClass:"icon_emotion emotion_switch"})])],1),t._v(" "),i("el-button",{attrs:{type:"warning",plain:""},on:{click:t.addTeacherName}},[t._v("添加老师名字")]),t._v(" "),i("el-button",{attrs:{type:"success",plain:""},on:{click:t.addTeacherAlias}},[t._v("添加老师别名")])],1)]):t._e()]),t._v(" "),i("div",{staticClass:"tool_bar"},[i("el-button",{on:{click:t.close}},[t._v("取 消")]),t._v(" "),i("el-button",{staticClass:"weui-desktop-btn weui-desktop-btn_primary",on:{click:t.save}},[t._v("保存")])],1)])])])])},staticRenderFns:[]};var c=i("VU/8")(o,l,!1,function(t){i("1yDE"),i("LlJm")},"data-v-4ed6cea9",null).exports,r={name:"focusReply",data:function(){return{loading:!1,total:0,nowPage:1,limit:10,activeName:"focus_reply_new",id:null,list:[],form:{key:"focus_reply_new",value:"focus_reply_new",desc:""},content:"",imageContent:"",type:"text",mediaList:[],showMedia:!1,rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]},dialogObj:{show:!1,id:"",index:-1,list:[]}}},components:{page:n.a,dialogCom:c},mounted:function(){this.getList()},filters:{typeFilter:function(t){return t?"text"===t?"文字":"image"===t?"图片":"news"===t?"图文":"video"===t?"视频":"voice"===t?"语音":val:""},contentFilter:function(t){return"text"===t.type?t.content:"image"===t.type?"<img src='"+t.content+"'>":void 0}},methods:{emotion:function(t){var e=t.replace(/\//gi,"");return'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif" align="middle">'},handleClick:function(t){console.log(t.name),this.form={key:t.name,value:t.name,desc:""},this.nowPage=1,this.getList(),this.id=""},save:function(){var t=this,e=this.form,i=[];if("text"===this.type){if(!this.content)return void this.$message({showClose:!0,message:"请输入文本内容"});i[0]={type:this.type,content:this.content}}else if("image"===this.type){if(!this.imageContent)return void this.$message({showClose:!0,message:"请选择图片"});i[0]=this.imageContent}e.desc=JSON.stringify(i),this.id?Object(s._41)(this.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"})}):Object(s._35)(e).then(function(e){t.$message({type:"success",message:"保存成功!"})})},onChooseMedia:function(t){this.addContent(this.type,t.url,t.media_id),this.showMedia=!1},addContent:function(t,e,i){var s={};e&&(s={type:t,content:e}),i&&(s.media_id=i),this.imageContent=s},getList:function(){var t=this;Object(s._8)({key:this.form.key}).then(function(e){if(e.list.length>0){t.id=e.list[0].id;var i=JSON.parse(e.list[0].desc);t.list=i||[]}else t.list=[]})},add:function(){this.dialogObj={show:!0,id:this.id?this.id:null,index:-1,list:this.list,key:this.form.key,value:this.form.value}},editRow:function(t,e){this.dialogObj={show:!0,id:this.id,index:t,list:this.list,key:this.form.key,value:this.form.value}},deleteRow:function(t,e){var i=this;this.$confirm("此操作将删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var n=e;n.splice(t,1);var a={key:i.form.key,value:i.form.value};a.desc=JSON.stringify(n),Object(s._41)(i.id,a).then(function(t){i.$message({type:"success",message:"删除成功!"}),i.getList()})}).catch(function(){i.$message({type:"success",message:"已取消删除!"})})},moveRow:function(t,e){var i=this,n=this.list[t],a=this.list[e];this.list[t]=a,this.list[e]=n;var o=this.list,l={key:this.form.key,value:this.form.value};l.desc=JSON.stringify(o),Object(s._41)(this.id,l).then(function(t){i.$message({type:"success",message:"保存成功!"}),i.getList()})},changeShow:function(t){this.dialogObj.show=t}}},d={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"focus-reply"},[i("div",{staticClass:"clear-both top"},[i("span",{staticClass:"title"},[t._v("自动回复")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加回复")])],1),t._v(" "),i("el-tabs",{attrs:{type:"card"},on:{"tab-click":t.handleClick},model:{value:t.activeName,callback:function(e){t.activeName=e},expression:"activeName"}},[i("el-tab-pane",{attrs:{label:"新用户",name:"focus_reply_new"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"无课用户",name:"focus_reply_no_course"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"有课用户",name:"focus_reply_course"}})],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list,"max-height":"800"}},[i("el-table-column",{attrs:{fixed:"",label:"类型",width:"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("typeFilter")(e.row.type))+"\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"内容"},scopedSlots:t._u([{key:"default",fn:function(e){return["text"===e.row.type?i("div",{domProps:{innerHTML:t._s(e.row.content.replace(/\/[\u4E00-\u9FA5]{1,3}/gi,t.emotion))}}):"image"===e.row.type&&e.row.content?i("a",{attrs:{href:e.row.content,target:"_blank"}},[i("img",{staticClass:"shotcut",attrs:{src:e.row.content}})]):"image"===e.row.type&&e.row.variable?i("div",[t._v("\n 老师二维码\n ")]):"video"===e.row.type?i("div",[i("a",{attrs:{href:e.row.content.down_url,target:"_blank"}},[t._v(t._s(e.row.content.title))])]):"voice"===e.row.type?i("div",[i("a",{attrs:{href:e.row.content.down_url,target:"_blank"}},[t._v(t._s(e.row.content.title))])]):"news"===e.row.type?i("div",[i("div",{staticClass:"news-media"},t._l(e.row.content.news_item,function(s,n){return i("div",{staticStyle:{position:"relative"}},[1===e.row.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.row.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===n?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 clear-both"},[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()])}))]):t._e()]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{fixed:"right",label:"操作",width:"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.editRow(e.$index,t.list)}}},[t._v("\n 编辑\n ")]),t._v(" "),t.$store.state.deletePermission?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.deleteRow(e.$index,t.list)}}},[t._v("\n 移除\n ")]):t._e(),t._v(" "),0!==e.$index?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.moveRow(e.$index-1,e.$index)}}},[t._v("\n 上移\n ")]):t._e(),t._v(" "),e.$index!==t.list.length-1?i("el-button",{attrs:{type:"text",size:"small"},nativeOn:{click:function(i){i.preventDefault(),t.moveRow(e.$index,e.$index+1)}}},[t._v("\n 下移\n ")]):t._e()]}}])})],1),t._v(" "),t.dialogObj.show?i("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}}):t._e()],1)},staticRenderFns:[]};var h=i("VU/8")(r,d,!1,function(t){i("1xDv")},"data-v-d8078d36",null);e.default=h.exports},LlJm:function(t,e){},zxdA:function(t,e){}});
\ No newline at end of file
webpackJsonp([5],{"65NY":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("CCn6"),s=i("kmJW"),a=i("C+jy"),o={name:"dialogObj",props:["dialogObj"],data:function(){return{editIndex:-1,title:"",show:!1,showEmotion:!1,id:"",loading:!0,showType:!1,showTextContent:!1,total:0,nowPage:1,limit:5,type:"text",form:{key:"keywords_reply",value:"",desc:""},teacher_id:"",start_at:"",textContent:"",mediaList:[],showMedia:!1,teacherList:[],content:"",imageContent:{url:"",media_id:""},pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]}}},components:{page:s.a,emotion:a.a},methods:{getTeacher:function(){var t=this;Object(n._27)({page:1,limit:1e3}).then(function(e){t.teacherList=e.list})},save:function(){var t=this,e={key:this.form.key,value:this.form.value,desc:this.form.desc};this.dialogObj.id?this.$refs.form.validate(function(i){i&&Object(n._41)(t.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.show=!1})}):this.$refs.form.validate(function(i){i&&Object(n._35)(e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.$emit("reflash"),t.show=!1})})},addContent:function(t,e,i,n){var s=this.form,a=s.desc?JSON.parse(s.desc):[],o={type:t};e&&(o.content=e),i&&(o.media_id=i),n&&(o.variable=n),this.editIndex>-1?a.splice(this.editIndex,1,o):a.push(o),s.desc=JSON.stringify(a),this.form=s,this.showType=!1},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1,this.showType=!1},onPageChange:function(t){this.nowPage=t,this.getMediaList(this.type)},onChangeTab:function(t){this.type=t},onAddContent:function(){this.editIndex=-1,this.title="添加回复",this.content="",this.imageContent={url:"",media_id:"",variable:""},this.teacher_id="",this.start_at="",this.showType=!0},onEditText:function(t,e){this.title="编辑回复",this.type=t.type,this.editIndex=e,"text"===this.type?this.content=t.content:(t.content&&(this.imageContent={url:t.content,media_id:t.media_id}),t.variable&&(this.imageContent={variable:t.variable})),this.showType=!0},close:function(){this.content="",this.imageContent={url:"",media_id:""},this.teacher_id="",this.start_at="",this.showType=!1},confirm:function(){if("text"===this.type)this.content?this.addContent("text",this.content,"",""):this.$message({showClose:!0,message:"请输入文本内容"});else if("image"===this.type)if(this.imageContent.url||this.imageContent.variable){var t=this.imageContent.variable?this.imageContent.variable:"",e=this.imageContent.url?this.imageContent.url:"",i=this.imageContent.media_id?this.imageContent.media_id:"";this.addContent(this.type,e,i,t)}else this.$message({showClose:!0,message:"请选择图片"})},getMediaList:function(t){var e=this,i={type:t,page:this.nowPage,limit:this.limit};this.loading=!0,this.showMedia=!0,Object(n._15)(i).then(function(i){e.loading=!1,e.type=t,e.mediaList=i.item,e.total=i.total_count,0===e.total&&e.$message({showClose:!0,message:"暂无数据"})}).catch(function(){e.loading=!1})},editContent:function(){var t=this;this.$prompt("请输入文本","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(e){var i=e.value;t.addContent("text",i,"","")})},onDelText:function(t,e){var i=this,n=this.form;this.$confirm("此操作将删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t=JSON.parse(n.desc);t.splice(e,1),n.desc=JSON.stringify(t),i.$message({type:"success",message:"删除成功!"})}).catch(function(){i.$message({type:"info",message:"已取消删除"})}),this.form=n},onChooseMedia:function(t){this.imageContent=t,this.showMedia=!1},addTeacherQrcode:function(){this.showMedia=!1,this.imageContent={variable:"my_teacher"}},handleEmotion:function(t){this.content+=t},addTeacherName:function(){this.content+="{my_teacher_name}"},addTeacherAlias:function(){this.content+="{my_teacher_alias}"}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog(),this.getTeacher()},deep:!0},show:function(t){this.$emit("changeShow",t)}}},l={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("div",[i("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:t.show,width:"800px"},on:{"update:visible":function(e){t.show=e}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[i("el-row",[i("el-col",{attrs:{span:4}},[i("label",[t._v("关键词")])]),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{prop:"value"}},[i("el-input",{model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:4}},[i("label",[t._v("回复内容")])]),t._v(" "),i("el-col",{attrs:{span:20}},[t.form.desc?t._l(JSON.parse(t.form.desc),function(e,n){return i("div",{staticClass:"msg-item"},["text"===e.type?i("span",{staticClass:"msg-text"},[t._v(t._s(e.content))]):"image"===e.type&&e.content?i("img",{attrs:{src:e.content}}):e.variable?i("span",{staticClass:"msg-text"},[t._v("我的老师二维码")]):t._e(),t._v(" "),i("i",{staticClass:"el-icon-edit",on:{click:function(i){t.onEditText(e,n)}}}),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(i){t.onDelText(e,n)}}})])}):t._e(),t._v(" "),i("div",{staticClass:"msg_sender_wrp"},[i("div",[i("i",{staticClass:"el-icon-circle-plus-outline",on:{click:t.onAddContent}})]),t._v(" "),i("el-dialog",{attrs:{width:"30%",title:t.title,visible:t.showType,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"append-to-body":""},on:{"update:visible":function(e){t.showType=e}}},[i("div",[t.showType?i("el-tabs",{attrs:{type:"card"},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-tab-pane",{attrs:{label:"文字",name:"text"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"图片",name:"image"}})],1):t._e(),t._v(" "),t.showType?i("div",{staticClass:"more-info clear-both"},["text"===t.type?[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),t._v(" "),i("div",{staticStyle:{float:"right"}},[i("el-popover",{attrs:{placement:"bottom-end",width:"400",offset:10,trigger:"hover"},model:{value:t.showEmotion,callback:function(e){t.showEmotion=e},expression:"showEmotion"}},[i("div",[i("emotion",{attrs:{height:200},on:{emotion:t.handleEmotion}})],1),t._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},on:{click:function(e){t.showEmotion=!t.showEmotion}},slot:"reference"},[i("span",{staticClass:"icon_emotion emotion_switch"})])],1),t._v(" "),i("el-button",{attrs:{type:"warning",plain:""},on:{click:t.addTeacherName}},[t._v("添加老师名字")]),t._v(" "),i("el-button",{attrs:{type:"success",plain:""},on:{click:t.addTeacherAlias}},[t._v("添加老师别名")])],1)]:t._e(),t._v(" "),"image"===t.type?[t.imageContent.url?i("div",{staticClass:"img"},[i("img",{attrs:{src:t.imageContent.url}}),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.imageContent={url:"",media_id:""}}}})]):t._e(),t._v(" "),t.imageContent.variable?i("div",{staticClass:"img my-teacher"},[i("div",[t._v("老师二维码")]),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.imageContent={url:"",media_id:"",variable:""}}}})]):t._e(),t._v(" "),i("div",{staticClass:"display-b"},[i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList("image")}}},[t._v("+从素材库中选择")]),t._v(" "),i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:t.addTeacherQrcode}},[t._v("+添加老师二维码")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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(t){return[i("a",{attrs:{href:t.row.url}},[i("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]:t._e(),t._v(" "),i("div",{staticClass:"tool_bar"},[i("el-button",{on:{click:t.close}},[t._v("取 消")]),t._v(" "),i("el-button",{staticClass:"weui-desktop-btn weui-desktop-btn_primary",on:{click:t.confirm}},[t._v("确定")])],1)],2):t._e()],1)])],1)],2)],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("保 存")])],1)],1)])],1):t._e()},staticRenderFns:[]};var c={name:"autoReply",data:function(){return{dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:i("VU/8")(o,l,!1,function(t){i("xOIU")},"data-v-bcff83a2",null).exports},mounted:function(){this.getList()},methods:{emotion:function(t){var e=t.replace(/\//gi,"");return'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif" align="middle">'},changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(n._8)({key:"keywords_reply"}).then(function(e){t.list=e.list})},add:function(){this.dialogObj.id="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(t){var e=this;Object(n._7)(t.id).then(function(t){e.dialogObj.id=t.id,e.dialogObj.value=t.value,e.dialogObj.desc=t.desc,e.dialogObj.show=!0})},del:function(t){var e=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.E)(t.id).then(function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-row",{staticClass:"add-btn",attrs:{type:"flex",justify:"end"}},[i("el-col",{staticStyle:{"text-align":"right"},attrs:{span:6}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加回复")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list}},[i("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"top"}},[i("el-form-item",{attrs:{label:"回复内容"}},t._l(JSON.parse(e.row.desc),function(e,n){return i("div",[e.content&&"text"===e.type?i("span",[t._v("\n 回复"+t._s(n+1)+":\n "),i("span",{domProps:{innerHTML:t._s(e.content.replace(/\/[\u4E00-\u9FA5]{1,3}/gi,t.emotion))}})]):t._e(),t._v(" "),e.content&&"image"===e.type?i("span",[t._v("回复"+t._s(n+1)+":"),i("img",{staticClass:"img",attrs:{src:e.content}})]):t._e(),t._v(" "),e.variable?i("span",[t._v("回复"+t._s(n+1)+":老师二维码")]):t._e()])}))],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"ID",prop:"id"}}),t._v(" "),i("el-table-column",{attrs:{label:"关键词",prop:"value"}}),t._v(" "),i("el-table-column",{attrs:{label:"回复内容"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(JSON.parse(e.row.desc).length)+" 条回复\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(i){t.edit(e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),t.$store.state.deletePermission?i("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(i){t.del(e.row)}}},[t._v("\n 删除\n ")]):t._e()]}}])})],1),t._v(" "),i("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}})],1)},staticRenderFns:[]};var d=i("VU/8")(c,r,!1,function(t){i("FAHH")},"data-v-d3d1c56a",null);e.default=d.exports},AgH1:function(t,e){},"C+jy":function(t,e,i){"use strict";var n={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"ly-emotion"},[this._t("default")],2)},staticRenderFns:[]};var s=i("VU/8")({name:"ly-emotion",mounted:function(){var t=this,e=this.$el.innerHTML,i='<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif">';this.$nextTick(function(){t.$el.innerHTML=i})}},n,!1,function(t){i("AgH1")},"data-v-4281e520",null).exports,a={props:{height:{type:Number,default:200}},data:function(){return{list:[["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴"],["睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过"]["傲慢"],["饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂"],["疑问","嘘","晕","折磨","衰","骷髅","敲打","再见"],["擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠"],["鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀"],["西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰"],["凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀"],["足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强"],["弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你"],["NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈"],["磕头","回头","跳绳","挥手","激动","街舞","左太极","右太极"]]}},methods:{clickHandler:function(t){var e="/"+t;this.$emit("emotion",e)}},components:{Emotion:s}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"emotion-box",style:{height:t.height+"px"}},t._l(t.list,function(e,n){return i("div",{key:n,staticClass:"emotion-box-line"},t._l(e,function(e,n){return i("emotion",{key:n,staticClass:"emotion-item",nativeOn:{click:function(i){t.clickHandler(e)}}},[t._v(t._s(e))])}))}))])},staticRenderFns:[]};var l=i("VU/8")(a,o,!1,function(t){i("zxdA")},"data-v-34dd999b",null);e.a=l.exports},FAHH:function(t,e){},xOIU:function(t,e){},zxdA:function(t,e){}});
\ No newline at end of file
webpackJsonp([6],{AbSL:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s("CCn6"),o=s("kmJW"),l=s("lP78"),n=s.n(l),a=s("WY0H"),r=s.n(a),c={name:"dialogObj",props:["dialogObj"],data:function(){return{selectedLesson:[],selectedLessonList:[],lessonList:[],showLessonList:[],selectedBox:[],selectedBoxList:[],boxList:[],showBoxList:[],imageList:[],loading:!1,uploadShow:!0,downSrc:n.a,upSrc:r.a,form:{title:"",type:0,text_category_ids:[],item_category_ids:[],cover:0},rules:{title:[{required:!0,message:"请输入课程标题",trigger:"change"}]}}},methods:{handleItemChange:function(e){},changLessonItem:function(){0===this.form.type?this.showLessonList.forEach(function(e){e.children=e.children||[],e.children.forEach(function(e){e.children&&delete e.children})}):this.showLessonList=this.lessonList},delLesson:function(e){this.selectedLessonList=this.selectedLessonList.filter(function(t){return t.id!==e.id})},delBox:function(e){this.selectedBoxList=this.selectedBoxList.filter(function(t){return t.id!==e.id})},selectLesson:function(e){var t=this.showLessonList.find(function(t){return t.id===e[0]});t.children&&(t=t.children.find(function(t){return t.id===e[1]}),3===e.length&&(t=t.children.find(function(t){return t.id===e[2]})),-1===this.selectedLessonList.findIndex(function(e){return e===t})?this.selectedLessonList.push(t):this.$message({type:"info",message:"不能重复添加!"}))},selectBox:function(e){var t=this.showBoxList.find(function(t){return t.id===e[0]});-1===this.selectedBoxList.findIndex(function(e){return e===t})?this.selectedBoxList.push(t):this.$message({type:"info",message:"不能重复添加!"})},sub:function(){var e=this;this.$refs.form.validate(function(t){var s=[],o=[];e.selectedBoxList.forEach(function(e){s.push(e.id)}),e.selectedLessonList.forEach(function(e){o.push(e.id)}),e.imageList[0]&&(e.form.cover=e.imageList[0].name);var l=e.form;if(l.item_category_ids=s.toString(),l.text_category_ids=o.toString(),t){if(!e.form.cover)return void e.$message({type:"error",message:"请上传封面!"});if(!l.text_category_ids)return void e.$message({type:"error",message:"请选择课程!"});switch(e.dialogObj.type){case 1:Object(i.P)(e.dialogObj.id,l).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(i.j)(l).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}}})},initDialog:function(){var e=this;Object(i._1)().then(function(t){t&&(e.boxList=t,e.showBoxList=JSON.parse(JSON.stringify(t)))}),Object(i._3)().then(function(t){switch(e.lessonList=t,e.showLessonList=JSON.parse(JSON.stringify(t)),e.dialogObj.type){case 0:e.form={title:"",type:0,text_category_ids:[],item_category_ids:[],cover:0},e.uploadShow=!0,e.imageList=[],e.selectedLessonList=[],e.selectedBoxList=[];break;case 1:Object(i._14)(e.dialogObj.id).then(function(t){e.form={title:t.title,type:t.type,text_category_ids:[],item_category_ids:[],cover:""},e.imageList=[{name:t.cover,url:"http://cdn.singsingenglish.com/"+t.cover}],e.uploadShow=!1,e.selectedLessonList=[],e.selectedBoxList=[],0===t.type?t.detail[0].forEach(function(t){e.selectLesson([t.pid,t.id])}):1===t.type&&t.detail[1].forEach(function(t){var s=e.showLessonList.find(function(e){return e.children=e.children||[],e.children.find(function(e){return e.id===t.pid})});e.selectLesson([s.id,t.pid,t.id])}),t.detail[2]&&t.detail[2].forEach(function(t){e.selectBox([t.id])})});break;case 2:e.title="编辑",e.show=e.dialogObj.show,e.id=e.dialogObj.id,e.type=2}})},beforeAvatarUpload:function(){this.uploadShow=!1},handleRemove:function(){this.uploadShow=!0},handleAvatarSuccess:function(e){this.imageList=[{name:e.data.url,url:"http://cdn.singsingenglish.com/"+e.data.url}]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(i._44)({file:e.file,type:"local"}).then(function(e){t.form.cover="http://cdn.singsingenglish.com/"+e.url,t.imageList[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}})},moveBox:function(e,t){var s=this.selectedBoxList,i=s[e],o=s[t];this.selectedBoxList.splice(e,1,o),this.selectedBoxList.splice(t,1,i)},moveItem:function(e,t){var s=this.selectedLessonList,i=s[e],o=s[t];this.selectedLessonList.splice(e,1,o),this.selectedLessonList.splice(t,1,i)}},watch:{},mounted:function(){this.initDialog()}},d={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":"120px",rules:e.rules}},[s("el-form-item",{attrs:{label:"课程标题",prop:"title"}},[s("el-input",{model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"课程封面(670*472)"}},[s("el-upload",{class:{disabled:!e.uploadShow},attrs:{action:"/api/public/upload","http-request":e.uploadFileMain,"before-upload":e.beforeAvatarUpload,"list-type":"picture-card","file-list":e.imageList,"on-success":e.handleAvatarSuccess,"on-remove":e.handleRemove}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择课程类型"},on:{change:function(t){e.selectedLesson=[],e.selectedLessonList=[]}},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[s("el-option",{attrs:{label:"月课",value:0}}),e._v(" "),s("el-option",{attrs:{label:"日课",value:1}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"选择课程"}},[s("el-cascader",{attrs:{clearable:"",value:e.selectedLesson,options:e.showLessonList,"show-all-levels":!1,props:{label:"name",value:"id",children:"children"}},on:{"active-item-change":e.changLessonItem,change:e.selectLesson}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"已选课程"}},e._l(e.selectedLessonList,function(t,i){return s("div",{key:i,staticClass:"selected-block"},[s("el-card",{attrs:{shadow:"always"}},[s("div",{staticClass:"name"},[e._v(e._s(i+1)+"."+e._s(t.name))]),e._v(" "),s("div",{staticClass:"move"},[0!==i?s("img",{staticClass:"directionIcon",attrs:{src:e.upSrc},on:{click:function(t){e.moveItem(i-1,i)}}}):e._e(),e._v(" "),i!==e.selectedLessonList.length-1?s("img",{staticClass:"directionIcon",attrs:{src:e.downSrc},on:{click:function(t){e.moveItem(i,i+1)}}}):e._e(),e._v(" "),s("i",{staticClass:"el-icon-delete grey",on:{click:function(s){e.delLesson(t)}}})])])],1)}))],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"选择盒子"}},[s("el-cascader",{attrs:{clearable:"",value:e.selectedBox,options:e.showBoxList,"show-all-levels":!1,"expand-trigger":"hover",props:{label:"name",value:"id",children:"children"}},on:{change:e.selectBox}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"已选盒子"}},e._l(e.selectedBoxList,function(t,i){return s("div",{key:t.id,staticClass:"selected-block"},[s("el-card",{attrs:{shadow:"always"}},[s("div",{staticClass:"name"},[e._v(e._s(t.name))]),e._v(" "),s("div",{staticClass:"move"},[0!==i?s("img",{staticClass:"directionIcon",attrs:{src:e.upSrc},on:{click:function(t){e.moveBox(i-1,i)}}}):e._e(),e._v(" "),i!==e.selectedBoxList.length-1?s("img",{staticClass:"directionIcon",attrs:{src:e.downSrc},on:{click:function(t){e.moveBox(i,i+1)}}}):e._e(),e._v(" "),s("i",{staticClass:"el-icon-delete grey",on:{click:function(s){e.delBox(t)}}})])])],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 h=s("VU/8")(c,d,!1,function(e){s("DfQq"),s("kAhb")},"data-v-6bdce956",null).exports,u=s("+TkF"),m={name:"index",data:function(){return{searchFrom:{title:"",type:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,id:""}}},components:{page:o.a,dialogCom:h},filters:{lessonType:function(e){return u.i[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},getUser:function(){var e=this;this.searchFrom.page=this.nowPage;var t={limit:this.limit,page:this.nowPage};this.searchFrom.title&&(t.title=this.searchFrom.title),this.searchFrom.type&&(t.type=this.searchFrom.type),Object(i._13)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,show:!0,id:e.id,title:"编辑课程"}},add:function(){this.dialogObj={type:0,show:!0,id:"",title:"新增课程"}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=1,this.dialogObj.show=!0},delTeacher:function(e){var t=this;this.$confirm("此操作将删除该课程?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.G)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e}}},f={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"user"},[s("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[s("el-row",[s("el-col",{attrs:{span:4}},[s("el-form-item",{attrs:{label:"课程标题"}},[s("el-input",{model:{value:e.searchFrom.title,callback:function(t){e.$set(e.searchFrom,"title",t)},expression:"searchFrom.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:4}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),s("el-option",{attrs:{value:"0",label:"月课"}}),e._v(" "),s("el-option",{attrs:{value:"1",label:"日课"}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:4}},[s("el-form-item",[s("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),s("el-col",{attrs:{span:4,offset:8}},[e.$store.state.readonly?e._e():s("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("新增课程")])],1)],1)],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"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.type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"theme_num",label:"主题数"}}),e._v(" "),s("el-table-column",{attrs:{prop:"sing_num",label:"歌曲数"}}),e._v(" "),s("el-table-column",{attrs:{prop:"item_num",label:"实体包数量"}}),e._v(" "),e.$store.state.readonly?e._e():s("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.$store.state.readonly?e._e():s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),e.$store.state.deletePermission&&!e.$store.state.readonly?s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.delTeacher(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),e.dialogObj.show?s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}):e._e()],1)},staticRenderFns:[]};var g=s("VU/8")(m,f,!1,function(e){s("eutj")},"data-v-266f56c2",null);t.default=g.exports},DfQq:function(e,t){},WY0H:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAL1JREFUOBHtUsENwyAMNKhiDz55Z4R2g47QbpQNmg26QkbIE/hkhUwA9akuoirwqNRfkU65+M5nJ4Lol8d7fwZ6M3RLDCFcWLsDwqtWVauiIaV0KzWl1HUYhrmsgX8EyMqYvBZ6Yj7WQt4+gSePbJwZqzHmxFvsADhqzCfx8Ovz5AAIbFi4vKHBWruLh8AlZIOnDMkBMcZjrbkWIt6X1H465xag7SDKG/RMPe0fQHTo/SC+eZPWOt+Hnvdr7QHl81VpSdWOuAAAAABJRU5ErkJggg=="},eutj:function(e,t){},kAhb:function(e,t){},lP78:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0klEQVQ4T+2TsRHCMAxFpSZus4Ibx2VGCBuECYANGIUNgA3YAEagdJzCK6RNiogTh3PGJDkO7qhwpzv9J0v6Qvjy4Zy+ruui7/s0y7LTVN4swBhzYaHWuvgDfjEDY8wWEVdJkiyklA1PPd6Ccy7tuu5MREet9Y5zhjVaa3Mi4rU5DwkBXgwAEhELpdT1CcBBDGnb9m4gIUTJlWPxC+ABWRPRHgC4gv8hAUAOAMvYlaNOtNZ6yGBARNwopQ6xIyetHEKmxKMthBWqqio5/viY3rn0G9fOdxEKoA2QAAAAAElFTkSuQmCC"}});
\ No newline at end of file
webpackJsonp([5],{AbSL:function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=s("CCn6"),o=s("kmJW"),l=s("lP78"),n=s.n(l),a=s("WY0H"),r=s.n(a),c={name:"dialogObj",props:["dialogObj"],data:function(){return{selectedLesson:[],selectedLessonList:[],lessonList:[],showLessonList:[],selectedBox:[],selectedBoxList:[],boxList:[],showBoxList:[],imageList:[],loading:!1,uploadShow:!0,downSrc:n.a,upSrc:r.a,form:{title:"",type:0,text_category_ids:[],item_category_ids:[],cover:0},rules:{title:[{required:!0,message:"请输入课程标题",trigger:"change"}]}}},methods:{handleItemChange:function(e){},changLessonItem:function(){0===this.form.type?this.showLessonList.forEach(function(e){e.children=e.children||[],e.children.forEach(function(e){e.children&&delete e.children})}):this.showLessonList=this.lessonList},delLesson:function(e){this.selectedLessonList=this.selectedLessonList.filter(function(t){return t.id!==e.id})},delBox:function(e){this.selectedBoxList=this.selectedBoxList.filter(function(t){return t.id!==e.id})},selectLesson:function(e){var t=this.showLessonList.find(function(t){return t.id===e[0]});t.children&&(t=t.children.find(function(t){return t.id===e[1]}),3===e.length&&(t=t.children.find(function(t){return t.id===e[2]})),-1===this.selectedLessonList.findIndex(function(e){return e===t})?this.selectedLessonList.push(t):this.$message({type:"info",message:"不能重复添加!"}))},selectBox:function(e){var t=this.showBoxList.find(function(t){return t.id===e[0]});-1===this.selectedBoxList.findIndex(function(e){return e===t})?this.selectedBoxList.push(t):this.$message({type:"info",message:"不能重复添加!"})},sub:function(){var e=this;this.$refs.form.validate(function(t){var s=[],o=[];e.selectedBoxList.forEach(function(e){s.push(e.id)}),e.selectedLessonList.forEach(function(e){o.push(e.id)}),e.imageList[0]&&(e.form.cover=e.imageList[0].name);var l=e.form;if(l.item_category_ids=s.toString(),l.text_category_ids=o.toString(),t){if(!e.form.cover)return void e.$message({type:"error",message:"请上传封面!"});if(!l.text_category_ids)return void e.$message({type:"error",message:"请选择课程!"});switch(e.dialogObj.type){case 1:Object(i.P)(e.dialogObj.id,l).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(i.j)(l).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}}})},initDialog:function(){var e=this;Object(i._1)().then(function(t){t&&(e.boxList=t,e.showBoxList=JSON.parse(JSON.stringify(t)))}),Object(i._3)().then(function(t){switch(e.lessonList=t,e.showLessonList=JSON.parse(JSON.stringify(t)),e.dialogObj.type){case 0:e.form={title:"",type:0,text_category_ids:[],item_category_ids:[],cover:0},e.uploadShow=!0,e.imageList=[],e.selectedLessonList=[],e.selectedBoxList=[];break;case 1:Object(i._14)(e.dialogObj.id).then(function(t){e.form={title:t.title,type:t.type,text_category_ids:[],item_category_ids:[],cover:""},e.imageList=[{name:t.cover,url:"http://cdn.singsingenglish.com/"+t.cover}],e.uploadShow=!1,e.selectedLessonList=[],e.selectedBoxList=[],0===t.type?t.detail[0].forEach(function(t){e.selectLesson([t.pid,t.id])}):1===t.type&&t.detail[1].forEach(function(t){var s=e.showLessonList.find(function(e){return e.children=e.children||[],e.children.find(function(e){return e.id===t.pid})});e.selectLesson([s.id,t.pid,t.id])}),t.detail[2]&&t.detail[2].forEach(function(t){e.selectBox([t.id])})});break;case 2:e.title="编辑",e.show=e.dialogObj.show,e.id=e.dialogObj.id,e.type=2}})},beforeAvatarUpload:function(){this.uploadShow=!1},handleRemove:function(){this.uploadShow=!0},handleAvatarSuccess:function(e){this.imageList=[{name:e.data.url,url:"http://cdn.singsingenglish.com/"+e.data.url}]},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(i._44)({file:e.file,type:"local"}).then(function(e){t.form.cover="http://cdn.singsingenglish.com/"+e.url,t.imageList[0]={name:e.url,url:"http://cdn.singsingenglish.com/"+e.url,title:"",lable:""}})},moveBox:function(e,t){var s=this.selectedBoxList,i=s[e],o=s[t];this.selectedBoxList.splice(e,1,o),this.selectedBoxList.splice(t,1,i)},moveItem:function(e,t){var s=this.selectedLessonList,i=s[e],o=s[t];this.selectedLessonList.splice(e,1,o),this.selectedLessonList.splice(t,1,i)}},watch:{},mounted:function(){this.initDialog()}},d={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":"120px",rules:e.rules}},[s("el-form-item",{attrs:{label:"课程标题",prop:"title"}},[s("el-input",{model:{value:e.form.title,callback:function(t){e.$set(e.form,"title",t)},expression:"form.title"}})],1),e._v(" "),s("el-form-item",{attrs:{label:"课程封面(670*472)"}},[s("el-upload",{class:{disabled:!e.uploadShow},attrs:{action:"/api/public/upload","http-request":e.uploadFileMain,"before-upload":e.beforeAvatarUpload,"list-type":"picture-card","file-list":e.imageList,"on-success":e.handleAvatarSuccess,"on-remove":e.handleRemove}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择课程类型"},on:{change:function(t){e.selectedLesson=[],e.selectedLessonList=[]}},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},[s("el-option",{attrs:{label:"月课",value:0}}),e._v(" "),s("el-option",{attrs:{label:"日课",value:1}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"选择课程"}},[s("el-cascader",{attrs:{clearable:"",value:e.selectedLesson,options:e.showLessonList,"show-all-levels":!1,props:{label:"name",value:"id",children:"children"}},on:{"active-item-change":e.changLessonItem,change:e.selectLesson}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"已选课程"}},e._l(e.selectedLessonList,function(t,i){return s("div",{key:i,staticClass:"selected-block"},[s("el-card",{attrs:{shadow:"always"}},[s("div",{staticClass:"name"},[e._v(e._s(i+1)+"."+e._s(t.name))]),e._v(" "),s("div",{staticClass:"move"},[0!==i?s("img",{staticClass:"directionIcon",attrs:{src:e.upSrc},on:{click:function(t){e.moveItem(i-1,i)}}}):e._e(),e._v(" "),i!==e.selectedLessonList.length-1?s("img",{staticClass:"directionIcon",attrs:{src:e.downSrc},on:{click:function(t){e.moveItem(i,i+1)}}}):e._e(),e._v(" "),s("i",{staticClass:"el-icon-delete grey",on:{click:function(s){e.delLesson(t)}}})])])],1)}))],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:10}},[s("el-form-item",{attrs:{label:"选择盒子"}},[s("el-cascader",{attrs:{clearable:"",value:e.selectedBox,options:e.showBoxList,"show-all-levels":!1,"expand-trigger":"hover",props:{label:"name",value:"id",children:"children"}},on:{change:e.selectBox}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"已选盒子"}},e._l(e.selectedBoxList,function(t,i){return s("div",{key:t.id,staticClass:"selected-block"},[s("el-card",{attrs:{shadow:"always"}},[s("div",{staticClass:"name"},[e._v(e._s(t.name))]),e._v(" "),s("div",{staticClass:"move"},[0!==i?s("img",{staticClass:"directionIcon",attrs:{src:e.upSrc},on:{click:function(t){e.moveBox(i-1,i)}}}):e._e(),e._v(" "),i!==e.selectedBoxList.length-1?s("img",{staticClass:"directionIcon",attrs:{src:e.downSrc},on:{click:function(t){e.moveBox(i,i+1)}}}):e._e(),e._v(" "),s("i",{staticClass:"el-icon-delete grey",on:{click:function(s){e.delBox(t)}}})])])],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 h=s("VU/8")(c,d,!1,function(e){s("DfQq"),s("kAhb")},"data-v-6bdce956",null).exports,u=s("+TkF"),m={name:"index",data:function(){return{searchFrom:{title:"",type:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,id:""}}},components:{page:o.a,dialogCom:h},filters:{lessonType:function(e){return u.i[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},getUser:function(){var e=this;this.searchFrom.page=this.nowPage;var t={limit:this.limit,page:this.nowPage};this.searchFrom.title&&(t.title=this.searchFrom.title),this.searchFrom.type&&(t.type=this.searchFrom.type),Object(i._13)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,show:!0,id:e.id,title:"编辑课程"}},add:function(){this.dialogObj={type:0,show:!0,id:"",title:"新增课程"}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=1,this.dialogObj.show=!0},delTeacher:function(e){var t=this;this.$confirm("此操作将删除该课程?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.G)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e}}},f={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"user"},[s("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[s("el-row",[s("el-col",{attrs:{span:4}},[s("el-form-item",{attrs:{label:"课程标题"}},[s("el-input",{model:{value:e.searchFrom.title,callback:function(t){e.$set(e.searchFrom,"title",t)},expression:"searchFrom.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:4}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},[s("el-option",{attrs:{value:"",label:"请选择"}}),e._v(" "),s("el-option",{attrs:{value:"0",label:"月课"}}),e._v(" "),s("el-option",{attrs:{value:"1",label:"日课"}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:4}},[s("el-form-item",[s("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),s("el-col",{attrs:{span:4,offset:8}},[e.$store.state.readonly?e._e():s("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("新增课程")])],1)],1)],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"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.type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"theme_num",label:"主题数"}}),e._v(" "),s("el-table-column",{attrs:{prop:"sing_num",label:"歌曲数"}}),e._v(" "),s("el-table-column",{attrs:{prop:"item_num",label:"实体包数量"}}),e._v(" "),e.$store.state.readonly?e._e():s("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[e.$store.state.readonly?e._e():s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),e.$store.state.deletePermission&&!e.$store.state.readonly?s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.delTeacher(t.row)}}},[e._v("\n 删除\n ")]):e._e()]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),e.dialogObj.show?s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}}):e._e()],1)},staticRenderFns:[]};var g=s("VU/8")(m,f,!1,function(e){s("eutj")},"data-v-266f56c2",null);t.default=g.exports},DfQq:function(e,t){},WY0H:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAVlpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICA8L3JkZjpEZXNjcmlwdGlvbj4KICAgPC9yZGY6UkRGPgo8L3g6eG1wbWV0YT4KTMInWQAAAL1JREFUOBHtUsENwyAMNKhiDz55Z4R2g47QbpQNmg26QkbIE/hkhUwA9akuoirwqNRfkU65+M5nJ4Lol8d7fwZ6M3RLDCFcWLsDwqtWVauiIaV0KzWl1HUYhrmsgX8EyMqYvBZ6Yj7WQt4+gSePbJwZqzHmxFvsADhqzCfx8Ovz5AAIbFi4vKHBWruLh8AlZIOnDMkBMcZjrbkWIt6X1H465xag7SDKG/RMPe0fQHTo/SC+eZPWOt+Hnvdr7QHl81VpSdWOuAAAAABJRU5ErkJggg=="},eutj:function(e,t){},kAhb:function(e,t){},lP78:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAA0klEQVQ4T+2TsRHCMAxFpSZus4Ibx2VGCBuECYANGIUNgA3YAEagdJzCK6RNiogTh3PGJDkO7qhwpzv9J0v6Qvjy4Zy+ruui7/s0y7LTVN4swBhzYaHWuvgDfjEDY8wWEVdJkiyklA1PPd6Ccy7tuu5MREet9Y5zhjVaa3Mi4rU5DwkBXgwAEhELpdT1CcBBDGnb9m4gIUTJlWPxC+ABWRPRHgC4gv8hAUAOAMvYlaNOtNZ6yGBARNwopQ6xIyetHEKmxKMthBWqqio5/viY3rn0G9fOdxEKoA2QAAAAAElFTkSuQmCC"}});
\ No newline at end of file
webpackJsonp([6],{"2tpx":function(t,e){},"65NY":function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=i("CCn6"),s=i("kmJW"),a=i("C+jy"),o={name:"dialogObj",props:["dialogObj"],data:function(){return{editIndex:-1,title:"",show:!1,showEmotion:!1,id:"",loading:!0,showType:!1,showTextContent:!1,total:0,nowPage:1,limit:5,type:"text",form:{key:"keywords_reply",value:"",desc:""},teacher_id:"",start_at:"",textContent:"",mediaList:[],showMedia:!1,teacherList:[],content:"",imageContent:{url:"",media_id:""},voiceContent:"",videoContent:"",newsContent:"",pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},rules:{value:[{required:!0,message:"请输入规则名称",trigger:"change"}],desc:[{required:!0,message:"请输入回复内容",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]}}},components:{page:s.a,emotion:a.a},methods:{getTeacher:function(){var t=this;Object(n._27)({page:1,limit:1e3}).then(function(e){t.teacherList=e.list})},save:function(){var t=this,e={key:this.form.key,value:this.form.value,desc:this.form.desc};this.dialogObj.id?this.$refs.form.validate(function(i){i&&Object(n._41)(t.id,e).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.show=!1})}):this.$refs.form.validate(function(i){i&&Object(n._35)(e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.$emit("reflash"),t.show=!1})})},addContent:function(t,e,i,n){var s=this.form,a=s.desc?JSON.parse(s.desc):[],o={type:t};e&&(o.content=e),i&&(o.media_id=i),n&&(o.variable=n),this.editIndex>-1?a.splice(this.editIndex,1,o):a.push(o),s.desc=JSON.stringify(a),this.form=s,this.showType=!1},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1,this.showType=!1},onPageChange:function(t){this.nowPage=t,this.getMediaList(this.type)},onChangeTab:function(t){this.type=t},onAddContent:function(){this.editIndex=-1,this.title="添加回复",this.content="",this.voiceContent="",this.videoContent="",this.imageContent={url:"",media_id:"",variable:""},this.teacher_id="",this.start_at="",this.showType=!0},onEditText:function(t,e){this.title="编辑回复",this.type=t.type,this.editIndex=e,"text"===this.type?this.content=t.content:(t.content&&(this.imageContent={url:t.content,media_id:t.media_id}),t.variable&&(this.imageContent={variable:t.variable})),this.showType=!0},close:function(){this.content="",this.imageContent={url:"",media_id:""},this.teacher_id="",this.start_at="",this.showType=!1},confirm:function(){if("text"===this.type)this.content?this.addContent("text",this.content,"",""):this.$message({showClose:!0,message:"请输入文本内容"});else if("image"===this.type)if(this.imageContent.url||this.imageContent.variable){var t=this.imageContent.variable?this.imageContent.variable:"",e=this.imageContent.url?this.imageContent.url:"",i=this.imageContent.media_id?this.imageContent.media_id:"";this.addContent(this.type,e,i,t)}else this.$message({showClose:!0,message:"请选择图片"});else if("news"===this.type)if(this.newsContent){var n=this.newsContent.content?this.newsContent.content:"",s=this.newsContent.media_id?this.newsContent.media_id:"";this.addContent(this.type,n,s,"")}else this.$message({showClose:!0,message:"请选择图文"});else if("video"===this.type)if(this.videoContent){var a=this.videoContent.info?this.videoContent.info:"",o=this.videoContent.media_id?this.videoContent.media_id:"";this.addContent(this.type,a,o,"")}else this.$message({showClose:!0,message:"请选择视频"})},getMediaList:function(t){var e=this,i={type:t,page:this.nowPage,limit:"news"===t?2:this.limit};this.loading=!0,this.showMedia=!0,Object(n._15)(i).then(function(i){e.loading=!1,e.type=t,e.mediaList=i.item,e.total=i.total_count,0===e.total&&e.$message({showClose:!0,message:"暂无数据"})}).catch(function(){e.loading=!1})},editContent:function(){var t=this;this.$prompt("请输入文本","提示",{confirmButtonText:"确定",cancelButtonText:"取消"}).then(function(e){var i=e.value;t.addContent("text",i,"","")})},onDelText:function(t,e){var i=this,n=this.form;this.$confirm("此操作将删除该文件, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var t=JSON.parse(n.desc);t.splice(e,1),n.desc=JSON.stringify(t),i.$message({type:"success",message:"删除成功!"})}).catch(function(){i.$message({type:"info",message:"已取消删除"})}),this.form=n},onChooseMedia:function(t){"image"===this.type?this.imageContent=t:"video"===this.type?this.videoContent=t:"voice"===this.type?this.voiceContent=t:"news"===this.type&&(this.newsContent=t),this.showMedia=!1},addTeacherQrcode:function(){this.showMedia=!1,this.imageContent={variable:"my_teacher"}},handleEmotion:function(t){this.content+=t},addTeacherName:function(){this.content+="{my_teacher_name}"},addTeacherAlias:function(){this.content+="{my_teacher_alias}"}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog(),this.getTeacher()},deep:!0},show:function(t){this.$emit("changeShow",t)}}},l={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.show?i("div",[i("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:t.show,width:"800px"},on:{"update:visible":function(e){t.show=e}}},[i("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[i("el-form",{ref:"form",attrs:{model:t.form,rules:t.rules}},[i("el-row",[i("el-col",{attrs:{span:4}},[i("label",[t._v("关键词")])]),t._v(" "),i("el-col",{attrs:{span:8}},[i("el-form-item",{attrs:{prop:"value"}},[i("el-input",{model:{value:t.form.value,callback:function(e){t.$set(t.form,"value",e)},expression:"form.value"}})],1)],1)],1),t._v(" "),i("el-row",[i("el-col",{attrs:{span:4}},[i("label",[t._v("回复内容")])]),t._v(" "),i("el-col",{attrs:{span:20}},[t.form.desc?t._l(JSON.parse(t.form.desc),function(e,n){return i("div",{staticClass:"msg-item"},["text"===e.type?i("span",{staticClass:"msg-text"},[t._v(t._s(e.content))]):"image"===e.type&&e.content?i("img",{attrs:{src:e.content}}):"image"===e.type&&e.variable?i("span",{staticClass:"msg-text"},[t._v("我的老师二维码")]):"video"===e.type?i("a",{attrs:{href:e.content.down_url,target:"_blank"}},[t._v(t._s(e.content.title))]):"news"===e.type&&e.content&&e.content.news_item?i("div",{staticClass:"news-media",staticStyle:{display:"inline-block"}},[i("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(e.content.news_item,function(n,s){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(n.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(n.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):e.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===s?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(n.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(n.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:n.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))],1):t._e(),t._v(" "),i("i",{staticClass:"el-icon-edit",on:{click:function(i){t.onEditText(e,n)}}}),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(i){t.onDelText(e,n)}}})])}):t._e(),t._v(" "),i("div",{staticClass:"msg_sender_wrp"},[i("div",[i("i",{staticClass:"el-icon-circle-plus-outline",on:{click:t.onAddContent}})]),t._v(" "),i("el-dialog",{attrs:{width:"50%",title:t.title,visible:t.showType,"close-on-click-modal":!1,"close-on-press-escape":!1,"show-close":!1,"append-to-body":""},on:{"update:visible":function(e){t.showType=e}}},[i("div",[t.showType?i("el-tabs",{attrs:{type:"card"},model:{value:t.type,callback:function(e){t.type=e},expression:"type"}},[i("el-tab-pane",{attrs:{label:"图文消息",name:"news"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"文字",name:"text"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"图片",name:"image"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"语音",name:"voice"}}),t._v(" "),i("el-tab-pane",{attrs:{label:"视频",name:"video"}})],1):t._e(),t._v(" "),t.showType?i("div",{staticClass:"more-info clear-both"},["text"===t.type?[i("el-input",{attrs:{type:"textarea",autosize:{minRows:4,maxRows:8},placeholder:"请输入内容"},model:{value:t.content,callback:function(e){t.content=e},expression:"content"}}),t._v(" "),i("div",{staticStyle:{float:"right"}},[i("el-popover",{attrs:{placement:"bottom-end",width:"400",offset:10,trigger:"hover"},model:{value:t.showEmotion,callback:function(e){t.showEmotion=e},expression:"showEmotion"}},[i("div",[i("emotion",{attrs:{height:200},on:{emotion:t.handleEmotion}})],1),t._v(" "),i("el-button",{attrs:{slot:"reference",type:"text"},on:{click:function(e){t.showEmotion=!t.showEmotion}},slot:"reference"},[i("span",{staticClass:"icon_emotion emotion_switch"})])],1),t._v(" "),i("el-button",{attrs:{type:"warning",plain:""},on:{click:t.addTeacherName}},[t._v("添加老师名字")]),t._v(" "),i("el-button",{attrs:{type:"success",plain:""},on:{click:t.addTeacherAlias}},[t._v("添加老师别名")])],1)]:t._e(),t._v(" "),"image"===t.type?[t.imageContent.url?i("div",{staticClass:"img"},[i("img",{attrs:{src:t.imageContent.url}}),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.imageContent={url:"",media_id:""}}}})]):t._e(),t._v(" "),t.imageContent.variable?i("div",{staticClass:"img my-teacher"},[i("div",[t._v("老师二维码")]),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.imageContent={url:"",media_id:"",variable:""}}}})]):t._e(),t._v(" "),i("div",{staticClass:"display-b"},[i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList("image")}}},[t._v("+从素材库中选择")]),t._v(" "),i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:t.addTeacherQrcode}},[t._v("+添加老师二维码")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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(t){return[i("a",{attrs:{href:t.row.url}},[i("img",{staticStyle:{width:"60px"},attrs:{src:t.row.url}})])]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]:t._e(),t._v(" "),"video"===t.type?[t.videoContent&&t.videoContent.info&&t.videoContent.info.down_url?i("div",[i("a",{attrs:{href:t.videoContent.info.down_url,target:"_blank"}},[t._v(t._s(t.videoContent.info.title))]),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.videoContent=""}}})]):t._e(),t._v(" "),i("div",{staticClass:"display-b"},[i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList("video")}}},[t._v("+从素材库中选择")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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[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()]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]:t._e(),t._v(" "),"voice"===t.type?[t.voiceContent&&t.voiceContent.info&&t.voiceContent.info.down_url?i("div",[i("a",{attrs:{href:t.voiceContent.info.down_url,target:"_blank"}},[t._v(t._s(t.voiceContent.info.title))]),t._v(" "),i("i",{staticClass:"el-icon-delete",on:{click:function(e){t.voiceContent=""}}})]):t._e(),t._v(" "),i("div",{staticClass:"display-b"},[i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList("voice")}}},[t._v("+从素材库中选择")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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[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()]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]:t._e(),t._v(" "),"news"===t.type?[t.newsContent&&t.newsContent.content&&t.newsContent.content.news_item?i("div",[i("div",{staticClass:"news-media",staticStyle:{display:"inline-block"}},[i("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(t.newsContent.content.news_item,function(e,n){return i("div",{staticStyle:{position:"relative"}},[1===t.newsContent.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(e.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t.newsContent.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===n?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:e.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(e.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(e.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:e.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:e.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))],1),t._v(" "),i("i",{staticClass:"el-icon-delete",staticStyle:{display:"inline-block"},on:{click:function(e){t.newsContent=""}}})]):t._e(),t._v(" "),i("div",{staticClass:"display-b"},[i("div",{staticClass:"choose_item",staticStyle:{color:"#888"},on:{click:function(e){t.getMediaList("news")}}},[t._v("+从素材库中选择")])]),t._v(" "),t.showMedia&&t.mediaList.length>0?i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.mediaList},on:{"row-click":t.onChooseMedia}},[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[e.row.content&&e.row.content.news_item?i("div",{staticClass:"news-media",staticStyle:{display:"inline-block",width:"200px"}},t._l(e.row.content.news_item,function(n,s){return i("div",{staticStyle:{position:"relative"}},[1===e.row.content.news_item.length?i("div",{staticClass:"single-cover"},[i("div",{staticClass:"title"},[t._v(t._s(n.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(n.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):e.row.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===s?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(n.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(n.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:n.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])})):t._e()]}}])})],1),t._v(" "),i("page",{attrs:{total:t.total,limit:t.limit},on:{pageChange:t.onPageChange},model:{value:t.nowPage,callback:function(e){t.nowPage=e},expression:"nowPage"}})],1):t._e()]:t._e(),t._v(" "),i("div",{staticClass:"tool_bar"},[i("el-button",{on:{click:t.close}},[t._v("取 消")]),t._v(" "),i("el-button",{staticClass:"weui-desktop-btn weui-desktop-btn_primary",on:{click:t.confirm}},[t._v("确定")])],1)],2):t._e()],1)])],1)],2)],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.save}},[t._v("保 存")])],1)],1)])],1):t._e()},staticRenderFns:[]};var c={name:"autoReply",data:function(){return{dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:i("VU/8")(o,l,!1,function(t){i("M5Vh")},"data-v-1eff0e0e",null).exports},mounted:function(){this.getList()},filters:{type:function(t){return"text"===t?"文本":"voice"===t?"语音":"video"===t?"视频":"image"===t?"图片":"news"===t?"图文":val}},methods:{emotion:function(t){var e=t.replace(/\//gi,"");return'<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif" align="middle">'},changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(n._8)({key:"keywords_reply"}).then(function(e){t.list=e.list})},add:function(){this.dialogObj.id="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(t){var e=this;Object(n._7)(t.id).then(function(t){e.dialogObj.id=t.id,e.dialogObj.value=t.value,e.dialogObj.desc=t.desc,e.dialogObj.show=!0})},del:function(t){var e=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.E)(t.id).then(function(t){e.getList(),e.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("el-row",{staticClass:"add-btn",attrs:{type:"flex",justify:"end"}},[i("el-col",{staticStyle:{"text-align":"right"},attrs:{span:6}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success",plain:""},on:{click:t.add}},[t._v("添加回复")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.list}},[i("el-table-column",{attrs:{type:"expand"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"top"}},[i("el-form-item",{attrs:{label:"回复内容"}},t._l(JSON.parse(e.row.desc),function(e,n){return i("div",[t._v("\n 回复"+t._s(n+1)+"("+t._s(t._f("type")(e.type))+"):\n "),e.content&&"text"===e.type?i("span",[i("span",{domProps:{innerHTML:t._s(e.content.replace(/\/[\u4E00-\u9FA5]{1,3}/gi,t.emotion))}})]):t._e(),t._v(" "),e.content&&"image"===e.type?i("span",[t._v("回复"+t._s(n+1)+":"),i("img",{staticClass:"img",attrs:{src:e.content}})]):t._e(),t._v(" "),"image"===e.type&&e.variable?i("span",[t._v("回复"+t._s(n+1)+":老师二维码")]):t._e(),t._v(" "),"video"===e.type?i("a",{attrs:{href:e.content.down_url,target:"_blank"}},[t._v(t._s(e.content.title))]):t._e(),t._v(" "),"news"===e.type&&e.content&&e.content.news_item?i("div",{staticClass:"news-media",staticStyle:{display:"inline-block",width:"150px"}},[i("el-card",{attrs:{"body-style":{padding:"0px"}}},t._l(e.content.news_item,function(n,s){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(n.title))]),t._v(" "),i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"digest"},[t._v(t._s(n.digest))]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):e.content.news_item.length>1?i("div",{staticClass:"clear-both bottomCover",staticStyle:{position:"relative"}},[0===s?i("div",{staticClass:"muti-cover"},[i("img",{staticStyle:{width:"100%","margin-top":"20px"},attrs:{src:n.thumb_url}}),t._v(" "),i("div",{staticClass:"bottom-title"},[t._v(t._s(n.title))])]):i("div",{staticClass:"next-cover clear-both"},[i("span",{staticClass:"next-title"},[t._v(t._s(n.title))]),t._v(" "),i("img",{staticClass:"next-img",attrs:{src:n.thumb_url}})]),t._v(" "),i("a",{staticClass:"preview",attrs:{href:n.url,target:"_blank"}},[t._v("\n 预览文章\n ")])]):t._e()])}))],1):t._e()])}))],1)]}}])}),t._v(" "),i("el-table-column",{attrs:{label:"ID",prop:"id"}}),t._v(" "),i("el-table-column",{attrs:{label:"关键词",prop:"value"}}),t._v(" "),i("el-table-column",{attrs:{label:"回复内容"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(JSON.parse(e.row.desc).length)+" 条回复\n ")]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(i){t.edit(e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),t.$store.state.deletePermission?i("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(i){t.del(e.row)}}},[t._v("\n 删除\n ")]):t._e()]}}])})],1),t._v(" "),i("dialog-com",{attrs:{dialogObj:t.dialogObj},on:{changeShow:t.changeShow,reflash:t.getList}})],1)},staticRenderFns:[]};var d=i("VU/8")(c,r,!1,function(t){i("2tpx")},"data-v-728d543d",null);e.default=d.exports},AgH1:function(t,e){},"C+jy":function(t,e,i){"use strict";var n={render:function(){var t=this.$createElement;return(this._self._c||t)("div",{staticClass:"ly-emotion"},[this._t("default")],2)},staticRenderFns:[]};var s=i("VU/8")({name:"ly-emotion",mounted:function(){var t=this,e=this.$el.innerHTML,i='<img src="https://res.wx.qq.com/mpres/htmledition/images/icon/emotion/'+["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴","睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过","酷","冷汗","抓狂","吐","偷笑","可爱","白眼","傲慢","饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂","疑问","嘘","晕","折磨","衰","骷髅","敲打","再见","擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠","鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀","西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰","凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀","足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强","弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你","NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈","磕头","回头","跳绳","挥手","激动","街舞","献吻","左太极","右太极"].indexOf(e)+'.gif">';this.$nextTick(function(){t.$el.innerHTML=i})}},n,!1,function(t){i("AgH1")},"data-v-4281e520",null).exports,a={props:{height:{type:Number,default:200}},data:function(){return{list:[["微笑","撇嘴","色","发呆","得意","流泪","害羞","闭嘴"],["睡","大哭","尴尬","发怒","调皮","呲牙","惊讶","难过"]["傲慢"],["饥饿","困","惊恐","流汗","憨笑","大兵","奋斗","咒骂"],["疑问","嘘","晕","折磨","衰","骷髅","敲打","再见"],["擦汗","抠鼻","鼓掌","糗大了","坏笑","左哼哼","右哼哼","哈欠"],["鄙视","委屈","快哭了","阴险","亲亲","吓","可怜","菜刀"],["西瓜","啤酒","篮球","乒乓","咖啡","饭","猪头","玫瑰"],["凋谢","示爱","爱心","心碎","蛋糕","闪电","炸弹","刀"],["足球","瓢虫","便便","月亮","太阳","礼物","拥抱","强"],["弱","握手","胜利","抱拳","勾引","拳头","差劲","爱你"],["NO","OK","爱情","飞吻","跳跳","发抖","怄火","转圈"],["磕头","回头","跳绳","挥手","激动","街舞","左太极","右太极"]]}},methods:{clickHandler:function(t){var e="/"+t;this.$emit("emotion",e)}},components:{Emotion:s}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("div",{staticClass:"emotion-box",style:{height:t.height+"px"}},t._l(t.list,function(e,n){return i("div",{key:n,staticClass:"emotion-box-line"},t._l(e,function(e,n){return i("emotion",{key:n,staticClass:"emotion-item",nativeOn:{click:function(i){t.clickHandler(e)}}},[t._v(t._s(e))])}))}))])},staticRenderFns:[]};var l=i("VU/8")(a,o,!1,function(t){i("zxdA")},"data-v-34dd999b",null);e.a=l.exports},M5Vh:function(t,e){},zxdA:function(t,e){}});
\ No newline at end of file
webpackJsonp([31],{"81++":function(e,n){},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})}}},u={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){var t=e.commit;console.log(n),t("deletePermission",n)}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",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:u})},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(1)]).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(6)]).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(19)]).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(10)]).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(20)]).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(14)]).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(9)]).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(2)]).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(21)]).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(24)]).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(28).then(function(){var n=[t("usUK")];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(15)]).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(8)]).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(3)]).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(5)]).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(12)]).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(18)]).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(16)]).then(function(){var n=[t("CGL6")];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(29)]).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(23)]).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(27)]).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(22)]).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(26)]).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,n=this.$store.state.progressList,t=[];this.$router.options.routes[0].children=[],a.forEach(function(o){var a=!1,r=[];o.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),e.$router.options.routes[0].children.push(t.router),a=!0)}),a&&(o.list=r,t.push(o))}),this.$router.addRoutes(this.$router.options.routes),this.$store.dispatch("setMenu",t)}},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("81++")},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(7)]).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:"/userDetail/:id",name:"userDetail",component:function(e){return Promise.all([t.e(0),t.e(13)]).then(function(){var n=[t("9PRC")];e.apply(null,n)}.bind(this)).catch(t.oe)}},{path:"/teacher/:id",name:"teacherDetail",component:function(e){return Promise.all([t.e(0),t.e(25)]).then(function(){var n=[t("hFUZ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}]},{path:"/login",name:"login",component:function(e){return Promise.all([t.e(0),t.e(17)]).then(function(){var n=[t("0HId")];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},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([31],{"81++":function(e,n){},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})}}},u={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){var t=e.commit;console.log(n),t("deletePermission",n)}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",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:u})},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(1)]).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(20)]).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(10)]).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(19)]).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(14)]).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(9)]).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(2)]).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(21)]).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(24)]).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(28).then(function(){var n=[t("usUK")];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(15)]).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(8)]).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(3)]).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(6)]).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(12)]).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(18)]).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(16)]).then(function(){var n=[t("CGL6")];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(29)]).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(23)]).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(27)]).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(22)]).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(26)]).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,n=this.$store.state.progressList,t=[];this.$router.options.routes[0].children=[],a.forEach(function(o){var a=!1,r=[];o.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),e.$router.options.routes[0].children.push(t.router),a=!0)}),a&&(o.list=r,t.push(o))}),this.$router.addRoutes(this.$router.options.routes),this.$store.dispatch("setMenu",t)}},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("81++")},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(7)]).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:"/userDetail/:id",name:"userDetail",component:function(e){return Promise.all([t.e(0),t.e(13)]).then(function(){var n=[t("9PRC")];e.apply(null,n)}.bind(this)).catch(t.oe)}},{path:"/teacher/:id",name:"teacherDetail",component:function(e){return Promise.all([t.e(0),t.e(25)]).then(function(){var n=[t("hFUZ")];e.apply(null,n)}.bind(this)).catch(t.oe)}}]},{path:"/login",name:"login",component:function(e){return Promise.all([t.e(0),t.e(17)]).then(function(){var n=[t("0HId")];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},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(n,t,f){for(var o,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(c&&c(n,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=a(a.s=f[i]);return b};var n={},r={32:0};function a(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,a){c=r[e]=[n,a]});c[2]=n;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,a.nc&&f.setAttribute("nonce",a.nc),f.src=a.p+"static/js/"+e+"."+{0:"529dcb32d4c1f79c23fb",1:"afba16b3a43579d5de6c",2:"84cc0010d0f726d93f86",3:"0dafcb0ea0cf935dff6f",4:"f7de107bf23fce922b15",5:"12a3b18df98e02ea6761",6:"b59399601ad2e2ec7101",7:"71b0f7f78e6058ebd867",8:"5eca2da1cf8434da8e1b",9:"387bba79672c0c643354",10:"4be1c084171d9587498e",11:"a2b5ce01f33684424f99",12:"ef6d1b3aaeb67f7c8614",13:"04e52c666ac689edb671",14:"64683d98ff4c9f40b9be",15:"c8bf887e330b8a0c7003",16:"251d868c80b36a7a57e4",17:"798e6aeec45834447890",18:"07404b3185783ca0154a",19:"9bab581cbcf327884820",20:"1551deaf9cdfa5e77612",21:"c8df5ca35fe9b50b7a0f",22:"d3047d353e8cd669c4d8",23:"b8b87c2c0398dcd5dd61",24:"90d04444787e956de3bc",25:"367b40a9ce3cf148b0ba",26:"5fc8047e466bbf8dda1f",27:"e5238e96ba3f9c97327a",28:"e469d5671f79a4684dc7",29:"40d2a54219d00fb17cc8"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return f.onerror=f.onload=d,t.appendChild(f),n},a.m=e,a.c=n,a.d=function(e,c,n){a.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},a.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(c,"a",c),c},a.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},a.p="/",a.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var c=window.webpackJsonp;window.webpackJsonp=function(n,a,o){for(var f,d,b,i=0,u=[];i<n.length;i++)d=n[i],r[d]&&u.push(r[d][0]),r[d]=0;for(f in a)Object.prototype.hasOwnProperty.call(a,f)&&(e[f]=a[f]);for(c&&c(n,a,o);u.length;)u.shift()();if(o)for(i=0;i<o.length;i++)b=t(t.s=o[i]);return b};var n={},r={32:0};function t(c){if(n[c])return n[c].exports;var r=n[c]={i:c,l:!1,exports:{}};return e[c].call(r.exports,r,r.exports,t),r.l=!0,r.exports}t.e=function(e){var c=r[e];if(0===c)return new Promise(function(e){e()});if(c)return c[2];var n=new Promise(function(n,t){c=r[e]=[n,t]});c[2]=n;var a=document.getElementsByTagName("head")[0],o=document.createElement("script");o.type="text/javascript",o.charset="utf-8",o.async=!0,o.timeout=12e4,t.nc&&o.setAttribute("nonce",t.nc),o.src=t.p+"static/js/"+e+"."+{0:"621c0dc5310832fc1ddf",1:"afba16b3a43579d5de6c",2:"0d81860913e84491e61f",3:"5b5c1e30bf2097859266",4:"f7de107bf23fce922b15",5:"67468f61a9c4d82de135",6:"9056277736ee3b03c82f",7:"71b0f7f78e6058ebd867",8:"5eca2da1cf8434da8e1b",9:"387bba79672c0c643354",10:"4be1c084171d9587498e",11:"a2b5ce01f33684424f99",12:"ef6d1b3aaeb67f7c8614",13:"04e52c666ac689edb671",14:"64683d98ff4c9f40b9be",15:"c8bf887e330b8a0c7003",16:"251d868c80b36a7a57e4",17:"798e6aeec45834447890",18:"07404b3185783ca0154a",19:"430414afe312ddc3dc79",20:"7138a805a44d4f37d72e",21:"c8df5ca35fe9b50b7a0f",22:"d3047d353e8cd669c4d8",23:"b8b87c2c0398dcd5dd61",24:"90d04444787e956de3bc",25:"367b40a9ce3cf148b0ba",26:"5fc8047e466bbf8dda1f",27:"e5238e96ba3f9c97327a",28:"e469d5671f79a4684dc7",29:"40d2a54219d00fb17cc8"}[e]+".js";var f=setTimeout(d,12e4);function d(){o.onerror=o.onload=null,clearTimeout(f);var c=r[e];0!==c&&(c&&c[1](new Error("Loading chunk "+e+" failed.")),r[e]=void 0)}return o.onerror=o.onload=d,a.appendChild(o),n},t.m=e,t.c=n,t.d=function(e,c,n){t.o(e,c)||Object.defineProperty(e,c,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var c=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(c,"a",c),c},t.o=function(e,c){return Object.prototype.hasOwnProperty.call(e,c)},t.p="/",t.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -331,7 +331,7 @@
this.refundDialogObj.show=data
},
onRefund(id, money){
console.log('onRefund', id, money)
console.log('onRefund', id, money);
this.refundDialogObj.id= id;
this.refundDialogObj.money= money;
this.refundDialogObj.show = true;
......
......@@ -172,7 +172,7 @@
action="/api/public/upload"
:limit="1"
:file-list="form.share_desc.img"
:http-request="uploadFileMain">
:http-request="uploadFileMainShare">
<i class="el-icon-plus"></i>
</el-upload>
</el-form-item>
......@@ -292,6 +292,19 @@
})
},
uploadFileMainShare(a){
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid});
this.fileUid = a.file.uid;
uploadFileApi({file:a.file,type:'local'}).then(res=>{
if(this.form.share_desc.img){
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''}
}else{
this.form.share_desc.img=[];
this.form.share_desc.img[0] = {name:res.url,url:process.env.IMAGE_URL_HEAD + res.url,title:'',lable:''}
}
})
},
uploadFileMainService(a){
this.$store.dispatch('setProgress',{type:'new',id:a.file.uid});
this.fileUid = a.file.uid;
......
......@@ -104,7 +104,7 @@ export function upload(url,json) {
formData.append('file', file);
axios.post(url,formData,{ headers: {
'Content-Type': 'multipart/form-data'
},timeout:100000,
},timeout:10000000,
onUploadProgress: progressEvent => {
if(store.state.progressList.find(i=>{return i.id === json.file.uid})){
let progress = ((Number(progressEvent.loaded) + Number(y*process.env.MAX_FILESIZE)) / Number(json.file.size) * 100| 0);
......
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