Przeglądaj źródła

新增技淘百问

anderx 2 lat temu
rodzic
commit
75da8ed659

+ 17 - 6
src/main/java/com/goafanti/common/controller/PublicController.java

@@ -13,7 +13,9 @@ import javax.annotation.Resource;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponse;
 
 
+import com.alibaba.fastjson.JSONObject;
 import com.goafanti.common.model.JtNews;
 import com.goafanti.common.model.JtNews;
+import com.goafanti.common.utils.*;
 import com.goafanti.news.bo.InputJtNews;
 import com.goafanti.news.bo.InputJtNews;
 import com.goafanti.news.bo.OutJtNews;
 import com.goafanti.news.bo.OutJtNews;
 import com.goafanti.news.service.EventPlanningService;
 import com.goafanti.news.service.EventPlanningService;
@@ -41,12 +43,6 @@ import com.goafanti.common.model.User;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.DistrictGlossoryService;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.service.FieldGlossoryService;
 import com.goafanti.common.service.IndustryCategoryService;
 import com.goafanti.common.service.IndustryCategoryService;
-import com.goafanti.common.utils.LoggerUtils;
-import com.goafanti.common.utils.MobileMessageUtils;
-import com.goafanti.common.utils.PasswordUtil;
-import com.goafanti.common.utils.PictureUtils;
-import com.goafanti.common.utils.TimeUtils;
-import com.goafanti.common.utils.VerifyCodeUtils;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.JDBCIdGenerator;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.mybatis.page.Pagination;
 import com.goafanti.core.shiro.token.TokenManager;
 import com.goafanti.core.shiro.token.TokenManager;
@@ -902,6 +898,21 @@ public class PublicController extends BaseController {
 		return  res;
 		return  res;
 	}
 	}
 
 
+
+
+	@RequestMapping(value = "/selectChat",method = RequestMethod.GET)
+	@ResponseBody
+	public Result  selectChat (String text){
+		Result res=new Result();
+		Map<String,Object> params=new HashMap();
+		List<String> list =new ArrayList<>();
+		params.put("priors",list);
+		params.put("text",text);
+		JSONObject jsonObject = HttpUtils.httpPost("https://www.sciradar.com/gw/chat/chat/stream", params);
+		System.out.println(jsonObject.toJSONString());
+		return res.data(jsonObject.toJSONString());
+	}
+
 	/**
 	/**
 	 * 删除Html标签
 	 * 删除Html标签
 	 */
 	 */

+ 6 - 0
src/main/java/com/goafanti/common/controller/WebpageController.java

@@ -1608,6 +1608,12 @@ public class WebpageController extends BaseController {
 		return modelAndView;
 		return modelAndView;
 	}
 	}
 
 
+	@RequestMapping("/portal/answers")
+	public ModelAndView answers(ModelAndView modelAndView){
+		modelAndView.setViewName("/portal/answers");
+		return modelAndView;
+	}
+
 	/**
 	/**
 	 * 新闻详情
 	 * 新闻详情
 	 * @param modelview
 	 * @param modelview

+ 1 - 0
src/main/java/com/goafanti/common/utils/HttpUtils.java

@@ -51,6 +51,7 @@ public class HttpUtils {
 			httpPost.addHeader("Content-type", "application/json");
 			httpPost.addHeader("Content-type", "application/json");
 			httpPost.setHeader("Accept", "application/json");
 			httpPost.setHeader("Accept", "application/json");
 			httpPost.setEntity(new StringEntity(JSON.toJSONString(map), Charset.forName("UTF-8")));
 			httpPost.setEntity(new StringEntity(JSON.toJSONString(map), Charset.forName("UTF-8")));
+			httpPost.setHeader("Authorization","26a418106d92a32ea713f4fcec9e0ce6");
 			HttpResponse response = null;
 			HttpResponse response = null;
 			try {
 			try {
 				response = httpClient.execute(httpPost);
 				response = httpClient.execute(httpPost);

+ 60 - 0
src/main/webapp/WEB-INF/views/portal/answers.html

@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
+  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
+
+<head th:replace="common::header(~{::title},~{::link})">
+  <meta charset="utf-8" />
+  <title>技淘网-技淘百问</title>
+  <link th:href="${portalHost+'/dll/dll.css'}" rel="stylesheet">
+  <link th:href="${portalHost+'/vendors.css'}" rel="stylesheet">
+  <!-- <link th:href="${portalHost+'/evaluation/evaluate.css'}" rel="stylesheet"></head> -->
+</head>
+
+
+<body>
+  <div th:replace="common::nav('','serviceIndex')"></div>
+  <!-- <div id="myCarousel" class="carousel">
+    <div class="carousel-inner">
+      <div class="item active">
+        <img th:src="${portalHost+'/img/newMenu/slide_img.png'}" src="../../img/newMenu/slide_img.png"
+          alt="First slide">
+      </div>
+    </div>
+  </div> -->
+
+
+  <div class="container basic_info">
+    <div class="title">
+      <h1>技淘百问</h1>
+      <p>智能机器人</p>
+      <span></span>
+    </div>
+    <div class="contentCenter">
+      <div class="basic_list">
+        <ul>
+          <li class="li0 active">实用新型专利主要应用哪些领域?</li>
+          <li class="li1">实用新型专利主要应用哪些领域?</li>
+          <li class="li2">实用新型专利主要应用哪些领域?</li>
+          <li class="li3">实用新型专利主要应用哪些领域?</li>
+        </ul>
+      </div>
+      <div class="basic_content">
+        <div class="basic_bottom">
+          <input type="text" class="form-control" id="name">
+        </div>
+      </div>
+    </div>
+  </div>
+  <!-- 中间内容结束 -->
+  <footer>
+    <div th:replace="common::copyright"></div>
+    <div th:replace="common::login"></div>
+  </footer>
+  <div th:replace="common::footer(~{::script})">
+    <script type="text/javascript" th:src="${portalHost + '/dll/dll.js'}"></script>
+    <script type="text/javascript" th:src="${portalHost + '/vendors.js'}"></script>
+    <!-- <script type="text/javascript" th:src="${portalHost+'/evaluation/evaluate.js'}"></script> -->
+  </div>
+</body>
+
+</html>

+ 1 - 1
src/main/webapp/WEB-INF/views/portal/index.html

@@ -150,7 +150,7 @@
 							<span class="newapply_ltxt">高企在线评估</span>
 							<span class="newapply_ltxt">高企在线评估</span>
 						</div>
 						</div>
 					</a>
 					</a>
-					<a th:href="@{/user/signIn}">
+					<a th:href="@{/portal/answers}">
 						<div class="newapply_listitem">
 						<div class="newapply_listitem">
 							<img class="newapply_licon" th:src="${portalHost+'/img/newapply/rzffs.png'}" alt="" />
 							<img class="newapply_licon" th:src="${portalHost+'/img/newapply/rzffs.png'}" alt="" />
 							<span class="newapply_ltxt">入驻为服务商</span>
 							<span class="newapply_ltxt">入驻为服务商</span>