Sfoglia il codice sorgente

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

Reiskuchen 5 anni fa
parent
commit
30fd95944d

+ 1 - 1
minigame/WebContent/index.html

@@ -187,7 +187,7 @@
         			console.log(resp.code);
         		}else{
         			wx.config({
-        			    debug: true,
+        			    debug: false,
         			    appId: 'wx749c84daac654e1e',
         			    timestamp: resp.data.timestamp,
         			    nonceStr: resp.data.noncestr,

+ 2 - 2
minigame/WebContent/lottery.html

@@ -106,7 +106,7 @@
                             enable = false;
                             //设置初始速度
                             speed = 60;
-                            recordId = resp.data.prizeRecord;
+                            recordId = resp.data.prizeRecord.id;
                             //设置要中奖的位置 1.5没有 0十二瓶 4一升 2.6五百毫升 3书 7肥皂
                             if(resp.data.prizeLevel == -1){
                             	var rand = Math.round(Math.random()*2);
@@ -156,7 +156,7 @@
                 	$.post("./prize/luckDrawAddInfo", {
                 		id: recordId,
                 		phone: phone,
-                		username: name
+                		userName: name
                 	}, function(resp) {
         				if (resp.code == 'error') {
         					console.log(resp.code);

+ 5 - 3
minigame/src/com/hssx/controller/PrizeController.java

@@ -70,7 +70,9 @@ public class PrizeController {
 		HashMap<String, Object> map = new HashMap<String, Object>();
 		// 模拟无限次数抽奖
 		// 测试必定中奖账号
-//		if ("o1L3L5vwFkGSUMpec3uwRgsI6A-M".equals(user.getVoucherId())) {
+//		if ("o1L3L5jybPQ0zJWujikHpVJPBiM8".equals(user.getVoucherId())) {
+//			System.out.println("中奖了!!!!!!!!!!!!!!");
+//			prizeRecordMapper.insert(prizeRecord);
 //			Prize prize = prizeMapper.selectByPrimaryKey(1);
 //			// UserPrizeCount userPrizeCount = new UserPrizeCount();
 //			// userPrizeCount.setUserId(userId);
@@ -88,7 +90,7 @@ public class PrizeController {
 			// 直接抽奖(每日默认2次抽奖机会)
 			synchronized (this) {
 				Random ran = new Random();
-				int num = ran.nextInt(9999);
+				int num = ran.nextInt(60);
 				Prize prize = prizeMapper.selectByPrimaryKey(num);
 				if (prize == null) {
 					count = -1;
@@ -129,7 +131,7 @@ public class PrizeController {
 				// 已分享直接抽奖
 				synchronized (this) {
 					Random ran = new Random();
-					int num = ran.nextInt(108);// 50%中奖概率
+					int num = ran.nextInt(60);// 50%中奖概率
 					Prize prize = prizeMapper.selectByPrimaryKey(num);
 					if (prize == null) {
 						count = -1;