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
545cb2d3
Commit
545cb2d3
authored
Nov 18, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
83b5b31c
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
1678 additions
and
851 deletions
+1678
-851
androidPrivacy.json
vedio/androidPrivacy.json
+0
-27
page-route.js
vedio/common/page-route.js
+28
-0
charge.vue
vedio/components/charge/charge.vue
+396
-0
follow.vue
vedio/components/home/follow.vue
+8
-5
index.vue
vedio/components/home/index.vue
+546
-550
recommendVideo.vue
vedio/components/home/recommendVideo.vue
+6
-4
player.vue
vedio/components/player/player.vue
+509
-0
q-button.vue
vedio/components/q-button/q-button.vue
+0
-77
package.json
vedio/package.json
+1
-29
pages.json
vedio/pages.json
+118
-154
search.vue
vedio/pagesA/search/search.vue
+4
-2
index.vue
vedio/pagesC/playlet/index.vue
+58
-0
watchRecord.vue
vedio/pagesD/watchRecord/watchRecord.vue
+4
-3
No files found.
vedio/androidPrivacy.json
deleted
100644 → 0
View file @
83b5b31c
{
"version"
:
"1"
,
"prompt"
:
"template"
,
"title"
:
"服务协议和隐私政策"
,
"message"
:
"请你务必审慎阅读、充分理解“服务协议”和“隐私政策”各条款,包括但不限于:为了更好的向你提供服务,我们需要收集你的设备标识、操作日志等信息用于分析、优化应用性能。<br/> 你可阅读<a href=
\"
https://shimo.im/docs/dPkpKL1EVNIBbXqO
\"
>《用户协议》</a>和<a href=
\"
https://shimo.im/docs/aBAYVY4mNXfgLm3j
\"
>《隐私政策》</a>了解详细信息。如果你同意,请点击下面按钮开始接受我们的服务。"
,
"buttonAccept"
:
"同意并接受"
,
"buttonRefuse"
:
"暂不同意"
,
"second"
:
{
"title"
:
"确认提示"
,
"message"
:
"进入应用前,你需先同意<a href=
\"
https://shimo.im/docs/dPkpKL1EVNIBbXqO
\"
>《用户协议》</a>和<a href=
\"
https://shimo.im/docs/aBAYVY4mNXfgLm3j
\"
>《隐私政策》</a>,否则将退出应用。"
,
"buttonAccept"
:
"同意并继续"
,
"buttonRefuse"
:
"退出应用"
},
"styles"
:
{
"backgroundColor"
:
"#ffffff"
,
"borderRadius"
:
"5px"
,
"title"
:
{
"color"
:
"#008cfb"
},
"buttonAccept"
:
{
"color"
:
"#008cfb"
},
"buttonRefuse"
:
{
"color"
:
"#c0c0c0"
}
}
}
vedio/common/page-route.js
0 → 100644
View file @
545cb2d3
function
gotoVideoPlayerPage
(
detail
,
playNext
=
0
)
{
if
(
tt
.
canIUse
(
'PlayletExtension'
))
{
if
(
detail
.
douyinAlbumIdNext
&&
detail
.
douyinEpisodeIdNext
)
{
//跳转至绑定短剧的页面
uni
.
navigateTo
({
url
:
'/pagesC/playlet/index?data='
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
'&tt_album_id='
+
detail
.
douyinAlbumIdNext
+
'&tt_episode_id='
+
detail
.
douyinEpisodeIdNext
})
return
}
//跳转至绑定短剧的页面
uni
.
navigateTo
({
url
:
'/pagesC/playlet/index?data='
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
'&tt_album_id='
+
detail
.
douyinAlbumId
+
'&tt_episode_id='
+
detail
.
douyinEpisodeId
})
}
else
{
tt
.
navigateTo
({
url
:
'/pagesC/ttvideo/ttVideoDetail?data='
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
'&tt_album_id='
+
detail
.
douyinAlbumId
+
'&tt_episode_id='
+
detail
.
douyinEpisodeId
+
'&playNext='
+
playNext
})
}
}
export
{
gotoVideoPlayerPage
}
\ No newline at end of file
vedio/components/charge/charge.vue
0 → 100644
View file @
545cb2d3
<
template
>
<view
style=
"position: relative;"
>
<view
v-if=
"agreeFlag"
style=
"width: 100%;height: 100%;background-color: black;opacity: 0.8;display: flex;position: absolute;z-index: 100;color: white;flex-direction: column;align-items: center;padding:40rpx 0;"
>
<text
style=
"font-size: 30rpx;"
>
付费须知 \n
1、看点和会员属于虚拟商品,一经购买不可退换 \n
2、未满18岁的未成年人需要在监护人主导、同意下进行相关付费操作;\n
3、充值看点一般5分钟内到账,如未到账请在“我的”页面联系客服;
</text>
<image
@
click=
"agreeFlag=false"
style=
"width: 30rpx;height: 30rpx;margin-top:150rpx;"
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
<view
class=
"body"
style=
"width: 100%;height: 100%;"
>
<scroll-view
scroll-y
>
<view
style=
"display: flex;flex-direction: column;align-items: flex-end;"
>
<view
style=
"display: flex;flex-direction: row;"
>
<view
@
click=
"handleAgree"
style=
"margin-top: 12rpx;margin-right: 10rpx;"
>
付费须知>
</view>
<image
@
click=
"handleClickClose"
style=
"width: 30rpx;height: 30rpx;display: flex;align-items: right;margin-top: 20rpx;margin-right: 20rpx;margin-bottom: 10rpx;"
src=
"@/static/index/ic_quit_white.png"
></image>
</view>
</view>
<view
style=
"display: flex;flex-direction: column;margin-bottom: 20rpx;padding-left: 14rpx;"
>
<view
style=
"font-size: 38rpx;color: black;"
>
{{
titleText
}}
</view>
<view
class=
"flex"
>
<view
v-if=
"point>0"
style=
"display: flex;flex-direction: row;margin-top: 10rpx;"
>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;"
>
解锁本集需:
</view>
<view
style=
"font-size: 42rpx;color: red;font-weight: 777;"
>
{{
point
}}
</view>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;margin-left: 6rpx;"
>
看点,
</view>
</view>
<view
v-if=
"point>0"
style=
"width: 60rpx;"
></view>
<view
style=
"display: flex;flex-direction: row;margin-top: 10rpx;"
>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;"
>
当前账户余额:
</view>
<view
style=
"font-size: 42rpx;color: red;font-weight: 777;"
>
{{
userBean
.
point
}}
</view>
<view
style=
"font-size: 28rpx;color: #644238;margin-top: 12rpx;margin-left: 6rpx;"
>
看点
</view>
</view>
</view>
</view>
<view
class=
"section"
>
<view
class=
"pack-box"
>
<view
class=
"pack-item"
:style=
"item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f5f5f5;'"
:class=
"[
{active: index==selectedIndex}]" v-for='(item, index) in vipList' :key='index'
@click="choosePack(item, index)">
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
v-if=
"os=='android'"
class=
"price row"
>
{{
item
.
firstPayPrice
}}
元
</view>
<view
v-else
style=
"display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src=
"@/static/ic_zuan.png"
>
</image>
+
{{
multiply
(
item
.
firstPayPrice
)
}}
</view>
<view
class=
"name row"
v-if=
"item.title!=null&&item.title!=''"
>
{{
item
.
title
}}
</view>
<view
class=
"origin row"
v-if=
"item.remarks!=null&&item.remarks!=''"
>
{{
item
.
remarks
}}
</view>
</view>
<view
class=
"cut-down"
v-if=
'item.topTitle!=null&&item.topTitle.length>0'
>
{{
item
.
topTitle
}}
</view>
<view
v-if=
"index==selectedIndex"
style=
"position: absolute;bottom: 0;right: 0;"
>
<image
mode=
"scaleToFill"
style=
"width: 100rpx;height: 100rpx;display: flex;align-items: right;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_loading.gif"
>
</image>
</view>
</view>
</view>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
@
click=
"onVip"
style=
"font-size: 34rpx;color: black;margin-top: 16rpx;margin-bottom: 10rpx;"
>
更多充值及说明 >
</view>
</view>
<view
style=
"display: flex;flex-direction: column;align-items: center;"
>
<view
style=
"font-size: 29rpx;color: gray;margin-top: 16rpx;"
>
客服时间工作日 9:00-18:00
</view>
<button
class=
"button2"
open-type=
"im"
data-im-id=
"kaixinhaha7785"
>
在线客服
</button>
</view>
</scroll-view>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
message
}
from
'@/utils/fun'
;
const
{
getPlayletManager
}
=
tt
;
export
default
{
mixins
:
[
common
],
data
()
{
return
{
vipList
:
[],
selectedIndex
:
0
,
agreeFlag
:
false
,
userBean
:
{},
os
:
'android'
,
titleText
:
'解锁剧集'
,
showClone
:
false
};
},
async
beforeCreate
()
{
const
pm
=
await
getPlayletManager
({
is
:
'charge'
// 和插槽同名
});
this
.
pm
=
pm
;
console
.
error
(
pm
,
this
,
"charge_pm_this_beforeCreate"
);
},
created
()
{
console
.
log
(
"chargeCreated"
);
},
beforeMount
()
{
console
.
log
(
"chargeBeforeMount"
);
this
.
loadData
()
},
mounted
()
{
console
.
log
(
"chargeMounted"
);
},
beforeUpdate
()
{
console
.
log
(
"chargeBeforeUpdate"
);
},
updated
()
{
console
.
log
(
"chargeUpdated"
);
},
beforeDestroy
()
{
console
.
log
(
"chargeBeforeDestroy"
);
},
destroyed
()
{
console
.
log
(
"chargeDestroyed"
);
},
methods
:
{
multiply
(
num
)
{
return
parseInt
(
num
*
10
);
},
// 支付完成回调
paySuccess
(
largeType
)
{},
loadData
()
{
let
that
=
this
;
if
(
tt
.
getSystemInfoSync
().
platform
===
'ios'
)
{
this
.
os
=
'ios'
;
}
common
.
data
.
post
({
url
:
'/vip/getVipProducts/point'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
vipList
=
data
.
list
;
if
(
data
.
list
!=
null
)
{
// this.selectedIndex = data.list[0].activityType;
for
(
let
i
=
0
;
i
<
data
.
list
.
length
;
i
++
)
{
if
(
data
.
list
[
i
].
activityType
==
1
)
{
this
.
selectedIndex
=
i
;
break
;
}
}
}
}
});
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
}
});
},
handleAgree
()
{
this
.
agreeFlag
=
true
},
handleClickClose
()
{},
handleClose
()
{},
choosePack
(
item
,
index
)
{
this
.
selectedIndex
=
index
;
this
.
handlePay
();
},
handlePay
()
{
let
that
=
this
;
let
vipBean
=
this
.
vipList
[
this
.
selectedIndex
];
this
.
post
({
url
:
'/vip/getVipPayParams/douyin'
,
data
:
{
vedioId
:
that
.
point
<=
0
?
null
:
that
.
vedioId
,
os
:
that
.
os
,
pid
:
vipBean
.
pid
},
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
ttPrePay
(
data
,
vipBean
.
largeType
);
}
});
},
onVip
()
{
navigateTo
(
`/pagesA/vipPay/vipPay?vedioId=`
+
this
.
vedioId
)
this
.
handleClose
();
},
ttPrePay
(
ttData
,
largeType
)
{
if
(
!
tt
.
canIUse
(
'requestOrder'
))
{
message
.
notify
(
'请升级抖音APP版本'
);
return
}
let
that
=
this
;
tt
.
requestOrder
({
data
:
ttData
.
params
.
data
,
byteAuthorization
:
ttData
.
params
.
byteAuthorization
,
success
(
res
)
{
that
.
ttPay
(
largeType
,
res
.
orderId
,
ttData
);
},
fail
(
res
)
{
// message.notify(res.errMsg);
},
});
},
ttPay
(
largeType
,
oid
,
ttData
)
{
if
(
!
tt
.
canIUse
(
'getOrderPayment'
))
{
message
.
notify
(
'请升级抖音APP版本'
);
return
}
let
that
=
this
;
tt
.
getOrderPayment
({
orderId
:
oid
,
success
(
res
)
{
that
.
queryOrderStatus
(
largeType
,
ttData
.
tidStr
);
},
fail
(
res
)
{
if
(
res
.
errNo
==
'4'
)
{
// 4-支付取消
}
// message.notify(res.errMsg);
},
});
},
queryOrderStatus
(
largeType
,
tid
)
{
let
that
=
this
;
this
.
post
({
data
:
{
tid
:
tid
},
url
:
'/vip/queryVipOrder'
,
showLoading
:
true
,
success
:
({
data
})
=>
{
that
.
paySuccess
(
largeType
);
}
});
},
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
padding
:
10rpx
0
30rpx
0
;
border-radius
:
20rpx
20rpx
0
0
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.section
{
min-height
:
400rpx
;
display
:
flex
;
flex-direction
:
column
;
background
:
white
;
}
.pack-box
{
margin-top
:
25rpx
;
margin-left
:
18rpx
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
flex-wrap
:
wrap
;
.active
{
border
:
6rpx
solid
#fd5350
!
important
;
}
.pack-item
{
margin-bottom
:
25rpx
;
margin-right
:
22rpx
;
width
:
calc
(
45%
);
height
:
190rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
space-around
;
// background: #f5f5f5;
border
:
6rpx
solid
#f5f5f5
;
border-radius
:
10rpx
;
position
:
relative
;
.row
{
margin
:
8rpx
15rpx
;
marign-bottom
:
0
;
}
.row
:last-child
{
margin-bottom
:
8rpx
;
}
.name
{
font-size
:
29rpx
;
color
:
#333
;
}
.price
{
font-size
:
40rpx
;
color
:
#fd5350
;
font-weight
:
700
;
}
.origin
{
color
:
#5A3C0F
;
// background: #5a1505;
background-image
:
linear-gradient
(
90deg
,
#F3DEBE
,
#EAC180
);
font-size
:
22rpx
;
border-radius
:
20rpx
;
height
:
30rpx
;
line-height
:
30rpx
;
padding-top
:
4rpx
;
padding-bottom
:
3rpx
;
padding-left
:
16rpx
;
padding-right
:
16rpx
;
}
.cut-down
{
position
:
absolute
;
top
:
0
;
color
:
#fff
;
background
:
#ff502f
;
font-size
:
22rpx
;
border-radius
:
15rpx
;
height
:
30rpx
;
line-height
:
30rpx
;
padding-top
:
6rpx
;
padding-bottom
:
3rpx
;
padding-left
:
16rpx
;
padding-right
:
16rpx
;
transform
:
translate
(
0
,
-50%
);
}
}
}
.button2
{
width
:
300rpx
;
height
:
50rpx
;
line-height
:
50rpx
;
text-align
:
center
;
margin
:
10rpx
20rpx
;
border-radius
:
10rpx
;
background-color
:
white
;
border
:
1px
orange
solid
;
color
:
orange
;
font-size
:
26rpx
;
box-shadow
:
0
0
2px
0px
rgba
(
255
,
255
,
255
,
0
.1
);
}
</
style
>
\ No newline at end of file
vedio/components/home/follow.vue
View file @
545cb2d3
...
...
@@ -42,10 +42,14 @@
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
common
from
'@/mixins/common'
;
import
{
gotoVideoPlayerPage
}
from
"@/common/page-route.js"
import
{
message
,
message
,
navigateTo
,
}
from
'../../utils/fun.js'
...
...
@@ -109,8 +113,7 @@
this
.
$emit
(
"goRecommend"
)
},
click
(
detail
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
'&tt_album_id='
+
detail
.
douyinAlbumId
+
'&tt_episode_id='
+
detail
.
douyinEpisodeId
);
gotoVideoPlayerPage
(
detail
)
},
longClick
(
key
)
{
this
.
isEditStyle
=
true
...
...
@@ -154,7 +157,7 @@
success
:
({
data
})
=>
{
this
.
isEditStyle
=
false
this
.
isEditStyle
=
false
message
.
notify
(
"删除成功"
)
this
.
loadData
()
}
...
...
vedio/components/home/index.vue
View file @
545cb2d3
<
template
>
<view
class=
"body"
>
<view
v-if=
"showMask"
class=
"show-mask flex-v"
@
click=
"showMask=false"
>
<view
class=
"mt-30"
style=
"width: 90%;text-align: right;"
>
<image
style=
"width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;"
src=
"@/static/index/ic_quit_white.png"
/>
</view>
<text
class=
"mt-10"
style=
"font-size: 46rpx;"
>
如何继续看剧?
</text>
<text
class=
"m-10"
>
找到“山梨剧场” 小程序
</text>
<image
class=
"mt-30"
mode=
"widthFix"
:src=
"maskImage1"
></image>
<image
:src=
"maskImage2"
mode=
"widthFix"
></image>
</view>
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
class=
"search-wrap"
>
<!--
<image
style=
"width: 80rpx; height: 80rpx"
src=
"@/static/index/ic_quit_white.png"
></image>
-->
<view
class=
"search-bar"
@
click=
"handleSearchPage"
>
<image
style=
"width: 40rpx; height: 40rpx"
src=
"@/static/search.png"
></image>
<text
style=
"margin-left: 30rpx;color: darkgray;"
>
{{
bannerList
.
length
>
0
?
bannerList
[
0
].
title
:
''
}}
</text>
</view>
</view>
<view
class=
"content"
>
<swiper
class=
"banner"
:style=
"'margin-top:'+statusBarHeight+'px;'"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner)"
>
<image
class=
"banner-img"
:src=
"banner.tabImage"
mode=
"aspectFill"
></image>
</swiper-item>
</swiper>
<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;"
>
<view
style=
"position: relative;"
>
<view
style=
"position: absolute;z-index: 10;margin-left: 20rpx;"
>
<view
style=
"position: relative;"
>
<view
style=
"
position: absolute;
z-index: 10;
width: 50rpx;
text-align: center;
margin-top: 8rpx;
font-size: 24rpx;
color: white;"
>
{{
index
+
1
}}
</view>
<image
v-if=
"index==0"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y43.png"
></image>
<image
v-else-if=
"index==1"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y42.png"
></image>
<image
v-else-if=
"index==2"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y41.png"
></image>
<image
v-else
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y4.png"
></image>
</view>
</view>
<image
style=
"border-radius:10rpx; width: 200rpx;height: 260rpx;"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
</view>
<view
style=
"
position: absolute;
bottom: 10rpx;
background-color: black;
width: 100%;
opacity: 0.5;
"
>
<view
style=
"display: flex;align-items: center;margin-left: 10rpx;"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
</view>
</view>
<view
style=
"font-size: 26rpx;margin-top: 10rpx;height: 62rpx;"
>
{{
item
.
title
}}
</view>
<view
class=
"ellipsis"
style=
"font-size: 22rpx;margin-top: 10rpx;"
v-if=
"item.orderTags!=null&&item.orderTags.length>0"
>
<scroll-view
scroll-x=
"true"
>
<block
v-for=
"t in item.orderTags"
:key=
"item.orderTags"
>
<view
style=
"display:inline-block;margin-right: 4rpx;"
>
{{
t
}}
</view>
</block>
</scroll-view>
</view>
</view>
</block>
</scroll-view>
</view>
<!--
<view
style=
"font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"
>
推荐
</view>
-->
<u-sticky></u-sticky>
<view
style=
"width: 100%;"
>
<!--
<u-sticky
bgColor=
"#fff"
>
-->
<u-tabs
:current=
"typeIndex"
:list=
"typesList"
@
change=
"popHandleChange"
lineWidth=
"30"
keyName=
'type'
lineColor=
"#0faeff"
:activeStyle=
"
{
color: '#0faeff',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#808080',
transform: 'scale(1)'
}">
</u-tabs>
<!--
</u-sticky>
-->
</view>
<view
style=
"column-count: 2;column-gap: 20rpx;margin-top: 20rpx;"
>
<view
class=
"item-wrap"
v-for=
"(item, index) in dataList"
:key=
"index"
v-if=
"index % 2 == 0"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"
position: absolute;
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
opacity: 0.5;
"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
<view
style=
"font-size: 22rpx;color: white;font-weight: 777;"
>
全
{{
item
.
vedioTotal
}}
集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
title
}}
</view>
<!--
<view
style=
"font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
vedioDesc
}}
</view>
-->
</view>
<view
class=
"item-wrap"
v-for=
"(item, index2) in dataList"
:key=
"index2"
v-if=
"index2 % 2 == 1"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"
position: absolute;
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
opacity: 0.5;
"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
<view
style=
"font-size: 22rpx;color: white;font-weight: 777;"
>
全
{{
item
.
vedioTotal
}}
集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
title
}}
</view>
<!--
<view
style=
"font-size: 22rpx;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;margin-top: 10rpx;"
:src=
"newRecordBean.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"margin: 20rpx;"
>
<view
style=
"font-size: 30rpx; color: white;"
>
{{
newRecordBean
.
title
}}
</view>
<view
style=
"font-size: 24rpx;margin-top: 6rpx;color: white;"
>
上次观看至第
{{
newRecordBean
.
seeIndex
}}
集
</view>
<view
style=
"font-size: 22rpx;"
v-if=
"newRecordBean.orderTags!=null&&newRecordBean.orderTags.length>0"
>
<scroll-view
scroll-x=
"true"
>
<block
v-for=
"t in newRecordBean.orderTags"
:key=
"newRecordBean.orderTags"
>
<view
style=
"display:inline-block;margin-right: 4rpx;"
>
{{
t
}}
</view>
</block>
</scroll-view>
</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)"
style=
"
width: 160rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-color: red;
border-radius:30rpx;
color: white;
font-size: 24rpx;
margin-right: 20rpx;"
>
继续观看
</view>
</view>
</view>
</view>
<view
class=
"box-wrap"
>
<image
class=
"img1"
@
click=
"handleTaskPage"
:src=
"boxImgUrl"
></image>
</view>
<!--
<uni-popup
type=
"center"
ref=
"select"
>
<view>
<view
style=
"font-size: 30rpx;font-weight: 777;color: white;"
>
刚刚看的
</view>
<view
style=
"text-align: center;"
>
<view>
<video
:id=
"recommendBean.vedioId"
:loop=
"true"
:enable-progress-gesture=
"false"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
style=
"width:100%; height:100%;background: #f56c6c;"
:src=
"recommendBean.vedioUrl"
:poster=
"recommendBean.coverImage"
play-btn-position=
"center"
object-fit=
"contain"
/>
</view>
<view>
123
</view>
<view
@
click=
"handleVipPay"
style=
"width: 350rpx;height: 80rpx;background-color: #f2575b;border-radius:20rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;"
>
立即试看
</view>
</view>
</view>
</uni-popup>
-->
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'../../utils/fun.js'
import
{
openUrl
}
from
'../../utils/app+.js'
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
index
:
0
,
index2
:
0
,
dataList
:
[],
bannerList
:
[],
typesList
:
[],
topList
:
[],
typeIndex
:
0
,
typeId
:
-
1
,
newRecordBean
:
null
,
showMask
:
false
,
firstEnter
:
false
,
maskImage1
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png'
,
maskImage2
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png'
,
boxImgUrl
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png'
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
};
},
methods
:
{
loadData
(){
},
showMaskFuc
()
{
let
showFollowMask
=
uni
.
getStorageSync
(
'show-follow-mask'
)
||
''
;
if
(
showFollowMask
==
'1'
)
{
this
.
showMask
=
true
uni
.
setStorage
({
key
:
'show-follow-mask'
,
data
:
'2'
});
}
},
show
()
{
// 显示引导图
this
.
showMaskFuc
()
// 匹配视频
this
.
showFirstDialog
();
// 轮播图
this
.
post
({
url
:
'/vedio/topTabs'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
bannerList
=
data
.
list
;
}
});
// 排行榜
this
.
post
({
url
:
'/vedio/orders'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
topList
=
data
.
list
;
}
});
// 最近观看剧
this
.
post
({
url
:
'/vedio/newest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedio
!=
null
)
{
this
.
newRecordBean
=
data
.
vedio
;
}
}
});
// 分类列表
this
.
post
({
url
:
'/vedio/types'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
list
)
{
this
.
typeId
=
data
.
list
[
0
].
typeId
this
.
typesList
=
data
.
list
if
(
!
this
.
firstEnter
){
this
.
firstEnter
=
true
setTimeout
(()
=>
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
reload
();
}
},
500
);
}
}
}
});
},
hide
()
{
},
queryList
(
page
,
size
)
{
let
that
=
this
// 推荐列表
this
.
post
({
url
:
'/vedio/listByType'
,
data
:
{
page
,
size
,
typeId
:
that
.
typeId
},
showLoading
:
false
,
success
:
({
data
})
=>
{
// this.$refs.paging.complete(data.list);
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
popHandleChange
(
e
)
{
this
.
typeId
=
e
.
typeId
if
(
this
.
$refs
.
paging
!=
null
)
{
// this.$refs.paging.reload();
this
.
$refs
.
paging
.
refresh
();
}
},
handleBanner
(
item
)
{
// navigateTo(`/pagesC/ttvideo/ttVideoDetail?data=` + encodeURIComponent(JSON.stringify(item)) +
// '&tt_album_id=' + item.douyinAlbumId + '&tt_episode_id=' + item.douyinEpisodeId);
},
handleInfo
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
},
handleTop
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
},
handleBottomPlay
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
},
handleBottomClose
()
{
this
.
newRecordBean
=
null
;
this
.
post
({
url
:
'/vedio/colseNewest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{}
});
},
handleSearchPage
()
{
navigateTo
(
`/pagesA/search/search`
)
},
handleTaskPage
()
{
navigateTo
(
`/pagesA/task/task`
)
},
showFirstDialog
()
{
let
that
=
this
;
let
loadEpisode_id
=
uni
.
getStorageSync
(
'tt_episode_id'
)
||
''
;
let
loadAlbum_id
=
uni
.
getStorageSync
(
'tt_album_id'
)
||
''
;
setTimeout
(()
=>
{
that
.
post
({
url
:
'/vedio/firstVedio/douyin'
,
data
:
{
episode_id
:
loadEpisode_id
,
album_id
:
loadAlbum_id
},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedioMsg
!=
null
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
data
.
vedioMsg
))
+
'&tt_album_id='
+
data
.
vedioMsg
.
douyinAlbumId
+
'&tt_episode_id='
+
data
.
vedioMsg
.
douyinEpisodeId
);
// 重置短视频挂载id
uni
.
setStorage
({
key
:
'tt_album_id'
,
data
:
''
});
uni
.
setStorage
({
key
:
'tt_episode_id'
,
data
:
''
});
}
}
});
},
800
);
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
// background-color: whitesmoke;
position
:
relative
;
}
.search-wrap
{
height
:
80rpx
;
margin
:
10rpx
0
;
display
:
flex
;
flex-direction
:
row
;
}
.search-bar
{
width
:
100%
;
margin-left
:
20rpx
;
margin-right
:
20rpx
;
border-radius
:
10rpx
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
20rpx
;
}
.show-mask
{
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
position
:
absolute
;
z-index
:
999
;
color
:
white
;
align-items
:
center
;
image
{
width
:
90%
;
}
}
.item-wrap
{
width
:
100%
;
border-radius
:
10rpx
;
background-color
:
#fff
;
break-inside
:
avoid
;
margin-bottom
:
20rpx
;
height
:
500rpx
;
}
.img
{
position
:
relative
;
border-radius
:
10rpx
;
width
:
100%
;
height
:
390rpx
;
}
.box-wrap
{
height
:
100rpx
;
width
:
120rpx
;
right
:
10rpx
;
bottom
:
240rpx
;
position
:
absolute
;
z-index
:
999
;
.img1
{
width
:
100rpx
;
height
:
100rpx
;
}
}
<
template
>
<view
class=
"body"
>
<view
v-if=
"showMask"
class=
"show-mask flex-v"
@
click=
"showMask=false"
>
<view
class=
"mt-30"
style=
"width: 90%;text-align: right;"
>
<image
style=
"width: 30rpx;height: 30rpx;padding:6rpx;
border-radius: 40rpx;border: 2px solid darkgray;"
src=
"@/static/index/ic_quit_white.png"
/>
</view>
<text
class=
"mt-10"
style=
"font-size: 46rpx;"
>
如何继续看剧?
</text>
<text
class=
"m-10"
>
找到“山梨剧场” 小程序
</text>
<image
class=
"mt-30"
mode=
"widthFix"
:src=
"maskImage1"
></image>
<image
:src=
"maskImage2"
mode=
"widthFix"
></image>
</view>
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
class=
"search-wrap"
>
<!--
<image
style=
"width: 80rpx; height: 80rpx"
src=
"@/static/index/ic_quit_white.png"
></image>
-->
<view
class=
"search-bar"
@
click=
"handleSearchPage"
>
<image
style=
"width: 40rpx; height: 40rpx"
src=
"@/static/search.png"
></image>
<text
style=
"margin-left: 30rpx;color: darkgray;"
>
{{
bannerList
.
length
>
0
?
bannerList
[
0
].
title
:
''
}}
</text>
</view>
</view>
<view
class=
"content"
>
<swiper
class=
"banner"
:style=
"'margin-top:'+statusBarHeight+'px;'"
:indicator-dots=
"true"
:autoplay=
"true"
:interval=
"2000"
:duration=
"500"
>
<swiper-item
v-for=
"banner in bannerList"
:key=
"banner.vedioId"
@
click=
"handleBanner(banner)"
>
<image
class=
"banner-img"
:src=
"banner.tabImage"
mode=
"aspectFill"
></image>
</swiper-item>
</swiper>
<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;"
>
<view
style=
"position: relative;"
>
<view
style=
"position: absolute;z-index: 10;margin-left: 20rpx;"
>
<view
style=
"position: relative;"
>
<view
style=
"
position: absolute;
z-index: 10;
width: 50rpx;
text-align: center;
margin-top: 8rpx;
font-size: 24rpx;
color: white;"
>
{{
index
+
1
}}
</view>
<image
v-if=
"index==0"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y43.png"
></image>
<image
v-else-if=
"index==1"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y42.png"
></image>
<image
v-else-if=
"index==2"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y41.png"
></image>
<image
v-else
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"../../static/index/y4.png"
></image>
</view>
</view>
<image
style=
"border-radius:10rpx; width: 200rpx;height: 260rpx;"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
</view>
<view
style=
"
position: absolute;
bottom: 10rpx;
background-color: black;
width: 100%;
opacity: 0.5;
"
>
<view
style=
"display: flex;align-items: center;margin-left: 10rpx;"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
</view>
</view>
<view
style=
"font-size: 26rpx;margin-top: 10rpx;height: 62rpx;"
>
{{
item
.
title
}}
</view>
<view
class=
"ellipsis"
style=
"font-size: 22rpx;margin-top: 10rpx;"
v-if=
"item.orderTags!=null&&item.orderTags.length>0"
>
<scroll-view
scroll-x=
"true"
>
<block
v-for=
"t in item.orderTags"
:key=
"item.orderTags"
>
<view
style=
"display:inline-block;margin-right: 4rpx;"
>
{{
t
}}
</view>
</block>
</scroll-view>
</view>
</view>
</block>
</scroll-view>
</view>
<!--
<view
style=
"font-size: 30rpx;font-weight: 777;margin-top: 20rpx;margin-bottom: 10rpx;margin-left: 4rpx;"
>
推荐
</view>
-->
<u-sticky></u-sticky>
<view
style=
"width: 100%;"
>
<!--
<u-sticky
bgColor=
"#fff"
>
-->
<u-tabs
:current=
"typeIndex"
:list=
"typesList"
@
change=
"popHandleChange"
lineWidth=
"30"
keyName=
'type'
lineColor=
"#0faeff"
:activeStyle=
"
{
color: '#0faeff',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#808080',
transform: 'scale(1)'
}">
</u-tabs>
<!--
</u-sticky>
-->
</view>
<view
style=
"column-count: 2;column-gap: 20rpx;margin-top: 20rpx;"
>
<view
class=
"item-wrap"
v-for=
"(item, index) in dataList"
:key=
"index"
v-if=
"index % 2 == 0"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"
position: absolute;
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
opacity: 0.5;
"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
<view
style=
"font-size: 22rpx;color: white;font-weight: 777;"
>
全
{{
item
.
vedioTotal
}}
集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
title
}}
</view>
<!--
<view
style=
"font-size: 22rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
vedioDesc
}}
</view>
-->
</view>
<view
class=
"item-wrap"
v-for=
"(item, index2) in dataList"
:key=
"index2"
v-if=
"index2 % 2 == 1"
@
click=
"handleInfo(item)"
>
<view
style=
"position: relative;"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"
position: absolute;
bottom: 10rpx;
width: 95%;
padding: 10rpx;
background-color: black;
opacity: 0.5;
"
>
<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: 22rpx;color: white;"
>
{{
item
.
showNum
}}
</view>
</view>
<view
style=
"font-size: 22rpx;color: white;font-weight: 777;"
>
全
{{
item
.
vedioTotal
}}
集
</view>
</view>
</view>
</view>
<view
style=
"font-size: 30rpx;margin-top: 10rpx;margin-left: 12rpx;"
>
{{
item
.
title
}}
</view>
<!--
<view
style=
"font-size: 22rpx;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;margin-top: 10rpx;"
:src=
"newRecordBean.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"margin: 20rpx;"
>
<view
style=
"font-size: 30rpx; color: white;"
>
{{
newRecordBean
.
title
}}
</view>
<view
style=
"font-size: 24rpx;margin-top: 6rpx;color: white;"
>
上次观看至第
{{
newRecordBean
.
seeIndex
}}
集
</view>
<view
style=
"font-size: 22rpx;"
v-if=
"newRecordBean.orderTags!=null&&newRecordBean.orderTags.length>0"
>
<scroll-view
scroll-x=
"true"
>
<block
v-for=
"t in newRecordBean.orderTags"
:key=
"newRecordBean.orderTags"
>
<view
style=
"display:inline-block;margin-right: 4rpx;"
>
{{
t
}}
</view>
</block>
</scroll-view>
</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)"
style=
"
width: 160rpx;
height: 50rpx;
line-height: 50rpx;
text-align: center;
background-color: red;
border-radius:30rpx;
color: white;
font-size: 24rpx;
margin-right: 20rpx;"
>
继续观看
</view>
</view>
</view>
</view>
<view
class=
"box-wrap"
>
<image
class=
"img1"
@
click=
"handleTaskPage"
:src=
"boxImgUrl"
></image>
</view>
<!--
<uni-popup
type=
"center"
ref=
"select"
>
<view>
<view
style=
"font-size: 30rpx;font-weight: 777;color: white;"
>
刚刚看的
</view>
<view
style=
"text-align: center;"
>
<view>
<video
:id=
"recommendBean.vedioId"
:loop=
"true"
:enable-progress-gesture=
"false"
:show-loading=
"true"
:show-fullscreen-btn=
"false"
style=
"width:100%; height:100%;background: #f56c6c;"
:src=
"recommendBean.vedioUrl"
:poster=
"recommendBean.coverImage"
play-btn-position=
"center"
object-fit=
"contain"
/>
</view>
<view>
123
</view>
<view
@
click=
"handleVipPay"
style=
"width: 350rpx;height: 80rpx;background-color: #f2575b;border-radius:20rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;"
>
立即试看
</view>
</view>
</view>
</uni-popup>
-->
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
gotoVideoPlayerPage
}
from
"@/common/page-route.js"
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'../../utils/fun.js'
import
{
openUrl
}
from
'../../utils/app+.js'
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
index
:
0
,
index2
:
0
,
dataList
:
[],
bannerList
:
[],
typesList
:
[],
topList
:
[],
typeIndex
:
0
,
typeId
:
-
1
,
newRecordBean
:
null
,
showMask
:
false
,
firstEnter
:
false
,
maskImage1
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find1.png'
,
maskImage2
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_find2.png'
,
boxImgUrl
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_bag.png'
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
};
},
methods
:
{
loadData
()
{
},
showMaskFuc
()
{
let
showFollowMask
=
uni
.
getStorageSync
(
'show-follow-mask'
)
||
''
;
if
(
showFollowMask
==
'1'
)
{
this
.
showMask
=
true
uni
.
setStorage
({
key
:
'show-follow-mask'
,
data
:
'2'
});
}
},
show
()
{
// 显示引导图
this
.
showMaskFuc
()
// 匹配视频
this
.
showFirstDialog
();
// 轮播图
this
.
post
({
url
:
'/vedio/topTabs'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
bannerList
=
data
.
list
;
}
});
// 排行榜
this
.
post
({
url
:
'/vedio/orders'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
topList
=
data
.
list
;
}
});
// 最近观看剧
this
.
post
({
url
:
'/vedio/newest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedio
!=
null
)
{
this
.
newRecordBean
=
data
.
vedio
;
}
}
});
// 分类列表
this
.
post
({
url
:
'/vedio/types'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
list
)
{
this
.
typeId
=
data
.
list
[
0
].
typeId
this
.
typesList
=
data
.
list
if
(
!
this
.
firstEnter
)
{
this
.
firstEnter
=
true
setTimeout
(()
=>
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
reload
();
}
},
500
);
}
}
}
});
},
hide
()
{
},
queryList
(
page
,
size
)
{
let
that
=
this
// 推荐列表
this
.
post
({
url
:
'/vedio/listByType'
,
data
:
{
page
,
size
,
typeId
:
that
.
typeId
},
showLoading
:
false
,
success
:
({
data
})
=>
{
// this.$refs.paging.complete(data.list);
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
popHandleChange
(
e
)
{
this
.
typeId
=
e
.
typeId
if
(
this
.
$refs
.
paging
!=
null
)
{
// this.$refs.paging.reload();
this
.
$refs
.
paging
.
refresh
();
}
},
handleBanner
(
item
)
{
gotoVideoPlayerPage
(
item
)
},
handleInfo
(
item
)
{
gotoVideoPlayerPage
(
item
)
},
handleTop
(
item
)
{
gotoVideoPlayerPage
(
item
)
},
handleBottomPlay
(
item
)
{
gotoVideoPlayerPage
(
item
)
},
handleBottomClose
()
{
this
.
newRecordBean
=
null
;
this
.
post
({
url
:
'/vedio/colseNewest'
,
data
:
{},
showLoading
:
false
,
success
:
({
data
})
=>
{}
});
},
handleSearchPage
()
{
navigateTo
(
`/pagesA/search/search`
)
},
handleTaskPage
()
{
navigateTo
(
`/pagesA/task/task`
)
},
showFirstDialog
()
{
let
that
=
this
;
let
loadEpisode_id
=
uni
.
getStorageSync
(
'tt_episode_id'
)
||
''
;
let
loadAlbum_id
=
uni
.
getStorageSync
(
'tt_album_id'
)
||
''
;
setTimeout
(()
=>
{
that
.
post
({
url
:
'/vedio/firstVedio/douyin'
,
data
:
{
episode_id
:
loadEpisode_id
,
album_id
:
loadAlbum_id
},
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
vedioMsg
!=
null
)
{
gotoVideoPlayerPage
(
data
.
vedioMsg
)
// 重置短视频挂载id
uni
.
setStorage
({
key
:
'tt_album_id'
,
data
:
''
});
uni
.
setStorage
({
key
:
'tt_episode_id'
,
data
:
''
});
}
}
});
},
800
);
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
// background-color: whitesmoke;
position
:
relative
;
}
.search-wrap
{
height
:
80rpx
;
margin
:
10rpx
0
;
display
:
flex
;
flex-direction
:
row
;
}
.search-bar
{
width
:
100%
;
margin-left
:
20rpx
;
margin-right
:
20rpx
;
border-radius
:
10rpx
;
background-color
:
white
;
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
padding
:
0
20rpx
;
}
.show-mask
{
width
:
100%
;
height
:
100%
;
background
:
rgba
(
0
,
0
,
0
,
0
.6
);
position
:
absolute
;
z-index
:
999
;
color
:
white
;
align-items
:
center
;
image
{
width
:
90%
;
}
}
.item-wrap
{
width
:
100%
;
border-radius
:
10rpx
;
background-color
:
#fff
;
break-inside
:
avoid
;
margin-bottom
:
20rpx
;
height
:
500rpx
;
}
.img
{
position
:
relative
;
border-radius
:
10rpx
;
width
:
100%
;
height
:
390rpx
;
}
.box-wrap
{
height
:
100rpx
;
width
:
120rpx
;
right
:
10rpx
;
bottom
:
240rpx
;
position
:
absolute
;
z-index
:
999
;
.img1
{
width
:
100rpx
;
height
:
100rpx
;
}
}
</
style
>
\ No newline at end of file
vedio/components/home/recommendVideo.vue
View file @
545cb2d3
...
...
@@ -11,7 +11,8 @@
@
ended=
"ended"
>
</tt-video-player>
</view>
<view
v-if=
"!isqp"
class=
"userInfo flex"
>
<!--
<view
v-if=
"!isqp"
class=
"userInfo flex"
>
-->
<view
v-if=
"false"
class=
"userInfo flex"
>
<!-- 点赞 -->
<view
class=
"flex"
style=
"opacity: 0.9; margin-top: 10rpx;"
>
<image
@
click
.
stop=
"collect(list.vedioId,index)"
v-if=
"list.collect==0"
...
...
@@ -50,6 +51,9 @@
</
template
>
<
script
>
import
{
gotoVideoPlayerPage
}
from
'../../common/page-route.js'
import
common
from
'../../mixins/common.js'
import
{
...
...
@@ -238,9 +242,7 @@
this
.
isqp
=
e
.
detail
.
show
},
detail
(
detail
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
'&tt_album_id='
+
detail
.
douyinAlbumId
+
'&tt_episode_id='
+
detail
.
douyinEpisodeId
+
`&playNext=1`
);
gotoVideoPlayerPage
(
detail
)
},
collect
(
vedioId
,
index
)
{
this
.
originList
[
index
].
collect
=
1
...
...
vedio/components/player/player.vue
0 → 100644
View file @
545cb2d3
<
template
>
<view>
<view
class=
"container"
v-show=
"showRewardAdPop"
>
<image
@
click=
"closeAdPop"
style=
"width: 50rpx; height: 50rpx;margin-left:auto;margin-right: 30rpx;
margin-bottom: 30rpx;"
src=
"https://mints-web.oss-cn-beijing.aliyuncs.com/images/ic_close_white.png"
></image>
<view
class=
"content"
>
<text
class=
"title"
>
恭喜你,获得免费看剧名额
</text>
<text
class=
"button"
@
click=
"showRewardAd"
>
看广告免费解锁1集
</text>
<text
class=
"downtext"
>
{{
countDown
}}
s后自动进入广告,观看完成解锁第
{{
seq
+
1
}}
集剧情
</text>
</view>
</view>
<view
class=
"shortcut"
v-show=
"showShortcutPop"
>
<image
style=
"width:70rpx;height:70rpx;margin-left:10rpx;"
src=
"../../static/logo-about.png"
>
</image>
<view
class=
"flex1"
style=
"margin-left:20rpx;"
>
<view
style=
"font-size: 26rpx;font-weight: 700;"
>
添加至桌面
</view>
<view
style=
"font-size: 22rpx;"
>
下次看剧更方便
</view>
</view>
<button
@
click=
"addShortcut"
open-type=
"addShortcut"
bindaddshortcut=
"eventHandler"
style=
"font-size:26rpx;background-color:crimson;border-radius:5rpx;color:white;
height:55rpx;line-height:53rpx;margin-left:30rpx;font-weight:700;"
>
立即添加
</button>
<image
@
click=
"closeShortcutPop"
style=
"width:30rpx;height:30rpx;"
src=
"../../static/video/close.png"
>
</image>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
message
}
from
'../../utils/fun'
;
import
{
REWARD_ID
}
from
'../../utils/adConstant.js'
;
const
{
getPlayletManager
}
=
tt
;
export
default
{
props
:
[
"titles"
],
data
()
{
return
{
pm
:
null
,
count
:
0
,
albumId
:
""
,
seq
:
0
,
episodeId
:
""
,
countDown
:
3
,
showRewardAdPop
:
false
,
showAdForServer
:
false
,
showShortcutPop
:
false
,
canShowShortcut
:
false
,
};
},
async
beforeCreate
()
{
const
pm
=
await
getPlayletManager
({
is
:
"playler"
,
// 和插槽同名
});
pm
.
getPlayletInfo
().
then
(
res
=>
{
this
.
albumId
=
res
.
albumId
this
.
seq
=
res
.
seq
this
.
episodeId
=
res
.
episodeId
});
this
.
pm
=
pm
;
console
.
log
(
pm
,
this
,
"player_pm_this_beforeCreate"
);
pm
.
onPlay
((
e
)
=>
{
// 保存观看记录
console
.
error
(
"触发开始播放onPlay回调:"
,
e
);
});
pm
.
onPause
((
e
)
=>
{
console
.
log
(
"触发暂停播放onPause回调:"
,
e
);
});
pm
.
onEnded
(
async
(
e
)
=>
{
console
.
log
(
"触发播放到末尾onEnded回调"
,
e
);
});
pm
.
onError
((
e
)
=>
{
console
.
error
(
"报错了 报错了"
,
e
);
});
// 播放进度变化时
pm
.
onTimeUpdate
((
e
)
=>
{
// 播放进度变化时触发,返回当前播放时间点及视频总时长,单位:秒(s)。event.detail = { currentTime, duration }。
console
.
log
(
"触发播放进度变化onTimeUpdate回调:"
,
e
);
// 播放到第10秒且今天没有弹出 ,弹出加入桌面
if
((
e
.
currentTime
>
10
)
&&
this
.
canShowShortcut
)
{
this
.
showShortcutPop
=
true
this
.
canShowShortcut
=
false
this
.
setShowShortcut
()
}
});
pm
.
onWaiting
((
e
)
=>
{
console
.
log
(
"触发视频出现缓冲onWaiting回调:"
,
e
);
});
pm
.
onPlayBackRateChange
((
e
)
=>
{
console
.
log
(
"触发视频倍速改变onPlayBackRateChange回调:"
,
e
);
});
pm
.
onLoadedMetaData
((
e
)
=>
{
console
.
log
(
"触发视频元数据加载完成onLoadedMetaData回调:"
,
e
);
});
pm
.
onSeekComplete
((
e
)
=>
{
console
.
log
(
"触发seek完成onSeekComplete回调:"
,
e
);
});
pm
.
onMuteChange
((
e
)
=>
{
console
.
log
(
"触发静音状态改变onMuteChange回调:"
,
e
);
});
pm
.
onControlTap
((
e
)
=>
{
switch
(
e
.
controlType
)
{
case
"subscribe"
:
this
.
collect
()
break
case
"unsubscribe"
:
this
.
cancelCollect
()
break
}
console
.
log
(
"触发点击控件onControlTap回调:"
,
e
);
});
pm
.
onOpenCatalog
((
e
)
=>
{
console
.
log
(
"触发点击选集onOpenCatalog回调:"
,
e
);
});
// 推荐位使用简单示例
pm
.
onChangeEpisode
((
e
)
=>
{
console
.
log
(
"触发选集切换onChangeEpisode回调:"
,
e
);
this
.
albumId
=
e
.
albumId
this
.
seq
=
e
.
seq
this
.
episodeId
=
e
.
episodeId
if
(
e
.
status
==
'lock'
)
{
this
.
unlock
()
}
else
{
this
.
commitVideo
()
}
});
pm
.
onClickUnlock
((
e
)
=>
{
console
.
log
(
"player解锁"
,
e
);
if
(
this
.
showAdForServer
)
{
this
.
showRewardAdPop
=
true
this
.
startCountdown
()
}
else
{
this
.
pm
.
toggleCustomDialog
()
}
});
pm
.
onTapCustomIcon
((
e
)
=>
{
console
.
log
(
"触发点击自定义组件onTapCustomIcon回调:"
,
e
);
});
pm
.
onTapShare
((
e
)
=>
{
console
.
log
(
"onTapShare"
,
e
);
return
{
// 分享数据
title
:
`第
${
e
.
seq
}
集`
,
desc
:
`这是默认的转发文案,用户可以直接发送,也可以在发布器内修改,分享的episodeId是
${
e
.
episodeId
}
`
,
path
:
`pagesC/playlet/index?tt_album_id=
${
e
.
albumId
}
&tt_episode_id=
${
e
.
episodeId
}
`
,
// ?后面的参数会在转发页面打开时传入onLoad方法
imageUrl
:
""
,
// 支持本地或远程图片,默认是小程序 icon
templateId
:
"这是开发者后台设置的分享素材模板id"
,
};
});
pm
.
onShareSuccess
((
e
)
=>
{
console
.
log
(
"分享成功onShareSuccess回调:"
,
e
);
});
pm
.
onShareFail
((
e
)
=>
{
console
.
log
(
"分享失败onShareSuccess回调:"
,
e
);
});
},
created
()
{
console
.
log
(
"playerCreated"
);
},
beforeMount
()
{
console
.
log
(
"playerBeforeMount"
);
},
mounted
()
{
this
.
loadAdSwitch
()
this
.
getShowShortcut
()
console
.
log
(
"playerMounted"
);
},
beforeUpdate
()
{
console
.
log
(
"playerBeforeUpdate"
);
},
updated
()
{
console
.
log
(
"playerUpdated"
);
this
.
count
%
2
==
0
?
this
.
pm
.
setPlayStatus
(
"play"
)
:
this
.
pm
.
setPlayStatus
(
"pause"
);
},
beforeDestroy
()
{
console
.
log
(
"playerBeforeDestroy"
);
},
destroyed
()
{
console
.
log
(
"playerDestroyed "
);
},
methods
:
{
eventHandler
(
e
)
{
this
.
showShortcutPop
=
false
if
(
e
.
detail
.
errNo
)
{
console
.
log
(
"添加到桌面失败"
,
e
.
detail
);
}
else
{
console
.
log
(
"添加到桌面成功"
);
}
},
closeShortcutPop
()
{
this
.
showShortcutPop
=
false
this
.
canShowShortcut
=
false
uni
.
setStorage
({
key
:
'close_shortcut'
,
data
:
"close"
});
},
cliPause
()
{
console
.
error
(
this
.
$props
);
this
.
pm
.
setPlayStatus
(
"pause"
);
this
.
$emit
(
"cliPause"
,
1
);
},
loadAdSwitch
()
{
let
that
=
this
common
.
methods
.
post
({
url
:
'/vedio/confs'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
showAdForServer
=
data
.
douyinAdTipOpen
;
if
(
!
that
.
showAdForServer
)
{
// 预加载广告
that
.
preloadAd
()
}
}
});
},
preloadAd
()
{
let
that
=
this
// 创建实例
this
.
ad
=
tt
.
createRewardedVideoAd
({
adUnitId
:
REWARD_ID
,
});
// 监听错误
this
.
ad
.
onError
((
err
)
=>
{
uni
.
hideLoading
();
message
.
notify
(
"网络太火爆了,请稍候重试"
)
switch
(
err
.
errCode
)
{
case
1004
:
// 无合适的广告
break
;
default
:
// 更多请参考错误码文档
}
that
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
that
.
pm
.
toggleCustomDialog
()
})
});
// 监听视频播放完成
this
.
ad
.
onClose
((
data
)
=>
{
uni
.
hideLoading
();
if
(
data
.
isEnded
)
{
message
.
notify
(
"正在为您解锁剧集"
)
that
.
adUnlock
()
}
else
{
message
.
notify
(
"未观看完整视频"
)
that
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
that
.
pm
.
toggleCustomDialog
()
})
}
});
// do other thing
// 卸载 close 事件监听
// this.ad.offClose(closeHandler);
// 预加载资源
this
.
ad
.
load
();
},
startCountdown
()
{
let
that
=
this
;
var
countDownSeconds
=
3
that
.
countDown
=
countDownSeconds
const
timer
=
setInterval
(()
=>
{
if
(
countDownSeconds
>
0
)
{
that
.
countDown
=
countDownSeconds
countDownSeconds
--
}
else
{
clearInterval
(
timer
)
if
(
that
.
showRewardAdPop
)
{
that
.
showRewardAd
()
}
}
},
1000
)
},
showAdPop
()
{
this
.
showRewardAdPop
=
true
this
.
startCountdown
()
},
closeAdPop
()
{
this
.
showRewardAdPop
=
false
},
showRewardAd
()
{
this
.
showRewardAdPop
=
false
// 播放激励视频
uni
.
showLoading
({
title
:
'广告加载中'
});
this
.
ad
.
show
();
},
collect
()
{
// 收藏
common
.
methods
.
post
({
url
:
'/vedio/collect'
,
data
:
{
albumId
:
this
.
albumId
},
showLoading
:
false
,
success
:
({
data
})
=>
{}
});
},
cancelCollect
()
{
// 取消收藏
common
.
methods
.
post
({
url
:
'/vedio/cancelCollect'
,
data
:
{
albumId
:
this
.
albumId
},
showLoading
:
false
,
success
:
({
data
})
=>
{}
});
},
commitVideo
()
{
common
.
methods
.
post
({
url
:
'/vedio/reportIndex'
,
data
:
{
albumId
:
this
.
albumId
,
vedioIndex
:
this
.
seq
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{}
});
},
unlock
()
{
let
that
=
this
common
.
methods
.
post
({
url
:
'/vedio/unlock'
,
data
:
{
albumId
:
this
.
albumId
,
num
:
this
.
seq
},
showLoading
:
false
,
success
:
({
data
})
=>
{
message
.
notify
(
data
.
msg
)
if
(
data
.
code
==
200
)
{
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
301
)
{
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
302
)
{
this
.
pm
.
setCurrentUnlock
()
// this.commitVideo()
}
else
if
(
data
.
code
==
303
)
{
this
.
pm
.
toggleCustomDialog
()
}
}
});
},
adUnlock
()
{
let
that
=
this
this
.
post
({
url
:
'/vedio/unlockByAd'
,
data
:
{
adSource
:
'csj'
,
albumId
:
this
.
albumId
,
num
:
this
.
seq
,
ecpm
:
''
},
showLoading
:
false
,
success
:
({
data
})
=>
{
message
.
notify
(
data
.
msg
)
if
(
data
.
code
==
200
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
301
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
302
)
{
that
.
pm
.
setCurrentUnlock
()
this
.
commitVideo
()
}
else
if
(
data
.
code
==
303
)
{
that
.
pm
.
toggleCustomDialog
()
}
}
});
},
getShowShortcut
()
{
let
closeShortcut
=
uni
.
getStorageSync
(
'close_shortcut'
)
if
(
closeShortcut
)
{
this
.
canShowShortcut
=
false
return
}
let
shortcutTime
=
uni
.
getStorageSync
(
'shortcut_time'
)
if
(
shortcutTime
)
{
this
.
canShowShortcut
=
!
this
.
isToday
(
shortcutTime
)
}
else
{
this
.
canShowShortcut
=
true
}
},
setShowShortcut
()
{
uni
.
setStorage
({
key
:
'shortcut_time'
,
data
:
Date
.
now
()
});
},
isToday
(
timestamp
)
{
const
today
=
new
Date
();
const
todayStart
=
new
Date
(
today
.
getFullYear
(),
today
.
getMonth
(),
today
.
getDate
()).
getTime
();
return
timestamp
>=
todayStart
&&
timestamp
<
todayStart
+
86400000
;
// 86400000 毫秒为一天
}
},
};
</
script
>
<
style
lang=
"scss"
>
.shortcut
{
position
:
absolute
;
top
:
85%
;
left
:
40%
;
transform
:
translate
(
-50%
,
-50%
);
display
:
flex
;
flex-direction
:
row
;
align-items
:
center
;
// justify-content: space-between;
width
:
65%
;
height
:
100rpx
;
padding
:
0
20rpx
;
background-color
:
whitesmoke
;
border-radius
:
10rpx
;
}
.container
{
position
:
absolute
;
top
:
50%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-60%
);
width
:
600rpx
;
height
:
800rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.ad-view
{
width
:
600rpx
;
border-radius
:
20rpx
;
margin-bottom
:
10px
;
}
.content
{
border-radius
:
20rpx
;
background-color
:
white
;
display
:
flex
;
width
:
600rpx
;
padding
:
30rpx
0
;
flex-direction
:
column
;
align-items
:
center
;
.title
{
color
:
black
;
font-size
:
40rpx
;
font-weight
:
bold
;
margin-bottom
:
30rpx
;
}
.button
{
margin
:
20rpx
20rpx
;
border-radius
:
10rpx
;
background-color
:
orange
;
color
:
white
;
font-size
:
36rpx
;
}
.downtext
{
color
:
darkgray
;
font-size
:
26rpx
;
}
}
</
style
>
\ No newline at end of file
vedio/components/q-button/q-button.vue
deleted
100644 → 0
View file @
83b5b31c
<
template
>
<view>
<button
class=
"reset-button button"
@
click=
"onClick"
hover-class=
"button-hover"
:class=
"[shape == 'circle' ? 'round-circle' : '']"
>
<slot></slot>
</button>
</view>
</
template
>
<
script
>
/**
* m-field button 按钮组件
* @description 常用按钮组件。
* @tutorial https://ui.ymeoo.cn
* @property {String} color 按钮主题色
* @property {String} shape 设置为circle,则按钮两边为半圆形
* @event {Function} click 组件自定义点击事件
* @example <u-form-item label="姓名"><u-input v-model="form.name" /></u-form-item>
*/
export
default
{
name
:
'q-button'
,
props
:
{
shape
:
{
type
:
String
,
default
:
'circle'
}
},
data
()
{
return
{};
},
methods
:
{
onClick
()
{
this
.
$emit
(
'click'
,
''
);
}
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
// 去除button的所有默认样式
.reset-button
{
padding
:
0
;
font-size
:
inherit
;
line-height
:
inherit
;
background-color
:
transparent
;
color
:
inherit
;
}
.
reset-button
:
:
after
{
border
:
none
;
}
// button样式
.button
{
display
:
block
;
padding
:
20rpx
;
margin
:
20rpx
;
background-image
:
-moz-linear-gradient
(
135deg
,
rgb
(
0
,
255
,
255
)
,
rgb
(
29
,
147
,
251
));
background-image
:
-webkit-linear-gradient
(
135deg
,
rgb
(
0
,
255
,
255
)
,
rgb
(
29
,
147
,
251
));
background-image
:
linear-gradient
(
135deg
,
rgb
(
0
,
255
,
255
)
,
rgb
(
29
,
147
,
251
));
color
:
#fff
;
}
.button-hover
{
background-color
:
#f5f5f5
!
important
;
}
.round-circle
{
border-radius
:
100rpx
;
}
</
style
>
vedio/package.json
View file @
545cb2d3
{
"uni-app"
:
{
"scripts"
:
{
"mp-dingtalk"
:
{
"title"
:
"钉钉小程序"
,
"env"
:
{
"UNI_PLATFORM"
:
"mp-alipay"
},
"define"
:
{
"MP-DINGTALK"
:
true
}
},
"mp-weixin-test"
:
{
"title"
:
"本地测试版本"
,
"env"
:
{
"UNI_PLATFORM"
:
"mp-weixin"
},
"define"
:
{
"MP-APP-TEST"
:
true
}
},
"mp-app-test"
:
{
"title"
:
"App 本地测试版本"
,
"env"
:
{
"UNI_PLATFORM"
:
"mp-weixin"
},
"define"
:
{
"MP-APP-TEST"
:
true
}
}
}
"scripts"
:
{}
},
"dependencies"
:
{
"decimal.js"
:
"^10.4.3"
,
...
...
vedio/pages.json
View file @
545cb2d3
{
"easycom"
:
{
"^u-(.*)"
:
"@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
,
"autoscan"
:
true
,
"custom"
:
{
"^n-(.*)"
:
"@/nPro/$1/$1.vue"
,
//
匹配nPro内的vue文件
"^nx-(.*)"
:
"@/nProX/$1/$1.vue"
//
匹配nProX内的vue文件
}
},
"pages"
:
[
//
#ifndef
APP-PLUS
{
"path"
:
"pages/loading"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#F2F1FF"
,
"navigationBarTextStyle"
:
"#000000"
}
},
//
#endif
{
"path"
:
"pages/home"
,
"style"
:
{
"navigationBarTitleText"
:
"山梨剧场"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"pages/brower/brower"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
}
],
//
分包配置
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"vipPay/vipPay"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"search/search"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"task/task"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
}]
},
{
"root"
:
"pagesC"
,
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
"style"
:
{
"backgroundColor"
:
"#000000"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
}
}]
},
{
"root"
:
"pagesD"
,
"pages"
:
[{
"path"
:
"watchRecord/watchRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"观看记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"payRecord/payRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"我的订单"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"dotRecord/dotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"看点记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"useDotRecord/useDotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"消费记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"invite/invite"
,
"style"
:
{
"navigationBarTitleText"
:
"邀好友得1000看点"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"cdkey/cdkey"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarTitleText"
:
"兑换会员"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
}]
}
],
//
分包预载配置
"preloadRule"
:
{
//
当我们进入了pages/home页面以后就会预下载pagesA分包
"pages/home"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesA"
,
"pagesC"
,
"pagesD"
]
//进入页面后预下载分包
}
},
"globalStyle"
:
{
"backgroundColor"
:
"#f5f5f5"
,
"navigationStyle"
:
"default"
,
"app-plus"
:
{
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
},
"usingComponents"
:
{
"tt-video-player"
:
"ext://industry/video-player"
}
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
{
"easycom"
:
{
"^u-(.*)"
:
"@/uni_modules/uview-ui/components/u-$1/u-$1.vue"
,
"autoscan"
:
true
,
"custom"
:
{
"^n-(.*)"
:
"@/nPro/$1/$1.vue"
,
//
匹配nPro内的vue文件
"^nx-(.*)"
:
"@/nProX/$1/$1.vue"
//
匹配nProX内的vue文件
}
},
"pages"
:
[
//
#ifndef
APP-PLUS
{
"path"
:
"pages/loading"
},
//
#endif
{
"path"
:
"pages/home"
,
"style"
:
{
"navigationBarTitleText"
:
"山梨剧场"
}
},
{
"path"
:
"pages/brower/brower"
}
],
//
分包配置
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"vipPay/vipPay"
},
{
"path"
:
"search/search"
},
{
"path"
:
"task/task"
}]
},
{
"root"
:
"pagesC"
,
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
"style"
:
{
"backgroundColor"
:
"#000000"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
}
},
{
"path"
:
"playlet/index"
,
"style"
:
{
"extends"
:
"ext://industry/playlet-plugin"
,
"isPageExtension"
:
true
}
}]
},
{
"root"
:
"pagesD"
,
"pages"
:
[{
"path"
:
"watchRecord/watchRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"观看记录"
}
},
{
"path"
:
"payRecord/payRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"我的订单"
}
},
{
"path"
:
"dotRecord/dotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"看点记录"
}
},
{
"path"
:
"useDotRecord/useDotRecord"
,
"style"
:
{
"navigationBarTitleText"
:
"消费记录"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"invite/invite"
,
"style"
:
{
"navigationBarTitleText"
:
"邀好友得1000看点"
}
},
{
"path"
:
"cdkey/cdkey"
,
"style"
:
{
"navigationBarTitleText"
:
"兑换会员"
}
}]
}
],
//
分包预载配置
"preloadRule"
:
{
//
当我们进入了pages/home页面以后就会预下载pagesA分包
"pages/home"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesA"
,
"pagesC"
,
"pagesD"
]
//进入页面后预下载分包
}
},
"globalStyle"
:
{
"backgroundColor"
:
"#f5f5f5"
,
"navigationStyle"
:
"default"
,
"navigationBarTextStyle"
:
"black"
,
"app-plus"
:
{
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
},
"usingComponents"
:
{
"tt-video-player"
:
"ext://industry/video-player"
}
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
}
\ No newline at end of file
vedio/pagesA/search/search.vue
View file @
545cb2d3
...
...
@@ -79,6 +79,9 @@
</
template
>
<
script
>
import
{
gotoVideoPlayerPage
}
from
'../../common/page-route'
;
import
common
from
'@/mixins/common'
;
import
{
navigateTo
,
...
...
@@ -166,8 +169,7 @@
this
.
showEmpty
=
false
},
handleListItem
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
gotoVideoPlayerPage
(
item
)
},
saveSearchWord
(
word
)
{
// 校验是否保存过,保存过不保存
...
...
vedio/pagesC/playlet/index.vue
0 → 100644
View file @
545cb2d3
<
script
>
import
Player
from
"@/components/player/player.vue"
;
import
Charge
from
"@/components/charge/charge.vue"
;
const
{
PlayletExtension
,
getPlayletManager
}
=
tt
;
PlayletExtension
();
import
common
from
'@/mixins/common'
;
export
default
{
components
:
{
Player
,
Charge
},
//采用uniapp的生命周期函数
onLoad
(
option
)
{
let
data
=
JSON
.
parse
(
decodeURIComponent
(
option
.
data
));
setTimeout
(()
=>
{
const
p_m
=
getPlayletManager
(
this
);
p_m
.
setCatalog
({
freeList
:
data
.
douyinFreeList
,
unlockList
:
data
.
douyinUnlockList
,
lockList
:
data
.
douyinLockList
,
});
},
500
)
},
onReady
()
{
const
p_m
=
getPlayletManager
(
this
);
p_m
.
onPlay
((
e
)
=>
{
console
.
error
(
"可以播放了,可以播放了,可以播放了,可以播放了"
,
e
);
});
p_m
.
onError
((
e
)
=>
{
console
.
error
(
"插件页onload 报错了 报错了"
,
e
);
});
p_m
.
onPause
((
e
)
=>
{
console
.
error
(
"触发暂停播放onPause回调:"
,
e
);
});
},
onShow
()
{
console
.
log
(
"show"
);
},
mounted
()
{
console
.
error
(
this
,
"this"
);
},
onShareAppMessage
()
{
console
.
log
(
"share"
);
},
methods
:
{
cliPause
(
num
)
{
console
.
log
(
num
,
"cliPause"
);
}
},
};
</
script
>
\ No newline at end of file
vedio/pagesD/watchRecord/watchRecord.vue
View file @
545cb2d3
...
...
@@ -36,7 +36,9 @@
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
gotoVideoPlayerPage
}
from
"@/common/page-route.js"
import
{
navigateTo
,
message
,
...
...
@@ -79,8 +81,7 @@
});
},
handleInfo
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
gotoVideoPlayerPage
(
item
)
},
handleXing
(
item
)
{
var
that
=
this
;
...
...
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