Account~AppLogin~AppRegister~AppSetInfo~ClassDetail~CourseApply~CourseDetail~ExchangeRecord~HelpCent~99ca2482.0c4b379b.js 14 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["Account~AppLogin~AppRegister~AppSetInfo~ClassDetail~CourseApply~CourseDetail~ExchangeRecord~HelpCent~99ca2482"],{"2b7c":function(e,t,r){"use strict";r("433b");var n=r("d399"),o=r("4328"),i=r.n(o),a=r("bc3a"),s=r.n(a),u=r("e3eb"),c=r.n(u),f=r("f0a4"),l=r("3908");function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(r,!0).forEach(function(t){d(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(r).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var g=s.a.create({baseURL:"/api-teacher"});g.interceptors.request.use(function(e){!0!==e.hideLoading&&Object(l["a"])(!0),e.data=c()(e.data),e.params=c()(e.params),"POST"===e.method.toLocaleUpperCase()&&"form"===e.requestType&&(e.data=i.a.stringify(e.data));var t=f["sessionStorage"].get("token")||localStorage.getItem("Authorization")||localStorage.getItem("userInfo");return"/api-auth"!==e.baseURL&&t&&(e.headers=p({},e.headers,{Authorization:t})),e}),g.interceptors.response.use(function(e){return!0!==e.config.hideLoading&&Object(l["a"])(!1),e.status>200||e.status<200?(!0!==e.config.hint&&Object(n["a"])(e.data.msg||"接口返回错误"),Promise.reject("网络错误")):200===e.data.code?e.data:100==e.data.code||201==e.data.code?e.data:(!0!==e.config.hint&&Object(n["a"])(e.data.msg||"接口返回错误"),Promise.reject(e.data))},function(){Object(l["a"])(!1)}),t["a"]=g},3908:function(e,t,r){"use strict";r.d(t,"a",function(){return o});r("433b");var n=r("d399");function o(e){e?n["a"].loading({duration:0,forbidClick:!0,message:"加载中..."}):n["a"].clear()}},"981f":function(e,t,r){"use strict";r.r(t);var n=r("bc3a"),o=r.n(n),i=r("ff51"),a={},s=o.a.create(a);s.interceptors.request.use(function(e){if(Object(i["b"])().android||Object(i["b"])().iPhone){var t=decodeURI(localStorage.getItem("Authorization"));t&&(e.headers["Authorization"]=t)}else{var r=decodeURI(localStorage.getItem("userInfo"));r&&(e.headers["Authorization"]=r)}return e},function(e){return Promise.reject(e)}),s.interceptors.response.use(function(e){return 403==e.data.code&&(window.localStorage.removeItem("userInfo"),window.localStorage.removeItem("Authorization"),Object(i["b"])().android?DAYA.postMessage(JSON.stringify({api:"login"})):Object(i["b"])().iPhone&&window.webkit.messageHandlers.DAYA.postMessage(JSON.stringify({api:"login"}))),e},function(e){return Promise.reject(e)}),t["default"]=s},b562:function(e,t,r){"use strict";r.d(t,"m",function(){return u}),r.d(t,"t",function(){return c}),r.d(t,"s",function(){return f}),r.d(t,"n",function(){return l}),r.d(t,"r",function(){return h}),r.d(t,"e",function(){return d}),r.d(t,"b",function(){return g}),r.d(t,"c",function(){return m}),r.d(t,"o",function(){return w}),r.d(t,"j",function(){return y}),r.d(t,"g",function(){return O}),r.d(t,"h",function(){return A}),r.d(t,"p",function(){return S}),r.d(t,"q",function(){return v}),r.d(t,"l",function(){return I}),r.d(t,"d",function(){return b}),r.d(t,"i",function(){return _}),r.d(t,"f",function(){return k}),r.d(t,"a",function(){return P}),r.d(t,"k",function(){return p});var n=r("4328"),o=r.n(n),i=r("2b7c"),a=r("981f").default,s="/api-teacher",u=function(e){return Object(i["a"])({url:"/code/sendSms",method:"post",requestType:"form",data:e})},c=function(e){return Object(i["a"])({url:"/code/verifyLoginImage",method:"post",requestType:"form",data:e})},f=function(e){return a({url:"/api-auth/usernameLogin",method:"post",data:o.a.stringify(e)})},l=function(e){return a({url:"/api-auth/smsLogin",method:"post",data:o.a.stringify(e)})},h=function(e){return a({url:"/api-auth/user/setPassword",method:"post",data:o.a.stringify(e)})},p=function(e){return a({url:"/api-auth/user/noAuth/queryUserByPhone",method:"get",params:e})},d=function(e){return a({url:"/api-student/courseGroup/getGroupDetail",method:"get",params:e})},g=function(e){return a({url:"/api-student/courseGroup/buyCourseGroup",method:"post",data:o.a.stringify(e)})},m=function(e){return a({url:s+"/courseGroup/createCourseGroup",method:"post",data:e})},w=function(e){return a({url:s+"/sysTenantAccount/get",method:"get",params:e})},y=function(e){return a({url:s+"/sysTenantAccount/queryTenantAccountDetail",method:"get",params:e})},S=function(e){return a({url:s+"/teacherCourseSchedule/teacherCourseMinutes",method:"get",params:e})},v=function(e){return a({url:s+"/tenantEntryActivities/queryPage",method:"get",params:e})},b=function(e){return a({url:s+"/tenantPaymentOrder/createOrder",method:"post",data:o.a.stringify(e)})},_=function(e){return a({url:s+"/teacherOrder/queryByOrderNo",method:"get",params:e})},O=function(e){return a({url:"/api-cms/helpCenterCatalog/list",method:"get",params:e})},A=function(e){return a({url:"/api-cms/helpCenterContent/list",method:"get",params:e})},I=function(e){return a({url:"/api-auth/queryUserInfo",method:"get",params:e})},k=function(e){return a({url:s+"/courseReview/getStuAndTeaReview",method:"get",params:e})},P=function(e){return a({url:s+"/courseReview/batchAdd",method:"post",data:e})}},f0a4:function(e,t,r){var n,o;(function(i){var a=!1;if(n=i,o="function"===typeof n?n.call(t,r,t,e):n,void 0===o||(e.exports=o),a=!0,e.exports=i(),a=!0,!a){var s=window.Storages,u=window.Storages=i();u.noConflict=function(){return window.Storages=s,u}}})(function(){var e={},t=e.toString,r=e.hasOwnProperty,n=r.toString,o=n.call(Object),i=Object.getPrototypeOf,a={},s="ls_",u="ss_";function c(){var e,t,r,n,o,i=this._type,a=arguments.length,s=window[i],u=arguments,c=u[0];if(a<1)throw new Error("Minimum 1 argument must be given");if(Array.isArray(c)){for(n in t={},c)if(c.hasOwnProperty(n)){e=c[n];try{t[e]=JSON.parse(s.getItem(e))}catch(f){t[e]=s.getItem(e)}}return t}if(1!=a){try{if(t=JSON.parse(s.getItem(c)),!t)throw new ReferenceError(c+" is not defined in this storage")}catch(f){throw new ReferenceError(c+" is not defined in this storage")}for(n=1;n<a-1;n++)if(t=t[u[n]],void 0===t)throw new ReferenceError([].slice.call(u,0,n+1).join(".")+" is not defined in this storage");if(Array.isArray(u[n])){for(o in r=t,t={},u[n])u[n].hasOwnProperty(o)&&(t[u[n][o]]=r[u[n][o]]);return t}return t[u[n]]}try{return JSON.parse(s.getItem(c))}catch(f){return s.getItem(c)}}function f(){var e,t,r,n,o=this._type,i=arguments.length,a=window[o],s=arguments,u=s[0],c=s[1],f=isNaN(c)?{}:[];if(i<1||!y(u)&&i<2)throw new Error("Minimum 2 arguments must be given or first parameter must be an object");if(y(u)){for(n in u)u.hasOwnProperty(n)&&(e=u[n],y(e)||this.alwaysUseJson?a.setItem(n,JSON.stringify(e)):a.setItem(n,e));return u}if(2==i)return"object"===typeof c||this.alwaysUseJson?a.setItem(u,JSON.stringify(c)):a.setItem(u,c),c;try{r=a.getItem(u),null!=r&&(f=JSON.parse(r))}catch(l){}for(r=f,n=1;n<i-2;n++)e=s[n],t=isNaN(s[n+1])?"object":"array",(!r[e]||"object"==t&&!y(r[e])||"array"==t&&!Array.isArray(r[e]))&&(r[e]="array"==t?[]:{}),r=r[e];return r[s[n]]=s[n+1],a.setItem(u,JSON.stringify(f)),f}function l(){var e,t,r,n,o=this._type,i=arguments.length,a=window[o],s=arguments,u=s[0];if(i<1)throw new Error("Minimum 1 argument must be given");if(Array.isArray(u)){for(r in u)u.hasOwnProperty(r)&&a.removeItem(u[r]);return!0}if(1==i)return a.removeItem(u),!0;try{e=t=JSON.parse(a.getItem(u))}catch(c){throw new ReferenceError(u+" is not defined in this storage")}for(r=1;r<i-1;r++)if(t=t[s[r]],void 0===t)throw new ReferenceError([].slice.call(s,1,r).join(".")+" is not defined in this storage");if(Array.isArray(s[r]))for(n in s[r])s[r].hasOwnProperty(n)&&delete t[s[r][n]];else delete t[s[r]];return a.setItem(u,JSON.stringify(e)),!0}function h(e){var t,r=g.call(this);for(t in r)r.hasOwnProperty(t)&&l.call(this,r[t]);if(e)for(t in a.namespaceStorages)a.namespaceStorages.hasOwnProperty(t)&&m(t)}function p(){var e,t=arguments.length,r=arguments,n=r[0];if(0==t)return 0==g.call(this).length;if(Array.isArray(n)){for(e=0;e<n.length;e++)if(!p.call(this,n[e]))return!1;return!0}try{var o=c.apply(this,arguments);for(e in Array.isArray(r[t-1])||(o={totest:o}),o)if(o.hasOwnProperty(e)&&!(y(o[e])&&S(o[e])||Array.isArray(o[e])&&!o[e].length||"boolean"!==typeof o[e]&&!o[e]))return!1;return!0}catch(i){return!0}}function d(){var e,t=arguments.length,r=arguments,n=r[0];if(t<1)throw new Error("Minimum 1 argument must be given");if(Array.isArray(n)){for(e=0;e<n.length;e++)if(!d.call(this,n[e]))return!1;return!0}try{var o=c.apply(this,arguments);for(e in Array.isArray(r[t-1])||(o={totest:o}),o)if(o.hasOwnProperty(e)&&(void 0===o[e]||null===o[e]))return!1;return!0}catch(i){return!1}}function g(){var e=this._type,t=arguments.length,r=window[e],n=[],o={};if(o=t>0?c.apply(this,arguments):r,o&&o._cookie){var i=Cookies.get();for(var a in i)i.hasOwnProperty(a)&&""!=a&&n.push(a.replace(o._prefix,""))}else for(var s in o)o.hasOwnProperty(s)&&n.push(s);return n}function m(e){if(!e||"string"!=typeof e)throw new Error("First parameter must be a string");b?(window.localStorage.getItem(e)||window.localStorage.setItem(e,"{}"),window.sessionStorage.getItem(e)||window.sessionStorage.setItem(e,"{}")):(window.localCookieStorage.getItem(e)||window.localCookieStorage.setItem(e,"{}"),window.sessionCookieStorage.getItem(e)||window.sessionCookieStorage.setItem(e,"{}"));var t={localStorage:v({},a.localStorage,{_ns:e}),sessionStorage:v({},a.sessionStorage,{_ns:e})};return _&&(window.cookieStorage.getItem(e)||window.cookieStorage.setItem(e,"{}"),t.cookieStorage=v({},a.cookieStorage,{_ns:e})),a.namespaceStorages[e]=t,t}function w(e){var t="jsapi";try{return!!window[e]&&(window[e].setItem(t,t),window[e].removeItem(t),!0)}catch(r){return!1}}function y(e){var a,s;return!(!e||"[object Object]"!==t.call(e))&&(a=i(e),!a||(s=r.call(a,"constructor")&&a.constructor,"function"===typeof s&&n.call(s)===o))}function S(e){var t;for(t in e)return!1;return!0}function v(){for(var e=1,t=arguments[0];e<arguments.length;e++){var r=arguments[e];for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])}return t}var b=w("localStorage"),_="undefined"!==typeof Cookies,O={_type:"",_ns:"",_callMethod:function(e,t){t=Array.prototype.slice.call(t);var r=[],n=t[0];return this._ns&&r.push(this._ns),"string"===typeof n&&-1!==n.indexOf(".")&&(t.shift(),[].unshift.apply(t,n.split("."))),[].push.apply(r,t),e.apply(this,r)},alwaysUseJson:!1,get:function(){return b||_?this._callMethod(c,arguments):null},set:function(){var e=arguments.length,t=arguments,r=t[0];if(e<1||!y(r)&&e<2)throw new Error("Minimum 2 arguments must be given or first parameter must be an object");if(!b&&!_)return null;if(y(r)&&this._ns){for(var n in r)r.hasOwnProperty(n)&&this._callMethod(f,[n,r[n]]);return r}var o=this._callMethod(f,t);return this._ns?o[r.split(".")[0]]:o},remove:function(){if(arguments.length<1)throw new Error("Minimum 1 argument must be given");return b||_?this._callMethod(l,arguments):null},removeAll:function(e){return b||_?this._ns?(this._callMethod(f,[{}]),!0):this._callMethod(h,[e]):null},isEmpty:function(){return b||_?this._callMethod(p,arguments):null},isSet:function(){if(arguments.length<1)throw new Error("Minimum 1 argument must be given");return b||_?this._callMethod(d,arguments):null},keys:function(){return b||_?this._callMethod(g,arguments):null}};if(_){window.name||(window.name=Math.floor(1e8*Math.random()));var A={_cookie:!0,_prefix:"",_expires:null,_path:null,_domain:null,_secure:!1,setItem:function(e,t){Cookies.set(this._prefix+e,t,{expires:this._expires,path:this._path,domain:this._domain,secure:this._secure})},getItem:function(e){return Cookies.get(this._prefix+e)},removeItem:function(e){return Cookies.remove(this._prefix+e,{path:this._path})},clear:function(){var e=Cookies.get();for(var t in e)e.hasOwnProperty(t)&&""!=t&&(!this._prefix&&-1===t.indexOf(s)&&-1===t.indexOf(u)||this._prefix&&0===t.indexOf(this._prefix))&&Cookies.remove(t)},setExpires:function(e){return this._expires=e,this},setPath:function(e){return this._path=e,this},setDomain:function(e){return this._domain=e,this},setSecure:function(e){return this._secure=e,this},setConf:function(e){return e.path&&(this._path=e.path),e.domain&&(this._domain=e.domain),e.secure&&(this._secure=e.secure),e.expires&&(this._expires=e.expires),this},setDefaultConf:function(){this._path=this._domain=this._expires=null,this._secure=!1}};b||(window.localCookieStorage=v({},A,{_prefix:s,_expires:3650,_secure:!0}),window.sessionCookieStorage=v({},A,{_prefix:u+window.name+"_",_secure:!0})),window.cookieStorage=v({},A),a.cookieStorage=v({},O,{_type:"cookieStorage",setExpires:function(e){return window.cookieStorage.setExpires(e),this},setPath:function(e){return window.cookieStorage.setPath(e),this},setDomain:function(e){return window.cookieStorage.setDomain(e),this},setSecure:function(e){return window.cookieStorage.setSecure(e),this},setConf:function(e){return window.cookieStorage.setConf(e),this},setDefaultConf:function(){return window.cookieStorage.setDefaultConf(),this}})}return a.initNamespaceStorage=function(e){return m(e)},b?(a.localStorage=v({},O,{_type:"localStorage"}),a.sessionStorage=v({},O,{_type:"sessionStorage"})):(a.localStorage=v({},O,{_type:"localCookieStorage"}),a.sessionStorage=v({},O,{_type:"sessionCookieStorage"})),a.namespaceStorages={},a.removeAllStorages=function(e){a.localStorage.removeAll(e),a.sessionStorage.removeAll(e),a.cookieStorage&&a.cookieStorage.removeAll(e),e||(a.namespaceStorages={})},a.alwaysUseJsonInStorage=function(e){O.alwaysUseJson=e,a.localStorage.alwaysUseJson=e,a.sessionStorage.alwaysUseJson=e,a.cookieStorage&&(a.cookieStorage.alwaysUseJson=e)},a})}}]);