首页更新

This commit is contained in:
魏啾
2024-05-07 17:23:52 +08:00
parent 3b85017f91
commit a9832d38af
12 changed files with 707 additions and 286 deletions

View File

@@ -0,0 +1,137 @@
<template>
<view class="content">
<view class="contentitem" v-for="(item,index) in list" :key="index">
<view class="contentitemone flex-between">
<view class="contentitemone_o">
{{item.shopName}}{{(item.chainName)}}
</view>
<u-icon name="phone-fill" color="#333333" size="50" @click="clickphone(item.phone)"></u-icon>
</view>
<view class="contentitemtow">
营业时间{{item.businessTime}}
</view>
<view class="contentitemthere flex-start">
<view class="contentitemthere_o" v-if="index == 0">
最近
</view>
<image class="contentitemthere_image"
src="https://czg-qr-order.oss-cn-beijing.aliyuncs.com/product/d.png" mode="aspectFill"></image>
<view class="contentitemthere_t">
距您{{item.distances}}km<text v-if="item.address">,{{item.address}}</text>
</view>
<u-icon name="arrow-right" color="#999999" size="28"></u-icon>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
shopName: '',
list:[]
};
},
onLoad(e) {
this.shopName = e.name
this.distirictcomShopList()
},
onShow() {},
methods: {
//打电话
clickphone(e) {
uni.makePhoneCall({
phoneNumber: e
});
},
async distirictcomShopList() {
let res = await this.api.distirictcomShopList({
lng: uni.cache.get('getLocationstorage').lng,
lat: uni.cache.get('getLocationstorage').lat,
address: uni.cache.get('getLocationstorage').address,
distanceInKm: '',
page: 1,
size: 10,
shopName: this.shopName
})
if (res.code == 0) {
this.list = res.data
}
},
clickproduct(item) {
uni.pro.navigateTo('product/index', item)
},
}
};
</script>
<style scoped lang="scss">
page {
background: #fff;
}
.content {
padding: 0 24rpx;
.contentitem:nth-child(1) {
border-top: none;
}
.contentitem {
padding: 32rpx 0;
width: 100%;
border-top: 2rpx solid #E5E5E5;
.contentitemone {
.contentitemone_o {
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 32rpx;
color: #333333;
}
}
.contentitemtow {
margin-top: 16rpx;
font-family: PingFang SC, PingFang SC;
font-weight: bold;
font-size: 24rpx;
color: #999999;
}
.contentitemthere {
margin-top: 16rpx;
.contentitemthere_o {
padding: 2rpx 12rpx;
background: #FFF9E1;
border-radius: 4rpx 4rpx 4rpx 4rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 500;
font-size: 16rpx;
color: #FF9125;
}
.contentitemthere_image {
width: 24rpx;
height: 24rpx;
}
.contentitemthere_t {
margin-left: 8rpx;
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #999999;
text{
font-family: Source Han Sans CN, Source Han Sans CN;
font-weight: 400;
font-size: 24rpx;
color: #999999;
}
}
}
}
}
</style>