File tree Expand file tree Collapse file tree 2 files changed +25
-4
lines changed
Expand file tree Collapse file tree 2 files changed +25
-4
lines changed Original file line number Diff line number Diff line change 22 <div class =" RightContent" >
33 <div class =" ArticleList" >
44 <div id =" lineChart" class =" lineChart" ></div >
5- <div id =" mapChart" class =" lineChart" ></div >
5+ <!-- < div id="mapChart" class="lineChart"></div> -- >
66 <!-- 表格操作栏-->
77 <el-table :data =" blogVisitList" style =" width : 100% " >
8- <el-table-column prop =" ip " label =" 访客IP " ></el-table-column >
8+ <el-table-column prop =" fromUrl " label =" 来源URL " ></el-table-column >
99 <el-table-column prop =" location" label =" 访客定位" ></el-table-column >
1010 <el-table-column prop =" time" label =" 访问时间" ></el-table-column >
1111 <el-table-column prop =" browser" label =" 浏览器" ></el-table-column >
@@ -61,12 +61,12 @@ export default {
6161 this .SQAjax ({
6262 Url: ' /api/visitCount/foreend' ,
6363 RequestData: {
64- endTime: ' 2021/11/24 ' ,
64+ endTime: this . getSQTime (). split ( ' ' )[ 0 ] ,
6565 dayNum: 7
6666 },
6767 Success : function (data ) {
6868 let dates = [], readings = [];
69- data .forEach (function (item ) {
69+ data .dateCountList . forEach (function (item ) {
7070 dates .push (item .time );
7171 readings .push (item .reading );
7272 });
Original file line number Diff line number Diff line change @@ -40,6 +40,27 @@ CommonFunction.install = function (Vue) {
4040 } ) . catch ( function ( error ) {
4141 } ) ;
4242 }
43+
44+ /**
45+ * 获取当前时间
46+ * @returns {string:2021/11/18 16:45:39 }
47+ */
48+ Vue . prototype . getSQTime = function ( ) {
49+ let dateObject = new Date ( ) ,
50+ year = dateObject . getFullYear ( ) ,
51+ month = dateObject . getMonth ( ) + 1 ,
52+ day = dateObject . getDate ( ) ,
53+ hour = dateObject . getHours ( ) ,
54+ min = dateObject . getMinutes ( ) ,
55+ second = dateObject . getSeconds ( ) ,
56+ result = '' ;
57+
58+ if ( min < 10 ) min = '0' + min ;
59+ if ( second < 10 ) second = '0' + second ;
60+
61+ result = '' + year + '/' + month + '/' + day + ' ' + hour + ':' + min + ':' + second ;
62+ return result ;
63+ } ;
4364}
4465
4566export default CommonFunction
You can’t perform that action at this time.
0 commit comments