diff --git a/app/logic/Zone.php b/app/logic/Zone.php index bd7df51..230b57f 100644 --- a/app/logic/Zone.php +++ b/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% diff --git a/app/model/ZoneGoodsParam.php b/app/model/ZoneGoodsParam.php index 518e115..2db3dad 100644 --- a/app/model/ZoneGoodsParam.php +++ b/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) {