|
@@ -17,7 +17,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<u-modal v-model="show" :mask-close-able="true" title="" :show-cancel-button="true" confirm-text="拍病害" cancel-text="拍虫害"
|
|
<u-modal v-model="show" :mask-close-able="true" title="" :show-cancel-button="true" confirm-text="拍病害" cancel-text="拍虫害"
|
|
|
content="拍照识别病虫害" @confirm="confirm" @cancel="cancel"></u-modal>
|
|
content="拍照识别病虫害" @confirm="confirm" @cancel="cancel"></u-modal>
|
|
|
- <kps-image-cutter @ok="onok" @cancel="oncancle" :url="url" :fixed="false" :blob="false" :maxWidth="500" :maxHeight="500"></kps-image-cutter>
|
|
|
|
|
|
|
+ <kps-image-cutter @ok="onok" @cancel="oncancle" :url="url" :fixed="false" :blob="true" :maxWidth="500" :maxHeight="380" :height="380"></kps-image-cutter>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
@@ -128,6 +128,10 @@
|
|
|
},
|
|
},
|
|
|
onok(ev) {
|
|
onok(ev) {
|
|
|
this.path = this.url
|
|
this.path = this.url
|
|
|
|
|
+ console.log(ev)
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title: '加载中'
|
|
|
|
|
+ });
|
|
|
if(this.flag == 2){
|
|
if(this.flag == 2){
|
|
|
// pest.pests.insect_discern 虫害
|
|
// pest.pests.insect_discern 虫害
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
@@ -139,14 +143,17 @@
|
|
|
'user': 'test'
|
|
'user': 'test'
|
|
|
},
|
|
},
|
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
|
- console.log(uploadFileRes)
|
|
|
|
|
|
|
+ console.log(JSON.parse(uploadFileRes.data))
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: "../disandpests/index?datas=" + uploadFileRes.data + "&path=" + this.path
|
|
|
|
|
|
|
+ url: "../disandpests/index?datas=" + uploadFileRes.data + "&path=" + ev.path
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}else if(this.flag == 1){
|
|
}else if(this.flag == 1){
|
|
|
//pest.pests.insect_discern病害识别
|
|
//pest.pests.insect_discern病害识别
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title: '加载中'
|
|
|
|
|
+ });
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
|
// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
|
|
// url: 'http://182.92.193.64:8002/api/api_gateway?method=base.bases.base_photo', //仅为示例,非真实的接口地址
|
|
|
url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
|
|
url: 'http://182.92.193.64:8002/api/api_gateway?method=pest.pests.plant_discern', //仅为示例,非真实的接口地址
|
|
@@ -158,7 +165,7 @@
|
|
|
success: (uploadFileRes) => {
|
|
success: (uploadFileRes) => {
|
|
|
console.log(JSON.parse(uploadFileRes.data))
|
|
console.log(JSON.parse(uploadFileRes.data))
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url: "../disandpests/index?datas="+uploadFileRes.data + "&path=" + this.path
|
|
|
|
|
|
|
+ url: "../disandpests/index?datas="+uploadFileRes.data + "&path=" + ev.path
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|