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
Show 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 {
...
@@ -146,8 +146,8 @@ export default {
let
requestTask
;
let
requestTask
;
Object
.
assign
(
header
,
{
Object
.
assign
(
header
,
{
token
:
app
.
globalData
.
token
,
//
token: app.globalData.token,
//
token: 'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997',
token
:
'AC8FA7EB65C3074472378362124462E70E762CAB0EAD1C6EABB742EB893A61C05F433703067DF5142735505C42F58997'
,
pkgName
:
app
.
globalData
.
pkgName
pkgName
:
app
.
globalData
.
pkgName
})
})
...
@@ -165,9 +165,9 @@ export default {
...
@@ -165,9 +165,9 @@ export default {
break
;
break
;
default
:
default
:
if
(
fail
)
{
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
;
break
;
}
}
},
},
...
...
vedio/pages/index/index.vue
View file @
fd7181ce
...
@@ -33,7 +33,11 @@
...
@@ -33,7 +33,11 @@
<view
style=
"font-size: 20rpx;margin-top: 10rpx;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 20rpx;margin-top: 10rpx;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 18rpx;margin-top: 10rpx;"
<view
style=
"font-size: 18rpx;margin-top: 10rpx;"
v-if=
"item.orderTags!=null&&item.orderTags.length>0"
>
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>
</view>
</view>
</block>
</block>
...
@@ -155,11 +159,19 @@
...
@@ -155,11 +159,19 @@
dataList
:
[],
dataList
:
[],
bannerList
:
[],
bannerList
:
[],
newRecordBean
:
null
,
newRecordBean
:
null
,
userInfo
:
app
.
globalData
.
userInfo
,
topList
:
[]
topList
:
[]
};
};
},
},
methods
:
{
methods
:
{
show
()
{
console
.
log
(
'123123123'
);
if
(
app
.
globalData
.
userInfo
!=
'undefined'
&&
app
.
globalData
.
userInfo
==
null
)
{
this
.
visitorlogin
();
}
else
{
this
.
loadPost
();
}
},
visitorlogin
()
{
visitorlogin
()
{
let
that
=
this
let
that
=
this
var
obj
=
wx
.
getEnterOptionsSync
()
var
obj
=
wx
.
getEnterOptionsSync
()
...
@@ -197,7 +209,6 @@
...
@@ -197,7 +209,6 @@
advertiserId
:
advertiserId
,
advertiserId
:
advertiserId
,
reqId
:
reqId
,
reqId
:
reqId
,
creativeId
:
creativeId
,
creativeId
:
creativeId
,
code
:
loginRes
.
code
,
inviteUId
:
tempInviteUId
inviteUId
:
tempInviteUId
},
},
showLoading
:
false
,
showLoading
:
false
,
...
@@ -208,16 +219,15 @@
...
@@ -208,16 +219,15 @@
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
app
.
globalData
.
userInfo
=
data
;
that
.
loadPost
();
},
fail
:
(
e
)
=>
{
// 测试使用
that
.
loadPost
();
that
.
loadPost
();
}
}
});
});
},
},
loadPost
()
{
loadPost
()
{
console
.
log
(
'showshowshowshow'
)
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
// 轮播图
// 轮播图
this
.
post
({
this
.
post
({
url
:
'/vedio/topTabs'
,
url
:
'/vedio/topTabs'
,
...
@@ -239,25 +249,19 @@
...
@@ -239,25 +249,19 @@
}
}
});
});
// 最近观看剧
// 最近观看剧
this
.
post
({
// this.post({
url
:
'/vedio/newest'
,
// url: '/vedio/newest',
showLoading
:
false
,
// showLoading: false,
success
:
({
// success: ({
data
// data
})
=>
{
// }) => {
if
(
data
.
list
!=
null
&&
data
.
list
.
length
>
0
)
{
// if (data.list != null && data.list.length > 0) {
this
.
newRecordBean
=
data
.
list
[
0
];
// this.newRecordBean = data.list[0];
}
// }
}
// }
});
// });
},
show
()
{
if
(
userInfo
==
null
)
{
visitorlogin
();
}
else
{
loadPost
();
}
},
},
queryList
(
page
,
size
)
{
queryList
(
page
,
size
)
{
// 推荐列表
// 推荐列表
this
.
post
({
this
.
post
({
...
...
vedio/pages/loading.vue
View file @
fd7181ce
...
@@ -89,7 +89,6 @@
...
@@ -89,7 +89,6 @@
advertiserId
:
advertiserId
,
advertiserId
:
advertiserId
,
reqId
:
reqId
,
reqId
:
reqId
,
creativeId
:
creativeId
,
creativeId
:
creativeId
,
code
:
loginRes
.
code
,
inviteUId
:
tempInviteUId
inviteUId
:
tempInviteUId
},
},
showLoading
:
false
,
showLoading
:
false
,
...
@@ -99,6 +98,11 @@
...
@@ -99,6 +98,11 @@
app
.
globalData
.
token
=
data
.
token
;
app
.
globalData
.
token
=
data
.
token
;
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userId
=
data
.
pk_id
;
app
.
globalData
.
userInfo
=
data
;
app
.
globalData
.
userInfo
=
data
;
},
fail
:
(
e
)
=>
{
setTimeout
(()
=>
{
redirectTo
(
'home'
);
},
1300
);
}
}
});
});
}
}
...
...
vedio/pages/my/my.vue
View file @
fd7181ce
...
@@ -83,8 +83,8 @@
...
@@ -83,8 +83,8 @@
};
};
},
},
methods
:
{
methods
:
{
//
show() {
show
()
{
loadData
()
{
//
loadData() {
this
.
post
({
this
.
post
({
url
:
'/user/baseMsg'
,
url
:
'/user/baseMsg'
,
showLoading
:
false
,
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