1 line
8.2 KiB
JavaScript
Raw Normal View History

2025-04-01 09:03:51 +08:00
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["packageA/my/person-detail"],{"0b82":function(e,n,t){"use strict";var a=t("60ae"),o=t.n(a);o.a},4784:function(e,n,t){"use strict";t.r(n);var a=t("69bc"),o=t.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(i);n["default"]=o.a},"60ae":function(e,n,t){},"69bc":function(e,n,t){"use strict";(function(e){var a=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("7ca3")),i=t("9e31");function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);n&&(a=a.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,a)}return t}function u(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?r(Object(t),!0).forEach((function(n){(0,o.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):r(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var c={data:function(){return{avatarStyle:{display:"flex",alignItems:"center",justifyContent:"space-between"},origiData:[],value:Number(new Date),area:"",birthday:"",show:!1,show1:!1,show2:!1,show3:!1,show4:!1,show5:!1,loading:!1,columns3:[],avatar:"https://cdn.uviewui.com/uview/album/1.jpg",upAvatar:"",titleStyle:{fontSize:"34rpx",fontWeight:600},imageStyles:{width:59,height:59,border:{radius:"50%"}},style:{width:"690rpx",height:"90rpx",borderRadius:"59rpx",background:"#008CFF",fontSize:"34rpx",color:"#fff",fontWeight:"bold",lineHeight:"166rpx",border:"none"},niName:"",realname:"",gender:"",zhiYe:"",phoneNumber:"",columns:[[{name:"男"},{name:"女"}]],columns1:[[{name:"18~28"},{name:"28~38"},{name:"38~48"}]],columns2:[[{name:"销售 / 客服"},{name:"技术"},{name:"产品 / 设计 / 运营"},{name:"项目管理 / 项目质量"},{name:"人力行政"},{name:"财务 / 审计 / 税务"},{name:"广告 / 设计 / 传媒 / 编辑"},{name:"市场 / 公关"},{name:"金融"},{name:"生产制造"},{name:"房地产 / 建筑 / 物业"},{name:"采购 / 贸易 / 交通 / 物流"},{name:"咨询 / 法律 / 教育 / 翻译"},{name:"医疗 / 护理 / 生活服务"},{name:"能源 / 矿产 / 环保"},{name:"公务员 / 农林牧渔 / 其他"},{name:"综合管理"}]]}},onLoad:function(){var n=e.getStorageSync("userInfo");this.phoneNumber=n.mobile,this.niName=n.nickname,this.realname=n.username,this.avatar=e.getStorageSync("userInfo").avatar,this.$refs.datetimePicker.setFormatter(this.formatter),this.getDetail()},methods:{submit:function(){var n=this;console.log(this.avatar,"this.avatar"),e.$u.http.post("/api/user/profile",{avatar:this.avatar,nickname:this.niName,work:this.zhiYe,birthday:this.birthday,realname:this.realname,gender:"男"==this.gender?"1":"0",update_fields:["nickname","birthday","realname","gender","work","avatar"]}).then((function(t){1==t.code?(n.getDetail(),n.$refs.uToast.show({type:"success",message:"保存成功",duration:"1000",complete:function(){setTimeout((function(){e.navigateBack(1)}),1e3)}})):0==t.code&&(n.$refs.uToast.show({type:"error",message:t.msg+",请完善全部信息"}),n.getDetail())}))},getDetail:function(){var n=this;e.$u.http.post("/api/user/index").then((function(t){if(1==t.code){var a=t.data.user_info;e.setStorageSync("userInfo",t.data.user_info),e.setStorageSync("niName",t.data.user_info.nickname),null!==a.birthday&&(n.birthday=a.birthday),null!==a.work&&(n.zhiYe=a.work),null!==a.diqu&&(n.area=a.diqu),null!==a.avatar&&(n.avatar=a.avatar,e.setStorageSync("avatar",n.avatar)),null!==a.nickname&&(n.nickname=a.nickname,e.setStorageSync("niName",n.nickname)),null!==a.gender&&(n.gender="1"==a.gender?"男":"女"),null!==a.realname&&(n.realname=a.realname)}}))},handelData:function(){var e=[],n=[],t=[];this.origiData.forEach((function(a){e.push(a.value),"北京市"==a.value&&a.children.forEach((function(e){n.push(e.value),"北京市"==e.value&&e.children.forEach((function(e){t.push(e.value)}))}))