webpackJsonp([23],{CCn6:function(t,e,n){"use strict";var a=n("7+uW"),o=n("//Fk"),i=n.n(o),r=n("mvHQ"),c=n.n(r),u=n("mtWM"),l=n.n(u),s=n("NC6I"),p=n.n(s),h=(n("IcnI"),n("Au9i")),f=n("YaEn");n("zSLJ");l.a.defaults.timeout=5e4,l.a.defaults.baseURL="",l.a.interceptors.request.use(function(t){var e=localStorage.getItem("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(c()(t.params));for(var a in n)null===n[a]&&(n[a]=""),"string"==typeof n[a]&&(t.params[a]=t.params[a].replace(/(^\s*)|(\s*$)/g,""),n[a]=n[a].replace(/(^\s*)|(\s*$)/g,"")),n[a]=p()(n[a].toString());n.sing="singsingenglish21000",t.params.param_token=p()(c()(n))}else if("/api/admin/login"!==t.url){t.data=t.data||{};var o=JSON.parse(c()(t.data));for(var i in o)null===o[i]&&(o[i]=""),"string"==typeof o[i]&&(t.data[i]=t.data[i].replace(/(^\s*)|(\s*$)/g,""),o[i]=o[i].replace(/(^\s*)|(\s*$)/g,"")),o[i]=p()(o[i].toString());o.sing="singsingenglish21000",t.data.param_token=p()(c()(o))}return t},function(t){return i.a.reject(t)}),l.a.interceptors.response.use(function(t){return 501===t.data.code&&f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}}),t},function(t){return i.a.reject(t)}),n.d(e,"d",function(){return d}),n.d(e,"C",function(){return m}),n.d(e,"g",function(){return g}),n.d(e,"x",function(){return y}),n.d(e,"D",function(){return w}),n.d(e,"E",function(){return v}),n.d(e,"A",function(){return b}),n.d(e,"n",function(){return _}),n.d(e,"f",function(){return $}),n.d(e,"m",function(){return k}),n.d(e,"z",function(){return S}),n.d(e,"G",function(){return P}),n.d(e,"i",function(){return I}),n.d(e,"p",function(){return O}),n.d(e,"q",function(){return x}),n.d(e,"B",function(){return T}),n.d(e,"w",function(){return U}),n.d(e,"o",function(){return M}),n.d(e,"v",function(){return N}),n.d(e,"e",function(){return A}),n.d(e,"h",function(){return L}),n.d(e,"l",function(){return j}),n.d(e,"k",function(){return E}),n.d(e,"F",function(){return R}),n.d(e,"b",function(){return q}),n.d(e,"j",function(){return C}),n.d(e,"s",function(){return W}),n.d(e,"y",function(){return G}),n.d(e,"a",function(){return z}),n.d(e,"c",function(){return F}),n.d(e,"r",function(){return Y}),n.d(e,"t",function(){return D}),n.d(e,"u",function(){return H});a.default.prototype.$post=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.a(function(n,a){l.a.post(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?(a(t.data),f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}})):503===t.data.code?a(t.data):(a(t.data),Object(h.Toast)(t.data.msg))},function(t){a(t)})})},a.default.prototype.$fetch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.a(function(n,a){l.a.get(t,{params:e}).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?(a(t.data),f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}})):503===t.data.code?a(t.data):(a(t.data),Object(h.Toast)(t.data.msg))}).catch(function(t){a(t)})})},a.default.prototype.$patch=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.a(function(n,a){l.a.patch(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?(a(t.data),f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}})):503===t.data.code?a(t.data):(a(t.data),Object(h.Toast)(t.data.msg))},function(t){a(t)})})},a.default.prototype.$put=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.a(function(n,a){l.a.put(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?(a(t.data),f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}})):503===t.data.code?a(t.data):(a(t.data),Object(h.Toast)(t.data.msg))},function(t){a(t)})})},a.default.prototype.$del=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new i.a(function(n,a){l.a.delete(t,e).then(function(t){200===t.data.code?n(t.data.data):501===t.data.code?(a(t.data),f.a.push({name:"author",query:{retUrl:window.location.href.split("#")[1]||"",is_new_user_url:1}})):503===t.data.code?a(t.data):(a(t.data),Object(h.Toast)(t.data.msg))},function(t){a(t)})})},a.default.prototype.$upload=function(t,e){return new i.a(function(n,a){var o=parseInt(Number(e.file.size)/Number(10485760)+1),i=0;!function r(){var c=new FormData,u=e.file.slice(1024*i*1024*10,1024*(i+1)*1024*10);c.append("chunk",i),c.append("file_name",e.file.name),c.append("count",o),c.append("type",e.type),c.append("file",u),l.a.post(t,c,{headers:{"Content-Type":"multipart/form-data"},timeout:1e7,onUploadProgress:function(t){}}).then(function(t){200===t.data.code?i+1"}),Array.prototype.find||(Array.prototype.find=function(t){if(null==this)throw new TypeError("Array.prototype.find called on null or undefined");if("function"!=typeof t)throw new TypeError("predicate must be a function");for(var e,n=Object(this),a=n.length>>>0,o=arguments[1],i=0;i-1,presto:t.indexOf("Presto")>-1,webKit:t.indexOf("AppleWebKit")>-1,gecko:t.indexOf("Gecko")>-1&&-1===t.indexOf("KHTML"),mobile:!!t.match(/AppleWebKit.*Mobile.*/),ios:!!t.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),android:t.indexOf("Android")>-1||t.indexOf("Linux")>-1,iPhone:t.indexOf("iPhone")>-1,iPad:t.indexOf("iPad")>-1,webApp:-1==t.indexOf("Safari")}}(),language:(navigator.browserLanguage||navigator.language).toLowerCase()},p=window.navigator.userAgent.toLowerCase(),h=new r.a({routes:[{path:"/",name:"index",component:function(t){return Promise.all([n.e(0),n.e(12)]).then(function(){var e=[n("dAjm")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:0}},{path:"/newLesson",name:"newLesson",component:function(t){return Promise.all([n.e(0),n.e(1)]).then(function(){var e=[n("4t0V")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:0}},{path:"/shareGoods",name:"shareGoods",component:function(t){return n.e(8).then(function(){var e=[n("54Ry")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:0}},{path:"/myGoodsList",name:"myGoodsList",component:function(t){return Promise.all([n.e(0),n.e(21)]).then(function(){var e=[n("P3Wy")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:1}},{path:"/mine",name:"mine",component:function(t){return Promise.all([n.e(0),n.e(20)]).then(function(){var e=[n("U/b5")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:1}},{path:"/order",name:"order",component:function(t){return Promise.all([n.e(0),n.e(15)]).then(function(){var e=[n("R7Pr")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:2}},{path:"/share",name:"share",component:function(t){return Promise.all([n.e(0),n.e(16)]).then(function(){var e=[n("Eg0l")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:2}},{path:"/author",name:"author",component:function(t){return n.e(14).then(function(){var e=[n("sA+T")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:100,noNew:!0}},{path:"/buyDetail",name:"buyDetail",component:function(t){return Promise.all([n.e(0),n.e(10)]).then(function(){var e=[n("bNYG")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!0,noNew:!0,deep:10}},{path:"/buy",name:"buy",component:function(t){return Promise.all([n.e(0),n.e(6)]).then(function(){var e=[n("Y1ei")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{noNew:!0,deep:11}},{path:"/success",name:"success",component:function(t){return Promise.all([n.e(0),n.e(7)]).then(function(){var e=[n("IF8E")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{noNew:!0,deep:12}},{path:"/buySuccess",name:"buySuccess",component:function(t){return Promise.all([n.e(0),n.e(17)]).then(function(){var e=[n("w9eS")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{noNew:!0,deep:12}},{path:"/map",name:"map",component:function(t){return Promise.all([n.e(0),n.e(3)]).then(function(){var e=[n("3QU7")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:3}},{path:"/saleSuccess",name:"saleSuccess",component:function(t){return n.e(13).then(function(){var e=[n("wSE2")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:4}},{path:"/bindMobile",name:"bindMobile",component:function(t){return n.e(11).then(function(){var e=[n("/Vxk")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{deep:0}},{path:"/activity",name:"activity",component:function(t){return Promise.all([n.e(0),n.e(4)]).then(function(){var e=[n("yYpN")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!0}},{path:"/activityInvite",name:"activityInvite",component:function(t){return Promise.all([n.e(0),n.e(5)]).then(function(){var e=[n("aRHX")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!0}},{path:"/inviteList",name:"inviteList",component:function(t){return n.e(9).then(function(){var e=[n("eZU3")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!0}},{path:"/collection",name:"collection",component:function(t){return Promise.all([n.e(0),n.e(2)]).then(function(){var e=[n("PTpu")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!0}},{path:"/noWechat",name:"noWechat",component:function(t){return n.e(19).then(function(){var e=[n("nmbt")];t.apply(null,e)}.bind(this)).catch(n.oe)},meta:{skip_login:!1}},{path:"*",component:function(t){return Promise.all([n.e(0),n.e(18)]).then(function(){var e=[n("Zazt")];t.apply(null,e)}.bind(this)).catch(n.oe)}}]});h.beforeEach(function(t,e,n){a.default.nextTick(function(){u.a.quick("autoTrackSinglePage")}),"micromessenger"==p.match(/MicroMessenger/i)||"_sq_"==p.match(/_SQ_/i)?"noWechat"==t.name&&n({name:"index"}):"noWechat"!==t.name&&n({name:"noWechat"}),o.a.dispatch("isMobile",s.versions.mobile),document.title="唱唱启蒙英语";var r=function(){if(localStorage.getItem("retUrl")&&null!==localStorage.getItem("retUrl")&&""!==localStorage.getItem("retUrl")){var t=localStorage.getItem("retUrl").toString();localStorage.removeItem("retUrl"),n(t)}else n()};if("author"===t.name||"bindMobile"===t.name||"noWechat"===t.name)n();else if(window.location.href.indexOf("token")>-1){var c=i.a.getUrlParam().token||t.query.token;o.a.dispatch("setToken",c),Object(l.z)().then(function(t){localStorage.setItem("userId",t.user_id),u.a.login(t.user_id)}),r()}else if(localStorage.getItem("cc_token"))o.a.dispatch("setToken",localStorage.getItem("cc_token")),localStorage.getItem("userId")?u.a.login(localStorage.getItem("userId")):Object(l.z)().then(function(t){localStorage.setItem("userId",t.user_id),u.a.login(t.user_id)}),r();else if(t.meta.skip_login)r();else{var h={retUrl:t.fullPath};t.meta.noNew&&(h.is_new_user_url=1),n({name:"author",query:h})}}),e.a=h},"d8/S":function(t,e){},"sf/l":function(t,e,n){"use strict";e.a={dateFmt:function(t,e){var n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};for(var a in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length))),n)new RegExp("("+a+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[a]:("00"+n[a]).substr((""+n[a]).length)));return e},getUrlParam:function(){var t=location.search,e=new Object;if(-1!=t.indexOf("?"))for(var n=t.substr(1).split("&"),a=0;a