Selaa lähdekoodia

Merge branch 'master' of http://47.100.37.243:10080/wutt/game

5 vuotta sitten
vanhempi
commit
4f5f80273d

+ 173 - 53
minigame/WebContent/index.html

@@ -4,96 +4,216 @@
     <meta charset="UTF-8">
 	<meta http-equiv="Access-Control-Allow-Origin" content="*" />
     <title>测试用页面</title>
-    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
-    <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script>
+    <!-- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> -->
+    <!-- <script src="http://res.wx.qq.com/connect/zh_CN/htmledition/js/wxLogin.js"></script> -->
+	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
+	<script src="http://tjs.sjs.sinajs.cn/open/thirdpart/js/jsapi/mobile.js" charset="utf-8"></script>
+
     <script>
-    (function() {
 		//初始化用户信息数据
 		window.user_info = {
+			uid: 0,
 			logo:'http://img5q.duitang.com/uploads/item/201502/25/20150225060808_wuANL.jpeg',//用户头像
 			nickname:'不羡鸳鸯',//用户昵称,
 			textmsg:'GOOD GOOD STUDY,DAY DAY UP'//寄语
 		};
 		
+		var URLParams = new Array();  
+		
+		var params = document.location.search.substr(1).split('&');   
 		var ua = navigator.userAgent.toLowerCase() , url = "" , type = 0;
+		for (i=0; i < params.length ; i++){  
+			var aParam = params[i].split('=');   
+			URLParams[aParam[0]] = aParam[1];   
+		}
+		
         if (!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)) {
             if (ua.match(/MicroMessenger/i) == "micromessenger") {
-				console.log(123)
-				alert('123')
-                alert("微信浏览器中打开");
                 type = 0;
                 url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
                         +"appid=wx749c84daac654e1e&"
                         +"redirect_uri=http://wx.ttkuaiban.com/minigame&"
                         +"response_type=code&"
-                        +"scope=snsapi_userinfo&"
-                        +"state=STATE#wechat_redirect";
+                        +"scope=snsapi_userinfo&"//snsapi_userinfo
+                        +"state=1#wechat_redirect";
+				getMsg();
             }
 
             if (ua.match(/WeiBo/i) == "weibo") {
-                alert("在新浪微博客户端打开");
                 type = 1;
-                url = "https://api.weibo.cn/oauth2/authorize?"
+                //url = "https://api.weibo.cn/oauth2/authorize?"
+				url = "https://api.weibo.com/oauth2/authorize?"
                     +"client_id=2141531565&"
-                    +"display=mobile&"
+                    //+"display=mobile&"
                     +"response_type=code&"
-                    +"redirect_uri=http://wx.ttkuaiban.com/minigame&"
-                    +"scope=snsapi_base";
+                    +"redirect_uri=http://wx.ttkuaiban.com/minigame/index.html"
+                    //+"scope=snsapi_base";
+				getMsg();
             }            
         } else {
 			var ua = navigator.userAgent.toLowerCase();
 			if (ua.match(/MicroMessenger/i) == "micromessenger") {
-				console.log(245)
-				alert('234')
-				alert("微信浏览器中打开");
                 type = 0;
                 url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
                         +"appid=wx749c84daac654e1e&"
                         +"redirect_uri=http://wx.ttkuaiban.com/minigame&"
                         +"response_type=code&"
-                        +"scope=snsapi_userinfo&"
-                        +"state=STATE#wechat_redirect";
+                        +"scope=snsapi_userinfo&"//snsapi_userinfo
+                        +"state=1#wechat_redirect";
+				getMsg();
 			}
 		}
-		var URLParams = new Array();  
-		var params = document.location.search.substr(1).split('&');   
-		for (i=0; i < params.length ; i++){  
-			var aParam = params[i].split('=');   
-			URLParams[aParam[0]] = aParam[1];   
+		
+		// 获取登陆信息
+		function getMsg(){
+			if(URLParams['uid']){
+				var uid = URLParams['uid'];					 
+				var xhr=null;
+				try{
+					xhr=new XMLHttpRequest();
+				}catch(e){
+					xhr=new ActiveXObject("Microsoft.XMLHTTP");
+				}
+				xhr.open("post","news/show",true);
+				xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+				xhr.send("id="+uid);
+				xhr.onreadystatechange=function(){
+					if(xhr.readyState==4){
+						if(xhr.status==200){
+							var msg = JSON.parse(xhr.response);
+                            if(msg.code == "ok") {
+                                window.user_info.uid = msg.data.id;
+                                window.user_info.logo = msg.data.headerPic;
+                                window.user_info.nickname = msg.data.nickName;
+								window.user_info.textmsg = msg.data.message; 								
+                            }
+							//if(URLParams['act']=='hbshare'){
+								document.close();
+								document.write('<h1>这里是海报页</h1>');
+								document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+								document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+								document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+								document.write('<a onclick="saveText()" style="font-size:30px;">生成我的菜单</a>');
+							//}else{
+							//	document.write('<h1>这是首页哦</h1>');
+							//}
+						}else{
+							console.log("错误"+xhr.status)
+						}
+					}
+				}
+			}else {
+				if(URLParams['code']){
+					var code = URLParams['code'];					
+					var xhr=null;
+					try{
+						xhr=new XMLHttpRequest();
+					}catch(e){
+						xhr=new ActiveXObject("Microsoft.XMLHTTP");
+					}
+					xhr.open("post","user/weiXinLogin",true);
+					xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+					xhr.send("code="+code+"&type="+type);
+					xhr.onreadystatechange=function(){
+						if(xhr.readyState==4){
+							if(xhr.status==200){
+								var msg = JSON.parse(xhr.response);
+								if(msg.code == "ok") {
+									window.user_info.uid = msg.data.id;
+									window.user_info.logo = msg.data.headerPic;
+									window.user_info.nickname = msg.data.nickName;                       
+								}
+								//if(URLParams['act']=='hbshare'){
+									document.write('<h1>这里是海报页</h1>');
+									document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+									document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+									document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+									document.write('<span style="font-size:30px;">填写寄语 </span> <br> <textarea style="width:300px;height:200px;" id="textarea">'+ window.user_info.textmsg +'</textarea> <br> <a onclick="saveText()" style="font-size:30px;">保存寄语</a>');
+								//}else{
+								//	document.write('<h1>这是首页哦</h1>');
+								//}
+								saveText(window.user_info.textmsg);
+							}else{
+								console.log("错误"+xhr.status)
+							}
+						}
+					}
+				} else {
+					window.location.href = url;
+				}
+			}
 		}
-		if(URLParams['code']){
-			var code = URLParams['code'];
-			<!-- $.get("http://118.190.47.230/minigame/user/weiXinLogin",{ -->
-				<!-- code:code, -->
-				<!-- type:type -->
-			<!-- },function(result){ -->
-				<!-- console.log(result) -->
-			<!-- }); -->
-			
-			$.ajax({
-			    url:"http://118.190.47.230/minigame/user/weiXinLogin",
-			    type:"POST",//请求方式
-				data:{"code":code,"type":type},
-			    dataType:"json",  //数据格式设置为jsonp
-			    success:function (data) {//请求成功后调用的函数
-				   alert("succ:"+data);
-					if(URLParams['act']=='hbshare'){
-						document.write('<h1>这里是海报页</h1>');
-						document.write('头像<img src="'+window.user_info.logo+'" width=40 height=40 /><br>');
-						document.write('昵称:'+window.user_info.nickname+'<br>');
-						document.write('寄语:'+window.user_info.textmsg);
+		
+		// 获取填写寄语
+		function saveText(text){
+			var value = document.getElementById('textarea').value;
+			if (text) {
+				value = text;
+			}
+						
+			var xhr=null;
+			try{
+				xhr=new XMLHttpRequest();
+			}catch(e){
+				xhr=new ActiveXObject("Microsoft.XMLHTTP");
+			}
+			xhr.open("post","news/addNews",true);
+			xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+			xhr.send("message="+value+"&userId="+window.user_info.uid);
+			xhr.onreadystatechange=function(){
+				if(xhr.readyState==4){
+					if(xhr.status==200){
+						var msg = JSON.parse(xhr.response) , href = document.location.href;
+						if(msg.code == "ok") {
+							window.user_info.uid = msg.data.id;
+							window.user_info.logo = msg.data.headerPic;
+							window.user_info.nickname = msg.data.nickName; 
+							window.user_info.textmsg = msg.data.message;
+							href = document.location.href + "&uid=" + msg.data.id;   
+						}
+						//if(URLParams['act']=='hbshare'){
+							document.close();
+							document.write('<h1>这里是海报页</h1>');
+							document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+							document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+							document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+							document.write('<span style="font-size:30px;">填写寄语 </span> <br> <textarea style="width:200px;height:100px;" id="textarea"></textarea> <br> <a onclick="saveText()" style="font-size:30px;">保存寄语</a>');
+						//}else{
+						//	document.write('<h1>这是首页哦</h1>');
+						//}
+						
+						if(href != document.location.href){
+							console.log(href)
+							history.pushState("", "Title", href);
+							//window.location.href = href;
+						}
 					}else{
-						document.write('<h1>这是首页哦</h1>');
+						console.log("错误"+xhr.status)
 					}
-			    },
-			    error:function (textStatus) {//请求失败后调用的函数
-				   alert("fail");
-			    }
-			 })
-		}else{
-			window.location.href = url;
+				}
+			}
 		}
-    })()
+		
+		// 判断微信分享
+        document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
+			// 发送给好友
+			WeixinJSBridge.on('menu:share:appmessage', function(argv){
+				alert('发送给好友')
+				window.location.href = url
+			});
+			// 分享到朋友圈
+			WeixinJSBridge.on('menu:share:timeline', function(argv){
+				alert('分享到朋友圈')
+			}); 
+		}, false);
+		
+		// 判断微博分享
+        document.addEventListener('WeiboJSBridgeReady', function onBridgeReady() {
+			WeiboJSBridgeReady.on('menu:share', function(argv){
+				alert('微博分享')
+				window.location.href = url
+			});
+		}, false);
 </script>
 </head>
 <body>

