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

-...

- 性能优化,list页面使用,[详情](https://uniapp.dcloud.io/uniCloud/unicloud-db?id=collection) - 拉齐uni-starter和uni-admin的schema新增:uni-id-tag.schema.json,更新:opendb-verify-codes.schema.json - 修复首次登陆,用户id没存储到storage的问题 - 新增:执行退出登陆后,通过云函数调用
上级 68755989
## 1.1.26(2021-12-29)
- 性能优化,list页面使用`getTemp`[详情](https://uniapp.dcloud.io/uniCloud/unicloud-db?id=collection)
- 拉齐uni-starter和uni-admin的schema新增:uni-id-tag.schema.json,更新:opendb-verify-codes.schema.json
- 修复首次登陆,用户id没存储到storage的问题
- 新增:执行退出登陆后,通过云函数调用`uniID.logout`
## 1.1.25(2021-12-09)
修复H5端在about页面,返回触发`uniShare.hide()`引发报错
## 1.1.24(2021-11-29)
......
......@@ -354,7 +354,9 @@
return this.$refs.userProfile.open(result.uid)
}
// #endif
if (result.type == "register") {
result.userInfo._id = result.uid
}
this.setUserInfo(result.userInfo)
loginSuccess(result)
} else {
......
......@@ -219,6 +219,9 @@
},
"router": {
"base": ""
},
"uniStatistics": {
"enable": true
}
},
"_spaceID": "",
......
{
"id": "uni-starter",
"displayName": "uni-starter",
"version": "1.1.25",
"version": "1.1.26",
"description": "云端一体应用快速开发基本项目模版",
"keywords": [
"login",
......
......@@ -12,9 +12,9 @@
</view>
<unicloud-db ref='udb' v-slot:default="{data,pagination,hasMore, loading, error, options}" @error="onqueryerror"
:where="where" collection="opendb-news-articles,uni-id-users" :page-size="10"
field="avatar,title,last_modify_date,user_id.username">
<!-- 基于 uni-list 的页面布局 -->
:collection="colList" :page-size="10"
>
<!-- 基于 uni-list 的页面布局 field="user_id.username"-->
<uni-list class="uni-list" :border="false" :style="{height:listHight}">
<!-- 作用于app端nvue页面的下拉加载 -->
......@@ -63,7 +63,7 @@
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar";
import Gps from '@/uni_modules/json-gps/js_sdk/gps.js';
const gps = new Gps()
const gps = new Gps(),db = uniCloud.database();
export default {
components: {
......@@ -76,11 +76,17 @@
} else {
return '请输入搜索内容'
}
},
colList(){
return [
db.collection('opendb-news-articles').where(this.where).field('avatar,title,last_modify_date,user_id').getTemp(),
db.collection('uni-id-users').field('_id,username').getTemp()
]
}
},
data() {
return {
where: "",
return {
where: '"article_status" == 1',
keyword: "",
showRefresh: false,
listHight: 0
......
......@@ -8,6 +8,9 @@ let mixin = {
loginSuccess(result){
loginSuccess(result)
delete result.userInfo.token
if (result.type == "register") {
result.userInfo._id = result.uid
}
this.setUserInfo(result.userInfo)
}
}
......
......@@ -39,7 +39,9 @@
this.phone = phoneNumber;
},
onReady() {
// this.$refs.sendSmsCode.start();
if(this.phone.length==11){
this.$refs.sendSmsCode.start();
}
},
methods: {
submit(){ //完成并提交
......
......@@ -187,9 +187,20 @@
cancelText: this.$t('settings.cancelText'),
confirmText: this.$t('settings.confirmText'),
success: res => {
if (res.confirm) {
this.logout();
uni.navigateBack();
if (res.confirm) {
uni.showLoading({
mask: true
});
uniCloud.callFunction({
name:'uni-id-cf',
data:{action:'logout'},
complete: (e) => {
console.log(e);
this.logout();
uni.hideLoading()
uni.navigateBack();
}
})
}
},
fail: () => {},
......
{
"bsonType": "object",
"required": [],
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"mobile": {
"bsonType": "string",
"description": "手机号码"
},
"email": {
"bsonType": "string",
"description": "邮箱"
},
"device_uuid": {
"bsonType": "string",
"description": "设备UUID,常用于图片验证码"
},
"code": {
"bsonType": "string",
"description": "验证码"
},
"scene": {
"bsonType": "string",
"description": "使用验证码的场景,如:login, bind, unbind, pay"
},
"state": {
"bsonType": "int",
"description": "验证状态:0 未验证、1 已验证、2 已作废"
},
"ip": {
"bsonType": "string",
"description": "请求时客户端IP地址"
},
"create_date": {
"bsonType": "timestamp",
"description": "创建时间"
},
"expired_date": {
"bsonType": "timestamp",
"description": "过期时间"
}
}
}
\ No newline at end of file
{
"bsonType": "object",
"required": [],
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"mobile": {
"bsonType": "string",
"description": "手机号码"
},
"email": {
"bsonType": "string",
"description": "邮箱"
},
"code": {
"bsonType": "string",
"description": "验证码"
},
"type": {
"bsonType": "string",
"description": "验证类型:login, bind, unbind, pay"
},
"state": {
"bsonType": "int",
"description": "验证状态:0 未验证、1 已验证、2 已作废"
},
"ip": {
"bsonType": "string",
"description": "请求时客户端IP地址"
},
"created_at": {
"bsonType": "timestamp",
"description": "创建时间"
},
"expired_at": {
"bsonType": "timestamp",
"description": "过期时间"
}
}
}
{
"bsonType": "object",
"required": ["tagid", "name"],
"permission": {
"read": false,
"create": false,
"update": false,
"delete": false
},
"properties": {
"_id": {
"description": "ID,系统自动生成"
},
"tagid": {
"bsonType": "string",
"description": "标签tagid",
"label": "标签tagid",
"componentForEdit": {
"name": "uni-easyinput"
}
},
"name": {
"bsonType": "string",
"description": "标签名称",
"label": "标签名称",
"componentForEdit": {
"name": "uni-easyinput"
}
},
"description": {
"bsonType": "string",
"description": "标签描述",
"label": "标签描述",
"componentForEdit": {
"name": "textarea"
},
"componentForShow": {
"name": "textarea"
}
},
"create_date": {
"bsonType": "timestamp",
"label": "创建时间",
"forceDefaultValue": {
"$env": "now"
},
"componentForEdit": {
"name": "uni-dateformat"
}
}
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册