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
fb5f7626
Commit
fb5f7626
authored
Jun 07, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
6137e34b
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
15 additions
and
1535 deletions
+15
-1535
my.vue
vedio/components/home/my.vue
+10
-37
pages.json
vedio/pages.json
+4
-46
home.vue
vedio/pages/home.vue
+1
-1
index.vue
vedio/pages/index/index.vue
+0
-388
my.vue
vedio/pages/my/my.vue
+0
-266
follow.vue
vedio/pages/recommend/follow.vue
+0
-173
recommend.vue
vedio/pages/recommend/recommend.vue
+0
-168
recommendVideo.vue
vedio/pages/recommend/recommendVideo.vue
+0
-456
No files found.
vedio/components/home/my.vue
View file @
fb5f7626
<
template
>
<view
class=
"body"
>
<!--
<scroll-view
:scroll-y=
"true"
>
-->
<z-paging
style=
"height: 100%;"
>
<z-paging
style=
"height: 100%;
background-color: #f5f5f5;
"
>
<view
:style=
"'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+10+'px;'"
>
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
<view>
<view
style=
"font-size: 32rpx;color: black;margin-left: 20rpx;"
>
用户ID:
{{
userBean
.
idcode
}}
</view>
</view>
<!--
<button
text=
"微信用户一键登录"
open-type=
"getPhoneNumber"
bindgetphonenumber=
"getPhoneNumber"
>
123123
</button>
-->
</view>
<view
v-if=
"userBean.showVipInner && os === 'android' "
style=
"display: flex;flex-direction: row;background: #f5ca86;margin: 20rpx;padding: 40rpx;border-radius:20rpx;align-items: center;justify-content:space-between;"
>
<view
style=
"display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"font-size: 36rpx;color: #5b1500;font-weight: 777;"
>
{{
userBean
.
expireTime
<=
0
?
'开通VIP会员'
:
'VIP会员'
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
解锁全部短剧
</view>
<view
v-else
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
@
click=
"handleCoinPay"
style=
"width: 210rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;margin-top: 30rpx;"
>
立即开通
</view>
<view
v-else
style=
"width: 210rpx;height: 60rpx;padding-bottom: 4rpx;margin-top: 30rpx;"
>
</view>
</view>
<image
style=
"border-radius:10rpx; width: 130rpx;height: 100rpx;margin-right: 20rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
</view>
<view
v-if=
"os === 'android' "
style=
"display: flex;height:
200rpx;margin: 20rpx
;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"display: flex;height:
180rpx;margin:40rpx 20rpx
;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"
>
...
...
@@ -47,16 +19,17 @@
<image
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png"
></image>
<view
style=
"font-size: 36rpx;font-weight: 777;"
>
看点充值
</view>
</view>
<view
style=
"font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"
>
海量看点狂洒中,好剧等你来解锁
</view>
<view
style=
"font-size: 36rpx;"
>
看点余额:
{{
userBean
.
point
}}
</view>
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"
>
海量看点狂洒中,好剧等你来解锁
</view>
<view
v-else
style=
"font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"
>
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
</view>
</view>
<view
style=
"width: 220rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"
>
<view
style=
"font-size: 30rpx;color: #5b1500;margin-bottom: 20rpx;"
>
{{
userBean
.
point
}}
</view>
<view
@
click=
"handleCoinPay"
<view
v-if=
"userBean.expireTime
<
=
0
"
@
click=
"handleCoinPay"
style=
"width: 160rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"
>
去充值
</view>
...
...
@@ -67,7 +40,7 @@
<view
class=
"infobg"
style=
"margin: 20rpx;"
>
<view
v-if=
"userBean.showVipInner && os === 'android' "
class=
"item arrow"
@
click=
"handlePayRecord"
>
<view
class=
"item arrow"
@
click=
"handlePayRecord"
>
我的订单
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
...
...
vedio/pages.json
View file @
fb5f7626
...
...
@@ -21,53 +21,19 @@
{
"path"
:
"pages/home"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationStyle"
:
"default"
,
"navigationBarTitleText"
:
"巨爽短剧"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"pages/my/my"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"path"
:
"pages/brower/brower"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"black"
}
},
{
"path"
:
"pages/recommend/recommend"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
}
},
{
"path"
:
"pages/recommend/follow"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"path"
:
"pages/recommend/recommendVideo"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
}
}
],
//
分包配置
...
...
@@ -85,7 +51,7 @@
"root"
:
"pagesC"
,
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
"style"
:
{
"style"
:
{
"backgroundColor"
:
"#000000"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
...
...
@@ -139,14 +105,6 @@
"pages/home"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesA"
,
"pagesC"
,
"pagesD"
]
//进入页面后预下载分包
},
"pages/recommend/recommend"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesC"
]
//进入页面后预下载分包
},
"pages/my/my"
:
{
"network"
:
"all"
,
//在指定网络下预下载,可选值为:all(不限网络)、wifi(仅wifi下预下载)
"packages"
:
[
"pagesD"
]
//进入页面后预下载分包
}
},
"globalStyle"
:
{
...
...
vedio/pages/home.vue
View file @
fb5f7626
...
...
@@ -219,7 +219,7 @@
<
style
lang=
"scss"
>
.body
{
height
:
100%
;
background-color
:
white
;
background-color
:
#f5f5f5
;
}
.editBar
{
...
...
vedio/pages/index/index.vue
deleted
100644 → 0
View file @
6137e34b
This diff is collapsed.
Click to expand it.
vedio/pages/my/my.vue
deleted
100644 → 0
View file @
6137e34b
<
template
>
<view
class=
"body"
>
<!--
<scroll-view
:scroll-y=
"true"
>
-->
<z-paging
style=
"height: 100%;"
>
<view
:style=
"'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'"
>
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
<view>
<view
style=
"font-size: 32rpx;color: black;margin-left: 20rpx;"
>
用户ID:
{{
userBean
.
idcode
}}
</view>
</view>
<!--
<button
text=
"微信用户一键登录"
open-type=
"getPhoneNumber"
bindgetphonenumber=
"getPhoneNumber"
>
123123
</button>
-->
</view>
<view
v-if=
"userBean.showVipInner && os === 'android' "
style=
"display: flex;flex-direction: row;background: #f5ca86;margin: 20rpx;padding: 40rpx;border-radius:20rpx;align-items: center;justify-content:space-between;"
>
<view
style=
"display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"font-size: 36rpx;color: #5b1500;font-weight: 777;"
>
{{
userBean
.
expireTime
<=
0
?
'开通VIP会员'
:
'VIP会员'
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
解锁全部短剧
</view>
<view
v-else
style=
"font-size: 30rpx;color: #5b1500;margin-top: 12rpx;"
>
到期时间:
{{
userBean
.
expireTime
*
1000
|
formatDate
(
'yyyy-MM-dd'
)
}}
</view>
<view
v-if=
"userBean.expireTime
<
=
0
"
@
click=
"handleCoinPay"
style=
"width: 210rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;margin-top: 30rpx;"
>
立即开通
</view>
<view
v-else
style=
"width: 210rpx;height: 60rpx;padding-bottom: 4rpx;margin-top: 30rpx;"
>
</view>
</view>
<image
style=
"border-radius:10rpx; width: 130rpx;height: 100rpx;margin-right: 20rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/bg_my_vip.png"
mode=
"scaleToFill"
></image>
</view>
<view
v-if=
"os === 'android' "
style=
"display: flex;height: 200rpx;margin: 20rpx;background: #f5ca86;border-radius: 20rpx;"
>
<view
style=
"flex-grow: 2; margin-left: 20rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;justify-content: center;"
>
<view
style=
"display: flex;align-items: center;"
>
<image
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;margin-right: 10rpx;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_my_coin.png"
></image>
<view
style=
"font-size: 36rpx;font-weight: 777;"
>
看点充值
</view>
</view>
<view
style=
"font-size: 28rpx;color: #5b1500;margin-top: 20rpx;"
>
海量看点狂洒中,好剧等你来解锁
</view>
</view>
</view>
<view
style=
"width: 220rpx;"
>
<view
style=
"width: 100%;height: 100%;display: flex;flex-direction: column;align-items: center;justify-content: center;"
>
<view
style=
"font-size: 30rpx;color: #5b1500;margin-bottom: 20rpx;"
>
{{
userBean
.
point
}}
</view>
<view
@
click=
"handleCoinPay"
style=
"width: 160rpx;height: 60rpx;background-color: #5b1500;border-radius:30rpx;color: white;font-size: 26rpx;justify-content: center;align-items: center;display: flex;padding-bottom: 4rpx;"
>
去充值
</view>
</view>
</view>
</view>
<view
class=
"infobg"
style=
"margin: 20rpx;"
>
<view
v-if=
"userBean.showVipInner && os === 'android' "
class=
"item arrow"
@
click=
"handlePayRecord"
>
我的订单
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === 'android' "
class=
"item arrow"
@
click=
"handleDotRecord"
>
看点记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
v-if=
"os === 'android' "
class=
"item arrow"
@
click=
"handleUseDotRecord"
>
消费记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handleWatchRecord"
>
观看记录
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
<view
class=
"item arrow"
@
click=
"handlePhone"
>
联系客服
<view
class=
"item_bd ellipsis"
style=
"margin-left: 58rpx;"
></view>
</view>
</view>
<view
style=
"display: flex;justify-content: center;margin-top: 20rpx;font-size: 26rpx;color: gray;"
>
{{
versionName
}}
</view>
</z-paging>
<!--
</scroll-view>
-->
<coin-popup
:show=
"showAnimate"
@
close=
"showAnimate = false"
@
paySuccess=
"paySuccess"
>
</coin-popup>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
getToLocal
}
from
"@/utils/utils.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
{
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
userBean
:
{},
showAnimate
:
false
,
windowHeight
:
0
,
os
:
'android'
,
versionName
:
app
.
globalData
.
versionName
,
corpid
:
''
,
// 企业ID
curl
:
''
,
// 客服链接
};
},
methods
:
{
show
()
{
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
// loadData() {
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
}
});
},
hide
()
{
},
handleDotRecord
()
{
// 看点记录
navigateTo
(
`/pagesD/dotRecord/dotRecord`
)
},
handleUseDotRecord
()
{
// 看点消费记录
navigateTo
(
`/pagesD/useDotRecord/useDotRecord`
)
},
handleWatchRecord
()
{
navigateTo
(
`/pagesD/watchRecord/watchRecord`
)
},
handleCoinPay
()
{
this
.
showAnimate
=
true
;
},
handlePayRecord
()
{
navigateTo
(
`/pagesD/payRecord/payRecord`
)
},
handleVipPay
()
{
navigateTo
(
`/pagesA/vipPay/vipPay`
)
},
handlePhone
()
{
// if (this.corpid != '' && this.curl != '') {
// wx.openCustomerServiceChat({
// extInfo: {
// url: this.curl
// },
// corpId: this.corpid,
// success(res) {},
// fail(e) {
// console.log(e)
// }
// })
// } else {
// let that = this
// // 联系我们
// this.post({
// url: '/vedio/customerServiceNumbers',
// showLoading: false,
// success: ({
// data
// }) => {
// let datas = data.customerServiceNumbers.split(',')
// that.corpid = datas[0]
// that.curl = datas[1]
// wx.openCustomerServiceChat({
// extInfo: {
// url: that.curl
// },
// corpId: that.corpid,
// success(res) {},
// fail(e) {
// console.log(e)
// }
// })
// }
// });
// }
wx
.
makePhoneCall
({
phoneNumber
:
'4000969950'
,
success
:
function
(
res
)
{
console
.
log
(
'拨打电话成功!'
);
},
fail
:
function
(
res
)
{
console
.
log
(
'拨打电话失败!'
);
}
})
},
paySuccess
(
largeType
)
{
// largeType=vip 开通vip
// largeType=point 购买看点
if
(
wx
.
getSystemInfoSync
().
platform
==
'ios'
){
message
.
notify
(
'支付成功'
);
}
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
userBean
=
data
;
}
});
},
getPhoneNumber
(
e
)
{
console
.
log
(
e
.
detail
.
code
)
// 动态令牌
console
.
log
(
e
.
detail
.
errMsg
)
// 回调信息(成功失败都会返回)
console
.
log
(
e
.
detail
.
errno
)
// 错误码(失败时返回)
}
}
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
.body
{
background-color
:
whitesmoke
;
}
.avatar
{
background-color
:
#d8d8d8
;
width
:
100rpx
;
height
:
100rpx
;
border-radius
:
50%
;
overflow
:
hidden
;
//box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1)
}
</
style
>
\ No newline at end of file
vedio/pages/recommend/follow.vue
deleted
100644 → 0
View file @
6137e34b
<
template
>
<view
style=
"background: white;"
>
<scroll-view
scroll-y=
"true"
:style=
"'height: '+(windowHeight -120)+'px;margin-top:'+(titleBarHeight +statusBarHeight)+'px;'"
>
<view
class=
"flex space"
style=
"display:flex; flex-wrap:wrap;"
>
<block
v-for=
"(value,key) in dataList"
:key=
"key"
>
<view
class=
"mt-10"
style=
"width:31%; position: relative; border-radius:20rpx;margin-bottom: 10rpx;margin-left: 14rpx;"
@
click
.
stop=
"click(value)"
@
longpress
.
stop=
"longClick(key)"
>
<image
class=
"integral-mall-goods"
mode=
"aspectFill"
:src=
"value.coverImage"
></image>
<view
class=
"text"
style=
"font-size: 26rpx;color: black;height: 36rpx;margin-left: 5rpx;"
>
{{
value
.
title
}}
</view>
<view
class=
"text"
style=
"font-size: 22rpx;color: gray;height: 30rpx;margin-left: 5rpx;"
>
{{
value
.
vedioDesc
}}
</view>
<view
v-if=
"isEditStyle"
@
click
.
stop=
"cbClick(key)"
style=
"position: absolute;background: #000000; opacity: 0.6;width: 92%;height: 96%;top: 0;border-radius:20rpx;
padding-left: 20rpx;padding-top: 20rpx;"
>
<image
v-if=
"value.isChecked"
src=
"@/static/ic_selected.png"
style=
"width: 50rpx;height: 50rpx;"
/>
<image
v-if=
"!value.isChecked"
src=
"@/static/ic_unselected.png"
style=
"width: 50rpx;height: 50rpx;"
/>
</view>
</view>
</block>
</view>
</scroll-view>
<view
v-if=
"dataList.length
<
=
0
"
style=
"position: absolute;left: 50%;width: 240rpx;margin-left: -120rpx;top: 600rpx;text-align: center;"
>
<text
style=
"color: gray;"
>
暂无在追剧
</text>
<view
@
click=
"goRecommend"
class=
"button"
style=
"margin-top: 20rpx;color: white;"
>
去剧场
</view>
</view>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
navigateTo
,
}
from
'@/utils/fun.js'
;
const
app
=
getApp
();
export
default
{
name
:
"follow"
,
mixins
:
[
common
],
data
()
{
return
{
titleBarHeight
:
app
.
globalData
.
titleBarHeight
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
windowHeight
:
0
,
dataList
:
[],
isEditStyle
:
false
}
},
watch
:
{
isEditStyle
:
{
handler
(
newValue
,
oldValue
)
{
this
.
$emit
(
"showEditBarR"
,
newValue
)
}
},
},
onLoad
(
e
)
{},
methods
:
{
show
()
{
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
this
.
loadData
()
},
loadData
()
{
// 收藏记录
this
.
post
({
url
:
'/vedio/collectList'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
dataList
=
data
.
list
;
if
(
this
.
dataList
.
length
>
0
)
{
this
.
$emit
(
"showEditR"
,
true
)
}
else
{
this
.
$emit
(
"showEditR"
,
false
)
}
}
});
},
changeEditStyle
(
b
)
{
this
.
isEditStyle
=
b
if
(
!
this
.
isEditStyle
)
{
this
.
noChoice
()
}
},
goRecommend
()
{
this
.
$emit
(
"goRecommend"
)
},
click
(
detail
)
{
navigateTo
(
`/pagesC/video/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
},
longClick
(
key
)
{
this
.
isEditStyle
=
true
this
.
dataList
[
key
].
isChecked
=
true
},
onChange
(
key
)
{
this
.
dataList
[
key
].
isChecked
=
!
this
.
dataList
[
key
].
isChecked
},
cbClick
(
key
)
{
let
newData
=
this
.
dataList
[
key
]
newData
.
isChecked
=
!
newData
.
isChecked
this
.
$set
(
this
.
dataList
,
key
,
newData
)
},
fullChoice
()
{
for
(
let
i
=
0
;
i
<
this
.
dataList
.
length
;
i
++
)
{
this
.
dataList
[
i
].
isChecked
=
true
}
this
.
$forceUpdate
()
},
noChoice
()
{
for
(
let
i
=
0
;
i
<
this
.
dataList
.
length
;
i
++
)
{
this
.
dataList
[
i
].
isChecked
=
false
}
this
.
$forceUpdate
()
},
deleteCollect
()
{
let
list
=
[]
for
(
let
i
=
0
;
i
<
this
.
dataList
.
length
;
i
++
)
{
if
(
this
.
dataList
[
i
].
isChecked
)
{
list
.
push
(
this
.
dataList
[
i
].
vedioId
)
}
}
// 取消收藏
this
.
post
({
url
:
'/vedio/cancelCollect'
,
data
:
{
list
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
isEditStyle
=
false
uni
.
showToast
({
title
:
"删除成功"
})
this
.
loadData
()
}
});
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.integral-mall-goods
{
width
:
100%
;
height
:
320rpx
;
background
:
#F2F2F2
;
border-radius
:
16upx
;
}
.text
{
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
}
.cb
{
margin-top
:
10rpx
;
margin-left
:
10rpx
;
// position: absolute;
}
</
style
>
\ No newline at end of file
vedio/pages/recommend/recommend.vue
deleted
100644 → 0
View file @
6137e34b
<
template
>
<view
class=
"body"
>
<view
class=
"tabContainer"
:style=
"
'height:' +
titleBarHeight +
'px;line-height:' +
titleBarHeight +
'px;padding-top:' +
statusBarHeight +
'px;background-color:transparent'
"
>
<view
v-if=
"(current==0 && showEdit)"
:style=
"'position: absolute;left: 20rpx;top:'+ (statusBarHeight + 10) + 'px'"
@
click
.
stop=
"showEditBar = !showEditBar"
>
<image
style=
"width: 50rpx;height: 50rpx;"
mode=
"widthFix"
:src=
"showEditBar?'/static/video/close.png':'/static/video/edit.png'"
/>
</view>
<view
v-show=
"showEditBar"
style=
"width: 300rpx;background: white;z-index: 999;"
>
<view
style=
"font-size: 36rpx;text-align: center;align-items: center;height:100rpx;line-height: 100rpx;"
>
追剧
</view>
</view>
<view
v-if=
"(!showEditBar && showTap)"
>
<u-tabs
:list=
"tabs"
:current=
"current"
@
change=
"handleChange"
lineWidth=
"30"
:scrollable=
"false"
:lineColor=
"current==0?'#f56c6c':'#ffffff'"
:activeStyle=
"
{
color: current==0?'#000000':'#ffffff',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#606266',
transform: 'scale(1)'
}" />
</view>
</view>
<swiper
class=
"swiper"
@
change=
"swiperChange"
:current=
"current"
:disable-touch=
"showEditBar"
>
<swiper-item
class=
"swiper-item"
>
<followPage
v-on:showEditBarR=
"showEditBarR"
v-on:goRecommend=
"goRecommend"
v-on:showEditR=
"showEditR"
ref=
"follow"
/>
</swiper-item>
<swiper-item
class=
"swiper-item"
>
<recommendVideoPage
ref=
"recommendVideo"
/>
</swiper-item>
</swiper>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
followPage
from
"@/pages/recommend/follow.vue"
import
recommendVideoPage
from
"@/pages/recommend/recommendVideo.vue"
;
import
{
navigateTo
,
}
from
'@/utils/fun.js'
;
const
app
=
getApp
();
export
default
{
name
:
"recommend"
,
mixins
:
[
common
],
components
:
{
followPage
,
recommendVideoPage
},
data
()
{
return
{
current
:
1
,
tabIndex
:
1
,
tabs
:
[{
name
:
'追剧'
},
{
name
:
'推荐'
}],
showEditBar
:
false
,
showEdit
:
false
,
showTap
:
false
,
titleBarHeight
:
app
.
globalData
.
titleBarHeight
,
titleButtonWidth
:
app
.
globalData
.
titleButtonWidth
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
}
},
onLoad
(
e
)
{},
watch
:
{
showEditBar
:
{
handler
(
newValue
,
oldValue
)
{
this
.
$refs
.
follow
.
changeEditStyle
(
newValue
);
}
},
},
methods
:
{
hide
()
{
this
.
$refs
.
recommendVideo
.
stop
();
},
show
()
{
this
.
$nextTick
(()
=>
{
// 延迟渲染,否则位置错乱
this
.
showTap
=
true
})
if
(
this
.
current
==
0
)
{
this
.
$refs
.
follow
.
show
();
this
.
$refs
.
recommendVideo
.
stop
();
this
.
$emit
(
"changeBottomBarColor"
,
false
);
}
else
if
(
this
.
current
==
1
)
{
this
.
$refs
.
recommendVideo
.
show
();
this
.
$emit
(
"changeBottomBarColor"
,
true
);
}
},
handleChange
(
event
)
{
this
.
current
=
event
.
index
;
this
.
show
()
},
swiperChange
(
event
)
{
this
.
current
=
event
.
detail
.
current
this
.
show
()
},
showEditBarR
(
b
)
{
this
.
showEditBar
=
b
this
.
$emit
(
"showEditBarH"
,
b
);
},
showEditR
(
b
)
{
this
.
showEdit
=
b
},
fullChoice
()
{
this
.
$refs
.
follow
.
fullChoice
()
},
noChoice
()
{
this
.
$refs
.
follow
.
noChoice
()
},
deleteCollect
()
{
this
.
$refs
.
follow
.
deleteCollect
()
},
goRecommend
()
{
this
.
current
=
1
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.body
{
background
:
white
;
width
:
100%
;
height
:
100%
;
}
.tabContainer
{
width
:
100%
;
position
:
absolute
;
z-index
:
100
;
display
:
flex
;
align-items
:
center
;
overflow
:
hidden
;
justify-content
:
center
;
}
.swiper
{
height
:
100%
;
}
.recommendTitle
{}
</
style
>
\ No newline at end of file
vedio/pages/recommend/recommendVideo.vue
deleted
100644 → 0
View file @
6137e34b
This diff is collapsed.
Click to expand it.
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