Commit 8d792053 by 冷斌

update

parent c1a8bcac
......@@ -816,13 +816,15 @@ class Model_Live extends PhalApi_Model_NotORM {
/* 有中奖配置 才处理 */
if($list){
$rateinfo=[];
$rateArray = [];
foreach($list as $k=>$v){
// if($v['giftid']==$giftid && $v['nums']==$giftcount){
// $rateinfo[]=$v;
// }
if($v['giftid']==$giftid){
$rr = floor($v['rate']*1000);
$rateinfo[$rr]=$v;
$rateinfo[$v['id']]=$v;
$rateArray[$v['id']]=$rr;
}
}
/* 有该礼物、该数量 中奖配置 才处理 */
......@@ -842,10 +844,11 @@ class Model_Live extends PhalApi_Model_NotORM {
$luckcoin='0';
$lucktimes='0';
if($ifluck ==1 ){
var_dump($rateArray, $rateinfo);
die;
$luckrate=rand(1,100000);
//file_put_contents('./zhifu.txt',date('Y-m-d H:i:s').' 提交参数信息 luckrate:'.json_encode($luckrate)."\r\n",FILE_APPEND);
// $rate=0;
ksort($rateinfo);
foreach($rateinfo as $k=>$v){
$rate=floor($v['rate']*1000);
//file_put_contents('./zhifu.txt',date('Y-m-d H:i:s').' 提交参数信息 rate:'.json_encode($rate)."\r\n",FILE_APPEND);
......
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 to comment