You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
371 B
17 lines
371 B
1 year ago
|
const {
|
||
|
setUserStatus
|
||
|
} = require('../../lib/utils/update-user-info')
|
||
|
const {
|
||
|
USER_STATUS
|
||
|
} = require('../../common/constants')
|
||
|
|
||
|
/**
|
||
|
* 注销账户
|
||
|
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#close-account
|
||
|
* @returns
|
||
|
*/
|
||
|
module.exports = async function () {
|
||
|
const { uid } = this.authInfo
|
||
|
return setUserStatus(uid, USER_STATUS.CLOSED)
|
||
|
}
|