1 line
3.1 KiB
JavaScript
1 line
3.1 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1c23262d"],{"26f3":function(t,e,n){"use strict";n.d(e,"d",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return r})),n.d(e,"e",(function(){return s})),n.d(e,"b",(function(){return m}));var i=n("b775");function a(t){return Object(i["a"])({url:"/commemorationDay/list",method:"get",params:t})}function o(t){return Object(i["a"])({url:"/commemorationDay/"+t,method:"get"})}function r(t){return Object(i["a"])({url:"/commemorationDay",method:"post",data:t})}function s(t){return Object(i["a"])({url:"/commemorationDay",method:"put",data:t})}function m(t){return Object(i["a"])({url:"/commemorationDay/"+t,method:"delete"})}},"38cf":function(t,e,n){var i=n("23e7"),a=n("1148");i({target:"String",proto:!0},{repeat:a})},b3f8:function(t,e,n){},d3c4:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"commemoration-day"},[n("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回","right-text":"新增",title:"纪念日"},on:{"click-right":function(e){return t.$router.push("/addCommemorationDay")},"click-left":function(e){return t.$router.go(-1)}}}),t._l(t.list,(function(e){return n("van-cell-group",{key:e.id,attrs:{inset:""}},[n("van-row",{staticClass:"d-flex flex-items-center flex-justify-between",on:{click:function(n){return t.$router.push("/commemorationDayDetails?id="+e.id)}}},[n("van-col",[n("svg-icon",{attrs:{"icon-class":e.icon||""}})],1),n("van-col",{staticClass:"middle"},[n("div",{staticClass:"top theme-blue"},[t._v(t._s(e.name))]),n("div",{staticClass:"bottom theme-grey"},[t._v(" "+t._s(e.repeat?"每年"+t.parseTime(e.date,"{m}月{d}日"):t.parseTime(e.date,"{y}年{m}月{d}日"))+" ")])]),n("van-col",{staticClass:"d-flex flex-column flex-items-end"},[n("div",{staticClass:"top theme-grey"},[t._v(t._s(t.dateFormat(e)))]),n("div",{staticClass:"bottom theme-grey"},[t._v(t._s(t.getRepeat(e)))])])],1)],1)}))],2)},a=[],o=(n("38cf"),n("fb6a"),n("a9e3"),n("26f3")),r={name:"CommemorationDay",data:function(){return{list:this.getLocal("commemorationDayList")||[],nowTime:this.parseTime(new Date),commemorationDayInterval:{}}},mounted:function(){var t=this;this.getCommemorationDayList(),this.commemorationDayInterval=setInterval((function(){t.nowTime=t.parseTime(new Date)}),1e3)},methods:{getRepeat:function(t){return t.repeat||this.parseTime(t.date)>this.parseTime(new Date)?"还有":"已经"},dateFormat:function(t){return this.$moment(this.nowTime).isBefore(t.date)?this.getTimeDifference(this.nowTime,t.date):this.$moment(this.nowTime).isBefore((new Date).getFullYear()+t.date.slice(4))?this.getTimeDifference(this.nowTime,(new Date).getFullYear()+t.date.slice(4)):this.getTimeDifference(this.nowTime,Number((new Date).getFullYear())+1+t.date.slice(4))},getCommemorationDayList:function(){var t=this;Object(o["d"])().then((function(e){t.list=e.rows,t.setLocal("commemorationDayList",t.list)}))},destroyed:function(){clearInterval(this.commemorationDayInterval)}}},s=r,m=(n("e261"),n("2877")),c=Object(m["a"])(s,i,a,!1,null,"d1b94e54",null);e["default"]=c.exports},e261:function(t,e,n){"use strict";n("b3f8")}}]);
|