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
a9580391
Commit
a9580391
authored
May 28, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
2b7150a6
Changes
13
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
2451 additions
and
2450 deletions
+2451
-2450
ad-popup.vue
vedio/components/ad-popup/ad-popup.vue
+127
-127
coin-popup.vue
vedio/components/coin-popup/coin-popup.vue
+372
-372
index.vue
vedio/components/home/index.vue
+3
-3
my.vue
vedio/components/home/my.vue
+262
-262
manifest.json
vedio/manifest.json
+1
-1
share.js
vedio/mixins/share.js
+26
-26
pages.json
vedio/pages.json
+166
-166
loading.vue
vedio/pages/loading.vue
+2
-1
recommendVideo.vue
vedio/pages/recommend/recommendVideo.vue
+421
-421
ttVideoDetail.vue
vedio/pagesC/ttvideo/ttVideoDetail.vue
+800
-800
dotRecord.vue
vedio/pagesD/dotRecord/dotRecord.vue
+70
-70
useDotRecord.vue
vedio/pagesD/useDotRecord/useDotRecord.vue
+70
-70
watchRecord.vue
vedio/pagesD/watchRecord/watchRecord.vue
+131
-131
No files found.
vedio/components/ad-popup/ad-popup.vue
View file @
a9580391
<
template
>
<view>
<uni-popup
type=
"center"
ref=
"adPop"
:maskClick=
"false"
:isMaskClick=
"false"
>
<view
class=
"container"
>
<!--
<view
class=
"ad-view"
>
<ad
:unit-id=
"adUnitId"
@
load=
"onload"
@
close=
"onclose"
@
error=
"onerror"
></ad>
</view>
-->
<view
class=
"content"
>
<text
class=
"title"
>
恭喜你,获得免费看剧名额
</text>
<text
class=
"button"
@
click=
"handleClose"
>
看视频免费解锁1集
</text>
<text
class=
"downtext"
>
{{
countDown
}}
s后自动进入广告,
观看完成解锁第
{{
vedioIndex
+
1
}}
集剧情
</text>
</view>
</view>
</uni-popup>
</view>
</
template
>
<
script
>
import
{
EXPRESS_ID
}
from
"@/utils/adConstant.js"
export
default
{
name
:
'adPopup'
,
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
,
<
template
>
<view>
<uni-popup
type=
"center"
ref=
"adPop"
:maskClick=
"false"
:isMaskClick=
"false"
>
<view
class=
"container"
>
<!--
<view
class=
"ad-view"
>
<ad
:unit-id=
"adUnitId"
@
load=
"onload"
@
close=
"onclose"
@
error=
"onerror"
></ad>
</view>
-->
<view
class=
"content"
>
<text
class=
"title"
>
恭喜你,获得免费看剧名额
</text>
<text
class=
"button"
@
click=
"handleClose"
>
看视频免费解锁1集
</text>
<text
class=
"downtext"
>
{{
countDown
}}
s后自动进入广告,
阅读完成解锁第
{{
vedioIndex
+
1
}}
集剧情
</text>
</view>
</view>
</uni-popup>
</view>
</
template
>
<
script
>
import
{
EXPRESS_ID
}
from
"@/utils/adConstant.js"
export
default
{
name
:
'adPopup'
,
props
:
{
show
:
{
type
:
Boolean
,
default
:
false
,
},
vedioIndex
:
{
type
:
[
Number
,
String
],
default
:
0
}
},
data
()
{
return
{
adUnitId
:
EXPRESS_ID
,
countDown
:
3
,
};
},
methods
:
{
handleShow
()
{
this
.
$refs
.
adPop
.
open
(
'center'
);
this
.
startCountdown
()
},
startCountdown
()
{
let
that
=
this
;
var
countDownSeconds
=
3
that
.
countDown
=
countDownSeconds
const
timer
=
setInterval
(()
=>
{
if
(
countDownSeconds
>
0
)
{
that
.
countDown
=
countDownSeconds
countDownSeconds
--
}
else
{
clearInterval
(
timer
)
that
.
handleClose
()
}
},
1000
)
},
handleClose
()
{
this
.
$refs
.
adPop
.
close
(
'center'
);
this
.
$emit
(
'close'
);
},
onload
(
e
)
{
console
.
log
(
"onload"
);
},
onclose
(
e
)
{
console
.
log
(
"onclose: "
+
e
.
detail
);
},
onerror
(
e
)
{
console
.
log
(
"onerror: "
+
e
.
detail
.
errCode
+
" message:: "
+
e
.
detail
.
errMsg
);
}
},
watch
:
{
show
:
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
handleShow
();
}
},
immediate
:
true
}
}
};
</
script
>
<
style
lang=
"scss"
>
.container
{
width
:
600rpx
;
height
:
800rpx
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.ad-view
{
width
:
600rpx
;
border-radius
:
20rpx
;
// background-color: white;
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
;
}
},
data
()
{
return
{
adUnitId
:
EXPRESS_ID
,
countDown
:
3
,
};
},
methods
:
{
handleShow
()
{
this
.
$refs
.
adPop
.
open
(
'center'
);
this
.
startCountdown
()
},
startCountdown
()
{
let
that
=
this
;
var
countDownSeconds
=
3
that
.
countDown
=
countDownSeconds
const
timer
=
setInterval
(()
=>
{
if
(
countDownSeconds
>
0
)
{
that
.
countDown
=
countDownSeconds
countDownSeconds
--
}
else
{
clearInterval
(
timer
)
that
.
handleClose
()
}
},
1000
)
},
handleClose
()
{
this
.
$refs
.
adPop
.
close
(
'center'
);
this
.
$emit
(
'close'
);
},
onload
(
e
)
{
console
.
log
(
"onload"
);
},
onclose
(
e
)
{
console
.
log
(
"onclose: "
+
e
.
detail
);
},
onerror
(
e
)
{
console
.
log
(
"onerror: "
+
e
.
detail
.
errCode
+
" message:: "
+
e
.
detail
.
errMsg
);
}
},
watch
:
{
show
:
{
handler
:
function
(
newVal
,
oldVal
)
{
if
(
newVal
)
{
this
.
handleShow
();
}
},
immediate
:
true
}
}
};
</
script
>
<
style
lang=
"scss"
>
.container
{
width
:
600rpx
;
height
:
800rpx
;
position
:
relative
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
}
.ad-view
{
width
:
600rpx
;
border-radius
:
20rpx
;
// background-color: white;
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/coin-popup/coin-popup.vue
View file @
a9580391
This diff is collapsed.
Click to expand it.
vedio/components/home/index.vue
View file @
a9580391
...
...
@@ -175,7 +175,7 @@
: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
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"
>
...
...
@@ -202,7 +202,7 @@
color: white;
font-size: 24rpx;
margin-right: 20rpx;"
>
继续
观看
继续
阅读
</view>
</view>
...
...
@@ -306,7 +306,7 @@
this
.
topList
=
data
.
list
;
}
});
// 最近
观看
剧
// 最近
阅读
剧
this
.
post
({
url
:
'/vedio/newest'
,
data
:
{},
...
...
vedio/components/home/my.vue
View file @
a9580391
This diff is collapsed.
Click to expand it.
vedio/manifest.json
View file @
a9580391
...
...
@@ -177,7 +177,7 @@
"enable"
:
true
}
},
"title"
:
"
短剧
"
,
"title"
:
"
小说
"
,
"router"
:
{
"base"
:
"./"
},
...
...
vedio/mixins/share.js
View file @
a9580391
export
default
{
data
()
{
return
{
share
:
{
title
:
'更多
好剧,等你来看'
,
imageUrl
:
'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png'
,
path
:
'/pages/loading?shareId='
}
}
},
onShareAppMessage
(
res
)
{
//发送给朋友
return
{
title
:
this
.
share
.
title
,
imageUrl
:
this
.
share
.
imageUrl
,
path
:
this
.
share
.
path
,
}
},
onShareTimeline
(
res
)
{
//分享到朋友圈
return
{
title
:
this
.
share
.
title
,
imageUrl
:
this
.
share
.
imageUrl
,
path
:
this
.
share
.
path
,
}
},
export
default
{
data
()
{
return
{
share
:
{
title
:
'更多
小说,等你来看'
,
imageUrl
:
'https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/ic_movie.png'
,
path
:
'/pages/loading?shareId='
}
}
},
onShareAppMessage
(
res
)
{
//发送给朋友
return
{
title
:
this
.
share
.
title
,
imageUrl
:
this
.
share
.
imageUrl
,
path
:
this
.
share
.
path
,
}
},
onShareTimeline
(
res
)
{
//分享到朋友圈
return
{
title
:
this
.
share
.
title
,
imageUrl
:
this
.
share
.
imageUrl
,
path
:
this
.
share
.
path
,
}
},
}
\ No newline at end of file
vedio/pages.json
View file @
a9580391
{
"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"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"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"
}
}
],
//
分包配置
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"vipPay/vipPay"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#2196f3"
,
"navigationBarTextStyle"
:
"black"
}
}]
},
{
"root"
:
"pagesC"
,
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
{
"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"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"path"
:
"pages/index/index"
,
"style"
:
{
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#ffffff"
,
"navigationBarTextStyle"
:
"#000000"
}
},
{
"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"
}
}
],
//
分包配置
"subPackages"
:
[{
"root"
:
"pagesA"
,
"pages"
:
[{
"path"
:
"vipPay/vipPay"
,
"style"
:
{
"backgroundColor"
:
"#000000"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
,
"usingComponents "
:
{
"video-player"
:
"ext://industry/video-player"
}
}
}]
},
{
"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"
}
}]
}
],
//
分包预载配置
"preloadRule"
:
{
//
当我们进入了pages/home页面以后就会预下载pagesA分包
"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"
:
{
"backgroundColor"
:
"#f5f5f5"
,
"navigationStyle"
:
"default"
,
"app-plus"
:
{
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
}
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#2196f3"
,
"navigationBarTextStyle"
:
"black"
}
}]
},
{
"root"
:
"pagesC"
,
"pages"
:
[{
"path"
:
"ttvideo/ttVideoDetail"
,
"style"
:
{
"backgroundColor"
:
"#000000"
,
"navigationStyle"
:
"default"
,
"navigationBarBackgroundColor"
:
"#000000"
,
"navigationBarTextStyle"
:
"#ffffff"
,
"usingComponents "
:
{
"video-player"
:
"ext://industry/video-player"
}
}
}]
},
{
"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"
}
}]
}
],
//
分包预载配置
"preloadRule"
:
{
//
当我们进入了pages/home页面以后就会预下载pagesA分包
"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"
:
{
"backgroundColor"
:
"#f5f5f5"
,
"navigationStyle"
:
"default"
,
"app-plus"
:
{
"bounce"
:
"none"
,
"scrollIndicator"
:
"none"
}
},
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[{
"name"
:
""
,
//模式名称
"path"
:
""
,
//启动页面,必选
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}]
}
}
\ No newline at end of file
vedio/pages/loading.vue
View file @
a9580391
...
...
@@ -5,7 +5,7 @@
<view
style=
"color: #A231EF;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;"
>
欢迎使用
</view>
<view
style=
"bottom: 0;position: absolute;"
>
<image
style=
"width: 540rpx;height: 644rpx;display: flex;align-items: center;margin-bottom: 30%;"
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/bg_splash.png"
mode=
"scaleToFill"
>
src=
"https://mints-pkg.oss-cn-beijing.aliyuncs.com/pkg/img/b
ook_b
g_splash.png"
mode=
"scaleToFill"
>
</image>
</view>
...
...
@@ -40,6 +40,7 @@
},
onLoad
(
options
)
{
this
.
tips1
=
options
.
tips1
this
.
appName
=
'幻墨小说阁'
},
onShow
(
options
)
{
...
...
vedio/pages/recommend/recommendVideo.vue
View file @
a9580391
This diff is collapsed.
Click to expand it.
vedio/pagesC/ttvideo/ttVideoDetail.vue
View file @
a9580391
This diff is collapsed.
Click to expand it.
vedio/pagesD/dotRecord/dotRecord.vue
View file @
a9580391
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
看点记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
class=
"flex m-20 pd-20"
style=
"background-color:white;border-radius:10rpx;"
>
<image
style=
"margin: auto 10rpx;width: 60rpx;height: 60rpx;"
src=
"../../static/ic_coin.png"
>
</image>
<view
class=
"flex1 ml-10"
>
<view
class=
"mt-10"
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
remark
}}
</view>
<view
class=
"mt-10"
style=
"font-size: 26rpx;color: darkgray;"
>
{{
item
.
time
}}
</view>
</view>
<view
style=
"margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"
>
{{
'+'
+
item
.
subValue
+
'
看点'
}}
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
formateTime
}
from
"@/utils/utils.js"
export
default
{
name
:
'dotRecord'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
myFormateTime
(
time
)
{
return
formateTime
(
time
,
'yyyy-MM-dd hh:mm:ss'
)
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/assetsRecords/add'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
background-color
:
whitesmoke
;
}
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
书豆记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
class=
"flex m-20 pd-20"
style=
"background-color:white;border-radius:10rpx;"
>
<image
style=
"margin: auto 10rpx;width: 60rpx;height: 60rpx;"
src=
"../../static/ic_coin.png"
>
</image>
<view
class=
"flex1 ml-10"
>
<view
class=
"mt-10"
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
remark
}}
</view>
<view
class=
"mt-10"
style=
"font-size: 26rpx;color: darkgray;"
>
{{
item
.
time
}}
</view>
</view>
<view
style=
"margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"
>
{{
'+'
+
item
.
subValue
+
'
书豆'
}}
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
formateTime
}
from
"@/utils/utils.js"
export
default
{
name
:
'dotRecord'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
myFormateTime
(
time
)
{
return
formateTime
(
time
,
'yyyy-MM-dd hh:mm:ss'
)
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/assetsRecords/add'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
background-color
:
whitesmoke
;
}
</
style
>
\ No newline at end of file
vedio/pagesD/useDotRecord/useDotRecord.vue
View file @
a9580391
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
消费记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
class=
"flex m-20 pd-20"
style=
"background-color:white;border-radius:10rpx;"
>
<image
style=
"margin: auto 10rpx;width: 60rpx;height: 60rpx;"
src=
"../../static/ic_shop.png"
>
</image>
<view
class=
"flex1 ml-10"
>
<view
class=
"mt-10"
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
remark
}}
</view>
<view
class=
"mt-10"
style=
"font-size: 26rpx;color: darkgray;"
>
{{
item
.
time
}}
</view>
</view>
<view
style=
"margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"
>
{{
'-'
+
item
.
subValue
+
'
看点'
}}
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
formateTime
}
from
"@/utils/utils.js"
export
default
{
name
:
'useDotRecord'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
myFormateTime
(
time
)
{
return
formateTime
(
time
,
'yyyy-MM-dd hh:mm:ss'
)
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/assetsRecords/sub'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
background-color
:
whitesmoke
;
}
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
消费记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
class=
"flex m-20 pd-20"
style=
"background-color:white;border-radius:10rpx;"
>
<image
style=
"margin: auto 10rpx;width: 60rpx;height: 60rpx;"
src=
"../../static/ic_shop.png"
>
</image>
<view
class=
"flex1 ml-10"
>
<view
class=
"mt-10"
style=
"font-size: 28rpx;color: black;"
>
{{
item
.
remark
}}
</view>
<view
class=
"mt-10"
style=
"font-size: 26rpx;color: darkgray;"
>
{{
item
.
time
}}
</view>
</view>
<view
style=
"margin:auto 10rpx auto auto;font-size: 36rpx;color: steelblue;"
>
{{
'-'
+
item
.
subValue
+
'
书豆'
}}
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
formateTime
}
from
"@/utils/utils.js"
export
default
{
name
:
'useDotRecord'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
myFormateTime
(
time
)
{
return
formateTime
(
time
,
'yyyy-MM-dd hh:mm:ss'
)
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/assetsRecords/sub'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
}
}
};
</
script
>
<
style
lang=
"scss"
>
.body
{
background-color
:
whitesmoke
;
}
</
style
>
\ No newline at end of file
vedio/pagesD/watchRecord/watchRecord.vue
View file @
a9580391
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
观看记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:defaultPageNo=
"1"
:defaultPageSize=
"500"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;"
>
最近
观看
</view>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;"
>
<view
style=
"display: flex;align-items: center;"
@
click=
"handleInfo(item)"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"display: flex;flex-direction: column;margin-left: 20rpx;"
>
<view
style=
"font-size: 30rpx;color: black;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
观看至第
{{
item
.
seeIndex
}}
集
</view>
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;"
>
<view
style=
"display: flex;flex-direction: column;"
>
<image
v-if=
"item.collect==0"
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_0.png"
></image>
<image
v-else
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_1.png"
></image>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;"
>
追剧
</view>
</view>
</view>
</view>
</view>
</z-paging>
</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
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
queryList
(
page
,
size
)
{
this
.
post
({
<
template
>
<view
class=
"body"
>
<!--
<status-title
:showBack=
"true"
>
阅读记录
</status-title>
-->
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:defaultPageNo=
"1"
:defaultPageSize=
"500"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;"
>
最近
阅读
</view>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
style=
"display: flex;flex-direction: row;justify-content:space-between;margin: 20rpx;"
>
<view
style=
"display: flex;align-items: center;"
@
click=
"handleInfo(item)"
>
<image
class=
"img"
:src=
"item.coverImage"
mode=
"aspectFill"
></image>
<view
style=
"display: flex;flex-direction: column;margin-left: 20rpx;"
>
<view
style=
"font-size: 30rpx;color: black;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
阅读至第
{{
item
.
seeIndex
}}
集
</view>
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;"
>
<view
style=
"display: flex;flex-direction: column;"
>
<image
v-if=
"item.collect==0"
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_0.png"
></image>
<image
v-else
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_1.png"
></image>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;"
>
追剧
</view>
</view>
</view>
</view>
</view>
</z-paging>
</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
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/vedio/history'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
handleInfo
(
item
)
{
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
handleInfo
(
item
)
{
navigateTo
(
`/pagesC/ttvideo/ttVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
))
+
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
},
handleXing
(
item
)
{
var
that
=
this
;
//0未收藏,1收藏
if
(
item
.
collect
==
0
)
{
this
.
post
({
url
:
'/vedio/collect'
,
data
:
{
vedioId
:
item
.
vedioId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
else
{
this
.
post
({
url
:
'/vedio/cancelCollect'
,
data
:
{
vedioId
:
item
.
vedioId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
}
}
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
.body
{
background-color
:
whitesmoke
;
}
.img
{
position
:
relative
;
border-radius
:
10rpx
;
width
:
180rpx
;
height
:
240rpx
;
}
'&tt_album_id='
+
item
.
douyinAlbumId
+
'&tt_episode_id='
+
item
.
douyinEpisodeId
);
},
handleXing
(
item
)
{
var
that
=
this
;
//0未收藏,1收藏
if
(
item
.
collect
==
0
)
{
this
.
post
({
url
:
'/vedio/collect'
,
data
:
{
vedioId
:
item
.
vedioId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
else
{
this
.
post
({
url
:
'/vedio/cancelCollect'
,
data
:
{
vedioId
:
item
.
vedioId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
}
}
};
</
script
>
<
style
lang=
"scss"
>
@import
'@/scss/uni.scss'
;
.body
{
background-color
:
whitesmoke
;
}
.img
{
position
:
relative
;
border-radius
:
10rpx
;
width
:
180rpx
;
height
:
240rpx
;
}
</
style
>
\ No newline at end of file
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