1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-78d3f34b"],{"161f":function(t,e,n){"use strict";n.d(e,"e",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"f",(function(){return i})),n.d(e,"b",(function(){return c})),n.d(e,"d",(function(){return u}));var a=n("b775");function r(t){return Object(a["a"])({url:"/admin/toDo/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/admin/toDo/"+t,method:"get"})}function s(t){return Object(a["a"])({url:"/admin/toDo",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/admin/toDo",method:"put",data:t})}function c(t){return Object(a["a"])({url:"/admin/toDo/"+t,method:"delete"})}function u(){return Object(a["a"])({url:"/admin/toDo/getLabelList",method:"get"})}},"1bf8":function(t,e,n){},"354e":function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return s})),n.d(e,"e",(function(){return i})),n.d(e,"b",(function(){return c}));var a=n("b775");function r(t){return Object(a["a"])({url:"/bookkeeping/record/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/bookkeeping/record/"+t,method:"get"})}function s(t){return Object(a["a"])({url:"/bookkeeping/record",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/bookkeeping/record",method:"put",data:t})}function c(t){return Object(a["a"])({url:"/bookkeeping/record/"+t,method:"delete"})}},"72c9":function(t,e,n){"use strict";n.d(e,"d",(function(){return r})),n.d(e,"b",(function(){return o})),n.d(e,"f",(function(){return s})),n.d(e,"a",(function(){return i})),n.d(e,"e",(function(){return c})),n.d(e,"c",(function(){return u}));var a=n("b775");function r(t){return Object(a["a"])({url:"/px/card/listRecord",method:"get",params:t})}function o(){return Object(a["a"])({url:"/px/card/getCardByUserId",method:"get"})}function s(t){return Object(a["a"])({url:"/px/card/useCard",method:"post",data:t})}function i(t){return Object(a["a"])({url:"/px/card/confirmCard",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/px/card/scoreCard",method:"post",data:t})}function u(){return Object(a["a"])({url:"/px/card/getToDoCard",method:"get"})}},"8b29":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o}));var a=n("b775");function r(t){return Object(a["a"])({url:"/system/notice/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/system/notice/"+t,method:"get"})}},9677:function(t,e,n){"use strict";n("1bf8")},b4d8:function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"a",(function(){return o})),n.d(e,"c",(function(){return s}));var a=n("b775");function r(t){return Object(a["a"])({url:"/myTool/menstruationConfigure/list",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/myTool/menstruationConfigure",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/myTool/menstruationConfigure",method:"put",data:t})}},f572:function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"homepage"},[n("van-nav-bar",{attrs:{fixed:"",title:"首页"}}),n("van-search",{attrs:{background:"#FFFFFF00",placeholder:"请输入搜索关键词"},on:{focus:function(e){return t.$router.push("/retrieval")}}}),n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 通知公告 ")])],1),n("van-swipe",{staticClass:"my-swipe",attrs:{autoplay:3e3,"indicator-color":"white"}},t._l(t.noticeList,(function(e,a){return n("van-swipe-item",{key:e.id},[n("van-row",{on:{click:function(n){return t.$router.push("/notice?noticeId="+e.noticeId)}}},[e.firstPicture?n("van-col",{staticClass:"first-picture",attrs:{offset:1,span:4},domProps:{innerHTML:t._s(e.firstPicture)}}):t._e(),e.firstPicture?t._e():n("van-col",{staticClass:"no-picture",attrs:{offset:1,span:4}},[t._v(t._s(e.remark)+" ")]),n("van-col",{attrs:{offset:1,span:14}},[n("van-row",{attrs:{align:"center",type:"flex"}},[e.remark?n("van-col",{staticClass:"d-flex flex-justify-center",staticStyle:{"margin-right":"0.5rem"}},[n("van-tag",{attrs:{type:["","success","primary","warning","danger"][Math.floor(6*Math.random())]}},[t._v(" "+t._s(e.remark)+" ")])],1):t._e(),n("van-col",{staticClass:"notice-title"},[t._v(t._s(e.noticeTitle))])],1),n("van-row",[n("van-col",{staticClass:"notice-content",domProps:{innerHTML:t._s(e.noticeContent)}})],1)],1)],1)],1)})),1),t.menstruation?n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 姨妈提醒 ")])],1):t._e(),t.menstruation?n("van-cell-group",{staticClass:"menstruation",attrs:{inset:""},on:{click:function(e){return t.$router.push("/menstruationAssistant")}}},[n("div",{staticClass:"top",domProps:{innerHTML:t._s(t.menstruation)}}),n("div",{staticClass:"bottom"},[t._v(t._s(t.menstruationLabel))])]):t._e(),t.commemorationDayList.length>0?n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 纪念日 ")])],1):t._e(),t._l(t.commemorationDayList,(function(e){return t.commemorationDayList.length>0?n("van-cell-group",{key:e.id,staticClass:"commemoration-day",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:"right theme-grey"},[t._v(" 还有 "),n("span",[t._v(t._s(t.getTimeDifference(t.nowTime,(new Date).getFullYear()+"-"+e.date.slice(5,e.date.length)).slice(0,1)))]),t._v(" 天 "),n("span",[t._v(t._s(t.dateFormatHour(e)))]),t._v(" 小时 ")])],1)],1):t._e()})),t.toDoCardList.length>0?n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 情侣卡券 ")])],1):t._e(),t.toDoCardList.length>0?n("van-list",{staticClass:"card"},[n("van-cell-group",{attrs:{inset:""}},[n("van-cell",{attrs:{center:""}},[n("van-row",{staticClass:"card-line",attrs:{align:"center",type:"flex"}},[n("van-col",{attrs:{span:6}},[t._v("卡券名称")]),n("van-col",{attrs:{span:3}}),n("van-col",{attrs:{span:8}},[t._v("使用说明")]),n("van-col",{attrs:{span:7}},[t._v("使用时间")])],1)],1),t._l(t.toDoCardList,(function(e){return n("van-cell",{key:e.id,attrs:{center:""}},[n("van-row",{attrs:{align:"center",type:"flex"},on:{click:function(e){return t.$router.push("/history")}}},[n("van-col",{attrs:{span:6}},[t._v(t._s(e.cardName))]),n("van-col",{attrs:{span:3}},[n("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":"秦可爱"===e.userName?"female":"male"}})],1),n("van-col",{attrs:{span:8}},[t._v(t._s(e.instructions))]),n("van-col",{attrs:{span:7}},[t._v(t._s(e.createTime))])],1)],1)}))],2)],1):t._e(),n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 今日账单 ")])],1),t.recordList.length>0?n("van-cell-group",{attrs:{inset:""}},[n("van-row",{staticClass:"date",attrs:{type:"flex",align:"center",justify:"space-between"}},[n("van-col",{staticClass:"left"},[n("span",[t._v(t._s((new Date).getDate()))]),n("span",[t._v("日 / 周"+t._s(t.parseTime(new Date,"{a}")))])]),n("van-col",{staticClass:"right"},[t.income?n("span",[n("svg-icon",{attrs:{"icon-class":"加号"}}),n("span",[t._v(t._s(t._f("moneyFilter")(t.income)))])],1):t._e(),t.expenditure?n("span",{staticClass:"income"},[n("svg-icon",{attrs:{"icon-class":"减少"}}),n("span",[t._v(t._s(t._f("moneyFilter")(t.expenditure)))])],1):t._e()])],1),t._l(t.recordList,(function(e){return n("van-cell",{key:Math.random(),staticClass:"record-day",class:t.moneyStyle(e),attrs:{center:"",value:t._f("moneyFilter")(e.money)},on:{click:function(n){return t.handleEdit(e)}},scopedSlots:t._u([{key:"title",fn:function(){return[n("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":Boolean(e.typeObject)?e.typeObject.typeIcon:""}}),n("div",{staticClass:"content"},[e.typeObject&&"2"===e.typeObject.typeDifference?n("div",{staticClass:"transfer"},[n("span",[t._v(t._s(e.accountObject.accountName))]),n("svg-icon",{staticClass:"business-icon",attrs:{"icon-class":"右箭头"}}),n("span",[t._v(t._s(e.otherAccountObject.accountName))])],1):n("div",[t._v(t._s(e.typeObject&&e.typeObject.typeName))]),n("div",{staticClass:"remark"},[t._v(" "+t._s(e.remark)+" ")])])]},proxy:!0}],null,!0)})}))],2):t._e(),0===t.recordList.length?n("van-row",{staticStyle:{"background-color":"#fff",margin:"0 1rem","border-radius":"0.5rem"}},[n("van-empty",{attrs:{description:"暂无记录"}})],1):t._e(),t.toDoList.length>0?n("van-row",{staticClass:"page-title"},[n("van-col",[t._v(" 今日待办 ")])],1):t._e(),t.toDoList.length>0?n("van-list",t._l(t.toDoList.filter((function(t){return!1===t.status})),(function(e){return n("van-cell-group",{key:e.id,attrs:{inset:""}},[n("van-cell",{attrs:{center:""}},[n("van-row",{attrs:{type:"flex",align:"center"},on:{click:function(e){return t.$router.push("/to-do-list/today")}}},[n("van-col",{staticClass:"d-flex flex-items-center",attrs:{span:2}},[n("van-icon",{attrs:{name:"passed"}})],1),n("van-col",{attrs:{span:22}},[t._v(t._s(e.content))])],1)],1)],1)})),1):t._e()],2)},r=[],o=(n("fb6a"),n("99af"),n("a9e3"),n("4de4"),n("d3b7"),n("159b"),n("ac1f"),n("5319"),n("8b29")),s=n("161f"),i=n("354e"),c=n("b775");function u(t){return Object(c["a"])({url:"/homepage/selectMenstruationRecordList",method:"get",params:t})}function l(t){return Object(c["a"])({url:"/homepage/getCommemorationDayList",method:"get",params:t})}var d=n("b4d8"),m=n("72c9"),f={name:"index",data:function(){return{noticeList:this.getLocal("homepageNoticeList")||[],toDoList:this.getLocal("homepageToDoList")||[],recordList:[],expenditure:0,income:0,commemorationDayList:[],nowTime:this.parseTime(new Date),menstruation:"",menstruationLabel:"",toDoCardList:[]}},mounted:function(){this.selectMenstruationRecordList(),this.getCommemorationDayList(),this.getTodayToDoList(),this.getNoticeList(),this.getRecordList(),this.getToDoCard()},methods:{dateFormatHour:function(t){var e=this.getTimeDifference(this.nowTime,(new Date).getFullYear()+"-"+t.date.slice(5,t.date.length));return e.slice(e.indexOf("天")+1,e.indexOf("小"))},getToDoCard:function(){var t=this;Object(m["c"])().then((function(e){t.toDoCardList=e.data}))},selectMenstruationRecordList:function(){var t=this;u().then((function(e){Object(d["b"])().then((function(n){if(n.rows.length>0){var a="",r="";if(n.rows[0].userId!==t.$store.getters.id&&(a="您的小可爱",r="请提醒您的小可爱"),"0"===e.data[0].type){var o=t.getTimeDifference(e.data[0].date,t.nowTime).slice(0,t.getTimeDifference(e.data[0].date,t.nowTime).indexOf("天"));t.menstruation="".concat(a,'大姨妈已经<span class="theme-blue" style="font-weight: bold;"> ').concat(Number(o)+1," </span>天"),t.menstruationLabel="".concat(r,"不要吃冰的、辣的,注意保暖、少生气!!!")}else if("1"===e.data[0].type){var s=t.getTimeDifference(t.nowTime,e.data[1].date).slice(0,t.getTimeDifference(t.nowTime,e.data[1].date).indexOf("天"));if(Number(s)+Number(n.rows[0].cycle)>5&&Number(s)+Number(n.rows[0].cycle)<=Number(n.rows[0].cycle))return;if(Number(s)+Number(n.rows[0].cycle)<0)return t.menstruation="".concat(a,'大姨妈已经推迟<span class="theme-red" style="font-weight: bold; font-size: 1.4rem;"> ').concat(-1*(Number(s)+Number(n.rows[0].cycle))," </span>天"),void(t.menstruationLabel="".concat(r,"不要着急,大不了养个娃!!!"));t.menstruation="".concat(a,'大姨妈还有<span class="theme-blue" style="font-weight: bold;"> ').concat(Number(s)+Number(n.rows[0].cycle)+1," </span>天"),t.menstruationLabel="".concat(r,"提前准备好姨妈巾!!!")}}}))}))},getCommemorationDayList:function(){var t=this;l().then((function(e){t.commemorationDayList=e.data}))},getRecordList:function(){var t=this;Object(i["d"])({version:1}).then((function(e){t.expenditure=t.arraySum(e.rows.filter((function(t){return t.typeObject&&"1"===t.typeObject.typeDifference})),"money"),t.income=t.arraySum(e.rows.filter((function(t){return t.typeObject&&"0"===t.typeObject.typeDifference})),"money"),t.recordList=e.rows}))},getTodayToDoList:function(){var t=this;Object(s["e"])({planStartTime:this.parseTime(new Date,"{y}-{m}-{d}"),planEndTime:this.parseTime(new Date,"{y}-{m}-{d}"),performer:this.$store.getters.id}).then((function(e){t.toDoList=e.rows.filter((function(t){return!1===t.status})),t.setLocal("homepageToDoList",t.toDoList)}))},getNoticeList:function(){var t=this,e=/(<([^>]+)>)/gi;Object(o["b"])().then((function(n){t.noticeList=n.rows,t.noticeList.forEach((function(t){t.noticeContent=t.noticeContent.replace(e,"")})),t.setLocal("homepageNoticeList",t.noticeList)}))},handleEdit:function(t){t.typeObject&&"3"===t.typeObject.typeDifference?this.$toast("抱歉,余额变更不可编辑"):this.$router.push("/addRecord?recordId="+t.id)},moneyStyle:function(t){return t.typeObject&&"1"===t.typeObject.typeDifference?"blue":t.typeObject&&"0"===t.typeObject.typeDifference?"red":t.typeObject&&"2"===t.typeObject.typeDifference?"gray":void 0}}},p=f,v=(n("9677"),n("2877")),b=Object(v["a"])(p,a,r,!1,null,"0643793d",null);e["default"]=b.exports}}]); |