54 lines
1.0 KiB
Vue
54 lines
1.0 KiB
Vue
<template>
|
|
<view class="footlist">
|
|
<view class="list" v-for="(it,id) in footlist" :key="it" @click="handleDetail(it)">
|
|
<view class="topimg">
|
|
<image :src="it.image" class="img" mode="aspectFill"></image>
|
|
</view>
|
|
<view class="item">
|
|
<view class="title">{{it.title}}</view>
|
|
<view class="name">
|
|
<image :src="it.head"></image>
|
|
<text>{{it.name}}</text>
|
|
</view>
|
|
<view class="zan" @click="handleZan(it)">
|
|
<icon class="iconfont" :class="[it.iszan?'icon-icon3':'icon-icon_collect']"></icon>
|
|
<text>{{it.zan}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "list",
|
|
data() {
|
|
return {
|
|
footlist: []
|
|
};
|
|
},
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
}
|
|
},
|
|
mounted() {
|
|
let that = this
|
|
that.footlist = that.$json.footlist
|
|
},
|
|
methods: {
|
|
// 商品详情
|
|
handleDetail() {
|
|
uni.navigateTo({
|
|
url: "/pageTwo/me/menudetail?title=" + this.title
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style>
|