(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesTools/institution/details"],{1029:function(t,n,i){},"55f8":function(t,n,i){"use strict";(function(t,n){var e=i("47a9");i("aa6c");e(i("3240"));var o=e(i("6fb9"));t.__webpack_require_UNI_MP_PLUGIN__=i,n(o.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"689b":function(t,n,i){"use strict";var e=i("1029"),o=i.n(e);o.a},"6d1c":function(t,n,i){"use strict";i.r(n);var e=i("c466"),o=i.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){i.d(n,t,(function(){return e[t]}))}(s);n["default"]=o.a},"6fb9":function(t,n,i){"use strict";i.r(n);var e=i("aea6"),o=i("6d1c");for(var s in o)["default"].indexOf(s)<0&&function(t){i.d(n,t,(function(){return o[t]}))}(s);i("689b");var a=i("828b"),u=Object(a["a"])(o["default"],e["b"],e["c"],!1,null,null,null,!1,e["a"],void 0);n["default"]=u.exports},aea6:function(t,n,i){"use strict";i.d(n,"b",(function(){return o})),i.d(n,"c",(function(){return s})),i.d(n,"a",(function(){return e}));var e={mpHtml:function(){return Promise.all([i.e("common/vendor"),i.e("uni_modules/mp-html/components/mp-html/mp-html")]).then(i.bind(null,"7717"))},uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"f295"))}},o=function(){var t=this,n=t.$createElement,i=(t._self._c,t.loadEnd?t.memberList&&t.memberList.length:null);t._isMounted||(t.e0=function(n){return t.$refs.popupModal.close()}),t.$mp.data=Object.assign({},{$root:{g0:i}})},s=[]},c466:function(t,n,i){"use strict";(function(t){var e=i("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e(i("af34")),s=e(i("7ca3")),a=i("8f59");function u(t,n){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),i.push.apply(i,e)}return i}var r={components:{carousel:function(){i.e("pages/component/carousel/carousel").then(function(){return resolve(i("b5fc"))}.bind(null,i)).catch(i.oe)}},data:function(){return{pageShow:!1,loadEnd:!1,institutionId:null,institutionInfo:{},memberList:[],page:1,limit:20,hasMore:!1,popupInfo:{},showLogin:!1}},computed:function(t){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?u(Object(i),!0).forEach((function(n){(0,s.default)(t,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):u(Object(i)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))}))}return t}({},(0,a.mapState)({themeColor:function(t){return t.app.themeColor},appletName:function(t){return t.app.appletName}})),onLoad:function(n){var i=this;this.institutionId=n.id,t.showLoading({title:"加载中"}),this.getMemberList(),this.getInstitution((function(){i.loadEnd=!0,t.hideLoading()}))},onShow:function(){this.loadEnd&&(this.getMemberList(),this.getInstitution())},onReachBottom:function(){this.hasMore&&(this.page++,this.getMemberList())},onShareAppMessage:function(){return{title:this.institutionInfo.name,imageUrl:this.institutionInfo.image_list[0]}},onShareTimeline:function(){return{title:this.institutionInfo.name,imageUrl:this.institutionInfo.image_list[0]}},methods:{getInstitution:function(n){var i=this;this.$util.request("institution.details",{id:this.institutionId}).then((function(e){n&&n(),1==e.code?(i.institutionInfo=e.data,i.institutionInfo.images?i.institutionInfo.image_list=i.institutionInfo.images.split(","):i.institutionInfo.image_list=[]):t.showToast({title:e.msg,icon:"none"})})).catch((function(t){401==t?i.showLogin=!0:console.error("获取机构详情 ",t)}))},getMemberList:function(){var n=this;this.$util.request("institution.member",{page:this.page,limit:this.limit,institution_id:this.institutionId}).then((function(i){if(1==i.code){var e=i.data.data;n.hasMore=n.page<i.data.total/n.limit,n.memberList=1==n.page?e:[].concat((0,o.default)(n.memberList),(0,o.default)(e))}else t.showToast({title:i.msg,icon:"none"})})).catch((function(t){console.error("获取成员列表 ",t)}))},toApply:function(){1==this.institutionInfo.apply_state?t.showToast({icon:"none",title:"您已提交申请正在审核",duration:2500}):this.$util.toPage({mode:1,path:"/pagesTools/institution/apply?id=".concat(this.institutionId,"&state=").concat(this.institutionInfo.apply_state||-1)})},openMemberDetails:function(t){this.popupInfo=t,this.$refs.popupModal.open()},onModalChange:function(t){this.pageShow=t.show},toLogin:function(){t.redirectTo({url:"/pagesTools/institution/details?id=".concat(this.institutionId)})}}};n.default=r}).call(this,i("df3c")["default"])}},[["55f8","common/runtime","common/vendor"]]]);