<?php ?> <center> <table border="1"> <tr> <th>连续签到天数</th> <th>获得星星数量</th> <th>获得的积分</th> <th>最后一次签到时间</th> </tr> <tr align="center"> <td class="sign_num"><?=$data['sign_num']?></td> <td class="start_num"><?=$data['start_num']?><span class="img"> <?php if($data['start_num']>=1){?><img src="public/start.png"><?php }?> </span></td> <td class="integral"><?=$data['integral']?></td> <td class="time"><?=$data['sign_time']?></td> </tr> </table> <button class="btn">签到</button> <hr> <table border="1"> <tr> <th>编号</th> <th>商品名称</th> <th>所需积分</th> <th>操作</th> </tr> <?php foreach($goods as $k=>$v){?> <tr> <td><?=$v['id']?></td> <td><?=$v['name']?></td> <td><?=$v['integral']?></td> <td><a href="javascript:void (0)" οnclick="conversion(<?=$v['integral']?>)">兑换</a></td> </tr> <?php }?> </table> </center> <script src="public/jq.js"></script> <script> function conversion(integral){ var user_id=1; $.ajax({ type: "POST", url: '<?=\Yii::$app->urlManager->createUrl('sign/integral');?>', data:{ integral:integral, id:user_id }, dataType: "json", async:false, success: function(msg){ if(msg==1){ var integrals=$('.integral').text(); integrals=parseInt
签到 积分 管理系统
最新推荐文章于 2024-08-26 21:56:20 发布