Files
2026-04-29 15:33:58 +08:00

1 line
8.3 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/member/apply/index"],{"10a1":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=(t._self._c,1==t.activeTab?t.__map(t.personList,(function(e,n){var i=t.__get_orig(e),a=t.personList.length;return{$orig:i,g0:a}})):null),i=1==t.activeTab?t.__map(t.personTableData,(function(e,n){var i=t.__get_orig(e),a=t.personList.length;return{$orig:i,g1:a}})):null,a=2==t.activeTab?t.__map(t.companyList,(function(e,n){var i=t.__get_orig(e),a=t.companyList.length;return{$orig:i,g2:a}})):null,r=2==t.activeTab?t.__map(t.companyTableData,(function(e,n){var i=t.__get_orig(e),a=t.companyList.length;return{$orig:i,g3:a}})):null;t.$mp.data=Object.assign({},{$root:{l0:n,l1:i,l2:a,l3:r}})},a=[]},"1e5d":function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={data:function(){return{tabs:[],activeTab:1,screenWidth:375,switchTimer:null,personCurrent:0,personScrollLeft:0,personStartX:0,personItemWidths:[],personNavStyleStr:"padding-left:0px;padding-right:0px",personInited:!1,personList:[],personTableData:[],dtTitle:"",dtImg:"",dtTime:"",articleId:"",companyCurrent:0,companyScrollLeft:0,companyStartX:0,companyItemWidths:[],companyNavStyleStr:"padding-left:0px;padding-right:0px",companyInited:!1,companyList:[],companyTableData:[],src1:"",src2:"",statusBarHeight:0}},onLoad:function(){var e=t.getSystemInfoSync();this.statusBarHeight=e.statusBarHeight,this.screenWidth=e.screenWidth,this.getMemberType(),this.getMemberBenefitsList(1),this.getMemberBenefitsList(2);var n=getApp().globalData.adminPath;this.src1=n+"/assets/addons/wdsxh/img/member_benefits_apply_1.png",this.src2=n+"/assets/addons/wdsxh/img/member_benefits_apply_2.png",console.log(this.src1,"=this.src1="),console.log(this.src2,"=this.src2=")},onReady:function(){this.personList&&this.personList.length>0&&this.initPersonNav(),this.companyList&&this.companyList.length>0&&this.initCompanyNav()},computed:{personCurrentRights:function(){var t=this.personList[this.personCurrent];return t&&t.rights?t.rights:[]},companyCurrentRights:function(){var t=this.companyList[this.companyCurrent];return t&&t.rights?t.rights:[]}},methods:{goBack:function(){1==getCurrentPages().length?t.switchTab({url:"/pages/index/index"}):t.navigateBack()},formatNumber:function(t){if(!t)return"0";var e=Number(t);if(e>=1e4){var n=e/1e4;return(Number.isInteger(n)?n:n.toFixed(1).replace(/\.0$/,""))+"万"}var i=e/1e3,a=Number.isInteger(i)?i:i.toFixed(1).replace(/\.0$/,"");return a+"k"},getMemberType:function(){var e=this;this.$util.request("member.typeList").then((function(n){1==n.code?e.tabs=n.data:t.showToast({title:n.msg,icon:"none"})})).catch((function(t){console.error("获取入会类型 ",t)}))},getMemberBenefitsList:function(e){var n=this;this.$util.request("member.benefitsList",{join_config_id:e}).then((function(i){if(1==i.code){if(i.data&&i.data.articles){var a=i.data.articles;n.dtTitle=a.title||"",n.dtImg=a.image||"",n.dtTime=a.createtime||"",n.articleId=a.id}var r=i.data.levels_benefits||[],o=r.map((function(t){return{name:t.name,src:t.image,feess:t.fees?Number(t.fees):"",fees:n.formatNumber(t.fees),rights:t.benefits.map((function(t){return t}))}})),s=[];if(r.length>0&&r[0].all_benefits_projects){var c=r[0].all_benefits_projects||[];s=c.map((function(t,e){var n={name:t.name};return r.forEach((function(t,i){var a,r=null===(a=t.all_benefits_projects[e])||void 0===a?void 0:a.has;n["v".concat(i+1)]=r?"√":"-"})),n}))}1===e?(n.personList=o,n.personCurrent=0,n.personTableData=s,n.$nextTick((function(){n.initPersonNav()}))):(n.companyList=o,n.companyCurrent=0,n.companyTableData=s,n.$nextTick((function(){n.initCompanyNav()})))}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){console.error("获取入会类型 ",t)}))},handleToHy:function(){this.$util.toPage({mode:1,path:"/pages/article/details?title=".concat("会员动态","&id=",this.articleId)})},handleCardClick:function(){this.$util.toPage({mode:1,path:"/pages/member/apply/form?activeTab=".concat(this.activeTab)})},switchTab:function(t){var e=this;this.activeTab=t,this.switchTimer&&clearTimeout(this.switchTimer),1===t&&(this.personInited||(this.switchTimer=setTimeout((function(){e.initPersonNav()}),100))),2===t&&(this.companyInited||(this.switchTimer=setTimeout((function(){e.initCompanyNav()}),100)))},initPersonNav:function(){var e=this;this.personInited||this.$nextTick((function(){var n=t.createSelectorQuery().in(e);e.personList.forEach((function(t,e){n.select("#person-nav-".concat(e)).boundingClientRect()})),n.exec((function(t){if(t){e.personItemWidths=t.map((function(t){return(null===t||void 0===t?void 0:t.width)||70}));var n=e.personItemWidths[0]||70,i=(e.screenWidth-n)/2,a=(e.screenWidth-n)/2;e.personNavStyleStr="padding-left:"+i+"px;padding-right:"+a+"px",e.personInited=!0,setTimeout((function(){e.scrollToPersonActive(0)}),50)}}))}))},scrollToPersonActive:function(e){var n=this;this.$nextTick((function(){var i=t.createSelectorQuery().in(n);i.select("#person-nav-".concat(e)).boundingClientRect(),i.select(".nav-scroll").boundingClientRect(),i.select(".nav-list").boundingClientRect(),i.exec((function(t){if(t&&!(t.length<3)){var e=t[0],i=t[1],a=t[2];if(e&&i&&a){var r=e.left-i.left,o=(i.width-e.width)/2,s=n.personScrollLeft+(r-o);s=Math.max(0,s);var c=a.width-i.width;s=Math.min(s,c),n.personScrollLeft=s}}}))}))},onPersonTouchStart:function(t){this.personStartX=t.touches[0].clientX},onPersonTouchEnd:function(t){var e=t.changedTouches[0].clientX-this.personStartX;if(!(Math.abs(e)<30)){var n=e<0?Math.min(this.personCurrent+1,this.personList.length-1):Math.max(this.personCurrent-1,0);this.personCurrent=n}},onPersonChange:function(t){var e=this;this.personCurrent=t.detail.current,setTimeout((function(){e.scrollToPersonActive(e.personCurrent)}),50)},initCompanyNav:function(){var e=this;this.companyInited||this.$nextTick((function(){var n=t.createSelectorQuery().in(e);e.companyList.forEach((function(t,e){n.select("#company-nav-".concat(e)).boundingClientRect()})),n.exec((function(t){if(t){e.companyItemWidths=t.map((function(t){return(null===t||void 0===t?void 0:t.width)||70}));var n=e.companyItemWidths[0]||70,i=(e.screenWidth-n)/2,a=(e.screenWidth-n)/2;e.companyNavStyleStr="padding-left:"+i+"px;padding-right:"+a+"px",e.companyInited=!0,setTimeout((function(){e.scrollToCompanyActive(0)}),50)}}))}))},scrollToCompanyActive:function(e){var n=this;this.$nextTick((function(){var i=t.createSelectorQuery().in(n);i.select("#company-nav-".concat(e)).boundingClientRect(),i.select(".nav-scroll").boundingClientRect(),i.select(".nav-list").boundingClientRect(),i.exec((function(t){if(t&&!(t.length<3)){var i=t[0],a=t[1],r=t[2];if(i&&a&&r){var o=i.left-a.left,s=(a.width-i.width)/2,c=n.companyScrollLeft+(o-s);c=Math.max(0,c);var u=r.width-a.width;c=Math.min(c,u),n.companyScrollLeft=c,console.log("单位滚动调试:",{"当前索引":e,"当前滚动位置":n.companyScrollLeft,"项相对位置":o,"目标相对位置":s,"新滚动位置":c,"最大滚动距离":u})}}}))}))},onCompanyTouchStart:function(t){this.companyStartX=t.touches[0].clientX},onCompanyTouchEnd:function(t){var e=t.changedTouches[0].clientX-this.companyStartX;if(!(Math.abs(e)<30)){var n=e<0?Math.min(this.companyCurrent+1,this.companyList.length-1):Math.max(this.companyCurrent-1,0);this.companyCurrent=n}},onCompanyChange:function(t){var e=this;this.companyCurrent=t.detail.current,setTimeout((function(){e.scrollToCompanyActive(e.companyCurrent)}),50)}}};e.default=n}).call(this,n("df3c")["default"])},2843:function(t,e,n){"use strict";var i=n("2dab"),a=n.n(i);a.a},"2dab":function(t,e,n){},"748e":function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("aa6c");i(n("3240"));var a=i(n("bb7a"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},bb7a:function(t,e,n){"use strict";n.r(e);var i=n("10a1"),a=n("d2c1");for(var r in a)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(r);n("2843");var o=n("828b"),s=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"00ac93ae",null,!1,i["a"],void 0);e["default"]=s.exports},d2c1:function(t,e,n){"use strict";n.r(e);var i=n("1e5d"),a=n.n(i);for(var r in i)["default"].indexOf(r)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=a.a}},[["748e","common/runtime","common/vendor"]]]);