(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/check_in/index/index"],{"4c33":function(e,t,n){"use strict";(function(e){n("2d0a");i(n("66fd"));var t=i(n("f8dd"));function i(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"7ffd":function(e,t,n){"use strict";var i=n("fb6a"),a=n.n(i);a.a},c893:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("2f62");function a(e,t){var n;if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=r(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var i=0,a=function(){};return{s:a,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw o}}}}function r(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n7&&t%2==1?i=31:2==t&&(i=n%4==0&&n%100!=0?30:29);for(var r=1;rc?0:eo?0:32,this.year=t,this.month=e,this.now=n,this.getEveryday()},add:function(){var e=this.month+1,t=this.year,n=this.now;e>12&&(e=1,t++);var i=t+"-"+e+"-01",a=new Date(Date.parse(i.replace(/-/g,"/")));this.week=a.getDay();var r=new Date,o=r.getFullYear(),c=r.getMonth()+1;n=t==o?e>c?0:eo?0:32,this.year=t,this.month=e,this.now=n,this.getEveryday()},subscribe:function(){var e=this;this.$subscribe(this.template_message).then((function(t){e.getAward(1)})).catch((function(t){e.getAward(1)}))},getAward:function(t,n){var i=this;e.showLoading({mask:!0,title:1==t?"签到中...":"领取中..."}),i.$request({url:i.$api.check_in.sign_in,data:{status:t,day:n||1}}).then((function(t){if(0==t.code){var n=t.data.queueId,a=t.data.token;i.checkInResult(n,a)}else e.hideLoading(),e.showToast({title:t.msg,icon:"none",duration:1e3})})).catch((function(a){e.hideLoading(),i.$event.on(i.$const.EVENT_USER_LOGIN).then((function(){i.$store.dispatch("user/info"),i.getAward(t,n)}))}))},checkInResult:function(t,n){var i=this;i.$request({url:i.$api.check_in.sign_in_result,data:{queueId:t,token:n}}).then((function(a){e.hideLoading(),0==a.code?1==a.data.retry?i.checkInResult(t,n):(i.result=a.data,"integral"==i.result.type?i.success=!0:"balance"==i.result.type&&(i.getRed=!0)):e.showToast({title:a.msg,icon:"none",duration:1e3})})).catch((function(t){e.hideLoading()}))},changeSwitch:function(){0==this.user.is_remind&&this.$subscribe(this.template_message)},toSwitch:function(t){var n=this,i=this,a=0;t.detail.value&&(a=1),i.$request({url:i.$api.check_in.user,data:{is_remind:a}}).then((function(t){i.$hideLoading(),0==t.code?n.user.is_remind=a:e.showToast({title:t.msg,icon:"none",duration:1e3})})).catch((function(e){i.$hideLoading()}))},close:function(){this.success=!1,this.getRed=!1,this.getList()}},onShareAppMessage:function(){return this.$shareAppMessage({title:this.$children[0].navigationBarTitle,path:"/plugins/check_in/index/index"})},onShareTimeline:function(){return this.$shareTimeline({title:this.$children[0].navigationBarTitle,query:{}})},onLoad:function(){this.$commonLoad.onload();var e=this;wx.getSystemInfo({success:function(t,n){e.other_height=2*t.windowHeight-500+"rpx"}});var t=new Date;e.year=t.getFullYear(),e.month=t.getMonth()+1,e.now=t.getDate();var n=e.year+"-"+e.month+"-01",i=new Date(Date.parse(n.replace(/-/g,"/")));e.week=i.getDay(),wx.showShareMenu({menus:["shareAppMessage","shareTimeline"]}),e.$showLoading({type:"global",text:"加载中..."}),e.getSetting()}};t.default=h}).call(this,n("543d")["default"])},da5c:function(e,t,n){"use strict";var i;n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return r})),n.d(t,"a",(function(){return i}));var a=function(){var e=this,t=e.$createElement;e._self._c},r=[]},eeef:function(e,t,n){"use strict";n.r(t);var i=n("c893"),a=n.n(i);for(var r in i)"default"!==r&&function(e){n.d(t,e,(function(){return i[e]}))}(r);t["default"]=a.a},f8dd:function(e,t,n){"use strict";n.r(t);var i=n("da5c"),a=n("eeef");for(var r in a)"default"!==r&&function(e){n.d(t,e,(function(){return a[e]}))}(r);n("7ffd");var o,c=n("f0c5"),s=Object(c["a"])(a["default"],i["b"],i["c"],!1,null,"f085787e",null,!1,i["a"],o);t["default"]=s.exports},fb6a:function(e,t,n){}},[["4c33","common/runtime","common/vendor"]]]);