You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
4.6 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/personalData/index"],{"04e0":function(t,e,o){"use strict";(function(t){o("ef82");n(o("66fd"));var e=n(o("d65d"));function n(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,o("543d")["createPage"])},"09fb":function(t,e,o){"use strict";o.d(e,"b",(function(){return i})),o.d(e,"c",(function(){return a})),o.d(e,"a",(function(){return n}));var n={regionPicker:function(){return Promise.all([o.e("common/vendor"),o.e("components/region-picker/region-picker")]).then(o.bind(null,"97c7"))}},i=function(){var t=this,e=t.$createElement;t._self._c},a=[]},2501:function(t,e,o){"use strict";o.r(e);var n=o("c45b"),i=o.n(n);for(var a in n)"default"!==a&&function(t){o.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},"8fb8":function(t,e,o){"use strict";var n=o("cd8a"),i=o.n(n);i.a},c45b:function(t,e,o){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=getApp(),n={data:function(){return{navTopHeight:o.globalData.menuTop+o.globalData.navTopHeight+20,form:{realName:"",idcard:"",phone:"",code:"",city:"请选择所在城市",profession:"",position:"请选择"},disabled:!1,second:60,positionArr:["企业负责人","高层管理者","中层管理者","基层管理者","普通员工"],timer:null,userInfo:""}},components:{},props:{},onLoad:function(e){this.setData({userInfo:t.getStorageSync("userInfo")}),this.userInfo.phone&&(this.setData({}),this.form.phone=this.userInfo.phone),o.globalData.inviterId&&this.bindInviter()},onReady:function(){},onShow:function(){if(t.getStorageSync("form")){var e=t.getStorageSync("form");this.form.position=e.position,this.form.code=e.code,this.form.idCard=e.idCard,this.form.city=e.city,this.form.realName=e.realName}},onHide:function(){},onUnload:function(){},onPullDownRefresh:function(){},onReachBottom:function(){},methods:{bindInviter:function(){o.http("get","user/bindInviter",{inviterId:o.globalData.inviterId}).then((function(t){t.data.success?console.log("绑定成功"):console.log("绑定失败")}))},setFormStorage:function(){t.setStorageSync("form",this.form)},changeName:function(t){this.setData({}),this.form.realName=t.detail.value,this.setFormStorage()},changePhone:function(t){this.setData({}),this.form.phone=t.detail.value},changeidCard:function(t){this.setData({}),this.form.idCard=t.detail.value,this.setFormStorage()},bindRegionChange:function(t){this.setData({}),this.form.city=t.detail.value.join(" "),this.setFormStorage()},bindPickerChange:function(t){this.setData({}),this.form.position=this.positionArr[t.detail.value],this.setFormStorage()},changeCode:function(t){this.setData({}),this.form.code=t.detail.value,this.setFormStorage()},toProfession:function(){t.navigateTo({url:"../profession/index"}),this.setFormStorage()},getPhoneNumber:function(e){var n=this;"getPhoneNumber:ok"==e.detail.errMsg&&o.http("post","wxapp/binding",{encryptedData:e.detail.encryptedData,iv:e.detail.iv}).then((function(e){e.data.success?(n.setData({}),n.form.phone=e.data.data.phone,t.showToast({title:e.data.msg})):t.showToast({title:e.data.msg,icon:"none"})}))},backPage:function(){t.navigateBack({delta:1})},sendCode:function(){var e=this,n=/^1[3456789]\d{9}$/;if(""!==this.form.phone)if(n.test(this.form.phone)){if(0==this.disabled){clearInterval(this.timer),this.setData({disabled:!0});var i=setInterval((function(){e.timeup()}),1e3);this.setData({timer:i})}o.http("post","user/getVerificationCode",{phone:this.form.phone}).then((function(e){e.data.success?t.showToast({title:"短信已发送!"}):t.showToast({title:e.data.msg,icon:"none"})}))}else t.showModal({title:"请输入有效的手机号码",type:"none"});else t.showModal({title:"手机号码不能为空",type:"none"})},timeup:function(){if(this.setData({second:this.second-1}),0==this.second)return this.second=60,this.setData({disabled:!1,second:60}),void clearInterval(this.timer)},toComplete:function(){var e={realName:this.form.realName,idCard:this.form.idCard,code:this.form.code,phone:this.form.phone,city:this.form.city,industry:this.form.pro