提交 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) ## 1.1.25(2021-12-09)
修复H5端在about页面,返回触发`uniShare.hide()`引发报错 修复H5端在about页面,返回触发`uniShare.hide()`引发报错
## 1.1.24(2021-11-29) ## 1.1.24(2021-11-29)
......
...@@ -354,7 +354,9 @@ ...@@ -354,7 +354,9 @@
return this.$refs.userProfile.open(result.uid) return this.$refs.userProfile.open(result.uid)
} }
// #endif // #endif
if (result.type == "register") {
result.userInfo._id = result.uid
}
this.setUserInfo(result.userInfo) this.setUserInfo(result.userInfo)
loginSuccess(result) loginSuccess(result)
} else { } else {
......
...@@ -219,6 +219,9 @@ ...@@ -219,6 +219,9 @@
}, },
"router": { "router": {
"base": "" "base": ""
},
"uniStatistics": {
"enable": true
} }
}, },
"_spaceID": "", "_spaceID": "",
......
{ {
"id": "uni-starter", "id": "uni-starter",
"displayName": "uni-starter", "displayName": "uni-starter",
"version": "1.1.25", "version": "1.1.26",
"description": "云端一体应用快速开发基本项目模版", "description": "云端一体应用快速开发基本项目模版",
"keywords": [ "keywords": [
"login", "login",
......
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
</view> </view>
<unicloud-db ref='udb' v-slot:default="{data,pagination,hasMore, loading, error, options}" @error="onqueryerror" <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" :collection="colList" :page-size="10"
field="avatar,title,last_modify_date,user_id.username"> >
<!-- 基于 uni-list 的页面布局 --> <!-- 基于 uni-list 的页面布局 field="user_id.username"-->
<uni-list class="uni-list" :border="false" :style="{height:listHight}"> <uni-list class="uni-list" :border="false" :style="{height:listHight}">
<!-- 作用于app端nvue页面的下拉加载 --> <!-- 作用于app端nvue页面的下拉加载 -->
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
import statusBar from "@/uni_modules/uni-nav-bar/components/uni-nav-bar/uni-status-bar"; 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'; import Gps from '@/uni_modules/json-gps/js_sdk/gps.js';
const gps = new Gps() const gps = new Gps(),db = uniCloud.database();
export default { export default {
components: { components: {
...@@ -76,11 +76,17 @@ ...@@ -76,11 +76,17 @@
} else { } else {
return '请输入搜索内容' 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() { data() {
return { return {
where: "", where: '"article_status" == 1',
keyword: "", keyword: "",
showRefresh: false, showRefresh: false,
listHight: 0 listHight: 0
......
...@@ -8,6 +8,9 @@ let mixin = { ...@@ -8,6 +8,9 @@ let mixin = {
loginSuccess(result){ loginSuccess(result){
loginSuccess(result) loginSuccess(result)
delete result.userInfo.token delete result.userInfo.token
if (result.type == "register") {
result.userInfo._id = result.uid
}
this.setUserInfo(result.userInfo) this.setUserInfo(result.userInfo)
} }
} }
......
...@@ -39,7 +39,9 @@ ...@@ -39,7 +39,9 @@
this.phone = phoneNumber; this.phone = phoneNumber;
}, },
onReady() { onReady() {
// this.$refs.sendSmsCode.start(); if(this.phone.length==11){
this.$refs.sendSmsCode.start();
}
}, },
methods: { methods: {
submit(){ //完成并提交 submit(){ //完成并提交
......
...@@ -187,9 +187,20 @@ ...@@ -187,9 +187,20 @@
cancelText: this.$t('settings.cancelText'), cancelText: this.$t('settings.cancelText'),
confirmText: this.$t('settings.confirmText'), confirmText: this.$t('settings.confirmText'),
success: res => { success: res => {
if (res.confirm) { if (res.confirm) {
this.logout(); uni.showLoading({
uni.navigateBack(); mask: true
});
uniCloud.callFunction({
name:'uni-id-cf',
data:{action:'logout'},
complete: (e) => {
console.log(e);
this.logout();
uni.hideLoading()
uni.navigateBack();
}
})
} }
}, },
fail: () => {}, fail: () => {},
......
{ {
"bsonType": "object", "bsonType": "object",
"required": [], "required": [],
"properties": { "properties": {
"_id": { "_id": {
"description": "ID,系统自动生成" "description": "ID,系统自动生成"
}, },
"mobile": { "mobile": {
"bsonType": "string", "bsonType": "string",
"description": "手机号码" "description": "手机号码"
}, },
"email": { "email": {
"bsonType": "string", "bsonType": "string",
"description": "邮箱" "description": "邮箱"
}, },
"device_uuid": { "code": {
"bsonType": "string", "bsonType": "string",
"description": "设备UUID,常用于图片验证码" "description": "验证码"
}, },
"code": { "type": {
"bsonType": "string", "bsonType": "string",
"description": "验证码" "description": "验证类型:login, bind, unbind, pay"
}, },
"scene": { "state": {
"bsonType": "string", "bsonType": "int",
"description": "使用验证码的场景,如:login, bind, unbind, pay" "description": "验证状态:0 未验证、1 已验证、2 已作废"
}, },
"state": { "ip": {
"bsonType": "int", "bsonType": "string",
"description": "验证状态:0 未验证、1 已验证、2 已作废" "description": "请求时客户端IP地址"
}, },
"ip": { "created_at": {
"bsonType": "string", "bsonType": "timestamp",
"description": "请求时客户端IP地址" "description": "创建时间"
}, },
"create_date": { "expired_at": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "创建时间" "description": "过期时间"
}, }
"expired_date": { }
"bsonType": "timestamp", }
"description": "过期时间"
}
}
}
\ No newline at end of file
{
"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.
先完成此消息的编辑!
想要评论请 注册