Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
sheng du
yimei-miniapp
Commits
9f54adff
Commit
9f54adff
authored
10 months ago
by
sheng du
Browse files
Options
Download
Email Patches
Plain Diff
banner配置
parent
7a1a5316
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
4 deletions
+12
-4
src/api/common.ts
src/api/common.ts
+1
-1
src/pages/index/index.vue
src/pages/index/index.vue
+11
-3
No files found.
src/api/common.ts
View file @
9f54adff
...
...
@@ -8,7 +8,7 @@ export default {
// banner获取
xcxbanner
(
params
:
any
)
{
return
http
.
get
(
'
/prod-api/
biz/xcx
banner
'
,
{
params
});
return
http
.
get
(
'
/prod-api/
yimei/
banner
/list
'
,
{
params
});
},
// 小程序用户协议
...
...
This diff is collapsed.
Click to expand it.
src/pages/index/index.vue
View file @
9f54adff
...
...
@@ -20,7 +20,7 @@
</view>
<swiper
class=
"swiper"
circular
indicator-dots
>
<swiper-item
v-for=
"(item,index) in bannerList"
:key=
"index"
>
<view
class=
"swiper-item uni-bg-red"
>
<view
class=
"swiper-item uni-bg-red"
@
click=
"bannerClick(item)"
>
<image
:src=
"item.imgUrl"
class=
"banner-img"
mode=
""
></image>
</view>
</swiper-item>
...
...
@@ -250,13 +250,21 @@
const
getBannerList
=
async
()
=>
{
let
res
=
await
api
.
common
.
xcxbanner
()
console
.
log
(
res
);
bannerList
.
value
=
res
.
data
.
map
((
item
:
any
)
=>
{
bannerList
.
value
=
res
.
rows
.
map
((
item
:
any
)
=>
{
return
{
...
item
,
imgUrl
:
`
${
config
.
imageView
}${
item
.
im
age
}
`
,
imgUrl
:
`
${
config
.
imageView
}${
item
.
im
gAbsUrl
}
`
,
}
})
}
const
bannerClick
=
(
item
:
any
)
=>
{
if
(
item
.
goodsType
&&
item
.
goodsId
)
{
uni
.
navigateTo
({
url
:
`/pages/shop/projectDetail?id=
${
item
.
goodsId
}
&goodType=
${
item
.
goodsType
}
`
})
}
}
// cashierList
// const page = reactive({
// current: 1,
...
...
This diff is collapsed.
Click to expand it.
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