feature #10

Merged
XiaoLFeng merged 15 commits from feature into master 2023-06-30 16:27:18 +08:00
Showing only changes of commit 0e192b962e - Show all commits

View File

@ -270,14 +270,14 @@ public function apiCustomBlogCheck(HttpRequest $request): JsonResponse
'userCode' => 'string|min:6|max:64|regex:#^[0-9A-Za-z]+$#', 'userCode' => 'string|min:6|max:64|regex:#^[0-9A-Za-z]+$#',
]); ]);
if ($dataCheck->fails()) { if (!$dataCheck->fails()) {
$resultBlog = DB::table('blog_link') $resultBlog = DB::table('blog_link')
->select('id', 'blogOwnEmail') ->select('id', 'blogOwnEmail')
->find((int)$request->id); ->find((int)$request->id);
if (!empty($resultBlog->id)) { if (!empty($resultBlog->id)) {
// 检查输入博客是否对应 // 检查输入博客是否对应
if (!empty($resultBlog->blogOwnEmail)) { if (!empty($resultBlog->blogOwnEmail)) {
if (strcmp($resultBlog->blogOwnEmail, $request->email) == 0) { if (strcmp($resultBlog->blogOwnEmail, $request->userEmail) == 0) {
// 生成验证码(筛查内容) // 生成验证码(筛查内容)
$resultVerifyCode = DB::table('code') $resultVerifyCode = DB::table('code')
->where([ ->where([