(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/packageB/event/event_info"],{309:function(n,t,o){"use strict";(function(n,t){var e=o(4);o(26);e(o(25));var i=e(o(310));n.__webpack_require_UNI_MP_PLUGIN__=o,t(i.default)}).call(this,o(1)["default"],o(2)["createPage"])},310:function(n,t,o){"use strict";o.r(t);var e=o(311),i=o(313);for(var a in i)["default"].indexOf(a)<0&&function(n){o.d(t,n,(function(){return i[n]}))}(a);o(315);var r,c=o(42),u=Object(c["default"])(i["default"],e["render"],e["staticRenderFns"],!1,null,null,null,!1,e["components"],r);u.options.__file="pages/packageB/event/event_info.vue",t["default"]=u.exports},311:function(n,t,o){"use strict";o.r(t);var e=o(312);o.d(t,"render",(function(){return e["render"]})),o.d(t,"staticRenderFns",(function(){return e["staticRenderFns"]})),o.d(t,"recyclableRender",(function(){return e["recyclableRender"]})),o.d(t,"components",(function(){return e["components"]}))},312:function(n,t,o){"use strict";var e;o.r(t),o.d(t,"render",(function(){return i})),o.d(t,"staticRenderFns",(function(){return r})),o.d(t,"recyclableRender",(function(){return a})),o.d(t,"components",(function(){return e}));try{e={tnNavBar:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-nav-bar/tn-nav-bar")]).then(o.bind(null,406))},tnForm:function(){return o.e("tuniao-ui/components/tn-form/tn-form").then(o.bind(null,515))},tnFormItem:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-form-item/tn-form-item")]).then(o.bind(null,520))},tnCheckboxGroup:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-checkbox-group/tn-checkbox-group")]).then(o.bind(null,545))},tnCheckbox:function(){return o.e("tuniao-ui/components/tn-checkbox/tn-checkbox").then(o.bind(null,508))},tnRadioGroup:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-radio-group/tn-radio-group")]).then(o.bind(null,552))},tnRadio:function(){return o.e("tuniao-ui/components/tn-radio/tn-radio").then(o.bind(null,559))},tnInput:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-input/tn-input")]).then(o.bind(null,538))},tnModal:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-modal/tn-modal")]).then(o.bind(null,442))},tnButton:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-button/tn-button")]).then(o.bind(null,420))},tnPopup:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-popup/tn-popup")]).then(o.bind(null,391))},tnTabs:function(){return Promise.all([o.e("common/vendor"),o.e("tuniao-ui/components/tn-tabs/tn-tabs")]).then(o.bind(null,428))}}}catch(c){if(-1===c.message.indexOf("Cannot find module")||-1===c.message.indexOf(".vue"))throw c;console.error(c.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var i=function(){var n=this,t=n.$createElement,o=(n._self._c,""!=n.info?n.formatTime(n.info.activity_start_time):null),e=""!=n.info?n.formatTime(n.info.activity_end_time):null,i=n.info.list.length,a=n.info.list.length;n._isMounted||(n.e0=function(t){n.juanMod=!0,n.money=""},n.e1=function(t){n.peiMod=!0},n.e2=function(t){n.juanMod=!1},n.e3=function(t){n.peiMod=!1},n.e4=function(t){n.rightMod=!1}),n.$mp.data=Object.assign({},{$root:{m0:o,m1:e,g0:i,g1:a}})},a=!1,r=[];i._withStripped=!0},313:function(n,t,o){"use strict";o.r(t);var e=o(314),i=o.n(e);for(var a in e)["default"].indexOf(a)<0&&function(n){o.d(t,n,(function(){return e[n]}))}(a);t["default"]=i.a},314:function(n,t,o){"use strict";(function(n){var e=o(4);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=o(33),a=e(o(30)),r={data:function(){return{showLogin:!1,money:"",juanMod:!1,rightMod:!1,peiMod:!1,questionnaireList:[],button:[{text:"取消",backgroundColor:"#E6E6E6",fontColor:"#FFFFFF",shape:"round"},{text:"确定",backgroundColor:"tn-bg-indigo",fontColor:"#FFFFFF"}],form:{wenda:"",danxuan:"",hobby:[]},topCurrent:0,id:0,info:{list:[]},apiImgUrl:this.$store.state.imgUrl}},mounted:function(){},onShareAppMessage:function(){return{title:this.info.activity_name,path:"/pages/packageB/event/event_info?id="+this.info.id+"&gid="+a.default.state.Gid,imageUrl:this.apiImgUrl+this.info.activity_image}},onShareTimeline:function(){return{title:this.info.activity_name,path:"/pages/packageB/event/event_info?id="+this.info.id+"&gid="+a.default.state.Gid,imageUrl:this.apiImgUrl+this.info.activity_image}},onLoad:function(t){var o=this,e=n.getStorageSync("uid");console.log(t),this.id=t.id,"undefined"!=typeof t.gid&&(console.log(11111111),a.default.commit("$tStore",{name:"Gid",value:t.gid}),n.setStorageSync("Gid",t.gid)),e?this.getEventInfo():getApp().getUserLogin((function(n){console.log("---Login---",n),o.getEventInfo()}))},methods:{like:function(){var t=this,o=n.getStorageSync("uid");o?2==this.info.like?(0,i.likeDo)({member_id:o,related_id:this.id,related_type:"article"}).then((function(o){console.log(o),n.showToast({title:"赞成功!",icon:"none",duration:2e3}),t.info.like=1})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):(0,i.likeRevoke)({member_id:o,related_id:this.id,related_type:"article"}).then((function(o){console.log(o),n.showToast({title:"取消成功!",icon:"none",duration:2e3}),t.info.like=2})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):n.showToast({title:"请先登录",icon:"none",duration:2e3})},favs:function(){var t=this,o=n.getStorageSync("uid");o?2==this.info.fav?(0,i.favsDo)({member_id:o,related_id:this.id,related_type:"article"}).then((function(o){console.log(o),n.showToast({title:"收藏成功!",icon:"none",duration:2e3}),t.info.fav=1})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):(0,i.favsRevoke)({member_id:o,related_id:this.id,related_type:"article"}).then((function(o){console.log(o),n.showToast({title:"取消收藏成功!",icon:"none",duration:2e3}),t.info.fav=2})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):n.showToast({title:"请先登录",icon:"none",duration:2e3})},PhoneLogin:function(t){var o=this;console.log(t),this.showLogin=!1;var e=n.getStorageSync("openid");(0,i.wxphoneLogin)({code:t.code,openid:e}).then((function(t){console.log(t),1==t.code?(n.showToast({title:"登陆成功!",icon:"none",duration:2e3}),n.setStorageSync("uid",t.data.id),n.setStorageSync("userInfo",t.data),o.userInfo=t.data,o.login=!0,o.loginMod=!1):n.showToast({title:"登陆失败!",icon:"none",duration:2e3})})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})}))},zhifuDo:function(){this.peiMod=!1;var t=n.getStorageSync("uid");t?(0,i.applicationAdd)({association_id:a.default.state.Gid,member_id:t,activity_id:this.id}).then((function(t){1==t.code?n.showToast({title:"报名成功!",icon:"none",duration:2e3}):n.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):this.showLogin=!0},juanzhuDo:function(){this.juanMod=!1;var t=n.getStorageSync("uid");t?""!=this.money&&0!=this.money?(0,i.moneyLogAdd)({association_id:a.default.state.Gid,member_id:t,activity_id:this.id,money:this.money}).then((function(t){1==t.code?n.showToast({title:"捐助成功!",icon:"none",duration:2e3}):n.showToast({title:t.msg,icon:"none",duration:2e3})})).catch((function(t){n.showToast({title:t,icon:"none",duration:2e3})})):n.showToast({title:"请填写金额!",icon:"none",duration:2e3}):this.showLogin=!0},option_add:function(){var t=n.getStorageSync("uid");if(t){for(var o=this,e=(t=n.getStorageSync("uid"),this.questionnaireList.map((function(n,e){return"topic"in n?{activity_id:o.id,topic_id:n.id,member_id:t,option:Array.isArray(n.topic)?n.topic.join(","):n.topic}:""}))),r=0;r1?n.navigateBack():n.redirectTo({url:"/pages/index/index"})}}};t.default=r}).call(this,o(2)["default"])},315:function(n,t,o){"use strict";o.r(t);var e=o(316),i=o.n(e);for(var a in e)["default"].indexOf(a)<0&&function(n){o.d(t,n,(function(){return e[n]}))}(a);t["default"]=i.a},316:function(n,t,o){}},[[309,"common/runtime","common/vendor"]]]); //# sourceMappingURL=../../../../.sourcemap/mp-weixin/pages/packageB/event/event_info.js.map