userinfo.js 3.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/userinfo"],{1013:function(t,n,e){"use strict";var o;e.d(n,"b",(function(){return r})),e.d(n,"c",(function(){return u})),e.d(n,"a",(function(){return o}));var r=function(){var t=this,n=t.$createElement;t._self._c},u=[]},"45c1":function(t,n,e){"use strict";(function(t){e("7154");o(e("66fd"));var n=o(e("46bd"));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"])},"46bd":function(t,n,e){"use strict";e.r(n);var o=e("1013"),r=e("7ecb");for(var u in r)"default"!==u&&function(t){e.d(n,t,(function(){return r[t]}))}(u);e("b9b3");var c,i=e("f0c5"),a=Object(i["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],c);n["default"]=a.exports},"4acb":function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("26cb"),r=e("73c6"),u=e("cf53"),c=e("2fbd");function i(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 a(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?i(Object(e),!0).forEach((function(n){s(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):i(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 f=function(){e.e("components/uni-list/uni-list").then(function(){return resolve(e("b46e"))}.bind(null,e)).catch(e.oe)},l=function(){e.e("components/uni-list-item/uni-list-item").then(function(){return resolve(e("8bdf"))}.bind(null,e)).catch(e.oe)},b={components:{uniList:f,uniListItem:l},data:function(){return{userInfo:{},pics:[]}},onLoad:function(){this.userInfo=t.getStorageSync("userInfo")||"",console.log(this.userInfo)},methods:a(a({},(0,o.mapMutations)("user",["logout"])),{},{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,c.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=b}).call(this,e("543d")["default"])},"5a8b":function(t,n,e){},"7ecb":function(t,n,e){"use strict";e.r(n);var o=e("4acb"),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},b9b3:function(t,n,e){"use strict";var o=e("5a8b"),r=e.n(o);r.a}},[["45c1","common/runtime","common/vendor"]]]);