cashier_weapp/pages/product/generalstore.vue

140 lines
3.0 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<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}}<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 = JSON.parse(decodeURIComponent(e.name));
console.log(this.shopName)
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',{
id:item.id
})
},
}
};
</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>