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
912f56cb
Commit
912f56cb
authored
Dec 09, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新短剧播放器
parent
7cfbc1cb
Changes
17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
1104 additions
and
425 deletions
+1104
-425
App.vue
vedio/App.vue
+28
-20
apiRequest.js
vedio/common/apiRequest.js
+79
-0
playerManager.js
vedio/common/playerManager.js
+187
-18
charge-dialog.vue
vedio/components/charge-dialog/charge-dialog.vue
+547
-0
main.js
vedio/main.js
+6
-1
manifest.json
vedio/manifest.json
+3
-17
common.js
vedio/mixins/common.js
+182
-179
turn.js
vedio/mixins/turn.js
+0
-58
pages.json
vedio/pages.json
+17
-22
home.vue
vedio/pages/home.vue
+16
-22
index.vue
vedio/pages/index/index.vue
+12
-24
my.vue
vedio/pages/my/my.vue
+2
-12
follow.vue
vedio/pages/recommend/follow.vue
+5
-5
recommend.vue
vedio/pages/recommend/recommend.vue
+7
-7
recommendVideo.vue
vedio/pages/recommend/recommendVideo.vue
+4
-4
watchRecord.vue
vedio/pagesD/watchRecord/watchRecord.vue
+9
-13
readme.md
vedio/readme.md
+0
-23
No files found.
vedio/App.vue
View file @
912f56cb
...
@@ -7,19 +7,8 @@
...
@@ -7,19 +7,8 @@
// #endif
// #endif
export
default
{
export
default
{
onLoad
()
{
usingComponents
:
{
// #ifdef MP-WEIXIN
"charge-dialog"
:
"/components/charge-dialog/charge-dialog"
,
playletPlugin
.
onPageLoad
(
this
.
_onPlayerLoad
.
bind
(
this
))
playletPlugin
.
getShareParams
().
then
(
res
=>
{
//关于extParam的处理,需要先做decodeURIComponent之后才能得到原值
const
extParam
=
decodeURIComponent
(
res
.
extParam
)
// 如果设置了withShareTicket为true,可通过文档的方法获取更多信息
// https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html
const
enterOptions
=
wx
.
getEnterOptionsSync
()
}).
catch
(
err
=>
{
console
.
log
(
'getLaunch options query err-app-vue'
,
err
)
})
// #endif
},
},
onLaunch
:
function
(
options
)
{
onLaunch
:
function
(
options
)
{
// #ifdef APP-PLUS
// #ifdef APP-PLUS
...
@@ -61,14 +50,26 @@
...
@@ -61,14 +50,26 @@
console
.
log
(
e
);
console
.
log
(
e
);
}
}
// checkUpdate(this);
uni
.
getSystemInfo
({
},
success
:
(
res
=>
{
_onPlayerLoad
(
info
)
{
this
.
globalData
.
clientHeight
=
res
.
windowHeight
-
65
console
.
log
(
'App-onPlayerLoad'
,
info
.
playerId
,
info
)
})
});
// #ifdef MP-WEIXIN
// #ifdef MP-WEIXIN
const
playerManager
=
new
PlayerManager
()
playletPlugin
.
onPageLoad
(
this
.
_onPlayerLoad
.
bind
(
this
))
playerManager
.
_onPlayerLoad
(
info
)
playletPlugin
.
getShareParams
().
then
(
res
=>
{
//关于extParam的处理,需要先做decodeURIComponent之后才能得到原值
const
extParam
=
decodeURIComponent
(
res
.
extParam
)
// 如果设置了withShareTicket为true,可通过文档的方法获取更多信息
// https://developers.weixin.qq.com/miniprogram/dev/framework/open-ability/share.html
const
enterOptions
=
wx
.
getEnterOptionsSync
()
}).
catch
(
err
=>
{
console
.
log
(
'getLaunch options query err-app-vue'
,
err
)
})
// #endif
// #endif
// checkUpdate(this);
},
},
onShow
:
function
(
options
)
{
onShow
:
function
(
options
)
{
this
.
globalData
.
resetLogin
=
true
this
.
globalData
.
resetLogin
=
true
...
@@ -77,7 +78,13 @@
...
@@ -77,7 +78,13 @@
this
.
globalData
.
resetLogin
=
false
this
.
globalData
.
resetLogin
=
false
},
},
methods
:
{
methods
:
{
_onPlayerLoad
(
info
)
{
console
.
log
(
'App-onPlayerLoad'
,
info
.
playerId
,
info
)
// #ifdef MP-WEIXIN
const
playerManager
=
new
PlayerManager
()
playerManager
.
_onPlayerLoad
(
info
)
// #endif
},
},
},
globalData
:
{
globalData
:
{
resetLogin
:
false
,
resetLogin
:
false
,
...
@@ -89,6 +96,7 @@
...
@@ -89,6 +96,7 @@
h5Url
:
'https://api.mints-id.com/index.html'
,
h5Url
:
'https://api.mints-id.com/index.html'
,
baseUrl
:
'https://api.mints-tech.cn/camera-api/miniApi'
,
baseUrl
:
'https://api.mints-tech.cn/camera-api/miniApi'
,
titleButtonWidth
:
38
,
titleButtonWidth
:
38
,
clientHeight
:
0
,
token
:
''
,
token
:
''
,
userId
:
0
,
userId
:
0
,
inviteUId
:
''
,
inviteUId
:
''
,
...
...
vedio/common/apiRequest.js
0 → 100644
View file @
912f56cb
import
{
loading
}
from
'../utils/fun.js'
;
function
req
(
options
)
{
let
{
showLoading
,
url
,
data
,
auth
}
=
options
;
const
app
=
getApp
()
const
success
=
options
?.
success
;
const
fail
=
options
?.
fail
;
const
header
=
options
?.
header
??
{};
Object
.
assign
(
header
,
{
token
:
uni
.
getStorageSync
(
'token'
),
os
:
wx
.
getSystemInfoSync
().
platform
,
pkgName
:
app
.
globalData
.
pkgName
})
showLoading
&&
loading
.
show
();
options
=
Object
.
assign
(
options
,
{
url
:
`
${
app
.
globalData
.
baseUrl
}${
url
}
`
,
header
,
data
,
success
:
(
res
)
=>
{
switch
(
res
.
data
.
status
)
{
case
200
:
if
(
success
)
{
success
(
res
.
data
);
}
break
;
default
:
if
(
fail
)
{
fail
(
res
.
data
.
message
);
}
break
;
}
},
fail
:
(
e
)
=>
{
if
(
fail
)
{
fail
(
e
);
}
},
complete
:
()
=>
{
showLoading
&&
loading
.
hide
();
}
})
uni
.
request
(
options
);
}
function
apiPOST
(
options
)
{
options
=
Object
.
assign
({
showLoading
:
false
},
options
,
{
method
:
'POST'
})
req
(
options
);
}
function
apiGET
(
options
)
{
options
=
Object
.
assign
({
showLoading
:
false
},
options
,
{
method
:
'GET'
})
req
(
options
);
}
module
.
exports
=
{
apiGET
,
apiPOST
}
\ No newline at end of file
vedio/common/playerManager.js
View file @
912f56cb
import
{
apiPOST
}
from
"./apiRequest"
;
var
plugin
=
requirePlugin
(
"playlet-plugin"
);
var
plugin
=
requirePlugin
(
"playlet-plugin"
);
// 点击按钮触发此函数跳转到播放器页面
// 点击按钮触发此函数跳转到播放器页面
function
navigateToPlayer
(
obj
)
{
function
navigateToPlayer
(
obj
)
{
// 下面的${dramaId}变量,需要替换成小程序管理后台的媒资管理上传的剧目的dramaId,变量${srcAppid}是提审方appid,变量${serialNo}是某一集,变量${extParam}是扩展字段,可通过
// 下面的${dramaId}变量,需要替换成小程序管理后台的媒资管理上传的剧目的dramaId,变量${srcAppid}是提审方appid,变量${serialNo}是某一集,变量${extParam}是扩展字段,可通过
const
{
const
{
extParam
,
extParam
,
d
ramaId
,
wechatD
ramaId
,
s
rcAppid
,
wechatS
rcAppid
,
se
rialNo
se
eIndex
}
=
obj
}
=
obj
wx
.
navigateTo
({
wx
.
navigateTo
({
url
:
`plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=
${
dramaId
}
&srcAppid=
${
srcAppid
}
&serialNo=
${
serialNo
}
&extParam=
${
extParam
||
''
}
`
url
:
`plugin-private://wx94a6522b1d640c3b/pages/playlet/playlet?dramaId=
${
wechatDramaId
}
&srcAppid=
${
wechatSrcAppid
}
&serialNo=
${
seeIndex
}
&extParam=
${
extParam
||
''
}
`
})
})
}
}
const
proto
=
{
const
proto
=
{
_onPlayerLoad
(
info
)
{
_onPlayerLoad
(
info
)
{
const
pm
=
plugin
.
PlayletManager
.
getPageManager
(
info
.
playerId
)
const
pm
=
plugin
.
PlayletManager
.
getPageManager
(
info
.
playerId
)
this
.
pm
=
pm
this
.
pm
=
pm
// 上传剧集信息
this
.
pm_report
()
// encryptedData是经过开发者后台加密后(不要在前端加密)的数据,具体实现见下面的加密章节
// encryptedData是经过开发者后台加密后(不要在前端加密)的数据,具体实现见下面的加密章节
this
.
getEncryptData
({
this
.
getEncryptData
({
serialNo
:
info
.
serialNo
serialNo
:
info
.
serialNo
...
@@ -26,7 +36,7 @@ const proto = {
...
@@ -26,7 +36,7 @@ const proto = {
freeList
:
[{
freeList
:
[{
start_serial_no
:
1
,
start_serial_no
:
1
,
end_serial_no
:
10
end_serial_no
:
10
}]
,
// 1~10集是免费剧集
}]
// 1~10集是免费剧集
})
})
})
})
pm
.
onCheckIsCanPlay
(
this
.
onCheckIsCanPlay
)
pm
.
onCheckIsCanPlay
(
this
.
onCheckIsCanPlay
)
...
@@ -53,21 +63,55 @@ const proto = {
...
@@ -53,21 +63,55 @@ const proto = {
// extParam除了可以通过在path传参,还可以通过下面的接口设置
// extParam除了可以通过在path传参,还可以通过下面的接口设置
pm
.
setExtParam
(
'hellotest'
)
pm
.
setExtParam
(
'hellotest'
)
// 分享部分end
// 分享部分end
// 参考文档章节“数据上报”
pm
.
onDataReport
((
obj
)
=>
{
const
{
dramaId
,
serialNo
}
=
this
.
pm
.
getInfo
()
//分享
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
SHARE
)
{
console
.
log
(
'分享'
,
obj
)
this
.
pm_share
()
}
//点赞
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
LIKE
)
{
console
.
log
(
'点赞'
,
obj
)
this
.
pm_like
()
}
//取消点赞
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
UNLIKE
)
{
console
.
log
(
'取消点赞'
,
obj
)
this
.
pm_unlike
()
}
//在追
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
FAV
)
{
console
.
log
(
'在追'
,
obj
)
this
.
pm_collect
()
}
//取消在追
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
UNFAV
)
{
console
.
log
(
'取消在追'
,
obj
)
this
.
pm_uncollect
()
}
//切换剧集CHANGE_SERIAL
// VIDEO_PLAY 播放事件
if
(
obj
.
event
===
plugin
.
REPORT_DATA_EVENTS
.
CHANGE_SERIAL
)
{
console
.
log
(
'切换剧集'
,
obj
)
}
})
},
},
onCheckIsCanPlay
(
param
)
{
onCheckIsCanPlay
(
param
)
{
// TODO: 碰到不可以解锁的剧集,会触发此事件,这里可以进行扣币解锁逻辑,如果用户无足够的币,可调用下面的this.isCanPlay设置
// TODO: 碰到不可以解锁的剧集,会触发此事件,这里可以进行扣币解锁逻辑,如果用户无足够的币,可调用下面的this.isCanPlay设置
console
.
log
(
'onCheckIsCanPlay param'
,
param
)
console
.
log
(
'onCheckIsCanPlay param'
,
param
)
var
serialNo
=
param
.
serialNo
var
serialNo
=
param
.
serialNo
this
.
getEncryptData
({
// 解锁剧集
serialNo
:
serialNo
this
.
unlockSerial
()
}).
then
(
res
=>
{
// encryptedData是后台加密后的数据,具体实现见下面的加密章节
this
.
pm
.
isCanPlay
({
data
:
res
.
encryptedData
,
serialNo
:
serialNo
,
})
})
},
},
getEncryptData
(
obj
)
{
getEncryptData
(
obj
)
{
const
{
const
{
...
@@ -78,13 +122,138 @@ const proto = {
...
@@ -78,13 +122,138 @@ const proto = {
srcAppid
,
srcAppid
,
dramaId
dramaId
}
=
this
.
pm
.
getInfo
()
}
=
this
.
pm
.
getInfo
()
console
.
log
(
'getEncryptData start'
,
srcAppid
,
dramaId
,
serialNo
)
console
.
log
(
'getEncryptData start'
,
srcAppid
,
dramaId
,
serialNo
)
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
resolve
({
apiPOST
({
encryptedData
:
''
// TODO: 此参数需从后台接口获取到
url
:
'/vedio/getIndexList'
,
data
:
{
dramaId
},
success
:
(
res
)
=>
{
resolve
({
encryptedData
:
res
.
data
.
vedioMsg
.
wechatEncryptedData
,
start_serial_no
:
res
.
data
.
vedioMsg
.
wechatFreeList
[
0
]
.
start_serial_no
,
end_serial_no
:
res
.
data
.
vedioMsg
.
wechatFreeList
[
0
]
.
end_serial_no
})
this
.
pm_report
()
},
fail
:
(
res
)
=>
{
reject
(
res
.
data
.
message
)
}
})
})
})
})
},
pm_collect
()
{
const
{
dramaId
,
}
=
this
.
pm
.
getInfo
()
apiPOST
({
url
:
'/vedio/collect'
,
data
:
{
dramaId
}
});
},
},
pm_uncollect
()
{
const
{
dramaId
,
}
=
this
.
pm
.
getInfo
()
apiPOST
({
url
:
'/vedio/cancelCollect'
,
data
:
{
dramaId
}
});
},
// 上传播放剧集信息
pm_report
()
{
const
{
dramaId
,
serialNo
}
=
this
.
pm
.
getInfo
()
apiPOST
({
url
:
'/vedio/reportIndex'
,
data
:
{
dramaId
,
vedioIndex
:
serialNo
},
success
:
({
data
})
=>
{},
});
},
// 解锁剧集
unlockSerial
()
{
const
{
dramaId
,
serialNo
}
=
this
.
pm
.
getInfo
()
apiPOST
({
url
:
'/vedio/unlock'
,
data
:
{
dramaId
,
num
:
serialNo
},
success
:
({
data
})
=>
{
switch
(
data
.
code
)
{
case
200
:
this
.
getEncryptData
({
serialNo
:
serialNo
,
}).
then
(
res
=>
{
this
.
pm
.
isCanPlay
({
data
:
res
.
encryptedData
,
serialNo
:
serialNo
,
})
})
break
case
301
:
this
.
getEncryptData
({
serialNo
:
serialNo
,
}).
then
(
res
=>
{
this
.
pm
.
isCanPlay
({
data
:
res
.
encryptedData
,
serialNo
:
serialNo
,
})
})
break
case
302
:
this
.
getEncryptData
({
serialNo
:
serialNo
,
}).
then
(
res
=>
{
this
.
pm
.
isCanPlay
({
data
:
res
.
encryptedData
,
serialNo
:
serialNo
,
})
})
break
case
303
:
this
.
getEncryptData
({
serialNo
:
serialNo
,
}).
then
(
res
=>
{
this
.
pm
.
isCanPlay
({
data
:
res
.
encryptedData
,
serialNo
:
serialNo
,
})
})
// 自动弹出充值弹窗
this
.
pm
.
showChargeDialog
()
break
}
},
});
}
}
}
function
PlayerManager
()
{
function
PlayerManager
()
{
...
...
vedio/components/charge-dialog/charge-dialog.vue
0 → 100644
View file @
912f56cb
This diff is collapsed.
Click to expand it.
vedio/main.js
View file @
912f56cb
...
@@ -13,6 +13,11 @@ import './filters'
...
@@ -13,6 +13,11 @@ import './filters'
plus
.
screen
.
lockOrientation
(
'portrait-primary'
);
plus
.
screen
.
lockOrientation
(
'portrait-primary'
);
// #endif
// #endif
// #ifdef MP-WEIXIN
import
chargedialog
from
'./components/charge-dialog/charge-dialog.vue'
Vue
.
component
(
'charge-dialog'
,
chargedialog
)
// #endif
// let v = new vconsole();
// let v = new vconsole();
// #ifndef VUE3
// #ifndef VUE3
import
Vue
from
'vue'
import
Vue
from
'vue'
...
@@ -39,4 +44,4 @@ export function createApp() {
...
@@ -39,4 +44,4 @@ export function createApp() {
app
app
}
}
}
}
// #endif
// #endif
\ No newline at end of file
vedio/manifest.json
View file @
912f56cb
...
@@ -144,14 +144,14 @@
...
@@ -144,14 +144,14 @@
},
},
"optimization"
:
{
"optimization"
:
{
"subPackages"
:
true
"subPackages"
:
true
},
},
"plugins"
:
{
"plugins"
:
{
"playlet-plugin"
:
{
"playlet-plugin"
:
{
"version"
:
"latest"
,
"version"
:
"latest"
,
"provider"
:
"wx94a6522b1d640c3b"
,
"provider"
:
"wx94a6522b1d640c3b"
,
"genericsImplementation"
:
{
"genericsImplementation"
:
{
"playlet"
:
{
"playlet"
:
{
"charge-dialog"
:
"/components/"
"charge-dialog"
:
"/components/
charge-dialog/charge-dialog
"
}
}
}
}
}
}
...
@@ -225,18 +225,4 @@
...
@@ -225,18 +225,4 @@
"enable"
:
false
"enable"
:
false
}
}
}
}
}
}
//
"devServer"
:
{
\ No newline at end of file
//
"proxy"
:
{
//
"/https://nft-web.tech-mints.com"
:
{
//
"target"
:
"https://nft-web.tech-mints.com"
,
//
"changeOrgin"
:
true
,
//是否跨域
//
"seure"
:
true
,
//是否支持https协议的代理
//
"pathRewrite"
:
{
//
"^/https://nft-web.tech-mints.com"
:
"/"
,
//
"^/zs-ui/hap/https://nft-web.tech-mints.com"
:
"/"
//
}
//
}
//
},
//
"https"
:
true
//
}
\ No newline at end of file
vedio/mixins/common.js
View file @
912f56cb
import
{
import
{
navigateTo
,
navigateTo
,
redirectTo
,
redirectTo
,
loading
,
loading
,
message
,
message
,
confirm
,
confirm
,
alert
alert
}
from
'../utils/fun.js'
;
}
from
'../utils/fun.js'
;
const
app
=
getApp
();
const
app
=
getApp
();
export
default
{
export
default
{
data
()
{
data
()
{
return
{
return
{
xhrPool
:
new
Set
(),
xhrPool
:
new
Set
(),
bottomSafePadding
:
app
.
globalData
.
bottomSafePadding
,
// bottomSafePadding: app.globalData.bottomSafePadding,
options
:
{},
options
:
{},
auth
:
false
,
// 登录验证
auth
:
false
,
// 登录验证
paying
:
false
,
// 支付按钮状态
paying
:
false
,
// 支付按钮状态
};
};
},
},
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
options
=
options
;
this
.
options
=
options
;
},
},
onShow
()
{
onShow
()
{
this
.
loadData
();
this
.
loadData
();
},
},
onHide
()
{
onHide
()
{
if
(
this
.
xhrPool
.
size
)
{
if
(
this
.
xhrPool
&&
this
.
xhrPool
.
size
)
{
this
.
xhrPool
.
forEach
((
requestTask
)
=>
{
this
.
xhrPool
.
forEach
((
requestTask
)
=>
{
requestTask
.
abort
();
requestTask
.
abort
();
})
})
}
}
},
},
methods
:
{
methods
:
{
authTo
(
url
)
{
//登录校验
authTo
(
url
)
{
//登录校验
if
(
app
.
globalData
.
userInfo
)
{
if
(
app
.
globalData
.
userInfo
)
{
navigateTo
(
url
);
navigateTo
(
url
);
}
else
{
}
else
{
// navigateTo('user/login', {
// navigateTo('user/login', {
// redirect: url
// redirect: url
// });
// });
}
}
},
},
authToNs
(
url
)
{
//登录校验不保留当前页面
authToNs
(
url
)
{
//登录校验不保留当前页面
if
(
app
.
globalData
.
userInfo
)
{
if
(
app
.
globalData
.
userInfo
)
{
redirectTo
(
url
);
redirectTo
(
url
);
}
else
{
}
else
{
// navigateTo('user/login', {
// navigateTo('user/login', {
// redirect: url
// redirect: url
// });
// });
}
}
},
},
loadData
()
{},
loadData
()
{},
startPay
()
{
startPay
()
{
loading
.
show
();
loading
.
show
();
this
.
paying
=
true
;
this
.
paying
=
true
;
},
},
stopPay
()
{
stopPay
()
{
loading
.
hide
();
loading
.
hide
();
this
.
paying
=
false
;
this
.
paying
=
false
;
},
},
/**
/**
* @param {Object} url 接口请求地址
* @param {Object} url 接口请求地址
* @param {Object} method 接口请求方式
* @param {Object} method 接口请求方式
* @param {Object} data 接口请求参数
* @param {Object} data 接口请求参数
*/
*/
$http
(
url
,
method
,
data
=
{},
showLoading
=
false
)
{
$http
(
url
,
method
,
data
=
{},
showLoading
=
false
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
[
method
.
toLowerCase
()]({
this
[
method
.
toLowerCase
()]({
url
:
url
,
url
:
url
,
data
:
data
,
data
:
data
,
showLoading
:
showLoading
,
showLoading
:
showLoading
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
resolve
(
res
)
resolve
(
res
)
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
reject
(
e
)
reject
(
e
)
}
}
});
});
})
})
},
},
login
()
{
login
()
{
// navigateTo('user/login');
// navigateTo('user/login');
// let redirect = this.$scope.$page.fullPath.replace('/pages', '');
// let redirect = this.$scope.$page.fullPath.replace('/pages', '');
// console.log(redirect)
// console.log(redirect)
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
// navigateTo('user/login?redirect=' + encodeURIComponent(redirect));
},
},
logout
()
{
logout
()
{
app
.
globalData
.
userInfo
=
null
;
app
.
globalData
.
userInfo
=
null
;
uni
.
removeStorageSync
(
'token'
);
uni
.
removeStorageSync
(
'token'
);
},
},
put
(
options
)
{
put
(
options
)
{
options
=
Object
.
assign
({
options
=
Object
.
assign
({
showLoading
:
true
showLoading
:
true
},
options
,
{
},
options
,
{
method
:
'PUT'
method
:
'PUT'
})
})
this
.
req
(
options
);
this
.
req
(
options
);
},
},
post
(
options
)
{
post
(
options
)
{
options
=
Object
.
assign
({
options
=
Object
.
assign
({
showLoading
:
true
showLoading
:
true
},
options
,
{
},
options
,
{
method
:
'POST'
method
:
'POST'
})
})
this
.
req
(
options
);
this
.
req
(
options
);
},
},
get
(
options
)
{
get
(
options
)
{
options
=
Object
.
assign
({
options
=
Object
.
assign
({
showLoading
:
false
showLoading
:
false
},
options
,
{
},
options
,
{
method
:
'GET'
method
:
'GET'
})
})
this
.
req
(
options
);
this
.
req
(
options
);
},
},
req
(
options
)
{
req
(
options
)
{
let
{
let
{
showLoading
,
showLoading
,
url
,
url
,
data
,
data
,
auth
auth
}
=
options
;
}
=
options
;
const
success
=
options
?.
success
;
const
success
=
options
?.
success
;
const
fail
=
options
?.
fail
;
const
fail
=
options
?.
fail
;
const
header
=
options
?.
header
??
{};
const
header
=
options
?.
header
??
{};
showLoading
&&
loading
.
show
();
showLoading
&&
loading
.
show
();
let
requestTask
;
let
requestTask
;
Object
.
assign
(
header
,
{
Object
.
assign
(
header
,
{
token
:
uni
.
getStorageSync
(
'token'
),
token
:
uni
.
getStorageSync
(
'token'
),
os
:
wx
.
getSystemInfoSync
().
platform
,
os
:
wx
.
getSystemInfoSync
().
platform
,
// token: 'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997',
pkgName
:
app
.
globalData
.
pkgName
pkgName
:
app
.
globalData
.
pkgName
})
})
options
=
Object
.
assign
(
options
,
{
options
=
Object
.
assign
(
options
,
{
url
:
`
${
app
.
globalData
.
baseUrl
}${
url
}
`
,
url
:
`
${
app
.
globalData
.
baseUrl
}${
url
}
`
,
header
,
header
,
data
,
data
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
showLoading
&&
loading
.
hide
();
showLoading
&&
loading
.
hide
();
switch
(
res
.
data
.
status
)
{
switch
(
res
.
data
.
status
)
{
case
200
:
case
200
:
if
(
success
)
{
if
(
success
)
{
success
(
res
.
data
);
success
(
res
.
data
);
}
}
break
;
break
;
default
:
default
:
if
(
fail
)
{
if
(
fail
)
{
fail
(
res
.
data
.
message
);
fail
(
res
.
data
.
message
);
}
}
message
.
notify
(
res
.
data
.
message
);
message
.
notify
(
res
.
data
.
message
);
break
;
break
;
}
}
},
},
fail
:
(
e
)
=>
{
fail
:
(
e
)
=>
{
message
.
notify
(
'服务器开小差了'
);
message
.
notify
(
'服务器开小差了'
);
// alert({
// alert({
// content: JSON.stringify(e)
// content: JSON.stringify(e)
// });
// });
if
(
fail
)
{
if
(
fail
)
{
fail
(
e
);
fail
(
e
);
}
}
},
},
complete
:
()
=>
{
complete
:
()
=>
{
if
(
this
.
xhrPool
)
{
this
.
xhrPool
.
delete
(
requestTask
)
this
.
xhrPool
.
delete
(
requestTask
)
}
}
})
}
})
requestTask
=
uni
.
request
(
options
);
this
.
xhrPool
.
add
(
requestTask
)
if
(
this
.
xhrPool
)
{
}
requestTask
=
uni
.
request
(
options
);
}
this
.
xhrPool
.
add
(
requestTask
)
};
}
}
}
};
\ No newline at end of file
vedio/mixins/turn.js
deleted
100644 → 0
View file @
7cfbc1cb
import
AlmostLottery
from
'@/uni_modules/almost-lottery/components/almost-lottery/almost-lottery.vue'
;
export
default
{
data
()
{
return
{
loading
:
true
,
// 以下是转盘配置相关数据
lotteryConfig
:
{
// 抽奖转盘的整体尺寸,单位rpx
lotterySize
:
700
,
// 抽奖按钮的尺寸,单位rpx
action
:
{
width
:
188
,
height
:
228
,
top
:
228
-
188
,
padding
:
85
},
imgCircled
:
false
,
},
// 转盘外环图,如有需要,请参考替换为自己的设计稿
lotteryBg
:
require
(
'@/static/turn/zp.png'
),
// // 抽奖按钮图
actionBg
:
require
(
'@/static/turn/point.png'
),
// 以下是奖品配置数据
// 奖品数据
prizeList
:
[
],
// 中奖下标
prizeIndex
:
-
1
,
// 是否正在抽奖中,避免重复触发
prizeing
:
false
,
}
},
components
:
{
AlmostLottery
},
methods
:{
remoteGetPrizeIndex
(
prizeId
)
{
let
list
=
[...
this
.
prizeList
]
// 拿到后端返回的 prizeId 后,开始循环比对得出那个中奖的数据
for
(
let
i
=
0
;
i
<
list
.
length
;
i
++
)
{
let
item
=
list
[
i
]
if
(
item
.
prizeId
===
prizeId
)
{
this
.
prizeIndex
=
i
break
}
}
console
.
log
(
'本次抽中奖品 =>'
,
this
.
prizeList
[
this
.
prizeIndex
].
prizeName
)
// 如果奖品设有库存
},
// 抽奖转盘绘制完成
handleDrawFinish
(
res
)
{
console
.
log
(
'抽奖转盘绘制完成'
,
res
)
}
}
}
vedio/pages.json
View file @
912f56cb
...
@@ -7,28 +7,23 @@
...
@@ -7,28 +7,23 @@
"^nx-(.*)"
:
"@/nProX/$1/$1.vue"
//
匹配nProX内的vue文件
"^nx-(.*)"
:
"@/nProX/$1/$1.vue"
//
匹配nProX内的vue文件
}
}
},
},
"pages"
:
[
"pages"
:
[{
//
#ifndef
APP-PLUS
"path"
:
"pages/loading"
{
},
{
"path"
:
"pages/loading"
"path"
:
"pages/home"
},
},
{
//
#endif
"path"
:
"pages/index/index"
{
},
{
"path"
:
"pages/home"
"path"
:
"pages/my/my"
},
{
},
{
"path"
:
"pages/index/index"
"path"
:
"pages/brower/brower"
},
{
},
{
"path"
:
"pages/my/my"
"path"
:
"pages/recommend/recommend"
},
{
},
{
"path"
:
"pages/brower/brower"
"path"
:
"pages/recommend/follow"
},
{
},
{
"path"
:
"pages/recommend/recommend"
"path"
:
"pages/recommend/recommendVideo"
},
{
}],
"path"
:
"pages/recommend/follow"
},
{
"path"
:
"pages/recommend/recommendVideo"
}
],
//
分包配置
//
分包配置
"subPackages"
:
[{
"subPackages"
:
[{
"root"
:
"pagesA"
,
"root"
:
"pagesA"
,
...
...
vedio/pages/home.vue
View file @
912f56cb
...
@@ -6,10 +6,9 @@
...
@@ -6,10 +6,9 @@
v-show=
"currentPage==1"
ref=
"recommend"
/>
v-show=
"currentPage==1"
ref=
"recommend"
/>
<userPage
v-show=
"currentPage==2"
ref=
"user"
/>
<userPage
v-show=
"currentPage==2"
ref=
"user"
/>
</view>
</view>
<view
v-if=
"!isShowBlackBar"
class=
"tabs-bar"
>
<view
v-if=
"!isShowBlackBar"
class=
"tabs-bar"
style=
"height: 70px;"
>
<view
:class=
"currentPage==0?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
>
@
click=
"tabChange(0)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
mode=
"heightFix"
>
mode=
"heightFix"
>
</image>
</image>
...
@@ -17,18 +16,16 @@
...
@@ -17,18 +16,16 @@
</view>
</view>
剧场
剧场
</view>
</view>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage == 1?'tab active': 'tab'"
@
click=
"tabChange(1)"
>
@
click=
"tabChange(1)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
mode=
"heightFix"
></image>
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
</view>
</view>
推荐
推荐
</view>
</view>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage == 2?'tab active': 'tab'"
@
click=
"tabChange(2)"
>
@
click=
"tabChange(2)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
</image>
</image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
...
@@ -37,10 +34,9 @@
...
@@ -37,10 +34,9 @@
</view>
</view>
</view>
</view>
<view
v-if=
"isShowBlackBar"
class=
"tabs-bar2"
>
<view
v-if=
"isShowBlackBar"
class=
"tabs-bar2"
style=
"height: 70px;"
>
<view
:class=
"currentPage==0?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage==0?'tab active': 'tab'"
@
click=
"tabChange(0)"
>
@
click=
"tabChange(0)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
<image
v-if=
"currentPage==0"
class=
"tabs-image"
src=
"/static/tab/index_selected.png"
mode=
"heightFix"
>
mode=
"heightFix"
>
</image>
</image>
...
@@ -48,18 +44,16 @@
...
@@ -48,18 +44,16 @@
</view>
</view>
剧场
剧场
</view>
</view>
<view
:class=
"currentPage == 1?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage == 1?'tab active': 'tab'"
@
click=
"tabChange(1)"
>
@
click=
"tabChange(1)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
<image
v-if=
"currentPage==1"
class=
"tabs-image"
src=
"/static/tab/promote_selected.png"
mode=
"heightFix"
></image>
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/promote_unselected.png"
mode=
"heightFix"
></image>
</view>
</view>
推荐
推荐
</view>
</view>
<view
:class=
"currentPage == 2?'tab active': 'tab'"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
<view
:class=
"currentPage == 2?'tab active': 'tab'"
@
click=
"tabChange(2)"
>
@
click=
"tabChange(2)"
>
<view
style=
"margin: 12rpx 0 8rpx;"
>
<view
style=
"margin: 16rpx 0 11rpx;"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
<image
v-if=
"currentPage==2"
class=
"tabs-image"
src=
"/static/tab/my_selected.png"
mode=
"heightFix"
>
</image>
</image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
<image
v-else
class=
"tabs-image"
src=
"/static/tab/my_unselected.png"
mode=
"heightFix"
></image>
...
@@ -68,7 +62,7 @@
...
@@ -68,7 +62,7 @@
</view>
</view>
</view>
</view>
<view
v-if=
"showEditBar"
class=
"editBar"
:style=
"'padding-bottom:' + bottomSafePadding + 'px;'"
>
<view
v-if=
"showEditBar"
class=
"editBar"
>
<view
class=
"editItem"
@
click=
"!isFullChoice?fullChoice():noChoice()"
>
<view
class=
"editItem"
@
click=
"!isFullChoice?fullChoice():noChoice()"
>
{{
!
isFullChoice
?
'全选'
:
'全不选'
}}
{{
!
isFullChoice
?
'全选'
:
'全不选'
}}
</view>
</view>
...
@@ -213,7 +207,7 @@
...
@@ -213,7 +207,7 @@
display
:
flex
;
display
:
flex
;
background-color
:
black
;
background-color
:
black
;
.tab
{
.tab
{
height
:
110rpx
;
height
:
110rpx
;
flex
:
1
;
flex
:
1
;
text-align
:
center
;
text-align
:
center
;
...
...
vedio/pages/index/index.vue
View file @
912f56cb
...
@@ -193,9 +193,10 @@
...
@@ -193,9 +193,10 @@
import
{
import
{
openUrl
openUrl
}
from
'@/utils/app+.js'
;
}
from
'@/utils/app+.js'
;
import
{
import
{
navigateToPlayer
navigateToPlayer
}
from
'
../..
/common/playerManager'
;
}
from
'
@
/common/playerManager'
;
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -210,21 +211,13 @@
...
@@ -210,21 +211,13 @@
topList
:
[],
topList
:
[],
maskImage
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_wx_guid.png'
,
maskImage
:
'https://mints-web.oss-cn-beijing.aliyuncs.com/images/bg_wx_guid.png'
,
showMask
:
false
,
showMask
:
false
,
clientHeight
:
0
,
clientHeight
:
app
.
globalData
.
clientHeight
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
page
:
1
,
page
:
1
,
size
:
10
,
size
:
10
,
loadStatus
:
'loadmore'
,
loadStatus
:
'loadmore'
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
};
};
},
},
mounted
()
{
let
that
=
this
uni
.
getSystemInfo
({
success
:
(
res
=>
{
this
.
clientHeight
=
res
.
windowHeight
-
50
;
})
});
},
methods
:
{
methods
:
{
onScroll
(
event
)
{
onScroll
(
event
)
{
// 获取scrollview已滚动的高度
// 获取scrollview已滚动的高度
...
@@ -296,9 +289,9 @@
...
@@ -296,9 +289,9 @@
success
:
({
success
:
({
data
data
})
=>
{
})
=>
{
this
.
loadStatus
=
data
.
list
.
size
<
this
.
size
?
'nomore'
:
'loadmore'
;
this
.
loadStatus
=
(
data
.
list
.
length
<
this
.
size
||
!
data
.
list
)
?
'nomore'
:
'loadmore'
;
if
(
data
.
list
.
size
<
=
10
)
{
if
(
data
.
list
.
size
<
10
)
{
this
.
dataList
=
[...
this
.
dataList
,
...
data
.
list
];
this
.
dataList
=
[...
this
.
dataList
,
...
data
.
list
];
return
return
}
}
...
@@ -319,16 +312,16 @@
...
@@ -319,16 +312,16 @@
this
.
loadList
()
this
.
loadList
()
},
},
handleBanner
(
item
)
{
handleBanner
(
item
)
{
navigateToPlayer
(
{}
)
navigateToPlayer
(
item
)
},
},
handleInfo
(
item
)
{
handleInfo
(
item
)
{
navigateToPlayer
(
{}
)
navigateToPlayer
(
item
)
},
},
handleTop
(
item
)
{
handleTop
(
item
)
{
navigateToPlayer
(
{}
)
navigateToPlayer
(
item
)
},
},
handleBottomPlay
(
item
)
{
handleBottomPlay
(
item
)
{
navigateToPlayer
(
{}
)
navigateToPlayer
(
item
)
},
},
handleBottomClose
()
{
handleBottomClose
()
{
this
.
newRecordBean
=
null
;
this
.
newRecordBean
=
null
;
...
@@ -359,12 +352,7 @@
...
@@ -359,12 +352,7 @@
data
data
})
=>
{
})
=>
{
if
(
data
.
vedioMsg
!=
null
)
{
if
(
data
.
vedioMsg
!=
null
)
{
navigateToPlayer
(
data
.
vedioMsg
)
navigateToPlayer
({})
// navigateTo(`/pagesC/video/newVideoDetail?data=` +
// encodeURIComponent(
// JSON.stringify(data.vedioMsg)));
}
}
}
}
});
});
...
...
vedio/pages/my/my.vue
View file @
912f56cb
<
template
>
<
template
>
<view
class=
"body"
>
<view
class=
"body"
>
<scroll-view
v-if=
"clientHeight != 0"
scroll-y
:style=
"
{'height': clientHeight + 'px'}"
@scroll="onScroll"
>
<scroll-view
v-if=
"clientHeight != 0"
scroll-y
:style=
"
{'height': clientHeight + 'px'}">
<view
<view
:style=
"'display: flex;flex-direction: row;align-items: center;margin: 20rpx;padding-left: 10rpx;margin-top:'+statusBarHeight+'px;'"
>
: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>
<image
class=
"avatar"
src=
"@/static/logo-about.png"
></image>
...
@@ -116,22 +116,13 @@
...
@@ -116,22 +116,13 @@
userBean
:
{},
userBean
:
{},
showAnimate
:
false
,
showAnimate
:
false
,
xxxPayFlag
:
false
,
xxxPayFlag
:
false
,
windowHeight
:
0
,
os
:
'android'
,
os
:
'android'
,
versionName
:
app
.
globalData
.
versionName
,
versionName
:
app
.
globalData
.
versionName
,
corpid
:
''
,
// 企业ID
corpid
:
''
,
// 企业ID
curl
:
''
,
// 客服链接
curl
:
''
,
// 客服链接
clientHeight
:
0
,
clientHeight
:
app
.
globalData
.
clientHeight
,
};
};
},
},
mounted
()
{
let
that
=
this
uni
.
getSystemInfo
({
success
:
(
res
=>
{
this
.
clientHeight
=
res
.
windowHeight
-
50
;
})
});
},
onScroll
(
event
)
{
onScroll
(
event
)
{
// 获取scrollview已滚动的高度
// 获取scrollview已滚动的高度
const
scrollTop
=
event
.
detail
.
scrollTop
;
const
scrollTop
=
event
.
detail
.
scrollTop
;
...
@@ -146,7 +137,6 @@
...
@@ -146,7 +137,6 @@
methods
:
{
methods
:
{
show
()
{
show
()
{
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
this
.
os
=
wx
.
getSystemInfoSync
().
platform
;
this
.
windowHeight
=
uni
.
getSystemInfoSync
().
windowHeight
// loadData() {
// loadData() {
this
.
post
({
this
.
post
({
url
:
'/user/baseMsg'
,
url
:
'/user/baseMsg'
,
...
...
vedio/pages/recommend/follow.vue
View file @
912f56cb
...
@@ -36,10 +36,10 @@
...
@@ -36,10 +36,10 @@
<
script
>
<
script
>
import
common
from
'@/mixins/common'
;
import
common
from
'@/mixins/common'
;
import
{
import
{
navigateTo
,
navigateTo
Player
}
from
'@/
utils/fun.js
'
;
}
from
'@/
common/playerManager
'
;
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -94,8 +94,8 @@
...
@@ -94,8 +94,8 @@
goRecommend
()
{
goRecommend
()
{
this
.
$emit
(
"goRecommend"
)
this
.
$emit
(
"goRecommend"
)
},
},
click
(
detail
)
{
click
(
detail
)
{
navigateTo
(
`/pagesC/video/newVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
)))
navigateTo
Player
(
detail
)
},
},
longClick
(
key
)
{
longClick
(
key
)
{
this
.
isEditStyle
=
true
this
.
isEditStyle
=
true
...
...
vedio/pages/recommend/recommend.vue
View file @
912f56cb
<
template
>
<
template
>
<view
class=
"body
"
>
<view
v-if=
"clientHeight != 0"
:style=
"
{'height': clientHeight + 'px'}
">
<view
class=
"tabContainer"
<view
class=
"tabContainer"
:style=
"'height:' +titleBarHeight +'px;line-height:'+titleBarHeight +'px;padding-top:'+statusBarHeight+'px;background-color:transparent'"
>
:style=
"'height:' +titleBarHeight +'px;line-height:'+titleBarHeight +'px;padding-top:'+statusBarHeight+'px;background-color:transparent'"
>
<view
v-if=
"(current==0 && showEdit)"
<view
v-if=
"(current==0 && showEdit)"
:style=
"'position: absolute;left: 20rpx;top:'+ (statusBarHeight + 10) + 'px'"
:style=
"'position: absolute;left: 20rpx;top:'+ (statusBarHeight + 10) + 'px'"
@
click
.
stop=
"showEditBar = !showEditBar"
>
@
click
.
stop=
"showEditBar = !showEditBar"
>
<image
style=
"width: 50rpx;height: 50rpx;"
mode=
"widthFix"
<
!--
<
image
style=
"width: 50rpx;height: 50rpx;"
mode=
"widthFix"
:src=
"showEditBar?'/static/video/close.png':'/static/video/edit.png'"
/>
:src=
"showEditBar?'/static/video/close.png':'/static/video/edit.png'"
/>
-->
</view>
</view>
<view
v-show=
"showEditBar"
style=
"width: 300rpx;
background: white;
z-index: 999;"
>
<view
v-show=
"showEditBar"
style=
"width: 300rpx;z-index: 999;"
>
<view
<view
style=
"font-size: 36rpx;text-align: center;align-items: center;height:100rpx;line-height: 100rpx;"
>
style=
"font-size: 36rpx;text-align: center;align-items: center;height:100rpx;line-height: 100rpx;"
>
追剧
追剧
...
@@ -74,8 +74,8 @@
...
@@ -74,8 +74,8 @@
showEdit
:
false
,
showEdit
:
false
,
showTap
:
false
,
showTap
:
false
,
titleBarHeight
:
app
.
globalData
.
titleBarHeight
,
titleBarHeight
:
app
.
globalData
.
titleBarHeight
,
titleButtonWidth
:
app
.
globalData
.
titleButtonWidth
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
statusBarHeight
:
app
.
globalData
.
statusBarHeight
,
clientHeight
:
app
.
globalData
.
clientHeight
,
}
}
},
},
onLoad
(
e
)
{},
onLoad
(
e
)
{},
...
...
vedio/pages/recommend/recommendVideo.vue
View file @
912f56cb
...
@@ -53,8 +53,8 @@
...
@@ -53,8 +53,8 @@
import
common
from
'@/mixins/common'
;
import
common
from
'@/mixins/common'
;
import
{
import
{
navigateTo
,
navigateTo
Player
}
from
'@/
utils/fun.js
'
;
}
from
'@/
common/playerManager
'
;
let
audo
=
uni
.
createInnerAudioContext
()
let
audo
=
uni
.
createInnerAudioContext
()
...
@@ -236,8 +236,8 @@
...
@@ -236,8 +236,8 @@
this
.
isqp
=
e
.
detail
.
show
this
.
isqp
=
e
.
detail
.
show
},
},
detail
(
detail
)
{
detail
(
detail
)
{
navigateTo
(
`/pagesC/video/newVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
detail
))
+
detail
.
seeIndex
=
detail
.
seeIndex
+
1
`&playNext=1`
)
navigateToPlayer
(
detail
)
},
},
collect
(
vedioId
,
index
)
{
collect
(
vedioId
,
index
)
{
this
.
originList
[
index
].
collect
=
1
this
.
originList
[
index
].
collect
=
1
...
...
vedio/pagesD/watchRecord/watchRecord.vue
View file @
912f56cb
...
@@ -38,18 +38,14 @@
...
@@ -38,18 +38,14 @@
import
common
from
'@/mixins/common'
;
import
common
from
'@/mixins/common'
;
import
{
import
{
getToLocal
}
from
"@/utils/utils.js"
import
{
navigateTo
,
message
,
message
,
alert
,
alert
,
loading
loading
}
from
'@/utils/fun.js'
;
}
from
'@/utils/fun.js'
;
import
{
import
{
openUrl
navigateToPlayer
}
from
'@/
utils/app+.js
'
;
}
from
'@/
common/playerManager
'
;
const
app
=
getApp
();
const
app
=
getApp
();
...
@@ -69,10 +65,10 @@
...
@@ -69,10 +65,10 @@
},
},
queryList
(
page
,
size
)
{
queryList
(
page
,
size
)
{
this
.
post
({
this
.
post
({
url
:
'/vedio/history'
,
url
:
'/vedio/history'
,
data
:
{
data
:
{
page
,
page
,
size
size
},
},
showLoading
:
false
,
showLoading
:
false
,
success
:
({
success
:
({
...
@@ -82,8 +78,8 @@
...
@@ -82,8 +78,8 @@
}
}
});
});
},
},
handleInfo
(
item
)
{
handleInfo
(
item
)
{
navigateTo
(
`/pagesC/video/newVideoDetail?data=`
+
encodeURIComponent
(
JSON
.
stringify
(
item
)));
navigateTo
Player
(
item
)
},
},
handleXing
(
item
)
{
handleXing
(
item
)
{
var
that
=
this
;
var
that
=
this
;
...
...
vedio/readme.md
deleted
100644 → 0
View file @
7cfbc1cb
| 平台 | 账号 |
| ---- | ---- |
|
[
微信开放平台
](
https://open.weixin.qq.com/
)
| |
|
[
DCloud开发者
](
https://dev.dcloud.net.cn/
)
| 1359763362@qq.com |
┌─uniCloud 云空间目录,阿里云为uniCloud-aliyun,腾讯云为uniCloud-tcb(详见uniCloud)
│─components 符合vue组件规范的uni-app组件目录
│ └─comp-a.vue 可复用的a组件
├─hybrid App端存放本地html文件的目录,详见
├─platforms 存放各平台专用页面的目录,详见
├─pages 业务页面文件存放的目录
│ ├─index
│ │ └─index.vue index页面
│ └─list
│ └─list.vue list页面
├─static 存放应用引用的本地静态资源(如图片、视频等)的目录,注意:静态资源只能存放于此
├─uni_modules 存放
[
uni_module
](
/uni_modules
)
规范的插件。
├─wxcomponents 存放小程序组件的目录,详见
├─main.js Vue初始化入口文件
├─App.vue 应用配置,用来配置App全局样式以及监听 应用生命周期
├─manifest.json 配置应用名称、appid、logo、版本等打包信息,详见
├─pages.json 配置页面路由、导航条、选项卡等页面类信息,详见
└─uni.scss 这里是uni-app内置的常用样式变量
\ 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