Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
蒋秀川
/
miniProject
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit e0229562
authored
Aug 25, 2023
by
李君
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
巡店流程
1 parent
141be65a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
158 additions
and
18 deletions
h5/src/App.vue
h5/src/api/index.js
h5/src/components/livePlayer.vue
h5/src/components/shopTour.vue
h5/src/App.vue
View file @
e022956
This diff is collapsed.
Click to expand it.
h5/src/api/index.js
View file @
e022956
...
@@ -10,5 +10,40 @@ const tourApi = {
...
@@ -10,5 +10,40 @@ const tourApi = {
getCapture
(
params
,
config
)
{
getCapture
(
params
,
config
)
{
return
req
(
'get'
,
`/patrol/patrolDeviceChannel/capture/
${
params
.
id
}
`
,
params
,
config
)
return
req
(
'get'
,
`/patrol/patrolDeviceChannel/capture/
${
params
.
id
}
`
,
params
,
config
)
},
},
// 提交巡店记录
submitPatrolRecord
(
params
,
config
)
{
return
req
(
'post'
,
`/patrol/patrolRecord`
,
params
,
config
)
},
setBookmark
(
params
,
config
)
{
return
req
(
'post'
,
`/patrol/patrolGate/bookmark`
,
params
,
config
)
},
delBookmark
(
params
,
config
)
{
return
req
(
'post'
,
`/patrol/patrolGate/unbookmark`
,
params
,
config
)
},
// 获取监控点
getPatrolGateList
(
params
,
config
)
{
return
req
(
'get'
,
`/patrol/patrolGate/list`
,
params
,
config
)
},
uploadScreenshot
(
params
,
config
){
return
req
(
'post'
,
`/patrol/b-patrol-screenshot`
,
params
,
config
)
},
// 巡店模板
getPatrolTemplateListFun
(
params
,
config
){
return
req
(
'get'
,
`/patrol/b-patrol-template/list`
,
params
,
config
)
},
// 查询单个模板
getPatrolTemplateOne
(
params
,
config
){
return
req
(
'get'
,
`/patrol/b-patrol-template/
${
params
.
id
}
`
,
params
,
config
)
},
getPatrolSopTypeTree
(
params
,
config
)
{
return
req
(
'get'
,
`/patrol/patrolSopType/tree`
,
params
,
config
)
},
getUsers
(
params
,
config
)
{
return
req
(
'get'
,
`/patrol/s-user/mall/
${
params
.
mallId
}
`
)
},
//提交巡店记录
confirmPatrolRecord
(
params
,
config
)
{
return
req
(
'post'
,
`/patrol/patrolRecord`
,
params
,
config
)
},
}
}
export
default
tourApi
;
export
default
tourApi
;
\ No newline at end of file
\ No newline at end of file
h5/src/components/livePlayer.vue
View file @
e022956
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
import
{
defineComponent
,
reactive
,
toRefs
}
from
'vue'
import
{
defineComponent
,
reactive
,
toRefs
}
from
'vue'
import
{
Toast
}
from
'vant'
;
import
{
Toast
}
from
'vant'
;
import
EZUIKit
from
'ezuikit-js'
import
EZUIKit
from
'ezuikit-js'
import
SLPlayer
from
'@/static/js/slplayer'
import
SLPlayer
from
'@/static/js/slplayer'
;
import
tourApi
from
'@/api'
;
import
tourApi
from
'@/api'
;
export
default
defineComponent
({
export
default
defineComponent
({
props
:
{
props
:
{
...
@@ -83,6 +83,7 @@ export default defineComponent({
...
@@ -83,6 +83,7 @@ export default defineComponent({
if
(
this
.
platform
==
1
)
{
if
(
this
.
platform
==
1
)
{
// 清除萤石云视频
// 清除萤石云视频
if
(
this
.
playerEz
)
{
if
(
this
.
playerEz
)
{
this
.
playerEz
.
stop
()
let
canvasVideo
=
document
.
getElementById
(
'my-video'
)
let
canvasVideo
=
document
.
getElementById
(
'my-video'
)
canvasVideo
.
innerHTML
=
''
canvasVideo
.
innerHTML
=
''
}
}
...
@@ -103,23 +104,23 @@ export default defineComponent({
...
@@ -103,23 +104,23 @@ export default defineComponent({
this
.
player
.
stop
();
this
.
player
.
stop
();
}
}
if
(
this
.
playerEz
)
{
if
(
this
.
playerEz
)
{
let
canvasVideo
=
document
.
getElementById
(
'my-video'
)
this
.
playerEz
.
stop
().
then
(()
=>
{
canvasVideo
.
innerHTML
=
''
this
.
playerEz
.
play
(
this
.
palyUrl
);
});
}
else
{
// 开始萤石云视频
this
.
playerEz
=
new
EZUIKit
.
EZUIKitPlayer
({
id
:
"my-video"
,
// 视频容器ID
accessToken
:
atoken
,
url
:
this
.
palyUrl
,
template
:
'mobileLive'
,
//simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版mobileLive-手机
autoplay
:
true
,
width
:
window
.
innerWidth
,
height
:
window
.
innerWidth
*
1080
/
1920
,
});
}
}
// 开始萤石云视频
this
.
playerEz
=
new
EZUIKit
.
EZUIKitPlayer
({
id
:
"my-video"
,
// 视频容器ID
accessToken
:
atoken
,
url
:
this
.
palyUrl
,
template
:
'mobileLive'
,
//simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
autoplay
:
true
,
//footer: ['hd', 'fullScreen'],
width
:
window
.
innerWidth
,
height
:
window
.
innerWidth
*
1080
/
1920
,
});
Toast
.
clear
();
Toast
.
clear
();
}
}
},
},
loadTourVideo
()
{
loadTourVideo
()
{
Toast
.
loading
({
Toast
.
loading
({
...
@@ -146,9 +147,13 @@ export default defineComponent({
...
@@ -146,9 +147,13 @@ export default defineComponent({
created
()
{
created
()
{
this
.
loadTourVideo
();
this
.
loadTourVideo
();
},
},
destroyed
(){
destroyed
(){
if
(
this
.
player
)
{
this
.
player
.
stop
();
}
if
(
this
.
playerEz
)
{
this
.
playerEz
.
stop
()
}
},
},
setup
(
props
,
context
)
{
setup
(
props
,
context
)
{
const
params
=
reactive
(
props
.
params
);
const
params
=
reactive
(
props
.
params
);
...
@@ -171,7 +176,7 @@ export default defineComponent({
...
@@ -171,7 +176,7 @@ export default defineComponent({
background
:
#000
;
background
:
#000
;
}
}
}
}
:deep
(
.head-message
),
:deep
(
.live-ptz-title
)
{
:deep
(
.head-message
),
:deep
(
.live-ptz-title
)
,
:deep
(
.mobile-ez-ptz-container
)
{
display
:
none
!important
;
display
:
none
!important
;
}
}
:deep
(
.mobile-ez-ptz-container
)
{
:deep
(
.mobile-ez-ptz-container
)
{
...
...
h5/src/components/shopTour.vue
0 → 100644
View file @
e022956
<
template
>
<div
class=
"tour-btns1"
>
<div
class=
"box"
>
<span
@
click=
"navBack"
>
{{
decodeURIComponent
(
paramObj
.
name
)
}}
<van-icon
class=
"icon"
name=
"play"
/></span>
</div>
<div
class=
"box box1"
>
<span
v-if=
"bookmark"
@
click=
"delCollectGate"
>
<van-icon
class=
"iconMargin"
color=
"#F7B500"
name=
"star"
/>
收藏
</span>
<span
v-else
@
click=
"collectGate"
>
<van-icon
class=
"iconMargin"
name=
"star-o"
/>
收藏
</span>
<span
@
click=
"pictureBtn"
>
<van-icon
class=
"iconMargin"
name=
"photograph"
/>
开始巡检
</span>
</div>
</div>
</
template
>
<
script
setup
>
import
{
reactive
,
ref
,
onMounted
,
getCurrentInstance
}
from
'vue'
;
import
{
Toast
}
from
'vant'
;
import
tourApi
from
'@/api'
;
const
navBack
=
()
=>
{
wx
.
miniProgram
.
redirectTo
({
url
:
`/pages/tour/gate/index?type=
${
paramObj
.
type
}
&atoken=
${
paramObj
.
atoken
}
&userId=
${
paramObj
.
userId
}
&id=
${
paramObj
.
id
}
&channelid=
${
paramObj
.
channelid
}
&platform=
${
paramObj
.
platform
}
&mallId=
${
paramObj
.
mallId
}
&name=
${
paramObj
.
name
}
`
});
};
const
bookmark
=
ref
(
paramObj
.
bookmark
)
const
collectGate
=
()
=>
{
tourApi
.
setBookmark
({
userId
:
paramObj
.
userId
,
patrolGateIds
:[
paramObj
.
id
]
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
bookmark
.
value
=
true
;
return
Toast
.
success
(
'收藏成功'
);
}
})
}
const
delCollectGate
=
()
=>
{
tourApi
.
delBookmark
({
userId
:
paramObj
.
userId
,
patrolGateIds
:[
paramObj
.
id
]
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
){
bookmark
.
value
=
false
;
return
Toast
.
success
(
'取消收藏成功'
);
}
})
}
const
pictureBtn
=
()
=>
{
Toast
.
loading
({
duration
:
0
,
message
:
'视频截图中···'
,
forbidClick
:
true
,
});
// tourApi.getCapture({id:paramObj.channelid}).then(res=>{
// if(res.status!=200){
// return Toast.fail(res.data.msg);
// }
// let picUrl = res.data.data;
// Toast.clear();
// if(paramObj.type!='titem'){
// wx.miniProgram.redirectTo({
// url: `/pages/tour/index/index?action=capture&picUrl=${picUrl}&id=${paramObj.id}&channelid=${paramObj.channelid}&mallId=${paramObj.mallId}&title=${paramObj.name}&atoken=${paramObj.atoken}&userId=${paramObj.userId}`
// });
// }else{
// /***********巡店详情截图****************/
// wx.miniProgram.navigateTo({
// url: `/pages/tour/titemDetail/index?action=capture&picUrl=${picUrl}&id=${paramObj.tid}`
// });
// }
// })
};
</
script
>
<
style
scoped
lang=
"less"
>
.tour-btns1
{
display
:
flex
;
background
:
#E6EDFF
;
height
:
15vw
;
line-height
:
15vw
;
padding
:
0
20px
;
.box{
display
:
inline-block
;
flex
:
1
;
}
.box1
{
text-align
:
right
;
span{
margin-left
:
20px
;
}
}
.icon
{
transform
:
rotate
(
90deg
);
}
}
</
style
>
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment