1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/setting/bank"],{"0130":function(e,n,t){},"48b4":function(e,n,t){"use strict";(function(e){var r=t("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var u=r(t("9523")),i=t("1af9");function o(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function a(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?o(Object(t),!0).forEach((function(n){(0,u.default)(e,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):o(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var s={data:function(){return{groupTypeSelectShow:!1,groupTypeSelectList:[],maskShow:!1,idCardFront:"",idCardRevers:"",bankCard:"",businesLicens:"",form:{referrer:null,real_name:null,id_number:"",id_card_front:null,id_card_revers:null,dept_code:""},cObj:{},submitButtonDisabled:!1,rules:{referrer:[{required:!0,message:"推荐人不得为空",trigger:["change","blur"]}],real_name:[{required:!0,message:"姓名不得为空",trigger:["change","blur"]}],id_number:[{required:!0,message:"身份证号不得为空",trigger:["change","blur"]}],id_card_front:[{required:!0,message:"身份证头像页照片不得为空",trigger:["change","blur"]}],id_card_revers:[{required:!0,message:"身份证国徽页照片不得为空",trigger:["change","blur"]}]},submitModalShow:!1}},onLoad:function(e){this.getData()},onReady:function(){this.$refs.uForm.setRules(this.rules)},methods:{groupTypeSelectConfirm:function(e){var n=this;e.map((function(e,t){n.form.group_type=e.value,n.form.groupTypeName=e.label}))},getData:function(){var n=this;e.api.base.apiuserauthinfo().then((function(e){var t=e||{};if(t.id){n.idCardFront=t.id_card_front_pub,n.idCardRevers=t.id_card_revers_pub,n.businesLicens=t.busines_licens_pub;var r={referrer:t.referrer,real_name:t.real_name,id_number:t.id_number,id_card_front:t.id_card_front,id_card_revers:t.id_card_revers,busines_licens:t.busines_licens,dept_code:t.dept_code};n.form=a({},r),n.cObj=a({},t)}n.getGTList()}))},getGTList:function(){var n=this,t=e.getStorageSync("MD_userInfo2");this.form.group_type=t.group_type||"1";var r=e.getStorageSync("MD_dict"),u=r.group_type||[],i=[];u.forEach((function(e){e.val==t.group_type&&(n.form.groupTypeName=e.key),i.push({value:e.val,label:e.key})})),this.form.groupTypeName||(this.form.groupTypeName="渠道/店东"),this.groupTypeSelectList=[].concat(i)},uploadImgHandle:function(n){e.chooseImage({count:1,sizeType:["compressed"],success:function(t){var r=t.tempFilePaths[0];(0,i.pathToBase64)(r).then((function(e){console.log(e)}));var u=e.getStorageSync("MD_token")||"";e.uploadFile({url:e.baseUrl+"api/upload/cloudpiv",filePath:r,name:"upload",formData:{token:u},success:function(t){var r=JSON.parse(t.data);0===r.errno?n&&"function"===typeof n&&n(r.data):e.$msg(r.errmsg||"未知错误-".concat(r.errno))}})}})},uploadBusinesLicensImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.busines_licens=n.url,e.businesLicens=n.pub_url}))},uploadFrontImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.id_card_front=n.url,e.idCardFront=n.pub_url}))},uploadBackImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.id_card_revers=n.url,e.idCardRevers=n.pub_url}))},uploadBankImage:function(){var e=this;this.uploadImgHandle((function(n){e.form.bank_card=n.url,e.bankCard=n.pub_url}))},submitHandle:function(){var n=this;if(3!=this.form.group_type){if(1==this.form.group_type){if(!this.form.busines_licens)return void e.$msg("渠道请上传营业执照照片")}else if(!this.form.dept_code)return void e.$msg("请上传门店邀请码");this.$refs.uForm.validate((function(t){if(t){var r=a({},n.form);e.api.base.apiuserauthadd(r).then((function(n){e.$msgConfirm("编辑成功",(function(){e.reLaunch({url:"/pages/user/setting/setting"})}),(function(){e.reLaunch({url:"/pages/user/setting/setting"})}))})),e.api.base.apiuseredit({nickname:r.real_name,group_type:r.group_type}).then((function(){}))}}))}else e.$msg("请选择认证的角色")},pageTo:function(n){"dev"!==n?e.navigateTo({url:n}):e.$msg("开发中~")},getFormatDate:function(e){if(void 0==e||""==e)return"";var n=e;return parseInt(e)<10&&(n="0"+e),n}}};n.default=s}).call(this,t("543d")["default"])},5839:function(e,n,t){"use strict";var r=t("0130"),u=t.n(r);u.a},"790e":function(e,n,t){"use strict";t.r(n);var r=t("9645"),u=t("dfbb");for(var i in u)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return u[e]}))}(i);t("5839");var o=t("f0c5"),a=Object(o["a"])(u["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);n["default"]=a.exports},"8dcd":function(e,n,t){"use strict";(function(e,n){var r=t("4ea4");t("2ab2");r(t("66fd"));var u=r(t("790e"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(u.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},9645:function(e,n,t){"use strict";t.d(n,"b",(function(){return u})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return r}));var r={uAlertTips:function(){return t.e("uni_modules/vk-uview-ui/components/u-alert-tips/u-alert-tips").then(t.bind(null,"dcd2"))},uForm:function(){return t.e("uni_modules/vk-uview-ui/components/u-form/u-form").then(t.bind(null,"e893"))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,"a81d"))},uInput:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/vk-uview-ui/components/u-input/u-input")]).then(t.bind(null,"830c"))},uIcon:function(){return t.e("uni_modules/vk-uview-ui/components/u-icon/u-icon").then(t.bind(null,"ccaa"))},uGap:function(){return t.e("uni_modules/vk-uview-ui/components/u-gap/u-gap").then(t.bind(null,"9db7"))},uButton:function(){return t.e("uni_modules/vk-uview-ui/components/u-button/u-button").then(t.bind(null,"51b1b"))},uModal:function(){return t.e("uni_modules/vk-uview-ui/components/u-modal/u-modal").then(t.bind(null,"85bf"))},uMask:function(){return t.e("uni_modules/vk-uview-ui/components/u-mask/u-mask").then(t.bind(null,"4390"))},uToast:function(){return t.e("uni_modules/vk-uview-ui/components/u-toast/u-toast").then(t.bind(null,"9568"))},uSelect:function(){return t.e("uni_modules/vk-uview-ui/components/u-select/u-select").then(t.bind(null,"17bf"))}},u=function(){var e=this,n=e.$createElement;e._self._c;e._isMounted||(e.e0=function(n){e.groupTypeSelectShow=!0},e.e1=function(n){e.submitModalShow=!0},e.e2=function(n){e.maskShow=!1},e.e3=function(n){e.maskShow=!1})},i=[]},dfbb:function(e,n,t){"use strict";t.r(n);var r=t("48b4"),u=t.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);n["default"]=u.a}},[["8dcd","common/runtime","common/vendor"]]]);
|