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 lines
36 KiB
1 lines
36 KiB
{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/technician/pages/edit.vue?d892","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/technician/pages/edit.vue?c4f4","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/technician/pages/edit.vue?c9e5","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/technician/pages/edit.vue?f2c5","uni-app:///technician/pages/edit.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","components","wPicker","data","isLoad","options","cityList","cityIndex","storeList","storeIndex","old_phone","authTime","timer","coach_status","form","id","admin_id","coach_name","mobile","short_code","sex","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","rule","name","checkType","errorMsg","regType","lockTap","computed","primaryColor","subColor","configInfo","userInfo","location","onLoad","is_edit","onUnload","methods","initIndex","refresh","bg","imgArr","path","imgArrs","textArr","item","initRefresh","getCityList","key","val","city","getStoreList","title","pickerChange","toSend","phone","time","clearInterval","setTimeout","imgUpload","imagelist","e","imgtype","toChooseLocation","type","addrLat","addrLng","locaLat","locaLng","param","uni","longitude","latitude","validate","submit","arr","msg","short_code_status","length","url","openType"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,aAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAiH;AACjH;AACwD;AACL;;;AAGnD;AAC0M;AAC1M,gBAAgB,iNAAU;AAC1B,EAAE,0EAAM;AACR,EAAE,+EAAM;AACR,EAAE,wFAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,mFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACvCA;AAAA;AAAA;AAAA;AAAoyB,CAAgB,kyBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACoLxzB;AAIA;AAAA;AAAA;EAAA;IAAA;EAAA;AAAA;AAAA,eACA;EACAC;IACAC;EACA;EACAC;IAAA;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;QACAC;QACAC;QACAC;QAAA;QACAC;QAAA;QACAC;QACAC;QAAA;QACAC;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QACAC;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;QAAA;QACAC;MAAA,mDACA,mDACA,WACA;MACAC;QACAC;QACAC;QACAC;QACAC;MACA;QACAH;QACAC;QACAC;QACAC;MACA;QACAH;QACAC;QACAC;MACA;QACAF;QACAC;QACAC;MACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA;QACAF;QACAC;QACAC;QACAC;MACA;QACAH;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,GACA;QACAF;QACAC;QACAC;MACA,EACA;MACAE;IACA;EACA;EACAC;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;EACA;EACAC;IAAA;IAAA;MAAA;MAAA;QAAA;UAAA;YAAA;cAAA,WAIA3C,sCAFAW,uGACAiC;cAEA5C;cAAA,KACAW;gBAAA;gBAAA;cAAA;cAAA;cAAA;YAAA;cAAA;cAAA;cAAA;YAAA;cAAA;YAAA;cAAAX;cACA;cACA;cACA;cAAA;cAAA,OACA;YAAA;cACA;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA;EACA;EACA6C;IACA;EACA;EACAC,uDACA,iFACA;IACAC;MAAA;QAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAAC;gBAAA,MASA,2DACA,gDACA,0DACA;kBAAA;kBAAA;gBAAA;gBAAA;gBAAA,OACA;cAAA;gBAAA;gBAAA,OAEA;cAAA;gBACA;kBACAC;gBACA;gBAAA;gBAAA,OACA;cAAA;gBAAAnD;gBACA;gBAAA;gBAAA,OACA;cAAA;gBAAA,MAEAA;kBAAA;kBAAA;gBAAA;gBACA;gBAAA;cAAA;gBAGAoD;gBACAA;kBACApD;oBACA;sBACAqD;oBACA;kBACA;gBACA;gBACA;kBACArD;kBACAA;kBACAA;gBACA;gBACAsD;gBACAA;kBACAtD;oBACAqD;kBACA;gBACA;gBAEArD;gBACA;kBACA;gBACA;gBACAuD;gBACAA;kBACA,+DACAC;gBACA;gBACA;kBACA;gBACA;gBACA;kBACA;gBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAC;MACA;IACA;IACAC;MA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","file":"technician/pages/edit.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './technician/pages/edit.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./edit.vue?vue&type=template&id=2ed21b3c&\"\nvar renderjs\nimport script from \"./edit.vue?vue&type=script&lang=js&\"\nexport * from \"./edit.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"technician/pages/edit.vue\"\nexport default component.exports","export * from \"-!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./edit.vue?vue&type=template&id=2ed21b3c&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n var g0 = _vm.isLoad\n ? _vm.configInfo.short_code_status &&\n _vm.form.mobile.length == 11 &&\n _vm.form.mobile !== _vm.old_phone\n : null\n var m0 = _vm.isLoad ? _vm.$t(\"action.attendantName\") : null\n var m1 = _vm.isLoad ? _vm.$t(\"action.attendantName\") : null\n var g1 = _vm.isLoad ? _vm.form.text.length : null\n var g2 = _vm.isLoad && !(g1 > 300) ? _vm.form.text.length : null\n if (!_vm._isMounted) {\n _vm.e0 = function ($event, index) {\n var _temp = arguments[arguments.length - 1].currentTarget.dataset,\n _temp2 = _temp.eventParams || _temp[\"event-params\"],\n index = _temp2.index\n var _temp, _temp2\n $event.stopPropagation()\n _vm.form.sex = index\n }\n }\n _vm.$mp.data = Object.assign(\n {},\n {\n $root: {\n g0: g0,\n m0: m0,\n m1: m1,\n g1: g1,\n g2: g2,\n },\n }\n )\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./edit.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./edit.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view class=\"apply-pages\" v-if=\"isLoad\">\r\n\t\t<view class=\"apply-form\">\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>姓名</view>\r\n\t\t\t\t\t<input v-model=\"form.coach_name\" type=\"text\" class=\"item-input flex-1\" maxlength=\"20\"\r\n\t\t\t\t\t\t:placeholder=\"rule[0].errorMsg\" />\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>性别</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1 flex-y-center\">\r\n\t\t\t\t\t\t<view @tap.stop=\"form.sex = index\" class=\"flex-y-center\" :class=\"[{'mr-lg':index==0}]\"\r\n\t\t\t\t\t\t\t:style=\"{color:form.sex == index ? primaryColor:''}\" v-for=\"(item,index) in ['男','女']\"\r\n\t\t\t\t\t\t\t:key=\"index\"><i class=\"iconfont icon-xuanze mr-sm\"\r\n\t\t\t\t\t\t\t\t:class=\"[{'icon-xuanze-fill':form.sex == index}]\"></i>{{item}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between ml-lg mr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>生日</view>\r\n\t\t\t\t\t<view class=\"item-input text flex-1\">\r\n\t\t\t\t\t\t<picker @change=\"pickerChange($event,'birthday')\" mode=\"date\" :end=\"endYear\"\r\n\t\t\t\t\t\t\t:value=\"form.birthday\">\r\n\t\t\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t\t\t{{form.birthday||'请选择'}}\r\n\t\t\t\t\t\t\t\t<i class=\"iconfont icon-right ml-sm\" style=\"font-size: 28rpx;\"></i>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</picker>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>手机号</view>\r\n\t\t\t\t\t<input v-model=\"form.mobile\" type=\"text\" class=\"item-input flex-1\" maxlength=\"11\"\r\n\t\t\t\t\t\t:placeholder=\"rule[2].errorMsg\" />\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\"\r\n\t\t\t\t\tv-if=\"configInfo.short_code_status && form.mobile.length==11 &&form.mobile !== old_phone\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>验证码</view>\r\n\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t<input v-model=\"form.short_code\" type=\"text\" class=\"item-input flex-1\" maxlength=\"6\"\r\n\t\t\t\t\t\t\tplaceholder=\"请输入验证码\" />\r\n\t\t\t\t\t\t<view @tap.stop=\"toSend\" :style=\"{color:primaryColor}\">\r\n\t\t\t\t\t\t\t{{authTime>0?`重新获取(${authTime}s)`:'获取验证码'}}\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>从业年份</view>\r\n\t\t\t\t\t<input v-model=\"form.work_time\" type=\"number\" class=\"item-input flex-1\"\r\n\t\t\t\t\t\t:placeholder=\"rule[3].errorMsg\" />\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\" style=\"width:230rpx\"><i\r\n\t\t\t\t\t\t\tclass=\"iconfont icon-required c-warning\"></i>意向工作城市</view>\r\n\t\t\t\t\t<view class=\"item-input text flex-1\">\r\n\t\t\t\t\t\t<picker @change=\"pickerChange($event,'city')\" :value=\"cityIndex\" :range=\"cityList\"\r\n\t\t\t\t\t\t\trange-key=\"title\">\r\n\t\t\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t\t\t{{cityIndex!=-1?cityList[cityIndex].title:'请选择'}}\r\n\t\t\t\t\t\t\t\t<i class=\"iconfont icon-right ml-sm\" style=\"font-size: 28rpx;\"></i>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</picker>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg b-1px-b\" v-if=\"configInfo.plugAuth.store && form.admin_id\">\r\n\t\t\t\t\t<view class=\"item-text\">挂靠门店</view>\r\n\t\t\t\t\t<view class=\"item-input text flex-1\">\r\n\t\t\t\t\t\t<picker @change=\"pickerChange($event,'store')\" :value=\"storeIndex\" :range=\"storeList\"\r\n\t\t\t\t\t\t\trange-key=\"title\">\r\n\t\t\t\t\t\t\t<view class=\"flex-between\">\r\n\t\t\t\t\t\t\t\t<view class=\"max-400 ellipsis\">{{storeIndex!=-1?storeList[storeIndex].title:'请选择'}}\r\n\t\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t\t\t<i class=\"iconfont icon-right ml-sm\" style=\"font-size: 28rpx;\"></i>\r\n\t\t\t\t\t\t\t</view>\r\n\t\t\t\t\t\t</picker>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>所在地址</view>\r\n\t\t\t\t\t<view class=\"item-input text flex-1\">\r\n\t\t\t\t\t\t<view @tap.stop=\"toChooseLocation\" class=\"flex-between\">\r\n\t\t\t\t\t\t\t<view>{{form.address || `点击右边图标设置`}}</view>\r\n\t\t\t\t\t\t\t<i class=\"iconfont iconjuli ml-sm\" :style=\"{color: primaryColor}\"></i>\r\n\t\t\t\t\t\t</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\" style=\"width:auto\"><i\r\n\t\t\t\t\t\t\tclass=\"iconfont icon-required c-warning\"></i>{{$t('action.attendantName')}}简介</view>\r\n\t\t\t\t\t<input :disabled=\"true\" type=\"text\" class=\"item-input flex-1\" />\r\n\t\t\t\t</view>\r\n\t\t\t\t<textarea v-model=\"form.text\" class=\"item-textarea pd-lg\" maxlength=\"300\"\r\n\t\t\t\t\t:placeholder=\"'输入'+$t('action.attendantName')+'简介'\" />\r\n\t\t\t\t<view class=\"text-right pb-lg pr-lg\">\r\n\t\t\t\t\t{{form.text.length>300?300:form.text.length}}/300\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>身份证号</view>\r\n\t\t\t\t\t<input v-model=\"form.id_code\" type=\"text\" class=\"item-input flex-1\"\r\n\t\t\t\t\t\t:placeholder=\"rule[7].errorMsg\" />\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>身份证照片</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1\">图片大小不超过10M</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" :imagelist=\"form.id_card\" imgtype=\"id_card\" imgclass=\"md\" text=\"身份证人像面\"\r\n\t\t\t\t\t\t:imgsize=\"1\"></upload>\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" :imagelist=\"form.id_card_fan\" imgtype=\"id_card_fan\" imgclass=\"md\"\r\n\t\t\t\t\t\ttext=\"身份证国徽面\" :imgsize=\"1\"></upload>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" :imagelist=\"form.id_card_people\" imgtype=\"id_card_people\" imgclass=\"md\"\r\n\t\t\t\t\t\ttext=\"手持身份证照片\" :imgsize=\"1\"></upload>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>资格证书</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1\">图片大小不超过10M</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" @del=\"imgUpload\" :imagelist=\"form.license\" imgtype=\"license\" text=\"上传图片\"\r\n\t\t\t\t\t\t:imgsize=\"15\">\r\n\t\t\t\t\t</upload>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>工作形象照</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1\">图片建议尺寸: 750 * 750,大小不超过10M</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" :imagelist=\"form.work_img\" imgtype=\"work_img\" text=\"上传图片\" :imgsize=\"1\">\r\n\t\t\t\t\t</upload>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text flex-y-center\"><i class=\"iconfont icon-required c-warning\"></i>个人生活照</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1\">图片建议尺寸: 750 * n,大小不超过10M</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" @del=\"imgUpload\" :imagelist=\"form.self_img\" filetype=\"picture\"\r\n\t\t\t\t\t\timgtype=\"self_img\" text=\"上传图片\" :imgsize=\"9\">\r\n\t\t\t\t\t</upload>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"fill-base mt-md radius-16\">\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg\">\r\n\t\t\t\t\t<view class=\"item-text\">个人视频介绍</view>\r\n\t\t\t\t\t<view class=\"item-input flex-1\">视频大小不超过50M</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"flex-between pl-lg pr-lg pb-md\">\r\n\t\t\t\t\t<upload @upload=\"imgUpload\" @del=\"imgUpload\" :imagelist=\"form.video\" filetype=\"video\"\r\n\t\t\t\t\t\timgtype=\"video\" text=\"上传视频\" :imgsize=\"1\">\r\n\t\t\t\t\t</upload>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"flex-center f-caption c-caption pd-lg\">\r\n\t\t\t\t编辑资料将进入重新审核,审核通过之前将显示原资料\r\n\t\t\t</view>\r\n\t\t</view>\r\n\r\n\t\t<view class=\"space-max-footer\"></view>\r\n\r\n\t\t<fix-bottom-button @confirm=\"submit\" :text=\"[{text:'确定申请',type:'confirm'}]\" bgColor=\"#fff\">\r\n\t\t</fix-bottom-button>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport wPicker from \"@/components/w-picker/w-picker.vue\";\r\n\timport {\r\n\t\tmapState,\r\n\t\tmapActions,\r\n\t\tmapMutations\r\n\t} from \"vuex\"\r\n\texport default {\r\n\t\tcomponents: {\r\n\t\t\twPicker\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tisLoad: false,\r\n\t\t\t\toptions: {},\r\n\t\t\t\tcityList: [],\r\n\t\t\t\tcityIndex: -1,\r\n\t\t\t\tstoreList: [],\r\n\t\t\t\tstoreIndex: 0,\r\n\t\t\t\told_phone: '',\r\n\t\t\t\tauthTime: 0,\r\n\t\t\t\ttimer: null,\r\n\t\t\t\tcoach_status: 0,\r\n\t\t\t\tform: {\r\n\t\t\t\t\tid: 0,\r\n\t\t\t\t\tadmin_id: 0,\r\n\t\t\t\t\tcoach_name: '', //姓名 \r\n\t\t\t\t\tmobile: '', //手机号 \r\n\t\t\t\t\tshort_code: '',\r\n\t\t\t\t\tsex: 0, //性别 \r\n\t\t\t\t\tbirthday: '',\r\n\t\t\t\t\twork_time: '', //从业年份 \r\n\t\t\t\t\tcity_id: '', //城市 \r\n\t\t\t\t\tstore_id: '', //门店\r\n\t\t\t\t\tlng: '',\r\n\t\t\t\t\tlat: '',\r\n\t\t\t\t\taddress: '', //详细地址 \r\n\t\t\t\t\ttext: '', //备注 \r\n\t\t\t\t\tid_code: '', //身份证号\r\n\t\t\t\t\tid_card: [], //身份证\r\n\t\t\t\t\tid_card_fan: [], // 身份证反面\r\n\t\t\t\t\tid_card_people: [], //手持身份证\r\n\t\t\t\t\tlicense: [], //资格证书\r\n\t\t\t\t\twork_img: [], // 工作照\r\n\t\t\t\t\tself_img: [], // 生活照\r\n\t\t\t\t\tcity_id: '', // 城市 id\r\n\t\t\t\t\tvideo: [],\r\n\t\t\t\t},\r\n\t\t\t\trule: [{\r\n\t\t\t\t\t\tname: \"coach_name\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"输入您的姓名\",\r\n\t\t\t\t\t\tregType: 2\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"birthday\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请选择您的生日\",\r\n\t\t\t\t\t\tregType: 2\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"mobile\",\r\n\t\t\t\t\t\tcheckType: \"isMobile\",\r\n\t\t\t\t\t\terrorMsg: \"输入手机号\"\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"work_time\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请输入从业年份,例如:5\"\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"city_id\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请选择意向工作城市\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"address\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请选择所在地址\"\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"text\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请输入\" + this.$t('action.attendantName') + \"简介\",\r\n\t\t\t\t\t\tregType: 2\r\n\t\t\t\t\t}, {\r\n\t\t\t\t\t\tname: \"id_code\",\r\n\t\t\t\t\t\tcheckType: \"isIdCard\",\r\n\t\t\t\t\t\terrorMsg: \"输入您的身份证号码\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"id_card\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传身份证人像面\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"id_card_fan\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传身份证国徽面\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"id_card_people\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传手持身份证照片\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"license\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传资格证书\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"work_img\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传工作形象照\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tname: \"self_img\",\r\n\t\t\t\t\t\tcheckType: \"isNotNull\",\r\n\t\t\t\t\t\terrorMsg: \"请上传个人生活照\"\r\n\t\t\t\t\t},\r\n\t\t\t\t],\r\n\t\t\t\tlockTap: false\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: mapState({\r\n\t\t\tprimaryColor: state => state.config.configInfo.primaryColor,\r\n\t\t\tsubColor: state => state.config.configInfo.subColor,\r\n\t\t\tconfigInfo: state => state.config.configInfo,\r\n\t\t\tuserInfo: state => state.user.userInfo,\r\n\t\t\tlocation: state => state.user.location,\r\n\t\t}),\r\n\t\tasync onLoad(options) {\r\n\t\t\tlet {\r\n\t\t\t\tadmin_id = 0,\r\n\t\t\t\t\tis_edit = 0\r\n\t\t\t} = options\r\n\t\t\toptions.is_edit = is_edit\r\n\t\t\toptions = admin_id ? await this.updateCommonOptions(options) : options\r\n\t\t\tthis.options = options\r\n\t\t\tthis.form.admin_id = admin_id\r\n\t\t\tthis.$util.showLoading()\r\n\t\t\tawait this.initIndex()\r\n\t\t\tthis.isLoad = true\r\n\t\t},\r\n\t\tonUnload() {\r\n\t\t\tif (this.timer) clearInterval(this.timer)\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t...mapActions(['getConfigInfo', 'getUserInfo', 'updateCommonOptions']),\r\n\t\t\t...mapMutations(['updateUserItem']),\r\n\t\t\tasync initIndex(refresh = false) {\r\n\t\t\t\t// #ifdef H5\r\n\t\t\t\tif (!refresh && this.$jweixin.isWechat()) {\r\n\t\t\t\t\tawait this.$jweixin.initJssdk();\r\n\t\t\t\t\tthis.$jweixin.wxReady(() => {\r\n\t\t\t\t\t\tthis.$jweixin.hideOptionMenu()\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\t\t\t\tif (!this.configInfo.id || !this.configInfo.hasOwnProperty(\r\n\t\t\t\t\t\t'plugAuth') || (this.configInfo.hasOwnProperty(\r\n\t\t\t\t\t\t'plugAuth') && !this.configInfo.plugAuth.hasOwnProperty(\r\n\t\t\t\t\t\t'store')) || refresh) {\r\n\t\t\t\t\tawait this.getConfigInfo()\r\n\t\t\t\t}\r\n\t\t\t\tawait this.getCityList()\r\n\t\t\t\tthis.$util.setNavigationBarColor({\r\n\t\t\t\t\tbg: this.primaryColor\r\n\t\t\t\t})\r\n\t\t\t\tlet data = await this.$api.technician.coachInfo()\r\n\t\t\t\tthis.form.admin_id = data.id ? data.admin_id : 0\r\n\t\t\t\tawait this.getStoreList()\r\n\r\n\t\t\t\tif (data && !data.id) {\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tlet imgArr = ['id_card', 'license', 'self_img']\r\n\t\t\t\timgArr.map(item => {\r\n\t\t\t\t\tdata[item] = data[item] && data[item].length > 0 ? data[item].map(aitem => {\r\n\t\t\t\t\t\treturn {\r\n\t\t\t\t\t\t\tpath: aitem\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}) : []\r\n\t\t\t\t})\r\n\t\t\t\tif (data.id_card && data.id_card.length > 1) {\r\n\t\t\t\t\tdata.id_card_fan = [data.id_card[1]]\r\n\t\t\t\t\tdata.id_card_people = [data.id_card[2]]\r\n\t\t\t\t\tdata.id_card.splice(1, 3)\r\n\t\t\t\t}\r\n\t\t\t\tlet imgArrs = ['work_img', 'video']\r\n\t\t\t\timgArrs.map(item => {\r\n\t\t\t\t\tdata[item] = data[item] && data[item].length > 0 ? [{\r\n\t\t\t\t\t\tpath: data[item]\r\n\t\t\t\t\t}] : []\r\n\t\t\t\t})\r\n\r\n\t\t\t\tdata.birthday = data.birthday ? this.$util.formatTime(data.birthday * 1000, 'YY-M-D') : ''\r\n\t\t\t\tfor (let key in this.form) {\r\n\t\t\t\t\tthis.form[key] = data[key]\r\n\t\t\t\t}\r\n\t\t\t\tlet textArr = ['mobile', 'status']\r\n\t\t\t\ttextArr.map(item => {\r\n\t\t\t\t\tthis[item == 'mobile' ? `old_phone` : 'coach_status'] = data[\r\n\t\t\t\t\t\titem]\r\n\t\t\t\t})\r\n\t\t\t\tthis.cityIndex = this.cityList.findIndex(item => {\r\n\t\t\t\t\treturn item.id == data.city_id\r\n\t\t\t\t})\r\n\t\t\t\tthis.storeIndndex = this.storeList.findIndex(item => {\r\n\t\t\t\t\treturn item.id == data.store_id\r\n\t\t\t\t})\r\n\t\t\t\tthis.$util.hideAll()\r\n\t\t\t},\r\n\t\t\tinitRefresh() {\r\n\t\t\t\tthis.initIndex(true)\r\n\t\t\t},\r\n\t\t\tasync getCityList() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlocation\r\n\t\t\t\t} = this\r\n\t\t\t\tif (!location.lat) {\r\n\t\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\t\t\t// await this.$jweixin.initJssdk();\r\n\t\t\t\t\t\tawait this.$jweixin.wxReady2();\r\n\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\tlatitude: lat = 0,\r\n\t\t\t\t\t\t\tlongitude: lng = 0\r\n\t\t\t\t\t\t} = await this.$jweixin.getWxLocation()\r\n\t\t\t\t\t\tlocation = {\r\n\t\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\t\tlat,\r\n\t\t\t\t\t\t\taddress: '定位失败',\r\n\t\t\t\t\t\t\tprovince: '',\r\n\t\t\t\t\t\t\tcity: '',\r\n\t\t\t\t\t\t\tdistrict: ''\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tif (lat && lng) {\r\n\t\t\t\t\t\t\tlet key = `${lat},${lng}`\r\n\t\t\t\t\t\t\tlet data = await this.$api.base.getMapInfo({\r\n\t\t\t\t\t\t\t\tlocation: key\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\tstatus,\r\n\t\t\t\t\t\t\t\tresult\r\n\t\t\t\t\t\t\t} = JSON.parse(data)\r\n\t\t\t\t\t\t\tif (status == 0) {\r\n\t\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\t\taddress,\r\n\t\t\t\t\t\t\t\t\taddress_component\r\n\t\t\t\t\t\t\t\t} = result\r\n\t\t\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\t\t\tcity,\r\n\t\t\t\t\t\t\t\t\tdistrict\r\n\t\t\t\t\t\t\t\t} = address_component\r\n\t\t\t\t\t\t\t\tlocation = {\r\n\t\t\t\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\t\t\t\tlat,\r\n\t\t\t\t\t\t\t\t\taddress,\r\n\t\t\t\t\t\t\t\t\tprovince,\r\n\t\t\t\t\t\t\t\t\tcity,\r\n\t\t\t\t\t\t\t\t\tdistrict\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\t// #ifndef H5\r\n\t\t\t\t\tlocation = await this.$util.getBmapLocation()\r\n\t\t\t\t\t// #endif\r\n\r\n\t\t\t\t\tthis.updateUserItem({\r\n\t\t\t\t\t\tkey: 'location',\r\n\t\t\t\t\t\tval: location\r\n\t\t\t\t\t})\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlng = 0,\r\n\t\t\t\t\t\tlat = 0\r\n\t\t\t\t} = location\r\n\t\t\t\tif (lat && lng) {\r\n\t\t\t\t\tlet city = await this.$api.base.getCity({\r\n\t\t\t\t\t\tlng,\r\n\t\t\t\t\t\tlat\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\tthis.cityList = city\r\n\t\t\t\t\tthis.form.city_id = city.length > 0 ? city[0].id : 0\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tasync getStoreList() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tadmin_id = 0\r\n\t\t\t\t} = this.form\r\n\t\t\t\tif (!admin_id) return\r\n\t\t\t\tlet data = await this.$api.mine.getStoreSelect({\r\n\t\t\t\t\tadmin_id\r\n\t\t\t\t})\r\n\t\t\t\tdata.unshift({\r\n\t\t\t\t\tid: 0,\r\n\t\t\t\t\ttitle: '不挂靠门店'\r\n\t\t\t\t})\r\n\t\t\t\tthis.storeList = data\r\n\t\t\t},\r\n\t\t\tpickerChange(e, key) {\r\n\t\t\t\tlet ind = e.target.value\r\n\t\t\t\tif (key === 'birthday') {\r\n\t\t\t\t\tlet unix = this.$util.DateToUnix(ind)\r\n\t\t\t\t\tif (unix > new Date(Math.ceil(new Date().getTime())) / 1000) {\r\n\t\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\t\ttitle: `不能选择未来时间哦`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\treturn\r\n\t\t\t\t\t}\r\n\t\t\t\t\tthis.form[key] = ind\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tthis[`${key}Index`] = ind\r\n\t\t\t\tthis.form[`${key}_id`] = this[`${key}List`][ind].id\r\n\t\t\t},\r\n\t\t\t// 发送验证码\r\n\t\t\tasync toSend() {\r\n\t\t\t\tlet {\r\n\t\t\t\t\tauthTime\r\n\t\t\t\t} = this\r\n\t\t\t\tif (authTime) return\r\n\t\t\t\tlet {\r\n\t\t\t\t\tmobile = ''\r\n\t\t\t\t} = this.form\r\n\t\t\t\tif (mobile == null || !/^(1[0-9]{10})$/.test(mobile)) {\r\n\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\ttitle: mobile == null ? `请输入手机号` : `${mobile} 手机号无效`\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tif (this.lockTap) return\r\n\t\t\t\tthis.lockTap = true\r\n\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\ttry {\r\n\t\t\t\t\tawait this.$api.user.sendShortMsg({\r\n\t\t\t\t\t\tphone: mobile\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\tthis.lockTap = false\r\n\t\t\t\t\tlet time = 60\r\n\t\t\t\t\tthis.timer = setInterval(() => {\r\n\t\t\t\t\t\tif (time === 0) {\r\n\t\t\t\t\t\t\tclearInterval(this.timer)\r\n\t\t\t\t\t\t\treturn\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\ttime--\r\n\t\t\t\t\t\tthis.authTime = time\r\n\t\t\t\t\t}, 1000)\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthis.lockTap = false\r\n\t\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\t}, 2000)\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\timgUpload(e) {\r\n\t\t\t\tlet {\r\n\t\t\t\t\timagelist,\r\n\t\t\t\t\timgtype\r\n\t\t\t\t} = e;\r\n\t\t\t\tthis.form[imgtype] = imagelist;\r\n\t\t\t},\r\n\t\t\t// 选择地区\r\n\t\t\tasync toChooseLocation(e) {\r\n\t\t\t\tawait this.$util.checkAuth({\r\n\t\t\t\t\ttype: 'userLocation'\r\n\t\t\t\t})\r\n\t\t\t\tlet {\r\n\t\t\t\t\tlat: locaLat = '',\r\n\t\t\t\t\tlng: locaLng = ''\r\n\t\t\t\t} = this.location\r\n\t\t\t\tlet {\r\n\t\t\t\t\tid = 0,\r\n\t\t\t\t\t\tlat: addrLat,\r\n\t\t\t\t\t\tlng: addrLng\r\n\t\t\t\t} = this.form\r\n\r\n\t\t\t\tif (id) {\r\n\t\t\t\t\tlocaLat = addrLat\r\n\t\t\t\t\tlocaLng = addrLng\r\n\t\t\t\t}\r\n\r\n\t\t\t\tlet param = {}\r\n\t\t\t\tif (!locaLat && !locaLng) {\r\n\t\t\t\t\t// #ifdef H5\r\n\t\t\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\t\t\tawait this.$jweixin.wxReady2();\r\n\t\t\t\t\t\tlet {\r\n\t\t\t\t\t\t\tlatitude,\r\n\t\t\t\t\t\t\tlongitude\r\n\t\t\t\t\t\t} = await this.$jweixin.getWxLocation()\r\n\t\t\t\t\t\tlocaLat = latitude\r\n\t\t\t\t\t\tlocaLng = longitude\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t\t// #ifdef APP-PLUS\r\n\t\t\t\t\tlet location = await this.$util.getBmapLocation()\r\n\t\t\t\t\tlocaLat = location.lat\r\n\t\t\t\t\tlocaLng = location.lng\r\n\t\t\t\t\t// #endif\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// #ifndef MP-WEIXIN\r\n\t\t\t\tparam = {\r\n\t\t\t\t\tlatitude: locaLat,\r\n\t\t\t\t\tlongitude: locaLng\r\n\t\t\t\t}\r\n\t\t\t\t// #endif\r\n\r\n\t\t\t\tlet [, {\r\n\t\t\t\t\taddress = '',\r\n\t\t\t\t\tlongitude,\r\n\t\t\t\t\tlatitude\r\n\t\t\t\t}] = await uni.chooseLocation(param);\r\n\t\t\t\tif (!address) return\r\n\t\t\t\tthis.form.address = address\r\n\t\t\t\tthis.form.lng = longitude\r\n\t\t\t\tthis.form.lat = latitude\r\n\t\t\t},\r\n\t\t\t//表单验证\r\n\t\t\tvalidate(param) {\r\n\t\t\t\tlet validate = new this.$util.Validate();\r\n\t\t\t\tthis.rule.map(item => {\r\n\t\t\t\t\tlet {\r\n\t\t\t\t\t\tname,\r\n\t\t\t\t\t} = item\r\n\t\t\t\t\tvalidate.add(param[name], item);\r\n\t\t\t\t})\r\n\t\t\t\tlet message = validate.start();\r\n\t\t\t\treturn message;\r\n\t\t\t},\r\n\t\t\tasync submit() {\r\n\t\t\t\tlet param = this.$util.deepCopy(this.form)\r\n\t\t\t\tlet arr = ['id_card', 'id_card_fan', 'id_card_people', 'work_img', 'video']\r\n\t\t\t\tarr.map(item => {\r\n\t\t\t\t\tparam[item] = param[item] && param[item].length > 0 ? param[item][0].path : ''\r\n\t\t\t\t})\r\n\t\t\t\tparam.license = param.license.map(item => {\r\n\t\t\t\t\treturn item.path\r\n\t\t\t\t})\r\n\t\t\t\tparam.self_img = param.self_img.map(item => {\r\n\t\t\t\t\treturn item.path\r\n\t\t\t\t})\r\n\t\t\t\tlet msg = this.validate(param);\r\n\t\t\t\tif (msg) {\r\n\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\ttitle: msg\r\n\t\t\t\t\t});\r\n\t\t\t\t\treturn;\r\n\t\t\t\t}\r\n\t\t\t\tparam.birthday = this.$util.DateToUnix(param.birthday)\r\n\t\t\t\tparam.id_card = [param.id_card, param.id_card_fan, param.id_card_people]\r\n\t\t\t\tdelete param.id_card_fan\r\n\t\t\t\tdelete param.id_card_people\r\n\t\t\t\tdelete param.admin_id\r\n\t\t\t\tlet {\r\n\t\t\t\t\told_phone\r\n\t\t\t\t} = this\r\n\t\t\t\tlet {\r\n\t\t\t\t\tshort_code_status\r\n\t\t\t\t} = this.configInfo\r\n\t\t\t\tif (short_code_status && old_phone != param.mobile && (param.short_code == null || param.short_code\r\n\t\t\t\t\t\t.length != 6)) {\r\n\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\ttitle: `请输入6位数短信验证码`\r\n\t\t\t\t\t})\r\n\t\t\t\t\treturn\r\n\t\t\t\t}\r\n\t\t\t\tif (!short_code_status || old_phone == param.mobile) {\r\n\t\t\t\t\tdelete param.short_code\r\n\t\t\t\t}\r\n\t\t\t\tif (this.lockTap) return\r\n\t\t\t\tthis.lockTap = true\r\n\t\t\t\tthis.$util.showLoading()\r\n\t\t\t\ttry {\r\n\t\t\t\t\tawait this.$api.technician.coachUpdateV2(param)\r\n\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\tthis.$util.showToast({\r\n\t\t\t\t\t\ttitle: `提交成功`\r\n\t\t\t\t\t})\r\n\t\t\t\t\tif (this.timer) {\r\n\t\t\t\t\t\tclearInterval(this.timer)\r\n\t\t\t\t\t}\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tif (getCurrentPages().length > 1) {\r\n\t\t\t\t\t\t\tthis.$util.back()\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tthis.$util.goUrl({\r\n\t\t\t\t\t\t\turl: '/pages/mine',\r\n\t\t\t\t\t\t\topenType: `reLaunch`\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t}, 2000)\r\n\t\t\t\t} catch (e) {\r\n\t\t\t\t\tsetTimeout(() => {\r\n\t\t\t\t\t\tthis.lockTap = false\r\n\t\t\t\t\t\tthis.$util.hideAll()\r\n\t\t\t\t\t}, 2000)\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n\r\n<style lang=\"scss\">\r\n</style>"],"sourceRoot":""} |