hrjy 3 years ago
parent
commit
d3c076ddd3

+ 1 - 1
app/admin/controller/user/User.php

@@ -338,7 +338,7 @@ class User extends AuthController
         $f[] = Form::input('flowing_water', '流水分红', $user->getData('flowing_water'));
         $f[] = Form::input('flowing_water', '流水分红', $user->getData('flowing_water'));
         $f[] = Form::textarea('mark', '用户备注', $user->getData('mark'));
         $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::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::select('spread_uid', '推荐人', (string)$user->getData('spread_uid'))->options(array_merge([['value' => 0, 'label' => '无']], UserModel::where('uid', '<>', $uid)->field('uid as value,phone as label')->select()->toArray()))->filterable(true);
         $f[] = Form::radio('status', '状态', $user->getData('status'))->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);
         $form = Form::make_post_form('添加用户通知', $f, Url::buildUrl('update', array('uid' => $uid)), 5);
         $this->assign(compact('form'));
         $this->assign(compact('form'));

+ 1 - 1
app/api/controller/user/UserExtractController.php

@@ -71,7 +71,7 @@ class UserExtractController
         ], $request);
         ], $request);
         if ($extractInfo['money'] < 50) return app('json')->fail('最少提现50');
         if ($extractInfo['money'] < 50) return app('json')->fail('最少提现50');
         if (cache($request->uid())) return app('json')->fail('请勿频繁点击');
         if (cache($request->uid())) return app('json')->fail('请勿频繁点击');
-        if (!preg_match('/^(([1-9]\d*)|0)(\.\d{1-2})?$/', $extractInfo['money'])) return app('json')->fail('提现金额输入有误');
+        if (!preg_match('/^\\d+(\\.\\d+)?$/', $extractInfo['money'])) return app('json')->fail('提现金额输入有误');
         $user = $request->user();
         $user = $request->user();
         $broken_time = intval(sys_config('extract_time'));
         $broken_time = intval(sys_config('extract_time'));
         $search_time = time() - 86400 * $broken_time;
         $search_time = time() - 86400 * $broken_time;