|
@@ -128,7 +128,7 @@
|
|
|
}
|
|
|
.bookinfo div.content table.creditbottom{
|
|
|
padding-top:10px;
|
|
|
- max-width:240px;
|
|
|
+ width:240px;
|
|
|
}
|
|
|
.bookinfo div.content img{
|
|
|
width:57px;
|
|
@@ -153,16 +153,9 @@
|
|
|
{{session "nickName"}}
|
|
|
</div>
|
|
|
<div>
|
|
|
+ <button class="btn btn-default bookin" id="indexbookinbtn" target="bookinfo" style="display:none;">查看签到</button>
|
|
|
+ <button class="btn btn-primary bookin" id="indexbookinbtn1" target="bookinfo" style="display:none;">签到</button>
|
|
|
|
|
|
- {{if session "credit_qd"}}
|
|
|
- {{if eq (session "credit_qd") "y"}}
|
|
|
- <button class="btn btn-default bookin" id="indexbookinbtn" target="bookinfo">查看签到</button>
|
|
|
- {{else}}
|
|
|
- <button class="btn btn-primary bookin" id="indexbookinbtn" target="bookinfo">签到</button>
|
|
|
- {{end}}
|
|
|
- {{else}}
|
|
|
- <button class="btn btn-primary bookin" id="indexbookinbtn" target="bookinfo">签到</button>
|
|
|
- {{end}}
|
|
|
|
|
|
</div>
|
|
|
<div class="m-detailinfo col-xs-12">
|
|
@@ -279,7 +272,7 @@
|
|
|
<td><img src="/images/40jf.png"><div>第四天</div></td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
- <table width="100%;" style="margin:0px auto;max-width: 241px;" class="creditbottom">
|
|
|
+ <table style="margin:0px auto;max-width: 241px;" class="creditbottom">
|
|
|
<tr>
|
|
|
<td style="margin-left:10px;"><img src="/images/50jf.png"><div>第五天</div></td>
|
|
|
<td><img src="/images/60jf.png"><div>第六天</div></td>
|
|
@@ -287,15 +280,9 @@
|
|
|
</tr>
|
|
|
</table>
|
|
|
<div>
|
|
|
- {{if session "credit_qd"}}
|
|
|
- {{if eq (session "credit_qd") "y"}}
|
|
|
- <button class="btn " style="width:180px;margin-top:10px;" id="bookinbtn" disabled="disabled">已签到</button>
|
|
|
- {{else}}
|
|
|
- <button class="btn btn-primary " style="width:180px;margin-top:10px;" id="bookinbtn">签到</button>
|
|
|
- {{end}}
|
|
|
- {{else}}
|
|
|
- <button class="btn btn-primary " style="width:180px;margin-top:10px;" id="bookinbtn">签到</button>
|
|
|
- {{end}}
|
|
|
+ <button class="btn " style="width:180px;margin-top:10px;" id="bookinbtn" disabled="disabled" style="display:none;">已签到</button>
|
|
|
+ <button class="btn btn-primary " style="width:180px;margin-top:10px;" id="bookinbtn1" style="display:none;">签到</button>
|
|
|
+
|
|
|
</div>
|
|
|
<div><small>(已连续签到<span class="days"></span>天)</small></div>
|
|
|
</div>
|
|
@@ -304,15 +291,34 @@
|
|
|
|
|
|
<script>
|
|
|
$(function(){
|
|
|
- $(".m-rules").bind("click",show);
|
|
|
- $(".bookin").bind("click",show);
|
|
|
- $(".f-close").bind("click",hide);
|
|
|
- $("#bookinbtn").bind("click",qd);
|
|
|
- bookinfo();
|
|
|
- if ($(".gold").text()==""){
|
|
|
- $(".gold").text("0");
|
|
|
- }
|
|
|
- });
|
|
|
+ changeStatus();
|
|
|
+ $(".m-rules").bind("click",show);
|
|
|
+ $(".bookin").bind("click",show);
|
|
|
+ $(".f-close").bind("click",hide);
|
|
|
+ $("#bookinbtn1").bind("click",qd);
|
|
|
+ bookinfo();
|
|
|
+ if ($(".gold").text()==""){
|
|
|
+ $(".gold").text("0");
|
|
|
+ }
|
|
|
+ });
|
|
|
+ function changeStatus(){
|
|
|
+ $.ajax({
|
|
|
+ url:"/member/credit/sessionQdAjx",
|
|
|
+ success:function(n){
|
|
|
+ if (n.result=="n"){
|
|
|
+ $("#indexbookinbtn1").show();
|
|
|
+ $("#bookinbtn1").show();
|
|
|
+ $("#indexbookinbtn").hide();
|
|
|
+ $("#bookinbtn").hide();
|
|
|
+ }else{
|
|
|
+ $("#indexbookinbtn").show();
|
|
|
+ $("#bookinbtn").show();
|
|
|
+ $("#indexbookinbtn1").hide();
|
|
|
+ $("#bookinbtn1").hide();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
function bookinfo(){
|
|
|
$.ajax({
|
|
|
url:"/member/credit/bookinfo",
|
|
@@ -365,11 +371,21 @@
|
|
|
$.post("/member/credit/inCreditAjx",{"param":"qd"},function(r){
|
|
|
bookinfo();
|
|
|
if (r.result=="y"){
|
|
|
+ var g=parseInt($(".gold").text());
|
|
|
+ var days=parseInt($(".days").attr("data"))
|
|
|
+ if (days==0){
|
|
|
+ days=1
|
|
|
+ }
|
|
|
+ var d=parseInt(days*10)
|
|
|
+ var g=g+d;
|
|
|
+ console.log(g);
|
|
|
+ $(".gold").text(g);
|
|
|
$("#indexbookinbtn").attr("class","btn btn-default bookin");
|
|
|
$("#bookinbtn").attr("class","btn bookin");
|
|
|
$("#bookinbtn").attr("disabled","disabled");
|
|
|
- $(".gold").text(parseInt($(".gold").text())+parseInt($(".days").attr("data")*10));
|
|
|
+
|
|
|
}
|
|
|
+ changeStatus();
|
|
|
});
|
|
|
return false;
|
|
|
}
|