(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/step/join/join"],{1149:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?o(Object(n),!0).forEach((function(e){c(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function c(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var r=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-layout/app-layout")]).then(function(){return resolve(n("3dd6"))}.bind(null,n)).catch(n.oe)},u=function(){Promise.all([n.e("common/vendor"),n.e("components/basic-component/app-form-id/app-form-id")]).then(function(){return resolve(n("e583"))}.bind(null,n)).catch(n.oe)},s={data:function(){return{list:{},name:"",open_date:"",step_num:1e3,bail_currency:1,setting:null,template_activity:null,join:!1}},components:{"app-layout":r,"app-form-id":u},computed:a({},(0,i.mapState)({theme:function(t){return t.mallConfig.theme},stepImg:function(t){return t.mallConfig.plugin.step},userInfo:function(t){return t.user.info}})),methods:{getSetting:function(){var e=this;e.$request({url:e.$api.step.setting}).then((function(n){e.$hideLoading(),0==n.code?(e.setting=n.data,e.template_activity=n.data.template_activity):t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(t){e.$hideLoading()}))},getList:function(e){var n=this;n.$showLoading({type:"global",text:"加载中..."}),n.$request({url:n.$api.step.activity_detail,data:{activity_id:e}}).then((function(e){n.getSetting(),0==e.code?n.list=e.data.list:t.showToast({title:e.msg,icon:"none",duration:1e3})})).catch((function(t){n.$hideLoading()}))},subscribe:function(){var t=this;this.$subscribe(this.template_activity).then((function(e){t.apply()})).catch((function(e){t.apply()}))},apply:function(){var e=this,n=e.list.id;t.showLoading({title:"报名中..."}),e.$request({url:e.$api.step.activity_join,data:{activity_id:n},method:"POST"}).then((function(n){if(t.hideLoading(),0==n.code){var i=e.list.begin_at;t.redirectTo({url:"/plugins/step/dare/dare?join=1&date="+i})}else t.showToast({title:n.msg,icon:"none",duration:1e3})})).catch((function(e){t.hideLoading(),t.showToast({title:e,icon:"none",duration:1e3})}))}},onLoad:function(t){var e=this;e.getList(t.id)}};e.default=s}).call(this,n("543d")["default"])},"9f57":function(t,e,n){"use strict";(function(t){n("8748");i(n("66fd"));var e=i(n("d91c"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},cc1a:function(t,e,n){"use strict";n.r(e);var i=n("1149"),o=n.n(i);for(var a in i)"default"!==a&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},cd5b:function(t,e,n){"use strict";var i,o=function(){var t=this,e=t.$createElement;t._self._c},a=[];n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}))},d91c:function(t,e,n){"use strict";n.r(e);var i=n("cd5b"),o=n("cc1a");for(var a in o)"default"!==a&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("e546");var c,r=n("f0c5"),u=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,"714936be",null,!1,i["a"],c);e["default"]=u.exports},e546:function(t,e,n){"use strict";var i=n("e8e6"),o=n.n(i);o.a},e8e6:function(t,e,n){}},[["9f57","common/runtime","common/vendor"]]]);