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8KxyjfBhvhUtQfLxBRc8dQvm30r+Xi4+bqyNdhUo8XjFDsIHM/3YYOJ6VtiVQfI0iE8GDVs2wZLBVNw1/etq2ZKQCaxDBneZP3ZLBCy1v8IhzGYomsLoQXL/U0iQZbGxtAq+ok7An9z4oXzZDUHGlLCiawKpfOTLH6ZHpL3Z6GT+8A6t2ChgPT6eTM147YGe8SvLIdKe6yES1VelCZflDxYNCW91VcBuWvvRtalTcPiWEvR+0nbLKcpyyMmS6C/eKF+uqs7yuqAO5oxHrF1FyGlhOxW8KzPrutp3bz32wWFczjax1Ym/bhUBKAlkr/jZKn9JtkT5Z6TbSZ+PJddPc1V5jyM0EYjSCq7asnwV9djqY2lprMLekrv4vb1XENNArX97Svk7LWxFBP4mSCEX65gR93oq+sivonSlhcuk+z6EljL9n3HngTtASJli5voQZGwFzD5Ywb7GE0QklTJFUCcNssmhLXFO0+QnNs2uKtnp03KeOcv4VYABwkIZ9IZVk0gAAAABJRU5ErkJggg=="},deca:function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"personal-data"},[s("div",{staticClass:"wrapper"},[s("div",{staticClass:"title"},[t._v("管理我的账号")]),s("div",{staticClass:"wrapList"},t._l(t.switchUserInfo,function(e,a){return s("div",{key:a,staticClass:"item acea-row row-between-wrapper",class:e.uid===t.userInfo.uid?"on":""},[s("div",{staticClass:"picTxt acea-row row-between-wrapper"},[s("div",{staticClass:"pictrue"},[e.uid===t.userInfo.uid?s("VueCoreImageUpload",{ref:"upImg",refInFor:!0,staticClass:"btn btn-primary",attrs:{crop:!1,compress:"80",headers:t.headers,"max-file-size":5242880,credentials:!1,inputAccept:"image/*",inputOfFile:"file",url:t.url},on:{imageuploaded:t.imageuploaded}},[s("div",{staticClass:"pictrue"},[s("img",{attrs:{src:e.avatar}})])]):s("div",{staticClass:"pictrue"},[s("img",{attrs:{src:e.avatar}})]),e.uid===t.userInfo.uid?s("img",{staticClass:"alter",attrs:{src:i("6871")}}):t._e()],1),s("div",{staticClass:"text"},[s("div",{staticClass:"name line1"},[t._v(t._s(e.nickname))]),s("div",{staticClass:"phone"},[t._v("绑定手机号:"+t._s(e.phone))])])]),e.uid===t.userInfo.uid?s("div",{staticClass:"currentBnt acea-row row-center-wrapper font-color-green"},[t._v("\n 当前账号\n ")]):s("div",{staticClass:"bnt font-color-green acea-row row-center-wrapper",on:{click:function(e){return t.switchAccounts(a)}}},[t._v("\n 使用账号\n ")])])}),0)]),s("div",{staticClass:"list"},[s("div",{staticClass:"item acea-row row-between-wrapper"},[s("div",[t._v("昵称")]),s("div",{staticClass:"input"},[s("input",{directives:[{name:"model",rawName:"v-model",value:t.userInfo.nickname,expression:"userInfo.nickname"}],attrs:{type:"text"},domProps:{value:t.userInfo.nickname},on:{input:function(e){e.target.composing||t.$set(t.userInfo,"nickname",e.target.value)}}})])]),s("div",{staticClass:"item acea-row row-between-wrapper"},[s("div",[t._v("ID号")]),s("div",{staticClass:"input acea-row row-between-wrapper"},[s("input",{staticClass:"id",attrs:{type:"text",disabled:""},domProps:{value:t.userInfo.uid}}),s("span",{staticClass:"iconfont icon-suozi"})])]),t.userInfo.phone?t.userInfo.phone?s("div",{staticClass:"item acea-row row-between-wrapper"},[s("div",[t._v("手机号码")]),s("div",{staticClass:"input acea-row row-between-wrapper"},[s("div",{staticClass:"input acea-row row-between-wrapper"},[s("input",{staticClass:"id",attrs:{type:"text",disabled:""},domProps:{value:t.userInfo.phone}}),s("span",{staticClass:"iconfont icon-suozi"})])])]):t._e():s("div",[s("router-link",{staticClass:"item acea-row row-between-wrapper",attrs:{to:"/user/binding"}},[s("div",[t._v("绑定手机号")]),s("div",{staticClass:"input"},[t._v("\n 点击绑定手机号"),s("span",{staticClass:"iconfont icon-xiangyou"})])])],1),t.userInfo.phone&&"h5"===t.userInfo.user_type?s("div",[s("router-link",{staticClass:"item acea-row row-between-wrapper",attrs:{to:"/change_password"}},[s("div",[t._v("密码")]),s("div",{staticClass:"input"},[t._v("\n 点击修改密码"),s("span",{staticClass:"iconfont icon-xiangyou"})])])],1):t._e()]),s("div",{staticClass:"modifyBnt bg-color-green",on:{click:t.submit}},[t._v("保存修改")]),t.isWeixin?t._e():s("div",{staticClass:"logOut cart-color-green acea-row row-center-wrapper",on:{click:t.logout}},[t._v("\n 退出登录\n ")])])},a=[],n=(i("7f7f"),i("2f62")),o=i("ed08"),r=i("f603"),c=i("c24f"),l=i("74f9"),u=i("d0a4"),d=i("4360"),p=i("5a0c"),h=i.n(p),w={name:"PersonalData",components:{VueCoreImageUpload:r["a"]},data:function(){return{url:"".concat(o["a"],"/upload/image"),headers:{Authorization:"Bearer "+this.$store.state.app.token},avatar:"",isWeixin:!1,currentAccounts:0,switchUserInfo:[],userIndex:0}},watch:{$route:function(t){"PersonalData"===t.name&&this.$store.dispatch("USERINFO",!0)}},computed:Object(n["b"])(["userInfo"]),mounted:function(){this.avatar=this.userInfo.avatar,this.isWeixin=Object(o["d"])(),this.getUserInfo()},methods:{switchAccounts:function(t){var e=this;this.userIndex=t;var i=this.switchUserInfo[this.userIndex];return this.switchUserInfo.length<=1||(void 0===i?this.$dialog.toast({mes:"切换的账号不存在"}):void("h5"===i.user_type?Object(c["S"])().then(function(t){var i=t.data;e.$dialog.loading.close();var s=h()(i.expires_time);d["a"].commit("LOGIN",i.token,s),e.$emit("changeswitch",!1),location.reload()}).catch(function(t){return e.$dialog.loading.close(),e.$dialog.toast({mes:t})}):(u["a"].set("loginType","wechat",60),this.$dialog.loading.close(),this.$store.commit("LOGOUT"),Object(l["clearAuthStatus"])(),this.$emit("changeswitch",!1),location.reload())))},getUserInfo:function(){var t=this,e=this;Object(c["B"])().then(function(i){for(var s=i.data.switchUserInfo,a=0;a<s.length;a++)s[a].uid==e.userInfo.uid&&(e.userIndex=a),e.isWeixin||"h5"==s[a].user_type||""!==s[a].phone||s.splice(a,1);e.$set(t,"switchUserInfo",s)})},imageuploaded:function(t){if(200!==t.status)return this.$dialog.error(t.msg||"上传图片失败");void 0!==this.switchUserInfo[this.userIndex]&&this.$set(this.switchUserInfo[this.userIndex],"avatar",t.data.url)},submit:function(){var t=this,e=this.switchUserInfo[this.userIndex];Object(c["M"])({nickname:Object(o["f"])(this.userInfo.nickname),avatar:e.avatar}).then(function(e){t.$store.dispatch("USERINFO",!0),t.$dialog.success(e.msg),t.$router.go(-1)},function(e){t.$dialog.error(e.msg)})},logout:function(){var t=this;this.$dialog.confirm({mes:"确认退出登录?",opts:function(){Object(c["s"])().then(function(e){t.$store.commit("LOGOUT"),Object(l["clearAuthStatus"])(),location.href=location.origin,console.log(e)}).catch(function(t){console.log(t)})}})}}},v=w,m=i("2877"),I=Object(m["a"])(v,s,a,!1,null,null,null);e["default"]=I.exports}}]);
  2. //# sourceMappingURL=chunk-b6e494f4.51061b41.js.map