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
29a12846
Commit
29a12846
authored
Dec 08, 2021
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 条码图书接口调试
parent
05e671ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
26 deletions
+35
-26
book.vue
src/views/Service/book.vue
+35
-26
No files found.
src/views/Service/book.vue
View file @
29a12846
...
@@ -6,16 +6,17 @@
...
@@ -6,16 +6,17 @@
<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"
:key=
"i"
v-for=
"(item,i) in bookList"
>
<div
class=
"book-img"
>
<div
class=
"book-img"
>
<img
:src=
"item.
img
"
alt=
""
>
<img
:src=
"item.
graph
"
alt=
""
>
</div>
</div>
<div
class=
"book-content"
>
<div
class=
"book-content"
>
<div
class=
"title"
>
{{
item
.
name
}}
</div>
<div
class=
"title"
>
{{
item
.
pre
name
}}
</div>
<div
class=
"price"
>
¥
{{
item
.
price
}}
</div>
<div
class=
"price"
>
¥
{{
item
.
price
}}
</div>
<div
class=
"desc"
>
<div
class=
"desc"
>
<span>
{{
item
.
author
}}
著
</span>
|
<span>
{{
item
.
date
}}
</span>
|
<span>
{{
item
.
press
}}
</span>
<span>
{{
item
.
author
}}
著
</span>
|
<span>
{{
item
.
predate
}}
</span>
|
<span>
{{
item
.
company
}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
<pages
:pages=
"page"
@
toPagesFather=
"getBooks"
></pages>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"软件下载"
name=
"second"
>
<el-tab-pane
label=
"软件下载"
name=
"second"
>
...
@@ -52,7 +53,10 @@
...
@@ -52,7 +53,10 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
pages
from
"../comps/pages.vue"
;
export
default
{
export
default
{
components
:
{
pages
},
data
()
{
data
()
{
return
{
return
{
activeName
:
'second'
,
activeName
:
'second'
,
...
@@ -96,27 +100,27 @@ export default {
...
@@ -96,27 +100,27 @@ export default {
},
},
],
],
bookList
:
[],
bookList
:
[],
page
:
{
currentPage
:
1
,
pageSize
:
10
,
pageCount
:
1
,
total
:
10
,
},
}
}
},
},
created
()
{
created
()
{
this
.
getBooks
()
this
.
getBooks
()
},
},
methods
:
{
methods
:
{
getBooks
()
{
async
getBooks
(
page
=
1
)
{
for
(
let
i
=
0
;
i
<
10
;
++
i
)
{
const
res
=
await
this
.
$api
.
service
.
getCodeBook
({
page
:
page
,
size
:
this
.
page
.
pageSize
})
this
.
bookList
.
push
(
const
{
returnCode
,
data
}
=
res
;
{
if
(
returnCode
===
"0"
)
{
id
:
i
,
this
.
bookList
=
data
.
list
name
:
'条码小达人'
,
this
.
page
.
currentPage
=
data
.
currPage
img
:
require
(
'./img/5d1d4969-956a-4a85-9631-e45605b0c221.jpg'
),
this
.
page
.
total
=
data
.
totalCount
price
:
30.00
,
this
.
page
.
pageCount
=
data
.
totalPage
author
:
'张海成 张铎'
,
date
:
'2010.1'
,
press
:
'武汉大学出版社'
},
)
}
}
console
.
log
(
this
.
bookList
)
}
}
}
}
};
};
...
@@ -132,9 +136,11 @@ export default {
...
@@ -132,9 +136,11 @@ export default {
border
:
1px
solid
rgba
(
197
,
216
,
238
,
0.5
);
border
:
1px
solid
rgba
(
197
,
216
,
238
,
0.5
);
margin-bottom
:
30px
;
margin-bottom
:
30px
;
cursor
:
pointer
;
cursor
:
pointer
;
&:hover{
&:hover
{
box-shadow
:
0
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
box-shadow
:
0
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
}
}
.book-img
{
.book-img
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -151,26 +157,27 @@ export default {
...
@@ -151,26 +157,27 @@ export default {
.book-content
{
.book-content
{
padding
:
16px
20px
;
padding
:
16px
20px
;
.title
{
>
.title
{
font-size
:
21px
;
font-size
:
21px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#454545
;
color
:
#454545
;
margin-bottom
:
46px
;
height
:
70px
;
overflow
:
hidden
;
}
}
.price
{
>
.price
{
font-size
:
32px
;
font-size
:
32px
;
font-weight
:
500
;
font-weight
:
500
;
color
:
#F23535
;
color
:
#F23535
;
line-height
:
45px
;
line-height
:
45px
;
margin-bottom
:
20
px
;
margin-bottom
:
15
px
;
}
}
.desc
{
>
.desc
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
line-height
:
20
px
;
line-height
:
18
px
;
}
}
}
}
}
}
...
@@ -183,9 +190,11 @@ export default {
...
@@ -183,9 +190,11 @@ export default {
border
:
1px
solid
rgba
(
197
,
216
,
238
,
0.5
);
border
:
1px
solid
rgba
(
197
,
216
,
238
,
0.5
);
margin-bottom
:
25px
;
margin-bottom
:
25px
;
cursor
:
pointer
;
cursor
:
pointer
;
&:hover{
&:hover
{
box-shadow
:
0px
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
box-shadow
:
0px
4px
15px
2px
rgba
(
4
,
64
,
141
,
0.08
);
}
}
.app-img
{
.app-img
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
@@ -253,7 +262,7 @@ export default {
...
@@ -253,7 +262,7 @@ export default {
}
}
}
}
.el-tabs__content
{
.el-tabs__content
{
padding-top
:
14px
;
padding-top
:
14px
;
}
}
}
}
...
...
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