(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/mine/mine"],{"0331":function(e,n,t){"use strict";var i=t("7c51"),o=t.n(i);o.a},"19b5":function(e,n,t){"use strict";(function(e,i){var o=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=o(t("b8e9")),s={data:function(){return{login:!1,user:{},avatar:"/static/images/logo.jpg",myCourse:{},list:[{src:"/static/images/mine/jifen.png",title:"积分商城"},{src:"/static/images/mine/icon1.png",title:"我的考试"},{src:"/static/images/mine/icon2.png",title:"我的订单"},{src:"/static/images/mine/icon3.png",title:"我的评论"},{src:"/static/images/mine/icon4.png",title:"我的收藏"},{src:"/static/images/mine/icon5.png",title:"修改密码"},{src:"/static/images/mine/icon6.png",title:"我的证书"}],showInvite:!1,page:1,limit:1}},onLoad:function(){},onShow:function(){this.getUser(),this.isLogin(),this.getCourse()},methods:{getUser:function(){var n=this;a.default.req({url:"/api/User/userinfo"},(function(t){if(console.log("个人信息：",t),1==t.code){n.user=t.data;var o=t.data.invite_img,s=(new Date).getTime();n.user.invite_img=e.env.USER_DATA_PATH+"/"+s+".png";var u=o.replace(/^data:image\/\w+;base64,/,""),r=e.getFileSystemManager();r.writeFileSync(n.user.invite_img,u,"base64")}else 1==t.is_disable&&(a.default.info(t.msg),i.removeStorageSync("token"),n.login=!1,n.user={},setTimeout((function(){a.default.jump("/pages/login/login")}),1e3))}))},getCourse:function(){var e=this;a.default.req({url:"/api/User/myCourseList",data:{page:e.page,limit:e.limit,type:1}},(function(n){console.log("我的课程",n),1==n.code?(e.myCourse=n.data.list[0],0!==n.data.count&&e.totalProgress()):(e.user={},e.login=!1,i.removeStorageSync("token"))}))},toLogin:function(){a.default.jump("/pages/login/choose")},isLogin:function(){var e=i.getStorageSync("token");console.log(e),e.token?this.login=!0:a.default.info("请先登录")},totalProgress:function(){var e=this.myCourse;e.progress=e.study_class_count/e.class_count*100,this.myCourse=e},_saveCode:function(){console.log("长按保存图片到相册")},personalInfo:function(){a.default.jump("/pages/mine/personal")},toInvite:function(){this.showInvite=!0},closeInvite:function(){this.showInvite=!1},allCourse:function(){a.default.jump("/pages/mine/allCourse")},toCourse:function(e){a.default.jump("/pages/index/course/detail?id="+e)},toDeail:function(e){var n="";switch(e){case 0:n="/pages/integral/integral";break;case 1:n="/pages/mine/exam/exam";break;case 2:n="/pages/mine/order/order";break;case 3:n="/pages/mine/comment";break;case 4:n="/pages/mine/collect";break;case 5:n="/pages/mine/password/editPassword";break;case 6:n="/pages/mine/certificate";break}this.login?a.default.jump(n):a.default.info("请先登录")},quit:function(){this.user={},this.login=!1,i.removeStorageSync("token"),a.default.jump("/pages/login/choose")}}};n.default=s}).call(this,t("bc2e")["default"],t("543d")["default"])},"1b72":function(e,n,t){"use strict";t.r(n);var i=t("19b5"),o=t.n(i);for(var a in i)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(a);n["default"]=o.a},6906:function(e,n,t){"use strict";t.r(n);var i=t("8d5b"),o=t("1b72");for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);t("0331");var s=t("f0c5"),u=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,"5e0df161",null,!1,i["a"],void 0);n["default"]=u.exports},"7c51":function(e,n,t){},"7cda":function(e,n,t){"use strict";(function(e,n){var i=t("4ea4");t("73d2");i(t("66fd"));var o=i(t("6906"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"8d5b":function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return a})),t.d(n,"a",(function(){return i}));var i={uAvatar:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-avatar/u-avatar")]).then(t.bind(null,"51c1"))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(t.bind(null,"d3dc"))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,"7819"))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,"909a"))}},o=function(){var e=this.$createElement;this._self._c},a=[]}},[["7cda","common/runtime","common/vendor"]]]);