| 12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace app\admin\logic;
- use app\admin\model\dao\MoneyLog;
- use app\admin\model\dao\ScoreLog;
- use app\admin\model\dao\ShopOrder;
- use app\admin\model\dao\User;
- use app\common\model\BoxModel;
- use app\common\model\UserMoneyModel;
- use think\facade\Cache;
- use think\facade\Db;
- class BoxLogic
- {
- public static function getList($page, $limit, $where, $sort)
- {
- $count = (new BoxModel())
- ->where($where)
- ->count();
- $list = (new BoxModel())
- ->withoutField('password')
- ->withAttr('box_img', function ($val, $data) {
- return getWebUrl() . '/' . $val;
- })
- ->where($where)
- ->page($page, $limit)
- ->order($sort)
- ->select();
- return [$count, $list];
- }
- }
|