Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1
Overview
Overview
Details
Activity
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
吴迪
gs1
Commits
328c45b5
Commit
328c45b5
authored
Jan 08, 2022
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 图书详情页
parent
063fcfcf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
5 deletions
+37
-5
book.vue
src/views/Service/book.vue
+37
-5
No files found.
src/views/Service/book.vue
View file @
328c45b5
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<div
class=
"body"
>
<div
class=
"body"
>
<el-tabs
v-model=
"activeName"
class=
"tab-no-bottom"
>
<el-tabs
v-model=
"activeName"
class=
"tab-no-bottom"
>
<el-tab-pane
label=
"条码图书"
name=
"first"
>
<el-tab-pane
label=
"条码图书"
name=
"first"
>
<div
class=
"book-card"
:key=
"i"
v-for=
"(item,i) in bookList"
>
<div
class=
"book-card"
@
click=
"showBookDetail(item)"
:key=
"i"
v-for=
"(item,i) in bookList"
>
<div
class=
"book-img"
>
<div
class=
"book-img"
>
<img
:src=
"item.graph"
alt=
""
>
<img
:src=
"item.graph"
alt=
""
>
</div>
</div>
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<pages
:pages=
"page"
@
toPagesFather
=
"getBooks"
></pages>
<pages
v-bind=
"page"
@
getLimit
=
"getBooks"
></pages>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"软件下载"
name=
"second"
>
<el-tab-pane
label=
"软件下载"
name=
"second"
>
...
@@ -53,6 +53,28 @@
...
@@ -53,6 +53,28 @@
</el-tab-pane>
</el-tab-pane>
</el-tabs>
</el-tabs>
</div>
</div>
<el-dialog
class=
"gs-book-detail-dialog"
:title=
"currentBook.prename"
:visible
.
sync=
"dialogVisible"
width=
"55%"
>
<div
class=
"book-card"
>
<div
class=
"book-img"
>
<img
:src=
"currentBook.graph"
alt=
""
>
</div>
<div
class=
"book-content"
>
<div
class=
"title"
>
{{
currentBook
.
prename
}}
</div>
<div
class=
"price"
>
¥
{{
currentBook
.
price
}}
</div>
<div
class=
"desc"
>
<span>
{{
currentBook
.
author
}}
著
</span>
|
<span>
{{
currentBook
.
predate
}}
</span>
|
<span>
{{
currentBook
.
company
}}
</span>
</div>
</div>
</div>
<h4
style=
"border-bottom: none; margin-bottom: 20px; font-size: 16px;color: #002c6c"
>
图书介绍
</h4>
<div
style=
"text-indent: 2em"
v-html=
"currentBook.description"
></div>
</el-dialog>
</div>
</div>
</
template
>
</
template
>
...
@@ -67,6 +89,8 @@ export default {
...
@@ -67,6 +89,8 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
dialogVisible
:
false
,
currentBook
:
{},
activeName
:
'second'
,
activeName
:
'second'
,
appList
:
[
appList
:
[
{
{
...
@@ -110,7 +134,7 @@ export default {
...
@@ -110,7 +134,7 @@ export default {
],
],
bookList
:
[],
bookList
:
[],
page
:
{
page
:
{
curr
ent
Page
:
1
,
currPage
:
1
,
pageSize
:
10
,
pageSize
:
10
,
pageCount
:
1
,
pageCount
:
1
,
total
:
10
,
total
:
10
,
...
@@ -121,13 +145,17 @@ export default {
...
@@ -121,13 +145,17 @@ export default {
this
.
getBooks
()
this
.
getBooks
()
},
},
methods
:
{
methods
:
{
showBookDetail
(
book
)
{
this
.
currentBook
=
book
;
this
.
dialogVisible
=
true
;
},
async
getBooks
(
page
=
1
)
{
async
getBooks
(
page
=
1
)
{
const
res
=
await
this
.
$api
.
service
.
getCodeBook
({
page
:
page
,
size
:
this
.
page
.
pageSize
})
const
res
=
await
this
.
$api
.
service
.
getCodeBook
({
page
:
page
,
size
:
this
.
page
.
pageSize
})
const
{
returnCode
,
data
}
=
res
;
const
{
returnCode
,
data
}
=
res
;
console
.
log
(
data
,
'datadatadatadata'
);
if
(
returnCode
===
"0"
)
{
if
(
returnCode
===
"0"
)
{
this
.
bookList
=
data
.
list
this
.
bookList
=
data
.
list
this
.
page
.
curr
ent
Page
=
data
.
currPage
this
.
page
.
currPage
=
data
.
currPage
this
.
page
.
total
=
data
.
totalCount
this
.
page
.
total
=
data
.
totalCount
this
.
page
.
pageCount
=
data
.
totalPage
this
.
page
.
pageCount
=
data
.
totalPage
}
}
...
@@ -137,6 +165,10 @@ export default {
...
@@ -137,6 +165,10 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.gs-book-detail-dialog
.el-dialog
.el-dialog__body
{
background-color
:
#FDFAF6
;
padding
:
28px
24px
;
}
.book.n-service
{
.book.n-service
{
.book-card
{
.book-card
{
display
:
flex
;
display
:
flex
;
...
...
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