浏览代码

Merge remote-tracking branch 'origin/master'

wrh 2 年之前
父节点
当前提交
1ad66a58a8
共有 19 个文件被更改,包括 278 次插入46 次删除
  1. 14 14
      nngkxxdp/src/main/java/com/example/nngkxxdp/NngkxxdpApplication.java
  2. 4 3
      nngkxxdp/src/main/java/com/example/nngkxxdp/program/controller/HLWIntefaceController.java
  3. 5 2
      nngkxxdp/src/main/java/com/example/nngkxxdp/program/service/Impl/HLWIntefaceImpl.java
  4. 31 25
      nngkxxdp/src/main/resources/static/natj/enter_dataAllMobile.html
  5. 66 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.js
  6. 3 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.json
  7. 2 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.wxml
  8. 1 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.wxss
  9. 66 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.js
  10. 3 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.json
  11. 2 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.wxml
  12. 1 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.wxss
  13. 5 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.js
  14. 1 1
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxml
  15. 66 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.js
  16. 3 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.json
  17. 2 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.wxml
  18. 1 0
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.wxss
  19. 2 1
      nngkxxdp/src/main/resources/static/nnzwminiapp/pages/login/login.js

+ 14 - 14
nngkxxdp/src/main/java/com/example/nngkxxdp/NngkxxdpApplication.java

@@ -18,8 +18,8 @@ import org.springframework.scheduling.annotation.EnableScheduling;
 @MapperScan({"com.example.nngkxxdp.dao", "com.example.nngkxxdp.program.dao"})
 public class NngkxxdpApplication {
 
-//    @Value("${http.port}")
-//    private Integer port;
+    @Value("${http.port}")
+    private Integer port;
 
 
 
@@ -28,16 +28,16 @@ public class NngkxxdpApplication {
     }
 
     //前面基本一致,只不过注入了一个http端口,主要改下面
-//    @Bean
-//    public ServletWebServerFactory servletContainer() {
-//        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
-//        tomcat.addAdditionalTomcatConnectors(createStandardConnector()); // 添加http
-//        return tomcat;
-//    }
-////    // 配置http
-//    private Connector createStandardConnector() {
-//        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
-//        connector.setPort(port);
-//        return connector;
-//    }
+    @Bean
+    public ServletWebServerFactory servletContainer() {
+        TomcatServletWebServerFactory tomcat = new TomcatServletWebServerFactory();
+        tomcat.addAdditionalTomcatConnectors(createStandardConnector()); // 添加http
+        return tomcat;
+    }
+//    // 配置http
+    private Connector createStandardConnector() {
+        Connector connector = new Connector("org.apache.coyote.http11.Http11NioProtocol");
+        connector.setPort(port);
+        return connector;
+    }
 }

+ 4 - 3
nngkxxdp/src/main/java/com/example/nngkxxdp/program/controller/HLWIntefaceController.java

