1 |
- webpackJsonp([77],{"3Oeo":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});a("dKK0");var n=a("balU"),o=a("7+uW"),i=(a("PJh5"),a("l9V+"));o.a.use(n.a);var c={name:"employee_edit",data:function(){return{submit_loading:!1,userinfo:this.$store.getters.user_info,account_info:this.$store.getters.account_info}},created:function(){var t=this;this.$nextTick(function(){t.$refs.nickname_input.focus()})},methods:{employee_update:function(){var t=this;if(""==t.userinfo.nickname)return t.$toast("姓名不能为空!"),!1;t.submit_loading=!0,t.$toast.loading({mask:!0,message:"正在处理"}),Object(i.a)({url:"/api/account/edit",method:"post",data:{name:t.account_info.name,img_url:t.account_info.img_url}}).then(function(e){if(t.submit_loading=!1,1==e.data.code){if(window.plus?plus.storage.removeItem("account_info"):localStorage.removeItem("account_info"),window.plus)for(var a=plus.webview.all(),n=0;n<a.length;n++)a[n].evalJS('window.VueObj.$store.dispatch("get_account_info").then(function(res){window.VueObj.$forceUpdate();});');else t.$store.dispatch("get_account_info");t.$toast(e.data.msg),t.$toast.clear(),setTimeout(function(){t.$route_back()},500)}else t.$toast(e.data.msg)}).catch(function(e){t.$toast(e)})}}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("van-nav-bar",{attrs:{"right-text":"保存",title:"修改资料","left-text":"返回","left-arrow":""},on:{"click-left":t.$route_back,"click-right":t.employee_update}}),t._v(" "),a("div",{staticClass:"body_com",staticStyle:{"background-color":"#f1f1f1"}},[a("scroller",[a("van-cell-group",[a("van-field",{ref:"nickname_input",attrs:{required:"",label:"姓名",placeholder:"输入您的姓名"},model:{value:t.account_info.name,callback:function(e){t.$set(t.account_info,"name",e)},expression:"account_info.name"}})],1)],1)],1)],1)},staticRenderFns:[]};var r=a("VU/8")(c,s,!1,function(t){a("np7h")},"data-v-4a3b7aa4",null);e.default=r.exports},np7h:function(t,e){}});
|