Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
8f3761f8
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看板
提交
8f3761f8
编写于
7月 13, 2023
作者:
C
chenruilong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.1.15
上级
6362c8b1
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
44 addition
and
37 deletion
+44
-37
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+4
-2
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+1
-1
uni_modules/uni-id-pages/pages/register/register-admin.vue
uni_modules/uni-id-pages/pages/register/register-admin.vue
+15
-15
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/verify-request-sign.js
...loudfunctions/uni-id-co/middleware/verify-request-sign.js
+3
-0
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-qq.js
...loud/cloudfunctions/uni-id-co/module/login/login-by-qq.js
+20
-18
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
...i-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
+1
-1
未找到文件。
uni_modules/uni-id-pages/changelog.md
浏览文件 @
8f3761f8
## 1.1.14(2023-05-19)
## 1.1.15(2023-07-13)
-
修复 退出登录不会跳转至登录页的问题
-
uni-id-co 修复 QQ登录时不存在头像时报错的问题
## 1.1.14(2023-05-19)
-
修复 退出登录不会跳转至登录页的问题
## 1.1.13(2023-05-10)
## 1.1.13(2023-05-10)
-
修复 启用摇树优化 报错的问题
-
修复 启用摇树优化 报错的问题
## 1.1.12(2023-05-05)
## 1.1.12(2023-05-05)
...
...
uni_modules/uni-id-pages/package.json
浏览文件 @
8f3761f8
{
{
"id"
:
"uni-id-pages"
,
"id"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"version"
:
"1.1.1
4
"
,
"version"
:
"1.1.1
5
"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"keywords"
:
[
"keywords"
:
[
"用户管理"
,
"用户管理"
,
...
...
uni_modules/uni-id-pages/pages/register/register-admin.vue
浏览文件 @
8f3761f8
...
@@ -27,9 +27,9 @@
...
@@ -27,9 +27,9 @@
class=
"input-box"
placeholder=
"再次输入密码"
maxlength=
"20"
type=
"password"
v-model=
"formData.password2"
class=
"input-box"
placeholder=
"再次输入密码"
maxlength=
"20"
type=
"password"
v-model=
"formData.password2"
trim=
"both"
/>
trim=
"both"
/>
</uni-forms-item>
</uni-forms-item>
<uni-forms-item
>
<!--
<uni-forms-item>
--
>
<uni-captcha
ref=
"captcha"
scene=
"register"
v-model=
"formData.captcha"
/
>
<!--
<uni-captcha
ref=
"captcha"
scene=
"register"
v-model=
"formData.captcha"
/>
--
>
</uni-forms-item
>
<!--
</uni-forms-item>
--
>
<uni-id-pages-agreements
scope=
"register"
ref=
"agreements"
></uni-id-pages-agreements>
<uni-id-pages-agreements
scope=
"register"
ref=
"agreements"
></uni-id-pages-agreements>
<button
class=
"uni-btn"
type=
"primary"
@
click=
"submit"
>
注册
</button>
<button
class=
"uni-btn"
type=
"primary"
@
click=
"submit"
>
注册
</button>
<button
@
click=
"navigateBack"
class=
"register-back"
>
返回
</button>
<button
@
click=
"navigateBack"
class=
"register-back"
>
返回
</button>
...
@@ -85,14 +85,14 @@
...
@@ -85,14 +85,14 @@
*/
*/
submit
()
{
submit
()
{
this
.
$refs
.
form
.
validate
().
then
((
res
)
=>
{
this
.
$refs
.
form
.
validate
().
then
((
res
)
=>
{
if
(
this
.
formData
.
captcha
.
length
!=
4
){
//
if(this.formData.captcha.length != 4){
this
.
$refs
.
captcha
.
focusCaptchaInput
=
true
//
this.$refs.captcha.focusCaptchaInput = true
return
uni
.
showToast
({
//
return uni.showToast({
title
:
'
请输入验证码
'
,
//
title: '请输入验证码',
icon
:
'
none
'
,
//
icon: 'none',
duration
:
3000
//
duration: 3000
});
//
});
}
//
}
if
(
this
.
needAgreements
&&
!
this
.
agree
)
{
if
(
this
.
needAgreements
&&
!
this
.
agree
)
{
return
this
.
$refs
.
agreements
.
popup
(()
=>
{
return
this
.
$refs
.
agreements
.
popup
(()
=>
{
this
.
submitForm
(
res
)
this
.
submitForm
(
res
)
...
@@ -139,7 +139,7 @@
...
@@ -139,7 +139,7 @@
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@media
screen
and
(
max-width
:
690px
)
{
@media
screen
and
(
max-width
:
690px
)
{
.uni-content
{
.uni-content
{
margin-top
:
15px
;
margin-top
:
15px
;
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
padding
:
30px
40px
60px
;
padding
:
30px
40px
60px
;
max-height
:
520px
;
max-height
:
520px
;
}
}
.link-box
{
.link-box
{
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
display
:
flex
;
display
:
flex
;
...
@@ -161,12 +161,12 @@
...
@@ -161,12 +161,12 @@
justify-content
:
space-between
;
justify-content
:
space-between
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.link
{
.link
{
font-size
:
12px
;
font-size
:
12px
;
}
}
}
}
.
uni-content
:
:
v-deep
.
uni-forms-item__label
{
.
uni-content
:
:
v-deep
.
uni-forms-item__label
{
position
:
absolute
;
position
:
absolute
;
left
:
-15px
;
left
:
-15px
;
...
...
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/middleware/verify-request-sign.js
浏览文件 @
8f3761f8
...
@@ -67,6 +67,8 @@ module.exports = function () {
...
@@ -67,6 +67,8 @@ module.exports = function () {
.
join
(
'
&
'
)
.
join
(
'
&
'
)
if
(
isNaN
(
Number
(
timestamp
))
||
(
Number
(
timestamp
)
+
timeout
)
<
Date
.
now
())
{
if
(
isNaN
(
Number
(
timestamp
))
||
(
Number
(
timestamp
)
+
timeout
)
<
Date
.
now
())
{
console
.
error
(
'
[timestamp error], timestamp:
'
,
timestamp
,
'
timeout:
'
,
timeout
)
throw
{
throw
{
errCode
:
ERROR
.
ILLEGAL_REQUEST
errCode
:
ERROR
.
ILLEGAL_REQUEST
}
}
...
@@ -75,6 +77,7 @@ module.exports = function () {
...
@@ -75,6 +77,7 @@ module.exports = function () {
const
reSignature
=
crypto
.
createHmac
(
'
sha256
'
,
`
${
this
.
config
.
requestAuthSecret
+
nonce
}
`
).
update
(
`
${
timestamp
}${
bodyStr
}
`
).
digest
(
'
hex
'
)
const
reSignature
=
crypto
.
createHmac
(
'
sha256
'
,
`
${
this
.
config
.
requestAuthSecret
+
nonce
}
`
).
update
(
`
${
timestamp
}${
bodyStr
}
`
).
digest
(
'
hex
'
)
if
(
signature
!==
reSignature
.
toUpperCase
())
{
if
(
signature
!==
reSignature
.
toUpperCase
())
{
console
.
error
(
'
[signature error], signature:
'
,
signature
,
'
reSignature:
'
,
reSignature
.
toUpperCase
(),
'
requestAuthSecret:
'
,
this
.
config
.
requestAuthSecret
)
throw
{
throw
{
errCode
:
ERROR
.
ILLEGAL_REQUEST
errCode
:
ERROR
.
ILLEGAL_REQUEST
}
}
...
...
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/login/login-by-qq.js
浏览文件 @
8f3761f8
...
@@ -119,27 +119,29 @@ module.exports = async function (params = {}) {
...
@@ -119,27 +119,29 @@ module.exports = async function (params = {}) {
accessToken
,
accessToken
,
openid
openid
})
})
// eslint-disable-next-line n/no-deprecated-api
if
(
avatar
)
{
const
extName
=
url
.
parse
(
avatar
).
pathname
.
split
(
'
.
'
).
pop
()
// eslint-disable-next-line n/no-deprecated-api
const
cloudPath
=
`user/avatar/
${
openid
.
slice
(
-
8
)
+
Date
.
now
()}
-avatar.
${
extName
}
`
const
extName
=
url
.
parse
(
avatar
).
pathname
.
split
(
'
.
'
).
pop
()
const
getAvatarRes
=
await
uniCloud
.
httpclient
.
request
(
avatar
)
const
cloudPath
=
`user/avatar/
${
openid
.
slice
(
-
8
)
+
Date
.
now
()}
-avatar.
${
extName
}
`
if
(
getAvatarRes
.
status
>=
400
)
{
const
getAvatarRes
=
await
uniCloud
.
httpclient
.
request
(
avatar
)
throw
{
if
(
getAvatarRes
.
status
>=
400
)
{
errCode
:
ERROR
.
GET_THIRD_PARTY_USER_INFO_FAILED
throw
{
errCode
:
ERROR
.
GET_THIRD_PARTY_USER_INFO_FAILED
}
}
const
{
fileID
}
=
await
uniCloud
.
uploadFile
({
cloudPath
,
fileContent
:
getAvatarRes
.
data
})
extraData
.
avatar_file
=
{
name
:
cloudPath
,
extname
:
extName
,
url
:
fileID
}
}
}
}
const
{
fileID
}
=
await
uniCloud
.
uploadFile
({
cloudPath
,
fileContent
:
getAvatarRes
.
data
})
extraData
.
nickname
=
nickname
extraData
.
nickname
=
nickname
extraData
.
avatar_file
=
{
name
:
cloudPath
,
extname
:
extName
,
url
:
fileID
}
}
}
await
saveQQUserKey
.
call
(
this
,
{
await
saveQQUserKey
.
call
(
this
,
{
openid
,
openid
,
...
...
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/package.json
浏览文件 @
8f3761f8
{
{
"name"
:
"uni-id-co"
,
"name"
:
"uni-id-co"
,
"version"
:
"1.1.1
4
"
,
"version"
:
"1.1.1
5
"
,
"description"
:
""
,
"description"
:
""
,
"main"
:
"index.js"
,
"main"
:
"index.js"
,
"keywords"
:
[],
"keywords"
:
[],
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录