yurong/pageOne/mes/collection.vue

49 lines
1.2 KiB
Vue

<template>
<view>
<view class="w100 rows rowsl rowsm">
<view class="w-690 h-332 rows rowsw rowsb" v-if="list.length>0">
<view class="rows rowsl w-332 rowsm mb-20 bgff br-20 pb-10" v-for="(item,index) in list" :key="index"
@click="$tools.goNext(`/pageOne/indexs/detail?id=${item.id}`)">
<image class="w-332 h-322 br-20" :src="$tools.oss(item.image)" mode="aspectFill"></image>
<view class="w100 pl-10 pr-10 two_overflow fs-28 mt-10 fw-b">
{{item.name}}
</view>
<view class="w100 rows rowsm pl-10 pr-10 mt-10 rowsb">
<text class="fs-30 fw-b" style="color: #E43B3B;">¥{{item.price}}</text>
<text class="fs-22 col666">销量{{item.sales}}</text>
</view>
</view>
</view>
<view class="w100 rows rowsc h-600 rowsm" v-else>
<image class="w-436 h-366" src="/static/other/5.png" mode=""></image>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
list:[]
}
},
onShow() {
this.userLike()
},
methods: {
userLike(){
this.$tools.axiosFromToken("POST","shop/userLike").then(res => {
this.list = res.data
})
}
}
}
</script>
<style>
page{
padding-top: 20rpx;
background-color: #F7F6FA;
}
</style>