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
6383f35a
Commit
6383f35a
authored
Aug 13, 2024
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
7325af29
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
39 additions
and
24 deletions
+39
-24
Book.js
vedio/common/models/Book.js
+4
-2
userServices.js
vedio/common/services/userServices.js
+5
-6
banner.vue
vedio/components/banner/banner.vue
+4
-4
book-list-item.vue
vedio/components/book-list-item/book-list-item.vue
+7
-3
book-list-item2.vue
vedio/components/book-list-item2/book-list-item2.vue
+7
-2
bookcity.vue
vedio/components/bookcity/bookcity.vue
+5
-1
read-time-count-row.vue
vedio/components/read-time-count-row/read-time-count-row.vue
+3
-2
category-bar.vue
vedio/components/warehouse/components/category-bar.vue
+3
-3
loading.vue
vedio/pages/loading.vue
+1
-1
No files found.
vedio/common/models/Book.js
View file @
6383f35a
...
...
@@ -29,7 +29,8 @@ export default class Book {
lockRate
,
shortis
,
articleChapterList
,
freeNum
freeNum
,
carouselUrl
}
=
param
||
{}
this
.
id
=
id
;
this
.
title
=
title
;
...
...
@@ -61,6 +62,7 @@ export default class Book {
this
.
lockRate
=
lockRate
;
this
.
shortis
=
shortis
;
this
.
freeNum
=
freeNum
;
this
.
carouselUrl
=
carouselUrl
;
this
.
articleChapterList
=
articleChapterList
;
}
}
\ No newline at end of file
vedio/common/services/userServices.js
View file @
6383f35a
...
...
@@ -246,12 +246,11 @@ function saveToken(token) {
}
function
readToken
()
{
return
'4C1A1C6113922B148949CB847D5C3E72D9E08F167DCDAD86D60D8B0C65261F615F433703067DF5142735505C42F58997'
// if (!LOCAL_TOKEN) {
// // LOCAL_TOKEN = readStorage(KEY_STORAGE_TOKEN)
// LOCAL_TOKEN = readStorage('token')
// }
// return LOCAL_TOKEN;
if
(
!
LOCAL_TOKEN
)
{
// LOCAL_TOKEN = readStorage(KEY_STORAGE_TOKEN)
LOCAL_TOKEN
=
readStorage
(
'token'
)
}
return
LOCAL_TOKEN
;
}
const
KEY_STORAGE_NICKNAME
=
"NICKNAME"
...
...
vedio/components/banner/banner.vue
View file @
6383f35a
...
...
@@ -58,14 +58,14 @@
},
// 刷新数据列表
refreshList
()
{
getRecommendV1
(
'carousel'
,
8
,
(
success
,
data
)
=>
{
getRecommendV1
(
'carousel'
,
10
,
(
success
,
data
)
=>
{
if
(
success
)
{
this
.
changeData
(
data
)
}
})
},
changeData
(
e
)
{
this
.
data
List
=
e
.
records
.
map
(
item
=>
{
this
.
banner
List
=
e
.
records
.
map
(
item
=>
{
return
new
BookshelfBookItem
(
item
)
})
},
...
...
@@ -76,10 +76,10 @@
<
style
lang=
"scss"
>
.banneritem
{
margin
:
20rpx
20rpx
0
20rpx
;
height
:
260rpx
;
height
:
310rpx
;
.banner-img
{
height
:
26
0rpx
;
height
:
31
0rpx
;
}
}
</
style
>
\ No newline at end of file
vedio/components/book-list-item/book-list-item.vue
View file @
6383f35a
...
...
@@ -8,7 +8,7 @@
<view
class=
"c-flex_row row"
style=
"justify-content: space-between;padding-left:20rpx;"
>
<view
class=
"c-flex_column c-justify_center item"
>
<view
class=
"title"
>
{{
item
.
title
}}
{{
item
.
title
?
item
.
title
:
''
}}
</view>
</view>
<view
class=
"close-button item"
v-if=
'showClose'
>
...
...
@@ -19,7 +19,7 @@
<view
class=
"c-flex_row row"
>
<view
class=
"c-flex_column c-justify_between content c-flex_1 item"
>
<view
class=
"desc row"
>
{{
item
.
summary
}}
{{
item
.
summary
?
item
.
summary
:
''
}}
</view>
<view
class=
"c-flex_row c-align_center label-box row"
>
<slot
name=
"footer"
>
...
...
@@ -60,7 +60,11 @@
watch
:
{},
computed
:
{
showCategory
:
function
()
{
return
this
.
item
.
categoryName
if
(
this
.
item
&&
this
.
item
.
categoryName
)
{
return
true
}
else
{
return
false
}
},
showErrorImage
:
function
()
{
return
this
.
imageError
;
...
...
vedio/components/book-list-item2/book-list-item2.vue
View file @
6383f35a
...
...
@@ -93,13 +93,18 @@
}
.label-box
{
flex-wrap
:
wrap
;
display
:
flex
;
flex-direction
:
row
;
// flex-wrap: wrap;
overflow
:
auto
;
.label
{
padding
:
5rpx
10rpx
;
font-size
:
20rpx
;
margin-right
:
20rpx
;
border-radius
:
10rpx
;
flex-shrink
:
0
;
display
:inline-block
;
}
.label-color-1
{
...
...
vedio/components/bookcity/bookcity.vue
View file @
6383f35a
<
template
>
<scroll-view
scroll-y
style=
"height: 100%;"
>
<book-search-box
id=
'search'
></book-search-box>
<Banner></Banner>
<Banner
ref=
'banner'
></Banner>
<RecommendList
ref=
'recommendList1'
:listType=
"1"
></RecommendList>
<RecommendList
ref=
'recommendList2'
:listType=
"2"
></RecommendList>
<view
style=
"height: 20rpx;"
></view>
...
...
@@ -64,6 +64,10 @@
if
(
ref2
)
{
ref2
.
refreshList
();
}
let
banner
=
this
.
$refs
.
banner
;
if
(
banner
)
{
banner
.
refreshList
();
}
let
ref
=
this
.
$refs
.
recommendList2
;
if
(
ref
)
{
ref
.
refreshList
();
...
...
vedio/components/read-time-count-row/read-time-count-row.vue
View file @
6383f35a
...
...
@@ -79,6 +79,7 @@
font-size
:
30rpx
;
color
:
#000000
;
margin-right
:
15rpx
;
letter-spacing
:
6rpx
;
}
.value
{
...
...
@@ -97,7 +98,7 @@
.count-value
{
position
:
absolute
;
top
:
50
%
;
top
:
46
%
;
left
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
color
:
#000000
;
...
...
vedio/components/warehouse/components/category-bar.vue
View file @
6383f35a
<
template
>
<scroll-view
class=
"bar-box"
scroll-x
id=
'box'
:scroll-into-view=
"scrollId"
>
<view
v-if=
'showEmpty'
class=
"tab-item"
>
<
!--
<
view
v-if=
'showEmpty'
class=
"tab-item"
>
<view
class=
"title"
>
暂无分类数据
</view>
</view>
<view
v-else
:id=
"'item_'+index"
class=
"tab-item"
:class=
"
{'tab-item-selected': item.selected}"
</view>
-->
<view
:id=
"'item_'+index"
class=
"tab-item"
:class=
"
{'tab-item-selected': item.selected}"
v-for="(item, index) in tabs" :key='item.name' @click="tapTab(index)">
<view
class=
"title"
>
{{
item
.
name
}}
...
...
vedio/pages/loading.vue
View file @
6383f35a
<
template
>
<view
class=
"body"
>
<image
style=
"width: 170rpx;height: 170rpx;margin-top: 30%;"
src=
"
@/static/image
/logo.png"
mode=
"widthFix"
/>
<image
style=
"width: 170rpx;height: 170rpx;margin-top: 30%;"
src=
"
../static/images
/logo.png"
mode=
"widthFix"
/>
<view
style=
"color: black;margin-top: 30rpx;font-size: 40rpx;font-size: 50rpx;"
>
{{
appName
}}
</view>
<view
style=
"color: #FECF02;margin-top: 10rpx;font-size: 40rpx;font-size: 40rpx;"
>
欢迎使用
</view>
<view
style=
"bottom: 0;position: absolute;"
>
...
...
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