优化提示

master
橙橙楊 5 years ago committed by luffy
parent b275e76499
commit d6f1f0454b
  1. 7
      src/App.vue
  2. 14
      src/pages/waste_sorting/query.vue

@ -22,7 +22,12 @@
uni.showModal({ uni.showModal({
title:"错误提示", title:"错误提示",
content:"服务端连接失败,请检查服务端地址"+config.server+"是否正确", content:"服务端连接失败,请检查服务端地址"+config.server+"是否正确",
showCancel:false showCancel:false,
success:function (res) {
if(res.confirm){
}
}
}) })
}, },
complete:function () { complete:function () {

@ -1,5 +1,6 @@
<template> <template>
<view> <view>
<!-- <navigator on open-type='exit' target="miniProgram">退出程序</navigator>-->
<view class="uni-padding-wrap uni-common-mt"> <view class="uni-padding-wrap uni-common-mt">
<view class="uni-form-item uni-column"> <view class="uni-form-item uni-column">
@ -18,7 +19,7 @@
<view class="uni-flex uni-column"> <view class="uni-flex uni-column">
<text class="title uni-center">打开相机拍照查询</text> <text class="title uni-center">打开相机拍照查询</text>
<view class="flex-item flex-item-V uni-center"> <view class="flex-item flex-item-V uni-center">
<image class="photo" @click="chooseImage"></image> <image class="photo" @click="chooseImage"/>
</view> </view>
</view> </view>
@ -89,9 +90,9 @@
if (json_res["result"].length === 0) { if (json_res["result"].length === 0) {
let str="没有匹配结果" let str="没有匹配结果"
console.info(str) console.info(str)
uni.showToast({ uni.showModal({
title:str, content:str,
duration:3000 showCancel:false
}) })
} else { } else {
that.show_info = true that.show_info = true
@ -157,11 +158,8 @@
that.query_result=json_res["result"] that.query_result=json_res["result"]
} }
} else { } else {
let str = "照片解析失败"
console.info(str)
uni.showModal({ uni.showModal({
title:"错误提示", content:json_res["error"],
content:str,
showCancel:false showCancel:false
}) })
} }

Loading…
Cancel
Save