text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1e38a62a"],{"11e9":function(e,t,r){var a=r("52a7"),n=r("4630"),s=r("6821"),i=r("6a99"),o=r("69a8"),c=r("c69a"),l=Object.getOwnPropertyDescriptor;t.f=r("9e1e")?l:function(e,t){if(e=s(e),t=i(t,!0),c)try{return l(e,t)}catch(r){}if(o(e,t))return n(!a.f.call(e,t),e[t])}},"133c":function(e,t,r){"use strict";r("d785")},"5dbc":function(e,t,r){var a=r("d3f4"),n=r("8b97").set;e.exports=function(e,t,r){var s,i=t.constructor;return i!==r&&"function"==typeof i&&(s=i.prototype)!==r.prototype&&a(s)&&n&&n(e,s),e}},"860c":function(e,t,r){},"8b97":function(e,t,r){var a=r("d3f4"),n=r("cb7c"),s=function(e,t){if(n(e),!a(t)&&null!==t)throw TypeError(t+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,t,a){try{a=r("9b43")(Function.call,r("11e9").f(Object.prototype,"__proto__").set,2),a(e,[]),t=!(e instanceof Array)}catch(n){t=!0}return function(e,r){return s(e,r),t?e.__proto__=r:a(e,r),e}}({},!1):void 0),check:s}},"905e":function(e,t,r){"use strict";r.d(t,"c",(function(){return n})),r.d(t,"d",(function(){return s})),r.d(t,"a",(function(){return i})),r.d(t,"f",(function(){return o})),r.d(t,"h",(function(){return c})),r.d(t,"g",(function(){return l})),r.d(t,"i",(function(){return u})),r.d(t,"e",(function(){return d})),r.d(t,"b",(function(){return p}));var a=r("b775");function n(e){return Object(a["a"])({url:"/time/",method:"post",data:e})}function s(){return Object(a["a"])({url:"/time/",method:"delete"})}function i(){return Object(a["a"])({url:"/time/",method:"get"})}function o(e){return Object(a["a"])({url:"/timetemp/",method:"post",data:e})}function c(e){var t="";!0===e&&(t="flag"),"temp"===e&&(t="temp");var r="/timetemp/?query=&flag="+t;return Object(a["a"])({url:r,method:"get"})}function l(e){return Object(a["a"])({url:"/timetemp/"+e+"/",method:"delete",data:{id:e}})}function u(e){return Object(a["a"])({url:"/rank/user/?page="+e,method:"get"})}function d(e){return Object(a["a"])({url:"/timerank/?value="+e,method:"get"})}var p={getTimestamp:function(e){return new Date(e).getTime()/1e3}}},9093:function(e,t,r){var a=r("ce10"),n=r("e11e").concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return a(e,n)}},aa77:function(e,t,r){var a=r("5ca1"),n=r("be13"),s=r("79e5"),i=r("fdef"),o="["+i+"]",c="​",l=RegExp("^"+o+o+"*"),u=RegExp(o+o+"*$"),d=function(e,t,r){var n={},o=s((function(){return!!i[e]()||c[e]()!=c})),l=n[e]=o?t(p):i[e];r&&(n[r]=l),a(a.P+a.F*o,"String",n)},p=d.trim=function(e,t){return e=String(n(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(u,"")),e};e.exports=d},c5f6:function(e,t,r){"use strict";var a=r("7726"),n=r("69a8"),s=r("2d95"),i=r("5dbc"),o=r("6a99"),c=r("79e5"),l=r("9093").f,u=r("11e9").f,d=r("86cc").f,p=r("aa77").trim,m="Number",f=a[m],v=f,h=f.prototype,b=s(r("2aeb")(h))==m,_="trim"in String.prototype,g=function(e){var t=o(e,!1);if("string"==typeof t&&t.length>2){t=_?t.trim():p(t,3);var r,a,n,s=t.charCodeAt(0);if(43===s||45===s){if(r=t.charCodeAt(2),88===r||120===r)return NaN}else if(48===s){switch(t.charCodeAt(1)){case 66:case 98:a=2,n=49;break;case 79:case 111:a=8,n=55;break;default:return+t}for(var i,c=t.slice(2),l=0,u=c.length;l<u;l++)if(i=c.charCodeAt(l),i<48||i>n)return NaN;return parseInt(c,a)}}return+t};if(!f(" 0o1")||!f("0b1")||f("+0x1")){f=function(e){var t=arguments.length<1?0:e,r=this;return r instanceof f&&(b?c((function(){h.valueOf.call(r)})):s(r)!=m)?i(new v(g(t)),r,f):g(t)};for(var y,w=r("9e1e")?l(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),P=0;w.length>P;P++)n(v,y=w[P])&&!n(f,y)&&d(f,y,u(v,y));f.prototype=h,h.constructor=f,r("2aba")(a,m,f)}},c663:function(e,t,r){"use strict";r("860c")},d785:function(e,t,r){},ecac:function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"app-container"},[e.user?r("div",[r("el-row",{attrs:{gutter:20}},[r("el-col",{attrs:{span:6,xs:24}},[r("user-card",{attrs:{user:e.user}})],1),e._v(" "),r("el-col",{attrs:{span:18,xs:24}},[r("el-card",[r("el-tabs",{model:{value:e.activeTab,callback:function(t){e.activeTab=t},expression:"activeTab"}},[r("el-tab-pane",{attrs:{label:"Timeline",name:"timeline"}},[r("timeline")],1),e._v(" "),r("el-tab-pane",{attrs:{label:"Account",name:"account"}},[r("account",{attrs:{user:e.user}})],1)],1)],1)],1)],1)],1):e._e()])},n=[],s=(r("7f7f"),r("db72")),i=r("2f62"),o=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-card",{staticStyle:{"margin-bottom":"20px"}},[r("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[r("span",[e._v("About me")])]),e._v(" "),r("div",{staticClass:"user-profile"},[r("div",{staticClass:"box-center"},[r("pan-thumb",{attrs:{image:e.user.avatar,height:"100px",width:"100px",hoverable:!1}},[r("div",[e._v("Hello")]),e._v("\n        "+e._s(e.user.role)+"\n      ")])],1),e._v(" "),r("div",{staticClass:"box-center"},[r("div",{staticClass:"user-name text-center"},[e._v(e._s(e.user.name))]),e._v(" "),r("div",{staticClass:"user-role text-center text-muted"},[e._v(e._s(e.user.role))])])]),e._v(" "),r("div",{staticClass:"user-bio"},[r("div",{staticClass:"user-education user-bio-section"},[r("div",{staticClass:"user-bio-section-header"},[r("svg-icon",{attrs:{"icon-class":"education"}}),r("span",[e._v(" 积分："+e._s(e.user.rank))])],1)])])])},c=[],l=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"pan-item",style:{zIndex:e.zIndex,height:e.height,width:e.width}},[r("div",{staticClass:"pan-info"},[r("div",{staticClass:"pan-info-roles-container"},[e._t("default")],2)]),e._v(" "),r("div",{staticClass:"pan-thumb",style:{backgroundImage:"url("+e.image+")"}})])},u=[],d=(r("c5f6"),{name:"PanThumb",props:{image:{type:String,required:!0},zIndex:{type:Number,default:1},width:{type:String,default:"150px"},height:{type:String,default:"150px"}}}),p=d,m=(r("133c"),r("2877")),f=Object(m["a"])(p,l,u,!1,null,"799537af",null),v=f.exports,h={components:{PanThumb:v},props:{user:{type:Object,default:function(){return{name:"",email:"",avatar:"",roles:"",rank:""}}}}},b=h,_=(r("c663"),Object(m["a"])(b,o,c,!1,null,"2563b6d9",null)),g=_.exports,y=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"block"},[!1===e.timemodel?r("el-timeline",e._l(e.timeline,(function(t,a){return r("el-timeline-item",{key:a,attrs:{timestamp:t.create_date,placement:"top"}},[r("el-card",[r("h4",[e._v("启动 "+e._s(t.name))]),e._v(" "),t.is_check_date?r("div",[r("p",[e._v("通过时间"+e._s(t.is_check_date))]),e._v(" "),r("el-button",{attrs:{type:"success",icon:"el-icon-check",circle:""}})],1):e._e()])],1)})),1):!0===e.timemodel?r("el-timeline",[r("el-timeline-item",{attrs:{placement:"top"}},[r("el-card",[r("h4",[e._v("正在进行计时挑战赛")])])],1)],1):e._e(),e._v(" "),r("div",{staticStyle:{"margin-top":"20px"}},[r("el-pagination",{attrs:{"page-size":e.page.size,layout:"total, prev, pager, next, jumper",total:e.page.total},on:{"current-change":e.handleQuery}})],1)],1)},w=[],P=r("3007"),k=r("905e"),x={data:function(){return{timeline:[],page:{size:20,total:0},timemodel:!1}},methods:{handleQuery:function(e){var t=this;Object(P["b"])(e).then((function(e){t.timeline=e.data.results,t.page.total=e.data.count}))},gettimelist:function(){var e=this;Object(k["a"])().then((function(t){var r=t.data.results;0===r.length||(e.timemodel=!0)}))}},created:function(){this.handleQuery(1),this.gettimelist()}},O=x,F=Object(m["a"])(O,y,w,!1,null,null,null),j=F.exports,E=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-form",{ref:"ruleForm",attrs:{rules:e.rules,model:e.ruleForm}},[r("el-form-item",{attrs:{label:"用户名"}},[r("el-input",{attrs:{disabled:!0},model:{value:e.user.name,callback:function(t){e.$set(e.user,"name","string"===typeof t?t.trim():t)},expression:"user.name"}})],1),e._v(" "),r("el-form-item",{attrs:{label:"邮箱"}},[r("el-input",{attrs:{disabled:!0},model:{value:e.user.email,callback:function(t){e.$set(e.user,"email","string"===typeof t?t.trim():t)},expression:"user.email"}})],1),e._v(" "),!0===e.updatePwd?r("el-form-item",{attrs:{label:"旧密码"}},[r("el-input",{model:{value:e.ruleForm.oldPassword,callback:function(t){e.$set(e.ruleForm,"oldPassword","string"===typeof t?t.trim():t)},expression:"ruleForm.oldPassword"}})],1):e._e(),e._v(" "),!0===e.updatePwd?r("el-form-item",{attrs:{label:"新密码",prop:"pass"}},[r("el-input",{attrs:{type:"password"},model:{value:e.ruleForm.pass,callback:function(t){e.$set(e.ruleForm,"pass","string"===typeof t?t.trim():t)},expression:"ruleForm.pass"}})],1):e._e(),e._v(" "),!0===e.updatePwd?r("el-form-item",{attrs:{label:"确认新密码",prop:"checkPass"}},[r("el-input",{attrs:{type:"password"},model:{value:e.ruleForm.checkPass,callback:function(t){e.$set(e.ruleForm,"checkPass","string"===typeof t?t.trim():t)},expression:"ruleForm.checkPass"}})],1):e._e(),e._v(" "),r("el-form-item",[!0===e.updatePwd?r("el-button",{attrs:{type:"primary"},on:{click:e.handleUpdatePwd}},[e._v("修改")]):e._e(),e._v(" "),!1===e.updatePwd?r("el-button",{attrs:{type:"primary"},on:{click:e.handlerPwd}},[e._v("修改密码")]):e._e(),e._v(" "),!0===e.updatePwd?r("el-button",{attrs:{type:"primary"},on:{click:e.closeHandlerPwd}},[e._v("关闭")]):e._e()],1)],1)},I=[],N=r("c24f"),C={data:function(){var e=this,t=function(t,r,a){""===r?a(new Error("请输入密码")):(e.ruleForm.pass.length<8&&a(new Error("密码不能少于8位")),""!==e.ruleForm.checkPass&&e.$refs.ruleForm.validateField("checkPass"),a())},r=function(t,r,a){""===r?a(new Error("请再次输入密码")):r!==e.ruleForm.pass?a(new Error("两次输入密码不一致!")):a()};return{ruleForm:{name:"",email:"",oldPassword:"",pass:"",checkPass:""},updatePwd:!1,rules:{pass:[{validator:t,trigger:"blur"}],checkPass:[{validator:r,trigger:"blur"}]}}},props:{user:{type:Object,default:function(){return{name:"",email:""}}}},methods:{handlerPwd:function(){this.updatePwd=!0},closeHandlerPwd:function(){this.updatePwd=!1},handleUpdatePwd:function(){var e=this;this.$refs.ruleForm.validate((function(t){if(!t)return!1;Object(N["g"])(e.ruleForm).then((function(t){var r=t.data;200===r.code?(e.$message({message:"修改密码成功",type:"success"}),e.updatePwd=!1):e.$message({message:r.msg,type:"error"})}))}))}}},T=C,A=Object(m["a"])(T,E,I,!1,null,null,null),$=A.exports,S={name:"Profile",components:{UserCard:g,Timeline:j,Account:$},data:function(){return{user:{},activeTab:"timeline"}},computed:Object(s["a"])({},Object(i["b"])(["name","avatar","roles","rank","email"])),created:function(){this.getUser()},methods:{getUser:function(){this.user={name:this.name,email:this.email,avatar:this.avatar,rank:this.rank}}}},U=S,z=Object(m["a"])(U,a,n,!1,null,null,null);t["default"]=z.exports},fdef:function(e,t){e.exports="\t\n\v\f\r   ᠎             　\u2028\u2029\ufeff"}}]);
  //# sourceMappingURL=chunk-1e38a62a.ba64e90a.js.map