+ 208 - 0
minigame/WebContent/static/js/poster.js

@@ -0,0 +1,208 @@
+//初始化用户信息数据
+	window.user_info = {
+		uid: 0,
+		logo:'http://img5q.duitang.com/uploads/item/201502/25/20150225060808_wuANL.jpeg',//用户头像
+		nickname:'用户昵称',//用户昵称,
+		textmsg:'GOOD GOOD STUDY,DAY DAY UP'//寄语
+	};
+	
+	var URLParams = new Array();  
+	
+	var params = document.location.search.substr(1).split('&');   
+	var ua = navigator.userAgent.toLowerCase() , url = "" , type = 0;
+	for (i=0; i < params.length ; i++){  
+		var aParam = params[i].split('=');   
+		URLParams[aParam[0]] = aParam[1];   
+	}
+	
+    if (!!navigator.userAgent.match(/AppleWebKit.*Mobile.*/)) {
+        if (ua.match(/MicroMessenger/i) == "micromessenger") {
+            type = 0;
+            url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
+                    +"appid=wx749c84daac654e1e&"
+                    +"redirect_uri=http://wx.ttkuaiban.com/minigame&"
+                    +"response_type=code&"
+                    +"scope=snsapi_userinfo&"//snsapi_userinfo
+                    +"state=1#wechat_redirect";
+			getMsg();
+        }
+
+        if (ua.match(/WeiBo/i) == "weibo") {
+            type = 1;
+            //url = "https://api.weibo.cn/oauth2/authorize?"
+			url = "https://api.weibo.com/oauth2/authorize?"
+                +"client_id=2141531565&"
+                //+"display=mobile&"
+                +"response_type=code&"
+                +"redirect_uri=http://wx.ttkuaiban.com/minigame/index.html"
+                //+"scope=snsapi_base";
+			getMsg();
+        }            
+    } else {
+		var ua = navigator.userAgent.toLowerCase();
+		if (ua.match(/MicroMessenger/i) == "micromessenger") {
+            type = 0;
+            url = "https://open.weixin.qq.com/connect/oauth2/authorize?"
+                    +"appid=wx749c84daac654e1e&"
+                    +"redirect_uri=http://wx.ttkuaiban.com/minigame&"
+                    +"response_type=code&"
+                    +"scope=snsapi_userinfo&"//snsapi_userinfo
+                    +"state=1#wechat_redirect";
+			getMsg();
+		}
+	}
+	
+	// 获取登陆信息
+	function getMsg(){
+		if(URLParams['uid']){
+			var uid = URLParams['uid'];					 
+			var xhr=null;
+			try{
+				xhr=new XMLHttpRequest();
+			}catch(e){
+				xhr=new ActiveXObject("Microsoft.XMLHTTP");
+			}
+			xhr.open("post","news/show",true);
+			xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+			xhr.send("id="+uid);
+			xhr.onreadystatechange=function(){
+				if(xhr.readyState==4){
+					if(xhr.status==200){
+						var msg = JSON.parse(xhr.response);
+                        if(msg.code == "ok") {
+                            window.user_info.uid = msg.data.id;
+                            window.user_info.logo = msg.data.headerPic;
+                            window.user_info.nickname = msg.data.nickName;
+							window.user_info.textmsg = msg.data.message; 								
+                        }
+						if(URLParams['act']=='hbshare'){
+							document.close();
+							document.write('<h1>这里是海报页</h1>');
+							document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+							document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+							document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+							document.write('<a onclick="saveText()" style="font-size:30px;">生成我的菜单</a>');
+						}else{
+							document.write('<h1>这是首页哦</h1>');
+						}
+					}else{
+						console.log("错误"+xhr.status)
+					}
+				}
+			}
+		}else {
+			if(URLParams['code']){
+				var code = URLParams['code'];					
+				var xhr=null;
+				try{
+					xhr=new XMLHttpRequest();
+				}catch(e){
+					xhr=new ActiveXObject("Microsoft.XMLHTTP");
+				}
+				xhr.open("post","user/weiXinLogin",true);
+				xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+				xhr.send("code="+code+"&type="+type);
+				xhr.onreadystatechange=function(){
+					if(xhr.readyState==4){
+						if(xhr.status==200){
+							var msg = JSON.parse(xhr.response);
+							if(msg.code == "ok") {
+								window.user_info.uid = msg.data.id;
+								window.user_info.logo = msg.data.headerPic;
+								window.user_info.nickname = msg.data.nickName;                       
+							}
+							if(URLParams['act']=='hbshare'){
+								document.write('<h1>这里是海报页</h1>');
+								document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+								document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+								document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+								document.write('<span style="font-size:30px;">填写接收人: </span> <br> <input style="width:200px;height:100px;" id="input"/> <br>');
+								document.write('<span style="font-size:30px;">填写寄语 </span> <br> <textarea style="width:300px;height:200px;" id="textarea">'+ window.user_info.textmsg +'</textarea> <br> <a onclick="saveText()" style="font-size:30px;">保存寄语</a>');
+							}else{
+								document.write('<h1>这是首页哦</h1>');
+							}
+							saveText(window.user_info.textmsg);
+						}else{
+							console.log("错误"+xhr.status)
+						}
+					}
+				}
+			} else {
+				window.location.href = url;
+			}
+		}
+	}
+	
+	// 获取填写寄语
+	function saveText(text){
+		var value = document.getElementById('textarea').value,
+			receiver = document.getElementById('input').value;
+		if (text) {
+			value = text;
+		}
+		var xhr=null;
+		try{
+			xhr=new XMLHttpRequest();
+		}catch(e){
+			xhr=new ActiveXObject("Microsoft.XMLHTTP");
+		}
+		xhr.open("post","news/addNews",true);
+		xhr.setRequestHeader('content-type','application/x-www-form-urlencoded');
+		xhr.send("receiver="+receiver+"&message="+value+"&userId="+window.user_info.uid);
+		xhr.onreadystatechange=function(){
+			if(xhr.readyState==4){
+				if(xhr.status==200){
+					var msg = JSON.parse(xhr.response) , href = document.location.href;
+					if(msg.code == "ok") {
+						window.user_info.uid = msg.data.id;
+						window.user_info.logo = msg.data.headerPic;
+						window.user_info.nickname = msg.data.nickName; 
+						window.user_info.textmsg = msg.data.message;
+						href = document.location.href + "&uid=" + msg.data.id;   
+					}
+					if(URLParams['act']=='hbshare'){
+						document.close();
+						document.write('<h1>这里是海报页</h1>');
+						document.write('<span style="font-size:30px;">头像:</span><img src="'+window.user_info.logo+'"/><br>');
+						document.write('<span style="font-size:30px;">昵称:'+window.user_info.nickname+'</span><br>');
+						document.write('<span style="font-size:30px;">寄语:'+window.user_info.textmsg+'</span><br>');
+						document.write('<span style="font-size:30px;">填写接收人: </span> <br> <input style="width:200px;height:100px;" id="input"/> <br>');
+						document.write('<span style="font-size:30px;">填写寄语: </span> <br> <textarea style="width:200px;height:100px;" id="textarea"></textarea> <br> <a onclick="saveText()" style="font-size:30px;">保存寄语</a>');
+					}else{
+						document.write('<h1>这是首页哦</h1>');
+					}
+					
+					if(href != document.location.href){
+						history.pushState("", "Title", href);
+					}
+					
+					if(type == 1) {
+						setTimeout(function(){
+							window.location.href = url
+					    }, 0);
+					}
+				}else{
+					console.log("错误"+xhr.status)
+				}
+			}
+		}
+	}
+	
+	// 判断微信分享
+    document.addEventListener('WeixinJSBridgeReady', function onBridgeReady() {
+		// 发送给好友
+		WeixinJSBridge.on('menu:share:appmessage', function(argv){
+			// alert('发送给好友')
+			window.location.href = url
+		});
+		// 分享到朋友圈
+		WeixinJSBridge.on('menu:share:timeline', function(argv){
+			// alert('分享到朋友圈')
+			window.location.href = url
+		}); 
+	}, false);
+	
+	// 判断微博分享
+    document.addEventListener('WeiboJSBridgeReady', function onBridgeReady() {
+    	
+	}, false);

