|
|
@@ -459,6 +459,7 @@ class User extends AuthController
|
|
|
$f[] = Form::textarea('mark', '用户备注', $user->getData('mark'));
|
|
|
$f[] = Form::radio('is_promoter', '推广员', $user->getData('is_promoter'))->options([['value' => 1, 'label' => '开启'], ['value' => 0, 'label' => '关闭']]);
|
|
|
$f[] = Form::select('spread_uid', '推荐人', (string)$user->getData('spread_uid'))->options(array_merge([['value' => 0, 'label' => '无']], UserModel::where('uid', '<>', $uid)->field('uid as value,nickname as label')->select()->toArray()))->filterable(true);
|
|
|
+ $f[] = Form::radio('lock_spread', '推荐锁定', $user->getData('lock_spread'))->options([['value' => 1, 'label' => '锁定'], ['value' => 0, 'label' => '解锁']]);
|
|
|
$f[] = Form::radio('status', '状态', $user->getData('status'))->options([['value' => 1, 'label' => '开启'], ['value' => 0, 'label' => '锁定']]);
|
|
|
$form = Form::make_post_form('添加用户通知', $f, Url::buildUrl('update', array('uid' => $uid)), 5);
|
|
|
$this->assign(compact('form'));
|
|
|
@@ -480,6 +481,7 @@ class User extends AuthController
|
|
|
['integration', 0],
|
|
|
['status', 0],
|
|
|
['spread_uid', 0],
|
|
|
+ ['lock_spread', 0],
|
|
|
]);
|
|
|
if (!$uid) return $this->failed('数据不存在');
|
|
|
$user = UserModel::where('uid', $uid)->find();
|
|
|
@@ -552,6 +554,7 @@ class User extends AuthController
|
|
|
$edit['birthday'] = strtotime($data['birthday']);
|
|
|
$edit['mark'] = $data['mark'];
|
|
|
$edit['is_promoter'] = $data['is_promoter'];
|
|
|
+ $edit['lock_spread'] = $data['lock_spread'];
|
|
|
if ($edit) $res3 = UserModel::edit($edit, $uid);
|
|
|
else $res3 = true;
|
|
|
if ($res1 && $res2 && $res3 && $res_sp) $res = true;
|