Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
71f51035
Commit
71f51035
authored
Aug 14, 2024
by
张娇(东信)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
视频播放
parent
e7e35599
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
15 deletions
+84
-15
village.js
src/api/assistingAgriculture/village.js
+8
-0
RuralTravel.vue
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
+76
-15
No files found.
src/api/assistingAgriculture/village.js
View file @
71f51035
...
...
@@ -40,3 +40,11 @@ export function screeningConditions(data) {
data
,
});
}
// 视频
export
function
streamList
(
data
)
{
return
request
({
url
:
`/sgyrdd/znprod/tour/streamList`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/RuralTravel/RuralTravel.vue
View file @
71f51035
...
...
@@ -54,11 +54,22 @@
src=
"/static/assistingAgriculture/rural/dayTOur.png"
style=
"width: 32rpx; height: 32rpx"
/>
<img
class=
"spe-img"
src=
"/static/assistingAgriculture/rural/img5.png"
style=
"width: 306rpx; height: 204rpx"
/>
<video
class=
"spe-img1"
id=
"videoId"
:src=
"videoList[0].videoUrl"
@
error=
"videoErrorCallback"
:danmu-list=
"danmuList"
enable-danmu
danmu-btn
@
play=
"play"
@
fullscreenchange=
"fullscreenchange"
></video>
<!--
<img-->
<!-- class="spe-img"-->
<!-- src="/static/assistingAgriculture/rural/img5.png"-->
<!-- style="width: 306rpx; height: 204rpx"-->
<!-- />-->
</view>
</view>
<view
class=
"hot-way"
>
...
...
@@ -189,14 +200,15 @@ import Sort from '../../../components/assistingAgriculture/index/Sort.vue';
import
DepartureDate
from
'../../../components/assistingAgriculture/index/DepartureDate.vue'
;
import
ScenicSpots
from
'../../../components/assistingAgriculture/index/ScenicSpots.vue'
;
import
Screen
from
'../../../components/assistingAgriculture/index/Screen.vue'
;
import
{
getPopularList
,
getProdList
,
getTour
}
from
'@/api/assistingAgriculture/village'
;
import
{
getPopularList
,
getProdList
,
getTour
,
streamList
,
}
from
'@/api/assistingAgriculture/village'
;
import
{
getPresaleList
}
from
'@/api/assistingAgriculture/building'
;
import
{
onMounted
,
ref
}
from
'vue'
;
import
fab
from
'../../../components/fab/fab.vue'
;
onMounted
(
async
()
=>
{
getProd
();
getPopular
();
});
const
rotate
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
...
...
@@ -217,6 +229,7 @@ const scenicSpotsRef = ref(null);
const
screenRef
=
ref
(
null
);
const
backgroundBox
=
ref
(
''
);
const
border
=
ref
(
''
);
const
videoList
=
ref
([]);
const
locationFiltering
=
(
index
)
=>
{
switch
(
index
)
{
...
...
@@ -254,6 +267,12 @@ const locationFiltering = (index) => {
forPeopleList
.
value
=
[];
}
};
const
videoContext
=
ref
(
null
);
onMounted
(
async
()
=>
{
getProd
();
getPopular
();
getStreamList
();
});
onPullDownRefresh
(()
=>
{
keyword
.
value
=
''
;
getProd
();
...
...
@@ -270,6 +289,34 @@ const getPopular = () => {
popularRouterData
.
value
=
res
.
data
.
records
;
});
};
// 查询视频列表
const
getStreamList
=
()
=>
{
streamList
().
then
((
res
)
=>
{
res
.
data
.
forEach
((
item
)
=>
{
item
.
videoUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
+
'/pig/'
+
item
.
videoUrl
;
});
videoList
.
value
=
res
.
data
;
console
.
log
(
videoList
.
value
,
121
);
});
};
// 播放时进入全屏
function
play
(
index
)
{
const
videoContext
=
uni
.
createVideoContext
(
'videoId'
);
videoContext
.
requestFullScreen
();
}
// 退出全屏时暂停
function
fullscreenchange
(
e
)
{
if
(
!
e
.
detail
.
fullScreen
)
{
uni
.
createVideoContext
(
'videoId'
).
pause
();
}
}
// //退出全屏时停止
// function fullscreenchange (e){
// if(!e.detail.fullScreen){
// videoContext.stop()
// }
// };
// 智能排序
const
sortParams
=
(
sortMode
)
=>
{
sortType
.
value
=
sortMode
;
...
...
@@ -287,11 +334,6 @@ const dataParams = (item, datePart) => {
}
};
// 景点
// const placeParams = (item) => {
// console.log(item, 222);
// attractionIdList.value = item.id;
// getProd();
// };
const
placeParams
=
(
item
)
=>
{
const
ids
=
item
.
map
((
i
)
=>
i
.
id
);
const
arr
=
ids
.
join
(
','
);
...
...
@@ -660,4 +702,23 @@ page {
position
:
absolute
;
margin-top
:
140rpx
;
}
.wrapper
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
height
:
100%
;
}
.block
{
width
:
120px
;
height
:
120px
;
background-color
:
#fff
;
}
uni-video
{
width
:
300rpx
;
height
:
200rpx
;
top
:
10rpx
;
left
:
20rpx
;
border-radius
:
16rpx
;
}
</
style
>
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