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
4.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/release/perfectCompanyInfo/index"],{"547a":function(e,t,r){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=i(r("d3dd"));function i(e){return e&&e.__esModule?e:{default:e}}var o=r("514b"),s=getApp(),u={data:function(){return{form:{enterpriseType:1,enterpriseAddress:"",businessNature:"",latitude:"",longitude:"",enterpriseLogo:"",enterpriseTitle:"",enterpriseLabel:"",enterpriseNet:"",enterprisePhone:"",resourceIntroduction:"",imgPaths:[]}}},components:{},props:{},onLoad:function(e){this.initValidate(),console.log(e),e.isEdit&&this.getEnterpriseInfo()},methods:{getEnterpriseInfo:function(){var e=this;s.http("GET","Enterprise/getEnterpriseInfo").then((function(t){if(t.data.success){var r=t.data.data;e.form.imgPaths=r.imgPaths,e.form.resourceIntroduction=r.resourceIntroduction,e.form.enterprisePhone=r.enterprisePhone,e.form.enterpriseNet=r.enterpriseNet,e.form.enterpriseLabel=r.enterpriseLabel,e.form.enterpriseTitle=r.enterpriseTitle,e.form.enterpriseLogo=r.enterpriseLogo,e.form.longitude=r.longitude,e.form.latitude=r.latitude,e.form.businessNature=r.businessNature,e.form.enterpriseAddress=r.enterpriseAddress}}))},initValidate:function(){var e={enterpriseAddress:{required:!0},enterpriseLogo:{required:!0},enterpriseTitle:{required:!0},businessNature:{required:!0},enterpriseNet:{required:!0},enterprisePhone:{required:!0}},t={enterpriseAddress:{required:"请选择或填写地址"},enterpriseLogo:{required:"请上传企业Logo"},enterpriseTitle:{required:"请填写企业slogan"},businessNature:{required:"请填写企业经营范围"},enterpriseNet:{required:"请填写企业网站"},enterprisePhone:{required:"请填写客服电话"}};this.WxValidate=new n.default(e,t)},showMap:function(){var t=this;e.getLocation({type:"gcj02",success:function(r){e.chooseLocation({latitude:r.latitude,longitude:r.longitude,scale:28,success:function(e){t.form.longitude=e.longitude,t.form.latitude=e.latitude,t.form.enterpriseAddress=e.address}})}})},uploadImg:function(e){var t=this,r=e.currentTarget.dataset.type;o.chooseImages((function(e){"logo"==r&&(t.form.enterpriseLogo=e)}))},upImgs:function(){var e=this;o.chooseImages2((function(t){var r=e.form.imgPaths;r.push(t),e.form.imgPaths=r}))},delImg:function(e){var t=e.currentTarget.dataset.idx,r=this.form.imgPaths;r.splice(t,1),this.form.imgPaths=r},submit:function(t){var r=this;console.log(t.detail.value),e.showModal({title:"提示!",content:"是否确认提交?",success:function(n){if(n.confirm){var i=t.detail.value;if(i.enterpriseType=1,i.latitude=r.form.latitude,i.longitude=r.form.longitude,i.enterpriseLogo=r.form.enterpriseLogo,i.imgPaths=r.form.imgPaths,!r.WxValidate.checkForm(i)){var o=r.WxValidate.errorList[0];return r.showModal(o),!1}s.http("post","Enterprise/completeEnterprise",i).then((function(t){t.data.success&&(e.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){e.navigateBack({delta:1})}),2e3))}))}else console.log("已取消")}})},showModal:function(t){e.showModal({content:t.msg,showCancel:!1})}}};t.default=u}).call(this,r("543d")["default"])},"584d":function(e,t,r){"use strict";(function(e){r("ef82");n(r("66fd"));var t=n(r("bddb"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,r("543d")["createPage"])},8402:function(e,t,r){"use strict";var n;r.d(t,"b",(function(){return i})),r.d(t,"c",(function(){return o})),r.d(t,"a",(function(){return n}));var i=function(){var e=this,t=e.$createElement;e._self._c},o=[]},8903:function(e,t,r){"use strict";var n=r("b78f"),i=r.n(n);i.a},b78f:function(e,t,r){},bddb:function(e,t,r){"use strict";r.r(t);var n=r("8402"),i=r("d031");for(var o in i)"default"!==o&&function(e){r.d(t,e,(function(){return i[e]}))}(o);r("8903");var s,u=r("f0c5"),a=Object(u["a"])(i["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],s);t["default"]=a.exports},d031:function(e,t,r){"use strict";r.r(t);var n=r("547a"),i=r.n(n);for(var o in n)"default"!==o&&function(e){r.d(t,e,(function(){return n[e]}))}(o);t["default"]=i.a}},[["584d","common/runtime","common/vendor"]]]);