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