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
2f6a7180
Commit
2f6a7180
authored
Dec 24, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
b50c5142
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
370 additions
and
394 deletions
+370
-394
centerMpBaidu2.vue
src/components/sellDashboard/map/centerMpBaidu2.vue
+0
-1
viittoMap2.vue
src/components/sellDashboard/map/viittoMap2.vue
+0
-3
platformPieRank.vue
src/components/sellDashboard/platformPieRank.vue
+0
-2
sellTopRank.vue
src/components/sellDashboard/sellTopRank.vue
+1
-2
index.js
src/plugins/index.js
+0
-1
demo.vue
src/views/demo.vue
+0
-2
index.vue
src/views/index.vue
+369
-382
login.vue
src/views/login.vue
+0
-1
No files found.
src/components/sellDashboard/map/centerMpBaidu2.vue
View file @
2f6a7180
...
@@ -58,7 +58,6 @@ export default {
...
@@ -58,7 +58,6 @@ export default {
});
});
}
}
var
dataSet
=
new
mapv
.
DataSet
(
data
);
var
dataSet
=
new
mapv
.
DataSet
(
data
);
console
.
log
(
newBaiduArr
)
var
options
=
{
var
options
=
{
// shadowColor: 'rgba(255, 250, 50, 1)',
// shadowColor: 'rgba(255, 250, 50, 1)',
// shadowBlur: 10,
// shadowBlur: 10,
...
...
src/components/sellDashboard/map/viittoMap2.vue
View file @
2f6a7180
...
@@ -43,7 +43,6 @@ export default {
...
@@ -43,7 +43,6 @@ export default {
var
_this
=
this
;
var
_this
=
this
;
window
.
onresize
=
_this
.
myChart
.
resize
;
window
.
onresize
=
_this
.
myChart
.
resize
;
this
.
myChart
.
on
(
'click'
,
function
(
params
){
this
.
myChart
.
on
(
'click'
,
function
(
params
){
console
.
log
(
params
)
let
name
=
params
.
name
let
name
=
params
.
name
if
(
name
===
'非正式同行'
||
name
===
'正式同行'
||
name
===
'激活总数'
)
{
if
(
name
===
'非正式同行'
||
name
===
'正式同行'
||
name
===
'激活总数'
)
{
// {location: `${params.data.value[0]}, ${params.data.value[1]}`, key: 'ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX'}
// {location: `${params.data.value[0]}, ${params.data.value[1]}`, key: 'ZzGBZF6L0sgFDLlDohyvYhCnWy4dwksX'}
...
@@ -205,7 +204,6 @@ export default {
...
@@ -205,7 +204,6 @@ export default {
// handler: function (val, oldVal) {
// handler: function (val, oldVal) {
// if(val!=null && val.length>0)
// if(val!=null && val.length>0)
// {
// {
// console.log("aaa");
// this.chinaConfigure();
// this.chinaConfigure();
// }
// }
...
@@ -218,7 +216,6 @@ export default {
...
@@ -218,7 +216,6 @@ export default {
// //==this.SourceData[1].length
// //==this.SourceData[1].length
// if(val!=null && val.length>0)
// if(val!=null && val.length>0)
// {
// {
// console.log("bbb");
// this.chinaConfigure();
// this.chinaConfigure();
// }
// }
...
...
src/components/sellDashboard/platformPieRank.vue
View file @
2f6a7180
...
@@ -23,7 +23,6 @@ export default {
...
@@ -23,7 +23,6 @@ export default {
data
:{
data
:{
handler
:
function
(
val
,
oldVal
)
{
handler
:
function
(
val
,
oldVal
)
{
if
(
val
)
{
if
(
val
)
{
console
.
log
(
'inerank..........'
)
this
.
init
()
this
.
init
()
}
}
}
}
...
@@ -104,7 +103,6 @@ export default {
...
@@ -104,7 +103,6 @@ export default {
}
}
]
]
};
};
console
.
log
(
option
);
myChart
.
setOption
(
option
);
myChart
.
setOption
(
option
);
}
}
}
}
...
...
src/components/sellDashboard/sellTopRank.vue
View file @
2f6a7180
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<ul>
<ul>
<li
v-for=
"(item, index) in data"
:key=
"index"
v-if=
"index
<10
"
>
<li
v-for=
"(item, index) in data"
:key=
"index"
v-if=
"index
<10
"
>
<div
class=
"head"
>
<div
class=
"head"
>
<img
v-if=
"item.userPhoto"
:src=
"`http://
reborndev.oss-cn-hangzhou.aliyuncs
.com$
{item.userPhoto}`" :onerror="defaultImg"/>
<img
v-if=
"item.userPhoto"
:src=
"`http://
imgfile.oytour
.com$
{item.userPhoto}`" :onerror="defaultImg"/>
<img
v-else
src=
'../../assets/img/default_head_img.jpg'
/>
<img
v-else
src=
'../../assets/img/default_head_img.jpg'
/>
</div>
</div>
<div
class=
"rank-content"
>
<div
class=
"rank-content"
>
...
@@ -85,7 +85,6 @@ export default {
...
@@ -85,7 +85,6 @@ export default {
// names += ',' + x.userName
// names += ',' + x.userName
// })
// })
// // this.addTrade(count, names, this.addTradeInfo.enterName)
// // this.addTrade(count, names, this.addTradeInfo.enterName)
// console.log(names,count)
// }
// }
let
name
=
this
.
addTradeInfo
.
enterName
,
let
name
=
this
.
addTradeInfo
.
enterName
,
...
...
src/plugins/index.js
View file @
2f6a7180
...
@@ -139,7 +139,6 @@ export default {
...
@@ -139,7 +139,6 @@ export default {
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
bus
=
bus
Vue
.
prototype
.
alert
=
function
(
title
,
content
){
Vue
.
prototype
.
alert
=
function
(
title
,
content
){
title
=!
title
&&
title
==
''
?
'系统提示'
:
title
title
=!
title
&&
title
==
''
?
'系统提示'
:
title
console
.
log
(
title
)
let
obj
=
{
let
obj
=
{
title
,
title
,
content
content
...
...
src/views/demo.vue
View file @
2f6a7180
...
@@ -45,7 +45,6 @@ export default {
...
@@ -45,7 +45,6 @@ export default {
sendMsg
()
{
sendMsg
()
{
var
$this
=
this
;
var
$this
=
this
;
$this
.
proxy
.
invoke
(
"Hello"
,
$this
.
value
).
done
(
msg
=>
{
$this
.
proxy
.
invoke
(
"Hello"
,
$this
.
value
).
done
(
msg
=>
{
console
.
log
(
msg
)
});
});
},
},
getMsg
()
{
getMsg
()
{
...
@@ -57,7 +56,6 @@ export default {
...
@@ -57,7 +56,6 @@ export default {
$this
.
online
=
data
;
$this
.
online
=
data
;
})
})
$this
.
proxy
.
on
(
"notifySignin"
,
data
=>
{
$this
.
proxy
.
on
(
"notifySignin"
,
data
=>
{
console
.
log
(
'1231231231'
)
$this
.
sigin
=
data
$this
.
sigin
=
data
})
})
}
}
...
...
src/views/index.vue
View file @
2f6a7180
<
style
>
<
style
>
@import
url("../assets/views/index.css")
;
@import
url("../assets/views/index.css")
;
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"data-show"
>
<div
class=
"data-show"
>
<audio
ref=
"audio"
autoplay
>
您的浏览器不支持 audio 元素。
</audio>
<audio
ref=
"audio"
autoplay
>
您的浏览器不支持 audio 元素。
</audio>
<div
class=
"box"
>
<div
class=
"box"
>
<div
class=
"title"
>
<div
class=
"title"
>
<h1>
印象之旅销售数据平台
</h1>
<h1>
印象之旅销售数据平台
</h1>
<!--
<h6>
MAGE · Data Services
</h6>
-->
<!--
<h6>
MAGE · Data Services
</h6>
-->
<div
class=
"time"
>
<div
class=
"time"
>
{{
times
.
length
==
2
?(
times
[
0
].
length
==
1
?
'0'
+
times
[
0
]:
times
[
0
]):
""
}}
<span
style=
"font-family:pingfang;font-size:40px;color:#666;margin-left:-2px;"
>
:
</span>
{{
times
.
length
==
2
?(
times
[
1
].
length
==
1
?
'0'
+
times
[
1
]:
times
[
1
]):
""
}}
{{
times
.
length
==
2
?(
times
[
0
].
length
==
1
?
'0'
+
times
[
0
]:
times
[
0
]):
""
}}
<span
</div>
style=
"font-family:pingfang;font-size:40px;color:#666;margin-left:-2px;"
>
:
</span>
{{
times
.
length
==
2
?(
times
[
1
].
length
==
1
?
'0'
+
times
[
1
]:
times
[
1
]):
""
}}
</div>
</div>
<div
class=
"show"
v-if=
'isReady'
>
<div
class=
"show-left-content"
>
<div
class=
"block line"
>
<div
class=
"circel go-right"
></div>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
线路销售
</div>
<div
class=
"content"
>
<line-rank
:data=
'data.lineGuestRank'
></line-rank>
</div>
</div>
<div
class=
"block"
>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
销售部门排名
</div>
<div
class=
"content"
>
<departHorizontalRank
:data=
'data.salesDepartmentRank'
></departHorizontalRank>
</div>
</div>
<div
class=
"block outbind"
>
<div
class=
"circel go-left"
></div>
<div
class=
"circel go-right"
></div>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
收客平台
</div>
<div
class=
"content"
>
<platformPieRank
:data=
'data.platformGuest'
></platformPieRank>
</div>
</div>
<div
class=
"block ad"
>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
今日广告
</div>
<div
class=
"content"
>
<div
class=
"item"
>
<div
class=
"num"
>
{{
advert
.
new
}}
</div>
<div>
今日新增
</div>
</div>
<div
class=
"item"
>
<div
class=
"num"
>
{{
advert
.
forward
?
advert
.
forward
:
'0'
}}
</div>
<div>
今日转发
</div>
</div>
</div>
</div>
</div>
<div
class=
"show"
v-if=
'isReady'
>
<div
class=
"block mini"
>
<div
class=
"show-left-content"
>
<i
class=
"l-t"
></i>
<div
class=
"block line"
>
<i
class=
"r-t"
></i>
<div
class=
"circel go-right"
></div>
<i
class=
"l-b"
></i>
<i
class=
"l-t"
></i>
<i
class=
"r-b"
></i>
<i
class=
"r-t"
></i>
<div
class=
"title"
>
同行热度
</div>
<i
class=
"l-b"
></i>
<div
class=
"content"
>
<i
class=
"r-b"
></i>
<lineMemberRank></lineMemberRank>
<div
class=
"title"
>
线路销售
</div>
</div>
<div
class=
"content"
>
</div>
<line-rank
:data=
'data.lineGuestRank'
></line-rank>
<div
class=
"block long"
>
</div>
<i
class=
"l-t"
></i>
</div>
<i
class=
"r-t"
></i>
<div
class=
"block"
>
<i
class=
"l-b"
></i>
<i
class=
"l-t"
></i>
<i
class=
"r-b"
></i>
<i
class=
"r-t"
></i>
<div
class=
"title"
>
营业额走势图
</div>
<i
class=
"l-b"
></i>
<div
class=
"content"
>
<i
class=
"r-b"
></i>
<sellTrade
:data=
'data.turnoverTrend'
></sellTrade>
<div
class=
"title"
>
销售部门排名
</div>
</div>
<div
class=
"content"
>
</div>
<departHorizontalRank
:data=
'data.salesDepartmentRank'
></departHorizontalRank>
</div>
</div>
<div
class=
"show-center-content"
>
</div>
<!--
<i
class=
"l-t"
></i>
<div
class=
"block outbind"
>
<div
class=
"circel go-left"
></div>
<div
class=
"circel go-right"
></div>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
收客平台
</div>
<div
class=
"content"
>
<platformPieRank
:data=
'data.platformGuest'
></platformPieRank>
</div>
</div>
<div
class=
"block ad"
>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
今日广告
</div>
<div
class=
"content"
>
<div
class=
"item"
>
<div
class=
"num"
>
{{
advert
.
new
}}
</div>
<div>
今日新增
</div>
</div>
<div
class=
"item"
>
<div
class=
"num"
>
{{
advert
.
forward
?
advert
.
forward
:
'0'
}}
</div>
<div>
今日转发
</div>
</div>
</div>
</div>
<div
class=
"block mini"
>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
同行热度
</div>
<div
class=
"content"
>
<lineMemberRank></lineMemberRank>
</div>
</div>
<div
class=
"block long"
>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<div
class=
"title"
>
营业额走势图
</div>
<div
class=
"content"
>
<sellTrade
:data=
'data.turnoverTrend'
></sellTrade>
</div>
</div>
</div>
<div
class=
"show-center-content"
>
<!--
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
-->
<i
class=
"r-b"
></i>
-->
<div
class=
"count-box"
>
<div
class=
"count-box"
>
<div
class=
"cloub-tag-box"
>
<div
class=
"cloub-tag-box"
>
<tags
:hotWord=
"hotWord"
></tags>
<tags
:hotWord=
"hotWord"
></tags>
</div>
</div>
<div
class=
"sell-count-box"
>
<div
class=
"sell-count-box"
>
<div
class=
"sell-count"
>
<div
class=
"sell-count"
>
<number
<number
title=
"今日销售额"
:count=
"(data.sales/10000).toFixed(2)"
unit=
"W"
color=
"#2a9e9e"
title=
"今日销售额"
:decimal=
"true"
iconColor=
"#2a9e9e"
></number>
:count=
"(data.sales/10000).toFixed(2)"
</div>
unit=
"W"
</div>
color=
"#2a9e9e"
<div
class=
"people-count"
>
:decimal=
"true"
<number
title=
"今日收客数"
:count=
"data.guestNum.toString()"
unit=
"人"
color=
"#2a73fe"
iconColor=
"#2a9e9e"
:decimal=
"false"
iconColor=
"#2a73fe"
></number>
></number>
</div>
</div>
</div>
</div>
<div
class=
"map-box"
>
<div
class=
"people-count"
>
<centerMp></centerMp>
<number
</div>
title=
"今日收客数"
</div>
:count=
"data.guestNum.toString()"
<div
class=
"show-right-content"
>
unit=
"人"
<div
class=
"up"
>
color=
"#2a73fe"
<i
class=
"l-t"
></i>
:decimal=
"false"
<i
class=
"r-t"
></i>
iconColor=
"#2a73fe"
<i
class=
"l-b"
></i>
></number>
<i
class=
"r-b"
></i>
</div>
<sellTopRank
:data=
'data.empSalesRank'
></sellTopRank>
</div>
</div>
<div
class=
"map-box"
>
<div
class=
"down"
>
<centerMp></centerMp>
<div
class=
"circel go-left"
></div>
</div>
<i
class=
"l-t"
></i>
</div>
<i
class=
"r-t"
></i>
<div
class=
"show-right-content"
>
<i
class=
"l-b"
></i>
<div
class=
"up"
>
<i
class=
"r-b"
></i>
<i
class=
"l-t"
></i>
<!--
<div
class=
"title"
>
销售部门排名
</div>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<sellTopRank
:data=
'data.empSalesRank'
></sellTopRank>
</div>
<div
class=
"down"
>
<div
class=
"circel go-left"
></div>
<i
class=
"l-t"
></i>
<i
class=
"r-t"
></i>
<i
class=
"l-b"
></i>
<i
class=
"r-b"
></i>
<!--
<div
class=
"title"
>
销售部门排名
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<departHorizontalRank></departHorizontalRank>
<departHorizontalRank></departHorizontalRank>
</div>
-->
</div>
-->
<newOrder
:data=
'data.signInfo'
></newOrder>
<newOrder
:data=
'data.signInfo'
></newOrder>
</div>
</div>
</div>
</div>
</div>
<div
class=
"video_box"
:class=
"movieShow ? 'video_box_show' : ''"
>
<video
v-if=
"movieShow"
@
error=
"videoErr"
@
ended=
"nextVideo(true)"
style=
"width:100%;height:100%;"
id=
"video"
ref=
"video"
:src=
"movie[movieNum]"
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
</div>
</div>
</div>
</div>
<div
class=
"video_box"
:class=
"movieShow ? 'video_box_show' : ''"
>
<video
v-if=
"movieShow"
@
error=
"videoErr"
@
ended=
"nextVideo(true)"
style=
"width:100%;height:100%;"
id=
"video"
ref=
"video"
:src=
"movie[movieNum]"
autoplay=
"autoplay"
controls=
"controls"
>
您的浏览器不支持视频播放
</video>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
centerMp
from
"../components/sellDashboard/map/index"
;
import
centerMp
from
"../components/sellDashboard/map/index"
;
import
tags
from
"../components/sellDashboard/tagCloub/index"
;
import
tags
from
"../components/sellDashboard/tagCloub/index"
;
import
number
from
"../components/sellDashboard/number/index"
;
import
number
from
"../components/sellDashboard/number/index"
;
import
lineRank
from
"../components/sellDashboard/lineRank"
;
import
lineRank
from
"../components/sellDashboard/lineRank"
;
import
lineMemberRank
from
"../components/sellDashboard/lineMemberRank"
;
import
lineMemberRank
from
"../components/sellDashboard/lineMemberRank"
;
import
platformPieRank
from
"../components/sellDashboard/platformPieRank"
;
import
platformPieRank
from
"../components/sellDashboard/platformPieRank"
;
import
departHorizontalRank
from
"../components/sellDashboard/departHorizontalRank"
;
import
departHorizontalRank
from
"../components/sellDashboard/departHorizontalRank"
;
import
sellTopRank
from
"../components/sellDashboard/sellTopRank"
;
import
sellTopRank
from
"../components/sellDashboard/sellTopRank"
;
import
newOrder
from
"../components/sellDashboard/newOrder"
;
import
newOrder
from
"../components/sellDashboard/newOrder"
;
import
sellTrade
from
"../components/sellDashboard/sellTrade"
;
import
sellTrade
from
"../components/sellDashboard/sellTrade"
;
export
default
{
components
:
{
centerMp
,
tags
,
number
,
lineRank
,
platformPieRank
,
departHorizontalRank
,
lineMemberRank
,
sellTopRank
,
newOrder
,
sellTrade
,
export
default
{
components
:
{
centerMp
,
tags
,
number
,
lineRank
,
platformPieRank
,
departHorizontalRank
,
lineMemberRank
,
sellTopRank
,
newOrder
,
sellTrade
,
},
data
()
{
return
{
baiduToken
:
""
,
mqData
:
[],
endVideo
:
''
,
data
:
{},
isReady
:
false
,
times
:[],
socket
:
null
,
advert
:
{
forward
:
0
,
new
:
0
},
hotWord
:
null
,
movie
:
[],
movieNum
:
0
,
movieShow
:
false
,
movieTime
:
0
,
movieTimmer
:
null
,
fiveMinutes
:
300
,
};
},
mounted
()
{
let
audio
=
this
.
$refs
.
audio
let
_this
=
this
for
(
let
i
=
0
;
i
<
26
;
i
++
){
// 生成视频数据
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this
.
nextVideo
();
this
.
mq
();
this
.
initVideo
();
this
.
bus
.
$on
(
"addVideo"
,
txt
=>
{
this
.
addVideo
(
txt
);
});
audio
.
addEventListener
(
'ended'
,
function
()
{
console
.
log
(
_this
.
endVideo
)
if
(
_this
.
endVideo
&&
_this
.
endVideo
!=
''
){
audio
.
src
=
_this
.
endVideo
_this
.
endVideo
=
''
}
else
{
_this
.
mq
()
}
},
false
);
this
.
init
()
this
.
movieTimmer
=
setInterval
(()
=>
{
this
.
getMovieTimmer
()
},
1000
)
// this.getTime()
// setInterval(() => {
// this.getTime()
// }, 1000)
setTimeout
(()
=>
{
this
.
connec
();
},
1000
);
},
methods
:
{
videoErr
:
function
(){
this
.
movieShow
=
false
this
.
movieTime
=
0
this
.
fiveMinutes
=
9999999
},
getMovieTimmer
:
function
()
{
if
(
this
.
movieTime
<
this
.
fiveMinutes
)
{
this
.
movieTime
+=
1
}
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
()
}
return
}
},
nextVideo
:
function
(
f
)
{
if
(
f
)
{
// 根据f 删除一播放的数据
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
}
let
maxNum
=
this
.
movie
.
length
// 最大随机数
let
mathRound
=
Math
.
floor
(
Math
.
random
()
*
maxNum
)
// 生成随机数
if
(
maxNum
===
1
){
// 如果随机数为1 说明是最后提条数据 重新生成数据
this
.
movie
=
[]
for
(
let
i
=
0
;
i
<
26
;
i
++
){
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
// this.movie.push(`http://img.oytour.com/video/${i+1}.mp4`)
}
this
.
nextVideo
()
}
else
{
this
.
movieNum
=
mathRound
}
},
connec
(){
let
_this
=
this
let
url
=
'http://47.96.23.199:5002/data_server'
// let url = 'http://192.168.2.215:5000/data_server'
let
userInfo
=
this
.
getLocalStorage
()
// if (userInfo) {
// url +='?id=' + userInfo.ImAccount
// url +='&token=' + userInfo.token
this
.
socket
=
this
.
$socketio
.
connect
(
url
)
// }
//报名信息
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
.
movieShow
)
});
//销售排行榜
this
.
socket
.
on
(
'emp_sales_rank'
,
function
(
msg
)
{
_this
.
data
.
empSalesRank
=
msg
.
data
console
.
log
(
"emp_sales_rank"
,
msg
)
});
//销售额
this
.
socket
.
on
(
'sales'
,
function
(
msg
)
{
_this
.
data
.
sales
=
msg
.
data
});
//测试
this
.
socket
.
on
(
'server_response'
,
function
(
msg
)
{
console
.
log
(
msg
)
});
//收客数
this
.
socket
.
on
(
'guest_num'
,
function
(
msg
)
{
_this
.
data
.
guestNum
=
msg
.
data
console
.
log
(
'guest_num'
,
msg
)
});
//平台收客
this
.
socket
.
on
(
'platform_guest'
,
function
(
msg
)
{
_this
.
data
.
platformGuest
=
msg
.
data
});
//销售部门排名
this
.
socket
.
on
(
'sales_department_rank'
,
function
(
msg
)
{
_this
.
data
.
salesDepartmentRank
=
msg
.
data
});
//销售线路排名
this
.
socket
.
on
(
'line_guest_rank'
,
function
(
msg
)
{
_this
.
data
.
lineGuestRank
=
msg
.
data
});
//营业额走势图
this
.
socket
.
on
(
'turnover_trend'
,
function
(
msg
)
{
_this
.
data
.
turnoverTrend
=
msg
.
data
});
//广告
this
.
socket
.
on
(
'advert'
,
function
(
msg
)
{
_this
.
advert
=
msg
.
data
});
//热词
this
.
socket
.
on
(
'hot_word'
,
function
(
msg
)
{
_this
.
hotWord
=
msg
.
data
});
},
getTime
(){
var
d
=
new
Date
();
this
.
times
=
[]
let
h
=
d
.
getHours
()
let
m
=
d
.
getMinutes
()
h
=
h
.
length
==
1
?
`0
${
h
}
`
:
h
.
toString
()
m
=
m
.
length
==
1
?
`0
${
m
}
`
:
m
.
toString
()
this
.
times
.
push
(
h
)
this
.
times
.
push
(
m
)
},
init
(){
// this.apipost('')
//let url='http://dataapi.oytour.com/api/user/get_init_data'
let
url
=
'http://47.96.23.199:5002/api/user/get_init_data'
let
msg
=
{
tdsourcetag
:
's_pcqq_aiomsg'
}
this
.
apiRequest
(
url
,
msg
,
r
=>
{
this
.
data
=
r
.
data
.
data
console
.
log
(
this
.
data
)
this
.
hotWord
=
this
.
data
.
hotWord
this
.
advert
=
this
.
data
.
advertInfo
this
.
isReady
=
true
});
},
//消息队列
async
mq
()
{
if
(
this
.
mqData
.
length
==
0
)
{
await
this
.
sleep
(
1000
);
this
.
mq
();
}
else
{
this
.
playVideo
(
this
.
mqData
[
0
].
txt
);
if
(
this
.
mqData
[
0
].
endVideo
&&
this
.
mqData
[
0
].
endVideo
!=
''
)
this
.
endVideo
=
this
.
mqData
[
0
].
endVideo
this
.
mqData
.
splice
(
0
,
1
);
}
},
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
},
initVideo
()
{
let
msg
=
{
appkey
:
"4gR6yRX5O3PN8hGC5FaNh5d5"
,
secrity
:
"QG70I08RXronkrRlGNqAxNRwEt27Ys7f"
};
this
.
apipost
(
"thridparty_baiduvideo_gettoken"
,
msg
,
r
=>
{
this
.
baiduToken
=
r
.
data
.
data
.
token
;
setTimeout
(()
=>
{
this
.
playVideo
(
"大家好,我系二狗同鞋"
);
},
2000
);
},
},
null
data
()
{
);
return
{
},
baiduToken
:
""
,
playVideo
(
txt
)
{
mqData
:
[],
let
url
=
`http://tsn.baidu.com/text2audio?tex=
${
encodeURIComponent
(
endVideo
:
''
,
data
:
{},
isReady
:
false
,
times
:
[],
socket
:
null
,
advert
:
{
forward
:
0
,
new
:
0
},
hotWord
:
null
,
movie
:
[],
movieNum
:
0
,
movieShow
:
false
,
movieTime
:
0
,
movieTimmer
:
null
,
fiveMinutes
:
300
,
ServerUrl
:
"http://47.96.23.199:5002"
};
},
mounted
()
{
let
audio
=
this
.
$refs
.
audio
let
_this
=
this
for
(
let
i
=
0
;
i
<
26
;
i
++
)
{
// 生成视频数据
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
}
this
.
nextVideo
();
this
.
mq
();
this
.
initVideo
();
this
.
bus
.
$on
(
"addVideo"
,
txt
=>
{
this
.
addVideo
(
txt
);
});
audio
.
addEventListener
(
'ended'
,
function
()
{
console
.
log
(
"audio"
,
_this
.
endVideo
)
if
(
_this
.
endVideo
&&
_this
.
endVideo
!=
''
)
{
audio
.
src
=
_this
.
endVideo
_this
.
endVideo
=
''
}
else
{
_this
.
mq
()
}
},
false
);
this
.
init
()
this
.
movieTimmer
=
setInterval
(()
=>
{
this
.
getMovieTimmer
()
},
1000
)
setTimeout
(()
=>
{
this
.
connec
();
},
1000
);
},
methods
:
{
videoErr
:
function
()
{
this
.
movieShow
=
false
this
.
movieTime
=
0
this
.
fiveMinutes
=
9999999
},
getMovieTimmer
:
function
()
{
if
(
this
.
movieTime
<
this
.
fiveMinutes
)
{
this
.
movieTime
+=
1
}
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
()
}
return
}
},
nextVideo
:
function
(
f
)
{
if
(
f
)
{
// 根据f 删除一播放的数据
this
.
movie
.
splice
(
this
.
movieNum
,
1
)
}
let
maxNum
=
this
.
movie
.
length
// 最大随机数
let
mathRound
=
Math
.
floor
(
Math
.
random
()
*
maxNum
)
// 生成随机数
if
(
maxNum
===
1
)
{
// 如果随机数为1 说明是最后提条数据 重新生成数据
this
.
movie
=
[]
for
(
let
i
=
0
;
i
<
26
;
i
++
)
{
this
.
movie
.
push
(
`http://192.168.1.254/
${
i
+
1
}
.mp4`
)
}
this
.
nextVideo
()
}
else
{
this
.
movieNum
=
mathRound
}
},
connec
()
{
let
_this
=
this
let
url
=
this
.
ServerUrl
+
"/data_server"
;
let
userInfo
=
this
.
getLocalStorage
()
this
.
socket
=
this
.
$socketio
.
connect
(
url
)
//报名信息
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
.
movieShow
)
});
//销售排行榜
this
.
socket
.
on
(
'emp_sales_rank'
,
function
(
msg
)
{
_this
.
data
.
empSalesRank
=
msg
.
data
console
.
log
(
"emp_sales_rank_销售排行榜"
,
msg
)
});
//销售额
this
.
socket
.
on
(
'sales'
,
function
(
msg
)
{
_this
.
data
.
sales
=
msg
.
data
;
console
.
log
(
"sales_销售额"
,
msg
)
});
//测试
this
.
socket
.
on
(
'server_response'
,
function
(
msg
)
{
console
.
log
(
"server_response_测试"
,
msg
)
});
//收客数
this
.
socket
.
on
(
'guest_num'
,
function
(
msg
)
{
_this
.
data
.
guestNum
=
msg
.
data
console
.
log
(
'guest_num_收客数'
,
msg
)
});
//平台收客
this
.
socket
.
on
(
'platform_guest'
,
function
(
msg
)
{
_this
.
data
.
platformGuest
=
msg
.
data
;
console
.
log
(
"platform_guest_平台收客"
,
msg
.
data
)
});
//销售部门排名
this
.
socket
.
on
(
'sales_department_rank'
,
function
(
msg
)
{
_this
.
data
.
salesDepartmentRank
=
msg
.
data
console
.
log
(
"sales_department_rank_销售部门排名"
,
msg
.
data
)
});
//销售线路排名
this
.
socket
.
on
(
'line_guest_rank'
,
function
(
msg
)
{
_this
.
data
.
lineGuestRank
=
msg
.
data
;
console
.
log
(
"line_guest_rank_销售线路排名"
,
msg
.
data
)
});
//营业额走势图
this
.
socket
.
on
(
'turnover_trend'
,
function
(
msg
)
{
_this
.
data
.
turnoverTrend
=
msg
.
data
console
.
log
(
"turnover_trend_营业额走势图"
,
msg
.
data
)
});
//广告
this
.
socket
.
on
(
'advert'
,
function
(
msg
)
{
_this
.
advert
=
msg
.
data
;
console
.
log
(
"advert_广告"
,
msg
.
data
);
});
//热词
this
.
socket
.
on
(
'hot_word'
,
function
(
msg
)
{
_this
.
hotWord
=
msg
.
data
console
.
log
(
"hot_word_热词"
,
msg
.
data
);
});
},
getTime
()
{
var
d
=
new
Date
();
this
.
times
=
[]
let
h
=
d
.
getHours
()
let
m
=
d
.
getMinutes
()
h
=
h
.
length
==
1
?
`0
${
h
}
`
:
h
.
toString
()
m
=
m
.
length
==
1
?
`0
${
m
}
`
:
m
.
toString
()
this
.
times
.
push
(
h
)
this
.
times
.
push
(
m
)
},
init
()
{
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
)
this
.
hotWord
=
this
.
data
.
hotWord
this
.
advert
=
this
.
data
.
advertInfo
this
.
isReady
=
true
});
},
//消息队列
async
mq
()
{
if
(
this
.
mqData
.
length
==
0
)
{
await
this
.
sleep
(
1000
);
this
.
mq
();
}
else
{
this
.
playVideo
(
this
.
mqData
[
0
].
txt
);
if
(
this
.
mqData
[
0
].
endVideo
&&
this
.
mqData
[
0
].
endVideo
!=
''
)
this
.
endVideo
=
this
.
mqData
[
0
].
endVideo
this
.
mqData
.
splice
(
0
,
1
);
}
},
sleep
(
ms
)
{
return
new
Promise
(
resolve
=>
setTimeout
(
resolve
,
ms
));
},
initVideo
()
{
let
msg
=
{
appkey
:
"4gR6yRX5O3PN8hGC5FaNh5d5"
,
secrity
:
"QG70I08RXronkrRlGNqAxNRwEt27Ys7f"
};
this
.
apipost
(
"thridparty_baiduvideo_gettoken"
,
msg
,
r
=>
{
this
.
baiduToken
=
r
.
data
.
data
.
token
;
setTimeout
(()
=>
{
this
.
playVideo
(
"大家好,我系二狗同鞋"
);
},
2000
);
},
null
);
},
playVideo
(
txt
)
{
let
url
=
`http://tsn.baidu.com/text2audio?tex=
${
encodeURIComponent
(
txt
txt
)}
&tok=
${
)}
&tok=
${
this
.
baiduToken
this
.
baiduToken
}
&cuid=00-E0-4C-01-80-B4&ctp=1&lan=zh&spd=5&pit=5&vol=5&per=0&aue=3`
;
}
&cuid=00-E0-4C-01-80-B4&ctp=1&lan=zh&spd=5&pit=5&vol=5&per=0&aue=3`
;
this
.
$refs
.
audio
.
src
=
url
;
this
.
$refs
.
audio
.
src
=
url
;
},
},
addVideo
(
obj
)
{
addVideo
(
obj
)
{
this
.
mqData
.
push
(
obj
);
this
.
mqData
.
push
(
obj
);
}
}
}
}
};
};
</
script
>
</
script
>
\ No newline at end of file
src/views/login.vue
View file @
2f6a7180
...
@@ -60,7 +60,6 @@ export default {
...
@@ -60,7 +60,6 @@ export default {
},
},
methods
:
{
methods
:
{
login
(){
login
(){
console
.
log
(
'in..........'
)
if
(
this
.
loginInfo
.
account
==
''
){
if
(
this
.
loginInfo
.
account
==
''
){
this
.
alert
(
'登录提醒'
,
'请输入你的身份ID'
)
this
.
alert
(
'登录提醒'
,
'请输入你的身份ID'
)
}
else
if
(
this
.
loginInfo
.
password
==
''
){
}
else
if
(
this
.
loginInfo
.
password
==
''
){
...
...
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