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
2b43b53b
Commit
2b43b53b
authored
May 31, 2024
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
e3f5ed2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
134 additions
and
126 deletions
+134
-126
readerRecord.vue
vedio/pagesD/readerRecord/readerRecord.vue
+134
-126
No files found.
vedio/pagesD/readerRecord/readerRecord.vue
View file @
2b43b53b
<
template
>
<view
class=
"body"
>
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:defaultPageNo=
"1"
:defaultPageSize=
"500"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;"
>
最近阅读
</view>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
style=
"display: flex;flex-direction: row;background-color:white;border-radius:10rpx;justify-content:space-between;margin: 20rpx;padding-bottom: 20rpx;"
>
<view
style=
"display: flex;align-items: center;"
@
click=
"handleInfo(item)"
>
<view
style=
"display: flex;flex-direction: column;margin-left: 20rpx;margin-top: 20rpx;"
>
<view
style=
"font-size: 30rpx;color: black;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
{{
item
.
summary
}}
</view>
<view
style=
"font-size: 28rpx;color: black;margin-top: 16rpx;"
>
作者:
{{
item
.
author
}}
</view>
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;"
>
<view
style=
"display: flex;flex-direction: column;"
>
<image
v-if=
"item.collect==0"
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_0.png"
></image>
<image
v-else
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_1.png"
></image>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;"
>
收藏
</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'@/utils/fun.js'
;
import
{
openUrl
}
from
'@/utils/app+.js'
;
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/book/readRecordList'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
handleInfo
(
item
)
{
},
handleXing
(
item
)
{
var
that
=
this
;
//0未收藏,1收藏
if
(
!
item
.
isCollect
)
{
this
.
post
({
url
:
'/book/collect'
,
data
:
{
articleId
:
item
.
articleId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
else
{
this
.
post
({
url
:
'/book/cancelCollect'
,
data
:
{
articleId
:
item
.
articleId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
}
}
};
</
script
>
<
style
>
.body
{
background-color
:
whitesmoke
;
}
.img
{
position
:
relative
;
border-radius
:
10
rpx
;
width
:
180
rpx
;
height
:
240
rpx
;
}
<
template
>
<view
class=
"body"
>
<z-paging
class=
"flex-1"
ref=
"paging"
v-model=
"dataList"
@
query=
"queryList"
:defaultPageNo=
"1"
:defaultPageSize=
"500"
>
<view
style=
"font-size: 30rpx;font-weight: 777;margin-left: 12rpx;margin-top: 10rpx;"
>
最近阅读
</view>
<view
v-for=
"(item, i) in dataList"
:key=
"i"
>
<view
style=
"display: flex;flex-direction: row;background-color:white;border-radius:10rpx;justify-content:space-between;margin: 20rpx;padding-bottom: 20rpx;"
>
<view
style=
"display: flex;align-items: center;"
@
click=
"handleInfo(item)"
>
<view
style=
"display: flex;flex-direction: column;margin-left: 20rpx;margin-top: 20rpx;"
>
<view
style=
"font-size: 30rpx;color: black;"
>
{{
item
.
title
}}
</view>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 16rpx;"
>
{{
item
.
summary
}}
</view>
<view
style=
"font-size: 28rpx;color: black;margin-top: 16rpx;"
>
作者:
{{
item
.
author
}}
</view>
</view>
</view>
<view
style=
"display: flex;align-items: center;margin-right: 8rpx;"
>
<view
style=
"display: flex;flex-direction: column;"
>
<image
v-if=
"item.collect==0"
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_0.png"
></image>
<image
v-else
@
click=
"handleXing(item)"
style=
"width: 50rpx;height: 50rpx;display: flex;align-items: right;padding-right: 4rpx;"
src=
"../../static/home_collect_img_1.png"
></image>
<view
style=
"font-size: 22rpx;color: gray;margin-top: 10rpx;display: flex;justify-content: center;"
>
收藏
</view>
</view>
</view>
</view>
</view>
</z-paging>
</view>
</
template
>
<
script
>
import
common
from
'@/mixins/common'
;
import
{
navigateTo
,
message
,
alert
,
loading
}
from
'@/utils/fun.js'
;
import
{
openUrl
}
from
'@/utils/app+.js'
;
const
app
=
getApp
();
export
default
{
name
:
'index'
,
mixins
:
[
common
],
data
()
{
return
{
dataList
:
[]
};
},
methods
:
{
show
()
{
if
(
this
.
$refs
.
paging
!=
null
)
{
this
.
$refs
.
paging
.
refresh
();
}
},
queryList
(
page
,
size
)
{
this
.
post
({
url
:
'/book/readRecordList'
,
data
:
{
page
,
size
},
showLoading
:
false
,
success
:
({
data
})
=>
{
this
.
$refs
.
paging
.
complete
(
data
.
list
);
}
});
},
handleInfo
(
item
)
{
var
bookId
=
item
.
id
;
uni
.
navigateTo
({
url
:
`/page-subs/sub_A/book-content/book-content`
,
success
:
(
res
)
=>
{
res
.
eventChannel
.
emit
(
"openBookContentPage"
,
{
bookId
})
}
})
},
handleXing
(
item
)
{
var
that
=
this
;
//0未收藏,1收藏
if
(
!
item
.
isCollect
)
{
this
.
post
({
url
:
'/book/collect'
,
data
:
{
articleId
:
item
.
articleId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
else
{
this
.
post
({
url
:
'/book/cancelCollect'
,
data
:
{
articleId
:
item
.
articleId
,
},
showLoading
:
false
,
success
:
({
data
})
=>
{
that
.
show
();
}
});
}
}
}
};
</
script
>
<
style
>
.body
{
background-color
:
whitesmoke
;
}
.img
{
position
:
relative
;
border-radius
:
10
rpx
;
width
:
180
rpx
;
height
:
240
rpx
;
}
</
style
>
\ 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