| 算法名称:Backend authentication login | ||
| 输入:String event, identity, password | ||
| 输出:JSON格式数据 | ||
| 步骤1: | Log the result as "$r", verified by the "check_id" function | |
| 步骤2: | if "$r">0 then | |
| 步骤3: |
| Record "role" and "userID" in Local Storage |
| 步骤4: | else |
|
| 步骤5: |
| Clear "role" and "userID" from Local Storage |
| 步骤6: | returnjson_encode($r) | |