From 65384673582e11a208691664adb8b3f162793c89 Mon Sep 17 00:00:00 2001 From: jinfengli Date: Sat, 14 Jan 2023 11:47:59 +0800 Subject: [PATCH] 添加通过邮箱或者手机号找回密码 --- dramaeditor/用户模块重构版.md | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git "a/dramaeditor/\347\224\250\346\210\267\346\250\241\345\235\227\351\207\215\346\236\204\347\211\210.md" "b/dramaeditor/\347\224\250\346\210\267\346\250\241\345\235\227\351\207\215\346\236\204\347\211\210.md" index c6dfe99..d9c6bff 100644 --- "a/dramaeditor/\347\224\250\346\210\267\346\250\241\345\235\227\351\207\215\346\236\204\347\211\210.md" +++ "b/dramaeditor/\347\224\250\346\210\267\346\250\241\345\235\227\351\207\215\346\236\204\347\211\210.md" @@ -314,4 +314,67 @@ SUCCESS: "token": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2Mzg3OTQ1MjYsImV4cCI6MTYzODg4MDkyNiwiYXV0aG9yaXR5IjoxLCJpZCI6MzZ9.VoRSXhSLJXlU_Lo_azzOGXJRNHa6wmh8_RZcYkm_xXs" } } +``` + +#### 通过邮箱/手机号重置密码 + +URL: {backUrl}/user/forgot/password + +METHOD: POST + +RequestHeaders: + +| key | value | +| :----------- | :------------ | +| Content-Type | application/json;charset=utf-8 | + +RequestBody: + +```json +{ + "username":"jinfengli", // 用户名 + "password":"123", // 密码 + "email":"jinfengli@qiwu.ai", // verifyType为1时候填写 + "code":"774109", // 从邮箱或者手机获取状态码 + "telephoneNumber":"13009633593", // verifyType为2时候填写 + "verifyType":1 // 1: 表示邮箱; 2: 表示手机号 +} +``` + +ResponseBody: + +```json +{ + "code": 1, + "msg": "成功", + "data": null +} +``` + +邮箱重置密码例子: + +``` +curl --location --request POST 'http://tx-gz18.heyqiwu.cn/api/juben/user/login/forgot/password' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "username":"jinfengli", + "password":"123", + "email":"jinfengli@qiwu.ai", + "code":"774109", + "verifyType":1 +}' +``` + +手机号重置密码例子: + +``` +curl --location --request POST 'http://tx-gz18.heyqiwu.cn/api/juben/user/login/forgot/password' \ +--header 'Content-Type: application/json' \ +--data-raw '{ + "username":"jinfengli", + "password":"test123", + "telephoneNumber":"13009633593", + "code":"303877", + "verifyType":2 +}' ``` \ No newline at end of file -- libgit2 0.27.1