(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/set"],{2808:function(t,e,n){},4159:function(t,e,n){"use strict";(function(t,i){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var u=o(n("7ca3")),s=n("8f59");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?r(Object(n),!0).forEach((function(e){(0,u.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var c={data:function(){return{is_submit:!1,stype:0,weixin:""}},computed:a({},(0,s.mapGetters)(["user","is_login","base"])),onLoad:function(t){t.stype&&(this.stype=t.stype)},onShow:function(){this.getUser()},methods:a(a(a({},(0,s.mapActions)(["getUser","logout"])),(0,s.mapMutations)(["setUser"])),{},{reLogin:function(){var e=this;t.showModal({title:"提示",content:"确认切换账号吗？",showCancel:!0,success:function(n){var i=n.confirm;i&&(t.showLoading({title:"退出中。。"}),e.logout((function(){t.hideLoading(),t.$store.commit("setShowLoginModal",{visible:!0})})))}})},previewImage:function(e){t.previewImage({urls:[e]})},onLogout:function(){var e=this;t.showLoading({title:"退出中。。"}),this.logout((function(){t.hideLoading(),e.jump("/pages/user/index",3)}))},onClear:function(){var e=this;t.showLoading({title:"清除缓存中。。"});for(var n=["base","app_version","uniacid","token","share","diy-member","diy-index","utk"],i=[],o=t.getStorageInfoSync().keys,u=o.length,s=0;s<u;s++){var r=o[s];r&&!n.includes(r)&&0!==r.indexOf("diy-")&&i.push(r)}i.forEach((function(e){return t.removeStorageSync(e)})),setTimeout((function(){t.hideLoading(),e.toast("清除成功")}),500)},onBlurWeixin:function(t){this.weixin=t.detail.value},onBlur:function(t){var e=t.detail.value;e&&this.submit(1,e)},submit:function(t,e){var n=this,i={type:t};if(1==t)i.nickname=e;else if(2==t)i.avatar=e;else if(3==t)i.skqrcode=e;else{if(21!=t)return;i.weixin=e}this.is_submit||(this.is_submit=!0,this.$util.post("user/user/update",i).then((function(t){n.is_submit=!1,n.toast(t.message),1==t.code&&n.getUser()})).catch((function(t){n.is_submit=!1})))},chooseAvatar:function(t){var e=this,n=t.detail.avatarUrl;this.$util.uploadImage((function(t){e.submit(2,t.url)}),n)},upload:function(t){var e=this;this.$util.uploadImage((function(n){e.submit(t,n.url)}))},subscribe:function(){var t=this;this.base.adminsubscribe_tid&&this.base.adminsubscribe_tid.length>0?i.requestSubscribeMessage({tmplIds:this.base.adminsubscribe_tid,success:function(e){t.$util.get("user/user/subscribe",{},!1).then((function(e){1==e.code?t.getUser():t.$util.toast(e.message)}))},fail:function(e){t.$util.toast(JSON.stringify(e))}}):this.$util.toast("未设置订阅消息模板id")},toUpdatePage:function(){this.jump("/plugin/update/index")}})};e.default=c}).call(this,n("df3c")["default"],n("3223")["default"])},"441d":function(t,e,n){"use strict";var i=n("2808"),o=n.n(i);o.a},"8d6a":function(t,e,n){"use strict";n.r(e);var i=n("cd93"),o=n("d077");for(var u in o)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(u);n("441d");var s=n("828b"),r=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=r.exports},af08:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("4c1a");i(n("3240"));var o=i(n("8d6a"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},cd93:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var i={uIcon:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-icon/u-icon")]).then(n.bind(null,"b248"))},uButton:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/uview-ui/components/u-button/u-button")]).then(n.bind(null,"043e"))},loginModal:function(){return Promise.all([n.e("common/vendor"),n.e("components/login-modal/login-modal")]).then(n.bind(null,"e34a"))}},o=function(){var t=this.$createElement;this._self._c},u=[]},d077:function(t,e,n){"use strict";n.r(e);var i=n("4159"),o=n.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=o.a}},[["af08","common/runtime","common/vendor"]]]);