WUserServer::Private

WUserServer::Private

new WUserServer::Private()

Source:

Methods

(static) genVerifyHtml(rdMessageopt, rdCountdownopt, rdCountdownMessageopt) → {String}

Description:
  • 產生驗證結果網站用html

Source:
Parameters:
Name Type Attributes Default Description
rdMessage String <optional>
''

輸入訊息字串

rdCountdown String <optional>
'false'

輸入是否顯示倒數文字字串,可選為'true'或'false'

rdCountdownMessage String <optional>
''

輸入顯示倒數文字字串

Returns:

回傳html字串

Type
String

(static) getUserFromToken(token) → {Promise}

Description:
  • 由token取得使用者資訊

Source:
Parameters:
Name Type Description
token String
Returns:

回傳Promise,resolve代表成功直接回傳使用者資訊物件,reject代表錯誤並回傳錯誤訊息

Type
Promise

(static) insert(user) → {Promise}

Description:
  • 新增使用者

Source:
Parameters:
Name Type Description
user Object

輸入使用者物件

Returns:

回傳Promise,resolve回傳使用者id與驗證碼(checkCode),reject代表錯誤並回傳錯誤訊息

Type
Promise

(static) isExist(find) → {Promise}

Description:
  • 判斷使用者是否存在

Source:
Parameters:
Name Type Description
find Object

輸入查詢物件

Returns:

回傳Promise,resolve回傳是否存在,reject代表錯誤並回傳錯誤訊息

Type
Promise

(static) selectOne(find) → {Promise}

Description:
  • 查詢單一使用者

Source:
Parameters:
Name Type Description
find Object

輸入查詢物件

Returns:

回傳Promise,resolve回傳單一使用者資訊物件,reject代表錯誤並回傳錯誤訊息

Type
Promise

(static) verifyCheckCode(checkCode) → {Promise}

Description:
  • 清除驗證瑪

Source:
Parameters:
Name Type Description
checkCode String
Returns:

回傳Promise,resolve回傳使用者id,reject代表錯誤並回傳錯誤訊息

Type
Promise

(static) verifyCheckCodeAndGetHtml(checkCode) → {Promise}

Description:
  • 接收使用者點擊信內提供的驗證碼連結

    1.判斷並清除使用者驗證瑪

    2.成功與失敗會回傳顯示網站html

Source:
Parameters:
Name Type Description
checkCode String
Returns:

回傳Promise,resolve回傳驗證結果html,無reject

Type
Promise

(static) verifyTokenExp(tokenExp) → {Promise}

Description:
  • 評估驗證碼過期時間並回傳狀態

Source:
Parameters:
Name Type Description
tokenExp String
Returns:

回傳Promise,resolve表示成功,reject代表錯誤並回傳錯誤訊息

Type
Promise