Browse Source

優化

master
wanghongjun 2 years ago
parent
commit
0a9dc8b751
  1. 2
      app/logic/Zone.php
  2. 2
      app/model/ZoneGoodsParam.php

2
app/logic/Zone.php

@ -186,7 +186,7 @@ class Zone
* 获取刮刮乐信息(概率算法)
* @return array
*/
protected static function getWinningPrize($patterns)
public static function getWinningPrize($patterns)
{
// $patterns = [
// ['image' => 'prize1.png', 'probability' => 0.3], // 奖项图案,概率为30%

2
app/model/ZoneGoodsParam.php

@ -21,7 +21,7 @@ class ZoneGoodsParam extends Model
public static function getList($where = [])
{
$where['status'] = 1;
$list = self::where($where)->field('id,amount,image,probability,awards')->select()->toArray();
$list = self::where($where)->field('id,amount,image,probability,awards')->order('probability')->select()->toArray();
$ZoneAmountParam = [];
foreach ($list as &$item) {

Loading…
Cancel
Save