webpackJsonp([22],{CCn6:function(t,e,n){"use strict";var a=n("7+uW"),o=n("//Fk"),i=n.n(o),r=n("mvHQ"),u=n.n(r),c=n("mtWM"),l=n.n(c),s=n("NC6I"),p=n.n(s),d=(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(u()(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()(u()(n))}else if("/api/admin/login"!==t.url){t.data=t.data||{};var o=JSON.parse(u()(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()(u()(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 h}),n.d(e,"y",function(){return m}),n.d(e,"g",function(){return g}),n.d(e,"u",function(){return A}),n.d(e,"z",function(){return v}),n.d(e,"A",function(){return y}),n.d(e,"x",function(){return w}),n.d(e,"n",function(){return b}),n.d(e,"f",function(){return _}),n.d(e,"m",function(){return C}),n.d(e,"w",function(){return $}),n.d(e,"C",function(){return k}),n.d(e,"i",function(){return S}),n.d(e,"p",function(){return I}),n.d(e,"q",function(){return P}),n.d(e,"t",function(){return E}),n.d(e,"o",function(){return x}),n.d(e,"s",function(){return O}),n.d(e,"e",function(){return M}),n.d(e,"h",function(){return T}),n.d(e,"l",function(){return U}),n.d(e,"k",function(){return j}),n.d(e,"B",function(){return N}),n.d(e,"b",function(){return H}),n.d(e,"j",function(){return L}),n.d(e,"r",function(){return q}),n.d(e,"v",function(){return R}),n.d(e,"a",function(){return F}),n.d(e,"c",function(){return W});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(d.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(d.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(d.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(d.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(d.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 u=new FormData,c=e.file.slice(1024*i*1024*10,1024*(i+1)*1024*10);u.append("chunk",i),u.append("file_name",e.file.name),u.append("count",o),u.append("type",e.type),u.append("file",c),l.a.post(t,u,{headers:{"Content-Type":"multipart/form-data"},timeout:1e7,onUploadProgress:function(t){}}).then(function(t){200===t.data.code?i+1<o?(i++,r()):(i=0,n(t.data.data)):Object(d.Toast)(t.data.msg)}).catch(function(t){d.Indicator.close(),a(t)})}()})},a.default.prototype.$ret2=function(t){return new i.a(function(e,n){l.a.get(t).then(function(t){e(t.data)}).catch(function(t){n(t)})})};var h=function(){return a.default.prototype.$fetch("/api/client/banner/list")},m=function(t){return a.default.prototype.$fetch("/api/client/jssdk",t)},g=function(t){return a.default.prototype.$fetch("/api/client/goods/info/"+t)},A=function(){return a.default.prototype.$fetch("/api/client/address/info")},v=function(t){return a.default.prototype.$fetch("/api/client/bill/wechat/pay",t)},y=function(t){return a.default.prototype.$post("/api/client/address/save",t)},w=function(){return a.default.prototype.$fetch("/api/client/user/course/list")},b=function(t,e){return a.default.prototype.$fetch("/api/client/course/category/list/"+t,e)},_=function(t){return a.default.prototype.$fetch("/api/client/course/relation/list/"+t)},C=function(t,e,n){return a.default.prototype.$fetch("/api/client/element/info/"+t+"/"+e+"/"+n)},$=function(){return a.default.prototype.$fetch("/api/client/me")},k=function(t,e,n,o){return a.default.prototype.$post("/api/client/user/watch/log/"+t+"/"+e+"/"+n,o)},S=function(t){return a.default.prototype.$fetch("/api/client/group/info/"+t)},I=function(t){return a.default.prototype.$fetch("/api/client/order/info/"+t)},P=function(t){return a.default.prototype.$fetch("/api/client/order/list",t)},E=function(){return a.default.prototype.$fetch("/api/client/me/teacher")},x=function(){return a.default.prototype.$fetch("/api/client/new/user/direct")},O=function(t){return a.default.prototype.$fetch("/api/client/bill/wechat/status",t)},M=function(t){return a.default.prototype.$fetch("/api/client/user/coupon/list",{goods_id:t})},T=function(t){return a.default.prototype.$fetch("/api/client/goods/list",t)},U=function(t){return a.default.prototype.$fetch("/api/client/user/invite/earnings",t)},j=function(t){return a.default.prototype.$fetch("/api/client/user/invite/list",t)},N=function(t){return a.default.prototype.$post("/api/client/mobile/code",t)},H=function(t){return a.default.prototype.$put("/api/client/user/mobile/bind",t)},L=function(t){return a.default.prototype.$fetch("/api/client/user/bootPage",t)},q=function(t){return a.default.prototype.$fetch("/api/client/redirect",t)},R=function(t){return a.default.prototype.$fetch("/api/client/user/collect",t)},F=function(t){return a.default.prototype.$post("/api/client/user/collect",t)},W=function(t){return a.default.prototype.$put("/api/client/user/collect/"+t)}},GHGh:function(t,e,n){var a=n("z/+d");"string"==typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);n("rjj0")("64033dd0",a,!1,{})},IcnI:function(t,e,n){"use strict";var a=n("7+uW"),o=n("NYxO"),i=(n("zSLJ"),{setToken:function(t,e){t.token=e,localStorage.setItem("cc_token",e)},transitionGo:function(t){t.transitionName="slide-left"},transitionBack:function(t){t.transitionName="slide-right"},isMobile:function(t,e){t.isMobile=e}});a.default.use(o.a);e.a=new o.a.Store({state:{token:"",transitionName:"slide-left",isMobile:!1},mutations:i,actions:{setToken:function(t,e){(0,t.commit)("setToken",e)},isMobile:function(t,e){(0,t.commit)("isMobile",e)}}})},NHnr:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a=n("7+uW"),o=function(){var t=this.$createElement,e=this._self._c||t;return e("div",{attrs:{id:"app"}},[e("transition",{attrs:{name:"fade"}},[e("router-view",{staticClass:"child-view"})],1)],1)};o._withStripped=!0;var i={render:o,staticRenderFns:[]},r=i;var u=!1;var c=n("VU/8")({name:"App",mounted:function(){}},r,!1,function(t){u||n("GHGh")},null,null);c.options.__file="src/App.vue";var l=c.exports,s=n("YaEn"),p=n("IcnI"),d=n("Au9i"),f=n.n(d),h=n("KPKd"),m=n.n(h),g=n("fk8Z"),A=n.n(g);n("d8/S");a.default.config.productionTip=!1,a.default.prototype.$sa=A.a,a.default.prototype.$sa.init({server_url:"http://47.107.250.38:8106/sa?project=default",heatmap:{clickmap:"default",show_log:!0,scroll_notice_map:"default"}}),a.default.use(f.a),a.default.use(m.a),new a.default({el:"#app",router:s.a,store:p.a,components:{App:l},template:"<App/>"}),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<a;i++)if(e=n[i],t.call(o,e,i,n))return e})},YaEn:function(t,e,n){"use strict";var a=n("7+uW"),o=n("IcnI"),i=n("sf/l"),r=n("/ocq"),u=n("fk8Z"),c=n.n(u),l=n("CCn6");a.default.use(r.a);var s={versions:function(){var t=navigator.userAgent;navigator.appVersion;return{trident:t.indexOf("Trident")>-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(),d=new r.a({routes:[{path:"/",name:"index",component:function(t){return Promise.all([n.e(0),n.e(11)]).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:"/myGoodsList",name:"myGoodsList",component:function(t){return Promise.all([n.e(0),n.e(17)]).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(15)]).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 n.e(10).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(20)]).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(9)]).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(18)]).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(5)]).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(12).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(3)]).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(4)]).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(8).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(16)]).then(function(){var e=[n("Zazt")];t.apply(null,e)}.bind(this)).catch(n.oe)}}]});d.beforeEach(function(t,e,n){a.default.nextTick(function(){c.a.quick("autoTrackSinglePage")}),"micromessenger"==p.match(/MicroMessenger/i)||"_sq_"==p.match(/_SQ_/i)?"noWechat"==t.name&&n({name:"index"}):t.name,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 u=i.a.getUrlParam().token||t.query.token;o.a.dispatch("setToken",u),Object(l.w)().then(function(t){localStorage.setItem("userId",t.user_id),c.a.login(t.user_id)}),r()}else if(localStorage.getItem("cc_token"))o.a.dispatch("setToken",localStorage.getItem("cc_token")),localStorage.getItem("userId")?c.a.login(localStorage.getItem("userId")):Object(l.w)().then(function(t){localStorage.setItem("userId",t.user_id),c.a.login(t.user_id)}),r();else if(t.meta.skip_login)r();else{var d={retUrl:t.fullPath};t.meta.noNew&&(d.is_new_user_url=1),n({name:"author",query:d})}}),e.a=d},"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<n.length;a++)e[n[a].split("=")[0]]=unescape(n[a].split("=")[1]);return e},toDataURL:function(t,e){var n=new XMLHttpRequest;n.onload=function(){var t=new FileReader;t.onloadend=function(){e(t.result)},t.readAsDataURL(n.response)},n.responseType="blob",n.open("GET",t,!0),n.send()}}},"z/+d":function(t,e,n){(t.exports=n("FZ+f")(!0)).push([t.i,'\n#app {\n overflow: auto;\n -webkit-overflow-scrolling:touch;\n font-family: "Helvetica Neue",\n Helvetica,\n "PingFang SC",\n "Hiragino Sans GB",\n "Microsoft YaHei",\n "\\5FAE\\8F6F\\96C5\\9ED1",\n Arial,\n sans-serif;\n}\nhtml,body,#app{\n width: 100%;\n overflow: auto;\n}\n*{\n margin: auto;\n padding: auto;\n}\n.child-view {\n position: relative;\n width: 100%;\n min-height: 100vh;\n -webkit-transition: all .5s;\n transition: all .5s;\n}\n.fade-enter-active, .fade-leave-active {\n -webkit-transition: opacity .5s;\n transition: opacity .5s;\n}\n.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {\n opacity: 0;\n}\n',"",{version:3,sources:["D:/myproject/new-singsingH5/src/src/App.vue"],names:[],mappings:";AAiBA;EACA,eAAA;EACA,iCAAA;EACA;;;;;;;aAOA;CACA;AACA;IACA,YAAA;IACA,eAAA;CACA;AACA;IACA,aAAA;IACA,cAAA;CACA;AACA;EACA,mBAAA;EACA,YAAA;EACA,kBAAA;EACA,4BAAA;EAAA,oBAAA;CACA;AACA;EACA,gCAAA;EAAA,wBAAA;CACA;AACA;EACA,WAAA;CACA",file:"App.vue",sourcesContent:['<template>\n <div id="app">\n <transition name="fade">\n <router-view class="child-view"/>\n </transition>\n </div>\n</template>\n\n<script>\nexport default {\n name: \'App\',\n mounted(){\n },\n}\n<\/script>\n\n<style>\n#app {\n overflow: auto;\n -webkit-overflow-scrolling:touch;\n font-family: "Helvetica Neue",\n Helvetica,\n "PingFang SC",\n "Hiragino Sans GB",\n "Microsoft YaHei",\n "微软雅黑",\n Arial,\n sans-serif;\n}\n html,body,#app{\n width: 100%;\n overflow: auto;\n }\n *{\n margin: auto;\n padding: auto;\n }\n.child-view {\n position: relative;\n width: 100%;\n min-height: 100vh;\n transition: all .5s;\n}\n.fade-enter-active, .fade-leave-active {\n transition: opacity .5s;\n}\n.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {\n opacity: 0;\n}\n</style>\n'],sourceRoot:""}])},zSLJ:function(t,e,n){"use strict"}},["NHnr"]); //# sourceMappingURL=app.5e874749ecfb28c2677d.js.map