|
1 | | -<template> |
2 | | - <div class="copyright"> |
3 | | - <div> |
4 | | - <span> |
5 | | - Copyright © 刘伟坤 - 个人博客 版权所有 |
6 | | - <a target="_blank" style="color: #188ae2" href="https://github.com/itliuwk"><i class="iconfont icon-github"></i></a> |
7 | | - Powered By liuwk Design. |
8 | | - </span> |
9 | | - <a target="_blank" href="http://www.beian.miit.gov.cn">粤ICP备19106134号</a> |
10 | | - </div> |
11 | | - <div style="margin: 10px; 0"> |
12 | | - <a |
13 | | - target="_blank" |
14 | | - href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44011302002188" |
15 | | - style="display:inline-block;text-decoration:none;height:20px;line-height:20px;" |
16 | | - > |
17 | | - <img |
18 | | - src="../assets/img/备案图标.png" |
19 | | - style="float:left;width: 16px;position: relative; top: 1px;left: -5px; |
20 | | -" |
21 | | - /> |
22 | | - <p style="float:left;height:20px;line-height:20px; ">粤公网安备 44011302002188号</p> |
23 | | - </a> |
24 | | - </div> |
25 | | - <div> |
26 | | - <span>本站低调运行已经有 {{ time }}</span> |
27 | | - </div> |
28 | | - <div style="margin: 10px; 0"> |
29 | | - <span> |
30 | | - <!-- <i class="iconfont icon-yanjing"></i> --> |
31 | | - {{ visit }} |
32 | | - </span> |
33 | | - <span style="margin: 0 20px;">最近访问时间:{{ lately }}</span> |
34 | | - <span> |
35 | | - <!-- <i class="iconfont icon-ren"></i> --> |
36 | | - {{ register }} |
37 | | - </span> |
38 | | - </div> |
39 | | - <div style="padding: 20px 0"> |
40 | | - <a href="https://www.yunaq.com/new_analytics/report/login/?site=www.sxitw.cn" title="创宇云安全" target="_blank"> |
41 | | - <img src="../assets/img/jsl.png" width="127px" height="47px" style="margin:0px 5px;" /> |
42 | | - </a> |
43 | | - |
44 | | - <a href="http://www.qcloud.com/redirect.php?redirect=1001&cps_key=8c96bc9f7c143bf40b60cfd558885a8d" title="腾讯云安全认证" target="_blank"> |
45 | | - <img src="../assets/img/qcloud.png" width="127px" height="47px" style="margin:0px 5px;" /> |
46 | | - </a> |
47 | | - </div> |
48 | | - <div id="top-img"></div> |
49 | | - </div> |
50 | | -</template> |
51 | | - |
52 | | -<script> |
53 | | -import { detail, update } from '@/api/statistics.js'; |
54 | | -import { YYYYMMDD } from '@/utils/date'; |
55 | | -export default { |
56 | | - name: 'copyright', |
57 | | - data() { |
58 | | - return { |
59 | | - time: '0天0小时0分0秒', |
60 | | - statistics: [], |
61 | | - visit: '', |
62 | | - register: '', |
63 | | - lately: '' |
64 | | - }; |
65 | | - }, |
66 | | - mounted() { |
67 | | - this.showtime(); |
68 | | - this.detailStatistics(); |
69 | | - }, |
70 | | - methods: { |
71 | | - updateStatistics() { |
72 | | - update().then(res => {}); |
73 | | - }, |
74 | | - detailStatistics() { |
75 | | - detail().then(res => { |
76 | | - res.data.map(item => { |
77 | | - item.logintime = YYYYMMDD(parseInt(item.logintime)); |
78 | | - return item; |
79 | | - }); |
80 | | - this.visit = res.data[0].name + ' : ' + res.data[0].count; |
81 | | - this.register = res.data[1].name + ' : ' + res.data[1].count; |
82 | | - this.lately = res.data[0].logintime; |
83 | | - this.updateStatistics(); |
84 | | - }); |
85 | | - }, |
86 | | - showtime(biryear = 2019, birmonth = 8, birday = 24) { |
87 | | - setInterval(() => { |
88 | | - let that = this; |
89 | | - let TMonth = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
90 | | - let nowMonth = birmonth - 1; |
91 | | - let bmonth = TMonth[nowMonth]; |
92 | | - let startday = new Date('' + bmonth + ' ' + birday + ', ' + biryear + ' 18:00'); |
93 | | - startday.setYear('' + biryear + ''); |
94 | | - let today = new Date(); |
95 | | - let minPerDay = 60 * 1000; |
96 | | - let hoursPerDay = 60 * 60 * 1000; |
97 | | - let PerDay = 24 * 60 * 60 * 1000; |
98 | | - let secsLeft = (today.getTime() - startday.getTime()) / minPerDay; |
99 | | - let secsRound = Math.round(secsLeft); |
100 | | - let secsRemain = secsLeft - secsRound; |
101 | | - secsRemain = secsRemain < 0 ? (secsRemain = 60 - (secsRound - secsLeft) * 60) : (secsRemain = (secsLeft - secsRound) * 60); |
102 | | - secsRemain = Math.round(secsRemain); |
103 | | - let minLeft = (today.getTime() - startday.getTime()) / hoursPerDay; |
104 | | - let minRound = Math.round(minLeft); |
105 | | - let minRemain = minLeft - minRound; |
106 | | - minRemain = minRemain < 0 ? (minRemain = 60 - (minRound - minLeft) * 60) : (minRemain = (minLeft - minRound) * 60); |
107 | | - minRemain = Math.round(minRemain - 0.495); |
108 | | - let hoursLeft = (today.getTime() - startday.getTime()) / PerDay; |
109 | | - let hoursRound = Math.round(hoursLeft); |
110 | | - let hoursRemain = hoursLeft - hoursRound; |
111 | | - hoursRemain = hoursRemain < 0 ? (hoursRemain = 24 - (hoursRound - hoursLeft) * 24) : (hoursRemain = (hoursLeft - hoursRound) * 24); |
112 | | - hoursRemain = Math.round(hoursRemain - 0.5); |
113 | | - let daysLeft = (today.getTime() - startday.getTime()) / PerDay; |
114 | | - daysLeft = daysLeft - 0.5; |
115 | | - let daysRound = Math.round(daysLeft); |
116 | | - let daysRemain = daysRound; |
117 | | - let day_rem = '天'; |
118 | | - let hour_rem = '小时'; |
119 | | - let min_rem = '分'; |
120 | | - let sec_rem = '秒'; |
121 | | - let timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem; |
122 | | - that.time = timeRemain; |
123 | | - }, 1000); |
124 | | - } |
125 | | - } |
126 | | -}; |
127 | | -</script> |
128 | | - |
129 | | -<style rel="stylesheet/scss" lang="scss" scoped> |
130 | | -.copyright { |
131 | | - background: #121a1d; |
132 | | - color: #fff; |
133 | | - /*margin-top: 20px;*/ |
134 | | - text-align: center; |
135 | | - // border-top: 1px solid #eaeaea; |
136 | | - /*box-shadow: 0 0 2px rgba(37, 45, 51, 0.5);*/ |
137 | | - padding-top: 20px; |
138 | | - position: relative; |
139 | | -} |
140 | | -
|
141 | | -#top-img { |
142 | | - background: url('../assets/img/top.png'); |
143 | | - height: 4px; |
144 | | - top: 0px; |
145 | | - width: 100%; |
146 | | - z-index: 9999; |
147 | | -} |
148 | | -</style> |
| 1 | +<template> |
| 2 | + <div class="copyright"> |
| 3 | + <div> |
| 4 | + <span> |
| 5 | + Copyright © 刘伟坤 - 个人博客 版权所有 |
| 6 | + <a target="_blank" style="color: #188ae2" href="https://github.com/itliuwk"><i class="iconfont icon-github"></i></a> |
| 7 | + Powered By liuwk Design. |
| 8 | + </span> |
| 9 | + <a target="_blank" href="http://beian.miit.gov.cn">粤ICP备19106134号</a> |
| 10 | + </div> |
| 11 | + <div style="margin: 10px; 0"> |
| 12 | + <a |
| 13 | + target="_blank" |
| 14 | + href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=44011302002188" |
| 15 | + style="display:inline-block;text-decoration:none;height:20px;line-height:20px;" |
| 16 | + > |
| 17 | + <img |
| 18 | + src="../assets/img/备案图标.png" |
| 19 | + style="float:left;width: 16px;position: relative; top: 1px;left: -5px; |
| 20 | +" |
| 21 | + /> |
| 22 | + <p style="float:left;height:20px;line-height:20px; ">粤公网安备 44011302002188号</p> |
| 23 | + </a> |
| 24 | + </div> |
| 25 | + <div> |
| 26 | + <span>本站低调运行已经有 {{ time }}</span> |
| 27 | + </div> |
| 28 | + <div style="margin: 10px; 0"> |
| 29 | + <span> |
| 30 | + <!-- <i class="iconfont icon-yanjing"></i> --> |
| 31 | + {{ visit }} |
| 32 | + </span> |
| 33 | + <span style="margin: 0 20px;">最近访问时间:{{ lately }}</span> |
| 34 | + <span> |
| 35 | + <!-- <i class="iconfont icon-ren"></i> --> |
| 36 | + {{ register }} |
| 37 | + </span> |
| 38 | + </div> |
| 39 | + <div style="padding: 20px 0"> |
| 40 | + <a href="https://www.yunaq.com/new_analytics/report/login/?site=www.sxitw.cn" title="创宇云安全" target="_blank"> |
| 41 | + <img src="../assets/img/jsl.png" width="127px" height="47px" style="margin:0px 5px;" /> |
| 42 | + </a> |
| 43 | + |
| 44 | + <a href="http://www.qcloud.com/redirect.php?redirect=1001&cps_key=8c96bc9f7c143bf40b60cfd558885a8d" title="腾讯云安全认证" target="_blank"> |
| 45 | + <img src="../assets/img/qcloud.png" width="127px" height="47px" style="margin:0px 5px;" /> |
| 46 | + </a> |
| 47 | + </div> |
| 48 | + <div id="top-img"></div> |
| 49 | + </div> |
| 50 | +</template> |
| 51 | + |
| 52 | +<script> |
| 53 | +import { detail, update } from '@/api/statistics.js'; |
| 54 | +import { YYYYMMDD } from '@/utils/date'; |
| 55 | +export default { |
| 56 | + name: 'copyright', |
| 57 | + data() { |
| 58 | + return { |
| 59 | + time: '0天0小时0分0秒', |
| 60 | + statistics: [], |
| 61 | + visit: '', |
| 62 | + register: '', |
| 63 | + lately: '' |
| 64 | + }; |
| 65 | + }, |
| 66 | + mounted() { |
| 67 | + this.showtime(); |
| 68 | + this.detailStatistics(); |
| 69 | + }, |
| 70 | + methods: { |
| 71 | + updateStatistics() { |
| 72 | + update().then(res => {}); |
| 73 | + }, |
| 74 | + detailStatistics() { |
| 75 | + detail().then(res => { |
| 76 | + res.data.map(item => { |
| 77 | + item.logintime = YYYYMMDD(parseInt(item.logintime)); |
| 78 | + return item; |
| 79 | + }); |
| 80 | + this.visit = res.data[0].name + ' : ' + res.data[0].count; |
| 81 | + this.register = res.data[1].name + ' : ' + res.data[1].count; |
| 82 | + this.lately = res.data[0].logintime; |
| 83 | + this.updateStatistics(); |
| 84 | + }); |
| 85 | + }, |
| 86 | + showtime(biryear = 2019, birmonth = 8, birday = 24) { |
| 87 | + setInterval(() => { |
| 88 | + let that = this; |
| 89 | + let TMonth = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'June', 'July', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); |
| 90 | + let nowMonth = birmonth - 1; |
| 91 | + let bmonth = TMonth[nowMonth]; |
| 92 | + let startday = new Date('' + bmonth + ' ' + birday + ', ' + biryear + ' 18:00'); |
| 93 | + startday.setYear('' + biryear + ''); |
| 94 | + let today = new Date(); |
| 95 | + let minPerDay = 60 * 1000; |
| 96 | + let hoursPerDay = 60 * 60 * 1000; |
| 97 | + let PerDay = 24 * 60 * 60 * 1000; |
| 98 | + let secsLeft = (today.getTime() - startday.getTime()) / minPerDay; |
| 99 | + let secsRound = Math.round(secsLeft); |
| 100 | + let secsRemain = secsLeft - secsRound; |
| 101 | + secsRemain = secsRemain < 0 ? (secsRemain = 60 - (secsRound - secsLeft) * 60) : (secsRemain = (secsLeft - secsRound) * 60); |
| 102 | + secsRemain = Math.round(secsRemain); |
| 103 | + let minLeft = (today.getTime() - startday.getTime()) / hoursPerDay; |
| 104 | + let minRound = Math.round(minLeft); |
| 105 | + let minRemain = minLeft - minRound; |
| 106 | + minRemain = minRemain < 0 ? (minRemain = 60 - (minRound - minLeft) * 60) : (minRemain = (minLeft - minRound) * 60); |
| 107 | + minRemain = Math.round(minRemain - 0.495); |
| 108 | + let hoursLeft = (today.getTime() - startday.getTime()) / PerDay; |
| 109 | + let hoursRound = Math.round(hoursLeft); |
| 110 | + let hoursRemain = hoursLeft - hoursRound; |
| 111 | + hoursRemain = hoursRemain < 0 ? (hoursRemain = 24 - (hoursRound - hoursLeft) * 24) : (hoursRemain = (hoursLeft - hoursRound) * 24); |
| 112 | + hoursRemain = Math.round(hoursRemain - 0.5); |
| 113 | + let daysLeft = (today.getTime() - startday.getTime()) / PerDay; |
| 114 | + daysLeft = daysLeft - 0.5; |
| 115 | + let daysRound = Math.round(daysLeft); |
| 116 | + let daysRemain = daysRound; |
| 117 | + let day_rem = '天'; |
| 118 | + let hour_rem = '小时'; |
| 119 | + let min_rem = '分'; |
| 120 | + let sec_rem = '秒'; |
| 121 | + let timeRemain = daysRemain + day_rem + hoursRemain + hour_rem + minRemain + min_rem + secsRemain + sec_rem; |
| 122 | + that.time = timeRemain; |
| 123 | + }, 1000); |
| 124 | + } |
| 125 | + } |
| 126 | +}; |
| 127 | +</script> |
| 128 | + |
| 129 | +<style rel="stylesheet/scss" lang="scss" scoped> |
| 130 | +.copyright { |
| 131 | + background: #121a1d; |
| 132 | + color: #fff; |
| 133 | + /*margin-top: 20px;*/ |
| 134 | + text-align: center; |
| 135 | + // border-top: 1px solid #eaeaea; |
| 136 | + /*box-shadow: 0 0 2px rgba(37, 45, 51, 0.5);*/ |
| 137 | + padding-top: 20px; |
| 138 | + position: relative; |
| 139 | +} |
| 140 | +
|
| 141 | +#top-img { |
| 142 | + background: url('../assets/img/top.png'); |
| 143 | + height: 4px; |
| 144 | + top: 0px; |
| 145 | + width: 100%; |
| 146 | + z-index: 9999; |
| 147 | +} |
| 148 | +</style> |
0 commit comments