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
Expand all
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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
This diff is collapsed.
Click to expand it.
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