Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
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
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
7b420ede
Commit
7b420ede
authored
Aug 12, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
相册接口对接完毕
parent
cacce69c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
67 additions
and
21 deletions
+67
-21
photo.js
src/api/photo.js
+10
-0
card.vue
src/pages/assistingAgriculture/album/card.vue
+12
-9
index.vue
src/pages/assistingAgriculture/album/index.vue
+38
-5
card.vue
src/pages/assistingAgriculture/commentList/card.vue
+7
-7
No files found.
src/api/photo.js
0 → 100644
View file @
7b420ede
import
{
request
}
from
'../utils/request'
;
// 查询商家相册列表
export
function
getPhoto
(
data
)
{
return
request
({
url
:
`/sgyrdd/photo/getPhoto`
,
method
:
'GET'
,
data
,
});
}
src/pages/assistingAgriculture/album/card.vue
View file @
7b420ede
<
template
>
<div
class=
"card"
>
<div
class=
"card"
v-for=
"(item, index) in photoData"
:key=
"index"
>
<div
class=
"img-wrap"
>
<wd-img
v-for=
"v in 3"
:key=
"v"
:src=
"`/src/static/assistingAgriculture/comment/$
{v}.png`"
enable-preview
/>
<wd-img
v-for=
"(item, index) in item.images"
:key=
"index"
:src=
"item"
enable-preview
/>
</div>
<div
class=
"text"
>
跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...跟团游行程紧凑有序,充分利用了时间,让游客...
{{
item
.
evaluation
}}
</div>
<div
class=
"user-info flex-between"
>
<div
class=
"info flex-align-center"
>
...
...
@@ -24,7 +19,15 @@
</div>
</
template
>
<
script
setup
></
script
>
<
script
setup
>
const
showMore
=
ref
(
false
);
const
props
=
defineProps
({
photoData
:
{
type
:
Array
,
default
:
()
=>
[],
},
});
</
script
>
<
style
lang=
"scss"
scoped
>
.card
{
...
...
src/pages/assistingAgriculture/album/index.vue
View file @
7b420ede
<
template
>
<div
class=
"album"
>
<scroll-view
class=
"content"
scroll-y
>
<div
class=
"filter-box"
>
<scroll-view
class=
"content"
@
scrolltolower=
"scrolltolower"
scroll-y
>
<
!--
<
div
class=
"filter-box"
>
<div
class=
"active"
>
全部
</div>
<div
v-for=
"(v, i) in filterList"
:key=
"i"
>
{{
v
.
text
}}
(
{{
v
.
value
}}
)
</div>
</div>
</div>
-->
<div
class=
"card-wrap"
>
<card
v-for=
"v in 13"
:key=
"v
"
/>
<card
:photoData=
"photoData
"
/>
</div>
</scroll-view>
<div
class=
"back"
>
...
...
@@ -17,6 +17,9 @@
<
script
setup
>
import
card
from
'./card.vue'
;
import
{
getPhoto
}
from
'../../../api/photo'
;
const
imgUrl
=
import
.
meta
.
env
.
VITE_APP_IMG_URL
;
// let total
const
filterList
=
[
{
text
:
'家人'
,
...
...
@@ -59,6 +62,36 @@ const filterList = [
value
:
514
,
},
];
const
photoData
=
ref
([]);
const
params
=
{
prodId
:
'43828'
,
shopId
:
'1818876196597334017'
,
};
onLoad
(()
=>
{
getPhotoFn
();
});
// const scrolltolower = () => {
// console.log('触底加载触底加载触底加载');
// if (commentData.value.length
<
total
)
{
// commentParameters.current++;
// getCommentListFn();
// return;
// }
// show.value = true;
// };
const
getPhotoFn
=
()
=>
{
getPhoto
(
params
).
then
((
res
)
=>
{
res
.
data
.
forEach
((
v
)
=>
{
if
(
v
.
images
)
{
v
.
images
=
v
.
images
.
split
(
','
).
map
((
item
)
=>
{
item
=
imgUrl
+
item
;
return
item
;
});
}
});
photoData
.
value
=
[...
photoData
.
value
,
...
res
.
data
];
});
};
</
script
>
<
style
lang=
"scss"
scoped
>
...
...
@@ -94,7 +127,7 @@ uni-page-body {
}
}
.card-wrap
{
margin-top
:
5px
;
//
margin-top: 5px;
display
:
grid
;
grid-template-columns
:
1fr
1fr
;
gap
:
5px
;
...
...
src/pages/assistingAgriculture/commentList/card.vue
View file @
7b420ede
...
...
@@ -5,7 +5,7 @@
<img
:src=
"item.avatar"
alt=
""
/>
<div
class=
"name"
>
<p>
{{
item
.
nickName
}}
</p>
<
div
class=
"grade flex-align-center"
>
5.0分
</div
>
<
text
class=
"grade flex-align-center"
>
5.0分
</text
>
</div>
</div>
<div
class=
"info"
>
{{
item
.
createTime
[
0
]
}}
发表
</div>
...
...
@@ -55,15 +55,15 @@ const props = defineProps({
}
.grade
{
margin-top
:
18rpx
;
display
:
inline-block
;
font-size
:
16rpx
;
background
:
rgba
(
253
,
223
,
109
,
0
.1686
);
line-height
:
24rpx
;
color
:
#e1961d
;
// width: 116
rpx;
border-radius
:
200
rpx
;
// padding-left: 32rpx;
box-sizing
:
border-box
;
position
:
relative
;
padding
:
2rpx
10
rpx
;
border-radius
:
16
rpx
;
//
//
padding-left: 32rpx;
//
box-sizing: border-box;
//
position: relative;
// img {
// height: 24rpx;
// 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