65 lines
1.3 KiB
Vue
65 lines
1.3 KiB
Vue
<template>
|
|
<view>
|
|
<view class="footlist">
|
|
<view class="list" v-for="(it,id) in list" :key="it" @click="handleDetail(it.id)">
|
|
<view class="topimg">
|
|
<image :src="it.cover" class="img" mode="aspectFill"></image>
|
|
</view>
|
|
<view class="item">
|
|
<view class="title">{{it.title}}</view>
|
|
<view class="name">
|
|
<image :src="it.create_user_head_pic"></image>
|
|
<text class="overflow">{{it.create_user_nickname}}</text>
|
|
</view>
|
|
<view class="zan">
|
|
<icon class="iconfont" :class="[it.is_me_like_it=='yes'?'icon-icon3':'icon-icon_collect']">
|
|
</icon>
|
|
<text>{{it.likes_num}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="!list.length" class="nolist">
|
|
<icon class="iconfont icon-wancan"></icon>
|
|
<text>还没有记录哦</text>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
name: "list",
|
|
data() {
|
|
return {};
|
|
},
|
|
props: {
|
|
title: {
|
|
type: String,
|
|
default: ''
|
|
},
|
|
list: {
|
|
type: Array,
|
|
default: []
|
|
}
|
|
},
|
|
mounted() {
|
|
let that = this
|
|
},
|
|
methods: {
|
|
// 商品详情
|
|
handleDetail(id) {
|
|
if (!uni.getStorageSync('token')) {
|
|
this.$tools.msg("登录后查看等多!")
|
|
return
|
|
}
|
|
uni.navigateTo({
|
|
url: "/pageTwo/me/menudetail?id=" + id
|
|
})
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
|
|
</style> |