Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
c7e37665
H
hello_uni-id-pages
项目概览
DCloud
/
hello_uni-id-pages
通知
1054
Star
31
Fork
43
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
4
列表
看板
标记
里程碑
合并请求
2
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
H
hello_uni-id-pages
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
4
Issue
4
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
c7e37665
编写于
11月 29, 2022
作者:
C
chenruilong
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'dev'
上级
87fa1d4a
b359bc86
变更
15
显示空白变更内容
内联
并排
Showing
15 changed file
with
74 addition
and
41 deletion
+74
-41
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue
...odules/uni-captcha/components/uni-captcha/uni-captcha.vue
+2
-2
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
...es/uni-forms/components/uni-forms-item/uni-forms-item.vue
+1
-1
uni_modules/uni-id-pages/common/store.js
uni_modules/uni-id-pages/common/store.js
+7
-6
uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
...nents/uni-id-pages-email-form/uni-id-pages-email-form.vue
+10
-5
uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
...ponents/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
+12
-6
uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
...omponents/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
+8
-4
uni_modules/uni-id-pages/pages/login/login-smscode.vue
uni_modules/uni-id-pages/pages/login/login-smscode.vue
+2
-1
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
+4
-2
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+6
-3
uni_modules/uni-id-pages/pages/register/register-admin.vue
uni_modules/uni-id-pages/pages/register/register-admin.vue
+2
-1
uni_modules/uni-id-pages/pages/register/register.vue
uni_modules/uni-id-pages/pages/register/register.vue
+2
-1
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
...s/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
+6
-3
uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue
...ages/pages/userinfo/cropImage/limeClipper/limeClipper.vue
+8
-4
uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
...les/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
+2
-1
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
+2
-1
未找到文件。
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue
浏览文件 @
c7e37665
uni_modules/uni-forms/components/uni-forms-item/uni-forms-item.vue
浏览文件 @
c7e37665
uni_modules/uni-id-pages/common/store.js
浏览文件 @
c7e37665
...
...
@@ -5,13 +5,11 @@ const uniIdCo = uniCloud.importObject("uni-id-co")
const
db
=
uniCloud
.
database
();
const
usersTable
=
db
.
collection
(
'
uni-id-users
'
)
let
hostUserInfo
=
uni
.
getStorageSync
(
'
uni-id-pages-userInfo
'
)
||
{}
console
.
log
(
hostUserInfo
);
const
data
=
{
userInfo
:
hostUserInfo
,
hasLogin
:
Object
.
keys
(
hostUserInfo
).
length
!=
0
hasLogin
:
getUniIdTokenExpired
()
>
Date
.
now
()
}
console
.
log
(
'
data
'
,
data
);
...
...
@@ -25,13 +23,15 @@ export const mutations = {
if
(
e
.
result
.
updated
)
{
uni
.
showToast
({
title
:
"
更新成功
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
this
.
setUserInfo
(
data
)
}
else
{
uni
.
showToast
({
title
:
"
没有改变
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
})
...
...
@@ -117,7 +117,8 @@ export const mutations = {
if (showToast) {
uni.showToast({
title: toastText,
icon: 'none'
icon: 'none',
duration: 3000
});
}
this.updateUserInfo()
...
...
uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
浏览文件 @
c7e37665
...
...
@@ -123,17 +123,20 @@
this
.
$refs
.
captcha
.
focusCaptchaInput
=
true
return
uni
.
showToast
({
title
:
'
请先输入图形验证码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
!
this
.
email
)
return
uni
.
showToast
({
title
:
"
请输入邮箱
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
let
reg_email
=
/@/
;
if
(
!
reg_email
.
test
(
this
.
email
))
return
uni
.
showToast
({
title
:
"
邮箱格式错误
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,
{
customUI
:
true
...
...
@@ -152,7 +155,8 @@
console
.
log
(
result
.
code
);
uni
.
showToast
({
title
:
"
邮箱验证码发送成功
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
...
...
@@ -171,7 +175,8 @@
this
.
captcha
=
""
uni
.
showToast
({
title
:
e
.
message
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
})
...
...
uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
浏览文件 @
c7e37665
...
...
@@ -248,7 +248,8 @@
].
includes
(
type
))
{
return
uni
.
showToast
({
title
:
'
该登录方式暂未实现,欢迎提交pr
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
...
...
@@ -264,7 +265,8 @@
}
else
{
return
uni
.
showToast
({
title
:
'
当前设备不支持此登录,请选择其他登录方式
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
},
err
=>
{
...
...
@@ -286,7 +288,8 @@
)
{
return
uni
.
showToast
({
title
:
'
当前设备不支持此登录,请选择其他登录方式
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
...
...
@@ -359,7 +362,8 @@
//console.log("你未同意隐私政策协议");
uni
.
showToast
({
title
:
"
你未同意隐私政策协议
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
}
...
...
@@ -383,7 +387,8 @@
fail
(
err
)
{
uni
.
showToast
({
title
:
JSON
.
stringify
(
err
),
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
},
complete
:
async
e
=>
{
...
...
@@ -443,7 +448,8 @@
console
.
log
(
"
login-result
"
,
result
);
uni
.
showToast
({
title
:
'
登录成功
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
2000
});
// #ifdef MP-WEIXIN
//如果是微信小程序端的微信登录,且为首次登录,就弹出获取微信昵称+头像用于绑定资料
...
...
uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
浏览文件 @
c7e37665
...
...
@@ -123,13 +123,15 @@
this
.
$refs
.
captcha
.
focusCaptchaInput
=
true
return
uni
.
showToast
({
title
:
'
请先输入图形验证码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
let
reg_phone
=
/^1
\d{10}
$/
;
if
(
!
reg_phone
.
test
(
this
.
phone
))
return
uni
.
showToast
({
title
:
"
手机号格式错误
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,
{
customUI
:
true
...
...
@@ -147,7 +149,8 @@
console
.
log
(
result
.
code
);
uni
.
showToast
({
title
:
"
短信验证码发送成功
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
...
...
@@ -166,7 +169,8 @@
this
.
captcha
=
""
uni
.
showToast
({
title
:
e
.
message
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
})
...
...
uni_modules/uni-id-pages/pages/login/login-smscode.vue
浏览文件 @
c7e37665
...
...
@@ -59,7 +59,8 @@
this
.
$refs
.
smsCode
.
focusSmsCodeInput
=
true
return
uni
.
showToast
({
title
:
'
验证码不能为空
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
uniIdCo
.
loginBySms
({
...
...
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
浏览文件 @
c7e37665
...
...
@@ -116,7 +116,8 @@
this
.
focusPhone
=
true
return
uni
.
showToast
({
title
:
"
手机号码格式不正确
"
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
this
.
needAgreements
&&
!
this
.
agree
)
{
...
...
@@ -136,7 +137,8 @@
chooseArea
()
{
uni
.
showToast
({
title
:
'
暂不支持其他国家
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
},
}
...
...
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
浏览文件 @
c7e37665
...
...
@@ -84,21 +84,24 @@
this
.
focusPassword
=
true
return
uni
.
showToast
({
title
:
'
请输入密码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
!
this
.
username
.
length
)
{
this
.
focusUsername
=
true
return
uni
.
showToast
({
title
:
'
请输入手机号/用户名/邮箱
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
this
.
needCaptcha
&&
this
.
captcha
.
length
!=
4
)
{
this
.
$refs
.
captcha
.
getImageCaptcha
()
return
uni
.
showToast
({
title
:
'
请输入验证码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
...
...
uni_modules/uni-id-pages/pages/register/register-admin.vue
浏览文件 @
c7e37665
...
...
@@ -89,7 +89,8 @@
this
.
$refs
.
captcha
.
focusCaptchaInput
=
true
return
uni
.
showToast
({
title
:
'
请输入验证码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
this
.
needAgreements
&&
!
this
.
agree
)
{
...
...
uni_modules/uni-id-pages/pages/register/register.vue
浏览文件 @
c7e37665
...
...
@@ -96,7 +96,8 @@
this
.
$refs
.
captcha
.
focusCaptchaInput
=
true
return
uni
.
showToast
({
title
:
'
请输入验证码
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
this
.
needAgreements
&&
!
this
.
agree
)
{
...
...
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
浏览文件 @
c7e37665
...
...
@@ -52,14 +52,16 @@
this
.
focusMobile
=
true
return
uni
.
showToast
({
title
:
'
手机号码格式不正确
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
if
(
!
/^
\d{6}
$/
.
test
(
this
.
formData
.
code
)){
this
.
$refs
.
smsForm
.
focusSmsCodeInput
=
true
return
uni
.
showToast
({
title
:
'
验证码格式不正确
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
}
...
...
@@ -69,7 +71,8 @@
console
.
log
(
e
);
uni
.
showToast
({
title
:
e
.
errMsg
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
// #ifdef APP-NVUE
const
eventChannel
=
this
.
$scope
.
eventChannel
;
// 兼容APP-NVUE
...
...
uni_modules/uni-id-pages/pages/userinfo/cropImage/limeClipper/limeClipper.vue
浏览文件 @
c7e37665
...
...
@@ -506,7 +506,8 @@ export default {
if
(
!
this
.
image
)
{
uni
.
showToast
({
title
:
'
请选择图片
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
return
;
}
...
...
@@ -536,7 +537,8 @@ export default {
if
(
!
this
.
image
)
{
uni
.
showToast
({
title
:
'
请选择图片
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
return
;
}
...
...
@@ -721,7 +723,8 @@ export default {
if
(
!
this
.
image
)
{
uni
.
showToast
({
title
:
'
请选择图片
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
return
;
}
...
...
@@ -739,7 +742,8 @@ export default {
if
(
!
this
.
image
)
{
uni
.
showToast
({
title
:
'
请选择图片
'
,
icon
:
'
none
'
icon
:
'
none
'
,
duration
:
3000
});
return
;
}
...
...
uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
浏览文件 @
c7e37665
...
...
@@ -45,7 +45,8 @@
uniIdco
.
closeAccount
().
then
((
e
)
=>
{
console
.
log
(
e
);
uni
.
showToast
({
title
:
'
注销成功
'
title
:
'
注销成功
'
,
duration
:
3000
});
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
...
...
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
浏览文件 @
c7e37665
...
...
@@ -183,7 +183,8 @@
})
if
(
res
.
errCode
)
{
uni
.
showToast
({
title
:
res
.
errMsg
||
'
绑定失败
'
title
:
res
.
errMsg
||
'
绑定失败
'
,
duration
:
3000
})
}
await
mutations
.
updateUserInfo
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录