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
fd7181ce
Commit
fd7181ce
authored
Oct 11, 2023
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
79ae6d66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
33 deletions
+41
-33
common.js
vedio/mixins/common.js
+4
-4
index.vue
vedio/pages/index/index.vue
+30
-26
loading.vue
vedio/pages/loading.vue
+5
-1
my.vue
vedio/pages/my/my.vue
+2
-2
No files found.
vedio/mixins/common.js
View file @
fd7181ce
...
...
@@ -146,8 +146,8 @@ export default {
let
requestTask
;
Object
.
assign
(
header
,
{
token
:
app
.
globalData
.
token
,
//
token: 'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997',
//
token: app.globalData.token,
token
:
'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997'
,
pkgName
:
app
.
globalData
.
pkgName
})
...
...
@@ -165,9 +165,9 @@ export default {
break
;
default
:
if
(
fail
)
{
fail
(
res
.
data
.
m
sg
);
fail
(
res
.
data
.
m
essage
);
}
message
.
notify
(
res
.
data
.
errorMsg
||
res
.
data
.
msg
);
message
.
notify
(
res
.
data
.
message
);
break
;
}
},
...
...
vedio/pages/index/index.vue
View file @
fd7181ce
...
...
@@ -33,7 +33,11 @@
<view
style=
"font-size: 20rpx;margin-top: 10rpx;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 18rpx;margin-top: 10rpx;"
v-if=
"item.orderTags!=null&&item.orderTags.length>0"
>
<template
v-for=
"t in item.orderTags"
>
{{
t
+
' '
}}
</
template
>
<scroll-view
scroll-x=
"true"
>
<block
v-for=
"t in item.orderTags"
:key=
"item.orderTags"
>
<view
style=
"display:inline-block;margin-right: 4rpx;"
>
{{
t
}}
</view>
</block>
</scroll-view>
</view>
</view>
</block>
...
...
@@ -155,11 +159,19 @@
dataList
:
[],
bannerList
:
[],
newRecordBean
:
null
,
userInfo
:
app
.
globalData
.
userInfo
,
topList
:
[]
};
},
methods
:
{
show
()
{
console
.
log
(
'123123123'
);
if
(
app
.
globalData
.
userInfo
!=
'undefined'
&&
app
.
globalData
.
userInfo
==
null
)
{
this
.
visitorlogin
();
}
else
{
this
.
loadPost
();
}
},
visitorlogin
()
{
let
that
=
this
var
obj
=
wx
.
getEnterOptionsSync
()
...
...
@@ -197,7 +209,6 @@
advertiserId
:
advertiserId
,
reqId
:
reqId
,
creativeId
:
creativeId
,
code
:
loginRes
.
code
,
inviteUId
:
tempInviteUId
},
showLoading
:
false
,
...
...
@@ -208,16 +219,15 @@
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
that
.
loadPost
();
},
fail
:
(
e
)
=>
{
// 测试使用
that
.
loadPost
();
}
});
},
loadPost
()
{
console
.
log
(
'showshowshowshow'
)
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
// 轮播图
this
.
post
({
url
:
'/vedio/topTabs'
,
...
...
@@ -239,25 +249,19 @@
}
});
// 最近观看剧
this
.
post
({
url
:
'/vedio/newest'
,
showLoading
:
false
,
success
:
({
data
})
=>
{
if
(
data
.
list
!=
null
&&
data
.
list
.
length
>
0
)
{
this
.
newRecordBean
=
data
.
list
[
0
];
}
}
});
},
show
()
{
if
(
userInfo
==
null
)
{
visitorlogin
();
}
else
{
loadPost
();
}
// this.post({
// url: '/vedio/newest',
// showLoading: false,
// success: ({
// data
// }) => {
// if (data.list != null && data.list.length > 0) {
// this.newRecordBean = data.list[0];
// }
// }
// });
},
queryList
(
page
,
size
)
{
// 推荐列表
this
.
post
({
...
...
vedio/pages/loading.vue
View file @
fd7181ce
...
...
@@ -89,7 +89,6 @@
advertiserId
:
advertiserId
,
reqId
:
reqId
,
creativeId
:
creativeId
,
code
:
loginRes
.
code
,
inviteUId
:
tempInviteUId
},
showLoading
:
false
,
...
...
@@ -99,6 +98,11 @@
app
.
globalData
.
token
=
data
.
token
;
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
},
fail
:
(
e
)
=>
{
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
1300
);
}
});
}
...
...
vedio/pages/my/my.vue
View file @
fd7181ce
...
...
@@ -83,8 +83,8 @@
};
},
methods
:
{
//
show() {
loadData
()
{
show
()
{
//
loadData() {
this
.
post
({
url
:
'/user/baseMsg'
,
showLoading
:
false
,
...
...
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