调整订单
This commit is contained in:
@@ -30,14 +30,14 @@ class IndexController extends Controller
|
||||
$centers = Banner::query()->ofPosition(Banner::POSITION_INDEX_CENTER)->get();
|
||||
|
||||
|
||||
$show_goods_id = app('Conf_mall')['show_goods_id'] ?? 0;
|
||||
$show_goods_id = app('Conf_mall')['show_score_goods_id'] ?? 0;
|
||||
$show_goods = '';
|
||||
if ($show_goods_id > 0) {
|
||||
$show_goods = Goods::find($show_goods_id);
|
||||
}
|
||||
|
||||
$goods = Goods::query()
|
||||
->where('id', '<>', $show_goods_id)
|
||||
// ->where('id', '<>', $show_goods_id)
|
||||
->shown()
|
||||
->where('channel', Goods::CHANNEL_SCORE)
|
||||
->get();
|
||||
|
||||
@@ -79,10 +79,10 @@ trait HasOrders
|
||||
],
|
||||
//积分兑换
|
||||
'score' => [
|
||||
'all' => $this->orders()->scopeTypeScore()->common()->count(),
|
||||
'paid' => $this->orders()->scopeTypeScore()->paid()->count(),
|
||||
'unpay' => $this->orders()->scopeTypeScore()->unpay()->count(),
|
||||
'delivered' => $this->orders()->scopeTypeScore()->delivered()->count(),
|
||||
'all' => $this->orders()->typescore()->common()->count(),
|
||||
'paid' => $this->orders()->typescore()->paid()->count(),
|
||||
'unpay' => $this->orders()->typescore()->unpay()->count(),
|
||||
'delivered' => $this->orders()->typescore()->delivered()->count(),
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -310,7 +310,14 @@ class User extends Authenticate
|
||||
return sprintf("%s (%s)", $this->username, $this->info->nickname);
|
||||
}
|
||||
|
||||
public function areas()
|
||||
/**
|
||||
* Notes: 管理的区域
|
||||
*
|
||||
* @Author: 玄尘
|
||||
* @Date: 2023/1/28 9:32
|
||||
* @return BelongsToMany
|
||||
*/
|
||||
public function areas(): BelongsToMany
|
||||
{
|
||||
return $this->belongsToMany(
|
||||
Area::class,
|
||||
|
||||
Reference in New Issue
Block a user