提交 6afa1052 编写于 作者: DCloud_JSON's avatar DCloud_JSON

升级用户头像上传的裁切功能,app端为原生裁剪其他端保持原来方式。数据表字段改用avatar_file存储file对象方便做图片的回显。

上级 11324783
......@@ -270,7 +270,6 @@ module.exports = {
"needLogin": [
"/pages/ucenter/userinfo/userinfo",
"/uni_modules/uni-news-favorite/pages/uni-news-favorite/list",
"/pages/ucenter/userinfo/uploadCutImageToUnicloud"
],
"login": ["smsCode","univerify", "username", "weixin", "apple"],
/*
......@@ -383,7 +382,7 @@ uni-starter
│ │ │ │ ├─README.md
│ │ │ │ └─utils.js
│ │ │ ├─main.js
│ │ │ ├─uploadCutImageToUnicloud.vue 引用limeClipper的图片裁剪模块,为了方便二开可能会出现兼容`vue``nvue`,所以做成了`页面`而不是`组件`
│ │ │ ├─cropImage.vue 引用limeClipper的图片裁剪模块,为了方便二开可能会出现兼容`vue``nvue`,所以做成了`页面`而不是`组件`
│ │ │ └─userinfo.vue
│ | └─ucenter.vue 用户中心
│ |
......
## 1.0.26(2021-06-24)
升级用户头像上传的裁切功能,app端为原生裁剪其他端保持原来方式。数据表字段改用avatar_file存储file对象方便做图片的回显。
## 1.0.25(2021-06-23)
预置uniCloud admin依赖的uniCloud文件,方便uniCloud admin与uni-starter配套使用时免做文件迁移
## 1.0.24(2021-06-23)
......
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.0.25",
"version": "1.0.26",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"uni-starter",
......
......@@ -116,7 +116,7 @@
"navigationBarTitleText": "个人资料"
}
}, {
"path": "pages/ucenter/userinfo/uploadCutImageToUnicloud",
"path": "pages/ucenter/userinfo/cropImage",
"style": {
"navigationStyle": "custom"
}
......
<template>
<view class="center">
<view class="userInfo" @click="toUserInfo">
<image class="logo-img" :src="userInfo.avatar||avatarUrl"></image>
<view class="userInfo" @click.capture="toUserInfo">
<uni-file-picker v-if="userInfo.avatar_file" v-model="userInfo.avatar_file"
fileMediatype="image" :del-icon="false" return-type="object" :image-styles="listStyles" disablePreview
disabled />
<image v-else class="logo-img" src="/static/uni-center/defaultAvatarUrl.png"></image>
<view class="logo-title">
<text class="uer-name">{{userInfo.nickname||userInfo.username||userInfo.mobile||'未登录'}}</text>
</view>
......@@ -38,7 +41,6 @@
export default {
data() {
return {
avatarUrl: '/static/uni-center/defaultAvatarUrl.png',
gridList: [{
"text": "文字1",
"icon": "chat"
......@@ -98,7 +100,17 @@
"to": '/pages/ucenter/about/about',
"icon": "info"
}]
]
],
listStyles: {
"height": "150rpx", // 边框高度
"width": "150rpx", // 边框宽度
"border": { // 如果为 Boolean 值,可以控制边框显示与否
"color": "#eee", // 边框颜色
"width": "1px", // 边框宽度
"style": "solid", // 边框样式
"radius": "100%" // 边框圆角,支持百分比
}
}
}
},
onLoad() {
......
......@@ -18,22 +18,8 @@ export default {
},
methods:{
successFn(e){
this.uploadImgToUnicloud(e.url,(url)=>{
this.getOpenerEventChannel().emit('uploadAvatarAfter', {url})
uni.navigateBack()
})
},
uploadImgToUnicloud(url,callback){
uni.showLoading()
uniCloud.uploadFile({
cloudPath:Math.ceil((Math.random()+Math.random()+Math.random()+1)*1000000)+Date.now()+".png",
filePath:url
})
.then(res=>{
console.log(res);
callback(res.fileID)
uni.hideLoading()
})
this.getOpenerEventChannel().emit('success',e.url)
uni.navigateBack()
},
cancel(){
uni.navigateBack()
......
export default (callback,options)=>{
options = options||{"width":600,"height":600};
uni.chooseImage({
sizeType:['original'],
count:1,
...options,
complete:({tempFiles:[{path}]})=> {
uni.navigateTo({
url:'/common/uploadCutImageToUnicloud/uploadCutImageToUnicloud?path='+path+"&options="+JSON.stringify(options),
animationType:'fade-in',
events:{
url(url){
callback(url)
}
}
})
}
})
}
\ No newline at end of file
<template>
<view>
<uni-list>
<uni-list-item class="item" @click="setAvatar" link>
<uni-list-item class="item">
<view slot="body" class="item">
<text>头像</text>
<image class="avatarUrl" :src="userInfo.avatar||nullAvatarUrl" mode="widthFix"></image>
<uni-file-picker @click.native="uploadAvatarImg" @delete="removeAvatar" v-model="avatar_file"
fileMediatype="image" return-type="object" :image-styles="listStyles"
disabled />
</view>
</uni-list-item>
<uni-list-item class="item" @click="setNickname('')" title="昵称" :rightText="userInfo.nickname||'未设置'" link></uni-list-item>
<uni-list-item class="item" @click="bindMobile" title="手机号" :rightText="userInfo.mobile||'未绑定'" link></uni-list-item>
<uni-list-item class="item" @click="setNickname('')" title="昵称" :rightText="userInfo.nickname||'未设置'" link>
</uni-list-item>
<uni-list-item class="item" @click="bindMobile" title="手机号" :rightText="userInfo.mobile||'未绑定'" link>
</uni-list-item>
</uni-list>
<uni-popup ref="dialog" type="dialog">
<uni-popup-dialog mode="input" :value="userInfo.nickname" @confirm="setNickname" title="设置昵称" placeholder="请输入要设置的昵称">
<uni-popup-dialog mode="input" :value="userInfo.nickname" @confirm="setNickname" title="设置昵称"
placeholder="请输入要设置的昵称">
</uni-popup-dialog>
</uni-popup>
</view>
......@@ -26,7 +31,13 @@
export default {
data() {
return {
nullAvatarUrl: '/static/uni-center/logo.png',
avatar_file: {
"extname": "jpg",
"fileType": "image",
"name": "707756af-e9a9-4d08-8db9-5d1f34b84ea6.jpg",
"size": 98513,
"url": "cloud://tcb-lseqkmkcq0w1wzwcb18f3-be0d77.7463-tcb-lseqkmkcq0w1wzwcb18f3-be0d77-1304530278/1624523618672_0.jpg"
},
univerifyStyle: {
authButton: {
"title": "本机号码一键绑定", // 授权按钮文案
......@@ -34,6 +45,16 @@
otherLoginButton: {
"title": "其他号码绑定",
}
},
listStyles: {
"height": 80, // 边框高度
"width": 80, // 边框宽度
"border": { // 如果为 Boolean 值,可以控制边框显示与否
"color": "#eee", // 边框颜色
"width": "1px", // 边框宽度
"style": "solid", // 边框样式
"radius": "10px" // 边框圆角,支持百分比
}
}
}
},
......@@ -42,6 +63,10 @@
userInfo: 'user/info',
login: 'user/hasLogin'
})
},
onLoad() {
this.avatar_file = this.userInfo.avatar_file
console.log(this.avatar_file);
},
methods: {
...mapMutations({
......@@ -52,16 +77,16 @@
uni.preLogin({
provider: 'univerify',
success: this.univerify(), //预登录成功
fail:(res)=> { // 预登录失败
fail: (res) => { // 预登录失败
// 不显示一键登录选项(或置灰)
console.log(res)
console.log(res)
this.bindMobileBySmsCode()
}
})
// #endif
// #ifndef APP-PLUS
this.bindMobileBySmsCode()
//...去用验证码绑定
this.bindMobileBySmsCode()
//...去用验证码绑定
// #endif
},
univerify() {
......@@ -70,18 +95,22 @@
"univerifyStyle": this.univerifyStyle,
success: async e => {
console.log(e.authResult);
uniCloud.callFunction({
name:'uni-id-cf',
data:{
action:'bind_mobile_by_univerify',
params:e.authResult,
},
success: ({result}) => {
uniCloud.callFunction({
name: 'uni-id-cf',
data: {
action: 'bind_mobile_by_univerify',
params: e.authResult,
},
success: ({
result
}) => {
console.log(result);
if(result.code===0){
this.setUserInfo({"mobile":result.mobile})
if (result.code === 0) {
this.setUserInfo({
"mobile": result.mobile
})
uni.closeAuthView()
}else{
} else {
uni.showModal({
content: result.msg,
showCancel: false,
......@@ -89,13 +118,13 @@
uni.closeAuthView()
}
});
}
}
}
}
})
},
fail: (err) => {
console.log(err);
if(err.code=='30002'||err.code=='30001'){
if (err.code == '30002' || err.code == '30001') {
this.bindMobileBySmsCode()
}
}
......@@ -103,11 +132,11 @@
},
bindMobileBySmsCode() {
uni.navigateTo({
url:'/pages/ucenter/userinfo/bind-mobile/bind-mobile'
url: '/pages/ucenter/userinfo/bind-mobile/bind-mobile'
})
},
setNickname(nickname) {
console.log(9527,nickname);
console.log(9527, nickname);
if (nickname) {
usersTable.where('_id==$env.uid').update({
nickname
......@@ -132,54 +161,101 @@
} else {
this.$refs.dialog.open()
}
},
removeAvatar(){
this.setAvatarFile(null)
},
setAvatarFile(avatar_file){
uni.showLoading({
title: '设置中',
mask: true
});
// 使用 clientDB 提交数据
usersTable.where('_id==$env.uid').update({
avatar_file
}).then((res) => {
console.log(res);
if(avatar_file){
uni.showToast({
icon: 'none',
title: '设置成功'
})
}else{
uni.showToast({
icon: 'none',
title: '删除成功'
})
}
this.avatar_file = avatar_file
this.setUserInfo({
avatar_file
});
}).catch((err) => {
uni.showModal({
content: err.message ||
'请求服务失败',
showCancel: false
})
}).finally(() => {
uni.hideLoading()
})
},
setAvatar() {
uploadAvatarImg(res) {
const crop = {
quality: 100,
width: 600,
height: 600,
resize: true
};
uni.chooseImage({
count: 1,
success: (res) => {
// 头像剪裁尺寸
let options = {
width: 600,
height: 600
}
// 剪裁并上传头像
uni.navigateTo({
url: '/pages/ucenter/userinfo/uploadCutImageToUnicloud?path=' +
res.tempFilePaths[0] +
`&options=${JSON.stringify(options)}`,
animationType: "fade-in",
events: {
uploadAvatarAfter: ({
url
}) => {
console.log(url);
// 使用 clientDB 提交数据
usersTable.where('_id==$env.uid').update({
avatar: url
}).then((res) => {
console.log(res);
uni.showToast({
icon: 'none',
title: '修改成功'
})
this.setUserInfo({
avatar: url
});
}).catch((err) => {
uni.showModal({
content: err.message ||
'请求服务失败',
showCancel: false
})
}).finally(() => {
uni.hideLoading()
})
}
}
});
count: 1,crop,
success: async (res) => {
console.log(res);
let tempFile = res.tempFiles[0],
avatar_file = {
// #ifndef APP-PLUS
extname:tempFile.name.split('.')[tempFile.name.split('.').length-1],
// #endif
// #ifdef APP-PLUS
extname:tempFile.path.split('.')[tempFile.path.split('.').length-1]
// #endif
},
filePath = res.tempFilePaths[0]
// #ifndef APP-PLUS
//非app端用前端组件剪裁头像,app端用内置的原生裁剪
filePath = await new Promise((callback) => {
uni.navigateTo({
url: '/pages/ucenter/userinfo/cropImage?path=' + filePath +
`&options=${JSON.stringify(crop)}`,
animationType: "fade-in",
events: {
success: url=> {
callback(url)
}
}
});
})
// #endif
console.log(this.userInfo);
let cloudPath = this.userInfo._id+''+Date.now()
avatar_file.name = cloudPath
uni.showLoading({
title: '正在上传',
mask: true
});
let {fileID} = await uniCloud.uploadFile({
filePath,cloudPath,
fileType:"image"
});
// console.log(result)
avatar_file.url = fileID
console.log({avatar_file});
uni.hideLoading()
this.setAvatarFile(avatar_file)
}
})
},
}
}
}
</script>
......@@ -190,9 +266,18 @@
justify-content: space-between;
align-items: center;
}
.avatarUrl {
width: 50px;
height: 50px;
border-radius: 6px;
}
</style>
.chooseAvatar {
border: solid 1px #ddd;
border-radius: 10px;
width: 130rpx;
height: 130rpx;
line-height: 130rpx;
}
</style>
......@@ -23,7 +23,6 @@ module.exports = {
"needLogin": [
"/pages/ucenter/userinfo/userinfo",
"/uni_modules/uni-news-favorite/pages/uni-news-favorite/list",
"/pages/ucenter/userinfo/uploadCutImageToUnicloud",
"/uni_modules/uni-feedback/pages/uni-feedback/add"
],
"login": ["username","smsCode","univerify", "weixin", "apple"],
......
{
"bsonType": "object",
"required": [],
"properties": {
"_id": {
"description": "存储文档 ID(用户 ID),系统自动生成"
},
"username": {
"bsonType": "string",
"title": "用户名",
"description": "用户名,不允许重复",
"trim": "both"
},
"password": {
"bsonType": "password",
"title": "密码",
"description": "密码,加密存储",
"trim": "both"
},
"password_secret_version": {
"bsonType": "int",
"title": "passwordSecret",
"description": "密码使用的passwordSecret版本"
},
"nickname": {
"bsonType": "string",
"title": "昵称",
"description": "用户昵称",
"trim": "both"
},
"gender": {
"bsonType": "int",
"title": "性别",
"description": "用户性别:0 未知 1 男性 2 女性",
"defaultValue": 0,
"enum": [
{
"text": "未知",
"value": 0
},
{
"text": "男",
"value": 1
},
{
"text": "女",
"value": 2
}
]
},
"status": {
"bsonType": "int",
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
"title": "用户状态",
"defaultValue": 0,
"enum": [
{
"text": "正常",
"value": 0
},
{
"text": "禁用",
"value": 1
},
{
"text": "审核中",
"value": 2
},
{
"text": "审核拒绝",
"value": 3
}
]
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$",
"trim": "both"
},
"mobile_confirmed": {
"bsonType": "int",
"description": "手机号验证状态:0 未验证 1 已验证",
"title": "手机号验证状态",
"defaultValue": 0,
"enum": [
{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
]
},
"email": {
"bsonType": "string",
"format": "email",
"title": "邮箱",
"description": "邮箱地址",
"trim": "both"
},
"email_confirmed": {
"bsonType": "int",
"description": "邮箱验证状态:0 未验证 1 已验证",
"title": "邮箱验证状态",
"defaultValue": 0,
"enum": [
{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
]
},
"avatar": {
"bsonType": "string",
"title": "头像地址",
"description": "头像地址",
"trim": "both"
},
"avatar_file": {
"bsonType": "file",
"title": "头像文件",
"description": "用file类型方便使用uni-file-picker组件"
},
"department_id": {
"bsonType": "array",
"description": "部门ID",
"title": "部门",
"enumType": "tree",
"enum": {
"collection": "opendb-department",
"orderby": "name asc",
"field": "_id as value, name as text"
}
},
"role": {
"bsonType": "array",
"title": "角色",
"description": "用户角色",
"enum": {
"collection": "uni-id-roles",
"field": "role_id as value, role_name as text"
},
"foreignKey": "uni-id-roles.role_id",
"permission": {
"write": false
}
},
"wx_unionid": {
"bsonType": "string",
"description": "微信unionid"
},
"wx_openid": {
"bsonType": "object",
"description": "微信各个平台openid",
"properties": {
"app-plus": {
"bsonType": "string",
"description": "app平台微信openid"
},
"mp-weixin": {
"bsonType": "string",
"description": "微信小程序平台openid"
}
}
},
"ali_openid": {
"bsonType": "string",
"description": "支付宝平台openid"
},
"apple_openid": {
"bsonType": "string",
"description": "苹果登录openid"
},
"comment": {
"bsonType": "string",
"title": "备注",
"description": "备注",
"trim": "both"
},
"realname_auth": {
"bsonType": "object",
"description": "实名认证信息",
"required": [
"type",
"auth_status"
],
"properties": {
"type": {
"bsonType": "int",
"minimum": 0,
"maximum": 1,
"description": "用户类型:0 个人用户 1 企业用户"
},
"auth_status": {
"bsonType": "int",
"minimum": 0,
"maximum": 3,
"description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
},
"auth_date": {
"bsonType": "timestamp",
"description": "认证通过时间"
},
"real_name": {
"bsonType": "string",
"description": "真实姓名/企业名称"
},
"identity": {
"bsonType": "string",
"description": "身份证号码/营业执照号码"
},
"id_card_front": {
"bsonType": "string",
"description": "身份证正面照 URL"
},
"id_card_back": {
"bsonType": "string",
"description": "身份证反面照 URL"
},
"in_hand": {
"bsonType": "string",
"description": "手持身份证照片 URL"
},
"license": {
"bsonType": "string",
"description": "营业执照 URL"
},
"contact_person": {
"bsonType": "string",
"description": "联系人姓名"
},
"contact_mobile": {
"bsonType": "string",
"description": "联系人手机号码"
},
"contact_email": {
"bsonType": "string",
"description": "联系人邮箱"
}
}
},
"score": {
"bsonType": "int",
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义"
},
"register_date": {
"bsonType": "timestamp",
"description": "注册时间",
"forceDefaultValue": {
"$env": "now"
}
},
"register_ip": {
"bsonType": "string",
"description": "注册时 IP 地址",
"forceDefaultValue": {
"$env": "clientIP"
}
},
"last_login_date": {
"bsonType": "timestamp",
"description": "最后登录时间"
},
"last_login_ip": {
"bsonType": "string",
"description": "最后登录时 IP 地址"
},
"token": {
"bsonType": "array",
"description": "用户token"
},
"inviter_uid": {
"bsonType": "array",
"description": "用户全部上级邀请者",
"trim": "both"
},
"invite_time": {
"bsonType": "timestamp",
"description": "受邀时间"
},
"my_invite_code": {
"bsonType": "string",
"description": "用户自身邀请码"
}
}
}
\ No newline at end of file
{
"bsonType": "object",
"permission":{
"update":"doc.uid==auth.uid"
},
"required": [],
"properties": {
"_id": {
"description": "存储文档 ID(用户 ID),系统自动生成"
},
"username": {
"bsonType": "string",
"title": "用户名",
"description": "用户名,不允许重复",
"trim": "both"
},
"password": {
"bsonType": "password",
"title": "密码",
"description": "密码,加密存储",
"trim": "both"
},
"password_secret_version": {
"bsonType": "int",
"title": "passwordSecret",
"description": "密码使用的passwordSecret版本",
"permission":{
"write":false
}
},
"nickname": {
"bsonType": "string",
"title": "昵称",
"description": "用户昵称",
"trim": "both"
},
"gender": {
"bsonType": "int",
"title": "性别",
"description": "用户性别:0 未知 1 男性 2 女性",
"defaultValue": 0,
"enum": [{
"text": "未知",
"value": 0
},
{
"text": "男",
"value": 1
},
{
"text": "女",
"value": 2
}
]
},
"status": {
"bsonType": "int",
"description": "用户状态:0 正常 1 禁用 2 审核中 3 审核拒绝",
"title": "用户状态",
"defaultValue": 0,
"permission":{
"write":false
},
"enum": [{
"text": "正常",
"value": 0
},
{
"text": "禁用",
"value": 1
},
{
"text": "审核中",
"value": 2
},
{
"text": "审核拒绝",
"value": 3
}
]
},
"mobile": {
"bsonType": "string",
"title": "手机号码",
"description": "手机号码",
"pattern": "^\\+?[0-9-]{3,20}$",
"trim": "both",
"permission":{
"write":false
}
},
"mobile_confirmed": {
"bsonType": "int",
"description": "手机号验证状态:0 未验证 1 已验证",
"title": "手机号验证状态",
"defaultValue": 0,
"enum": [{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
],
"permission":{
"write":false
}
},
"email": {
"bsonType": "string",
"format": "email",
"title": "邮箱",
"description": "邮箱地址",
"trim": "both",
"permission":{
"write":false
}
},
"email_confirmed": {
"bsonType": "int",
"description": "邮箱验证状态:0 未验证 1 已验证",
"title": "邮箱验证状态",
"defaultValue": 0,
"enum": [{
"text": "未验证",
"value": 0
},
{
"text": "已验证",
"value": 1
}
],
"permission":{
"write":false
}
},
"avatar": {
"bsonType": "string",
"title": "头像地址",
"description": "头像地址",
"trim": "both"
},
"avatar_file": {
"bsonType": "file",
"title": "头像文件",
"description": "用file类型方便使用uni-file-picker组件"
},
"department_id": {
"bsonType": "array",
"description": "部门ID",
"permission":{
"write":false
},
"title": "部门",
"enumType": "tree",
"enum": {
"collection": "opendb-department",
"orderby": "name asc",
"field": "_id as value, name as text"
}
},
"role": {
"bsonType": "array",
"title": "角色",
"description": "用户角色",
"enum": {
"collection": "uni-id-roles",
"field": "role_id as value, role_name as text"
},
"foreignKey": "uni-id-roles.role_id",
"permission": {
"write": false
}
},
"wx_unionid": {
"bsonType": "string",
"description": "微信unionid",
"permission":{
"write":false
}
},
"wx_openid": {
"bsonType": "object",
"description": "微信各个平台openid",
"properties": {
"app-plus": {
"bsonType": "string",
"description": "app平台微信openid"
},
"mp-weixin": {
"bsonType": "string",
"description": "微信小程序平台openid"
}
},
"permission":{
"write":false
}
},
"ali_openid": {
"bsonType": "string",
"description": "支付宝平台openid",
"permission":{
"write":false
}
},
"apple_openid": {
"bsonType": "string",
"description": "苹果登录openid",
"permission":{
"write":false
}
},
"comment": {
"bsonType": "string",
"title": "备注",
"description": "备注",
"trim": "both",
"permission":{
"write":false
}
},
"realname_auth": {
"bsonType": "object",
"description": "实名认证信息",
"required": [
"type",
"auth_status"
],
"permission":{
"write":false
},
"properties": {
"type": {
"bsonType": "int",
"minimum": 0,
"maximum": 1,
"description": "用户类型:0 个人用户 1 企业用户"
},
"auth_status": {
"bsonType": "int",
"minimum": 0,
"maximum": 3,
"description": "认证状态:0 未认证 1 等待认证 2 认证通过 3 认证失败"
},
"auth_date": {
"bsonType": "timestamp",
"description": "认证通过时间"
},
"real_name": {
"bsonType": "string",
"description": "真实姓名/企业名称"
},
"identity": {
"bsonType": "string",
"description": "身份证号码/营业执照号码"
},
"id_card_front": {
"bsonType": "string",
"description": "身份证正面照 URL"
},
"id_card_back": {
"bsonType": "string",
"description": "身份证反面照 URL"
},
"in_hand": {
"bsonType": "string",
"description": "手持身份证照片 URL"
},
"license": {
"bsonType": "string",
"description": "营业执照 URL"
},
"contact_person": {
"bsonType": "string",
"description": "联系人姓名"
},
"contact_mobile": {
"bsonType": "string",
"description": "联系人手机号码"
},
"contact_email": {
"bsonType": "string",
"description": "联系人邮箱"
}
}
},
"score": {
"bsonType": "int",
"description": "用户积分,积分变更记录可参考:uni-id-scores表定义",
"permission":{
"write":false
}
},
"register_date": {
"bsonType": "timestamp",
"description": "注册时间",
"forceDefaultValue": {
"$env": "now"
},
"permission":{
"write":false
}
},
"register_ip": {
"bsonType": "string",
"description": "注册时 IP 地址",
"forceDefaultValue": {
"$env": "clientIP"
},
"permission":{
"write":false
}
},
"last_login_date": {
"bsonType": "timestamp",
"description": "最后登录时间",
"permission":{
"write":false
}
},
"last_login_ip": {
"bsonType": "string",
"description": "最后登录时 IP 地址",
"permission":{
"write":false
}
},
"token": {
"bsonType": "array",
"description": "用户token",
"permission":{
"write":false
}
},
"inviter_uid": {
"bsonType": "array",
"description": "用户全部上级邀请者",
"trim": "both",
"permission":{
"write":false
}
},
"invite_time": {
"bsonType": "timestamp",
"description": "受邀时间",
"permission":{
"write":false
}
},
"my_invite_code": {
"bsonType": "string",
"description": "用户自身邀请码",
"permission":{
"write":false
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册