Sprinkler-app/page_user/photolist.vue

136 lines
2.5 KiB
Vue
Raw Normal View History

2024-10-09 16:52:44 +08:00
<template>
<view>
<u-navbar :is-back="true" title='识图' title-color="#000" :border-bottom="false" :background="bgc"
id="navbar">
</u-navbar>
2024-10-17 18:00:05 +08:00
<image class="bj" :src="cartpic" mode="aspectFit"></image>
2024-10-09 16:52:44 +08:00
<view class="list">
2024-10-17 18:00:05 +08:00
<view class="list_val" v-for="(item,index) in zwlist" :key="index" @click="btnxq(item.plantId)">
2024-10-09 16:52:44 +08:00
<view class="lt">
2024-10-17 18:00:05 +08:00
<image :src="item.url" mode=""></image>
2024-10-09 16:52:44 +08:00
</view>
<view class="rt">
<view class="name">
2024-10-17 18:00:05 +08:00
<text>{{item.name}}</text> <text style="color: #48893B;font-size: 32rpx;">{{Number(item.score * 100).toFixed(1) + '%'}}</text>
2024-10-09 16:52:44 +08:00
</view>
<view class="wz">
2024-10-17 18:00:05 +08:00
{{item.msg == null ? '暂无简介' : item.msg}}
2024-10-09 16:52:44 +08:00
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
bgc: {
backgroundColor: "#fff",
},
2024-10-17 18:00:05 +08:00
cartpic:'',
zwlist:[]
2024-10-09 16:52:44 +08:00
}
},
2024-10-18 17:59:38 +08:00
// 分享到好友(会话)
onShareAppMessage: function() {
return {
title: '绿小能',
path: '/pages/index/index'
}
},
// 分享到朋友圈
onShareTimeline: function() {
return {
title: '绿小能',
query: '',
path: '/pages/index/index'
}
},
2024-10-17 18:00:05 +08:00
onLoad(option) {
this.cartpic = JSON.parse(option.cart)
this.zwlist = JSON.parse(option.list)
2024-10-09 16:52:44 +08:00
},
methods:{
2024-10-17 18:00:05 +08:00
btnxq(plantId){
2024-10-09 16:52:44 +08:00
uni.navigateTo({
2024-10-17 18:00:05 +08:00
url:'/page_user/photoxq?plantId=' + plantId
2024-10-09 16:52:44 +08:00
})
}
}
}
</script>
<style lang="less">
/deep/ .u-title{
margin-bottom: 22rpx;
}
/deep/ .uicon-nav-back{
margin-bottom: 22rpx;
}
2024-10-17 18:00:05 +08:00
page{
background-color: #000;
}
2024-10-09 16:52:44 +08:00
.list{
width: 100%;
position: fixed;
2024-10-17 18:00:05 +08:00
bottom: 90rpx;
2024-10-09 16:52:44 +08:00
display: flex;
overflow: scroll;
align-items: center;
.list_val{
width: 476rpx;
height: 198rpx;
background: rgba(255,255,255,0.2);
border-radius: 16rpx 16rpx 16rpx 16rpx;
display: flex;
margin-left: 28rpx;
margin-right: 28rpx;
padding: 30rpx;
box-sizing: border-box;
.lt{
image{
width: 140rpx;
height: 140rpx;
margin-right: 18rpx;
}
}
.rt{
.name{
width: 100%;
display: flex;
justify-content: space-between;
margin-bottom: 6rpx;
font-size: 32rpx;
color: #fff;
}
.wz{
font-size: 28rpx;
color: #D8D8D8;
width: 276rpx;
height: 90rpx;
overflow: scroll;
}
}
}
}
.bj{
width: 100%;
2024-10-17 18:00:05 +08:00
height: 70vh;
2024-10-09 16:52:44 +08:00
position: fixed;
2024-10-17 18:00:05 +08:00
top: 120rpx;
2024-10-09 16:52:44 +08:00
left: 0;
}
</style>