mkm
/
yanzhiAPP
Template
2
0
Fork 0
yanzhiAPP/pages/index3/xia.vue

211 lines
4.4 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view class="content">
<view style="height: var(--status-bar-height)"></view>
<view class="" style="display: flex;align-items: center;font-size: 33.29rpx;margin-bottom: 20rpx;">
<u--image @tap="backFn" src="/static/img/FH.png" width="50.82rpx" height="50.82rpx" alt=""></u--image>
<text>商品溯源</text>
</view>
<view class="head-img">
<view class="">
<u--image src="/static/img/YXBJ.jpg" width="693.93rpx" height=" 394.28rpx" alt=""></u--image>
</view>
<!-- <u--image :showLoading="true" :src="src" width="80px" height="80px" @click="click"></u--image> -->
<!-- <view class="poisition">
<view style="display: flex;">
<u--image src="/static/img/dw.png" style="margin: 0 5rpx;" width="35.05rpx"
height="35.05rpx"></u--image>
江阳区通滩镇1队123号
</view>
</view> -->
</view>
<view class="bad-info" v-for="(item,index) in data" :key="index">
<view class="tit">
{{item.tit}}
</view>
<view class="bad-info-cont">
<view class="" v-if="item.step">
<u-steps current="3" direction="column" activeColor="#3DD395">
<u-steps-item :title="item.des1" :desc="item.time1">
</u-steps-item>
<u-steps-item :title="item.des2" :desc="item.time2">
</u-steps-item>
<u-steps-item :title="item.des3" :desc="item.time3">
</u-steps-item>
</u-steps>
</view>
<view class="" style=" display: flex;" v-else>
<view class="">
<view class="bad-info-cont-li">
{{item.spmc}}
</view>
<view class="bad-info-cont-li">
{{item.scdz}}
</view>
<view class="bad-info-cont-li" v-show="item.scq">
{{item.scq}}
</view>
</view>
<view class="">
<view class="bad-info-cont-li">
{{item.spmc1}}
</view>
<view class="bad-info-cont-li">
{{item.scdz1}}
</view>
<view class="bad-info-cont-li" v-show="!item.scq1.includes('static')">
{{item.scq1}}
</view>
</view>
</view>
<view class="" v-if='item.img'>
<u--image :src="item.scq1" width="646.61rpx" height="529.21rpx" alt=""></u--image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: 'Hello',
data: [{
tit: "品类信息",
spmc: "商品名称",
scdz: "生产地址",
scq: "生长期",
img: false,
spmc1: "鲥鱼",
scdz1: "牟咀村西南294米",
scq1: "72天",
},
{
tit: "饲养",
spmc: "饲料名称",
scdz: "饲料用量",
scq: "饲养人",
img: false,
spmc1: "海豚鱼粮",
scdz1: "3Kg",
scq1: "赵志",
},
{
tit: "环境检测",
des1: "水质检测 负责人:刘明明",
des2: "水质检测 负责人:刘明明",
des3: "水质检测 负责人:刘明明",
time1: "2023-6-8",
time2: "2023-7-1",
time3: "2023-7-18",
step: true,
}, {
tit: "捕捞",
spmc: "捕捞时间",
scdz: "捕捞人",
scq: "图片",
img: true,
spmc1: "2023.8",
scdz1: "徐坤",
scq1: "/static/img/YX.jpg",
}
]
}
},
onLoad() {
},
methods: {
urlFn(name) {
return `/static/img/${name}.png`
},
img(w, h, m) {
return `width:${w}rpx;height:${h};margin:0 ${m}rpx `
},
backFn() {
uni.navigateBack()
},
navto() {
uni.navigateTo({
url: '/pages/index2/index'
})
}
}
}
</script>
<style lang="scss" scoped>
.content {
padding: 30rpx;
// background-color: grey;
background-image: url("/static/img/bgc.png");
background-size: cover;
}
.head-img {
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
margin: 0 auto;
position: relative;
.poisition {
opacity: 0.7;
position: absolute;
width: 380.26rpx;
height: 71rpx;
background-color: #FFFFFF;
left: 43rpx;
bottom: 36rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
display: flex;
align-items: center;
font-size: 29.79rpx;
.dw-cls {
margin: 0 5rpx;
}
}
}
.bad-info {
margin: 20rpx 0;
width: 693.93rpx;
.tit {
margin: 20rpx 0;
}
.bad-info-cont {
padding: 20rpx;
// padding-bottom: 0;
background-color: white;
// width: 693.93rpx;
// height: 140.19rpx;
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
// align-items: center;
}
.bad-info-cont-li {
margin-bottom: 30rpx;
}
}
</style>