診所後台-登入系統API === ## 登入 -(ok) ::: success ::: spoiler POST /api/v1/login ### Description: 登入後台系統 ### Request: | key | type | value | description | | -------- |:------ |:--------- | ----------- | | account | string | user1 | 帳號 | | passWord | string | password1 | 密碼 | ### Response: | key | type | value | description | | ----- |:------:|:--------------------------------- |:----------- | | token | string | "eyJhbGciOiJIUzI1NiIsInR5cCI6..." | token | | state | string | "200" | success | <!-- - Period 的選項: --> <!-- - "08:30-12:00" - "15:30-18:00" - "18:00-21:00" - clinic 的選項: - "001" - "002" - "0R1" --> ### `範例`: ```json { token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VySWQiOiJ1c2VyTmFtZSIsInBhc3NXb3JkIjoiMTIzNDU2In0.uwS4j2AVw5ELGU1ZOTODqZmBqbWaK2ltxyE3bnRyat4", state: "200" } ``` :::success ::: ## 登出 ::: success ::: spoiler 登出功能在前端實作,後端不提供 ### Description: 登出後台系統 :::success ::: ## 忘記密碼(ok) ::: success ::: spoiler POST /api/v1/forgetPassWord ### Description: 這支api是給員工(非管理員)用的 ### Request: + #### body ```json= { "email": "xxx@gmail.com" } ``` ### Response: ```json= { "data": { "message": "已發送重置密碼信件至下列電子郵件地址:xxxxx3@gmail.com" }, "message": "成功。" } ``` ### `範例`: ```json= { "data": { "message": "已發送重置密碼信件至下列電子郵件地址:xxxx3@gmail.com" }, "message": "成功。" } ``` :::success ::: ## 修改密碼(ok) ::: success ::: spoiler PUT /api/v1/changePassWord ### Description: 修改員工個人密碼 ### Request: + #### Headers ```json= { "Authorization": "Bearer <your token here>" } ``` + #### body ```json= { "oldPassword":aab "newPassword":111111 } ``` ### Response: ```json= { "data": null, "message": "成功。" } ``` :::success ::: ## 設定新密碼(ok) ::: success ::: spoiler PUT /api/v1/resetPassWord ### Description: 設定新密碼 ### Request: + #### Headers ```json= { "Authorization": "Bearer <your token here>" } ``` + #### body ```json= { "newPassword":111111 } ``` ### Response: ```json= { "data": null, "message": "成功。" } ``` :::success ::: ## 檢查帳號是否重複(ok) ::: success ::: spoiler GET /api/v1/checkAccount?account=emp45 ### Description: 檢查帳號是否已經有人使用 ### Request: + Header ``` + params ```json { "account": "emp45" } ``` ### Response: ```json= { "data": { "account": "emp45", "canUse": false }, "message": "成功。" } ``` :::success ::: ###### tags: `掛號系統`
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up