+ 127 - 0
minigame/src/com/estates/filter/EmojiHttpServletRequestWraper.java

@@ -0,0 +1,127 @@
+package com.estates.filter;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletRequestWrapper;
+
+import org.apache.commons.lang.StringUtils;
+
+
+public class EmojiHttpServletRequestWraper extends HttpServletRequestWrapper {
+
+    public EmojiHttpServletRequestWraper(HttpServletRequest request) {
+        super(request);
+    }
+    
+    @Override
+    public String getParameter(String name) {
+        return filterEmoji(super.getParameter(name));
+    }
+    
+    @Override
+    public String getHeader(String name) {
+        return filterEmoji(super.getParameter(name));
+    }
+    
+    
+    
+    @Override
+    public String[] getParameterValues(String name) {
+        System.out.println("getParameterValues----->转义处理:"+name);
+        if(!StringUtils.isEmpty(name)){
+            String[] values = super.getParameterValues(name);
+            if(values != null ){
+            	if(values.length > 0) {
+            		String[] newValues = new String[values.length];
+            		
+            		for(int i =0; i< values.length; i++){
+            			if (containsEmoji(values[i])) {
+            				System.out.println("包含emoji:"+values[i]);
+            				newValues[i] = filterEmoji(values[i]);
+            				System.out.println("包含emoji,处理后:"+newValues[i]);
+            			} else {
+            				newValues[i] = values[i];
+            			}
+            		}
+            		return newValues;
+            	}
+            } 
+        }
+        return null;
+    }
+
+    
+    public static boolean containsEmoji(String source) {
+        if (StringUtils.isBlank(source)) {
+            return false;
+        }
+
+        int len = source.length();
+
+        for (int i = 0; i < len; i++) {
+            char codePoint = source.charAt(i);
+
+            if (isEmojiCharacter(codePoint)) {
+                //do nothing,判断到了这里表明,确认有表情字符
+                return true;
+            }
+        }
+
+        return false;
+    }
+
+    private static boolean isEmojiCharacter(char codePoint) {
+        return (codePoint == 0x0) || 
+                (codePoint == 0x9) ||                            
+                (codePoint == 0xA) ||
+                (codePoint == 0xD) ||
+                ((codePoint >= 0x20) && (codePoint <= 0xD7FF)) ||
+                ((codePoint >= 0xE000) && (codePoint <= 0xFFFD)) ||
+                ((codePoint >= 0x10000) && (codePoint <= 0x10FFFF));
+    }
+
+    /**
+     * 过滤emoji 或者 其他非文字类型的字符
+     * @param source
+     * @return
+     */
+    public static String filterEmoji(String source) {
+    	if (source == null || "".equals(source)) {
+    		return source;
+    	}
+    	System.out.println("过滤 = "+source);
+        source = source.replaceAll("[\\ud800\\udc00-\\udbff\\udfff\\ud800-\\udfff]", "*");
+        if (!containsEmoji(source)) {
+            return source;//如果不包含,直接返回
+        }
+        //到这里铁定包含
+        StringBuilder buf = null;
+
+        int len = source.length();
+
+        for (int i = 0; i < len; i++) {
+            char codePoint = source.charAt(i);
+
+            if (isEmojiCharacter(codePoint)) {
+                if (buf == null) {
+                    buf = new StringBuilder(source.length());
+                }
+
+                buf.append(codePoint);
+            } else {
+                buf.append("*");
+            }
+        }
+
+        if (buf == null) {
+            return source;//如果没有找到 emoji表情,则返回源字符串
+        } else {
+            if (buf.length() == len) {//这里的意义在于尽可能少的toString,因为会重新生成字符串
+                buf = null;
+                return source;
+            } else {
+                return buf.toString();
+            }
+        }
+
+    }
+}

