罗世杰:feat:商铺展示列表提供两种样式
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
<view>
|
<view>
|
||||||
<SearchShopListItem
|
<SearchShopListItem
|
||||||
v-for="item in shopInfoList"
|
v-for="item in shopInfoList"
|
||||||
|
:key="searchid"
|
||||||
:shopInfo="item"
|
:shopInfo="item"
|
||||||
></SearchShopListItem>
|
></SearchShopListItem>
|
||||||
</view>
|
</view>
|
||||||
@@ -24,6 +25,7 @@
|
|||||||
default() {
|
default() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
searchid: 1,
|
||||||
title: '寻找旺铺,200平米左右,寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
|
title: '寻找旺铺,200平米左右,寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
|
||||||
price: 5000,
|
price: 5000,
|
||||||
date: '2023-11-02',
|
date: '2023-11-02',
|
||||||
@@ -34,6 +36,7 @@
|
|||||||
sqr: 500
|
sqr: 500
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
searchid: 2,
|
||||||
title: '寻找旺铺,200平米左右,寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
|
title: '寻找旺铺,200平米左右,寻找旺铺,200平米左右寻找旺铺,200平米左右寻找旺铺,200平米左右',
|
||||||
price: 7000,
|
price: 7000,
|
||||||
date: '2023-11-02',
|
date: '2023-11-02',
|
||||||
|
|||||||
@@ -88,10 +88,10 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
box-shadow: 0 1px 2px 0 rgba(224, 224, 224, 0.50);
|
box-shadow: 0 1px 2px 0 rgba(224, 224, 224, 0.50);
|
||||||
|
font-size: 12px;
|
||||||
.list-container {
|
.list-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
font-size: 12px;
|
|
||||||
}
|
}
|
||||||
.text-area {
|
.text-area {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -2,7 +2,10 @@
|
|||||||
<view>
|
<view>
|
||||||
<ShowShopListItem
|
<ShowShopListItem
|
||||||
v-for="item in shopInfoList"
|
v-for="item in shopInfoList"
|
||||||
|
:key="shopid"
|
||||||
:shopInfo="item"
|
:shopInfo="item"
|
||||||
|
:is-adshow="isADshow"
|
||||||
|
:show-style="showStyle"
|
||||||
></ShowShopListItem>
|
></ShowShopListItem>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -10,6 +13,8 @@
|
|||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* @property {Array} shopInfoList 对象数组,(带图片)需要展示的商铺列表
|
* @property {Array} shopInfoList 对象数组,(带图片)需要展示的商铺列表
|
||||||
|
* @property {Number} showStyle 展示商铺的样式类型(0为首页默认)
|
||||||
|
* @property {Boolean} isADshow 是否显示推广广告
|
||||||
*/
|
*/
|
||||||
export default {
|
export default {
|
||||||
name:"ShowShopList",
|
name:"ShowShopList",
|
||||||
@@ -19,27 +24,51 @@
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
|
showStyle:{
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isADshow: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
shopInfoList: {
|
shopInfoList: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default() {
|
default() {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
|
shopid: 1,
|
||||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
||||||
title: '琴行铺面转让',
|
title: '琴行铺面转让',
|
||||||
promotionNum: 23,
|
promotionNum: 23,
|
||||||
price: 6000,
|
price: 6000,
|
||||||
date: '2023-11-02',
|
date: '2023-11-02',
|
||||||
pos: '锦江区',
|
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',
|
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
||||||
title: '琴行铺面转让',
|
title: '琴行铺面转让',
|
||||||
promotionNum: 28,
|
promotionNum: 28,
|
||||||
price: 5000,
|
price: 5000,
|
||||||
date: '2023-11-02',
|
date: '2023-11-02',
|
||||||
pos: '锦江区',
|
pos: '锦江区',
|
||||||
sqr: 200
|
exactPos: '锦江区-汇源南路366号',
|
||||||
|
sqr: 200,
|
||||||
|
zrfText: "转让费:30万",
|
||||||
|
category: '餐饮美食',
|
||||||
|
uname: "王先生",
|
||||||
|
phoneNum: 13348946108,
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,27 +6,62 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="text-area">
|
<view class="text-area">
|
||||||
<text style="font-weight: 500;">{{shopInfo.title}}</text>
|
<text style="font-weight: 500;">{{shopInfo.title}}</text>
|
||||||
<view class="pos-and-sqr">
|
<view v-if="showStyle == 0" class="pos-and-sqr" >
|
||||||
|
<view>
|
||||||
<view>
|
<view>
|
||||||
<view>
|
<u-image src="/static/shoplist/sy_icon_lbdw.png" width="12px" height="15px"></u-image>
|
||||||
<u-image src="/static/shoplist/sy_icon_lbdw.png" width="12px" height="15px"></u-image>
|
|
||||||
</view>
|
|
||||||
<text>{{shopInfo.pos}}</text>
|
|
||||||
</view>
|
|
||||||
<view>
|
|
||||||
<view>
|
|
||||||
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
|
||||||
</view>
|
|
||||||
<text>{{shopInfo.sqr}}m2</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
<text>{{shopInfo.pos}}</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.sqr}}m2</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-else class="pos-and-sqr pos-only" >
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/dp_icon_hhhdw.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.exactPos}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
<view class="rent-and-date">
|
<view class="rent-and-date">
|
||||||
<text>租金:{{shopInfo.price}}元/月</text>
|
<text>租金:{{shopInfo.price}}元/月</text>
|
||||||
<text>发布日期:{{shopInfo.date}}</text>
|
<text v-if="showStyle==0">发布日期:{{shopInfo.date}}</text>
|
||||||
|
<text v-else="showStyle==1 ">{{shopInfo.zrfText}}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="list-ads" style="font-size: 11px;">
|
<view class="cart-and-date" v-if="showStyle==1">
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/sy_icon_lbpm.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.sqr}}m2</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/sy_icon_lblhy.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.category}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/sy_icon_lbxm.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.uname}}</text>
|
||||||
|
</view>
|
||||||
|
<view>
|
||||||
|
<view>
|
||||||
|
<u-image src="/static/shoplist/sy_icon_lblxr.png" width="12px" height="15px"></u-image>
|
||||||
|
</view>
|
||||||
|
<text>{{shopInfo.phoneNum}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="isADShow" class="list-ads" style="font-size: 11px;">
|
||||||
<view>
|
<view>
|
||||||
<text>已将该店推给 </text>
|
<text>已将该店推给 </text>
|
||||||
<text style="color:#ce3b3b;margin: 0 4px;"> {{shopInfo.promotionNum}} </text>
|
<text style="color:#ce3b3b;margin: 0 4px;"> {{shopInfo.promotionNum}} </text>
|
||||||
@@ -47,17 +82,22 @@
|
|||||||
type:Object,
|
type:Object,
|
||||||
default(){
|
default(){
|
||||||
return {
|
return {
|
||||||
imageUrl: 'https://alifei01.cfp.cn/creative/vcg/800/new/VCG41175510742.jpg',
|
|
||||||
title: '琴行铺面转让',
|
|
||||||
promotionNum: 23,
|
|
||||||
price: 5000,
|
|
||||||
date: '2023-11-02',
|
|
||||||
pos: '锦江区',
|
|
||||||
sqr: 200
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
showStyle:{
|
||||||
|
type: Number,
|
||||||
|
default() {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
isADShow: {
|
||||||
|
type: Boolean,
|
||||||
|
default() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -79,11 +119,11 @@
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 7px;
|
border-radius: 7px;
|
||||||
box-shadow: 0 1px 2px 0 rgba(224, 224, 224, 0.50);
|
box-shadow: 0 1px 2px 0 rgba(224, 224, 224, 0.50);
|
||||||
|
font-size: 12px;
|
||||||
.list-container {
|
.list-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
font-size: 12px;
|
|
||||||
}
|
}
|
||||||
.text-area {
|
.text-area {
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
@@ -93,6 +133,7 @@
|
|||||||
> text {
|
> text {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pos-and-sqr {
|
.pos-and-sqr {
|
||||||
display: flex;
|
display: flex;
|
||||||
text {
|
text {
|
||||||
@@ -107,6 +148,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.pos-only {
|
||||||
|
text {
|
||||||
|
color: #A0A0A0;
|
||||||
|
}
|
||||||
|
}
|
||||||
.rent-and-date {
|
.rent-and-date {
|
||||||
text {
|
text {
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
@@ -115,6 +161,25 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.cart-and-date {
|
||||||
|
display: flex;
|
||||||
|
border-top: 1px solid #f7f7f7;
|
||||||
|
padding-top: 5px;
|
||||||
|
margin-bottom: 6px;
|
||||||
|
justify-content: space-between;
|
||||||
|
font-weight: 500;
|
||||||
|
text {
|
||||||
|
color: #359867;
|
||||||
|
line-height: 12px;
|
||||||
|
}
|
||||||
|
>view {
|
||||||
|
flex:1;
|
||||||
|
display: flex;
|
||||||
|
>view {
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.list-ads {
|
.list-ads {
|
||||||
border-top: 1px solid #f7f7f7;
|
border-top: 1px solid #f7f7f7;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
|||||||
BIN
static/shoplist/dp_icon_hhhdw.png
Normal file
BIN
static/shoplist/dp_icon_hhhdw.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
static/shoplist/sy_icon_lblhy.png
Normal file
BIN
static/shoplist/sy_icon_lblhy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Reference in New Issue
Block a user