|
@@ -1,11 +1,21 @@
|
|
|
<template>
|
|
|
- <div class="body">
|
|
|
- <img class="div-img" :src="image" />
|
|
|
- <van-uploader :max-count="1" @after-read="upload">
|
|
|
- <van-button custom-style=" margin-top: 100rpx" size="small" type="info"
|
|
|
- >拍照识别</van-button
|
|
|
+ <div>
|
|
|
+ <div class="flex flex-center">
|
|
|
+ <van-image fit="widthFix" width="600rpx" :src="image" />
|
|
|
+ </div>
|
|
|
+ <div class="div-b">
|
|
|
+ <div class="mt-5">榴莲成熟度:70%</div>
|
|
|
+ <div class="mt-5">
|
|
|
+ <van-image width="60rpx" height="60rpx" :src="image" />
|
|
|
+ </div>
|
|
|
+
|
|
|
+ <van-button
|
|
|
+ custom-style="margin-top: 10rpx;"
|
|
|
+ type="info"
|
|
|
+ @click="againTakePhoto"
|
|
|
+ >重新拍照</van-button
|
|
|
>
|
|
|
- </van-uploader>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -15,36 +25,25 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
image: "",
|
|
|
- even: {},
|
|
|
};
|
|
|
},
|
|
|
onLoad(op) {
|
|
|
- this.even = op.file;
|
|
|
- console.log(this.even.file);
|
|
|
this.image = op.file;
|
|
|
+ console.log("接收显示图片url:" + this.image);
|
|
|
},
|
|
|
methods: {
|
|
|
- upload(event) {
|
|
|
- const { file } = event.detail;
|
|
|
- console.log(event);
|
|
|
- console.log(event.detail);
|
|
|
- this.image = event.detail.url;
|
|
|
+ againTakePhoto() {
|
|
|
+ this.$navigator.push("takePhoto");
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|
|
|
-.body {
|
|
|
- height: 100%;
|
|
|
+.div-b {
|
|
|
width: 100%;
|
|
|
text-align: center;
|
|
|
display: inline-block;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
-.div-img {
|
|
|
- width: 100px;
|
|
|
- height: 100px;
|
|
|
- margin-top: 20%;
|
|
|
-}
|
|
|
</style>
|