1 line
2.9 KiB
JavaScript
1 line
2.9 KiB
JavaScript
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-c8da2410"],{"08c0":function(e,t,o){"use strict";o.r(t);var a=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"commemoration-day-details"},[o("van-nav-bar",{attrs:{fixed:"","left-arrow":"","left-text":"返回","right-text":"编辑",title:e.commemorationDayForm.name},on:{"click-right":function(t){return e.$router.push("/addCommemorationDay?id="+e.commemorationDayForm.id)},"click-left":function(t){return e.$router.go(-1)}}}),o("div",{staticClass:"page"},[o("div",{staticClass:"content"},[o("div",{staticClass:"day"},[o("van-row",{attrs:{type:"flex",justify:"center"}},[e._v(e._s(e.commemorationDayForm.name))]),e.commemorationDayForm.repeat?o("van-row",{attrs:{type:"flex",justify:"center"}},[o("van-col",[e._v("还有")]),o("van-col",[e._v(e._s(e.dateFormat(e.commemorationDayForm)))])],1):e._e(),o("van-row",{attrs:{type:"flex",justify:"center"}},[o("van-col",[e._v("已经")]),o("van-col",[e._v(e._s(e.getTimeDifference(e.commemorationDayForm.date,e.nowTime)))])],1),o("van-row",{attrs:{type:"flex",justify:"center"}},[e._v(" "+e._s(e.commemorationDayForm.repeat?"每年"+e.parseTime(e.commemorationDayForm.date,"{m}月{d}日"):e.parseTime(e.commemorationDayForm.date,"{y}年{m}月{d}日"))+" ")])],1)])])],1)},n=[],r=(o("fb6a"),o("a9e3"),o("26f3")),i={name:"CommemorationDayDetails",data:function(){return{commemorationDayForm:{},nowTime:this.parseTime(new Date),commemorationDayInterval:{}}},mounted:function(){var e=this;Object(r["c"])(this.$route.query.id).then((function(t){e.commemorationDayForm=t.data})),this.commemorationDayInterval=setInterval((function(){e.nowTime=e.parseTime(new Date)}),1e3)},methods:{dateFormat:function(e){return this.$moment(this.nowTime).isBefore(e.date)?this.getTimeDifference(this.nowTime,e.date):this.$moment(this.nowTime).isBefore((new Date).getFullYear()+e.date.slice(4))?this.getTimeDifference(this.nowTime,(new Date).getFullYear()+e.date.slice(4)):this.getTimeDifference(this.nowTime,Number((new Date).getFullYear())+1+e.date.slice(4))}},destroyed:function(){clearInterval(this.commemorationDayInterval)}},m=i,c=(o("d4e5"),o("2877")),s=Object(c["a"])(m,a,n,!1,null,"95876504",null);t["default"]=s.exports},"26f3":function(e,t,o){"use strict";o.d(t,"d",(function(){return n})),o.d(t,"c",(function(){return r})),o.d(t,"a",(function(){return i})),o.d(t,"e",(function(){return m})),o.d(t,"b",(function(){return c}));var a=o("b775");function n(e){return Object(a["a"])({url:"/commemorationDay/list",method:"get",params:e})}function r(e){return Object(a["a"])({url:"/commemorationDay/"+e,method:"get"})}function i(e){return Object(a["a"])({url:"/commemorationDay",method:"post",data:e})}function m(e){return Object(a["a"])({url:"/commemorationDay",method:"put",data:e})}function c(e){return Object(a["a"])({url:"/commemorationDay/"+e,method:"delete"})}},d4e5:function(e,t,o){"use strict";o("fefe")},fefe:function(e,t,o){}}]);
|