Commit 36367204 by 侯昆
2 parents c074dbde 2600fc6f
......@@ -8,7 +8,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>cihai-wechat</artifactId>
<packaging>war</packaging>
<name>cihai-wechat Maven Webapp</name>
<properties>
<maven.test.skip>true</maven.test.skip>
<jetty.scope>compile</jetty.scope>
......
......@@ -35,6 +35,7 @@ import com.dookay.coral.common.web.response.JsonResult;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
......@@ -135,6 +136,7 @@ public class HomeController extends BaseController {
@RequestMapping(value = "/image/search", method = RequestMethod.POST, produces = MediaTypes.JSON_UTF_8)
@ResponseBody
public JsonResult imageSearch(String image) {
System.out.println(image);
try {
ScanResult imageResult = aipDefaultClient.scan(image);
System.out.println(imageResult);
......
......@@ -70,7 +70,14 @@
// });
location.href = data.data;
} else {
myApp.dialog.alert(data.message);
myApp.dialog.create({
title: data.message,
buttons: [
{
text: 'OK',
}
],
}).open();
$('.j_search_input').val(res.translateResult);
}
})
......@@ -114,7 +121,14 @@
// });
location.href = data.data;
} else {
myApp.dialog.alert(data.message);
myApp.dialog.create({
title: data.message,
buttons: [
{
text: 'OK',
}
],
}).open();
}
})
}
......
......@@ -72,6 +72,7 @@
<build>
<pluginManagement>
<plugins>
<!--打包插件 - 指定 java 版本-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
......@@ -82,6 +83,14 @@
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warName>${project.artifactId}</warName>
</configuration>
</plugin>
<!--打包插件 - 指定 java 版本-->
</plugins>
</pluginManagement>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!