Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
Muse
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
罗超
Muse
Commits
34a1aaa3
Commit
34a1aaa3
authored
Dec 30, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a4615cfe
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
20 deletions
+46
-20
index.vue
src/views/index.vue
+46
-20
No files found.
src/views/index.vue
View file @
34a1aaa3
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
movieTime
:
0
,
movieTime
:
0
,
movieTimmer
:
null
,
movieTimmer
:
null
,
fiveMinutes
:
300
,
fiveMinutes
:
300
,
ServerUrl
:
"http://47.96.23.199:5002"
ServerUrl
:
"http://47.96.23.199:5002"
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -194,7 +194,6 @@
...
@@ -194,7 +194,6 @@
this
.
addVideo
(
txt
);
this
.
addVideo
(
txt
);
});
});
audio
.
addEventListener
(
'ended'
,
function
()
{
audio
.
addEventListener
(
'ended'
,
function
()
{
console
.
log
(
"audio"
,
_this
.
endVideo
)
if
(
_this
.
endVideo
&&
_this
.
endVideo
!=
''
)
{
if
(
_this
.
endVideo
&&
_this
.
endVideo
!=
''
)
{
audio
.
src
=
_this
.
endVideo
audio
.
src
=
_this
.
endVideo
_this
.
endVideo
=
''
_this
.
endVideo
=
''
...
@@ -223,14 +222,39 @@
...
@@ -223,14 +222,39 @@
}
else
if
(
this
.
movieTime
>=
this
.
fiveMinutes
&&
!
this
.
movieShow
)
{
}
else
if
(
this
.
movieTime
>=
this
.
fiveMinutes
&&
!
this
.
movieShow
)
{
this
.
movieShow
=
true
this
.
movieShow
=
true
}
else
{
}
else
{
let
st
=
document
.
getElementsByTagName
(
'video'
)[
0
].
readyState
try
{
let
play
=
document
.
getElementsByTagName
(
'video'
)[
0
].
paused
let
st
=
document
.
getElementsByTagName
(
'video'
)[
0
].
readyState
if
(
st
==
4
&&
play
)
{
let
play
=
document
.
getElementsByTagName
(
'video'
)[
0
].
paused
document
.
getElementsByTagName
(
'video'
)[
0
].
play
()
if
(
st
==
4
&&
play
)
{
document
.
getElementsByTagName
(
'video'
)[
0
].
play
()
}
}
catch
(
err
)
{
}
}
return
return
}
}
},
},
getDateStr
()
{
var
myDate
=
new
Date
();
//获取当前年
var
year
=
myDate
.
getFullYear
();
//获取当前月
var
month
=
myDate
.
getMonth
()
+
1
;
//获取当前日
var
date
=
myDate
.
getDate
();
var
h
=
myDate
.
getHours
();
//获取当前小时数(0-23)
var
m
=
myDate
.
getMinutes
();
//获取当前分钟数(0-59)
var
s
=
myDate
.
getSeconds
();
//获取当前时间
var
now
=
year
+
'-'
+
this
.
conver
(
month
)
+
"-"
+
this
.
conver
(
date
)
+
" "
+
this
.
conver
(
h
)
+
':'
+
this
.
conver
(
m
)
+
":"
+
this
.
conver
(
s
);
return
now
;
},
//日期时间处理
conver
(
s
)
{
return
s
<
10
?
'0'
+
s
:
s
;
},
nextVideo
:
function
(
f
)
{
nextVideo
:
function
(
f
)
{
if
(
f
)
{
// 根据f 删除一播放的数据
if
(
f
)
{
// 根据f 删除一播放的数据
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
...
@@ -249,65 +273,67 @@
...
@@ -249,65 +273,67 @@
},
},
connec
()
{
connec
()
{
let
_this
=
this
let
_this
=
this
let
url
=
this
.
ServerUrl
+
"/data_server"
;
let
url
=
this
.
ServerUrl
+
"/data_server"
;
let
userInfo
=
this
.
getLocalStorage
()
let
userInfo
=
this
.
getLocalStorage
()
this
.
socket
=
this
.
$socketio
.
connect
(
url
)
this
.
socket
=
this
.
$socketio
.
connect
(
url
)
console
.
log
(
"this.socket_"
+
this
.
getDateStr
(),
this
.
socket
)
//报名信息
//报名信息
this
.
socket
.
on
(
'sign_info'
,
function
(
msg
)
{
this
.
socket
.
on
(
'sign_info'
,
function
(
msg
)
{
_this
.
data
.
signInfo
=
msg
.
data
_this
.
data
.
signInfo
=
msg
.
data
_this
.
movieTime
=
0
_this
.
movieTime
=
0
_this
.
movieShow
=
false
_this
.
movieShow
=
false
console
.
log
(
"sign_info"
,
msg
,
"_this.movieTime"
,
_this
.
movieTime
,
"_this.movieShow"
,
_this
console
.
log
(
"sign_info_"
+
_this
.
getDateStr
(),
msg
,
"_this.movieTime"
,
_this
.
movieTime
,
"_this.movieShow"
,
_this
.
movieShow
)
.
movieShow
)
});
});
//销售排行榜
//销售排行榜
this
.
socket
.
on
(
'emp_sales_rank'
,
function
(
msg
)
{
this
.
socket
.
on
(
'emp_sales_rank'
,
function
(
msg
)
{
_this
.
data
.
empSalesRank
=
msg
.
data
_this
.
data
.
empSalesRank
=
msg
.
data
console
.
log
(
"emp_sales_rank_销售排行榜
"
,
msg
)
console
.
log
(
"emp_sales_rank_销售排行榜
_"
+
_this
.
getDateStr
()
,
msg
)
});
});
//销售额
//销售额
this
.
socket
.
on
(
'sales'
,
function
(
msg
)
{
this
.
socket
.
on
(
'sales'
,
function
(
msg
)
{
_this
.
data
.
sales
=
msg
.
data
;
_this
.
data
.
sales
=
msg
.
data
;
console
.
log
(
"sales_销售额"
,
msg
)
console
.
log
(
"sales_销售额_"
+
_this
.
getDateStr
()
,
msg
)
});
});
//测试
//测试
this
.
socket
.
on
(
'server_response'
,
function
(
msg
)
{
this
.
socket
.
on
(
'server_response'
,
function
(
msg
)
{
console
.
log
(
"server_response_测试
"
,
msg
)
console
.
log
(
"server_response_测试
_"
+
_this
.
getDateStr
()
,
msg
)
});
});
//收客数
//收客数
this
.
socket
.
on
(
'guest_num'
,
function
(
msg
)
{
this
.
socket
.
on
(
'guest_num'
,
function
(
msg
)
{
_this
.
data
.
guestNum
=
msg
.
data
_this
.
data
.
guestNum
=
msg
.
data
console
.
log
(
'guest_num_收客数'
,
msg
)
console
.
log
(
"guest_num_收客数_"
+
_this
.
getDateStr
()
,
msg
)
});
});
//平台收客
//平台收客
this
.
socket
.
on
(
'platform_guest'
,
function
(
msg
)
{
this
.
socket
.
on
(
'platform_guest'
,
function
(
msg
)
{
_this
.
data
.
platformGuest
=
msg
.
data
;
_this
.
data
.
platformGuest
=
msg
.
data
;
console
.
log
(
"platform_guest_平台收客
"
,
msg
.
data
)
console
.
log
(
"platform_guest_平台收客
_"
+
_this
.
getDateStr
()
,
msg
.
data
)
});
});
//销售部门排名
//销售部门排名
this
.
socket
.
on
(
'sales_department_rank'
,
function
(
msg
)
{
this
.
socket
.
on
(
'sales_department_rank'
,
function
(
msg
)
{
_this
.
data
.
salesDepartmentRank
=
msg
.
data
_this
.
data
.
salesDepartmentRank
=
msg
.
data
console
.
log
(
"sales_department_rank_销售部门排名
"
,
msg
.
data
)
console
.
log
(
"sales_department_rank_销售部门排名
_"
+
_this
.
getDateStr
()
,
msg
.
data
)
});
});
//销售线路排名
//销售线路排名
this
.
socket
.
on
(
'line_guest_rank'
,
function
(
msg
)
{
this
.
socket
.
on
(
'line_guest_rank'
,
function
(
msg
)
{
_this
.
data
.
lineGuestRank
=
msg
.
data
;
_this
.
data
.
lineGuestRank
=
msg
.
data
;
console
.
log
(
"line_guest_rank_销售线路排名
"
,
msg
.
data
)
console
.
log
(
"line_guest_rank_销售线路排名
_"
+
_this
.
getDateStr
()
,
msg
.
data
)
});
});
//营业额走势图
//营业额走势图
this
.
socket
.
on
(
'turnover_trend'
,
function
(
msg
)
{
this
.
socket
.
on
(
'turnover_trend'
,
function
(
msg
)
{
_this
.
data
.
turnoverTrend
=
msg
.
data
_this
.
data
.
turnoverTrend
=
msg
.
data
console
.
log
(
"turnover_trend_营业额走势图
"
,
msg
.
data
)
console
.
log
(
"turnover_trend_营业额走势图
_"
+
_this
.
getDateStr
()
,
msg
.
data
)
});
});
//广告
//广告
this
.
socket
.
on
(
'advert'
,
function
(
msg
)
{
this
.
socket
.
on
(
'advert'
,
function
(
msg
)
{
_this
.
advert
=
msg
.
data
;
_this
.
advert
=
msg
.
data
;
console
.
log
(
"advert_广告
"
,
msg
.
data
);
console
.
log
(
"advert_广告
_"
+
_this
.
getDateStr
()
,
msg
.
data
);
});
});
//热词
//热词
this
.
socket
.
on
(
'hot_word'
,
function
(
msg
)
{
this
.
socket
.
on
(
'hot_word'
,
function
(
msg
)
{
_this
.
hotWord
=
msg
.
data
_this
.
hotWord
=
msg
.
data
console
.
log
(
"hot_word_热词
"
,
msg
.
data
);
console
.
log
(
"hot_word_热词
_"
+
_this
.
getDateStr
()
,
msg
.
data
);
});
});
},
},
getTime
()
{
getTime
()
{
...
@@ -321,13 +347,13 @@
...
@@ -321,13 +347,13 @@
this
.
times
.
push
(
m
)
this
.
times
.
push
(
m
)
},
},
init
()
{
init
()
{
let
url
=
this
.
ServerUrl
+
'/api/user/get_init_data'
;
let
url
=
this
.
ServerUrl
+
'/api/user/get_init_data'
;
let
msg
=
{
let
msg
=
{
tdsourcetag
:
's_pcqq_aiomsg'
tdsourcetag
:
's_pcqq_aiomsg'
}
}
this
.
apiRequest
(
url
,
msg
,
r
=>
{
this
.
apiRequest
(
url
,
msg
,
r
=>
{
this
.
data
=
r
.
data
.
data
this
.
data
=
r
.
data
.
data
console
.
log
(
"get_init_data"
,
this
.
data
)
console
.
log
(
"get_init_data"
,
this
.
data
)
this
.
hotWord
=
this
.
data
.
hotWord
this
.
hotWord
=
this
.
data
.
hotWord
this
.
advert
=
this
.
data
.
advertInfo
this
.
advert
=
this
.
data
.
advertInfo
this
.
isReady
=
true
this
.
isReady
=
true
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment