王总上门按摩后台代码
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.
 
 
 
 
 
shangmenanmo/public/h6/static/js/technician-pages-edit.812e5...

1 lines
21 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["technician-pages-edit"],{"3c75":function(e,t,i){"use strict";i.d(t,"b",(function(){return n})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){}));var n=function(){var e=this,t=e.$createElement,i=e._self._c||t;return e.isLoad?i("v-uni-view",{staticClass:"apply-pages"},[i("v-uni-view",{staticClass:"apply-form"},[i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("姓名")]),i("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",maxlength:"20",placeholder:e.rule[0].errorMsg},model:{value:e.form.coach_name,callback:function(t){e.$set(e.form,"coach_name",t)},expression:"form.coach_name"}})],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("性别")]),i("v-uni-view",{staticClass:"item-input flex-1 flex-y-center"},e._l(["男","女"],(function(t,n){return i("v-uni-view",{key:n,staticClass:"flex-y-center",class:[{"mr-lg":0==n}],style:{color:e.form.sex==n?e.primaryColor:""},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.form.sex=n}}},[i("i",{staticClass:"iconfont icon-xuanze mr-sm",class:[{"icon-xuanze-fill":e.form.sex==n}]}),e._v(e._s(t))])})),1)],1),i("v-uni-view",{staticClass:"flex-between ml-lg mr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("生日")]),i("v-uni-view",{staticClass:"item-input text flex-1"},[i("v-uni-picker",{attrs:{mode:"date",end:e.endYear,value:e.form.birthday},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"birthday")}}},[i("v-uni-view",{staticClass:"flex-between"},[e._v(e._s(e.form.birthday||"请选择")),i("i",{staticClass:"iconfont icon-right ml-sm",staticStyle:{"font-size":"28rpx"}})])],1)],1)],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("手机号")]),i("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",maxlength:"11",placeholder:e.rule[2].errorMsg},model:{value:e.form.mobile,callback:function(t){e.$set(e.form,"mobile",t)},expression:"form.mobile"}})],1),e.configInfo.short_code_status&&11==e.form.mobile.length&&e.form.mobile!==e.old_phone?i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("验证码")]),i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",maxlength:"6",placeholder:"请输入验证码"},model:{value:e.form.short_code,callback:function(t){e.$set(e.form,"short_code",t)},expression:"form.short_code"}}),i("v-uni-view",{style:{color:e.primaryColor},on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.toSend.apply(void 0,arguments)}}},[e._v(e._s(e.authTime>0?"重新获取("+e.authTime+"s)":"获取验证码"))])],1)],1):e._e(),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("从业年份")]),i("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"number",placeholder:e.rule[3].errorMsg},model:{value:e.form.work_time,callback:function(t){e.$set(e.form,"work_time",t)},expression:"form.work_time"}})],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text flex-y-center",staticStyle:{width:"230rpx"}},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("意向工作城市")]),i("v-uni-view",{staticClass:"item-input text flex-1"},[i("v-uni-picker",{attrs:{value:e.cityIndex,range:e.cityList,"range-key":"title"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"city")}}},[i("v-uni-view",{staticClass:"flex-between"},[e._v(e._s(-1!=e.cityIndex?e.cityList[e.cityIndex].title:"请选择")),i("i",{staticClass:"iconfont icon-right ml-sm",staticStyle:{"font-size":"28rpx"}})])],1)],1)],1),e.configInfo.plugAuth.store&&e.form.admin_id?i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg b-1px-b"},[i("v-uni-view",{staticClass:"item-text"},[e._v("挂靠门店")]),i("v-uni-view",{staticClass:"item-input text flex-1"},[i("v-uni-picker",{attrs:{value:e.storeIndex,range:e.storeList,"range-key":"title"},on:{change:function(t){arguments[0]=t=e.$handleEvent(t),e.pickerChange(t,"store")}}},[i("v-uni-view",{staticClass:"flex-between"},[i("v-uni-view",{staticClass:"max-400 ellipsis"},[e._v(e._s(-1!=e.storeIndex?e.storeList[e.storeIndex].title:"请选择"))]),i("i",{staticClass:"iconfont icon-right ml-sm",staticStyle:{"font-size":"28rpx"}})],1)],1)],1)],1):e._e(),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("所在地址")]),i("v-uni-view",{staticClass:"item-input text flex-1"},[i("v-uni-view",{staticClass:"flex-between",on:{click:function(t){t.stopPropagation(),arguments[0]=t=e.$handleEvent(t),e.toChooseLocation.apply(void 0,arguments)}}},[i("v-uni-view",[e._v(e._s(e.form.address||"点击右边图标设置"))]),i("i",{staticClass:"iconfont iconjuli ml-sm",style:{color:e.primaryColor}})],1)],1)],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center",staticStyle:{width:"auto"}},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v(e._s(e.$t("action.attendantName"))+"简介")]),i("v-uni-input",{staticClass:"item-input flex-1",attrs:{disabled:!0,type:"text"}})],1),i("v-uni-textarea",{staticClass:"item-textarea pd-lg",attrs:{maxlength:"300",placeholder:"输入"+e.$t("action.attendantName")+"简介"},model:{value:e.form.text,callback:function(t){e.$set(e.form,"text",t)},expression:"form.text"}}),i("v-uni-view",{staticClass:"text-right pb-lg pr-lg"},[e._v(e._s(e.form.text.length>300?300:e.form.text.length)+"/300")])],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("身份证号")]),i("v-uni-input",{staticClass:"item-input flex-1",attrs:{type:"text",placeholder:e.rule[7].errorMsg},model:{value:e.form.id_code,callback:function(t){e.$set(e.form,"id_code",t)},expression:"form.id_code"}})],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("身份证照片")]),i("v-uni-view",{staticClass:"item-input flex-1"},[e._v("图片大小不超过10M")])],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.id_card,imgtype:"id_card",imgclass:"md",text:"身份证人像面",imgsize:1},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}}),i("upload",{attrs:{imagelist:e.form.id_card_fan,imgtype:"id_card_fan",imgclass:"md",text:"身份证国徽面",imgsize:1},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.id_card_people,imgtype:"id_card_people",imgclass:"md",text:"手持身份证照片",imgsize:1},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("资格证书")]),i("v-uni-view",{staticClass:"item-input flex-1"},[e._v("图片大小不超过10M")])],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.license,imgtype:"license",text:"上传图片",imgsize:15},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)},del:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("工作形象照")]),i("v-uni-view",{staticClass:"item-input flex-1"},[e._v("图片建议尺寸: 750 * 750,大小不超过10M")])],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.work_img,imgtype:"work_img",text:"上传图片",imgsize:1},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text flex-y-center"},[i("i",{staticClass:"iconfont icon-required c-warning"}),e._v("个人生活照")]),i("v-uni-view",{staticClass:"item-input flex-1"},[e._v("图片建议尺寸: 750 * n,大小不超过10M")])],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.self_img,filetype:"picture",imgtype:"self_img",text:"上传图片",imgsize:9},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)},del:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"fill-base mt-md radius-16"},[i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg"},[i("v-uni-view",{staticClass:"item-text"},[e._v("个人视频介绍")]),i("v-uni-view",{staticClass:"item-input flex-1"},[e._v("视频大小不超过50M")])],1),i("v-uni-view",{staticClass:"flex-between pl-lg pr-lg pb-md"},[i("upload",{attrs:{imagelist:e.form.video,filetype:"video",imgtype:"video",text:"上传视频",imgsize:1},on:{upload:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)},del:function(t){arguments[0]=t=e.$handleEvent(t),e.imgUpload.apply(void 0,arguments)}}})],1)],1),i("v-uni-view",{staticClass:"flex-center f-caption c-caption pd-lg"},[e._v("编辑资料将进入重新审核,审核通过之前将显示原资料")])],1),i("v-uni-view",{staticClass:"space-max-footer"}),i("fix-bottom-button",{attrs:{text:[{text:"确定申请",type:"confirm"}],bgColor:"#fff"},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.submit.apply(void 0,arguments)}}})],1):e._e()},a=[]},"77c1":function(e,t,i){"use strict";i("6a54");var n=i("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0,i("fd3c"),i("dd2b"),i("bd06"),i("c223"),i("3efd"),i("5c47"),i("0506");var a=n(i("5de6")),s=n(i("9b1b")),r=n(i("2634")),l=n(i("2fdc")),o=n(i("39d8")),c=n(i("13f3")),u=i("8f59"),d={components:{wPicker:c.default},data:function(){var e;return{isLoad:!1,options:{},cityList:[],cityIndex:-1,storeList:[],storeIndex:0,old_phone:"",authTime:0,timer:null,coach_status:0,form:(e={id:0,admin_id:0,coach_name:"",mobile:"",short_code:"",sex:0,birthday:"",work_time:"",city_id:"",store_id:"",lng:"",lat:"",address:"",text:"",id_code:"",id_card:[],id_card_fan:[],id_card_people:[],license:[],work_img:[],self_img:[]},(0,o.default)(e,"city_id",""),(0,o.default)(e,"video",[]),e),rule:[{name:"coach_name",checkType:"isNotNull",errorMsg:"输入您的姓名",regType:2},{name:"birthday",checkType:"isNotNull",errorMsg:"请选择您的生日",regType:2},{name:"mobile",checkType:"isMobile",errorMsg:"输入手机号"},{name:"work_time",checkType:"isNotNull",errorMsg:"请输入从业年份,例如:5"},{name:"city_id",checkType:"isNotNull",errorMsg:"请选择意向工作城市"},{name:"address",checkType:"isNotNull",errorMsg:"请选择所在地址"},{name:"text",checkType:"isNotNull",errorMsg:"请输入"+this.$t("action.attendantName")+"简介",regType:2},{name:"id_code",checkType:"isIdCard",errorMsg:"输入您的身份证号码"},{name:"id_card",checkType:"isNotNull",errorMsg:"请上传身份证人像面"},{name:"id_card_fan",checkType:"isNotNull",errorMsg:"请上传身份证国徽面"},{name:"id_card_people",checkType:"isNotNull",errorMsg:"请上传手持身份证照片"},{name:"license",checkType:"isNotNull",errorMsg:"请上传资格证书"},{name:"work_img",checkType:"isNotNull",errorMsg:"请上传工作形象照"},{name:"self_img",checkType:"isNotNull",errorMsg:"请上传个人生活照"}],lockTap:!1}},computed:(0,u.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo},userInfo:function(e){return e.user.userInfo},location:function(e){return e.user.location}}),onLoad:function(e){var t=this;return(0,l.default)((0,r.default)().mark((function i(){var n,a,s,l,o;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=e,a=n.admin_id,s=void 0===a?0:a,l=n.is_edit,o=void 0===l?0:l,e.is_edit=o,!s){i.next=8;break}return i.next=5,t.updateCommonOptions(e);case 5:i.t0=i.sent,i.next=9;break;case 8:i.t0=e;case 9:return e=i.t0,t.options=e,t.form.admin_id=s,t.$util.showLoading(),i.next=15,t.initIndex();case 15:t.isLoad=!0;case 16:case"end":return i.stop()}}),i)})))()},onUnload:function(){this.timer&&clearInterval(this.timer)},methods:(0,s.default)((0,s.default)((0,s.default)({},(0,u.mapActions)(["getConfigInfo","getUserInfo","updateCommonOptions"])),(0,u.mapMutations)(["updateUserItem"])),{},{initIndex:function(){var e=arguments,t=this;return(0,l.default)((0,r.default)().mark((function i(){var n,a,s,l,o,c;return(0,r.default)().wrap((function(i){while(1)switch(i.prev=i.next){case 0:if(n=e.length>0&&void 0!==e[0]&&e[0],n||!t.$jweixin.isWechat()){i.next=5;break}return i.next=4,t.$jweixin.initJssdk();case 4:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 5:if(t.configInfo.id&&t.configInfo.hasOwnProperty("plugAuth")&&(!t.configInfo.hasOwnProperty("plugAuth")||t.configInfo.plugAuth.hasOwnProperty("store"))&&!n){i.next=8;break}return i.next=8,t.getConfigInfo();case 8:return i.next=10,t.getCityList();case 10:return t.$util.setNavigationBarColor({bg:t.primaryColor}),i.next=13,t.$api.technician.coachInfo();case 13:return a=i.sent,t.form.admin_id=a.id?a.admin_id:0,i.next=17,t.getStoreList();case 17:if(!a||a.id){i.next=20;break}return t.$util.hideAll(),i.abrupt("return");case 20:for(o in s=["id_card","license","self_img"],s.map((function(e){a[e]=a[e]&&a[e].length>0?a[e].map((function(e){return{path:e}})):[]})),a.id_card&&a.id_card.length>1&&(a.id_card_fan=[a.id_card[1]],a.id_card_people=[a.id_card[2]],a.id_card.splice(1,3)),l=["work_img","video"],l.map((function(e){a[e]=a[e]&&a[e].length>0?[{path:a[e]}]:[]})),a.birthday=a.birthday?t.$util.formatTime(1e3*a.birthday,"YY-M-D"):"",t.form)t.form[o]=a[o];c=["mobile","status"],c.map((function(e){t["mobile"==e?"old_phone":"coach_status"]=a[e]})),t.cityIndex=t.cityList.findIndex((function(e){return e.id==a.city_id})),t.storeIndndex=t.storeList.findIndex((function(e){return e.id==a.store_id})),t.$util.hideAll();case 32:case"end":return i.stop()}}),i)})))()},initRefresh:function(){this.initIndex(!0)},getCityList:function(){var e=this;return(0,l.default)((0,r.default)().mark((function t(){var i,n,a,s,l,o,c,u,d,f,p,m,v,g,x,h,w,_,b,y,C,k;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.location,i.lat){t.next=22;break}if(!e.$jweixin.isWechat()){t.next=21;break}return e.$util.showLoading(),t.next=6,e.$jweixin.wxReady2();case 6:return t.next=8,e.$jweixin.getWxLocation();case 8:if(n=t.sent,a=n.latitude,s=void 0===a?0:a,l=n.longitude,o=void 0===l?0:l,i={lng:o,lat:s,address:"定位失败",province:"",city:"",district:""},!s||!o){t.next=21;break}return c="".concat(s,",").concat(o),t.next=18,e.$api.base.getMapInfo({location:c});case 18:u=t.sent,d=JSON.parse(u),f=d.status,p=d.result,0==f&&(m=p.address,v=p.address_component,g=v.province,x=v.city,h=v.district,i={lng:o,lat:s,address:m,province:g,city:x,district:h});case 21:e.updateUserItem({key:"location",val:i});case 22:if(w=i,_=w.lng,b=void 0===_?0:_,y=w.lat,C=void 0===y?0:y,!C||!b){t.next=30;break}return t.next=26,e.$api.base.getCity({lng:b,lat:C});case 26:k=t.sent,e.$util.hideAll(),e.cityList=k,e.form.city_id=k.length>0?k[0].id:0;case 30:case"end":return t.stop()}}),t)})))()},getStoreList:function(){var e=this;return(0,l.default)((0,r.default)().mark((function t(){var i,n,a;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.form.admin_id,n=void 0===i?0:i,n){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,e.$api.mine.getStoreSelect({admin_id:n});case 5:a=t.sent,a.unshift({id:0,title:"不挂靠门店"}),e.storeList=a;case 8:case"end":return t.stop()}}),t)})))()},pickerChange:function(e,t){var i=e.target.value;if("birthday"===t){var n=this.$util.DateToUnix(i);return n>new Date(Math.ceil((new Date).getTime()))/1e3?void this.$util.showToast({title:"不能选择未来时间哦"}):void(this.form[t]=i)}this["".concat(t,"Index")]=i,this.form["".concat(t,"_id")]=this["".concat(t,"List")][i].id},toSend:function(){var e=this;return(0,l.default)((0,r.default)().mark((function t(){var i,n,a,s;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.authTime,!i){t.next=3;break}return t.abrupt("return");case 3:if(n=e.form.mobile,a=void 0===n?"":n,null!=a&&/^(1[0-9]{10})$/.test(a)){t.next=7;break}return e.$util.showToast({title:null==a?"请输入手机号":"".concat(a," 手机号无效")}),t.abrupt("return");case 7:if(!e.lockTap){t.next=9;break}return t.abrupt("return");case 9:return e.lockTap=!0,e.$util.showLoading(),t.prev=11,t.next=14,e.$api.user.sendShortMsg({phone:a});case 14:e.$util.hideAll(),e.lockTap=!1,s=60,e.timer=setInterval((function(){0!==s?(s--,e.authTime=s):clearInterval(e.timer)}),1e3),t.next=23;break;case 20:t.prev=20,t.t0=t["catch"](11),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 23:case"end":return t.stop()}}),t,null,[[11,20]])})))()},imgUpload:function(e){var t=e.imagelist,i=e.imgtype;this.form[i]=t},toChooseLocation:function(e){var t=this;return(0,l.default)((0,r.default)().mark((function e(){var i,n,s,l,o,c,u,d,f,p,m,v,g,x,h,w,_,b,y,C,k;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$util.checkAuth({type:"userLocation"});case 2:if(i=t.location,n=i.lat,s=void 0===n?"":n,l=i.lng,o=void 0===l?"":l,c=t.form,u=c.id,d=void 0===u?0:u,f=c.lat,p=c.lng,d&&(s=f,o=p),m={},s||o){e.next=18;break}if(!t.$jweixin.isWechat()){e.next=18;break}return t.$util.showLoading(),e.next=11,t.$jweixin.wxReady2();case 11:return e.next=13,t.$jweixin.getWxLocation();case 13:v=e.sent,g=v.latitude,x=v.longitude,s=g,o=x;case 18:return m={latitude:s,longitude:o},e.next=21,uni.chooseLocation(m);case 21:if(h=e.sent,w=(0,a.default)(h,2),_=w[1],b=_.address,y=void 0===b?"":b,C=_.longitude,k=_.latitude,y){e.next=30;break}return e.abrupt("return");case 30:t.form.address=y,t.form.lng=C,t.form.lat=k;case 33:case"end":return e.stop()}}),e)})))()},validate:function(e){var t=new this.$util.Validate;this.rule.map((function(i){var n=i.name;t.add(e[n],i)}));var i=t.start();return i},submit:function(){var e=this;return(0,l.default)((0,r.default)().mark((function t(){var i,n,a,s,l;return(0,r.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(i=e.$util.deepCopy(e.form),n=["id_card","id_card_fan","id_card_people","work_img","video"],n.map((function(e){i[e]=i[e]&&i[e].length>0?i[e][0].path:""})),i.license=i.license.map((function(e){return e.path})),i.self_img=i.self_img.map((function(e){return e.path})),a=e.validate(i),!a){t.next=9;break}return e.$util.showToast({title:a}),t.abrupt("return");case 9:if(i.birthday=e.$util.DateToUnix(i.birthday),i.id_card=[i.id_card,i.id_card_fan,i.id_card_people],delete i.id_card_fan,delete i.id_card_people,delete i.admin_id,s=e.old_phone,l=e.configInfo.short_code_status,!l||s==i.mobile||null!=i.short_code&&6==i.short_code.length){t.next=19;break}return e.$util.showToast({title:"请输入6位数短信验证码"}),t.abrupt("return");case 19:if(l&&s!=i.mobile||delete i.short_code,!e.lockTap){t.next=22;break}return t.abrupt("return");case 22:return e.lockTap=!0,e.$util.showLoading(),t.prev=24,t.next=27,e.$api.technician.coachUpdateV2(i);case 27:e.$util.hideAll(),e.$util.showToast({title:"提交成功"}),e.timer&&clearInterval(e.timer),setTimeout((function(){getCurrentPages().length>1&&e.$util.back(),e.$util.goUrl({url:"/pages/mine",openType:"reLaunch"})}),2e3),t.next=36;break;case 33:t.prev=33,t.t0=t["catch"](24),setTimeout((function(){e.lockTap=!1,e.$util.hideAll()}),2e3);case 36:case"end":return t.stop()}}),t,null,[[24,33]])})))()}})};t.default=d},ae69:function(e,t,i){"use strict";i.r(t);var n=i("3c75"),a=i("c996");for(var s in a)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return a[e]}))}(s);var r=i("828b"),l=Object(r["a"])(a["default"],n["b"],n["c"],!1,null,"e073bc68",null,!1,n["a"],void 0);t["default"]=l.exports},c996:function(e,t,i){"use strict";i.r(t);var n=i("77c1"),a=i.n(n);for(var s in n)["default"].indexOf(s)<0&&function(e){i.d(t,e,(function(){return n[e]}))}(s);t["default"]=a.a}}]);