This commit is contained in:
knowpia
2022-09-14 15:30:02 +08:00
parent 08e90b58e9
commit 99885f862e
2 changed files with 3 additions and 3 deletions

View File

@@ -21,7 +21,7 @@ class Help
if(empty($info)){ if(empty($info)){
return show("找不到该学生信息!"); return show("找不到该学生信息!");
} }
$hot = $info->hot;
$data = [ $data = [
"userid"=>$userid, "userid"=>$userid,
"student_id"=>$student_id, "student_id"=>$student_id,
@@ -53,7 +53,7 @@ class Help
Db::name("student")->where(["id" => $student_id])->inc("mhot_count", 1)->update(); Db::name("student")->where(["id" => $student_id])->inc("mhot_count", 1)->update();
Db::commit(); Db::commit();
return show("助力成功!", SUCCESS_CODE, []); return show("助力成功!", SUCCESS_CODE, ["hot"=>$hot++]);
}catch (\Exception $e) { }catch (\Exception $e) {
Db::rollback(); Db::rollback();
return show("助力失败!"); return show("助力失败!");

View File

@@ -63,7 +63,7 @@ class Wechat
$user = AppUser::create([ $user = AppUser::create([
'nickname' => $user->getNickname(), 'nickname' => $user->getNickname(),
'avatar' => $user->getAvatar(), 'avatar' => $user->getAvatar(),
'identity' => 1, 'identity' => 0,
'openid' => $user->getId(), 'openid' => $user->getId(),
]); ]);
} }