|
|
@ -43,7 +43,7 @@ |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
<script> |
|
|
|
import {config} from 'common/config' |
|
|
|
import {config,getInterface} from 'common/config' |
|
|
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "query", |
|
|
|
name: "query", |
|
|
@ -56,6 +56,7 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
|
|
|
|
getInterface:getInterface, |
|
|
|
getWasteSorting:function(waste_type){ |
|
|
|
getWasteSorting:function(waste_type){ |
|
|
|
switch (waste_type) { |
|
|
|
switch (waste_type) { |
|
|
|
case 1:return "可回收垃圾"; |
|
|
|
case 1:return "可回收垃圾"; |
|
|
@ -72,7 +73,7 @@ |
|
|
|
console.info("文本查询值:" + this.textValue) |
|
|
|
console.info("文本查询值:" + this.textValue) |
|
|
|
let that=this |
|
|
|
let that=this |
|
|
|
if(this.textValue.length>0){ |
|
|
|
if(this.textValue.length>0){ |
|
|
|
let url = config.server + config.interface.text_query |
|
|
|
let url = this.getInterface(config.interface.text_query) |
|
|
|
console.info("文本查询接口地址:"+url) |
|
|
|
console.info("文本查询接口地址:"+url) |
|
|
|
uni.request({ |
|
|
|
uni.request({ |
|
|
|
url:url, |
|
|
|
url:url, |
|
|
@ -126,7 +127,7 @@ |
|
|
|
uni.showLoading({ |
|
|
|
uni.showLoading({ |
|
|
|
title: "图片解析中" |
|
|
|
title: "图片解析中" |
|
|
|
}) |
|
|
|
}) |
|
|
|
let url = config.server + config.interface.image_parse |
|
|
|
let url = that.getInterface(config.interface.image_parse) |
|
|
|
console.info("图片解析接口地址:" + url) |
|
|
|
console.info("图片解析接口地址:" + url) |
|
|
|
uni.uploadFile({ |
|
|
|
uni.uploadFile({ |
|
|
|
url: url, |
|
|
|
url: url, |
|
|
|