(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/userinfo"],{"10ab":function(t,n,e){"use strict";var o=e("a830"),r=e.n(o);r.a},1961:function(t,n,e){"use strict";e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return u})),e.d(n,"a",(function(){return o}));var o={uniPopup:function(){return e.e("components/uni-popup/uni-popup").then(e.bind(null,"1bfb"))}},r=function(){var t=this,n=t.$createElement;t._self._c},u=[]},"1a32":function(t,n,e){"use strict";(function(t){e("30ba");o(e("66fd"));var n=o(e("936e"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=e,t(n.default)}).call(this,e("543d")["createPage"])},"713e":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("26cb"),r=e("5531"),u=e("3906");function c(t,n){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),e.push.apply(e,o)}return e}function i(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?c(Object(e),!0).forEach((function(n){s(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):c(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function s(t,n,e){return n in t?Object.defineProperty(t,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[n]=e,t}var a={data:function(){return{show:!1,password:""}},onLoad:function(){console.log(this.userInfo)},computed:i({},(0,o.mapState)("user",["userInfo"])),methods:i(i({},(0,o.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,u.userEdit)({avatar:this.userInfo.avatar,nickname:this.userInfo.nickname}).then((function(e){n.$api.msg("修改成功"),setTimeout((function(){t.switchTab({url:"/pages/user/user"})}),1e3),console.log(e)})).catch((function(t){console.log(t)}))},toLogout:function(){var n=this;t.showModal({content:"确定要退出登录么",success:function(e){e.confirm&&((0,u.logout)({}).then((function(n){t.navigateBack()})).catch((function(t){console.log(t)})),n.logout())}})},cancel:function(){var n=this;t.showModal({content:"确定要退出登录么",success:function(e){e.confirm&&(0,u.logout)({}).then((function(e){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=a}).call(this,e("543d")["default"])},"8e1e":function(t,n,e){"use strict";e.r(n);var o=e("713e"),r=e.n(o);for(var u in o)"default"!==u&&function(t){e.d(n,t,(function(){return o[t]}))}(u);n["default"]=r.a},"936e":function(t,n,e){"use strict";e.r(n);var o=e("1961"),r=e("8e1e");for(var u in r)"default"!==u&&function(t){e.d(n,t,(function(){return r[t]}))}(u);e("10ab");var c,i=e("f0c5"),s=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],c);n["default"]=s.exports},a830:function(t,n,e){}},[["1a32","common/runtime","common/vendor"]]]);