Files
orico-association/unpackage/dist/build/mp-weixin/pages/component/member/apply.js
2026-03-25 15:53:37 +08:00

11 lines
13 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/component/member/apply"],{"78aa":function(e,t,i){"use strict";i.r(t);var l=i("9dc2"),p=i.n(l);for(var a in l)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return l[e]}))}(a);t["default"]=p.a},"9dc2":function(e,t,i){"use strict";(function(e,l){var p=i("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=p(i("af34")),n=p(i("7ca3")),o=i("8f59"),s=p(i("f5e9"));function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,l)}return i}var c={name:"memberApply",props:["isApply","showData","showType","mobileAuth"],components:{selectPicker:function(){i.e("pages/component/picker/select").then(function(){return resolve(i("519f"))}.bind(null,i)).catch(i.oe)},addressPicker:function(){Promise.all([i.e("common/vendor"),i.e("pages/component/picker/address")]).then(function(){return resolve(i("76cd"))}.bind(null,i)).catch(i.oe)},datePicker:function(){i.e("pages/component/picker/date").then(function(){return resolve(i("8887"))}.bind(null,i)).catch(i.oe)},timePicker:function(){i.e("pages/component/picker/time").then(function(){return resolve(i("f6db"))}.bind(null,i)).catch(i.oe)}},data:function(){return{applyField:[],levelList:[],industryList:[],selectTitle:""}},watch:{showData:{handler:function(e){this.applyField=e||[]},immediate:!0,deep:!0}},computed:function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach((function(t){(0,n.default)(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},(0,o.mapState)({themeColor:function(e){return e.app.themeColor},iconUpload:function(e){return s.default.svgToUrl("upload",e.app.themeColor)}})),mounted:function(){1==this.showType&&(this.getIndustry(),this.getMemberLevel())},methods:{pageChange:function(e){this.$emit("onChange",e)},getOption:function(e){return e.split(",")},getMemberLevel:function(t){var i=this;this.$util.request("member.level").then((function(l){1==l.code?(i.levelList=l.data,t&&t()):e.showToast({title:l.msg,icon:"none"})})).catch((function(e){console.error("获取会员级别 ",e)}))},getIndustry:function(t){var i=this;this.$util.request("member.industry").then((function(l){1==l.code?(i.industryList=l.data,t&&t()):e.showToast({title:l.msg,icon:"none"})})).catch((function(e){console.error("获取行业分类 ",e)}))},getMemberLevelName:function(e){for(var t in this.levelList)if(this.levelList[t].id==e)return this.levelList[t].name},getIndustryName:function(e){for(var t in this.industryList)if(this.industryList[t].id==e)return this.industryList[t].name},selectRadio:function(e,t){this.applyField[e].value==t?this.applyField[e].value="":this.applyField[e].value=t},selectCheckbox:function(e,t){this.applyField[e].value.includes(t)?this.$delete(this.applyField[e].value,this.applyField[e].value.indexOf(t)):this.applyField[e].value.push(t)},chooseImage:function(t){var i=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:9;e.chooseMedia({count:Number(l)>1?l-this.applyField[t].value.length:1,mediaType:["image"],sourceType:["album","camera"],sizeType:["compressed"],success:function(e){var l=e.tempFiles.map((function(e){return e.tempFilePath}));1==i.showType&&"avatar"==i.applyField[t].field||2==i.showType&&"company_logo"==i.applyField[t].field||3==i.showType&&"organize_logo"==i.applyField[t].field?i.applyField[t].value=l[0]:"cert"==i.applyField[t].type?i.applyField[t].value.image=l[0]:i.applyField[t].value=[].concat((0,a.default)(i.applyField[t].value),(0,a.default)(l))}})},deleteImage:function(e,t){1==this.showType&&"avatar"==this.applyField[e].field||2==this.showType&&"company_logo"==this.applyField[e].field||3==this.showType&&"organize_logo"==this.applyField[e].field?this.applyField[e].value="":"cert"==this.applyField[e].type?this.applyField[e].value.image="":this.$delete(this.applyField[e].value,t)},previewImage:function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,l=[];l=1==this.showType&&"avatar"==this.applyField[t].field||2==this.showType&&"company_logo"==this.applyField[t].field||3==this.showType&&"organize_logo"==this.applyField[t].field?[this.applyField[t].value]:"cert"==this.applyField[t].type?[this.applyField[t].value.image]:this.applyField[t].value,e.previewImage({urls:l,current:i})},chooseVideo:function(t){var i=this;e.chooseMedia({count:1,mediaType:["video"],sourceType:["album","camera"],camera:"back",success:function(e){i.applyField[t].value=e.tempFiles[0].tempFilePath}})},deleteVideo:function(e){this.applyField[e].value=""},chooseFiles:function(t){var i=this;l.chooseMessageFile({count:9-this.applyField[t].value.length,type:"file",extension:[".pdf",".doc",".docx",".xls",".xlsx"],success:function(l){var p=[],n=[];l.tempFiles.forEach((function(e){parseFloat(e.size/1024)<=10240?p.push({name:e.name,path:e.path}):n.push(e.name)})),n.length&&e.showToast({icon:"none",title:n.join("、")+"超过10M",duration:1500}),i.applyField[t].value=[].concat((0,a.default)(i.applyField[t].value),p)}})},deleteFiles:function(e,t){this.$delete(this.applyField[e].value,t)},openSelectPicker:function(e){var t=this;if(!this.applyField[e].disabled)if(this.selectTitle=this.applyField[e].label,1==this.showType&&"member_level_id"==this.applyField[e].field)this.levelList.length?this.$refs.selectPicker.open(this.levelList,this.applyField[e].value,e):this.getMemberLevel((function(){t.$refs.selectPicker.open(t.levelList,t.applyField[e].value,e)}));else if(1==this.showType&&"industry_category_id"==this.applyField[e].field)this.industryList.length?this.$refs.selectPicker.open(this.industryList,this.applyField[e].value,e):this.getIndustry((function(){t.$refs.selectPicker.open(t.industryList,t.applyField[e].value,e)}));else if(1==this.showType&&"native_place"==this.applyField[e].field)this.$refs.addressPicker.open(this.applyField[e].value,e);else{var i=this.applyField[e].option.split(",");this.$refs.selectPicker.open(i,this.applyField[e].value,e)}},changeSelectPicker:function(e,t){1==this.showType&&"native_place"==this.applyField[t].field?this.applyField[t].value=e.province+"/"+e.city+"/"+e.area:1!=this.showType||"member_level_id"!=this.applyField[t].field&&"industry_category_id"!=this.applyField[t].field?this.applyField[t].value=e:this.applyField[t].value=e.id},chooseLocation:function(t){var i=this;e.chooseLocation({success:function(e){i.applyField[t].value={latitude:e.latitude,longitude:e.longitude,name:e.name,address:e.address}}})},clearLocation:function(e){this.applyField[e].value={latitude:"",longitude:"",name:"",address:""}},changeMobileAuth:function(){var e=1==this.mobileAuth?2:1;this.$emit("changeMobileAuth",e)},openDatePicker:function(e){this.$refs.datePicker.open(this.applyField[e].value,e)},changeDatePicker:function(e,t){this.applyField[t].value=e},openTimePicker:function(e){this.$refs.timePicker.open(this.applyField[e].value,e)},changeTimePicker:function(e,t){this.applyField[t].value=e},clearValue:function(e){this.applyField[e].value=""},toEditor:function(e){this.$store.commit("app/setEditorContent",this.applyField[e].value),this.$util.toPage({mode:1,path:"/pages/member/apply/editor?params=".concat(e)})},setEditorData:function(e){this.applyField[e.params].value=e.content},getEditorText:function(e){return e?e.replace(/<[^>]+>/g,""):""},getApplyField:function(e){e(JSON.parse(JSON.stringify(this.applyField)))}}};t.default=c}).call(this,i("df3c")["default"],i("3223")["default"])},bca3:function(e,t,i){"use strict";var l=i("fb35"),p=i.n(l);p.a},cfab:function(e,t,i){"use strict";i.r(t);var l=i("ee4d"),p=i("78aa");for(var a in p)["default"].indexOf(a)<0&&function(e){i.d(t,e,(function(){return p[e]}))}(a);i("bca3");var n=i("828b"),o=Object(n["a"])(p["default"],l["b"],l["c"],!1,null,null,null,!1,l["a"],void 0);t["default"]=o.exports},ee4d:function(e,t,i){"use strict";i.d(t,"b",(function(){return p})),i.d(t,"c",(function(){return a})),i.d(t,"a",(function(){return l}));var l={uniDatetimePicker:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/uni-datetime-picker/components/uni-datetime-picker/uni-datetime-picker")]).then(i.bind(null,"1a6f"))}},p=function(){var e=this,t=e.$createElement,i=(e._self._c,e.__map(e.applyField,(function(t,i){var l=e.__get_orig(t),p=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"!=t.type?null:e.getOption(t.option),a=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"!=t.type?null:e.__map(e.getOption(t.option),(function(i,l){var p=e.__get_orig(i),a=t.value.includes(i);return{$orig:p,g0:a}})),n=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"!=t.type||1!=e.showType||"member_level_id"!=t.field||!t.value?null:e.getMemberLevelName(t.value),o=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"!=t.type||1==e.showType&&"member_level_id"==t.field||1!=e.showType||"industry_category_id"!=t.field||!t.value?null:e.getIndustryName(t.value),s=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"!=t.type||1!=e.showType||"introduce_content"!=t.field||!t.value?null:e.getEditorText(t.value)||"编辑"+t.label,r=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"!=t.type||1==e.showType&&"introduce_content"==t.field||2!=e.showType||"company_introduction"!=t.field||!t.value?null:e.getEditorText(t.value)||"编辑"+t.label,c=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"!=t.type||1==e.showType&&"introduce_content"==t.field||2==e.showType&&"company_introduction"==t.field||3!=e.showType||"organize_introduction"!=t.field||!t.value?null:e.getEditorText(t.value)||"编辑"+t.label,u=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"!=t.type||1==e.showType&&"avatar"==t.field||2==e.showType&&"company_logo"==t.field||3==e.showType&&"organize_logo"==t.field?null:e.__map(t.value,(function(i,l){var p=e.__get_orig(i),a=t.value&&t.value.length>0;return{$orig:p,g1:a}})),y=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"!=t.type||1==e.showType&&"avatar"==t.field||2==e.showType&&"company_logo"==t.field||3==e.showType&&"organize_logo"==t.field?null:!t.value||t.value.length<9,d=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"==t.type||"video"==t.type||"file"!=t.type?null:!t.value||t.value.length<9,h=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"==t.type||"video"==t.type||"file"!=t.type||!d?null:t.value.length,f=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"==t.type||"video"==t.type||"file"!=t.type||!d||!h?null:t.value.length,m=e.isApply&&2==t.apply_show||"text"==t.type||"number"==t.type||"radio"==t.type||"checkbox"==t.type||"select"==t.type||"date"==t.type||"time"==t.type||"datetime"==t.type||"textarea"==t.type||"cert"==t.type||"image"==t.type||"video"==t.type||"file"!=t.type?null:t.value&&t.value.length>0;return{$orig:l,l0:p,l1:a,m0:n,m1:o,m2:s,m3:r,m4:c,l2:u,g2:y,g3:d,g4:h,g5:f,g6:m}})));e._isMounted||(e.e0=function(t,i,l){var p=arguments[arguments.length-1].currentTarget.dataset,a=p.eventParams||p["event-params"];i=a.index,l=a.option;return e.selectRadio(i,l)},e.e1=function(t,i,l){var p=arguments[arguments.length-1].currentTarget.dataset,a=p.eventParams||p["event-params"];i=a.index,l=a.option;return e.selectCheckbox(i,l)}),e.$mp.data=Object.assign({},{$root:{l3:i}})},a=[]},fb35:function(e,t,i){}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'pages/component/member/apply-create-component',
{
'pages/component/member/apply-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("cfab"))
})
},
[['pages/component/member/apply-create-component']]
]);