+ 2 - 1
minigame/src/com/hssx/controller/UserController.java

@@ -19,6 +19,7 @@ import org.springframework.web.bind.annotation.RequestParam;
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.estates.filter.EmojiHttpServletRequestWraper;
 import com.hssx.constant.Constant;
 import com.hssx.entity.User;
 import com.hssx.entity.UserExample;
@@ -64,7 +65,7 @@ public class UserController {
 				System.out.println(resp);
 				json = (JSONObject) JSON.parse(resp);
 				if (!json.containsKey("errcode")) {
-					user.setNickName(json.getString("nickname"));
+					user.setNickName(EmojiHttpServletRequestWraper.filterEmoji(json.getString("nickname")));
 					user.setHeaderPic(json.getString("headimgurl"));
 				}
 				System.out.println(user + "user");

+ 1 - 1
minigame/src/log4j.properties

@@ -5,7 +5,7 @@ log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
 log4j.appender.stdout.layout.ConversionPattern=[minigame] %p [%t] %C.%M(%L) | %m%n   
     
 log4j.appender.R=org.apache.log4j.DailyRollingFileAppender   
-log4j.appender.R.File=E://log/qiangkebao.log
+log4j.appender.R.File=D://log/qiangkebao.log
 #log4j.appender.R.File=/log/qiangkebao.log
 log4j.appender.R.layout=org.apache.log4j.PatternLayout   
 log4j.appender.R.layout.ConversionPattern=%d-[TS] %p %t %c - %m%n