|
@@ -64,6 +64,8 @@ class Learn extends Controller
|
|
|
if($this->request->isGet() && $this->request->action() == 'edit')
|
|
|
{
|
|
|
$info = UserLearn::where('id',input('id'))->find()->toArray();
|
|
|
+ $user_info = User::where('id',$info['user_id'])->find()->toArray();
|
|
|
+ $data['phone'] = $user_info['phone'] ? $user_info['phone'] : $user_info['email'];
|
|
|
$this->first_id =$info['first_id'];
|
|
|
$this->second_id =$info['second_id'];
|
|
|
$this->type =$info['type'];
|
|
@@ -72,6 +74,7 @@ class Learn extends Controller
|
|
|
$phone = input('phone');
|
|
|
$user_id = User::where('phone|email',$phone)->value('id');
|
|
|
if(!$user_id)$this->error('用户不存在');
|
|
|
+ if(!empty($data['end_time']))$this->error('请选择时间');
|
|
|
$data['user_id'] = $user_id;
|
|
|
if(isset($data['end_time'])) $data['end_int'] = strtotime($data['end_time']);
|
|
|
}
|