徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
4.8 KiB

require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_sgin/index"],{"07e2":function(n,t,i){"use strict";i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return s})),i.d(t,"a",(function(){return e}));var e={uniPopup:function(){return i.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(i.bind(null,"a1bc"))}},a=function(){var n=this.$createElement,t=(this._self._c,this.signRecord.length);this.$mp.data=Object.assign({},{$root:{g0:t}})},s=[]},4577:function(n,t,i){"use strict";(function(n,t){var e=i("47a9");i("7561");e(i("3240"));var a=e(i("9a82"));n.__webpack_require_UNI_MP_PLUGIN__=i,t(a.default)}).call(this,i("3223")["default"],i("df3c")["createPage"])},"6ec6":function(n,t,i){},"80ec":function(n,t,i){"use strict";i.r(t);var e=i("f6a3"),a=i.n(e);for(var s in e)["default"].indexOf(s)<0&&function(n){i.d(t,n,(function(){return e[n]}))}(s);t["default"]=a.a},"9a82":function(n,t,i){"use strict";i.r(t);var e=i("07e2"),a=i("80ec");for(var s in a)["default"].indexOf(s)<0&&function(n){i.d(t,n,(function(){return a[n]}))}(s);i("b89c");var o=i("828b"),u=Object(o["a"])(a["default"],e["b"],e["c"],!1,null,"60cb0f5a",null,!1,e["a"],void 0);t["default"]=u.exports},b89c:function(n,t,i){"use strict";var e=i("6ec6"),a=i.n(e);a.a},f6a3:function(n,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e=i("8f59"),a=i("77d7"),s=i("bad7"),o=i("6e47"),u={components:{BaseCalendar:function(){i.e("components/BaseCalendar").then(function(){return resolve(i("e3ff"))}.bind(null,i)).catch(i.oe)},emptyPage:function(){i.e("components/emptyPage").then(function(){return resolve(i("bc18"))}.bind(null,i)).catch(i.oe)},NavBar:function(){i.e("components/NavBar").then(function(){return resolve(i("5962"))}.bind(null,i)).catch(i.oe)}},data:function(){return{imgHost:s.HTTP_REQUEST_URL,continuousSignDays:0,cumulativeSignDays:0,bubble:[],signList:[],userInfo:{},signRecord:[],signRemindStatus:0,signRemindSwitch:0,targetDate:parseInt((new Date).getFullYear())+"-"+parseInt((new Date).getMonth()+1),sumCount:0,signData:[],iconColor:"#333333",isScrolling:!1,calendarVisible:!1}},computed:(0,e.mapGetters)(["isLogin"]),onLoad:function(){this.isLogin&&(this.getUserInfo(),this.getSignSysteam(),this.getSignList(),this.getSignCalendar(this.targetDate))},onPageScroll:function(n){n.scrollTop>50?(this.isScrolling=!0,this.iconColor="#333333"):n.scrollTop<50&&(this.isScrolling=!1,this.iconColor="#FFFFFF")},methods:{toggle:function(n){this.$refs.popup.open(n),this.getSignCalendar(this.targetDate)},change:function(n){this.calendarVisible=n.show},clickSign:function(n){this.signData.push(n),this.sumCount++},getData:function(n){n.split("-")[0],n.split("-")[1];if(this.sumCount=88,n===this.targetDate){for(var t=["1","04","5","13","14","15"],i=[],e=(new Date).getDate(),a=0;a<6;a++){if(parseInt(t[a])>e)break;i.push(this.targetDate+"-"+t[a])}this.signData=i}else this.signData=[]},getSignSysteam:function(){var n=this;(0,a.getSignConfig)().then((function(t){var i=t.data,e=i.continuousSignDays,a=i.cumulativeSignDays,s=i.signRemindStatus,o=i.signRemindSwitch,u=i.signData,c=i.signList,r=i.signMode,g=["周一","周二","周三","周四","周五","周六","周日"],l=(new Date).getDay();g[l?l-1:6]="今天",1==r&&c.forEach((function(n,t){n.day=g[t]})),n.signList=c,n.continuousSignDays=e,n.cumulativeSignDays=a,n.signRemindStatus=!!s,n.signRemindSwitch=o;var f="",d="",h=Object.keys(u).map((function(n){switch(f="",d=u[n],n){case"sign_point":f="签到领积分";break;case"sign_exp":f="签到领经验";break}return{name:f,value:d}}));n.bubble=h}))},getUserInfo:function(){var n=this;(0,a.postSignUser)({sign:1}).then((function(t){n.$set(n,"userInfo",t.data)}))},goSign:function(n){var t=this,i=this;i.userInfo.sum_sgin_day;if(i.userInfo.is_day_sgin)return this.$util.Tips({title:"您今日已签到!"});(0,a.setSignIntegral)().then((function(n){t.$util.Tips({title:n.data.sign_exp?"获得".concat(n.data.sign_exp,"经验"):"获得".concat(n.data.sign_point,"积分")}),i.getSignSysteam(),i.getSignList(),t.getUserInfo(),t.getSignCalendar(t.targetDate)})).catch((function(n){return t.$util.Tips({title:n})}))},noticeChange:function(n){var t=this;(0,o.openSignSubscribe)().then((function(){t.signRemind(Number(n.detail.value))}))},signRemind:function(n){var t=this;(0,a.signRemind)(n).then((function(i){t.$util.Tips({title:"签到提醒".concat(n?"开启":"关闭")})}))},getSignList:function(){var n=this;(0,a.getSignList)({page:1,limit:10}).then((function(t){n.$set(n,"signRecord",t.data)}))},getSignCalendar:function(n){var t=this;(0,a.getSignCalendar)({time:n}).then((function(i){var e=i.data,a=e.continuousSignDays,s=e.signList;t.sumCount=a;var o=s.filter((function(n){return n.is_sign})),u=o.map((function(n){return n.day.split("/")[1]})),c=u.map((function(t){return n+"-"+t}));t.signData=c}))}}};t.default=u}},[["4577","common/runtime","common/vendor"]]]);