提交 6eb93f04 编写于 作者: DCloud_JSON's avatar DCloud_JSON 提交者: study夏羽

-...

- 性能优化,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的问题 - 新增:执行退出登陆后,通过云函数调用
上级 e1cc463d
## 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 {
......
...@@ -191,6 +191,13 @@ ...@@ -191,6 +191,13 @@
"base" : "" "base" : ""
} }
}, },
"_spaceID" : "", "router": {
"vueVersion" : "2" "base": ""
},
"uniStatistics": {
"enable": true
}
},
"_spaceID": "",
"vueVersion": "2"
} }
{ {
"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,10 +12,9 @@ ...@@ -12,10 +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" @load="loadData"
> >
<!-- 基于 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 +62,7 @@ ...@@ -63,7 +62,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 +75,17 @@ ...@@ -76,11 +75,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: "",
refreshState: 0, refreshState: 0,
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: {
async submit(){ //完成并提交 async submit(){ //完成并提交
......
...@@ -185,22 +185,31 @@ ...@@ -185,22 +185,31 @@
clickLogout() { clickLogout() {
console.log("this.hasLogin:---------------- ",this.hasLogin); console.log("this.hasLogin:---------------- ",this.hasLogin);
if (this.hasLogin) { if (this.hasLogin) {
uni.showModal({
title: this.$t('settings.tips'),
content: this.$t('settings.exitLogin'),
cancelText: this.$t('settings.cancelText'),
confirmText: this.$t('settings.confirmText'),
success: res => {
if (res.confirm) {
uni.showLoading({
mask: true
});
uniCloud.callFunction({
name:'uni-id-cf',
data:{action:'logout'},
complete: (e) => {
console.log(e);
this.logout(); this.logout();
uni.hideLoading()
uni.navigateBack(); uni.navigateBack();
// uni.showModal({ }
// title: this.$t('settings.tips'), })
// content: this.$t('settings.exitLogin'), }
// cancelText: this.$t('settings.cancelText'), },
// confirmText: this.$t('settings.confirmText'), fail: () => {},
// success: res => { complete: () => {}
// if (res.confirm) { });
// this.logout();
// uni.navigateBack();
// }
// },
// fail: () => {},
// complete: () => {}
// });
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '/pages/ucenter/login-page/index/index' url: '/pages/ucenter/login-page/index/index'
......
...@@ -13,17 +13,13 @@ ...@@ -13,17 +13,13 @@
"bsonType": "string", "bsonType": "string",
"description": "邮箱" "description": "邮箱"
}, },
"device_uuid": {
"bsonType": "string",
"description": "设备UUID,常用于图片验证码"
},
"code": { "code": {
"bsonType": "string", "bsonType": "string",
"description": "验证码" "description": "验证码"
}, },
"scene": { "type": {
"bsonType": "string", "bsonType": "string",
"description": "使用验证码的场景,如:login, bind, unbind, pay" "description": "验证类型:login, bind, unbind, pay"
}, },
"state": { "state": {
"bsonType": "int", "bsonType": "int",
...@@ -33,11 +29,11 @@ ...@@ -33,11 +29,11 @@
"bsonType": "string", "bsonType": "string",
"description": "请求时客户端IP地址" "description": "请求时客户端IP地址"
}, },
"create_date": { "created_at": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "创建时间" "description": "创建时间"
}, },
"expired_date": { "expired_at": {
"bsonType": "timestamp", "bsonType": "timestamp",
"description": "过期时间" "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.
先完成此消息的编辑!
想要评论请 注册