Commit 31763b63 by zhangheng

j

parent 74dfb104
...@@ -54,11 +54,18 @@ class IndexController extends Controller ...@@ -54,11 +54,18 @@ class IndexController extends Controller
return; return;
} }
$prize_type = M('Prize')->where(array('user_id' => $user['id']))->find(); $prize_type = M('Prize')->where(array('user_id' => $user['id']))->find();
if ($prize_type) { if ($prize_type) {
$type = 1; $type = 1;
} else { } else {
if($user['play_num']==0){
$type = 2;
}else{
$type = 0;
}
$type = 0;
} }
$this->assign('type', $type); $this->assign('type', $type);
$this->display(); $this->display();
......
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
// })(document, window); // })(document, window);
</script> </script>
<title>谁是桃源幸运锦鲤</title> <title>谁是桃源幸运锦鲤</title>
<link href="__CDN__/css/main.css?t=2.3" rel="stylesheet"> <link href="__CDN__/css/main.css?t=2.4" rel="stylesheet">
<style> <style>
</style> </style>
...@@ -67,13 +67,14 @@ ...@@ -67,13 +67,14 @@
} }
</script> </script>
<script> <script>
window.type='{:$type}' window.type='{:$type}';
window.cdn='__CDN__'
</script> </script>
<script type="text/javascript" <script type="text/javascript"
src="http://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key=t6NkwipRePFcidTJ"></script> src="http://api2.izhida.cn/wechat_js_config?app_id=wx4c3c856ab83a946b&v=1.2.1&api_list=all&app_stat_key=t6NkwipRePFcidTJ"></script>
<script type="text/javascript" src="__CDN__/js/jquery.qrcode.min.js"></script> <script type="text/javascript" src="__CDN__/js/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="__CDN__/js/index.js?t=2"></script> <script type="text/javascript" src="__CDN__/js/index.js?t=2.5"></script>
<link href="__CDN__/css/notify.css" rel="stylesheet"> <link href="__CDN__/css/notify.css" rel="stylesheet">
<script type="text/javascript" src="__CDN__/js/jquery-notify.js"></script> <script type="text/javascript" src="__CDN__/js/jquery-notify.js"></script>
......
...@@ -199,13 +199,8 @@ ul, li { ...@@ -199,13 +199,8 @@ ul, li {
} }
#container .prize-type { #container .prize-type {
position: absolute; position: absolute;
width: 250px; width: 100%;
height: 250px; height: 1238px;
top: 420px;
left: 182px;
}
#container .word {
font-size: 40px;
} }
@-webkit-keyframes rotate { @-webkit-keyframes rotate {
......
...@@ -220,16 +220,10 @@ ul, li { ...@@ -220,16 +220,10 @@ ul, li {
} }
.prize-type { .prize-type {
position: absolute; position: absolute;
width: 250px; width: 100%;
height: 250px; height: 1238px;
top: 420px;
left: 182px;
}
.word {
font-size: 40px;
} }
} }
......

194 KB | W: | H:

280 KB | W: | H:

Public/static/images/prize.jpg
Public/static/images/prize.jpg
Public/static/images/prize.jpg
Public/static/images/prize.jpg
  • 2-up
  • Swipe
  • Onion skin
...@@ -12,11 +12,17 @@ $(document).ready(function () { ...@@ -12,11 +12,17 @@ $(document).ready(function () {
this.css('z-index', window['max_zindex']); this.css('z-index', window['max_zindex']);
this.show(); this.show();
}; };
// if(window.type==1){ if(window.type==1){
// $('.prize-type').show(); $('.prize-type').attr('src',window.cdn+'/images/prize.png')
// }else { }else if(window.type==2){
// $('.btn-prize').show(); $('.prize-type').attr('src',window.cdn+'/images/no-num.png')
// }
}else {
setTimeout(function () {
btnPrize()
},2000);
}
}); });
function btnPrize() { function btnPrize() {
...@@ -26,21 +32,19 @@ function btnPrize() { ...@@ -26,21 +32,19 @@ function btnPrize() {
data:{'channel':GetQueryString('channel')}, data:{'channel':GetQueryString('channel')},
success: function (resp) { success: function (resp) {
var rank=RandomNumBoth(0,5); var rank=RandomNumBoth(0,5);
$(".map-bj").hide();
if (resp.errcode != 0) { if (resp.errcode != 0) {
my_notify(prize_word[rank]); $('.prize-type').attr('src',window.cdn+'/images/no-prize.png')
}else{ }else{
if(resp.errcode==2){ if(resp.errcode==2){
my_notify("抽奖次数已用完,感谢支持。") $('.prize-type').attr('src',window.cdn+'/images/no-num.png')
return; return;
}else { }else {
$('.prize-type').attr('src',window.cdn+'/images/prize.png')
$('.btn-prize').hide();
$('.prize-type').show();
} }
} }
$('.btn-prize').text(prize_word[rank]);
}, },
error: function () { error: function () {
my_notify('网络异常,请稍后重试'); my_notify('网络异常,请稍后重试');
......
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