(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/userinfo"],{"4b86":function(t,n,e){"use strict";e.r(n);var o=e("7654"),i=e.n(o);for(var c in o)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(c);n["default"]=i.a},7654:function(t,n,e){"use strict";(function(t){var o=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o(e("9523")),c=e("26cb"),r=e("62d1"),u=e("36af"),a=e("1b3d");function s(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 f(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?s(Object(e),!0).forEach((function(n){(0,i.default)(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):s(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}var l={components:{uniList:function(){e.e("components/uni-list/uni-list").then(function(){return resolve(e("10a8"))}.bind(null,e)).catch(e.oe)},uniListItem:function(){e.e("components/uni-list-item/uni-list-item").then(function(){return resolve(e("51f0"))}.bind(null,e)).catch(e.oe)}},data:function(){return{userInfo:{},pics:[]}},onLoad:function(){this.userInfo=t.getStorageSync("userInfo")||"",console.log(this.userInfo)},methods:f(f({},(0,c.mapMutations)("user",["logout"])),{},{bind:function(){t.navigateTo({url:"/pages/set/bind"})},toLogout:function(){var n=this;t.showModal({content:"确定要退出登录么",success:function(e){e.confirm&&(0,r.logout)({}).then((function(e){n.logout(),t.switchTab({url:"/pages/index/index"})})).catch((function(t){console.log(t)}))}})},imgsub:function(){var t=this;console.log("上传头像"),(0,a.upload)({filename:""}).then((function(n){console.log(n[0].url),t.userInfo.avatar=n[0].url}))},edit:function(){var n=this;t.showLoading({title:"提交中...",mask:!0}),(0,u.edit)({avatar:this.userInfo.avatar,nickname:this.userInfo.nickname}).then((function(e){t.hideLoading(),n.$api.msg("修改成功"),setTimeout((function(){t.switchTab({url:"/pages/user/user"})}),1e3)})).catch((function(t){console.log(t),n.$api.msg("修改失败")}))}})};n.default=l}).call(this,e("543d")["default"])},b821:function(t,n,e){},c5c3:function(t,n,e){"use strict";e.r(n);var o=e("dfd8"),i=e("4b86");for(var c in i)["default"].indexOf(c)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(c);e("e157");var r=e("f0c5"),u=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=u.exports},dfd8:function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var o=function(){var t=this.$createElement;this._self._c},i=[]},e157:function(t,n,e){"use strict";var o=e("b821"),i=e.n(o);i.a},ef2c:function(t,n,e){"use strict";(function(t,n){var o=e("4ea4");e("12d5");o(e("66fd"));var i=o(e("c5c3"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("bc2e")["default"],e("543d")["createPage"])}},[["ef2c","common/runtime","common/vendor"]]]);