diff --git a/app/views/combinationgame/index.html.erb b/app/views/combinationgame/index.html.erb index 8b8ee54..67a6c55 100644 --- a/app/views/combinationgame/index.html.erb +++ b/app/views/combinationgame/index.html.erb @@ -92,7 +92,7 @@ function xprint() { 可用金额 - + <%if @user%><%=@user.coin%><%end%> @@ -250,7 +250,7 @@ function xprint() { 总投注额:0 <%= f.hidden_field :totalcoin, id:"cointotal", value:0 %> - <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r) resetcoin();return r'%> + <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r){var t=parseInt(document.getElementById("usercoin").innerHTML);var c=parseInt(document.getElementById("coinnums").innerHTML);document.getElementById("usercoin").innerHTML=(t-c).toString();}return r'%> <%end%> diff --git a/app/views/doublegame/index.html.erb b/app/views/doublegame/index.html.erb index 3e34fe1..41141c3 100644 --- a/app/views/doublegame/index.html.erb +++ b/app/views/doublegame/index.html.erb @@ -115,7 +115,7 @@ function xprint() { 可用金额 - + <%if @user%><%=@user.coin%><%end%> @@ -284,7 +284,7 @@ function xprint() { 总投注额:0 <%= f.hidden_field :totalcoin, id:"cointotal", value:0 %> - <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r) resetcoin();return r'%> + <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r){var t=parseInt(document.getElementById("usercoin").innerHTML);var c=parseInt(document.getElementById("coinnums").innerHTML);document.getElementById("usercoin").innerHTML=(t-c).toString();}return r'%> <%end%> diff --git a/app/views/singlegame/index.html.erb b/app/views/singlegame/index.html.erb index f7c9241..c0e16e8 100644 --- a/app/views/singlegame/index.html.erb +++ b/app/views/singlegame/index.html.erb @@ -115,7 +115,7 @@ function xprint() { 可用金额 - + <%if @user%><%=@user.coin%><%end%> @@ -331,7 +331,7 @@ function xprint() { 总投注额:0 <%= f.hidden_field :totalcoin, id:"cointotal", value:0 %> - <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r) resetcoin();return r'%> + <%= f.submit "下注", style:"height:20px;width:60px", :onclick=>'var r=confirm("确认下注");if(r){var t=parseInt(document.getElementById("usercoin").innerHTML);var c=parseInt(document.getElementById("coinnums").innerHTML);document.getElementById("usercoin").innerHTML=(t-c).toString();}return r'%> <%end%>