diff --git a/uni_modules/uni-badge/changelog.md b/uni_modules/uni-badge/changelog.md
index 56581c4eee26d01227b094831bf8c03aaecf5ebc..e352c60c60c1cda22aa86d15fccd26ee1f6a36ba 100644
--- a/uni_modules/uni-badge/changelog.md
+++ b/uni_modules/uni-badge/changelog.md
@@ -1,3 +1,5 @@
+## 1.2.2(2023-01-28)
+- 修复 运行/打包 控制台警告问题
## 1.2.1(2022-09-05)
- 修复 当 text 超过 max-num 时,badge 的宽度计算是根据 text 的长度计算,更改为 css 计算实际展示宽度,详见:[https://ask.dcloud.net.cn/question/150473](https://ask.dcloud.net.cn/question/150473)
## 1.2.0(2021-11-19)
diff --git a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
index 664dc370bfa3d192570df854b490b1f80b4aa01a..282d2539742c791f2adc35c0ca75e545616c9ea4 100644
--- a/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
+++ b/uni_modules/uni-badge/components/uni-badge/uni-badge.vue
@@ -21,7 +21,7 @@
* @value error 红色
* @property {String} inverted = [true|false] 是否无需背景颜色
* @property {Number} maxNum 展示封顶的数字值,超过 99 显示 99+
- * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
+ * @property {String} absolute = [rightTop|rightBottom|leftBottom|leftTop] 开启绝对定位, 角标将定位到其包裹的标签的四角上
* @value rightTop 右上
* @value rightBottom 右下
* @value leftTop 左上
@@ -191,12 +191,13 @@
/* #ifndef APP-NVUE */
display: flex;
overflow: hidden;
- box-sizing: border-box;
+ box-sizing: border-box;
+ font-feature-settings: "tnum";
+ min-width: 20px;
/* #endif */
justify-content: center;
flex-direction: row;
height: 20px;
- min-width: 20px;
padding: 0 4px;
line-height: 18px;
color: #fff;
@@ -206,7 +207,6 @@
border: 1px solid #fff;
text-align: center;
font-family: 'Helvetica Neue', Helvetica, sans-serif;
- font-feature-settings: "tnum";
font-size: $bage-size;
/* #ifdef H5 */
z-index: 999;
diff --git a/uni_modules/uni-badge/package.json b/uni_modules/uni-badge/package.json
index 7a34d9c3e1a0c3604f2dea26843e10e77eb616f2..b0bac93787ecccb53c389824a9910afbc0d77640 100644
--- a/uni_modules/uni-badge/package.json
+++ b/uni_modules/uni-badge/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-badge",
"displayName": "uni-badge 数字角标",
- "version": "1.2.1",
+ "version": "1.2.2",
"description": "数字角标(徽章)组件,在元素周围展示消息提醒,一般用于列表、九宫格、按钮等地方。",
"keywords": [
"",
diff --git a/uni_modules/uni-easyinput/changelog.md b/uni_modules/uni-easyinput/changelog.md
index 3f9d3b38684d2b19e71e986106b3e7ff72780bf6..5f5a55d4c0a1661a3a92e9365f817fae73fb40d0 100644
--- a/uni_modules/uni-easyinput/changelog.md
+++ b/uni_modules/uni-easyinput/changelog.md
@@ -1,3 +1,5 @@
+## 1.1.6(2023-01-28)
+- 新增 keyboardheightchange 事件,可监听键盘高度变化
## 1.1.5(2022-11-29)
- 优化 主题样式
## 1.1.4(2022-10-27)
diff --git a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
index 68dd6a6095cb8525d5cfd1bb107611cb98ff47f7..5f3ace73217ec6506fcd7434657bc0d4f923a4e9 100644
--- a/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
+++ b/uni_modules/uni-easyinput/components/uni-easyinput/uni-easyinput.vue
@@ -19,6 +19,7 @@
@blur="_Blur"
@focus="_Focus"
@confirm="onConfirm"
+ @keyboardheightchange="onkeyboardheightchange"
>
@@ -339,7 +341,7 @@ export default {
init() {
if (this.value || this.value === 0) {
this.val = this.value;
- } else if (this.modelValue || this.modelValue === 0) {
+ } else if (this.modelValue || this.modelValue === 0 || this.modelValue === '') {
this.val = this.modelValue;
} else {
this.val = null;
@@ -456,6 +458,15 @@ export default {
this.$emit('clear');
},
+ /**
+ * 键盘高度发生变化的时候触发此事件
+ * 兼容性:微信小程序2.7.0+、App 3.1.0+
+ * @param {Object} event
+ */
+ onkeyboardheightchange(event) {
+ this.$emit("keyboardheightchange",event);
+ },
+
/**
* 去除空格
*/
diff --git a/uni_modules/uni-easyinput/package.json b/uni_modules/uni-easyinput/package.json
index 63d07fbd7f0696a896a5393df0e0043c545971fb..657771a7fc67dcfa70b55cff38092e0894a4c3c2 100644
--- a/uni_modules/uni-easyinput/package.json
+++ b/uni_modules/uni-easyinput/package.json
@@ -1,7 +1,7 @@
{
"id": "uni-easyinput",
"displayName": "uni-easyinput 增强输入框",
- "version": "1.1.5",
+ "version": "1.1.6",
"description": "Easyinput 组件是对原生input组件的增强",
"keywords": [
"uni-ui",
diff --git a/uni_modules/uni-id-pages/changelog.md b/uni_modules/uni-id-pages/changelog.md
index 2c5adcc8653ecdc5e1585f2eac662757080d1075..866ac96435596a4ad0031fa2dfaf83edd9df1464 100644
--- a/uni_modules/uni-id-pages/changelog.md
+++ b/uni_modules/uni-id-pages/changelog.md
@@ -1,3 +1,8 @@
+## 1.1.0(2023-01-31)
+- 【重要】优化 小程序端资源包大小(运行时大小为:731KB,发行后为:583KB;注:可以直接将本插件作为分包使用)
+- 更新 微信小程序端 上传头像功能 用`wx.cropImage`实现图片裁剪
+- 修复 选择一键登录时会先显示 非密码登录页面的问题
+- 修复 一键登录 点击右上角的关闭按钮没有返回上一页的问题
## 1.0.41(2023-01-16)
- 优化 压缩依赖的文件资源大小
## 1.0.40(2023-01-16)
diff --git a/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue b/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
index 80e8f32fb9b7d0aa9c613c9daa8b0b10e8d3adc9..694594af4b74d730813754464e63b19839cdd85d 100644
--- a/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
+++ b/uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
@@ -122,8 +122,15 @@
callback(res.tempFilePath)
},
fail(e){
- console.error(e)
- callback(filePath)
+ console.error(e)
+ uni.showModal({
+ content: 'wx.cropImage ' + e.errMsg,
+ showCancel: false,
+ confirmText:"跳过裁剪",
+ complete() {
+ callback(filePath)
+ }
+ });
}
})
// #endif
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 c6a98309ed3c106e99219330d8ce495977566b66..defcaa455607cbd54715463ba44fd8c8e2235361 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
@@ -2,7 +2,7 @@
+ @click="item.path?toPage(item.path):login_before(item.id,false)">
{{item.text}}
@@ -17,7 +17,6 @@
//前一个窗口的页面地址。控制点击切换快捷登录方式是创建还是返回
import {store,mutations} from '@/uni_modules/uni-id-pages/common/store.js'
let allServicesList = []
-
export default {
computed: {
agreements() {
@@ -66,6 +65,7 @@
"text": "微信登录",
"logo": "/uni_modules/uni-id-pages/static/login/uni-fab-login/weixin.png",
},
+ // #ifndef MP-WEIXIN
{
"id": "apple",
"text": "苹果登录",
@@ -111,6 +111,7 @@
"text": "新浪微博", //暂未提供该登录方式的接口示例
"logo": "/uni_modules/uni-id-pages/static/app-plus/uni-fab-login/sinaweibo.png",
}
+ // #endif
],
univerifyStyle: { //一键登录弹出窗的样式配置参数
"fullScreen": true, // 是否全屏显示,true表示全屏模式,false表示非全屏模式,默认值为false。
@@ -203,17 +204,18 @@
}
return '/' + pages[pages.length - n].route
},
- navigateTo(path) {
+ 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') {
//如果要被打开的页面已经打开,且这个页面是 /uni_modules/uni-id-pages/pages/index/index 则把类型参数传给他
- let type = path.split('?')[1].split('=')[1]
- uni.$emit('uni-id-pages-set-login-type', type)
+ let loginType = path.split('?')[1].split('=')[1]
+ uni.$emit('uni-id-pages-setLoginType', loginType)
} else if (this.getRoute(2) == path) { // 如果上一个页面就是,马上要打开的页面,直接返回。防止重复开启
uni.navigateBack();
} else if (this.getRoute(1) != path) {
- uni.navigateTo({
+ uni[type]({
url: path,
animationType: 'slide-in-left',
complete(e) {
@@ -238,7 +240,7 @@
].includes(type)) {
return uni.showToast({
title: '该登录方式暂未实现,欢迎提交pr',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -255,7 +257,7 @@
}else{
return uni.showToast({
title: '当前设备不支持此登录,请选择其他登录方式',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -278,7 +280,7 @@
) {
return uni.showToast({
title: '当前设备不支持此登录,请选择其他登录方式',
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -321,18 +323,24 @@
uni.showLoading({
mask: true
})
+
if (type == 'univerify') {
let univerifyManager = uni.getUniverifyManager()
+ let clickAnotherButtons = false
let onButtonsClickFn = async res => {
- // console.log('点击了第三方登录,provider:', res, res.provider, this.univerifyStyle.buttons.list);
- //同步一键登录弹出层隐私协议框是否打勾
+ console.log('点击了第三方登录,provider:', res, res.provider, this.univerifyStyle.buttons.list);
+ clickAnotherButtons = true
+ // 同步一键登录弹出层隐私协议框是否打勾
let agree = (await uni.getCheckBoxState())[1].state
this.agree = agree
let {
path
} = this.univerifyStyle.buttons.list[res.index]
- if (path) {
- this.navigateTo(path)
+ if (path) {
+ if( this.getRoute(1).includes('login-withoutpwd') && path.includes('login-withoutpwd') ){
+ this.getParentComponent().showCurrentWebview()
+ }
+ this.toPage(path,1)
closeUniverify()
} else {
if (agree) {
@@ -343,7 +351,7 @@
} else {
uni.showToast({
title: "你未同意隐私政策协议",
- icon: 'none',
+ icon: 'none',
duration: 3000
});
}
@@ -365,16 +373,20 @@
this.login(res.authResult, 'univerify')
},
fail(err) {
- uni.showToast({
- title: JSON.stringify(err),
- icon: 'none',
- duration: 3000
- });
+ console.log(err)
+ if(!clickAnotherButtons){
+ uni.navigateBack()
+ }
+ // uni.showToast({
+ // title: JSON.stringify(err),
+ // icon: 'none',
+ // duration: 3000
+ // });
},
complete: async e => {
uni.hideLoading()
//同步一键登录弹出层隐私协议框是否打勾
- this.agree = (await uni.getCheckBoxState())[1].state
+ // this.agree = (await uni.getCheckBoxState())[1].state
// 取消订阅自定义按钮点击事件
univerifyManager.offButtonsClick(onButtonsClickFn)
}
@@ -422,7 +434,7 @@
uniIdCo[action](params).then(result => {
uni.showToast({
title: '登录成功',
- icon: 'none',
+ icon: 'none',
duration: 2000
});
// #ifdef MP-WEIXIN
diff --git a/uni_modules/uni-id-pages/package.json b/uni_modules/uni-id-pages/package.json
index ae1ae1fa19df6e1f9dac0d430a2d54fd4c0586b0..1c8e2ff547eb132ea383ed0dd50963971f332775 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.0.41",
+ "version": "1.1.0",
"description": "云端一体简单、统一、可扩展的用户中心页面模版",
"keywords": [
"用户管理",
diff --git a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
index ca60fe311fef91afa03e6085f1f74f207a35ee1e..5e88727feb17dcb63e10df909f7be019791ce52d 100644
--- a/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
+++ b/uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
@@ -10,8 +10,10 @@
将根据第三方账号服务平台的授权范围获取你的信息
-
-
+
+
@@ -19,8 +21,8 @@
未注册的账号验证通过后将自动注册
+86
-
+
@@ -40,7 +42,7 @@
return {
type: "", //快捷登录方式
phone: "", //手机号码
- focusPhone:false,
+ focusPhone: false,
logo: "/static/logo.png"
}
},
@@ -52,24 +54,27 @@
return /^1\d{10}$/.test(this.phone);
},
imgSrc() { //大快捷登录按钮图
- return this.type == 'weixin'? '/uni_modules/uni-id-pages/static/login/weixin.png' : '/uni_modules/uni-id-pages/static/app-plus/apple.png'
+ return this.type == 'weixin' ? '/uni_modules/uni-id-pages/static/login/weixin.png' :
+ '/uni_modules/uni-id-pages/static/app-plus/apple.png'
}
},
async onLoad(e) {
//获取通过url传递的参数type设置当前登录方式,如果没传递直接默认以配置的登录
let type = e.type || config.loginTypes[0]
this.type = type
+
// console.log("this.type: -----------",this.type);
- if(type != 'univerify'){
+ if (type != 'univerify') {
this.focusPhone = true
}
this.$nextTick(() => {
//关闭重复显示的登录快捷方式
if (['weixin', 'apple'].includes(type)) {
- this.$refs.uniFabLogin.servicesList = this.$refs.uniFabLogin.servicesList.filter(item =>item.id != type)
+ this.$refs.uniFabLogin.servicesList = this.$refs.uniFabLogin.servicesList.filter(item =>
+ item.id != type)
}
})
- uni.$on('uni-id-pages-set-login-type', type => {
+ uni.$on('uni-id-pages-setLoginType', type => {
this.type = type
})
},
@@ -84,29 +89,38 @@
// #endif
},
onUnload() {
- uni.$off('uni-id-pages-set-login-type')
+ uni.$off('uni-id-pages-setLoginType')
},
onReady() {
- //是否优先启动一键登录。即:页面一加载就启动一键登录
+ // 是否优先启动一键登录。即:页面一加载就启动一键登录
//#ifdef APP-PLUS
if (this.type == "univerify") {
+ const pages = getCurrentPages();
+ currentWebview = pages[pages.length - 1].$getAppWebview();
+ currentWebview.setStyle({
+ "top": "2000px" // 隐藏当前页面窗体
+ })
this.type == this.loginTypes[1]
// console.log('开始一键登录');
- setTimeout(() => {
- this.$refs.uniFabLogin.login_before('univerify')
- }, 100)
+ this.$refs.uniFabLogin.login_before('univerify')
}
//#endif
},
methods: {
+ showCurrentWebview(){
+ // 恢复当前页面窗体的显示 一键登录,默认不显示当前窗口
+ currentWebview.setStyle({
+ "top": 0
+ })
+ },
quickLogin(e) {
- let options = {}
+ let options = {}
- if (e.detail?.code) {
- options.phoneNumberCode = e.detail.code
- }
+ if (e.detail?.code) {
+ options.phoneNumberCode = e.detail.code
+ }
- if (this.type === 'weixinMobile' && !e.detail?.code) return
+ if (this.type === 'weixinMobile' && !e.detail?.code) return
this.$refs.uniFabLogin.login_before(this.type, true, options)
},
@@ -146,13 +160,13 @@