|
@@ -184,13 +184,16 @@ class Intention extends Backend
|
|
|
|
|
|
//2.protector表 通过id 查找出数据
|
|
//2.protector表 通过id 查找出数据
|
|
$protector = \app\admin\model\Intention::get($id);
|
|
$protector = \app\admin\model\Intention::get($id);
|
|
|
|
+
|
|
//3.获取用户id
|
|
//3.获取用户id
|
|
$usr_id = Session::get('admin')['id'];
|
|
$usr_id = Session::get('admin')['id'];
|
|
|
|
+
|
|
//4.判断用户id和 protector的用户id是否一致 保存状态
|
|
//4.判断用户id和 protector的用户id是否一致 保存状态
|
|
if ($usr_id != 1 && $protector['usr_id'] != $usr_id) {
|
|
if ($usr_id != 1 && $protector['usr_id'] != $usr_id) {
|
|
$this->error('请操作自己的数据!');
|
|
$this->error('请操作自己的数据!');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
//5.保护到期时间设置现在 冻结算一下
|
|
//5.保护到期时间设置现在 冻结算一下
|
|
$free_day = Session::get('admin')['free_day'];
|
|
$free_day = Session::get('admin')['free_day'];
|
|
$param['ex_date'] = date('Y-m-d');
|
|
$param['ex_date'] = date('Y-m-d');
|
|
@@ -212,6 +215,8 @@ class Intention extends Backend
|
|
$this->error($e->getMessage());
|
|
$this->error($e->getMessage());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
public function follow($ids = NULL){
|
|
public function follow($ids = NULL){
|
|
$info = Db::table('follow')->where('type',1)->where('protect_id',$ids)->field('created_at','main')->select();
|
|
$info = Db::table('follow')->where('type',1)->where('protect_id',$ids)->field('created_at','main')->select();
|
|
if($_POST){
|
|
if($_POST){
|