罗世杰:feat:商铺展示列表提供两种样式

This commit is contained in:
LuoShijie
2023-11-06 13:33:46 +08:00
parent fe193fff99
commit 7523e0e262
6 changed files with 122 additions and 25 deletions

View File

@@ -2,7 +2,10 @@
<view>
<ShowShopListItem
v-for="item in shopInfoList"
:key="shopid"
:shopInfo="item"
:is-adshow="isADshow"
:show-style="showStyle"
></ShowShopListItem>
</view>
</template>
@@ -10,6 +13,8 @@
<script>
/**
* @property {Array} shopInfoList 对象数组,(带图片)需要展示的商铺列表
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
* @property {Boolean} isADshow 是否显示推广广告
*/
export default {
name:"ShowShopList",
@@ -19,27 +24,51 @@
};
},
props: {
showStyle:{
type: Number,
default() {
return 0
}
},
isADshow: {
type: Boolean,
default() {
return true
}
},
shopInfoList: {
type: Array,
default() {
return [
{
shopid: 1,
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
title: '琴行铺面转让',
promotionNum: 23,
price: 6000,
date: '2023-11-02',
pos: '锦江区',
sqr: 100
exactPos: '锦江区-汇源南路366号',
sqr: 100,
zrfText: "转让费20万",
category: '餐饮美食',
uname: "张先生",
phoneNum: 13348946108,
},
{
shopid: 2,
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
title: '琴行铺面转让',
promotionNum: 28,
price: 5000,
date: '2023-11-02',
pos: '锦江区',
sqr: 200
exactPos: '锦江区-汇源南路366号',
sqr: 200,
zrfText: "转让费30万",
category: '餐饮美食',
uname: "王先生",
phoneNum: 13348946108,
}
]
}