Commit c78226ec authored by 王's avatar

Merge branch 'development' of http://git.singsingenglish.com/new-sing/admin into development

parents d33e62c0 ffeac862
......@@ -4,4 +4,5 @@ module.exports = {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
INVITE_URL:'"http://wechat.test.singsingenglish.com"',
}
......@@ -7,4 +7,5 @@ module.exports = merge(prodEnv, {
IMAGE_URL_HEAD:'"http://cdn.singsingenglish.com/"',
API_URL: '"/"',
MAX_FILESIZE:'1024*1024*10',
INVITE_URL:'"http://wechat.test.singsingenglish.com"',
})
<!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.fd0d779092dcd358b24688df26f9e2ca.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.350c29ba6247a4d87b9b.js></script><script type=text/javascript src=/static/js/vendor.9122c146b78876133e6f.js></script><script type=text/javascript src=/static/js/app.7c05b29cc481ea8363fd.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.ff215dbab03ea41422add2ef107d9c17.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/static/js/manifest.7d5aa5129740000f2e73.js></script><script type=text/javascript src=/static/js/vendor.9122c146b78876133e6f.js></script><script type=text/javascript src=/static/js/app.571d9aca25e6b7f01ebe.js></script></body></html>
\ No newline at end of file
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:"下架"},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||"",_=t.auth.password||"";p.Authorization="Basic "+f(y+":"+_)}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 g=n("p1b6"),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?g.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])),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 console.log(o),o){/^[0-9]+$/.test(o[i])&&(o[i]=Number(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,"_27",function(){return p}),n.d(e,"_28",function(){return l}),n.d(e,"R",function(){return h}),n.d(e,"F",function(){return m}),n.d(e,"a",function(){return y}),n.d(e,"o",function(){return _}),n.d(e,"N",function(){return g}),n.d(e,"_25",function(){return v}),n.d(e,"_24",function(){return E}),n.d(e,"_23",function(){return A}),n.d(e,"_22",function(){return w}),n.d(e,"m",function(){return b}),n.d(e,"P",function(){return R}),n.d(e,"z",function(){return S}),n.d(e,"_9",function(){return C}),n.d(e,"_10",function(){return $}),n.d(e,"L",function(){return H}),n.d(e,"C",function(){return x}),n.d(e,"j",function(){return B}),n.d(e,"_8",function(){return O}),n.d(e,"_7",function(){return T}),n.d(e,"i",function(){return N}),n.d(e,"K",function(){return k}),n.d(e,"B",function(){return M}),n.d(e,"_36",function(){return F}),n.d(e,"D",function(){return D}),n.d(e,"Z",function(){return U}),n.d(e,"e",function(){return P}),n.d(e,"r",function(){return j}),n.d(e,"_35",function(){return I}),n.d(e,"Y",function(){return X}),n.d(e,"h",function(){return G}),n.d(e,"_6",function(){return L}),n.d(e,"J",function(){return J}),n.d(e,"u",function(){return W}),n.d(e,"_21",function(){return q}),n.d(e,"_20",function(){return z}),n.d(e,"y",function(){return Y}),n.d(e,"l",function(){return V}),n.d(e,"O",function(){return K}),n.d(e,"X",function(){return Q}),n.d(e,"W",function(){return Z}),n.d(e,"c",function(){return tt}),n.d(e,"q",function(){return et}),n.d(e,"V",function(){return nt}),n.d(e,"H",function(){return rt}),n.d(e,"_16",function(){return ot}),n.d(e,"_33",function(){return it}),n.d(e,"_4",function(){return ut}),n.d(e,"_31",function(){return at}),n.d(e,"_37",function(){return st}),n.d(e,"A",function(){return ft}),n.d(e,"_3",function(){return ct}),n.d(e,"_11",function(){return dt}),n.d(e,"_40",function(){return pt}),n.d(e,"_12",function(){return lt}),n.d(e,"_32",function(){return ht}),n.d(e,"_38",function(){return mt}),n.d(e,"v",function(){return yt}),n.d(e,"_19",function(){return _t}),n.d(e,"_34",function(){return gt}),n.d(e,"_39",function(){return vt}),n.d(e,"_18",function(){return Et}),n.d(e,"x",function(){return At}),n.d(e,"U",function(){return wt}),n.d(e,"b",function(){return bt}),n.d(e,"G",function(){return Rt}),n.d(e,"T",function(){return St}),n.d(e,"p",function(){return Ct}),n.d(e,"_29",function(){return $t}),n.d(e,"_14",function(){return Ht}),n.d(e,"Q",function(){return xt}),n.d(e,"_5",function(){return Bt}),n.d(e,"w",function(){return Ot}),n.d(e,"_1",function(){return Tt}),n.d(e,"_15",function(){return Nt}),n.d(e,"s",function(){return kt}),n.d(e,"f",function(){return Mt}),n.d(e,"I",function(){return Ft}),n.d(e,"_0",function(){return Dt}),n.d(e,"_2",function(){return Ut}),n.d(e,"g",function(){return Pt}),n.d(e,"n",function(){return jt}),n.d(e,"t",function(){return It}),n.d(e,"_13",function(){return Xt}),n.d(e,"M",function(){return Gt}),n.d(e,"_30",function(){return Lt}),n.d(e,"E",function(){return Jt}),n.d(e,"_41",function(){return Wt}),n.d(e,"_17",function(){return qt}),n.d(e,"_26",function(){return zt}),n.d(e,"d",function(){return Yt}),n.d(e,"k",function(){return Vt}),n.d(e,"S",function(){return Kt});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):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):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):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):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):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)},_=function(t){return r.default.prototype.$del("/api/admin/user/"+t)},g=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)},w=function(t,e){return r.default.prototype.$fetch("/api/admin/teacher/info/"+t,e)},b=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)},C=function(t){return r.default.prototype.$fetch("/api/admin/course/list",t)},$=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)},k=function(t,e){return r.default.prototype.$put("/api/admin/goods/info/"+t,e)},M=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 console.log(e),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)},_t=function(t){return r.default.prototype.$fetch("/api/admin/role/list",t)},gt=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)},wt=function(t){return r.default.prototype.$fetch("/api/admin/banner/list",t)},bt=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)},Ct=function(t){return r.default.prototype.$del("/api/admin/banner/"+t)},$t=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)},kt=function(t){return r.default.prototype.$del("/api/admin/periods/class/"+t)},Mt=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){return r.default.prototype.$post("/api/admin/class/user/add/"+t+"/"+e)},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)}},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||"",_=t.auth.password||"";p.Authorization="Basic "+f(y+":"+_)}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 g=n("p1b6"),v=(t.withCredentials||a(t.url))&&t.xsrfCookieName?g.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 console.log(o),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,"_27",function(){return p}),n.d(e,"_28",function(){return l}),n.d(e,"R",function(){return h}),n.d(e,"F",function(){return m}),n.d(e,"a",function(){return y}),n.d(e,"o",function(){return _}),n.d(e,"N",function(){return g}),n.d(e,"_25",function(){return v}),n.d(e,"_24",function(){return E}),n.d(e,"_23",function(){return A}),n.d(e,"_22",function(){return w}),n.d(e,"m",function(){return b}),n.d(e,"P",function(){return R}),n.d(e,"z",function(){return S}),n.d(e,"_9",function(){return C}),n.d(e,"_10",function(){return $}),n.d(e,"L",function(){return H}),n.d(e,"C",function(){return x}),n.d(e,"j",function(){return B}),n.d(e,"_8",function(){return O}),n.d(e,"_7",function(){return T}),n.d(e,"i",function(){return N}),n.d(e,"K",function(){return k}),n.d(e,"B",function(){return M}),n.d(e,"_36",function(){return F}),n.d(e,"D",function(){return D}),n.d(e,"Z",function(){return U}),n.d(e,"e",function(){return P}),n.d(e,"r",function(){return j}),n.d(e,"_35",function(){return I}),n.d(e,"Y",function(){return X}),n.d(e,"h",function(){return G}),n.d(e,"_6",function(){return L}),n.d(e,"J",function(){return J}),n.d(e,"u",function(){return W}),n.d(e,"_21",function(){return q}),n.d(e,"_20",function(){return z}),n.d(e,"y",function(){return Y}),n.d(e,"l",function(){return V}),n.d(e,"O",function(){return K}),n.d(e,"X",function(){return Q}),n.d(e,"W",function(){return Z}),n.d(e,"c",function(){return tt}),n.d(e,"q",function(){return et}),n.d(e,"V",function(){return nt}),n.d(e,"H",function(){return rt}),n.d(e,"_16",function(){return ot}),n.d(e,"_33",function(){return it}),n.d(e,"_4",function(){return ut}),n.d(e,"_31",function(){return at}),n.d(e,"_37",function(){return st}),n.d(e,"A",function(){return ft}),n.d(e,"_3",function(){return ct}),n.d(e,"_11",function(){return dt}),n.d(e,"_40",function(){return pt}),n.d(e,"_12",function(){return lt}),n.d(e,"_32",function(){return ht}),n.d(e,"_38",function(){return mt}),n.d(e,"v",function(){return yt}),n.d(e,"_19",function(){return _t}),n.d(e,"_34",function(){return gt}),n.d(e,"_39",function(){return vt}),n.d(e,"_18",function(){return Et}),n.d(e,"x",function(){return At}),n.d(e,"U",function(){return wt}),n.d(e,"b",function(){return bt}),n.d(e,"G",function(){return Rt}),n.d(e,"T",function(){return St}),n.d(e,"p",function(){return Ct}),n.d(e,"_29",function(){return $t}),n.d(e,"_14",function(){return Ht}),n.d(e,"Q",function(){return xt}),n.d(e,"_5",function(){return Bt}),n.d(e,"w",function(){return Ot}),n.d(e,"_1",function(){return Tt}),n.d(e,"_15",function(){return Nt}),n.d(e,"s",function(){return kt}),n.d(e,"f",function(){return Mt}),n.d(e,"I",function(){return Ft}),n.d(e,"_0",function(){return Dt}),n.d(e,"_2",function(){return Ut}),n.d(e,"g",function(){return Pt}),n.d(e,"n",function(){return jt}),n.d(e,"t",function(){return It}),n.d(e,"_13",function(){return Xt}),n.d(e,"M",function(){return Gt}),n.d(e,"_30",function(){return Lt}),n.d(e,"E",function(){return Jt}),n.d(e,"_41",function(){return Wt}),n.d(e,"_17",function(){return qt}),n.d(e,"_26",function(){return zt}),n.d(e,"d",function(){return Yt}),n.d(e,"k",function(){return Vt}),n.d(e,"S",function(){return Kt});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):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):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):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):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):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)},_=function(t){return r.default.prototype.$del("/api/admin/user/"+t)},g=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)},w=function(t,e){return r.default.prototype.$fetch("/api/admin/teacher/info/"+t,e)},b=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)},C=function(t){return r.default.prototype.$fetch("/api/admin/course/list",t)},$=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)},k=function(t,e){return r.default.prototype.$put("/api/admin/goods/info/"+t,e)},M=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 console.log(e),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)},_t=function(t){return r.default.prototype.$fetch("/api/admin/role/list",t)},gt=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)},wt=function(t){return r.default.prototype.$fetch("/api/admin/banner/list",t)},bt=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)},Ct=function(t){return r.default.prototype.$del("/api/admin/banner/"+t)},$t=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)},kt=function(t){return r.default.prototype.$del("/api/admin/periods/class/"+t)},Mt=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){return r.default.prototype.$post("/api/admin/class/user/add/"+t+"/"+e)},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)}},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}
*
......
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([10],{"9OTZ":function(e,t){},DxJp:function(e,t){},Y0Vi:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("CCn6"),s=a("+TkF"),i=a("kmJW"),o={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",statusOption:[{label:"正常",value:0},{label:"禁用",value:1}],typeOption:[{label:"老师",value:0},{label:"新星妈妈",value:1},{label:"推广人",value:2},{label:"市场",value:3}],loading:!0,type:0,title:"",form:{name:"",type:0,qr:"",alias:"",status:0},rules:{name:[{required:!0,message:"请输入名称",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]},teacherDetail:{},imageList:[],uploadShow:!0}},methods:{sub:function(){var e=this;this.imageList.length>0&&(this.form.qr=this.imageList[0].url);var t={name:this.form.name,type:this.form.type,qr:this.form.qr,alias:this.form.alias,status:this.form.status};switch(this.dialogObj.type){case 2:this.$refs.form.validate(function(a){a&&Object(l.P)(e.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})});break;case 0:this.$refs.form.validate(function(a){a&&Object(l.m)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})}},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}]},uploadFile:function(e){var t=this;this.loading=!0,this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(l._40)({file:e.file,type:"local"}).then(function(e){t.imageList=[{name:e.url,url:"http://cdn.singsingenglish.com/"+e.url}],t.uploadShow=!1,t.loading=!1,t.$message({type:"success",message:"上传成功!"})}).catch(function(){t.loading=!1})},initDialog:function(){var e=this;switch(this.dialogObj.type){case 0:this.title="新增教师",this.show=this.dialogObj.show,this.type=0,this.form.name="",this.form.alias="",this.form.qr="",this.form.type=0,this.form.status=0,this.imageList=[],this.loading=!1,this.uploadShow=!0;break;case 1:this.title="教师详情",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=1,Object(l._22)(this.id).then(function(t){e.teacherDetail=t,e.loading=!1});break;case 2:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2,Object(l._22)(this.id).then(function(t){e.form.name=t.name,e.form.alias=t.alias,e.form.qr=t.qr,e.form.type=t.type,e.form.status=t.status,e.imageList=[{name:t.qr,url:t.qr}],e.uploadShow=!t.qr,e.loading=!1})}}},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,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.title,center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[1===e.type?a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("ID")])]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n "+e._s(e.teacherDetail.id)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("创建时间")])]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v(e._s(e.teacherDetail.created_at))])],1):e._e(),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("昵称")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.name))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("微信号")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.alias))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-input",{model:{value:e.form.alias,callback:function(t){e.$set(e.form,"alias",t)},expression:"form.alias"}})],1):e._e()],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("状态")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.status))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOption,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("类型")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.type))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.typeOption,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e()],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("二维码")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("img",{staticClass:"qr-img",attrs:{src:e.teacherDetail.qr}}):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-upload",{class:{disabled:!e.uploadShow},attrs:{action:"/api/public/upload/zone","http-request":e.uploadFile,"before-upload":e.beforeAvatarUpload,"list-type":"picture-card","file-list":e.imageList,"on-success":e.handleAvatarSuccess,"on-remove":e.handleRemove}},[a("i",{staticClass:"el-icon-plus"})])],1):e._e()],1),e._v(" "),1===e.type?[a("el-col",{attrs:{span:4}},[a("label",[e._v("邀请码")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.invite_code))]):e._e()])]:e._e()],2)],1),e._v(" "),1!==e.type?a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var r=a("VU/8")(o,n,!1,function(e){a("tuw2"),a("9OTZ")},"data-v-300b0961",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,id:""},dialogDetailObj:{show:!1,title:"班级列表",id:""},teacherTypeOption:[{id:0,label:"老师"},{id:1,label:"新星妈妈"},{id:2,label:"推广人"},{id:3,label:"市场"}]}},components:{page:i.a,dialogCom:r},filters:{teacherType:function(e){return s.l[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.type&&(t.type=this.searchFrom.type),this.searchFrom.name&&(t.name=this.searchFrom.name),Object(l._23)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.show=!0},add:function(){this.dialogObj.type=0,this.dialogObj.show=!0},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(l.z)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},classDetail:function(e){console.log("classDetail",e),this.dialogDetailObj={show:!0,title:e.name+"班级详情",id:e.id}},goToTeacherDetail:function(e){this.$router.push("/teacher/"+e.id)}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"user"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"昵称"}},[a("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"教师类型"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},e._l(e.teacherTypeOption,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),a("el-col",{attrs:{span:4,offset:8}},[a("el-form-item",[a("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("新增教师")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[a("el-table-column",{attrs:{prop:"id",label:"账号ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"alias",label:"微信号"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(0===t.row.status?"正常":"禁用")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"invite_code",label:"邀请码"}}),e._v(" "),a("el-table-column",{attrs:{label:"二维码"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("a",{attrs:{href:e.row.qr}},[a("img",{staticClass:"shortcut",attrs:{src:e.row.qr}})])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("teacherType")(t.row.type))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{width:"280",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){e.goToTeacherDetail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.delTeacher(t.row)}}},[e._v("\n 删除\n ")])]}}])})],1),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}})],1)},staticRenderFns:[]};var h=a("VU/8")(c,u,!1,function(e){a("DxJp")},"data-v-12f9b6d6",null);t.default=h.exports},tuw2:function(e,t){}});
\ No newline at end of file
webpackJsonp([10],{DKRC:function(e,t){},DxJp:function(e,t){},Y0Vi:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("CCn6"),s=a("+TkF"),i=a("kmJW"),o={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",statusOption:[{label:"正常",value:0},{label:"禁用",value:1}],typeOption:[{label:"老师",value:0},{label:"新星妈妈",value:1},{label:"推广人",value:2},{label:"市场",value:3}],loading:!0,type:0,title:"",form:{name:"",type:0,qr:"",alias:"",status:0},rules:{name:[{required:!0,message:"请输入名称",trigger:"change"}],qr:[{required:!0,message:"请输入二维码",trigger:"change"}]},teacherDetail:{},imageList:[],uploadShow:!0}},methods:{sub:function(){var e=this;this.imageList.length>0&&(this.form.qr=this.imageList[0].url);var t={name:this.form.name,type:this.form.type,qr:this.form.qr,alias:this.form.alias,status:this.form.status};switch(this.dialogObj.type){case 2:this.$refs.form.validate(function(a){a&&Object(l.P)(e.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})});break;case 0:this.$refs.form.validate(function(a){a&&Object(l.m)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})}},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}]},uploadFile:function(e){var t=this;this.loading=!0,this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(l._40)({file:e.file,type:"local"}).then(function(e){t.imageList=[{name:e.url,url:"http://cdn.singsingenglish.com/"+e.url}],t.uploadShow=!1,t.loading=!1,t.$message({type:"success",message:"上传成功!"})}).catch(function(){t.loading=!1})},initDialog:function(){var e=this;switch(this.dialogObj.type){case 0:this.title="新增教师",this.show=this.dialogObj.show,this.type=0,this.form.name="",this.form.alias="",this.form.qr="",this.form.type=0,this.form.status=0,this.imageList=[],this.loading=!1,this.uploadShow=!0;break;case 1:this.title="教师详情",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=1,Object(l._22)(this.id).then(function(t){e.teacherDetail=t,e.loading=!1});break;case 2:this.title="编辑",this.show=this.dialogObj.show,this.id=this.dialogObj.id,this.type=2,Object(l._22)(this.id).then(function(t){e.form.name=t.name,e.form.alias=t.alias,e.form.qr=t.qr,e.form.type=t.type,e.form.status=t.status,e.imageList=[{name:t.qr,url:t.qr}],e.uploadShow=!t.qr,e.loading=!1})}}},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,a=e._self._c||t;return a("el-dialog",{attrs:{title:e.title,center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[1===e.type?a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("ID")])]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v("\n "+e._s(e.teacherDetail.id)+"\n ")]),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("创建时间")])]),e._v(" "),a("el-col",{attrs:{span:8}},[e._v(e._s(e.teacherDetail.created_at))])],1):e._e(),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("昵称")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.name))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",{attrs:{prop:"name"}},[a("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("微信号")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.alias))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-input",{model:{value:e.form.alias,callback:function(t){e.$set(e.form,"alias",t)},expression:"form.alias"}})],1):e._e()],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("状态")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.status))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.status,callback:function(t){e.$set(e.form,"status",t)},expression:"form.status"}},e._l(e.statusOption,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e()],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("label",[e._v("类型")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.type))]):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.type,callback:function(t){e.$set(e.form,"type",t)},expression:"form.type"}},e._l(e.typeOption,function(e){return a("el-option",{key:e.value,attrs:{label:e.label,value:e.value}})}))],1):e._e()],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("二维码")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("img",{staticClass:"qr-img",attrs:{src:e.teacherDetail.qr}}):e._e(),e._v(" "),1!==e.type?a("el-form-item",[a("el-upload",{class:{disabled:!e.uploadShow},attrs:{action:"/api/public/upload/zone","http-request":e.uploadFile,"before-upload":e.beforeAvatarUpload,"list-type":"picture-card","file-list":e.imageList,"on-success":e.handleAvatarSuccess,"on-remove":e.handleRemove}},[a("i",{staticClass:"el-icon-plus"})])],1):e._e()],1),e._v(" "),1===e.type?[a("el-col",{attrs:{span:4}},[a("label",[e._v("邀请码")])]),e._v(" "),a("el-col",{attrs:{span:8}},[1===e.type?a("span",[e._v(e._s(e.teacherDetail.invite_code))]):e._e()])]:e._e()],2)],1),e._v(" "),1!==e.type?a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var r=a("VU/8")(o,n,!1,function(e){a("tdUl"),a("DKRC")},"data-v-754a58f1",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,id:""},dialogDetailObj:{show:!1,title:"班级列表",id:""},teacherTypeOption:[{id:0,label:"老师"},{id:1,label:"新星妈妈"},{id:2,label:"推广人"},{id:3,label:"市场"}]}},components:{page:i.a,dialogCom:r},filters:{teacherType:function(e){return s.l[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.type&&(t.type=this.searchFrom.type),this.searchFrom.name&&(t.name=this.searchFrom.name),Object(l._23)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.show=!0},add:function(){this.dialogObj.type=0,this.dialogObj.show=!0},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(l.z)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e},classDetail:function(e){console.log("classDetail",e),this.dialogDetailObj={show:!0,title:e.name+"班级详情",id:e.id}},goToTeacherDetail:function(e){this.$router.push("/teacher/"+e.id)}}},u={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"user"},[a("el-form",{ref:"searchFrom",attrs:{model:e.searchFrom,"label-width":"80px"}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"昵称"}},[a("el-input",{model:{value:e.searchFrom.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",{attrs:{label:"教师类型"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.searchFrom.type,callback:function(t){e.$set(e.searchFrom,"type",t)},expression:"searchFrom.type"}},e._l(e.teacherTypeOption,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:4}},[a("el-form-item",[a("el-button",{attrs:{type:"primary",plain:""},on:{click:e.getUser}},[e._v("搜索")])],1)],1),e._v(" "),a("el-col",{attrs:{span:4,offset:8}},[a("el-form-item",[a("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("新增教师")])],1)],1)],1)],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[a("el-table-column",{attrs:{prop:"id",label:"账号ID"}}),e._v(" "),a("el-table-column",{attrs:{prop:"name",label:"名称"}}),e._v(" "),a("el-table-column",{attrs:{prop:"alias",label:"微信号"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(0===t.row.status?"正常":"禁用")+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{prop:"invite_code",label:"邀请码"}}),e._v(" "),a("el-table-column",{attrs:{label:"二维码"},scopedSlots:e._u([{key:"default",fn:function(e){return[a("a",{attrs:{href:e.row.qr}},[a("img",{staticClass:"shortcut",attrs:{src:e.row.qr}})])]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("teacherType")(t.row.type))+"\n ")]}}])}),e._v(" "),a("el-table-column",{attrs:{width:"280",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(a){e.goToTeacherDetail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.delTeacher(t.row)}}},[e._v("\n 删除\n ")])]}}])})],1),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}})],1)},staticRenderFns:[]};var h=a("VU/8")(c,u,!1,function(e){a("DxJp")},"data-v-12f9b6d6",null);t.default=h.exports},tdUl:function(e,t){}});
\ No newline at end of file
webpackJsonp([12],{"I/ml":function(t,e){},XjFf:function(t,e){},ayGs:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o("CCn6"),a=o("+TkF"),i=o("kmJW"),l={props:["dialogObj"],data:function(){return{nowPage:1,total:0,goodList:[],currentRow:null}},components:{page:i.a},filters:{isOrNot:function(t){return a.h[t]},goodsType:function(t){return a.e[t]},lessonType:function(t){return a.i[t]},goodsStatus:function(t){return a.d[t]}},methods:{initPage:function(){var t=this;Object(n._8)().then(function(e){t.goodList=e.list,t.total=e.total})},handleCurrentChange:function(t){this.currentRow=t},onConfirm:function(){this.$emit("reflash",this.currentRow)}},mounted:function(){this.initPage()}},s={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.goodList,"row-key":"id","highlight-current-row":""},on:{"current-change":t.handleCurrentChange}},[o("el-table-column",{attrs:{prop:"id",label:"商品ID"}}),t._v(" "),o("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),o("el-table-column",{attrs:{label:"商品类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("goodsType")(e.row.goods_type))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"现价"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.current_price/100)+"元\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"课程类别"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("lessonType")(e.row.course_type))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_real))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("goodsStatus")(e.row.status))+"\n ")]}}])})],1),t._v(" "),o("page",{attrs:{nowPage:t.nowPage,total:t.total}}),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var r=o("VU/8")(l,s,!1,function(t){o("XjFf")},"data-v-bf015d34",null).exports,c={props:["dialogObj"],data:function(){return{loading:!1,form:{},teacherList:[],pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},options:[{value:0,label:"周日"},{value:1,label:"周一"},{value:2,label:"周二"},{value:3,label:"周三"},{value:4,label:"周四"},{value:5,label:"周五"},{value:6,label:"周六"}],teacherOptions:[],goodList:[],itemOptions:[],rules:{title:[{required:!0,message:"请输入名称",trigger:"change"}],start_num:[{required:!0,message:"请输入开始主题",trigger:"change"}],start_at:[{required:!0,message:"请选择开始上课时间",trigger:"change"}],rest_week_day:[{required:!0,message:"请选择周几不上课",trigger:"change"}],teacher_ids:[{required:!0,message:"请选择老师ID",trigger:"change"}],goods_id:[{required:!0,message:"商品ID不能为空",trigger:"change"}]}}},components:{goodDialog:r},filters:{isOrNot:function(t){return a.h[t]},goodsType:function(t){return a.e[t]},lessonType:function(t){return a.i[t]},goodsStatus:function(t){return a.d[t]},filterGoods:function(t){return t.name+"["+t.current_price/100+"元]"}},methods:{sub:function(){var t=this;this.teacherList?this.$refs.form.validate(function(e){if(e){var o=t.form.goods_id,a={title:t.form.title,start_num:t.form.start_num,start_at:t.form.start_at,rest_week_day:t.form.rest_week_day?t.form.rest_week_day.join(","):"",teacher_ids:t.teacherList.join(",")};t.form.id?Object(n._5)(t.form.id,a).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash")}):Object(n.Q)(o,a).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash")})}}):this.$message.error("请选择老师ID")},getTeachers:function(){var t=this;Object(n._23)().then(function(e){t.teacherOptions=e.list})},onOptionChange:function(t){var e=this.goodList.findIndex(function(e){return e.id=t});e>-1&&this.getLessonDetail(this.goodList[e].course_id)},getLessonDetail:function(t){var e=this;console.log("getLessonDetail",t),this.form.start_num="",Object(n._10)(t,{}).then(function(t){e.itemOptions=t.detail[t.type]})},getGoodsOption:function(){var t=this;Object(n._8)({page:1,limit:100}).then(function(e){t.goodList=e.list})}},mounted:function(){this.getTeachers(),this.getGoodsOption(),this.dialogObj.form.course_id&&this.getLessonDetail(this.dialogObj.form.course_id),this.form=this.dialogObj.form,this.teacherList=this.dialogObj.form.teacher_ids}},u={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{attrs:{title:t.dialogObj.title,center:"","append-to-body":"",visible:t.dialogObj.show,width:"800px"},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[o("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px",rules:t.rules}},[o("el-row",[o("el-col",{attrs:{span:10}},[o("el-form-item",{attrs:{label:"商品名称",prop:"goods_id"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:t.onOptionChange},model:{value:t.form.goods_id,callback:function(e){t.$set(t.form,"goods_id",e)},expression:"form.goods_id"}},t._l(t.goodList,function(e,n){return o("el-option",{key:n,attrs:{label:t._f("filterGoods")(e),value:e.id}})}))],1)],1)],1),t._v(" "),o("el-form-item",{attrs:{label:"期数名称",prop:"title"}},[o("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"开始主题",prop:"start_num"}},[o("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.form.start_num,callback:function(e){t.$set(t.form,"start_num",e)},expression:"form.start_num"}},t._l(t.itemOptions,function(t){return o("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"开始上课时间",prop:"start_at"}},[o("el-date-picker",{attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",type:"date","picker-options":t.pickerOptions1,placeholder:"选择日期"},model:{value:t.form.start_at,callback:function(e){t.$set(t.form,"start_at",e)},expression:"form.start_at"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"相关老师"}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:t.teacherList,callback:function(e){t.teacherList=e},expression:"teacherList"}},t._l(t.teacherOptions,function(t){return o("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"周几不上课"}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:t.form.rest_week_day,callback:function(e){t.$set(t.form,"rest_week_day",e)},expression:"form.rest_week_day"}},t._l(t.options,function(t){return o("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1)],1),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.sub}},[t._v("确 定")])],1)],1)])],1)},staticRenderFns:[]};var d={name:"index",data:function(){return{nowPage:1,total:0,limit:10,title:"",goodsId:null,lessonId:null,periodList:[],newDialog:{form:{id:0,title:"",start_num:0,start_at:"",rest_week_day:[],goods_id:""},show:!1,title:""},goodList:[],lessonList:[]}},filters:{dayFilter:function(t){var e=t?t.split(","):[];return(e=e.map(function(t){return a.m[t]})).join(",")},filterGoods:function(t){return t.name+"["+t.current_price/100+"元]"}},components:{goodDialog:r,newDialog:o("VU/8")(c,u,!1,function(t){o("w7Ly")},"data-v-034efa28",null).exports,page:i.a},methods:{onPageChange:function(t){this.nowPage=t,this.onSearch()},onSearch:function(){var t=this,e={limit:this.limit,page:this.nowPage};this.title&&(e.title=this.title),this.goodsId&&(e.goods_id=this.goodsId),this.lessonId&&(e.course_id=this.lessonId),Object(n._14)(e).then(function(e){t.periodList=e.list,t.total=e.total})},onAdd:function(){this.newDialog.form.id="",this.newDialog.start_num="",this.newDialog.form.goods_id="",this.newDialog.form.title="",this.newDialog.form.start_at="",this.newDialog.form.rest_week_day=[],this.newDialog.form.teacher_ids=[],this.newDialog.title="添加期数",this.newDialog.show=!0},onEdit:function(t){this.newDialog.form.id=t.id,this.newDialog.form.start_num=t.start_num,this.newDialog.form.start_at=t.start_at,this.newDialog.form.title=t.title,this.newDialog.form.goods_id=t.goods_id,console.log("row",t);var e=[];t.rest_week_day&&t.rest_week_day.split(",").forEach(function(t){e.push(parseInt(t))}),this.newDialog.form.rest_week_day=e;var o=[];t.teacher_ids&&t.teacher_ids.split(",").forEach(function(t){o.push(parseInt(t))}),this.newDialog.form.teacher_ids=o,this.newDialog.title="编辑期数",this.newDialog.show=!0},onSave:function(t){this.newDialog.show=!1,this.onSearch()},del:function(t){var e=this;this.$confirm("此操作将删除该期数?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.onSearch()})})},getGoodsOption:function(){var t=this;Object(n._8)({page:1,limit:100}).then(function(e){t.goodList=e.list})},getLessonOption:function(){var t=this;Object(n._9)({page:1,limit:100}).then(function(e){t.lessonList=e.list})}},mounted:function(){this.onSearch(),this.getGoodsOption(),this.getLessonOption()}},f={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"periods"},[o("div",{staticClass:"form-block"},[o("el-form",{attrs:{"label-width":"90px",inline:""}},[o("el-form-item",{attrs:{label:"期数标题"}},[o("el-input",{attrs:{placeholder:"请输入内容",clearable:""},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"商品名称"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.goodsId,callback:function(e){t.goodsId=e},expression:"goodsId"}},t._l(t.goodList,function(e,n){return o("el-option",{key:n,attrs:{label:t._f("filterGoods")(e),value:e.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"课程名称"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.lessonId,callback:function(e){t.lessonId=e},expression:"lessonId"}},t._l(t.lessonList,function(t,e){return o("el-option",{key:e,attrs:{label:t.title,value:t.id}})}))],1),t._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1),t._v(" "),t.$store.state.readonly?t._e():o("el-form-item",{staticStyle:{float:"right"}},[o("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("添加期数")])],1)],1)],1),t._v(" "),o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.periodList}},[o("el-table-column",{attrs:{prop:"id",label:"期数ID"}}),t._v(" "),o("el-table-column",{attrs:{prop:"title",label:"期数标题"}}),t._v(" "),o("el-table-column",{attrs:{prop:"goods_name",label:"商品名称"}}),t._v(" "),o("el-table-column",{attrs:{label:"商品价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.goods_price/100)+"元\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),t._v(" "),o("el-table-column",{attrs:{prop:"start_name",label:"开始主题/歌"}}),t._v(" "),o("el-table-column",{attrs:{prop:"current_category_name",label:"当前歌曲"}}),t._v(" "),o("el-table-column",{attrs:{label:"看课情况","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n 可看课包数: "+t._s(e.row.watch_num)),o("br"),t._v(" 已看课包数:"+t._s(e.row.has_watch_num)+" "),o("br"),t._v("\n 续看课包数: "+t._s(e.row.duration_num)),o("br"),t._v(" 已续看课包数:"+t._s(e.row.has_duration_num)+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"周几不上课","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("dayFilter")(e.row.rest_week_day))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"start_at",label:"期数开始时间"}}),t._v(" "),t.$store.state.readonly?t._e():o("el-table-column",{attrs:{label:"操作",width:"148"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){t.onEdit(e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),o("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(o){t.del(e.row)}}},[t._v("\n 删除\n ")])]}}])})],1),t._v(" "),o("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),t.newDialog.show?o("new-dialog",{attrs:{dialogObj:t.newDialog},on:{reflash:t.onSave}}):t._e()],1)},staticRenderFns:[]};var _=o("VU/8")(d,f,!1,function(t){o("I/ml")},"data-v-1f274514",null);e.default=_.exports},w7Ly:function(t,e){}});
\ No newline at end of file
webpackJsonp([12],{XjFf:function(t,e){},ayGs:function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=o("CCn6"),i=o("+TkF"),a=o("kmJW"),s={props:["dialogObj"],data:function(){return{nowPage:1,total:0,goodList:[],currentRow:null}},components:{page:a.a},filters:{isOrNot:function(t){return i.h[t]},goodsType:function(t){return i.e[t]},lessonType:function(t){return i.i[t]},goodsStatus:function(t){return i.d[t]}},methods:{initPage:function(){var t=this;Object(n._8)().then(function(e){t.goodList=e.list,t.total=e.total})},handleCurrentChange:function(t){this.currentRow=t},onConfirm:function(){this.$emit("reflash",this.currentRow)}},mounted:function(){this.initPage()}},l={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.goodList,"row-key":"id","highlight-current-row":""},on:{"current-change":t.handleCurrentChange}},[o("el-table-column",{attrs:{prop:"id",label:"商品ID"}}),t._v(" "),o("el-table-column",{attrs:{prop:"name",label:"名称"}}),t._v(" "),o("el-table-column",{attrs:{label:"商品类型"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("goodsType")(e.row.goods_type))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"现价"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.current_price/100)+"元\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"课程类别"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("lessonType")(e.row.course_type))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_real))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("goodsStatus")(e.row.status))+"\n ")]}}])})],1),t._v(" "),o("page",{attrs:{nowPage:t.nowPage,total:t.total}}),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.onConfirm}},[t._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var r=o("VU/8")(s,l,!1,function(t){o("XjFf")},"data-v-bf015d34",null).exports,c={props:["dialogObj"],data:function(){return{loading:!1,form:{},teacherList:[],pickerOptions1:{disabledDate:function(t){return!(t.getTime()>Date.now())}},options:[{value:0,label:"周日"},{value:1,label:"周一"},{value:2,label:"周二"},{value:3,label:"周三"},{value:4,label:"周四"},{value:5,label:"周五"},{value:6,label:"周六"}],teacherOptions:[],goodList:[],itemOptions:[],rules:{title:[{required:!0,message:"请输入名称",trigger:"change"}],start_num:[{required:!0,message:"请输入开始主题",trigger:"change"}],start_at:[{required:!0,message:"请选择开始上课时间",trigger:"change"}],rest_week_day:[{required:!0,message:"请选择周几不上课",trigger:"change"}],teacher_ids:[{required:!0,message:"请选择老师ID",trigger:"change"}],goods_id:[{required:!0,message:"商品ID不能为空",trigger:"change"}]}}},components:{goodDialog:r},filters:{isOrNot:function(t){return i.h[t]},goodsType:function(t){return i.e[t]},lessonType:function(t){return i.i[t]},goodsStatus:function(t){return i.d[t]},filterGoods:function(t){return t.name+"["+t.current_price/100+"元]"}},methods:{sub:function(){var t=this;this.teacherList?this.$refs.form.validate(function(e){if(e){var o=t.form.goods_id,i={title:t.form.title,start_num:t.form.start_num,start_at:t.form.start_at,rest_week_day:t.form.rest_week_day?t.form.rest_week_day.join(","):"",teacher_ids:t.teacherList.join(",")};t.form.id?Object(n._5)(t.form.id,i).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash")}):Object(n.Q)(o,i).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash")})}}):this.$message.error("请选择老师ID")},getTeachers:function(){var t=this;Object(n._23)().then(function(e){t.teacherOptions=e.list})},onOptionChange:function(t){var e=this.goodList.findIndex(function(e){return e.id=t});e>-1&&this.getLessonDetail(this.goodList[e].course_id)},getLessonDetail:function(t){var e=this;console.log("getLessonDetail",t),this.form.start_num="",Object(n._10)(t,{}).then(function(t){e.itemOptions=t.detail[t.type]})},getGoodsOption:function(){var t=this;Object(n._8)({page:1,limit:100}).then(function(e){t.goodList=e.list})}},mounted:function(){this.getTeachers(),this.getGoodsOption(),this.dialogObj.form.course_id&&this.getLessonDetail(this.dialogObj.form.course_id),this.form=this.dialogObj.form,this.teacherList=this.dialogObj.form.teacher_ids}},u={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",[o("el-dialog",{attrs:{title:t.dialogObj.title,center:"","append-to-body":"",visible:t.dialogObj.show,width:"800px"},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[o("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}]},[o("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px",rules:t.rules}},[o("el-row",[o("el-col",{attrs:{span:10}},[o("el-form-item",{attrs:{label:"商品名称",prop:"goods_id"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:t.onOptionChange},model:{value:t.form.goods_id,callback:function(e){t.$set(t.form,"goods_id",e)},expression:"form.goods_id"}},t._l(t.goodList,function(e,n){return o("el-option",{key:n,attrs:{label:t._f("filterGoods")(e),value:e.id}})}))],1)],1)],1),t._v(" "),o("el-form-item",{attrs:{label:"期数名称",prop:"title"}},[o("el-input",{model:{value:t.form.title,callback:function(e){t.$set(t.form,"title",e)},expression:"form.title"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"开始主题",prop:"start_num"}},[o("el-select",{attrs:{clearable:"",placeholder:"请选择"},model:{value:t.form.start_num,callback:function(e){t.$set(t.form,"start_num",e)},expression:"form.start_num"}},t._l(t.itemOptions,function(t){return o("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"开始上课时间",prop:"start_at"}},[o("el-date-picker",{attrs:{format:"yyyy-MM-dd","value-format":"yyyy-MM-dd",type:"date","picker-options":t.pickerOptions1,placeholder:"选择日期"},model:{value:t.form.start_at,callback:function(e){t.$set(t.form,"start_at",e)},expression:"form.start_at"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"相关老师"}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:t.teacherList,callback:function(e){t.teacherList=e},expression:"teacherList"}},t._l(t.teacherOptions,function(t){return o("el-option",{key:t.id,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"周几不上课"}},[o("el-select",{attrs:{multiple:"",placeholder:"请选择"},model:{value:t.form.rest_week_day,callback:function(e){t.$set(t.form,"rest_week_day",e)},expression:"form.rest_week_day"}},t._l(t.options,function(t){return o("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})}))],1)],1),t._v(" "),o("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[o("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),o("el-button",{attrs:{type:"primary"},on:{click:t.sub}},[t._v("确 定")])],1)],1)])],1)},staticRenderFns:[]};var d={name:"index",data:function(){return{nowPage:1,total:0,limit:10,title:"",goodsId:null,lessonId:null,periodList:[],newDialog:{form:{id:0,title:"",start_num:0,start_at:"",rest_week_day:[],goods_id:""},show:!1,title:""},goodList:[],lessonList:[]}},filters:{dayFilter:function(t){var e=t?t.split(","):[];return(e=e.map(function(t){return i.m[t]})).join(",")},filterGoods:function(t){return t.name+"["+t.current_price/100+"元]"}},components:{goodDialog:r,newDialog:o("VU/8")(c,u,!1,function(t){o("w7Ly")},"data-v-034efa28",null).exports,page:a.a},methods:{onPageChange:function(t){this.nowPage=t,this.onSearch()},onSearch:function(){var t=this,e={limit:this.limit,page:this.nowPage};this.title&&(e.title=this.title),this.goodsId&&(e.goods_id=this.goodsId),this.lessonId&&(e.course_id=this.lessonId),Object(n._14)(e).then(function(e){t.periodList=e.list,t.total=e.total})},onAdd:function(){this.newDialog.form.id="",this.newDialog.start_num="",this.newDialog.form.goods_id="",this.newDialog.form.title="",this.newDialog.form.start_at="",this.newDialog.form.rest_week_day=[],this.newDialog.form.teacher_ids=[],this.newDialog.title="添加期数",this.newDialog.show=!0},onEdit:function(t){this.newDialog.form.id=t.id,this.newDialog.form.start_num=t.start_num,this.newDialog.form.start_at=t.start_at,this.newDialog.form.title=t.title,this.newDialog.form.goods_id=t.goods_id,console.log("row",t);var e=[];t.rest_week_day&&t.rest_week_day.split(",").forEach(function(t){e.push(parseInt(t))}),this.newDialog.form.rest_week_day=e;var o=[];t.teacher_ids&&t.teacher_ids.split(",").forEach(function(t){o.push(parseInt(t))}),this.newDialog.form.teacher_ids=o,this.newDialog.title="编辑期数",this.newDialog.show=!0},onSave:function(t){this.newDialog.show=!1,this.onSearch()},del:function(t){var e=this;this.$confirm("此操作将删除该期数?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(n.w)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.onSearch()})})},getGoodsOption:function(){var t=this;Object(n._8)({page:1,limit:100}).then(function(e){t.goodList=e.list})},getLessonOption:function(){var t=this;Object(n._9)({page:1,limit:100}).then(function(e){t.lessonList=e.list})}},mounted:function(){var t=this.$route.query;t&&t.goods_id&&(this.goodsId=parseInt(t.goods_id)),this.onSearch(),this.getGoodsOption(),this.getLessonOption()}},f={render:function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{staticClass:"periods"},[o("div",{staticClass:"form-block"},[o("el-form",{attrs:{"label-width":"90px",inline:""}},[o("el-form-item",{attrs:{label:"期数标题"}},[o("el-input",{attrs:{placeholder:"请输入内容",clearable:""},model:{value:t.title,callback:function(e){t.title=e},expression:"title"}})],1),t._v(" "),o("el-form-item",{attrs:{label:"商品名称"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.goodsId,callback:function(e){t.goodsId=e},expression:"goodsId"}},t._l(t.goodList,function(e,n){return o("el-option",{key:n,attrs:{label:t._f("filterGoods")(e),value:e.id}})}))],1),t._v(" "),o("el-form-item",{attrs:{label:"课程名称"}},[o("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.lessonId,callback:function(e){t.lessonId=e},expression:"lessonId"}},t._l(t.lessonList,function(t,e){return o("el-option",{key:e,attrs:{label:t.title,value:t.id}})}))],1),t._v(" "),o("el-form-item",[o("el-button",{attrs:{type:"primary"},on:{click:t.onSearch}},[t._v("查询")])],1),t._v(" "),t.$store.state.readonly?t._e():o("el-form-item",{staticStyle:{float:"right"}},[o("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("添加期数")])],1)],1)],1),t._v(" "),o("el-table",{staticStyle:{width:"100%"},attrs:{data:t.periodList}},[o("el-table-column",{attrs:{label:"期数标题"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("router-link",{attrs:{to:{name:"class",query:{goods_id:e.row.goods_id,periods_id:e.row.id}}}},[t._v("\n "+t._s(e.row.title)+"\n ")])]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"goods_name",label:"商品名称"}}),t._v(" "),o("el-table-column",{attrs:{label:"商品价格"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(e.row.goods_price/100)+"元\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),t._v(" "),o("el-table-column",{attrs:{prop:"start_name",label:"开始主题/歌"}}),t._v(" "),o("el-table-column",{attrs:{prop:"current_category_name",label:"当前歌曲"}}),t._v(" "),o("el-table-column",{attrs:{label:"看课情况","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n 可看课包数: "+t._s(e.row.watch_num)),o("br"),t._v(" 已看课包数:"+t._s(e.row.has_watch_num)+" "),o("br"),t._v("\n 续看课包数: "+t._s(e.row.duration_num)),o("br"),t._v(" 已续看课包数:"+t._s(e.row.has_duration_num)+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{label:"周几不上课","min-width":"120"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("dayFilter")(e.row.rest_week_day))+"\n ")]}}])}),t._v(" "),o("el-table-column",{attrs:{prop:"start_at",label:"期数开始时间"}}),t._v(" "),t.$store.state.readonly?t._e():o("el-table-column",{attrs:{label:"操作",width:"148"},scopedSlots:t._u([{key:"default",fn:function(e){return[o("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(o){t.onEdit(e.row)}}},[t._v("\n 编辑\n ")]),t._v(" "),o("el-button",{attrs:{size:"mini",type:"danger",plain:""},on:{click:function(o){t.del(e.row)}}},[t._v("\n 删除\n ")])]}}])})],1),t._v(" "),o("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),t.newDialog.show?o("new-dialog",{attrs:{dialogObj:t.newDialog},on:{reflash:t.onSave}}):t._e()],1)},staticRenderFns:[]};var _=o("VU/8")(d,f,!1,function(t){o("v6K9")},"data-v-738ae672",null);e.default=_.exports},v6K9:function(t,e){},w7Ly:function(t,e){}});
\ No newline at end of file
webpackJsonp([14],{F8nD:function(e,t){},LlG0:function(e,t){},gaNG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("CCn6"),o=(a("+TkF"),a("kmJW")),s={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",loading:!0,form:{key:"",value:"",desc:""},mediaList:[],rules:{value:[{required:!0,message:"请输入关键词",trigger:"change"}],desc:[{required:!0,message:"请输入描述",trigger:"change"}],key:[{required:!0,message:"请输入Key",trigger:"change"}]}}},components:{page:o.a},methods:{save:function(){var e=this;this.dialogObj.id?this.$refs.form.validate(function(t){t&&Object(i._37)(e.id,e.form).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})}):this.$refs.form.validate(function(t){t&&Object(i._31)(e.form).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("Key")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"key"}},[a("el-input",{model:{value:e.form.key,callback:function(t){e.$set(e.form,"key",t)},expression:"form.key"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("关键词")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"value"}},[a("el-input",{model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("描述")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)])},staticRenderFns:[]};var n={name:"sysConfig",data:function(){return{total:0,nowPage:1,limit:10,dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:a("VU/8")(s,l,!1,function(e){a("F8nD")},"data-v-47365745",null).exports,page:o.a},mounted:function(){this.getList()},methods:{changeShow:function(e){this.dialogObj.show=e},getList:function(){var e=this,t={limit:this.limit,page:this.nowPage};Object(i._4)(t).then(function(t){e.list=t.list,e.total=t.total})},onPageChange:function(e){this.nowPage=e,this.getList()},add:function(){this.dialogObj.id="",this.dialogObj.key="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(e){var t=this;Object(i._3)(e.id).then(function(e){t.dialogObj.id=e.id,t.dialogObj.key=e.key,t.dialogObj.value=e.value,t.dialogObj.desc=e.desc,t.dialogObj.show=!0})},del:function(e){var t=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.A)(e.id).then(function(e){t.getList(),t.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys"},[a("div",{staticClass:"clear-both top"},[e.$store.state.readonly?e._e():a("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加配置")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left"}},[a("el-form-item",{attrs:{label:"Key"}},[a("span",[e._v(e._s(t.row.key))])]),e._v(" "),a("el-form-item",{attrs:{label:"关键词"}},[a("span",[e._v(e._s(t.row.value))])]),e._v(" "),a("el-form-item",{attrs:{label:"描述"}},[a("span",[e._v(e._s(t.row.desc))])])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"ID",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"Key",prop:"key"}}),e._v(" "),a("el-table-column",{attrs:{label:"关键词",prop:"value"}}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.del(t.row)}}},[e._v("\n 删除\n ")])]}}])})],1),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getList}}),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}})],1)},staticRenderFns:[]};var c=a("VU/8")(n,r,!1,function(e){a("LlG0")},"data-v-ed3cb004",null);t.default=c.exports}});
\ No newline at end of file
webpackJsonp([13],{F8nD:function(e,t){},LlG0:function(e,t){},gaNG:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=a("CCn6"),o=(a("+TkF"),a("kmJW")),s={name:"dialogObj",props:["dialogObj"],data:function(){return{show:!1,id:"",loading:!0,form:{key:"",value:"",desc:""},mediaList:[],rules:{value:[{required:!0,message:"请输入关键词",trigger:"change"}],desc:[{required:!0,message:"请输入描述",trigger:"change"}],key:[{required:!0,message:"请输入Key",trigger:"change"}]}}},components:{page:o.a},methods:{save:function(){var e=this;this.dialogObj.id?this.$refs.form.validate(function(t){t&&Object(i._37)(e.id,e.form).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.show=!1})}):this.$refs.form.validate(function(t){t&&Object(i._31)(e.form).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.show=!1})})},initDialog:function(){this.show=this.dialogObj.show,this.dialogObj.id&&(this.id=this.dialogObj.id),this.form.key=this.dialogObj.key,this.form.value=this.dialogObj.value,this.form.desc=this.dialogObj.desc,this.loading=!1}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},l={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("el-dialog",{attrs:{title:"自动回复",center:"","append-to-body":"",visible:e.show,width:"800px"},on:{"update:visible":function(t){e.show=t}}},[a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[a("el-form",{ref:"form",attrs:{model:e.form,rules:e.rules}},[a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("Key")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"key"}},[a("el-input",{model:{value:e.form.key,callback:function(t){e.$set(e.form,"key",t)},expression:"form.key"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("关键词")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{prop:"value"}},[a("el-input",{model:{value:e.form.value,callback:function(t){e.$set(e.form,"value",t)},expression:"form.value"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:4}},[a("label",[e._v("描述")])]),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",[a("el-input",{attrs:{type:"textarea"},model:{value:e.form.desc,callback:function(t){e.$set(e.form,"desc",t)},expression:"form.desc"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.show=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.save}},[e._v("确 定")])],1)],1)])},staticRenderFns:[]};var n={name:"sysConfig",data:function(){return{total:0,nowPage:1,limit:10,dialogObj:{value:"",desc:"",show:!1,id:""},list:[]}},components:{dialogCom:a("VU/8")(s,l,!1,function(e){a("F8nD")},"data-v-47365745",null).exports,page:o.a},mounted:function(){this.getList()},methods:{changeShow:function(e){this.dialogObj.show=e},getList:function(){var e=this,t={limit:this.limit,page:this.nowPage};Object(i._4)(t).then(function(t){e.list=t.list,e.total=t.total})},onPageChange:function(e){this.nowPage=e,this.getList()},add:function(){this.dialogObj.id="",this.dialogObj.key="",this.dialogObj.value="",this.dialogObj.desc="",this.dialogObj.show=!0},edit:function(e){var t=this;Object(i._3)(e.id).then(function(e){t.dialogObj.id=e.id,t.dialogObj.key=e.key,t.dialogObj.value=e.value,t.dialogObj.desc=e.desc,t.dialogObj.show=!0})},del:function(e){var t=this;this.$confirm("此操作将删除该记录?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(i.A)(e.id).then(function(e){t.getList(),t.$message({type:"success",message:"删除成功!"})})})}}},r={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"sys"},[a("div",{staticClass:"clear-both top"},[e.$store.state.readonly?e._e():a("el-button",{staticStyle:{float:"right"},attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加配置")])],1),e._v(" "),a("el-table",{staticStyle:{width:"100%"},attrs:{data:e.list}},[a("el-table-column",{attrs:{type:"expand"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-form",{staticClass:"demo-table-expand",attrs:{"label-position":"left"}},[a("el-form-item",{attrs:{label:"Key"}},[a("span",[e._v(e._s(t.row.key))])]),e._v(" "),a("el-form-item",{attrs:{label:"关键词"}},[a("span",[e._v(e._s(t.row.value))])]),e._v(" "),a("el-form-item",{attrs:{label:"描述"}},[a("span",[e._v(e._s(t.row.desc))])])],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"ID",prop:"id"}}),e._v(" "),a("el-table-column",{attrs:{label:"Key",prop:"key"}}),e._v(" "),a("el-table-column",{attrs:{label:"关键词",prop:"value"}}),e._v(" "),a("el-table-column",{attrs:{prop:"created_at",label:"创建时间"}}),e._v(" "),e.$store.state.readonly?e._e():a("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(a){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),a("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(a){e.del(t.row)}}},[e._v("\n 删除\n ")])]}}])})],1),e._v(" "),a("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getList}}),e._v(" "),a("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}})],1)},staticRenderFns:[]};var c=a("VU/8")(n,r,!1,function(e){a("LlG0")},"data-v-ed3cb004",null);t.default=c.exports}});
\ No newline at end of file
webpackJsonp([15],{"3sqD":function(t,e){},rS9i:function(t,e){},"sg/1":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("CCn6"),n=(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._37)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._31)(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)}}}),o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",{attrs:{title:t.title,center:"","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",format:"yyyy-MM-dd","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")(n,o,!1,function(t){s("3sqD")},"data-v-4705ed70",null).exports},mounted:function(){this.getList()},methods:{changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(i._4)({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._3)(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"},n=[];e.list.forEach(function(e){e!==t&&n.push(e)}),s.desc=JSON.stringify(n),Object(i._37)(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.readonly?t._e():s("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(s){t.del(e)}}},[t._v("删除")])],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("rS9i")},"data-v-8d60808c",null);e.default=d.exports}});
\ No newline at end of file
webpackJsonp([14],{"3sqD":function(t,e){},rS9i:function(t,e){},"sg/1":function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("CCn6"),n=(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._37)(this.id,e).then(function(e){t.$message({type:"success",message:"新增成功!"}),t.noLessonDate=s,t.$emit("reflash"),t.show=!1}):Object(i._31)(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)}}}),o={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("el-dialog",{attrs:{title:t.title,center:"","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",format:"yyyy-MM-dd","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")(n,o,!1,function(t){s("3sqD")},"data-v-4705ed70",null).exports},mounted:function(){this.getList()},methods:{changeShow:function(t){this.dialogObj.show=t},getList:function(){var t=this;Object(i._4)({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._3)(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"},n=[];e.list.forEach(function(e){e!==t&&n.push(e)}),s.desc=JSON.stringify(n),Object(i._37)(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.readonly?t._e():s("el-button",{staticClass:"button",attrs:{type:"text"},on:{click:function(s){t.del(e)}}},[t._v("删除")])],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("rS9i")},"data-v-8d60808c",null);e.default=d.exports}});
\ No newline at end of file
webpackJsonp([13],{"1djJ":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s("CCn6"),i=s("+TkF"),l=s("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,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(o.K)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(o.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._40)({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(o._40)({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(o._40)({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(o._7)(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(o._9)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品描述"}},[s("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[s("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),s("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"观看时长(节)"}},[s("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续看时长(天)"}},[s("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"主图"}},[s("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}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"客服"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[s("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),s("el-option",{attrs:{label:"团购商品",value:2}})],1)],1)],1)],1),e._v(" "),1===e.form.goods_type?s("el-form-item",{attrs:{label:"推荐奖金(元)"}},[s("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"是否配置实物"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),s("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type?"原价(元)":"单买价格(元)"}},[s("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[s("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"成团人数(人)"}},[s("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[s("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享标题"}},[s("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享内容"}},[s("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"分享主图"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload","file-list":e.form.share_desc.img,"http-request":e.uploadFileMain}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"商品详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"Q&A详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var n=s("VU/8")(a,r,!1,function(e){s("FwGZ")},"data-v-c80b6818",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,title:"",id:""}}},components:{page:l.a,dialogCom:n},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),Object(o._8)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.B)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o._36)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.D)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e}}},u={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.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],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:12}},[s("el-form-item",[e.$store.state.readonly?e._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1)],1)],1)],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"id",label:"商品ID"}}),e._v(" "),s("el-table-column",{attrs:{prop:"name",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("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),s("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),e.$store.state.readonly?e._e():s("el-table-column",{attrs:{width:"200",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-popover",{attrs:{placement:"top",width:"320"}},[s("div",{staticStyle:{"text-align":"center"}},[s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),e.$store.state.readonly?e._e():[1===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),0===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.onDel(t.row)}}},[e._v("\n 删除\n ")])]],2),e._v(" "),s("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}})],1)},staticRenderFns:[]};var m=s("VU/8")(c,u,!1,function(e){s("itCB")},"data-v-4da2a0b9",null);t.default=m.exports},FwGZ:function(e,t){},itCB:function(e,t){}});
\ No newline at end of file
webpackJsonp([15],{"1djJ":function(e,t,s){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=s("CCn6"),i=s("+TkF"),l=s("kmJW"),a={name:"dialogObj",props:["dialogObj"],data:function(){return{loading:!0,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(o.K)(this.dialogObj.id,t).then(function(t){e.$message({type:"success",message:"修改成功!"}),e.$emit("reflash"),e.dialogObj.show=!1});break;case 0:Object(o.i)(t).then(function(t){e.$message({type:"success",message:"新增成功!"}),e.$emit("reflash"),e.dialogObj.show=!1})}},uploadFileMain:function(e){var t=this;this.$store.dispatch("setProgress",{type:"new",id:e.file.uid}),this.fileUid=e.file.uid,Object(o._40)({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(o._40)({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(o._40)({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(o._7)(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(o._9)({type:this.form.course_type}).then(function(t){e.lessonList=t.list})}},watch:{dialogObj:{handler:function(){this.loading=!0,this.initDialog()},deep:!0},show:function(e){this.$emit("changeShow",e)}}},r={render:function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("el-dialog",{attrs:{title:e.dialogObj.title,center:"","append-to-body":"",visible:e.dialogObj.show,width:"800px"},on:{"update:visible":function(t){e.$set(e.dialogObj,"show",t)}}},[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}]},[s("el-form",{ref:"form",attrs:{model:e.form,"label-width":"100px",disabled:2===e.dialogObj.type}},[s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品名称"}},[s("el-input",{model:{value:e.form.name,callback:function(t){e.$set(e.form,"name",t)},expression:"form.name"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品描述"}},[s("el-input",{model:{value:e.form.goods_desc.desc,callback:function(t){e.$set(e.form.goods_desc,"desc",t)},expression:"form.goods_desc.desc"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程类型"}},[s("el-select",{attrs:{placeholder:"请选择"},on:{change:function(t){e.changeLessonType()}},model:{value:e.form.course_type,callback:function(t){e.$set(e.form,"course_type",t)},expression:"form.course_type"}},[s("el-option",{attrs:{label:"日课",value:1}}),e._v(" "),s("el-option",{attrs:{label:"月课",value:0}})],1)],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"课程"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.course_id,callback:function(t){e.$set(e.form,"course_id",t)},expression:"form.course_id"}},e._l(e.lessonList,function(e){return s("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})}))],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"观看时长(节)"}},[s("el-input-number",{attrs:{label:"课时数"},model:{value:e.form.watch_num,callback:function(t){e.$set(e.form,"watch_num",t)},expression:"form.watch_num"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"续看时长(天)"}},[s("el-input-number",{attrs:{label:"看课天数"},model:{value:e.form.duration_num,callback:function(t){e.$set(e.form,"duration_num",t)},expression:"form.duration_num"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"主图"}},[s("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}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-form-item",{attrs:{label:"客服"}},[s("el-upload",{staticClass:"upload-demo",attrs:{"list-type":"picture-card",action:"/api/public/upload","http-request":e.uploadFileMainService,"file-list":e.form.desc.customer_service}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"商品类型"}},[s("el-select",{attrs:{placeholder:"请选择"},model:{value:e.form.goods_type,callback:function(t){e.$set(e.form,"goods_type",t)},expression:"form.goods_type"}},[s("el-option",{attrs:{label:"普通商品",value:1}}),e._v(" "),s("el-option",{attrs:{label:"团购商品",value:2}})],1)],1)],1)],1),e._v(" "),1===e.form.goods_type?s("el-form-item",{attrs:{label:"推荐奖金(元)"}},[s("el-input-number",{attrs:{label:"推荐奖金"},model:{value:e.form.invite_earnings,callback:function(t){e.$set(e.form,"invite_earnings",t)},expression:"form.invite_earnings"}})],1):e._e(),e._v(" "),s("el-form-item",{attrs:{label:"是否配置实物"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_real,callback:function(t){e.$set(e.form,"is_real",t)},expression:"form.is_real"}}),e._v(" "),s("span",{staticStyle:{"font-size":"12px"}},[e._v("打开后提示用户填写具体住址")])],1),e._v(" "),1===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许用户推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_user,callback:function(t){e.$set(e.form,"is_auth_user",t)},expression:"form.is_auth_user"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"是否允许老师推广","label-width":"200"}},[s("el-switch",{attrs:{"active-value":1,"inactive-value":0},model:{value:e.form.is_auth_teacher,callback:function(t){e.$set(e.form,"is_auth_teacher",t)},expression:"form.is_auth_teacher"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type?"原价(元)":"单买价格(元)"}},[s("el-input-number",{attrs:{label:"原价"},model:{value:e.form.original_price,callback:function(t){e.$set(e.form,"original_price",t)},expression:"form.original_price"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:1===e.form.goods_type?"现价(元)":"拼团价格(元)"}},[s("el-input-number",{attrs:{label:"现价"},model:{value:e.form.current_price,callback:function(t){e.$set(e.form,"current_price",t)},expression:"form.current_price"}})],1)],1)],1),e._v(" "),2===e.form.goods_type?s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"成团人数(人)"}},[s("el-input-number",{attrs:{label:"成团人数"},model:{value:e.form.desc.group_number,callback:function(t){e.$set(e.form.desc,"group_number",t)},expression:"form.desc.group_number"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"团购失效时间(小时)","label-width":"136"}},[s("el-input-number",{attrs:{label:"团购失效时间"},model:{value:e.form.desc.group_continue,callback:function(t){e.$set(e.form.desc,"group_continue",t)},expression:"form.desc.group_continue"}})],1)],1)],1):e._e(),e._v(" "),s("el-row",[s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享标题"}},[s("el-input",{model:{value:e.form.share_desc.title,callback:function(t){e.$set(e.form.share_desc,"title",t)},expression:"form.share_desc.title"}})],1)],1),e._v(" "),s("el-col",{attrs:{span:12}},[s("el-form-item",{attrs:{label:"分享内容"}},[s("el-input",{model:{value:e.form.share_desc.content,callback:function(t){e.$set(e.form.share_desc,"content",t)},expression:"form.share_desc.content"}})],1)],1)],1),e._v(" "),s("el-form-item",{attrs:{label:"分享主图"}},[s("el-upload",{attrs:{"list-type":"picture-card",action:"/api/public/upload","file-list":e.form.share_desc.img,"http-request":e.uploadFileMain}},[s("i",{staticClass:"el-icon-plus"})])],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"商品详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.detail,callback:function(t){e.$set(e.form.desc,"detail",t)},expression:"form.desc.detail"}})],1)],1)],1),e._v(" "),s("el-row",[s("el-col",{attrs:{span:24}},[s("el-form-item",{attrs:{label:"Q&A详情"}},[s("el-input",{attrs:{type:"textarea",rows:25},model:{value:e.form.desc.qa,callback:function(t){e.$set(e.form.desc,"qa",t)},expression:"form.desc.qa"}})],1)],1)],1)],1),e._v(" "),2!==e.dialogObj.type?s("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[s("el-button",{on:{click:function(t){e.dialogObj.show=!1}}},[e._v("取 消")]),e._v(" "),s("el-button",{attrs:{type:"primary"},on:{click:e.sub}},[e._v("确 定")])],1):e._e()],1)])},staticRenderFns:[]};var n=s("VU/8")(a,r,!1,function(e){s("FwGZ")},"data-v-c80b6818",null).exports,c={name:"index",data:function(){return{searchFrom:{name:""},userList:[],total:0,nowPage:1,limit:10,dialogObj:{type:0,show:!1,title:"",id:""}}},components:{page:l.a,dialogCom:n},filters:{isOrNot:function(e){return i.h[e]},goodsType:function(e){return i.e[e]},lessonType:function(e){return i.i[e]},goodsStatus:function(e){return i.d[e]}},mounted:function(){this.getUser()},methods:{onPageChange:function(e){this.nowPage=e,this.getUser()},copyUrl:function(e){var t="http://wechat.test.singsingenglish.com/#/buyDetail?shopId="+e,s=document.createElement("input");s.value=t,document.body.appendChild(s),s.select(),document.execCommand("Copy"),this.$message({message:"已成功复制到剪切板",type:"success"})},getUser:function(){var e=this,t={limit:this.limit,page:this.nowPage};this.searchFrom.name&&(t.name=this.searchFrom.name),Object(o._8)(t).then(function(t){e.userList=t.list,e.total=t.total})},edit:function(e){this.dialogObj={type:1,title:"编辑商品",show:!0,id:e.id}},add:function(){this.dialogObj={type:0,title:"添加商品",show:!0}},detail:function(e){this.dialogObj.id=e.id,this.dialogObj.type=2,this.dialogObj.title="查看商品",this.dialogObj.show=!0},onDel:function(e){var t=this;this.$confirm("此操作将删除该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.B)(e.id).then(function(e){t.$message({type:"success",message:"删除成功!"})}),t.getUser()})},onUp:function(e){var t=this;this.$confirm("此操作将上架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o._36)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},onDown:function(e){var t=this;this.$confirm("此操作将下架该商品?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(o.D)(e.id).then(function(e){t.$message({type:"success",message:"操作成功!"}),t.getUser()})})},changeShow:function(e){this.dialogObj.show=e}}},u={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.name,callback:function(t){e.$set(e.searchFrom,"name",t)},expression:"searchFrom.name"}})],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:12}},[s("el-form-item",[e.$store.state.readonly?e._e():s("el-button",{attrs:{type:"success",plain:""},on:{click:e.add}},[e._v("添加商品")])],1)],1)],1)],1),e._v(" "),s("el-table",{staticStyle:{width:"100%"},attrs:{data:e.userList}},[s("el-table-column",{attrs:{prop:"name",label:"名称"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("router-link",{attrs:{to:{name:"periods",query:{goods_id:t.row.id}}}},[e._v("\n "+e._s(t.row.name)+"\n ")])]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品类型"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsType")(t.row.goods_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品原价/直购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.original_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"商品现价/团购价"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(t.row.current_price/100)+"元\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{prop:"course_title",label:"课程名称"}}),e._v(" "),s("el-table-column",{attrs:{label:"课程类别"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("lessonType")(t.row.course_type))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"是否有实物"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("isOrNot")(t.row.is_real))+"\n ")]}}])}),e._v(" "),s("el-table-column",{attrs:{label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v("\n "+e._s(e._f("goodsStatus")(t.row.status))+"\n ")]}}])}),e._v(" "),e.$store.state.readonly?e._e():s("el-table-column",{attrs:{width:"60",label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[s("el-popover",{attrs:{placement:"top",width:"400"}},[s("div",{staticStyle:{"text-align":"center"}},[s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.detail(t.row)}}},[e._v("\n 查看详情\n ")]),e._v(" "),e.$store.state.readonly?e._e():[2===t.row.status||0===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onUp(t.row)}}},[e._v("\n 上架\n ")]):e._e(),e._v(" "),1===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"primary"},on:{click:function(s){e.onDown(t.row)}}},[e._v("\n 下架\n ")]):e._e(),e._v(" "),0===t.row.status?s("el-button",{attrs:{size:"mini",plain:"",type:"warning"},on:{click:function(s){e.edit(t.row)}}},[e._v("\n 编辑\n ")]):e._e(),e._v(" "),s("el-button",{attrs:{size:"mini",plain:""},on:{click:function(s){e.copyUrl(t.row.id)}}},[e._v("\n 商品链接\n ")]),e._v(" "),s("el-button",{attrs:{size:"mini",plain:"",type:"danger"},on:{click:function(s){e.onDel(t.row)}}},[e._v("\n 删除\n ")])]],2),e._v(" "),s("el-button",{attrs:{slot:"reference",size:"mini",type:"text"},slot:"reference"},[e._v("操作")])],1)]}}])})],1),e._v(" "),s("page",{attrs:{total:e.total,limit:e.limit},on:{pageChange:e.onPageChange}}),e._v(" "),s("dialog-com",{attrs:{dialogObj:e.dialogObj},on:{changeShow:e.changeShow,reflash:e.getUser}})],1)},staticRenderFns:[]};var m=s("VU/8")(c,u,!1,function(e){s("Qmlr")},"data-v-40e5cbbb",null);t.default=m.exports},FwGZ:function(e,t){},Qmlr:function(e,t){}});
\ No newline at end of file
webpackJsonp([9],{OX9A:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),n={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],goodsList:[],periods:{}}},methods:{initPage:function(){var t=this;switch(Object(s._23)().then(function(e){t.teacherList=e.list}),this.dialogObj.type){case 0:this.getPeriodList(),this.form={teacher_id:"",max_join_num:""};break;case 1:Object(s._0)(this.dialogObj.id).then(function(e){t.form={teacher_id:e.teacher_id,max_join_num:e.max_join_num}})}},getPeriodList:function(){var t=this;Object(s._8)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(s._14)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:Object(s.f)(this.periods.id,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash"),t.dialogObj.show=!1});break;case 1:Object(s.I)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(s._14)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacher()}}},watch:{dialogObj:function(t){this.initPage()}}},a={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[1!==this.dialogObj.type?i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1):t._e(),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"最大学员"}},[i("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var o=i("VU/8")(n,a,!1,function(t){i("RKv+")},"data-v-ed852644",null).exports,l=i("+TkF"),r={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",addShow:!1}},filters:{isOrNot:function(t){return l.h[t]}},methods:{initPage:function(){var t=this;Object(s._2)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.n)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"})}),e.initPage()})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.t)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"})}),e.initPage()})},onAdd:function(){var t=this;Object(s.g)(this.userObj.classId,this.addId).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.initPage()})}},watch:{userObj:function(){this.initPage()}}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:function(e){t.addShow=!0}}},[t._v("+添加用户")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[i("el-table-column",{attrs:{label:"头像"},scopedSlots:t._u([{key:"default",fn:function(t){return[i("img",{staticStyle:{width:"50px",height:"50px","border-radius":"50px"},attrs:{src:t.row.avatar}})]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"user_id",label:"用户ID"}}),t._v(" "),i("el-table-column",{attrs:{prop:"nickname",label:"用户名"}}),t._v(" "),i("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.changeUser(e.row)}}},[t._v("更改看课权限")]),t._v(" "),i("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(i){t.onDel(e.row)}}},[t._v("删除")])]}}])})],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[i("el-form",{attrs:{"label-width":"90px"}},[i("el-form-item",{attrs:{label:"用户id"}},[i("el-input",{model:{value:t.addId,callback:function(e){t.addId=e},expression:"addId"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var d={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0}}},components:{UserList:i("VU/8")(r,c,!1,function(t){i("bIlo")},"data-v-1425edf5",null).exports,classDialog:o,page:i("kmJW").a},mounted:function(){this.initPage()},methods:{initPage:function(){var t=this;Object(s._8)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(s._14)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]}),t.periods&&Object(s._1)()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;Object(s._15)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},getClassList:function(){var t=this;this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(s._1)(this.periods.id,e).then(function(e){t.title=e.periods,t.classList=e.list,t.total=e.total})},handleItemChange:function(t){var e=this;Object(s._14)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.s)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"})}),e.getClassList()})},onAdd:function(){this.dialogObj={show:!0,title:"添加班级",periodsId:this.periods?this.periods.id:"",type:0}},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",periodsId:this.periods.id,type:1,id:t.id}}}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"class"},[i("div",{staticClass:"form-block"},[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[t._v(t._s(t.title.title))]),t._v(" "),i("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))]),t._v(" "),i("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))]),t._v(" "),i("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))]),t._v(" "),i("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():i("div",[i("el-form",{attrs:{"label-width":"300px",inline:""}},[i("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList}},[i("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),i("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),i("el-table-column",{attrs:{prop:"created_at",label:"创建于"}}),t._v(" "),i("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(i){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(i){t.delClass(e.row)}}},[t._v("删除")])]}}])})],1)],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.getClassList}}),t._v(" "),i("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)},staticRenderFns:[]};var h=i("VU/8")(d,u,!1,function(t){i("SfEf")},"data-v-aefc9f70",null);e.default=h.exports},"RKv+":function(t,e){},SfEf:function(t,e){},bIlo:function(t,e){}});
\ No newline at end of file
webpackJsonp([9],{OX9A:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=i("CCn6"),n={props:["dialogObj"],data:function(){return{form:{teacher_id:"",max_join_num:""},teacherList:[],goodsList:[],periods:{}}},methods:{initPage:function(){var t=this;switch(Object(s._23)().then(function(e){t.teacherList=e.list}),this.dialogObj.type){case 0:this.getPeriodList(),this.form={teacher_id:"",max_join_num:""};break;case 1:Object(s._0)(this.dialogObj.id).then(function(e){t.form={teacher_id:e.teacher_id,max_join_num:e.max_join_num}})}},getPeriodList:function(){var t=this;Object(s._8)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.periods||Object(s._14)({goods_id:t.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})})},onSave:function(){var t=this;switch(this.dialogObj.type){case 0:Object(s.f)(this.periods.id,this.form).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.$emit("reflash"),t.dialogObj.show=!1});break;case 1:Object(s.I)(this.dialogObj.id,this.form).then(function(e){t.$message({type:"success",message:"修改成功!"}),t.$emit("reflash"),t.dialogObj.show=!1})}},handleItemChange:function(t){var e=this;Object(s._14)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.getTeacher()}}},watch:{dialogObj:function(t){this.initPage()}}},o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.dialogObj.title,visible:t.dialogObj.show},on:{"update:visible":function(e){t.$set(t.dialogObj,"show",e)}}},[i("el-form",{ref:"form",attrs:{model:t.form,"label-width":"120px"}},[1!==this.dialogObj.type?i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods}})],1):t._e(),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择"},model:{value:t.form.teacher_id,callback:function(e){t.$set(t.form,"teacher_id",e)},expression:"form.teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.name,value:t.id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:"最大学员"}},[i("el-input-number",{model:{value:t.form.max_join_num,callback:function(e){t.$set(t.form,"max_join_num",e)},expression:"form.max_join_num"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.dialogObj.show=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onSave}},[t._v("确 定")])],1)],1)},staticRenderFns:[]};var a=i("VU/8")(n,o,!1,function(t){i("RKv+")},"data-v-ed852644",null).exports,l=i("+TkF"),r={name:"userList",props:["userObj"],data:function(){return{userTable:[],addId:"",addShow:!1}},filters:{isOrNot:function(t){return l.h[t]}},methods:{initPage:function(){var t=this;Object(s._2)(this.userObj.classId).then(function(e){t.userTable=e.list})},changeUser:function(t){var e=this;this.$confirm("此操作将修改成员看课权限?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.n)(t.id,{is_view_course:0===t.is_view_course?1:0}).then(function(t){e.$message({type:"success",message:"修改成功!"})}),e.initPage()})},onDel:function(t){var e=this;this.$confirm("此操作将删除该成员?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.t)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"})}),e.initPage()})},onAdd:function(){var t=this;Object(s.g)(this.userObj.classId,this.addId).then(function(e){t.$message({type:"success",message:"添加成功!"}),t.initPage()})}},watch:{userObj:function(){this.initPage()}}},c={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("el-dialog",{attrs:{title:t.userObj.title,visible:t.userObj.show,modal:!1,fullscreen:!0},on:{"update:visible":function(e){t.$set(t.userObj,"show",e)}}},[i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:function(e){t.addShow=!0}}},[t._v("+添加用户")])],1)],1),t._v(" "),i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.userTable}},[i("el-table-column",{attrs:{label:"头像"},scopedSlots:t._u([{key:"default",fn:function(t){return[i("img",{staticStyle:{width:"50px",height:"50px","border-radius":"50px"},attrs:{src:t.row.avatar}})]}}])}),t._v(" "),i("el-table-column",{attrs:{prop:"user_id",label:"用户ID"}}),t._v(" "),i("el-table-column",{attrs:{prop:"nickname",label:"用户名"}}),t._v(" "),i("el-table-column",{attrs:{label:"看课权限"},scopedSlots:t._u([{key:"default",fn:function(e){return[t._v("\n "+t._s(t._f("isOrNot")(e.row.is_view_course))+"\n ")]}}])}),t._v(" "),t.$store.state.readonly?t._e():i("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{type:"warning",size:"mini"},on:{click:function(i){t.changeUser(e.row)}}},[t._v("更改看课权限")]),t._v(" "),i("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(i){t.onDel(e.row)}}},[t._v("删除")])]}}])})],1)],1),t._v(" "),i("el-dialog",{attrs:{modal:!1,visible:t.addShow},on:{"update:visible":function(e){t.addShow=e}}},[i("el-form",{attrs:{"label-width":"90px"}},[i("el-form-item",{attrs:{label:"用户id"}},[i("el-input",{model:{value:t.addId,callback:function(e){t.addId=e},expression:"addId"}})],1)],1),t._v(" "),i("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[i("el-button",{on:{click:function(e){t.addShow=!1}}},[t._v("取 消")]),t._v(" "),i("el-button",{attrs:{type:"primary"},on:{click:t.onAdd}},[t._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var d={data:function(){return{nowPage:1,total:0,limit:10,periodsId:null,goodsList:[],teacher_id:"",classList:[],title:"",teacherList:[],userObj:{classId:"",title:"",show:!1},dialogObj:{show:!1,title:"添加班级",periodsId:"",type:0,id:0},selectedGoods:[]}},components:{UserList:i("VU/8")(r,c,!1,function(t){i("bIlo")},"data-v-1425edf5",null).exports,classDialog:a,page:i("kmJW").a},mounted:function(){this.initPage()},methods:{initQuery:function(){var t=this,e=this.$route.query;e&&e.goods_id&&e.periods_id?(this.selectedGoods=[parseInt(e.goods_id),parseInt(e.periods_id)],Object(s._14)({goods_id:this.selectedGoods[0]}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList.find(function(e){return e.id===t.selectedGoods[0]}).children=e.list;var i=t.goodsList.find(function(e){return e.id===t.selectedGoods[0]});t.periods=i.children.find(function(e){return e.id===t.selectedGoods[1]}),t.teacher_id="",t.getClassList()})):Object(s._14)({goods_id:this.goodsList[0].id}).then(function(e){e.list.forEach(function(t){t.name=t.title}),t.goodsList[0].children=e.list,t.periods=e.list[0]})},initPage:function(){var t=this;Object(s._8)().then(function(e){e.list.forEach(function(t){t.children=[]}),t.goodsList=e.list,t.initQuery()})},showUser:function(t){this.userObj={classId:t.id,show:!0,title:t.teacher_name+"班级用户列表"}},getTeacher:function(){var t=this;Object(s._15)(this.periods.id).then(function(e){t.teacherList=e})},changePeriods:function(t){if(t.length>1){var e=this.goodsList.find(function(e){return e.id===t[0]});this.periods=e.children.find(function(e){return e.id===t[1]}),this.teacher_id="",this.getTeacher()}},onPageChange:function(t){this.nowPage=t,this.getClassList()},getClassList:function(){var t=this;this.getTeacher();var e={limit:this.limit,page:this.nowPage};this.teacher_id&&(e.teacher_id=this.teacher_id),Object(s._1)(this.periods.id,e).then(function(e){t.title=e.periods,t.classList=e.list,t.total=e.total})},handleItemChange:function(t){var e=this;Object(s._14)({goods_id:t[0]}).then(function(i){i.list.forEach(function(t){t.name=t.title}),e.goodsList.find(function(e){return e.id===t[0]}).children=i.list})},delClass:function(t){var e=this;this.$confirm("此操作将删除该班级?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){Object(s.s)(t.id).then(function(t){e.$message({type:"success",message:"删除成功!"})}),e.getClassList()})},onAdd:function(){this.dialogObj={show:!0,title:"添加班级",periodsId:this.periods?this.periods.id:"",type:0}},editClass:function(t){this.dialogObj={show:!0,title:"编辑班级",periodsId:this.periods.id,type:1,id:t.id}}}},u={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"class"},[i("div",{staticClass:"form-block"},[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[i("el-cascader",{attrs:{options:t.goodsList,props:{value:"id",label:"name"}},on:{"active-item-change":t.handleItemChange,change:t.changePeriods},model:{value:t.selectedGoods,callback:function(e){t.selectedGoods=e},expression:"selectedGoods"}})],1),t._v(" "),i("el-form-item",{attrs:{label:"老师"}},[i("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:t.teacher_id,callback:function(e){t.teacher_id=e},expression:"teacher_id"}},t._l(t.teacherList,function(t,e){return i("el-option",{key:e,attrs:{label:t.teacher_name,value:t.teacher_id}})}))],1),t._v(" "),i("el-form-item",{attrs:{label:""}},[i("el-button",{attrs:{type:"primary"},on:{click:t.getClassList}},[t._v("\n 搜索\n ")])],1),t._v(" "),i("el-form-item",{staticStyle:{float:"right"}},[t.$store.state.readonly?t._e():i("el-button",{attrs:{type:"success"},on:{click:t.onAdd}},[t._v("+添加班级")])],1)],1)],1),t._v(" "),t.classList&&t.classList.length>0?i("div",[i("el-form",{attrs:{"label-width":"90px",inline:""}},[i("el-form-item",{attrs:{label:"期数"}},[t._v(t._s(t.title.title))]),t._v(" "),i("el-form-item",{attrs:{label:"开始时间"}},[t._v(t._s(t.title.start_at))]),t._v(" "),i("el-form-item",{attrs:{label:"结束时间"}},[t._v(t._s(t.title.over_at))]),t._v(" "),i("el-form-item",{attrs:{label:"可看课包数"}},[t._v(t._s(t.title.watch_num))]),t._v(" "),i("el-form-item",{attrs:{label:"已看课包数"}},[t._v(t._s(t.title.has_watch_num))])],1)],1):t._e(),t._v(" "),t.classList&&0!==t.classList.length?t._e():i("div",[i("el-form",{attrs:{"label-width":"300px",inline:""}},[i("el-form-item",{attrs:{label:"暂无期数信息,请先选择期数"}})],1)],1),t._v(" "),i("div",[i("el-table",{staticStyle:{width:"100%"},attrs:{data:t.classList}},[i("el-table-column",{attrs:{prop:"teacher_name",label:"班主任"}}),t._v(" "),i("el-table-column",{attrs:{prop:"max_join_num",label:"最大人数"}}),t._v(" "),i("el-table-column",{attrs:{prop:"created_at",label:"创建于"}}),t._v(" "),i("el-table-column",{attrs:{prop:"join_num",label:"现有人数"}}),t._v(" "),i("el-table-column",{attrs:{width:"250",label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[i("el-button",{attrs:{size:"mini",type:"primary"},on:{click:function(i){t.showUser(e.row)}}},[t._v("班级成员")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"warning"},on:{click:function(i){t.editClass(e.row)}}},[t._v("编辑")]),t._v(" "),t.$store.state.readonly?t._e():i("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(i){t.delClass(e.row)}}},[t._v("删除")])]}}])})],1)],1),t._v(" "),i("page",{attrs:{nowPage:t.nowPage,total:t.total,limit:t.limit},on:{pageChange:t.onPageChange}}),t._v(" "),i("class-dialog",{attrs:{dialogObj:t.dialogObj},on:{reflash:t.getClassList}}),t._v(" "),i("user-list",{attrs:{userObj:t.userObj},on:{reflash:t.getClassList}})],1)},staticRenderFns:[]};var h=i("VU/8")(d,u,!1,function(t){i("epT0")},"data-v-7d0ac540",null);e.default=h.exports},"RKv+":function(t,e){},bIlo:function(t,e){},epT0:function(t,e){}});
\ No newline at end of file
webpackJsonp([31],{CqZn: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},mainCanShow:function(e){e.mainLoad=!1},mainUnShow:function(e){e.mainLoad=!0},changeParentRouter:function(e,n){e.menuList.find(function(e){return e.name===n.name}).routerName=n.to.name},progress:function(e,n){switch(n.type){case"new":e.progressList.push({num:0,id:n.id});break;case"change":e.progressList.find(function(e){return e.id===n.id}).num=n.num;break;case"delete":e.progressList.find(function(e){return e.id===n.id})}}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",permission:!1,readonly:!0,mainLoad:!0,menuList:[],menuType:!1,nowTab:"first",progressList:[],openedTab:[{value:"首页",routerName:"first",name:"first",delNo:!0,path:"/index"}]},mutations:i,actions:{setToken:function(e,n){(0,e.commit)("setToken",n)},setUserName:function(e,n){(0,e.commit)("setUserName",n)},setProgress:function(e,n){(0,e.commit)("progress",n)},setPermission:function(e,n){(0,e.commit)("setPermission",n)},setMenu:function(e,n){(0,e.commit)("setMenu",n)},readonly:function(e,n){(0,e.commit)("readonly",n)}}})},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(13)]).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(12)]).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(9)]).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(15)]).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(10)]).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(11)]).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(28)]).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(21)]).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(27).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(8)]).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(5)]).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(16)]).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(17)]).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(7)]).then(function(){var n=[t("q5av")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"素材管理",routerName:"weChatResource",path:"/weChatResource",cover:"7-4",router:{path:"/weChatResource",name:"weChatResource",component:function(e){return Promise.all([t.e(0),t.e(24)]).then(function(){var n=[t("Xhqp")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"Banner管理",routerName:"banner",path:"/banner",cover:"7-5",router:{path:"/banner",name:"banner",component:function(e){return Promise.all([t.e(0),t.e(20)]).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(26)]).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(23)]).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(14)]).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(25)]).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,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("CqZn")},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(4)]).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(3).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(18)]).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(22)]).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(19)]).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)}e.meta.readonly?a.a.dispatch("readonly",!0):a.a.dispatch("readonly",!1),e.matched.some(function(e){return!0!==e.meta.skip_auth})&&!a.a.state.token?t({path:"/login"}):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],{CqZn: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},mainCanShow:function(e){e.mainLoad=!1},mainUnShow:function(e){e.mainLoad=!0},changeParentRouter:function(e,n){e.menuList.find(function(e){return e.name===n.name}).routerName=n.to.name},progress:function(e,n){switch(n.type){case"new":e.progressList.push({num:0,id:n.id});break;case"change":e.progressList.find(function(e){return e.id===n.id}).num=n.num;break;case"delete":e.progressList.find(function(e){return e.id===n.id})}}};o.default.use(a.a);n.a=new a.a.Store({state:{show:!1,userName:"",token:"",permission:!1,readonly:!0,mainLoad:!0,menuList:[],menuType:!1,nowTab:"first",progressList:[],openedTab:[{value:"首页",routerName:"first",name:"first",delNo:!0,path:"/index"}]},mutations:i,actions:{setToken:function(e,n){(0,e.commit)("setToken",n)},setUserName:function(e,n){(0,e.commit)("setUserName",n)},setProgress:function(e,n){(0,e.commit)("progress",n)},setPermission:function(e,n){(0,e.commit)("setPermission",n)},setMenu:function(e,n){(0,e.commit)("setMenu",n)},readonly:function(e,n){(0,e.commit)("readonly",n)}}})},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(15)]).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(12)]).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(9)]).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(14)]).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(10)]).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(11)]).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(28)]).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(21)]).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(27).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(8)]).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(5)]).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(16)]).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(17)]).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(7)]).then(function(){var n=[t("q5av")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"素材管理",routerName:"weChatResource",path:"/weChatResource",cover:"7-4",router:{path:"/weChatResource",name:"weChatResource",component:function(e){return Promise.all([t.e(0),t.e(24)]).then(function(){var n=[t("Xhqp")];e.apply(null,n)}.bind(this)).catch(t.oe)}}},{value:"Banner管理",routerName:"banner",path:"/banner",cover:"7-5",router:{path:"/banner",name:"banner",component:function(e){return Promise.all([t.e(0),t.e(20)]).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(26)]).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(23)]).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(13)]).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(25)]).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,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("CqZn")},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(4)]).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(3).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(18)]).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(22)]).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(19)]).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)}e.meta.readonly?a.a.dispatch("readonly",!0):a.a.dispatch("readonly",!1),e.matched.some(function(e){return!0!==e.meta.skip_auth})&&!a.a.state.token?t({path:"/login"}):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 a=window.webpackJsonp;window.webpackJsonp=function(c,t,f){for(var o,d,b,i=0,u=[];i<c.length;i++)d=c[i],n[d]&&u.push(n[d][0]),n[d]=0;for(o in t)Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);for(a&&a(c,t,f);u.length;)u.shift()();if(f)for(i=0;i<f.length;i++)b=r(r.s=f[i]);return b};var c={},n={32:0};function r(a){if(c[a])return c[a].exports;var n=c[a]={i:a,l:!1,exports:{}};return e[a].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.e=function(e){var a=n[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,r){a=n[e]=[c,r]});a[2]=c;var t=document.getElementsByTagName("head")[0],f=document.createElement("script");f.type="text/javascript",f.charset="utf-8",f.async=!0,f.timeout=12e4,r.nc&&f.setAttribute("nonce",r.nc),f.src=r.p+"static/js/"+e+"."+{0:"98190267cf38bff60507",1:"e1b93ebd4ec2a9059c23",2:"9640619fcf7d7c929db4",3:"58df26638cb030357eb5",4:"48c883b43c5b63aa986e",5:"5a16ce9221d1c2907c2e",6:"d1e8dd11ae8f58408628",7:"2f93acce0da6053fa131",8:"1c0441daf928f49b5dcf",9:"f955628040574bc2e0e5",10:"68b8dabcc7c32382392d",11:"1170fb743262b626bd66",12:"6a16545b78ccb72e39a4",13:"66f22b87465be2698e53",14:"827338ace5dc641cf318",15:"ce7af7704b727e7bf7a0",16:"ab119df30e35da4ca920",17:"f899bdfe3d7dfe5f01a3",18:"6a05342efef316abf90a",19:"5bc3efa2b7dcfbc4a57e",20:"15fac8cab1e0d4888cb0",21:"b2dfd26750e602ae8e41",22:"235989fdb1316a8dfef9",23:"a6be1dc4cc74f65bc091",24:"1b3fb9faa05d3dc3014a",25:"1e612ab3da018128a22e",26:"814735a5e7b2a70797c7",27:"aed1710fdee959b271f5",28:"265d9602ca90753a48c7",29:"a3529f259ff508a2d8e0"}[e]+".js";var o=setTimeout(d,12e4);function d(){f.onerror=f.onload=null,clearTimeout(o);var a=n[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),n[e]=void 0)}return f.onerror=f.onload=d,t.appendChild(f),c},r.m=e,r.c=c,r.d=function(e,a,c){r.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},r.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(a,"a",a),a},r.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},r.p="/",r.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
!function(e){var a=window.webpackJsonp;window.webpackJsonp=function(c,r,t){for(var o,d,b,i=0,u=[];i<c.length;i++)d=c[i],f[d]&&u.push(f[d][0]),f[d]=0;for(o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o]);for(a&&a(c,r,t);u.length;)u.shift()();if(t)for(i=0;i<t.length;i++)b=n(n.s=t[i]);return b};var c={},f={32:0};function n(a){if(c[a])return c[a].exports;var f=c[a]={i:a,l:!1,exports:{}};return e[a].call(f.exports,f,f.exports,n),f.l=!0,f.exports}n.e=function(e){var a=f[e];if(0===a)return new Promise(function(e){e()});if(a)return a[2];var c=new Promise(function(c,n){a=f[e]=[c,n]});a[2]=c;var r=document.getElementsByTagName("head")[0],t=document.createElement("script");t.type="text/javascript",t.charset="utf-8",t.async=!0,t.timeout=12e4,n.nc&&t.setAttribute("nonce",n.nc),t.src=n.p+"static/js/"+e+"."+{0:"d9bea98811ca5f9e3aff",1:"60cce783b3fc17c2db7a",2:"9640619fcf7d7c929db4",3:"58df26638cb030357eb5",4:"48c883b43c5b63aa986e",5:"5a16ce9221d1c2907c2e",6:"d1e8dd11ae8f58408628",7:"2f93acce0da6053fa131",8:"1c0441daf928f49b5dcf",9:"19a783ddf1e10402a683",10:"acdb7984283267cad6ca",11:"1170fb743262b626bd66",12:"90263076628b17730e0e",13:"89f4ffc60bf2ba7265ba",14:"106af90599805e193453",15:"56f1707ade34d2d720dc",16:"ab119df30e35da4ca920",17:"f899bdfe3d7dfe5f01a3",18:"6a05342efef316abf90a",19:"5bc3efa2b7dcfbc4a57e",20:"15fac8cab1e0d4888cb0",21:"b2dfd26750e602ae8e41",22:"235989fdb1316a8dfef9",23:"a6be1dc4cc74f65bc091",24:"1b3fb9faa05d3dc3014a",25:"1e612ab3da018128a22e",26:"814735a5e7b2a70797c7",27:"aed1710fdee959b271f5",28:"265d9602ca90753a48c7",29:"a3529f259ff508a2d8e0"}[e]+".js";var o=setTimeout(d,12e4);function d(){t.onerror=t.onload=null,clearTimeout(o);var a=f[e];0!==a&&(a&&a[1](new Error("Loading chunk "+e+" failed.")),f[e]=void 0)}return t.onerror=t.onload=d,r.appendChild(t),c},n.m=e,n.c=c,n.d=function(e,a,c){n.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:c})},n.n=function(e){var a=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(a,"a",a),a},n.o=function(e,a){return Object.prototype.hasOwnProperty.call(e,a)},n.p="/",n.oe=function(e){throw console.error(e),e}}([]);
\ No newline at end of file
......@@ -59,6 +59,7 @@
cover:this.dialogObj.that.cover,
type:0
};
console.log(this.form.cover)
this.imgList[0]= {name:this.dialogObj.that.cover,url:this.dialogObj.that.cover,title:'',lable:''}
}
},
......
......@@ -76,27 +76,30 @@
</template>
</el-table-column>
<el-table-column
width="200"
width="60"
v-if="!$store.state.readonly"
label="操作">
<template slot-scope="scope">
<el-popover
placement="top"
width="320">
width="400">
<div style="text-align: center">
<el-button size="mini" plain type="primary" @click="detail(scope.row)">
查看详情
</el-button>
<template v-if="!$store.state.readonly">
<el-button v-if="scope.row.status === 1" size="mini" plain type="primary" @click="onUp(scope.row)">
<el-button v-if="scope.row.status === 2 || scope.row.status === 0" size="mini" plain type="primary" @click="onUp(scope.row)">
上架
</el-button>
<el-button size="mini" v-if="scope.row.status === 0" plain type="primary" @click="onDown(scope.row)">
<el-button size="mini" v-if="scope.row.status === 1" plain type="primary" @click="onDown(scope.row)">
下架
</el-button>
<el-button size="mini" plain type="warning" @click="edit(scope.row)">
<el-button size="mini" v-if="scope.row.status === 0" plain type="warning" @click="edit(scope.row)">
编辑
</el-button>
<el-button size="mini" plain @click="copyUrl(scope.row.id)">
商品链接
</el-button>
<el-button size="mini" plain type="danger" @click="onDel(scope.row)">
删除
</el-button>
......@@ -104,7 +107,6 @@
</div>
<el-button slot="reference" size="mini" type="text" >操作</el-button>
</el-popover>
</template>
</el-table-column>
</el-table>
......@@ -163,6 +165,18 @@
this.nowPage = val
this.getUser()
},
copyUrl(data){
let url = `${process.env.INVITE_URL}/#/buyDetail?shopId=${data}`;
let oInput = document.createElement('input');
oInput.value = url;
document.body.appendChild(oInput);
oInput.select(); // 选择对象
document.execCommand("Copy"); // 执行浏览器复制命令
this.$message({
message: '已成功复制到剪切板',
type: 'success'
});
},
getUser(){
let json = {
limit: this.limit,
......
......@@ -35,6 +35,9 @@ axios.interceptors.request.use(
if(reg.test(json[k])){
json[k]= Number(json[k])
}
if(json[k] === null){
json[k] = ''
}
json[k] = md5(json[k].toString())
}
json.sing = "singsingenglish21000";
......@@ -49,6 +52,9 @@ axios.interceptors.request.use(
if(reg.test(json2[k])){
json2[k]= Number(json2[k])
}
if(json2[k] === null){
json2[k] = ''
}
json2[k] = md5(json2[k].toString())
}
json2.sing = "singsingenglish21000";
......
......@@ -21,8 +21,9 @@ export const ISORNOT = {
'1':'是'
};
export const GOODSSTATUS = {
'0':'在售',
'1':'下架'
'0':'编辑中',
'1':'在售',
'2':'下架'
};
export const WEEKDAY = {
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