Commit 9f54adff authored by sheng du's avatar sheng du
Browse files

banner配置

parent 7a1a5316
......@@ -8,7 +8,7 @@ export default {
// banner获取
xcxbanner(params : any) {
return http.get('/prod-api/biz/xcxbanner', { params });
return http.get('/prod-api/yimei/banner/list', { params });
},
// 小程序用户协议
......
......@@ -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.image}`,
imgUrl: `${config.imageView}${item.imgAbsUrl}`,
}
})
}
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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment