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 @@
movieTime
:
0
,
movieTimmer
:
null
,
fiveMinutes
:
300
,
ServerUrl
:
"http://47.96.23.199:5002"
ServerUrl
:
"http://47.96.23.199:5002"
};
},
mounted
()
{
...
...
@@ -194,7 +194,6 @@
this
.
addVideo
(
txt
);
});
audio
.
addEventListener
(
'ended'
,
function
()
{
console
.
log
(
"audio"
,
_this
.
endVideo
)
if
(
_this
.
endVideo
&&
_this
.
endVideo
!=
''
)
{
audio
.
src
=
_this
.
endVideo
_this
.
endVideo
=
''
...
...
@@ -223,14 +222,39 @@
}
else
if
(
this
.
movieTime
>=
this
.
fiveMinutes
&&
!
this
.
movieShow
)
{
this
.
movieShow
=
true
}
else
{
let
st
=
document
.
getElementsByTagName
(
'video'
)[
0
].
readyState
let
play
=
document
.
getElementsByTagName
(
'video'
)[
0
].
paused
if
(
st
==
4
&&
play
)
{
document
.
getElementsByTagName
(
'video'
)[
0
].
play
()
try
{
let
st
=
document
.
getElementsByTagName
(
'video'
)[
0
].
readyState
let
play
=
document
.
getElementsByTagName
(
'video'
)[
0
].
paused
if
(
st
==
4
&&
play
)
{
document
.
getElementsByTagName
(
'video'
)[
0
].
play
()
}
}
catch
(
err
)
{
}
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
)
{
if
(
f
)
{
// 根据f 删除一播放的数据
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
...
...
@@ -249,65 +273,67 @@
},
connec
()
{
let
_this
=
this
let
url
=
this
.
ServerUrl
+
"/data_server"
;
let
url
=
this
.
ServerUrl
+
"/data_server"
;
let
userInfo
=
this
.
getLocalStorage
()
this
.
socket
=
this
.
$socketio
.
connect
(
url
)
console
.
log
(
"this.socket_"
+
this
.
getDateStr
(),
this
.
socket
)
//报名信息
this
.
socket
.
on
(
'sign_info'
,
function
(
msg
)
{
_this
.
data
.
signInfo
=
msg
.
data
_this
.
movieTime
=
0
_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
)
});
//销售排行榜
this
.
socket
.
on
(
'emp_sales_rank'
,
function
(
msg
)
{
_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
.
data
.
sales
=
msg
.
data
;
console
.
log
(
"sales_销售额"
,
msg
)
console
.
log
(
"sales_销售额_"
+
_this
.
getDateStr
()
,
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
.
data
.
guestNum
=
msg
.
data
console
.
log
(
'guest_num_收客数'
,
msg
)
console
.
log
(
"guest_num_收客数_"
+
_this
.
getDateStr
()
,
msg
)
});
//平台收客
this
.
socket
.
on
(
'platform_guest'
,
function
(
msg
)
{
_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
.
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
.
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
.
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
.
advert
=
msg
.
data
;
console
.
log
(
"advert_广告
"
,
msg
.
data
);
console
.
log
(
"advert_广告
_"
+
_this
.
getDateStr
()
,
msg
.
data
);
});
//热词
this
.
socket
.
on
(
'hot_word'
,
function
(
msg
)
{
_this
.
hotWord
=
msg
.
data
console
.
log
(
"hot_word_热词
"
,
msg
.
data
);
console
.
log
(
"hot_word_热词
_"
+
_this
.
getDateStr
()
,
msg
.
data
);
});
},
getTime
()
{
...
...
@@ -321,13 +347,13 @@
this
.
times
.
push
(
m
)
},
init
()
{
let
url
=
this
.
ServerUrl
+
'/api/user/get_init_data'
;
let
url
=
this
.
ServerUrl
+
'/api/user/get_init_data'
;
let
msg
=
{
tdsourcetag
:
's_pcqq_aiomsg'
}
this
.
apiRequest
(
url
,
msg
,
r
=>
{
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
.
advert
=
this
.
data
.
advertInfo
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