mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-24 02:16:14 +08:00
Update Config.php
This commit is contained in:
parent
3c21fc0223
commit
d64b5057d1
@ -21,14 +21,8 @@ class Config extends Auth
|
|||||||
public function getPayment()
|
public function getPayment()
|
||||||
{
|
{
|
||||||
$types = [];
|
$types = [];
|
||||||
foreach (PaymentService::TYPES as $type => $arr) {
|
foreach (PaymentService::TYPES as $type => $arr) if (in_array($this->type, $arr['bind'])) $types[] = $type;
|
||||||
if (isset($arr['bind']) && in_array($this->type, $arr['bind'])) {
|
$query = $this->app->db->name('ShopPayment')->where(['status' => 1, 'deleted' => 0])->whereIn('type', $types);
|
||||||
$types[] = $type;
|
$this->success('获取支付参数数据', $query->order('sort desc,id desc')->field('type,code,name')->select()->toArray());
|
||||||
}
|
|
||||||
}
|
|
||||||
$map = ['status' => 1, 'deleted' => 0];
|
|
||||||
$query = $this->app->db->name('ShopPayment')->where($map)->whereIn('type', $types);
|
|
||||||
$collect = $query->order('sort desc,id desc')->field('type,code,name')->select();
|
|
||||||
$this->success('获取支付参数数据', $collect->toArray());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user