AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## 注册1 ### 1.接口地址 +++ post:http://www.dakaifa.net/index.php?g=App&m=Reg&a=index *int:mobile=13834626385#手机号 *int:password=123#密码 <<< { "msg": 1, "id": "144" //数据库最后插入的id } <<< error { "msg": "注册失败" } +++ ### 2.接口代码 ``` public function index() { $mobile=json_decode($_POST['mobile']); $password=json_decode($_POST['password']); $users_model=M("Users"); $data=array( 'user_login' => '', 'user_email' => '', 'mobile' =>$mobile, 'user_nicename' =>'', 'user_pass' => sp_password($password), 'last_login_ip' => '', 'create_time' => date("Y-m-d H:i:s"), 'last_login_time' => date("Y-m-d H:i:s"), 'user_status' => 1, "user_type"=>2,//会员 ); $rst = $users_model->add($data); if($rst){ //注册成功后页面跳转 $res=array('msg'=>1,'id'=>$rst); echo json_encode($res); }else{ $res=array('msg'=>"注册失败"); echo json_encode($res); } } ```