@@ -6,6 +6,7 @@ import com.example.nngkxxdp.program.constant.MiniConstant;
 import com.example.nngkxxdp.program.service.HLWIntefaceService;
 import com.example.nngkxxdp.util.SendUtil;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.CrossOrigin;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -30,7 +31,7 @@ public class HLWIntefaceController {
         if (StrUtil.isEmpty(userId)) {
             return SendUtil.send(false, MiniConstant.PARAM_NOT_NULL);
         }
-        return null;
+        return hlwIntefaceService.favorites(userId);
     }
 
     /**
@@ -42,7 +43,7 @@ public class HLWIntefaceController {
         if (ObjectUtil.hasEmpty(userId,type)) {
             return SendUtil.send(false, MiniConstant.PARAM_NOT_NULL);
         }
-        return null;
+        return hlwIntefaceService.comments(userId,type);
     }
 
     /**
@@ -53,7 +54,7 @@ public class HLWIntefaceController {
         if (StrUtil.isEmpty(userId)) {
             return SendUtil.send(false, MiniConstant.PARAM_NOT_NULL);
         }
-        return null;
+        return hlwIntefaceService.praises(userId);
     }
 
     /**

+ 5 - 2
nngkxxdp/src/main/java/com/example/nngkxxdp/program/service/Impl/HLWIntefaceImpl.java

@@ -11,6 +11,7 @@ import com.example.nngkxxdp.program.entity.jsonobj.HlNewsPaperDTO;
 import com.example.nngkxxdp.program.service.HLWIntefaceService;
 import com.example.nngkxxdp.util.SendUtil;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
@@ -22,9 +23,11 @@ import java.util.Map;
 @RequiredArgsConstructor
 public class HLWIntefaceImpl implements HLWIntefaceService {
     private final HlwNewsPaperDao hlwNewsPaperDao;
+    @Value("${hlw}")
+    private String address;
     @Override
     public Map<String, Object> favorites(String userId) {
-
+//        HttpUtil.post("")
         return null;
     }
 
@@ -45,7 +48,7 @@ public class HLWIntefaceImpl implements HLWIntefaceService {
         requiredParameter.put("appId", 4);
         requiredParameter.put("columnId", 14009);
         requiredParameter.put("isCarousel", false);
-        String post = HttpUtil.post("http://222.178.212.166:18088" + MiniConstant.HL_NEWSINFO, requiredParameter);
+        String post = HttpUtil.post(address + MiniConstant.HL_NEWSINFO, requiredParameter);
         JSONObject jsonObject = JSONUtil.parseObj(post);
         if (Convert.toInt(jsonObject.get("code")) !=0){
             return SendUtil.send(false,MiniConstant.RESULT_FAILED);

+ 31 - 25
nngkxxdp/src/main/resources/static/natj/enter_dataAllMobile.html

@@ -16,7 +16,7 @@
 		}
 
 		.bodyBox {
-			margin: 10px;
+			margin: 5px;
 			display: flex;
 			flex-direction: column;
 			align-items: center;
@@ -24,14 +24,14 @@
 
 		.box {
 			width: 80%;
-			height: 250px;
+			height: 125px;
 			background: #FFFFFF;
 			border: 1px solid #FFFFFF;
 			box-shadow: 5px 9px 17px 1px rgba(122, 122, 122, 0.16);
 			cursor: pointer;
 			display: flex;
 			align-items: center;
-			margin: 47px;
+			margin: 23.5px;
 		}
 
 		.box:hover {
@@ -44,20 +44,20 @@
 		/*}*/
 		.moduleIcon {
 			display: block;
-			width: 90px;
-			height: 90px;
+			width: 45px;
+			height: 45px;
 		}
 
 		.moduleName {
-			width: 160px;
-			height: 24px;
-			font-size: 40px;
+			width: 80px;
+			height: 12px;
+			font-size: 20px;
 			font-family: Microsoft YaHei;
 			font-weight: bold;
 			color: #333333;
-			line-height: 24px;
+			line-height: 12px;
 			text-align: center;
-			margin-top: 15px;
+			margin-top: 7.5px;
 		}
 
 		.box:hover .moduleName {
@@ -65,23 +65,23 @@
 		}
 
 		.cutOffRule {
-			width: 2px;
-			height: 190px;
+			width: 1px;
+			height: 95px;
 			background: #EEEEEE;
 		}
 
 		.moduleMenu {
-			margin-left: 40px;
+			margin-left: 20px;
 		}
 
 		.moduleMenu li {
 			display: block;
-			height: 60px;
-			font-size: 35px;
+			height: 30px;
+			font-size: 7.5px;
 			font-family: Microsoft YaHei;
 			font-weight: 300;
 			color: #1a1717;
-			line-height: 60px;
+			line-height: 30px;
 		}
 
 		.box:hover .moduleMenu li {
@@ -105,25 +105,25 @@
 		}
 
 		.floatingButton {
-			width: 160px !important;
-			height: 160px;
+			width: 80px !important;
+			height: 80px;
 			text-align: center;
-			border-radius: 100px;
-			line-height: 35px;
+			border-radius: 50px;
+			line-height: 17.5px;
 			background: #125DB2;
 			color: #fff;
-			font-size: 20px;
+			font-size: 10px;
 			position: fixed;
 			z-index: 9999;
-			left: 83%;
-			bottom: 54%;
+			left: 75%;
+			bottom: 55%;
 			cursor: pointer;
 			font-weight: bold;
 			box-shadow: 5px 9px 17px 1px rgba(122, 122, 122, 0.16);
 		}
 
 		.box .list {
-			width: 250px;
+			width: 125px;
 			display: flex;
 			flex-direction: column;
 			align-items: center;
@@ -233,7 +233,7 @@
 		</div>
 		<!--			重庆市公共数据开发平台-->
 		<div class="floatingButton" onclick="goGgsjpt()">
-			<p style="margin-top: 35px">重庆市
+			<p style="margin-top: 14px">重庆市
 				</br>公共数据开放</br>平台</p>
 		</div>
 	</div>
@@ -241,6 +241,12 @@
 <script src="js/jquery-3.5.1.min.js" type="text/javascript" charset="utf-8"></script>
 <script type="text/javascript">
 	let PATH = "https://www.data.cqna.gov.cn/data/"
+	resizeFrame()
+	function resizeFrame(){
+		var content_iframe = window.parent.document.getElementsByTagName("iframe");//获取iframeID
+		$(content_iframe[1]).css("width", "100%")
+		$(content_iframe[1]).css("height", "1230px")
+	}
 	// let PATH = "http://localhost:7777/natj"
 	function goGmjj() {
 		window.open("https://www.cqna.gov.cn/bm/qtjj/gmjjtj/")

+ 66 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.js

@@ -0,0 +1,66 @@
+// pages/collection/collection.js
+Page({
+
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面初次渲染完成
+	 */
+	onReady() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面显示
+	 */
+	onShow() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面隐藏
+	 */
+	onHide() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面卸载
+	 */
+	onUnload() {
+
+	},
+
+	/**
+	 * 页面相关事件处理函数--监听用户下拉动作
+	 */
+	onPullDownRefresh() {
+
+	},
+
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	onReachBottom() {
+
+	},
+
+	/**
+	 * 用户点击右上角分享
+	 */
+	onShareAppMessage() {
+
+	}
+})

+ 3 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.json

@@ -0,0 +1,3 @@
+{
+	"usingComponents": {}
+}

+ 2 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.wxml

@@ -0,0 +1,2 @@
+<!--pages/collection/collection.wxml-->
+<text>pages/collection/collection.wxml</text>

+ 1 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/collection/collection.wxss

@@ -0,0 +1 @@
+/* pages/collection/collection.wxss */

+ 66 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.js

@@ -0,0 +1,66 @@
+// pages/comment/comment.js
+Page({
+
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面初次渲染完成
+	 */
+	onReady() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面显示
+	 */
+	onShow() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面隐藏
+	 */
+	onHide() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面卸载
+	 */
+	onUnload() {
+
+	},
+
+	/**
+	 * 页面相关事件处理函数--监听用户下拉动作
+	 */
+	onPullDownRefresh() {
+
+	},
+
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	onReachBottom() {
+
+	},
+
+	/**
+	 * 用户点击右上角分享
+	 */
+	onShareAppMessage() {
+
+	}
+})

+ 3 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.json

@@ -0,0 +1,3 @@
+{
+	"usingComponents": {}
+}

+ 2 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.wxml

@@ -0,0 +1,2 @@
+<!--pages/comment/comment.wxml-->
+<text>pages/comment/comment.wxml</text>

+ 1 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/comment/comment.wxss

@@ -0,0 +1 @@
+/* pages/comment/comment.wxss */

+ 5 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.js

@@ -755,6 +755,11 @@ Page({
 		wx.navigateTo({
 			url: '/pages/newsPaper/newsPaper',
 		})
+	},
+	gotoZlwd(){
+		wx.navigateTo({
+		  url: '/pages/web/web?url='+"https://www.cqna.gov.cn/ghwd/znwd/mobile/index.html",
+		})	
 	}
 
 })

+ 1 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/index/index.wxml

@@ -337,7 +337,7 @@
 				</view>
 				<!-- 交流访谈over -->
 				<!-- 智能问答 -->
-				<view style="height: 200rpx;width:100%">
+				<view style="height: 200rpx;width:100%" bindtap="gotoZlwd">
 					<view style="height: 183rpx;width:100%;background-image: url({{imgUrl}}index-smart-question.png);;background-size: 100% 100%;">
 						<view style="padding-left:35rpx;height:100%;display:flex;flex-direction:column;justify-content:center">
 							<view style="color: #FFFFFF;font-size:32rpx;padding-bottom:15rpx;letter-spacing:4rpx">智能问答</view>

+ 66 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.js

@@ -0,0 +1,66 @@
+// pages/like/like.js
+Page({
+
+	/**
+	 * 页面的初始数据
+	 */
+	data: {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面加载
+	 */
+	onLoad(options) {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面初次渲染完成
+	 */
+	onReady() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面显示
+	 */
+	onShow() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面隐藏
+	 */
+	onHide() {
+
+	},
+
+	/**
+	 * 生命周期函数--监听页面卸载
+	 */
+	onUnload() {
+
+	},
+
+	/**
+	 * 页面相关事件处理函数--监听用户下拉动作
+	 */
+	onPullDownRefresh() {
+
+	},
+
+	/**
+	 * 页面上拉触底事件的处理函数
+	 */
+	onReachBottom() {
+
+	},
+
+	/**
+	 * 用户点击右上角分享
+	 */
+	onShareAppMessage() {
+
+	}
+})

+ 3 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.json

@@ -0,0 +1,3 @@
+{
+	"usingComponents": {}
+}

+ 2 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.wxml

@@ -0,0 +1,2 @@
+<!--pages/like/like.wxml-->
+<text>pages/like/like.wxml</text>

+ 1 - 0
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/like/like.wxss

@@ -0,0 +1 @@
+/* pages/like/like.wxss */

+ 2 - 1
nngkxxdp/src/main/resources/static/nnzwminiapp/pages/login/login.js

@@ -93,7 +93,8 @@ Page({
           wx.setStorageSync("token", res.data.token)
           wx.setStorageSync('imgUrl', res.data.imgUrl)
           wx.setStorageSync('nickName', res.data.nickName)
-          wx.setStorageSync('hlToken', res.data.hlToken)
+		  wx.setStorageSync('hlToken', res.data.hlToken)
+		  wx.setStorageSync('userid', res.data.userid)
           wx.navigateBack({
             delta: 1
           });