intelligentGroup/unpackage/dist/build/mp-weixin/pageTwo/me/user.js

1 line
5.3 KiB
JavaScript
Raw Normal View History

2024-10-04 11:49:56 +08:00
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageTwo/me/user"],{"075e":function(t,e,n){},"207f":function(t,e,n){"use strict";n.r(e);var o=n("8c70"),s=n("93e1");for(var i in s)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return s[t]}))}(i);n("d300");var r=n("828b"),a=Object(r["a"])(s["default"],o["b"],o["c"],!1,null,"ed911dd6",null,!1,o["a"],void 0);e["default"]=a.exports},2853:function(t,e,n){"use strict";(function(t){var o=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=o(n("7ca3")),i=n("8f59");function r(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}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,s.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 u={data:function(){var t;return{sexItem:["男","女"],userInfo:(t={name:"",phone:"",place:"",provide:"",orgname:"",orgid:"",posname:"",posid:"",birthday:"",industryid:"",industryname:"",sex:"",avatar:"",avatarurl:""},(0,s.default)(t,"birthday",""),(0,s.default)(t,"demand",""),(0,s.default)(t,"email",""),(0,s.default)(t,"interests",""),t),checkbox:[],addNeeds:[]}},computed:a(a({},(0,i.mapState)(["user","HomeContent"])),{},{endDate:function(){return this.$tools.getDate("start")},industrylist:function(){return this.HomeContent.industrylist},poslist:function(){return this.HomeContent.poslist},orglist:function(){return this.HomeContent.orglist}}),onLoad:function(){var t=this;this.addNeeds=this.$json.addNeeds,this.userInfo=this.user.name?this.user:{},this.userInfo.industryname=this.user.industryid?this.industrylist[t.industrylist.findIndex((function(e){return e.id===t.userInfo.industryid}))].name:"",this.checkbox=this.userInfo.demand?this.userInfo.demand.split(","):[]},methods:{confirmInfo:function(){this.userInfo.industryname?this.userInfo.orgname?this.userInfo.posname?this.userInfo.name?this.userInfo.phone?this.userInfo.avatarurl?this.userInfo.sex?this.userInfo.birthday?(console.log("提交",this.userInfo),this.subInfo(this.userInfo)):this.$tools.msg("请选择出生日期"):this.$tools.msg("请选择性别"):this.$tools.msg("请上传个人照片"):this.$tools.msg("请输入手机号"):this.$tools.msg("请输入姓名"):this.$tools.msg("请选择智照团职务"):this.$tools.msg("请选择所属委员会"):this.$tools.msg("请选择所属行业")},subInfo:function(e){var n=this;n.$model.getUserSubmit(e).then((function(e){0==e.code?(t.showToast({title:"修改成功",duration:2e3}),n.$store.dispatch("getUserInfo"),setTimeout((function(){t.navigateBack({delta:2})}),2e3)):n.$tools.msg(e.message)}))},handleimage:function(e){var n=this;t.chooseImage({count:1,sourceType:["album","camera"],success:function(e){console.log(e.tempFilePaths[0]),t.showLoading({title:"识别中..."}),n.$model.getUpLoadimg({uploadpath:e.tempFilePaths[0]}).then((function(e){t.hideLoading(),0==e.code?(n.userInfo.avatarurl=e.data.url,n.userInfo.avatar=e.data.path):n.$tools.msg("不支持该图像")}))}})},bindDateChange:function(t){this.userInfo.birthday=t.target.value},onsexArr:function(t){this.userInfo.sex="男"==this.sexItem[t.target.value]?1:2},changeIndustry:function(t){this.userInfo.industryname=this.HomeContent.industrylist[t.target.value].name,this.userInfo.industryid=this.HomeContent.industrylist[t.target.value].id,console.log("e",t.target.value)},changeOrg:function(t){this.userInfo.orgname=this.HomeContent.orglist[t.target.value].name,this.userInfo.orgid=this.HomeContent.orglist[t.target.value].id,console.log("e",t.target.value)},changePos:function(t){this.userInfo.posname=this.HomeContent.poslist[t.target.value].name,this.userInfo.posid=this.HomeContent.poslist[t.target.value].id,console.log("e",t.target.value,this