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.
33 lines
625 B
33 lines
625 B
const {
|
|
preUnBind,
|
|
postUnBind
|
|
} = require('../../lib/utils/relate')
|
|
const {
|
|
LOG_TYPE, dbCmd
|
|
} = require('../../common/constants')
|
|
|
|
/**
|
|
* 解绑apple
|
|
* @tutorial https://uniapp.dcloud.net.cn/uniCloud/uni-id-pages.html#unbind-apple
|
|
* @returns
|
|
*/
|
|
module.exports = async function () {
|
|
const { uid } = this.authInfo
|
|
|
|
await preUnBind.call(this, {
|
|
uid,
|
|
unBindAccount: {
|
|
apple_openid: dbCmd.exists(true)
|
|
},
|
|
logType: LOG_TYPE.UNBIND_APPLE
|
|
})
|
|
|
|
return await postUnBind.call(this, {
|
|
uid,
|
|
unBindAccount: {
|
|
apple_openid: dbCmd.remove()
|
|
},
|
|
logType: LOG_TYPE.UNBIND_APPLE
|
|
})
|
|
}
|