diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md
index f80c2512477fc5ac80f3e809190331115f78574e..7c96ba98cc8106ad16ef321a4e5d782cd28ccaf5 100644
--- a/uni_modules/uni-id-pages/changelog.md
+++ b/uni_modules/uni-id-pages/changelog.md
@@ -1,8 +1,19 @@
-## 1.1.11(2023-03-24)
-- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题
-## 1.1.10(2023-03-24)
-- 修复 PC微信扫码登录跳转地址错误
-- uni-id-co 新增 请求鉴权支持 uni-cloud-s2s 模块验证签名 [uni-cloud-s2s文档](https://uniapp.dcloud.net.cn/uniCloud/uni-cloud-s2s.html)
+## 1.1.14(2023-05-19)
+- 修复 退出登录不会跳转至登录页的问题
+## 1.1.13(2023-05-10)
+- 修复 启用摇树优化 报错的问题
+## 1.1.12(2023-05-05)
+- uni-id-co 新增 调用 add-user 接口创建用户时允许触发 beforeRegister 钩子方法,beforeRegister 钩子[详见](https://uniapp.dcloud.net.cn/uniCloud/uni-id-summary.html#before-register)
+- uni-id-co 新增 自无 unionid 到有 unionid 状态进行登录时为用户补充 unionid 字段
+- uni-id-co 修复 i18n 在特定场景下报错的 bug
+- uni-id-co 修复 跨平台解绑微信/QQ时无法解绑的 bug
+- uni-id-co 修复 微信小程序等平台创建验证码时无法展示的 bug
+- uni-id-co 修复 更新 push_clientid 时因 device_id 没有变化导致无法更新
+## 1.1.11(2023-03-24)
+- 修复 tabbar页面因为token无效而强制跳转至登录页面(url参数包含`uniIdRedirectUrl`)后无法返回的问题
+## 1.1.10(2023-03-24)
+- 修复 PC微信扫码登录跳转地址错误
+- uni-id-co 新增 请求鉴权支持 uni-cloud-s2s 模块验证签名 [uni-cloud-s2s文档](https://uniapp.dcloud.net.cn/uniCloud/uni-cloud-s2s.html)
## 1.1.9(2023-03-24)
- 修复 跳转至登录页面的url参数包含`uniIdRedirectUrl`后无法返回的问题
## 1.1.8(2023-03-02)
diff --git a/uni_modules/uni-id-pages/common/check-id-card.js b/uni_modules/uni-id-pages/common/check-id-card.js
index 809d5823f26ba61c7c23520dacca44ff961aa4d7..c12f2a174aac137cd00d097cd8e28629d2a1a5ca 100644
--- a/uni_modules/uni-id-pages/common/check-id-card.js
+++ b/uni_modules/uni-id-pages/common/check-id-card.js
@@ -1,4 +1,4 @@
-export default function checkIdCard (idCardNumber) {
+function checkIdCard (idCardNumber) {
if (!idCardNumber || typeof idCardNumber !== 'string' || idCardNumber.length !== 18) return false
const coefficient = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
@@ -12,3 +12,5 @@ export default function checkIdCard (idCardNumber) {
return checkCode[sum % 11].toString() === code.toLowerCase()
}
+
+export default checkIdCard
diff --git a/uni_modules/uni-id-pages/common/store.js b/uni_modules/uni-id-pages/common/store.js
index 6bf16ff3379e4b999973c11e23c7948bc289ac64..d8f2108befbc97069809233cb10e63fbf6b5cfc6 100644
--- a/uni_modules/uni-id-pages/common/store.js
+++ b/uni_modules/uni-id-pages/common/store.js
@@ -79,7 +79,7 @@ export const mutations = {
uni.removeStorageSync('uni_id_token');
uni.setStorageSync('uni_id_token_expired', 0)
uni.redirectTo({
- url: `/${pagesJson.uniIdRouter && pagesJson.uniIdRouter.loginPage ? 'uni_modules/uni-id-pages/pages/login/login-withoutpwd': ''}`,
+ url: `/${pagesJson.uniIdRouter && pagesJson.uniIdRouter.loginPage ? pagesJson.uniIdRouter.loginPage: 'uni_modules/uni-id-pages/pages/login/login-withoutpwd'}`,
});
uni.$emit('uni-id-pages-logout')
this.setUserInfo({},{cover:true})
@@ -98,14 +98,14 @@ export const mutations = {
// console.log('判断需要返回几层:', delta);
if (uniIdRedirectUrl) {
return uni.redirectTo({
- url: uniIdRedirectUrl,
- fail: (err1) => {
- uni.switchTab({
- url:uniIdRedirectUrl,
- fail: (err2) => {
- console.log(err1,err2)
- }
- })
+ url: uniIdRedirectUrl,
+ fail: (err1) => {
+ uni.switchTab({
+ url:uniIdRedirectUrl,
+ fail: (err2) => {
+ console.log(err1,err2)
+ }
+ })
}
})
}
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
index f6390f78e1ecc34409a84e42aedca98340328b2f..913f4435b33f4a43fc1d3ffe747036cfe831fdc4 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
@@ -202,7 +202,6 @@
return '/' + pages[pages.length - n].route
},
toPage(path,index = 0) {
- let type = ['navigateTo','redirectTo'][index]
//console.log('比较', this.getRoute(1),this.getRoute(2), path)
if (this.getRoute(1) == path.split('?')[0] && this.getRoute(1) ==
'/uni_modules/uni-id-pages/pages/login/login-withoutpwd') {
@@ -212,13 +211,23 @@
} else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启
uni.navigateBack();
} else if (this.getRoute(1) != path) {
- uni[type]({
- url: path,
- animationType: 'slide-in-left',
- complete(e) {
- // console.log(e);
- }
- })
+ if(index === 0){
+ uni.navigateTo({
+ url: path,
+ animationType: 'slide-in-left',
+ complete(e) {
+ // console.log(e);
+ }
+ })
+ }else{
+ uni.redirectTo({
+ url: path,
+ animationType: 'slide-in-left',
+ complete(e) {
+ // console.log(e);
+ }
+ })
+ }
} else {
console.log('出乎意料的情况,path:' + path);
}
diff --git a/uni_modules/uni-id-pages/config.js b/uni_modules/uni-id-pages/config.js
index d5c735160c7f3a04da7ccf5fa02e8f11510da221..e847774904015c7b21e0bc94379681b158bed1ea 100644
--- a/uni_modules/uni-id-pages/config.js
+++ b/uni_modules/uni-id-pages/config.js
@@ -17,24 +17,14 @@ export default {
// "douyin",
// #ifdef APP
- // 'univerify',
- // #endif
-
- // #ifdef MP-WEIXIN
- 'weixin',
- // #endif
-
- // #ifndef MP-WEIXIN
- 'username',
- // #endif
-
+ 'univerify',
+ // #endif
+ 'weixin',
+ 'username',
// #ifdef APP
'apple',
- // #endif
-
- // #ifndef MP-WEIXIN
- 'smsCode',
- // #endif
+ // #endif
+ 'smsCode'
],
// 政策协议
agreements: {
@@ -62,7 +52,7 @@ export default {
* weak(弱:密码必须包含字母和数字,长度范围:6-16位之间)
* 为空或false则不验证密码强度
*/
- // passwordStrength: 'medium',
+ passwordStrength: 'medium',
/**
* 登录后允许用户设置密码(只针对未设置密码得用户)
* 开启此功能将 setPasswordAfterLogin 设置为 true 即可
diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json
index 8b8d1da83477aacd5ec1fc9b9ceff134f812ef7a..06c3b4f6d38c7727184432ca04911014ebe16a74 100644
--- a/uni_modules/uni-id-pages/package.json
+++ b/uni_modules/uni-id-pages/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-id-pages",
"displayName": "uni-id-pages",
- "version": "1.1.11",
+ "version": "1.1.14",
"description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [
"用户管理",
@@ -48,7 +48,7 @@
"uni-popup",
"uni-scss",
"uni-transition",
- "uni-open-bridge-common",
+ "uni-open-bridge-common",
"uni-cloud-s2s"
],
"encrypt": [],
diff --git a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
index ea5a83eb1ebdcb953449b654abf4d9f68c8ca1fe..e785554b03a32460604af996432123d8c01492c0 100644
--- a/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+++ b/uni_modules/uni-id-pages/pages/login/login-withpwd.vue
@@ -84,7 +84,7 @@
this.focusPassword = true
return uni.showToast({
title: '请输入密码',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -92,7 +92,7 @@
this.focusUsername = true
return uni.showToast({
title: '请输入手机号/用户名/邮箱',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -100,7 +100,7 @@
this.$refs.captcha.getImageCaptcha()
return uni.showToast({
title: '请输入验证码',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -152,7 +152,7 @@
@media screen and (min-width: 690px) {
.uni-content {
- height: 600px;
+ height: auto;
}
}
@@ -173,4 +173,4 @@
.link {
font-size: 12px;
}
-
+
diff --git a/uni_modules/uni-id-pages/pages/userinfo/realname-verify/realname-verify.vue b/uni_modules/uni-id-pages/pages/userinfo/realname-verify/realname-verify.vue
index 0ad880b3ab33cbfd14ba3947f642b28afb5ec8d8..e402d75f855d9e2e5fbaf328d3a7f5ff8803b09c 100644
--- a/uni_modules/uni-id-pages/pages/userinfo/realname-verify/realname-verify.vue
+++ b/uni_modules/uni-id-pages/pages/userinfo/realname-verify/realname-verify.vue
@@ -40,8 +40,9 @@
-
+ return this
+ },
+ /**
+ * ref 触发 执行动画
+ */
+ run(fn) {
+ if (!this.animation) return
+ this.animation.run(fn)
+ },
+ // 开始过度动画
+ open() {
+ clearTimeout(this.timer)
+ this.transform = ''
+ this.isShow = true
+ let { opacity, transform } = this.styleInit(false)
+ if (typeof opacity !== 'undefined') {
+ this.opacity = opacity
+ }
+ this.transform = transform
+ // 确保动态样式已经生效后,执行动画,如果不加 nextTick ,会导致 wx 动画执行异常
+ this.$nextTick(() => {
+ // TODO 定时器保证动画完全执行,目前有些问题,后面会取消定时器
+ this.timer = setTimeout(() => {
+ this.animation = createAnimation(this.config, this)
+ this.tranfromInit(false).step()
+ this.animation.run()
+ this.$emit('change', {
+ detail: this.isShow
+ })
+ }, 20)
+ })
+ },
+ // 关闭过度动画
+ close(type) {
+ if (!this.animation) return
+ this.tranfromInit(true)
+ .step()
+ .run(() => {
+ this.isShow = false
+ this.animationData = null
+ this.animation = null
+ let { opacity, transform } = this.styleInit(false)
+ this.opacity = opacity || 1
+ this.transform = transform
+ this.$emit('change', {
+ detail: this.isShow
+ })
+ })
+ },
+ // 处理动画开始前的默认样式
+ styleInit(type) {
+ let styles = {
+ transform: ''
+ }
+ let buildStyle = (type, mode) => {
+ if (mode === 'fade') {
+ styles.opacity = this.animationType(type)[mode]
+ } else {
+ styles.transform += this.animationType(type)[mode] + ' '
+ }
+ }
+ if (typeof this.modeClass === 'string') {
+ buildStyle(type, this.modeClass)
+ } else {
+ this.modeClass.forEach(mode => {
+ buildStyle(type, mode)
+ })
+ }
+ return styles
+ },
+ // 处理内置组合动画
+ tranfromInit(type) {
+ let buildTranfrom = (type, mode) => {
+ let aniNum = null
+ if (mode === 'fade') {
+ aniNum = type ? 0 : 1
+ } else {
+ aniNum = type ? '-100%' : '0'
+ if (mode === 'zoom-in') {
+ aniNum = type ? 0.8 : 1
+ }
+ if (mode === 'zoom-out') {
+ aniNum = type ? 1.2 : 1
+ }
+ if (mode === 'slide-right') {
+ aniNum = type ? '100%' : '0'
+ }
+ if (mode === 'slide-bottom') {
+ aniNum = type ? '100%' : '0'
+ }
+ }
+ this.animation[this.animationMode()[mode]](aniNum)
+ }
+ if (typeof this.modeClass === 'string') {
+ buildTranfrom(type, this.modeClass)
+ } else {
+ this.modeClass.forEach(mode => {
+ buildTranfrom(type, mode)
+ })
+ }
+
+ return this.animation
+ },
+ animationType(type) {
+ return {
+ fade: type ? 1 : 0,
+ 'slide-top': `translateY(${type ? '0' : '-100%'})`,
+ 'slide-right': `translateX(${type ? '0' : '100%'})`,
+ 'slide-bottom': `translateY(${type ? '0' : '100%'})`,
+ 'slide-left': `translateX(${type ? '0' : '-100%'})`,
+ 'zoom-in': `scaleX(${type ? 1 : 0.8}) scaleY(${type ? 1 : 0.8})`,
+ 'zoom-out': `scaleX(${type ? 1 : 1.2}) scaleY(${type ? 1 : 1.2})`
+ }
+ },
+ // 内置动画类型与实际动画对应字典
+ animationMode() {
+ return {
+ fade: 'opacity',
+ 'slide-top': 'translateY',
+ 'slide-right': 'translateX',
+ 'slide-bottom': 'translateY',
+ 'slide-left': 'translateX',
+ 'zoom-in': 'scale',
+ 'zoom-out': 'scale'
+ }
+ },
+ // 驼峰转中横线
+ toLine(name) {
+ return name.replace(/([A-Z])/g, '-$1').toLowerCase()
+ }
+ }
+}
+
+
diff --git a/uni_modules/uni-transition/package.json b/uni_modules/uni-transition/package.json
index 379e9aae4f4aea973a316f1f3ac34d0845ee0bfb..ea995a2a156e00176eb4bf3f15b2b17f2e90e938 100644
--- a/uni_modules/uni-transition/package.json
+++ b/uni_modules/uni-transition/package.json
@@ -1,87 +1,84 @@
-{
- "id": "uni-transition",
- "displayName": "uni-transition 过渡动画",
- "version": "1.3.1",
- "description": "元素的简单过渡动画",
- "keywords": [
- "uni-ui",
- "uniui",
- "动画",
- "过渡",
- "过渡动画"
-],
- "repository": "https://github.com/dcloudio/uni-ui",
- "engines": {
- "HBuilderX": ""
- },
- "directories": {
- "example": "../../temps/example_temps"
- },
- "dcloudext": {
- "category": [
- "前端组件",
- "通用组件"
- ],
- "sale": {
- "regular": {
- "price": "0.00"
- },
- "sourcecode": {
- "price": "0.00"
- }
- },
- "contact": {
- "qq": ""
- },
- "declaration": {
- "ads": "无",
- "data": "无",
- "permissions": "无"
- },
- "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui"
- },
- "uni_modules": {
- "dependencies": ["uni-scss"],
- "encrypt": [],
- "platforms": {
- "cloud": {
- "tcb": "y",
- "aliyun": "y"
- },
- "client": {
- "App": {
- "app-vue": "y",
- "app-nvue": "y"
- },
- "H5-mobile": {
- "Safari": "y",
- "Android Browser": "y",
- "微信浏览器(Android)": "y",
- "QQ浏览器(Android)": "y"
- },
- "H5-pc": {
- "Chrome": "y",
- "IE": "y",
- "Edge": "y",
- "Firefox": "y",
- "Safari": "y"
- },
- "小程序": {
- "微信": "y",
- "阿里": "y",
- "百度": "y",
- "字节跳动": "y",
- "QQ": "y"
- },
- "快应用": {
- "华为": "u",
- "联盟": "u"
- },
- "Vue": {
- "vue2": "y",
- "vue3": "y"
- }
- }
- }
- }
+{
+ "id": "uni-transition",
+ "displayName": "uni-transition 过渡动画",
+ "version": "1.3.2",
+ "description": "元素的简单过渡动画",
+ "keywords": [
+ "uni-ui",
+ "uniui",
+ "动画",
+ "过渡",
+ "过渡动画"
+],
+ "repository": "https://github.com/dcloudio/uni-ui",
+ "engines": {
+ "HBuilderX": ""
+ },
+ "directories": {
+ "example": "../../temps/example_temps"
+ },
+"dcloudext": {
+ "sale": {
+ "regular": {
+ "price": "0.00"
+ },
+ "sourcecode": {
+ "price": "0.00"
+ }
+ },
+ "contact": {
+ "qq": ""
+ },
+ "declaration": {
+ "ads": "无",
+ "data": "无",
+ "permissions": "无"
+ },
+ "npmurl": "https://www.npmjs.com/package/@dcloudio/uni-ui",
+ "type": "component-vue"
+ },
+ "uni_modules": {
+ "dependencies": ["uni-scss"],
+ "encrypt": [],
+ "platforms": {
+ "cloud": {
+ "tcb": "y",
+ "aliyun": "y"
+ },
+ "client": {
+ "App": {
+ "app-vue": "y",
+ "app-nvue": "y"
+ },
+ "H5-mobile": {
+ "Safari": "y",
+ "Android Browser": "y",
+ "微信浏览器(Android)": "y",
+ "QQ浏览器(Android)": "y"
+ },
+ "H5-pc": {
+ "Chrome": "y",
+ "IE": "y",
+ "Edge": "y",
+ "Firefox": "y",
+ "Safari": "y"
+ },
+ "小程序": {
+ "微信": "y",
+ "阿里": "y",
+ "百度": "y",
+ "字节跳动": "y",
+ "QQ": "y"
+ },
+ "快应用": {
+ "华为": "u",
+ "联盟": "u"
+ },
+ "Vue": {
+ "vue2": "y",
+ "vue3": "y"
+ }
+ }
+ }
+ }
}
\ No newline at end of file
diff --git a/uni_modules/uni-transition/readme.md b/uni_modules/uni-transition/readme.md
index 1e104fe5ea425a5520e2405cb4a50c49dc4697fb..2f8a77e10b8b2a5f93de2d9347d1be9639e4154d 100644
--- a/uni_modules/uni-transition/readme.md
+++ b/uni_modules/uni-transition/readme.md
@@ -1,11 +1,11 @@
-
-
-## Transition 过渡动画
-> **组件名:uni-transition**
-> 代码块: `uTransition`
-
-
-元素过渡动画
-
-### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
+
+
+## Transition 过渡动画
+> **组件名:uni-transition**
+> 代码块: `uTransition`
+
+
+元素过渡动画
+
+### [查看文档](https://uniapp.dcloud.io/component/uniui/uni-transition)
#### 如使用过程中有任何问题,或者您对uni-ui有一些好的建议,欢迎加入 uni-ui 交流群:871950839
\ No newline at end of file