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

206 lines
4.5 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/GJBG.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" v-if="!(item.scdz1.includes('/static'))">
{{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: "生长期",
spmc1: "蜜桔",
scdz1: "分水岭大南山北326米",
scq1: "125天",
img: false
}, {
tit: "施肥",
des1: "桔丰1号2kg 施肥人:韦军",
des2: "华东化肥1.5kg 施肥人:张鹏飞",
des3: "承平洋化肥2.7kg 施肥人:陈明",
time1: "2023-5-15",
time2: "2023-6-1",
time3: "2023-6-29",
step: true,
}, {
tit: "打药",
des1: "宝卓 30%乙唑螨腈2kg 打药人:韦军",
des2: "抑霉唑1.5kg 打药人:张鹏飞",
des3: "噻菌灵2.7kg 打药人:陈明",
time1: "2023-5-20",
time2: "2023-6-18",
time3: "2023-7-5",
step: true,
}, {
tit: "采摘",
spmc: "采摘时间",
scdz: "采摘人",
scq: "果园图片",
img: true,
spmc1: "2023-9-20",
scdz1: "李莲芳",
scq1: "/static/img/GJ.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>