const{userCollection}=require('../../common/constants')const{USER_STATUS}=require('../../common/constants')asyncfunctionsetUserStatus(uid,status){constupdateData={status}if(status!==USER_STATUS.NORMAL){updateData.valid_token_date=Date.now()}awaituserCollection.doc(uid).update({status})// TODO 此接口尚不完善,例如注销后其他客户端可能存在有效token,支持Redis后此处会补充额外逻辑return{errCode:0}}module.exports={setUserStatus}