zhengshi 1 주 전
부모
커밋
336dfbc97a
2개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 0 2
      app/controllers/shuiguo.js
  2. 5 2
      app/shuiguo/table.js

+ 0 - 2
app/controllers/shuiguo.js

@@ -639,8 +639,6 @@ proto.createTableAsync = P.coroutine(function* (playerId, round, type,gameKind,p
     if(whdata && whdata.yxndlbTime) yxndlbTime = whdata.yxndlbTime;
     let yxndlbTip = "";
     if(whdata && whdata.yxndlbTip) yxndlbTip = whdata.yxndlbTip;
-    let nowcell = 0.1
-    if (roomType == 2) nowcell = 1
     var table = this._createTable(playerId,cUserId,cName,cHead,cell, round, type,gameKind,playerAllCount,upId,other,agentId,yxndlbTime,yxndlbTip,roomType);
 
     var gametable = new this.app.models.GameTable({

+ 5 - 2
app/shuiguo/table.js

@@ -99,6 +99,7 @@ var Table = function (cPlayerId,cUserId,cName,cHead,game, id, cell, round, type,
     this.logic = logic;
     this.logic.nowCell = 0.1
     if (roomType == 2){
+        console.warn("102 nowCell 1")
         this.logic.nowCell = 1
         this.logic.toTaskQuanReate = 10
     }
@@ -1274,6 +1275,7 @@ proto.startGameAsync = cor(function* (yazhus) {
     for (var i = 0; i < yazhus.length; i++) {
         yazhus[i] = parseFloat(yazhus[i].toFixed(2));
         if(((yazhus[i]*1000)%(this.logic.nowCell*1000)) != 0){
+
             let str = "table 押注数值出错了---id:"+this.id +" 当前局 "+ (this.over+1)+"  this.ownerUid  "+this.ownerUid+"  yazhus  "+JSON.stringify(yazhus);
             logger.warn(str);////cssj
             return { code: C.FAILD, msg: "押注数值出错了   前端的问题  "+JSON.stringify(yazhus) };
@@ -1324,7 +1326,7 @@ proto.startGameAsync = cor(function* (yazhus) {
     this.yazhus = this.logic.deepCloneTL(yazhus)//玩家本场押注情况
     let bczxz = _.sum(this.yazhus);//本次总下注
     let key = 'sgjjcs'
-    if (this.logic.nowCell = 1) {
+    if (this.logic.nowCell == 1) {
         key = "sgjjcs_gj"
     }
     let jcPools = yield this.app.models.SGJJC.findByIdAsync(key);
@@ -1339,7 +1341,7 @@ proto.startGameAsync = cor(function* (yazhus) {
     }
     if(cjjcsjk < 3){
         let key = 'sgjjcs'
-        if (this.logic.nowCell = 1) {
+        if (this.logic.nowCell == 1) {
             key = "sgjjcs_gj"
         }
         // console.warn("创建数据库",cjjcsjk);
@@ -1447,6 +1449,7 @@ proto.startGameAsync = cor(function* (yazhus) {
         scoreBefore: scoreBefore.toFixed(2),  // 本局开始前的分数(钻石)
         scoreEnd: (Number(this.nowDiamond) + (this.nowDiamond2)).toFixed(2), // 本局结束后的分数(=scoreBefore-押注总额+win)
     });
+    console.warn("1456 this.logic.nowCell:",this.logic.nowCell," roomType",this.roomType)
     //let addTaskQuan = bczxz*this.logic.toTaskQuanReate;
     let addTaskQuan = bczxz/this.logic.nowCell*this.logic.toTaskQuanReate;
     console.warn("bczxz:",bczxz," nowCell:",this.logic.nowCell, " toTaskQuanReate:",this.logic.toTaskQuanReate," addTaskQuan:",addTaskQuan)