Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
U
uniapp_vedio
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
android
uniapp_vedio
Commits
e7c064e8
Commit
e7c064e8
authored
Oct 09, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页接口开发
parent
4b0035ca
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
224 additions
and
110 deletions
+224
-110
App.vue
vedio/App.vue
+1
-1
common.js
vedio/mixins/common.js
+2
-2
home.vue
vedio/pages/home.vue
+2
-18
index.vue
vedio/pages/index/index.vue
+211
-40
my.vue
vedio/pages/my/my.vue
+6
-47
banner.scss
vedio/scss/banner.scss
+1
-1
common.scss
vedio/scss/common.scss
+1
-1
ic_index_play.png
vedio/static/index/ic_index_play.png
+0
-0
ic_quit_white.png
vedio/static/index/ic_quit_white.png
+0
-0
No files found.
vedio/App.vue
View file @
e7c064e8
...
...
@@ -161,7 +161,7 @@
auth
:
false
,
// 三要素实名认证
userInfo
:
null
,
cardInfo
:
null
,
pkgName
:
"com.mints.helivideo"
pkgName
:
'com.mints.helivideo'
}
};
</
script
>
...
...
vedio/mixins/common.js
View file @
e7c064e8
...
...
@@ -23,10 +23,10 @@ export default {
},
onLoad
(
options
)
{
this
.
options
=
options
;
this
.
loadData
();
},
onShow
()
{
//
this.loadData();
this
.
loadData
();
// if (app.globalData.token) {
// if (!app.globalData.userInfo) {
...
...
vedio/pages/home.vue
View file @
e7c064e8
...
...
@@ -64,34 +64,18 @@
data
()
{
return
{
isFirstLoad
:
true
,
currentPage
:
0
,
showCoupon
:
false
,
couponResult
:
'600元'
,
fromType
:
'1'
,
// 0 展示商品 1 展示换脸
buyerShowEnable
:
'1'
,
//买家秀开关,1开,其它关
promotionEnable
:
'1'
,
//推广开关,1开,其它关
currentPage
:
0
}
},
onLoad
(
options
)
{
this
.
fromType
=
''
+
uni
.
getStorageSync
(
'fromType'
)
||
1
this
.
buyerShowEnable
=
''
+
uni
.
getStorageSync
(
'buyerShowEnable'
)
||
1
this
.
promotionEnable
=
''
+
uni
.
getStorageSync
(
'promotionEnable'
)
||
1
let
index
=
options
.
index
??
''
if
(
index
!=
''
&&
index
!=
undefined
&&
this
.
buyerShowEnable
==
'1'
)
{
this
.
currentPage
=
index
}
if
(
options
.
coupon
!=
undefined
&&
options
.
coupon
!=
''
)
{
this
.
couponResult
=
options
.
coupon
+
'元'
;
this
.
showCoupon
=
true
;
}
},
onShow
()
{
if
(
app
.
globalData
.
resetLogin
&&
!
this
.
isFirstLoad
)
{
this
.
wxLogin
()
//
this.wxLogin()
}
this
.
isFirstLoad
=
false
...
...
vedio/pages/index/index.vue
View file @
e7c064e8
<
template
>
<view
class=
"body"
>
<!--
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
class=
"content"
>
<swiper
class=
"banner"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner.vedioId)"
>
<swiper
class=
"banner"
style=
"margin-top: 20rpx;"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner.vedioId)"
>
<image
class=
"banner-img"
:src=
"banner.coverImage"
mode=
"aspectFill"
></image>
</swiper-item>
</swiper>
</view>
<!--
</z-paging>
-->
<view
style=
"display: flex;flex-direction: column;background-color:white;border-radius:10rpx;margin-top: 20rpx;"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 18rpx;"
>
排行榜
</view>
<scroll-view
scroll-x=
"true"
style=
"white-space: nowrap; margin-top: 18rpx;"
>
<block
v-for=
"(item, index) in topList"
:key=
"item.vedioId"
>
<view
@
click=
"handleTop(item)"
style=
"display:inline-block;background-color:white;border-radius:10rpx;width: 200rpx;margin: 5rpx 10rpx 15rpx 10rpx;"
>
<view
style=
"position: relative;"
>
<image
style=
"border-radius:10rpx; width: 200rpx;height: 260rpx;"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"position: absolute;bottom: 0;margin-bottom: 15rpx;margin-left: 10rpx;"
>
<view
style=
"display: flex;align-items: center;"
>
<image
style=
"width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/ic_index_play.png"
></image>
<view
style=
"font-size: 20rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
</view>
</view>
<view
style=
"font-size: 18rpx;margin-top: 10rpx;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 16rpx;margin-top: 10rpx;"
v-if=
"item.orderTags!=null&&item.orderTags.length>0"
>
<template
v-for=
"t in item.orderTags"
>
{{
t
+
' '
}}
</
template
>
</view>
</view>
</block>
</scroll-view>
</view>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"
>
推荐
</view>
<view
style=
"column-count: 2;column-gap: 0;margin-top: 20rpx;"
>
<view
class=
"item-wrap"
v-for=
"(item, i) in dataList"
:key=
"i"
v-if=
"i % 2 == 0"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"position: absolute;bottom: 0;width: 94%;margin: 10rpx 10rpx 16rpx 10rpx;"
>
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;"
>
<view
style=
"display: flex;align-items: center;"
>
<image
style=
"width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/ic_index_play.png"
></image>
<view
style=
"font-size: 20rpx;color: white;"
>
{{item.showNum}}
</view>
</view>
<view
style=
"font-size: 20rpx;color: white;"
>
全{{item.vedioTotal}}集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{item.title}}
</view>
<view
style=
"font-size: 18rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{item.vedioDesc}}
</view>
</view>
<view
class=
"item-wrap"
v-for=
"(item, i) in dataList"
:key=
"i"
v-if=
"i % 2 == 1"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"position: absolute;bottom: 0;width: 94%;margin: 10rpx 10rpx 16rpx 10rpx;"
>
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;"
>
<view
style=
"display: flex;align-items: center;"
>
<image
style=
"width: 20rpx;height: 20rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/ic_index_play.png"
></image>
<view
style=
"font-size: 20rpx;color: white;"
>
{{item.showNum}}
</view>
</view>
<view
style=
"font-size: 20rpx;color: white;"
>
全{{item.vedioTotal}}集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{item.title}}
</view>
<view
style=
"font-size: 18rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{item.vedioDesc}}
</view>
</view>
</view>
</view>
</z-paging>
<view
v-if=
"newRecordBean==null"
style=
"width: 97%;height: 150rpx;margin: 10rpx;opacity: 0.8;background-color: black;z-index: 20;position: absolute;bottom: 0;border-radius:10rpx;"
>
<view
style=
"display: flex;margin-left: 10rpx;"
>
<view
style=
"flex-grow: 2;display: flex;align-items: center;"
>
<image
style=
"border-radius:10rpx; width: 100rpx;height: 130rpx;"
src=
"http://sh.mints-id.com/vedioApp/vedio/ZhiZunLongZhu/zzlzshu.jpg"
mode=
"aspectFill"
></image>
<view
style=
"margin: 20rpx;"
>
<view
style=
"font-size: 30rpx; color: white;"
>
标题
</view>
<view
style=
"font-size: 24rpx;margin-top: 6rpx;color: white;"
>
上次观看至第一集
</view>
<view
style=
"font-size: 22rpx;color: gainsboro;"
>
都市
</view>
</view>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: flex-end;"
>
<image
@
click=
"handleBottomClose()"
style=
"width: 30rpx;height: 30rpx;display: flex;align-items: right;margin: 10rpx;"
src=
"../../static/index/ic_quit_white.png"
mode=
"aspectFill"
></image>
<view
@
click=
"handleBottomPlay(newRecordBean.vedioId)"
style=
"width: 160rpx;height: 50rpx;background-color: red;border-radius:30rpx;color: white;font-size: 24rpx;justify-content: center;
align-items: center;display: flex;padding-bottom: 4rpx;margin-right: 20rpx;"
>
继续观看
</view>
</view>
</view>
</view>
</view>
</template>
<
script
>
...
...
@@ -37,56 +148,116 @@
mixins
:
[
common
],
data
()
{
return
{
showlip
:
false
,
dataList
:
[],
bannerList
:
[]
showlip
:
false
,
dataList
:
[],
bannerList
:
[],
newRecordBean
:
null
,
topList
:
[]
};
},
methods
:
{
show
()
{
// if (this.$refs.paging != null) {
// this.$refs.paging.refresh();
// }
console
.
log
(
'showshowshow'
);
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
loadData
()
{
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/topTabs'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
bannerList
=
data
.
list
;
}
});
this
.
post
({
url
:
'/vedio/orders'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
topList
=
data
.
list
;
}
});
// this.post({
// url: '/url/newestRecord',
// showLoading: false,
// success: ({
// data
// }) => {
// if(data.list!=null&&data.list.length>0){
// this.newRecordBean = data.list[0];
// }
// }
// });
// this.post({
// url: '/vedio/listByType',
// data: {
// page,
// typeId:1,
// size
// },
// showLoading: false,
// success: ({
// data
// }) => {
// this.$refs.paging.complete(data);
// }
// });
this
.
post
({
url
:
'/vedio/
topTab
s'
,
url
:
'/vedio/
order
s'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
console
.
log
(
data
);
// console.log("data.data.list="+data.data.list);
this
.
bannerList
=
data
.
list
;
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
handleBanner
(
vedioId
)
{
message
.
notify
(
'vedioId='
+
vedioId
);
},
handleInfo
(
item
)
{
message
.
notify
(
'vedioId='
+
item
.
vedioId
);
// navigateTo(`/pagesA/product/product?data=` + encodeURIComponent(JSON.stringify(item)))
},
// queryList(page, size) {
// // this.post({
// // url: '/nft/list',
// // data: {
// // page,
// // size
// // },
// // showLoading: false,
// // success: ({
// // data
// // }) => {
// // this.$refs.paging.complete(data);
// // }
// // });
// },
handleBanner
(
vedioId
)
{
handleTop
(
item
)
{
message
.
notify
(
'vedioId='
+
item
.
vedioId
);
// navigateTo(`/pagesA/product/product?data=` + encodeURIComponent(JSON.stringify(item)))
},
handleBottomPlay
(
vedioId
)
{
message
.
notify
(
'vedioId='
+
vedioId
);
},
handleBottomClose
()
{
this
.
newRecordBean
=
null
;
message
.
notify
(
'handleBottomClose'
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
.body
{
background-color
:
white
;
background-color
:
whitesmoke
;
position
:
relative
;
}
.item-wrap
{
width
:
96%
;
border-radius
:
10rpx
;
background-color
:
#fff
;
break-inside
:
avoid
;
margin-bottom
:
20rpx
;
height
:
490rpx
;
}
.img
{
position
:
relative
;
border-radius
:
10rpx
;
width
:
100%
;
height
:
390rpx
;
}
</
style
>
\ No newline at end of file
vedio/pages/my/my.vue
View file @
e7c064e8
<
template
>
<view
class=
"body"
>
我的
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
base64Compress
,
imageCompress
,
getToLocal
}
from
"@/utils/utils.js"
...
...
@@ -34,58 +32,19 @@
},
methods
:
{
show
()
{
// if (this.$refs.paging != null) {
// this.$refs.paging.refresh();
// }
},
loadData
()
{
this
.
post
({
url
:
'/app/getVideoConfig'
,
data
:
{
session
:
app
.
globalData
.
token
},
showLoading
:
false
,
success
:
({
data
})
=>
{
// this.$refs.paging.complete(data.color);
// this.videoConfig = data
// this.dataList = data.color
// this.currentIndex = 0
// this.videoUrl = data.topVideo
// this.runingVideo = data.runingVideo
// this.currentImageUrl =
// 'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg_companionx/ic_main_none_icon.png'
// this.jobId = ''
// this.isUpImg = false
// if (this.videoContext == '') {
// this.videoContext = uni.createVideoContext('homeVideo', this)
// }
// this.playVideo()
}
});
},
downloadApp
()
{
if
(
app
.
globalData
.
userInfo
)
{
openUrl
(
app
.
globalData
.
downUrl
);
}
else
{
// navigateTo('user/login', {
// redirect: "index"
// });
}
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
.body
{
background-color
:
white
;
background-color
:
white
smoke
;
}
</
style
>
vedio/scss/banner.scss
View file @
e7c064e8
.banner
{
width
:
100%
;
height
:
28
4rpx
;
height
:
32
4rpx
;
vertical-align
:
bottom
;
&
-img
{
...
...
vedio/scss/common.scss
View file @
e7c064e8
...
...
@@ -39,7 +39,7 @@ body {
}
.content
{
padding
:
32
rpx
;
padding
:
20
rpx
;
box-sizing
:
border-box
;
}
...
...
vedio/static/index/ic_index_play.png
0 → 100644
View file @
e7c064e8
1.66 KB
vedio/static/index/ic_quit_white.png
0 → 100644
View file @
e7c064e8
436 Bytes
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