2025-04-01 09:03:51 +08:00

1 line
8.2 KiB
JavaScript

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)}))}))})),this.columns3.push(JSON.parse(JSON.stringify(e)),JSON.parse(JSON.stringify(n)),JSON.parse(JSON.stringify(t)))},formatter:function(e,n){return"year"===e?"".concat(n,"年"):"month"===e?"".concat(n,"月"):"day"===e?"".concat(n,"日"):n},clickLeft:function(){e.navigateBack(-1)},upload:function(){this.show5=!0},close:function(){this.show5=!1},clickAvatar:function(n){var t=this,a="";0==n?a="https://testy.hschool.com.cn//uploads/20241218/dea7681e46c3a2efbf3bdbab35ea2f66.png":1==n?a="https://testy.hschool.com.cn//uploads/20241218/961fef0bae1a3cc5381cec0bbffa5ea6.png":2==n?a="https://testy.hschool.com.cn//uploads/20241218/051a964f45acfaa9a4a7a9f2a8d7440c.png":3==n&&(a="https://testy.hschool.com.cn/uploads/20241218/1d0e2d8aabcd99a192dc3073c9bd7edb.png"),this.avatar=a,console.log(this.avatar,"this.avatar"),e.$u.http.post("/api/user/profile",{update_fields:["avatar"],avatar:a}).then((function(n){console.log(n),1==n.code&&(t.$refs.uToast.show({type:"success",message:"修改成功"}),e.setStorageSync("userInfo",u(u({},e.getStorageSync("userInfo")),{},{avatar:a})),t.show5=!1,t.getDetail())}))},confirm:function(e){console.log(e),this.gender=e.value[0].name,this.show=!1},confirm1:function(e){this.ages=e.value[0].name,this.show1=!1},confirm2:function(e){this.zhiYe=e.value[0].name,this.show2=!1},confirm3:function(e){this.birthday=(0,i.dateFormats)(e.value),this.show3=!1},confirm4:function(e){console.log(e),this.area=e.value[0]+e.value[1]+e.value[2],this.show4=!1},cancel:function(){this.show=!1,this.show1=!1,this.show2=!1,this.show3=!1,this.show4=!1},changeHandler:function(e){var n=e.columnIndex,t=e.value,a=(e.values,e.index,e.picker),o=void 0===a?this.$refs.uPicker:a;0===n&&this.origiData.forEach((function(e){if(t[0]==e.value){var n=[],a=e.children[0].value;e.children.forEach((function(e,t){if(n.push(e.value),n[0]==a){a="";var i=[];e.children.forEach((function(e){i.push(e.value)})),o.setColumnValues(2,i)}})),o.setColumnValues(1,n)}})),1===n&&this.origiData.forEach((function(e){if(t[0]==e.value){var n=[];e.children.forEach((function(e,a){if(n.push(e.value),t[1]==e.value){var i=[];e.children.forEach((function(e){i.push(e.value)})),o.setColumnValues(2,i)}}))}}))}}};n.default=c}).call(this,t("df3c")["default"])},"69ca":function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return a}));var a={uAvatar:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-avatar/u-avatar")]).then(t.bind(null,"7c3e"))},uIcon:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-icon/u-icon")]).then(t.bind(null,"3fd2"))},"u-Input":function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u--input/u--input")]).then(t.bind(null,"1ede"))},uButton:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-button/u-button")]).then(t.bind(null,"b2d7"))},uPicker:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-picker/u-picker")]).then(t.bind(null,"2ce3"))},uDatetimePicker:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-datetime-picker/u-datetime-picker")]).then(t.bind(null,"5ddb"))},uPopup:function(){return Promise.all([t.e("common/vendor"),t.e("node-modules/uview-ui/components/u-popup/u-popup")]).then(t.bind(null,"e6bd"))},uToast:function(){return t.e("node-modules/uview-ui/components/u-toast/u-toast").then(t.bind(null,"4bda"))}},o=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.show=!0},e.e1=function(n){e.show3=!0},e.e2=function(n){e.show2=!0})},i=[]},c942:function(e,n,t){"use strict";(function(e,n){var a=t("47a9");t("5e3a");a(t("3240"));var o=a(t("ed51"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},ed51:function(e,n,t){"use strict";t.r(n);var a=t("69ca"),o=t("4784");for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);t("0b82");var r=t("828b"),u=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);n["default"]=u.exports}},[["c942","common/runtime","common/vendor","packageA/common/vendor"]]]);