(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/userinfo"],{"5aaf":function(t,n,o){"use strict";var e=o("ca32"),c=o.n(e);c.a},7702:function(t,n,o){"use strict";o.r(n);var e=o("f050"),c=o.n(e);for(var u in e)["default"].indexOf(u)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(u);n["default"]=c.a},"7ae4":function(t,n,o){"use strict";o.r(n);var e=o("8f2d"),c=o("7702");for(var u in c)["default"].indexOf(u)<0&&function(t){o.d(n,t,(function(){return c[t]}))}(u);o("5aaf");var r=o("f0c5"),i=Object(r["a"])(c["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],void 0);n["default"]=i.exports},"8ab5":function(t,n,o){"use strict";(function(t,n){var e=o("4ea4");o("3e39");e(o("66fd"));var c=e(o("7ae4"));t.__webpack_require_UNI_MP_PLUGIN__=o,n(c.default)}).call(this,o("bc2e")["default"],o("543d")["createPage"])},"8f2d":function(t,n,o){"use strict";o.d(n,"b",(function(){return c})),o.d(n,"c",(function(){return u})),o.d(n,"a",(function(){return e}));var e={uniPopup:function(){return o.e("components/uni-popup/uni-popup").then(o.bind(null,"9fd5"))}},c=function(){var t=this.$createElement;this._self._c},u=[]},ca32:function(t,n,o){},f050:function(t,n,o){"use strict";(function(t){var e=o("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var c=e(o("9523")),u=o("26cb"),r=o("2101"),i=o("2b06");function s(t,n){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),o.push.apply(o,e)}return o}function a(t){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?s(Object(o),!0).forEach((function(n){(0,c.default)(t,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):s(Object(o)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(o,n))}))}return t}var f={data:function(){return{show:!1,password:""}},onLoad:function(){console.log(this.userInfo)},computed:a({},(0,u.mapState)("user",["userInfo"])),onUnload:function(){var t=this;"微信用户"==this.userInfo.nickname&&(0,i.logout)({}).then((function(n){t.logout()})).catch((function(t){console.log(t)})),console.log("222")},methods:a(a({},(0,u.mapMutations)("user",["logout"])),{},{imgsub:function(){var t=this;console.log("上传头像"),(0,r.upload)({filename:""}).then((function(n){console.log("data",n),t.userInfo.avatar=n[0].url}))},confirm:function(){var n=this;(0,i.userEdit)({avatar:this.userInfo.avatar,nickname:this.userInfo.nickname}).then((function(o){n.$api.msg("修改成功"),setTimeout((function(){t.switchTab({url:"/pages/user/user"})}),1e3),console.log(o)})).catch((function(t){console.log(t)}))},toLogout:function(){var n=this;t.showModal({content:"确定要退出登录么",success:function(o){o.confirm&&((0,i.logout)({}).then((function(n){t.navigateBack()})).catch((function(t){console.log(t)})),n.logout())}})},cancel:function(){var n=this;t.showModal({content:"确定要退出登录么",success:function(o){o.confirm&&(0,i.logout)({}).then((function(o){n.logout(),t.switchTab({url:"/pages/index/index"})})).catch((function(t){console.log(t)}))}})},qx:function(){this.password="",this.$refs.popup.close()},pswQd:function(){if(this.password!=this.userInfo.phone)return this.$refs.popup.close(),this.password="",void this.$api.msg("请输入自己的账户");this.$refs.popup.close(),this.password="",this.$api.msg("申请注销成功，请耐心等待审核")}})};n.default=f}).call(this,o("543d")["default"])}},[["8ab5","common/runtime","common/vendor"]]]);