mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-26 03:16:36 +08:00
ComposerUpdate
This commit is contained in:
parent
4f3d9bc921
commit
69bf764fab
@ -84,8 +84,9 @@ class UserDiscount extends Controller
|
|||||||
}
|
}
|
||||||
$vo['items'] = json_encode($rule, JSON_UNESCAPED_UNICODE);
|
$vo['items'] = json_encode($rule, JSON_UNESCAPED_UNICODE);
|
||||||
} else {
|
} else {
|
||||||
$map = ['status' => 1];
|
$query = $this->app->db->name('DataUserLevel');
|
||||||
$this->levels = $this->app->db->name('DataUserLevel')->where($map)->order('number asc')->select()->toArray();
|
$this->levels = $query->where(['status' => 1])->order('number asc')->select()->toArray();
|
||||||
|
if (empty($this->levels)) $this->error('未配置用户等级!');
|
||||||
if (!empty($vo['items'])) foreach (json_decode($vo['items'], true) as $item) {
|
if (!empty($vo['items'])) foreach (json_decode($vo['items'], true) as $item) {
|
||||||
$vo["_level_{$item['level']}"] = $item['discount'];
|
$vo["_level_{$item['level']}"] = $item['discount'];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user