<?php
// 后台存放真实密码，前端完全看不到
$realPwd = "hp93000";
$inputPwd = $_POST['pwd'] ?? '';

header("Content-Type:application/json;charset=utf-8");
if($inputPwd === $realPwd){
    // 生成临时token返回前端
    echo json_encode(["code"=>200,"token"=>"alert_".md5(time().uniqid())]);
}else{
    echo json_encode(["code"=>400,"msg"=>"密码错误"]);
}
