Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
52cc1b78
H
hello_uni-id-pages
项目概览
DCloud
/
hello_uni-id-pages
通知
1065
Star
33
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看板
提交
52cc1b78
编写于
6月 23, 2022
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
修复账号密码登录时,验证码错误没有自动刷新验证码的问题
上级
b43eebd9
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
115 addition
and
102 deletion
+115
-102
App.vue
App.vue
+1
-1
manifest.json
manifest.json
+1
-1
pages.json
pages.json
+4
-4
uni_modules/uni-captcha/changelog.md
uni_modules/uni-captcha/changelog.md
+2
-0
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue
...odules/uni-captcha/components/uni-captcha/uni-captcha.vue
+1
-1
uni_modules/uni-captcha/package.json
uni_modules/uni-captcha/package.json
+4
-4
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+3
-3
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
+12
-9
uni_modules/uni-id-pages/init.js
uni_modules/uni-id-pages/init.js
+2
-2
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+1
-1
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+6
-12
uni_modules/uni-id-pages/pages/register/register.vue
uni_modules/uni-id-pages/pages/register/register.vue
+3
-1
uni_modules/uni-id-pages/pages_init.json
uni_modules/uni-id-pages/pages_init.json
+74
-62
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-sms-code.js
...d/cloudfunctions/uni-id-co/module/verify/send-sms-code.js
+1
-1
未找到文件。
App.vue
浏览文件 @
52cc1b78
...
...
@@ -3,7 +3,7 @@
export
default
{
onLaunch
:
async
function
()
{
console
.
log
(
'
App Launch
'
)
//
await uniIdPageInit()
await
uniIdPageInit
()
},
onShow
:
function
()
{
console
.
log
(
'
App Show
'
)
...
...
manifest.json
浏览文件 @
52cc1b78
...
...
@@ -131,7 +131,7 @@
"uniStatistics"
:
{
"enable"
:
false
},
"vueVersion"
:
"
2
"
,
"vueVersion"
:
"
3
"
,
"h5"
:
{
"unipush"
:
{
"enable"
:
true
...
...
pages.json
浏览文件 @
52cc1b78
...
...
@@ -81,8 +81,8 @@
"navigationBarTitleText"
:
"uni-app"
,
"navigationBarBackgroundColor"
:
"#FFF"
,
"backgroundColor"
:
"#F8F8F8"
}
,
"condition"
:
{
//模式配置,仅开发期间生效
}
,
"condition"
:
{
//模式配置,仅开发期间生效
"current"
:
0
,
//当前激活的模式(list
的索引项)
"list"
:
[
{
...
...
@@ -91,8 +91,8 @@
"query"
:
""
//启动参数,在页面的onLoad函数里面得到
}
]
}
,
"uniIdRouter"
:
{
}
,
"uniIdRouter"
:
{
"loginPage"
:
"uni_modules/uni-id-pages/pages/login/login-withoutpwd"
,
"needLogin"
:
[
"uni_modules/uni-id-pages/pages/userinfo/userinfo"
...
...
uni_modules/uni-captcha/changelog.md
浏览文件 @
52cc1b78
## 0.6.1(2022-06-23)
-
修复:部分返回值,不符合响应体规范的问题
## 0.6.0(2022-05-27)
-
新增:支持在
`uni-config-center`
中根据场景值配置
-
修复:弹窗式验证码,输入内容后点击取消,重新打开验证码的值仍然存在的问题
...
...
uni_modules/uni-captcha/components/uni-captcha/uni-captcha.vue
浏览文件 @
52cc1b78
...
...
@@ -4,7 +4,7 @@
<uni-icons
class=
"loding"
size=
"20px"
color=
"#BBB"
v-if=
"loging"
type=
"spinner-cycle"
></uni-icons>
<image
class=
"captcha-img"
:class=
"
{opacity:loging}" @click="getImageCaptcha" :src="captchaBase64"
mode="widthFix">
</image>
</view>
</view>
<input
@
blur=
"focusCaptchaInput = false"
:focus=
"focusCaptchaInput"
type=
"text"
class=
"captcha"
:inputBorder=
"false"
maxlength=
"4"
v-model=
"val"
placeholder=
"请输入验证码"
>
</view>
...
...
uni_modules/uni-captcha/package.json
浏览文件 @
52cc1b78
{
"id"
:
"uni-captcha"
,
"displayName"
:
"uni-captcha"
,
"version"
:
"0.6.
0
"
,
"version"
:
"0.6.
1
"
,
"description"
:
"云端一体图形验证码组件"
,
"keywords"
:
[
"uniCloud"
,
"captcha"
,
"验证码"
,
"图形验证码"
,
"人机验证"
"人机验证"
,
"防刷"
,
"防脚本"
],
"repository"
:
"https://gitee.com/dcloud/uni-captcha"
,
"engines"
:
{
...
...
uni_modules/uni-id-pages/changelog.md
浏览文件 @
52cc1b78
## 1.0.1(2022-06-22)
## 1.0.1(2022-06-23)
新增,应用
[
pages_init
](
https://uniapp.dcloud.io/plugin/publish.html#pages-init
)
当导入插件到项目工程时,自动合并本插件的页面路由到项目的pages.json
## 1.0.0(2022-06-23)
正式版
## 1.0.0(2022-06-21)
初始化项目
uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
浏览文件 @
52cc1b78
...
...
@@ -39,9 +39,9 @@
export
default
{
name
:
"
uni-sms-form
"
,
model
:
{
prop
:
'
modelValue
'
,
prop
:
'
modelValue
'
,
event
:
'
update:modelValue
'
},
},
props
:
{
event
:
[
'
update:modelValue
'
],
/**
...
...
@@ -153,7 +153,7 @@
this
.
getCode
();
}).
catch
(
e
=>
{
console
.
log
(
JSON
.
stringify
(
e
));
if
(
e
.
code
==
40000
)
{
if
(
e
.
code
==
"
uni-id-invalid-sms-template-id
"
)
{
this
.
modelValue
=
"
123456
"
uni
.
showToast
({
title
:
'
已启动测试模式,详情【控制台信息】
'
,
...
...
@@ -189,21 +189,23 @@
<
style
lang=
"scss"
scoped
>
.box
{
position
:
relative
;
margin-top
:
10px
;
margin-top
:
10px
;
}
.short-code-btn
{
padding
:
0
;
position
:
absolute
;
position
:
absolute
;
top
:
0
;
right
:
8px
;
width
:
2
0
0rpx
;
max-width
:
1
0
0px
;
width
:
2
6
0rpx
;
max-width
:
1
3
0px
;
height
:
44px
;
/* #ifndef APP-NVUE */
display
:
flex
;
/* #endif */
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
}
.inner-text
{
...
...
@@ -219,7 +221,8 @@
width
:
350rpx
;
}
.input-box
{
.input-box
{
margin
:
0
;
padding
:
4px
;
background-color
:
#F8F8F8
;
font-size
:
14px
;
...
...
uni_modules/uni-id-pages/init.js
浏览文件 @
52cc1b78
...
...
@@ -12,14 +12,14 @@ const {
export
default
async
function
()
{
//有打开调试模式的情况下
//
有打开调试模式的情况下
if
(
debug
)
{
// 1. 检查本地uni-id-pages中配置的登录方式,服务器端是否已经配置正确。否则提醒并引导去配置
//调用云对象,获取服务端已正确配置的登陆方式
let
{
supportedLoginType
}
=
await
uniIdCo
.
getSupportedLoginType
()
//
console.log("supportedLoginType: " + JSON.stringify(supportedLoginType));
console
.
log
(
"
supportedLoginType:
"
+
JSON
.
stringify
(
supportedLoginType
));
//登陆方式,服务端和客户端的映射关系
let
data
=
{
smsCode
:
'
mobile-code
'
,
...
...
uni_modules/uni-id-pages/package.json
浏览文件 @
52cc1b78
...
...
@@ -10,7 +10,7 @@
"login"
,
"登录"
],
"repository"
:
""
,
"repository"
:
"
https://gitcode.net/dcloud/hello_uni-id-pages
"
,
"engines"
:
{
"HBuilderX"
:
"^3.4.17"
},
...
...
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
浏览文件 @
52cc1b78
...
...
@@ -62,7 +62,7 @@
// 页面跳转,找回密码
toRetrievePwd
()
{
let
url
=
'
/uni_modules/uni-id-pages/pages/retrieve/retrieve
'
//如果刚好用户名输入框的值为手机号码,就把它传到
根据手机验证码找回密码页面
//如果刚好用户名输入框的值为手机号码,就把它传到
retrieve页面,根据该手机号找回密码
if
(
/^1
\d{10}
$/
.
test
(
this
.
username
))
{
url
+=
`?phoneNumber=
${
this
.
username
}
`
}
...
...
@@ -114,17 +114,11 @@
uniIdCo
.
login
(
data
).
then
(
e
=>
{
this
.
loginSuccess
(
e
)
}).
catch
(
e
=>
{
console
.
log
(
JSON
.
stringify
(
e
));
switch
(
e
.
errCode
){
case
'
uni-id-captcha-required
'
:
this
.
needCaptcha
=
true
break
;
case
'
uni-captcha-verify-fail
'
:
//当验证码错误,重新获取
this
.
$refs
.
captcha
.
getImageCaptcha
()
break
;
default
:
break
;
if
(
e
.
errCode
==
'
uni-id-captcha-required
'
){
this
.
needCaptcha
=
true
}
else
if
(
this
.
needCaptcha
){
//登录失败,自动重新获取验证码
this
.
$refs
.
captcha
.
getImageCaptcha
()
}
})
},
...
...
uni_modules/uni-id-pages/pages/register/register.vue
浏览文件 @
52cc1b78
...
...
@@ -112,7 +112,9 @@
<
style
lang=
"scss"
>
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
.uni-content
{
margin-top
:
15px
;
}
.
uni-content
:
:
v-deep
.
uni-forms-item__label
{
position
:
absolute
;
left
:
-15px
;
...
...
uni_modules/uni-id-pages/pages_init.json
浏览文件 @
52cc1b78
[
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate"
,
"style"
:
{
"navigationBarTitleText"
:
"注销账号"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/userinfo"
,
"style"
:
{
"navigationBarTitleText"
:
"个人资料"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile"
,
"style"
:
{
"navigationBarTitleText"
:
"绑定手机号码"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-withoutpwd"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-withpwd"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-smscode"
,
"style"
:
{
"navigationBarTitleText"
:
"手机验证码登录"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/register/register"
,
"style"
:
{
"navigationBarTitleText"
:
"注册"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/retrieve/retrieve"
,
"style"
:
{
"navigationBarTitleText"
:
"重置密码"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/common/webview/webview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
]
\ No newline at end of file
{
"pages"
:
[
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate"
,
"style"
:
{
"navigationBarTitleText"
:
"注销账号"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/userinfo"
,
"style"
:
{
"navigationBarTitleText"
:
"个人资料"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile"
,
"style"
:
{
"navigationBarTitleText"
:
"绑定手机号码"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-withoutpwd"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-withpwd"
,
"style"
:
{
"navigationBarTitleText"
:
""
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/login/login-smscode"
,
"style"
:
{
"navigationBarTitleText"
:
"手机验证码登录"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/register/register"
,
"style"
:
{
"navigationBarTitleText"
:
"注册"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/retrieve/retrieve"
,
"style"
:
{
"navigationBarTitleText"
:
"重置密码"
}
},
{
"path"
:
"uni_modules/uni-id-pages/pages/common/webview/webview"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
}
,{
"path"
:
"uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd"
,
"style"
:
{
"navigationBarTitleText"
:
"修改密码"
,
"enablePullDownRefresh"
:
false
}
}
]
}
\ No newline at end of file
uni_modules/uni-id-pages/uniCloud/cloudfunctions/uni-id-co/module/verify/send-sms-code.js
浏览文件 @
52cc1b78
...
...
@@ -57,7 +57,7 @@ module.exports = async function (params = {}) {
scene
})
return
{
errCode
:
40000
,
errCode
:
'
uni-id-invalid-sms-template-id
'
,
errMsg
:
`未找到scene=
${
scene
}
,的短信模版templateId。\n已启动测试模式,直接使用:123456作为短信验证码即可。\n如果是正式项目,请在路径:/common/uni-config-center/uni-id/config.json中service->sms中配置密钥等信息\n更多详情:https://uniapp.dcloud.io/uniCloud/uni-id.html#config`
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录