Commit 7b6b3dbc by 张恒

j

parent bc829280
...@@ -82,6 +82,7 @@ class IndexController extends Controller ...@@ -82,6 +82,7 @@ class IndexController extends Controller
))->count(); ))->count();
if ($type == 1) { if ($type == 1) {
if ($c >= 10) { if ($c >= 10) {
continue; continue;
} }
......
...@@ -51,7 +51,11 @@ ...@@ -51,7 +51,11 @@
<body ontouchmove="return false;"> <body ontouchmove="return false;">
<div id="container"> <div id="container">
<div class="btn-prize" style="display: none">点击抽奖</div>
<div class="btn-prize" style="display: none">
点击抽奖
</div>
<div class="prize-type" style="display: none"></div> <div class="prize-type" style="display: none"></div>
</div> </div>
<script> <script>
......
...@@ -30,7 +30,6 @@ $(document).ready(function () { ...@@ -30,7 +30,6 @@ $(document).ready(function () {
} }
$('.btn-prize').on('click',function () { $('.btn-prize').on('click',function () {
if(prize_lock==2){ if(prize_lock==2){
my_notify('点击太快');
return; return;
} }
btnPrize(); btnPrize();
...@@ -38,6 +37,7 @@ $(document).ready(function () { ...@@ -38,6 +37,7 @@ $(document).ready(function () {
}); });
function btnPrize() { function btnPrize() {
prize_lock=2; prize_lock=2;
$('.btn-prize').text('抽奖中...');
$.ajax({ $.ajax({
url: '/index/tryPrize', url: '/index/tryPrize',
type: 'post', type: 'post',
...@@ -51,9 +51,11 @@ function btnPrize() { ...@@ -51,9 +51,11 @@ function btnPrize() {
if (resp.data.prize ==0) { if (resp.data.prize ==0) {
my_notify(prize_word[rank]) my_notify(prize_word[rank])
}else{ }else{
$('.btn-prize').hide();
$('.prize-type').text('已中奖,请麻烦找官方登记信息').show();
} }
} }
$('.btn-prize').text('点击抽奖');
prize_lock=1; prize_lock=1;
}, },
error: function () { error: function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment