This commit is contained in:
parent
90cb3619f5
commit
60f72cf533
|
@ -2,8 +2,8 @@
|
||||||
"name" : "养殖溯源",
|
"name" : "养殖溯源",
|
||||||
"appid" : "__UNI__C509A32",
|
"appid" : "__UNI__C509A32",
|
||||||
"description" : "",
|
"description" : "",
|
||||||
"versionName" : "1.0.3",
|
"versionName" : "1.0.4",
|
||||||
"versionCode" : 103,
|
"versionCode" : 104,
|
||||||
"transformPx" : false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus" : {
|
"app-plus" : {
|
||||||
|
|
|
@ -221,7 +221,9 @@
|
||||||
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
|
||||||
datalist.splice(0, datalist.length, ...res.data)
|
res.data.forEach(item=>{
|
||||||
|
datalist.push(item)
|
||||||
|
})
|
||||||
res.data.detai
|
res.data.detai
|
||||||
// console.log(res.data)
|
// console.log(res.data)
|
||||||
}
|
}
|
||||||
|
|
|
@ -213,9 +213,9 @@
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
|
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
dataList.splice(0, dataList.length, ...res.data);
|
res.data.forEach(item=>{
|
||||||
dataList.forEach(item => {
|
|
||||||
item.showCode = false
|
item.showCode = false
|
||||||
|
dataList.push(item)
|
||||||
})
|
})
|
||||||
console.log(dataList)
|
console.log(dataList)
|
||||||
}
|
}
|
||||||
|
|
|
@ -298,7 +298,9 @@
|
||||||
item.pic = JSON.parse(item.pic||'[]');
|
item.pic = JSON.parse(item.pic||'[]');
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
dataList.splice(0, dataList.length, ...res.data.lists);
|
res.data.lists.forEach(item=>{
|
||||||
|
dataList.push(item)
|
||||||
|
})
|
||||||
// console.log(dataList)
|
// console.log(dataList)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -8,10 +8,13 @@
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<u--image @click="perviewFn(item.pic[0])" radius='10' :src="item.pic[0]" width="250rpx"
|
<u--image @click="perviewFn(item.pic[0])" radius='10' :src="item.pic[0]" width="250rpx"
|
||||||
height="250rpx"></u--image>
|
height="250rpx"></u--image>
|
||||||
<u---image class="qr-code" @click="showBarCode(item)" src="/static/main/house/su_yuan_ma_btn.png" width="60rpx" height="60rpx"></u---image>
|
<u---image class="qr-code" @click="showBarCode(item)" src="/static/main/house/su_yuan_ma_btn.png"
|
||||||
|
width="60rpx" height="60rpx"></u---image>
|
||||||
</view>
|
</view>
|
||||||
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx" @click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}&house_id=${item.fence_house_id}`)"></u--image>
|
<u--image src="/static/main/house/xia_yi_ji_btn.png" class="next" width="38rpx" height="38rpx"
|
||||||
<view class="right" style="color: #7B7B7B;" @click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}&house_id=${item.fence_house_id}`)">
|
@click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}&house_id=${item.fence_house_id}`)"></u--image>
|
||||||
|
<view class="right" style="color: #7B7B7B;"
|
||||||
|
@click="navTo(`/pages/plantAdmin/breedDetail?id=${item.id}&house_id=${item.fence_house_id}`)">
|
||||||
<view class="name">{{item.sn}}</view>
|
<view class="name">{{item.sn}}</view>
|
||||||
<view class="r-item">
|
<view class="r-item">
|
||||||
<view class="item-title">品类:</view>
|
<view class="item-title">品类:</view>
|
||||||
|
@ -60,7 +63,6 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {
|
import {
|
||||||
ref,
|
ref,
|
||||||
reactive
|
reactive
|
||||||
|
@ -89,12 +91,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = ref({
|
const options = ref({
|
||||||
code: '',// 生成二维码的值
|
code: '', // 生成二维码的值
|
||||||
size: 460,// 460代表生成的二维码的宽高均为460rpx
|
size: 460, // 460代表生成的二维码的宽高均为460rpx
|
||||||
})
|
})
|
||||||
|
|
||||||
const qrCode = ref('');
|
const qrCode = ref('');
|
||||||
const saveCode = async ()=>{//保存二维码图片
|
const saveCode = async () => { //保存二维码图片
|
||||||
const img = await qrCode.value.GetCodeImg()
|
const img = await qrCode.value.GetCodeImg()
|
||||||
uni.saveImageToPhotosAlbum({
|
uni.saveImageToPhotosAlbum({
|
||||||
filePath: img.tempFilePath,
|
filePath: img.tempFilePath,
|
||||||
|
@ -115,7 +117,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const codeRef = ref(null);
|
const codeRef = ref(null);
|
||||||
const showBarCode = (e)=>{
|
const showBarCode = (e) => {
|
||||||
options.value.code = 'd_' + e.sn;
|
options.value.code = 'd_' + e.sn;
|
||||||
codeRef.value.open();
|
codeRef.value.open();
|
||||||
}
|
}
|
||||||
|
@ -157,23 +159,25 @@
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data.lists = res.data.lists.map(item => {
|
res.data.lists = res.data.lists.map(item => {
|
||||||
item.showCode = false;
|
item.showCode = false;
|
||||||
item.pic = JSON.parse(item.pic||'[]');
|
item.pic = JSON.parse(item.pic || '[]');
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
dataList.splice(0, dataList, ...res.data.lists);
|
res.data.lists.forEach(item => {
|
||||||
|
dataList.push(item)
|
||||||
|
})
|
||||||
// console.log(dataList)
|
// console.log(dataList)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const animal_type_lists = ref([]);
|
const animal_type_lists = ref([]);
|
||||||
const initAnimalTypeLists = ()=>{
|
const initAnimalTypeLists = () => {
|
||||||
animalTypeLists().then(res=>{
|
animalTypeLists().then(res => {
|
||||||
animal_type_lists.value = res.data;
|
animal_type_lists.value = res.data;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
initAnimalTypeLists();
|
initAnimalTypeLists();
|
||||||
const getAnimalType = (value)=>{
|
const getAnimalType = (value) => {
|
||||||
return animal_type_lists.value.find(item=>item.value==value)?.name || ''
|
return animal_type_lists.value.find(item => item.value == value)?.name || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
onLoad((option) => {
|
onLoad((option) => {
|
||||||
|
@ -181,7 +185,7 @@
|
||||||
getlist();
|
getlist();
|
||||||
});
|
});
|
||||||
|
|
||||||
onReachBottom(()=>{
|
onReachBottom(() => {
|
||||||
where.value.page_no++;
|
where.value.page_no++;
|
||||||
getlist();
|
getlist();
|
||||||
})
|
})
|
||||||
|
@ -289,7 +293,8 @@
|
||||||
.left {
|
.left {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
.qr-code{
|
|
||||||
|
.qr-code {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10rpx;
|
right: 10rpx;
|
||||||
bottom: 10rpx;
|
bottom: 10rpx;
|
||||||
|
@ -374,7 +379,7 @@
|
||||||
background: linear-gradient(to right, #FEFFFF 0%, #E8FAF2 100%);
|
background: linear-gradient(to right, #FEFFFF 0%, #E8FAF2 100%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.bar-code{
|
.bar-code {
|
||||||
padding: 28rpx;
|
padding: 28rpx;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border-radius: 24rpx;
|
border-radius: 24rpx;
|
||||||
|
@ -382,12 +387,14 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-bottom: 15rpx;
|
margin-bottom: 15rpx;
|
||||||
}
|
}
|
||||||
.btn{
|
|
||||||
|
.btn {
|
||||||
background-color: rgba(#999, 0.2);
|
background-color: rgba(#999, 0.2);
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
padding: 5rpx 20rpx;
|
padding: 5rpx 20rpx;
|
||||||
|
|
|
@ -210,8 +210,9 @@
|
||||||
item.pic = JSON.parse(item.pic||'[]');
|
item.pic = JSON.parse(item.pic||'[]');
|
||||||
return item
|
return item
|
||||||
})
|
})
|
||||||
dataList.splice(0, dataList, ...res.data.lists);
|
res.data.lists.forEach(item=>{
|
||||||
// console.log(dataList)
|
dataList.push(item)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -7,8 +7,8 @@
|
||||||
"id": "__UNI__C509A32",
|
"id": "__UNI__C509A32",
|
||||||
"name": "养殖溯源",
|
"name": "养殖溯源",
|
||||||
"version": {
|
"version": {
|
||||||
"name": "1.0.3",
|
"name": "1.0.4",
|
||||||
"code": 103
|
"code": 104
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
"developer": {
|
"developer": {
|
||||||
|
|
Loading…
Reference in New Issue