yurong/.svn/pristine/f4/f40a6a32178d4bc6757ec1dc9d8...

83 lines
2.3 KiB
Plaintext

<template>
<view class="mt-20">
<view v-if="goodslist && goodslist[0]" class="w-710 ml-20 br-20">
<view class="h-246 p-all-20 mb-28 br-20 rows bgff" @tap="goInfoDet(item.id, item.busname)" v-for="(item,index) in goodslist">
<image :src="URL + item.image" mode="aspectFill" class="w-226 h-206 br-10"></image>
<view class="pl-21 rowsbl">
<view>
<view class="fs-30 col333 one_overflow">{{ item.busname }}</view>
<view class="fs-26 col999 mt-10 two_overflow">{{ item.introduce }}</view>
</view>
<view class="fs-26 w-420" style="color: #809C76;">
<view class="rows rowsm mb-12">
<image src="/static/shijian.png" class="w-32 h-32 mr-15"></image>
<text class="one_overflow">营业时间: {{ item.hours }}</text>
</view>
<view class="rowsb rowsm">
<view class="rows rowsm">
<image src="/static/weizhi.png" class="w-32 h-32 mr-15"></image>
<text class="w-260 one_overflow">{{ item.city }}</text>
</view>
<view class="one_overflow">{{ item.distance.toFixed(2) }}km</view>
</view>
</view>
</view>
</view>
</view>
<view v-else class="tct fs-26 pt-50 pb-30">
<image src="/static/icon_20.png" class="w-400 h-400"></image>
<view class="col888 mt-50">暂无相关商家</view>
</view>
</view>
</template>
<script>
export default {
name: "shopList",
data() {
return {
onIndex: -1,
};
},
methods: {
goInfoDet(id,name) {//去资讯详情
this.axiosFromToken('POST','index/hours', {
business_id: id
}, '加载中').then(res => {
if (res.data.do == 1) {
this.$tools.goNext(`/pages/index/pagesOne/mall/mallDet/mallDet?id=${id}&name=${name}&type=${this.type}`)
} else {
this.showtt('该店已打烊')
}
})
},
goShopDet(id) {//去商品详情
this.onIndex = -1
this.$tools.goNext(`/pagesOne/shopDet/shopDet?id=${id}`)
},
longtap(index) {
console.log(index,'长按')
this.onIndex = index
},
cancelLike() {
console.log('取消收藏')
this.onIndex = -1
}
},
props: {
goodslist: {
type: Array,
},
title: {
type: String
},
type: {}
}
}
</script>
<style>
</style>