Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
hello_uni-id-pages
提交
e62a9ae4
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看板
提交
e62a9ae4
编写于
12月 09, 2022
作者:
study夏羽
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
1.0.37
上级
0143adf2
变更
29
显示空白变更内容
内联
并排
Showing
29 changed file
with
161 addition
and
167 deletion
+161
-167
pages/index/index.vue
pages/index/index.vue
+7
-7
uni_modules/uni-id-pages/changelog.md
uni_modules/uni-id-pages/changelog.md
+2
-0
uni_modules/uni-id-pages/common/login-page.mixin.js
uni_modules/uni-id-pages/common/login-page.mixin.js
+1
-1
uni_modules/uni-id-pages/common/login-page.scss
uni_modules/uni-id-pages/common/login-page.scss
+2
-1
uni_modules/uni-id-pages/common/store.js
uni_modules/uni-id-pages/common/store.js
+8
-11
uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
...es/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
+6
-8
uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
...nts/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
+7
-7
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
+3
-3
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
+13
-18
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
+2
-2
uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
...s/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
+1
-1
uni_modules/uni-id-pages/config.js
uni_modules/uni-id-pages/config.js
+1
-1
uni_modules/uni-id-pages/init.js
uni_modules/uni-id-pages/init.js
+6
-9
uni_modules/uni-id-pages/package.json
uni_modules/uni-id-pages/package.json
+1
-1
uni_modules/uni-id-pages/pages/common/webview/webview.vue
uni_modules/uni-id-pages/pages/common/webview/webview.vue
+1
-1
uni_modules/uni-id-pages/pages/login/login-smscode.vue
uni_modules/uni-id-pages/pages/login/login-smscode.vue
+3
-3
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
+11
-5
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
+1
-1
uni_modules/uni-id-pages/pages/register/register-admin.vue
uni_modules/uni-id-pages/pages/register/register-admin.vue
+5
-4
uni_modules/uni-id-pages/pages/register/register-by-email.vue
...modules/uni-id-pages/pages/register/register-by-email.vue
+4
-4
uni_modules/uni-id-pages/pages/register/register.vue
uni_modules/uni-id-pages/pages/register/register.vue
+3
-3
uni_modules/uni-id-pages/pages/retrieve/retrieve-by-email.vue
...modules/uni-id-pages/pages/retrieve/retrieve-by-email.vue
+11
-11
uni_modules/uni-id-pages/pages/retrieve/retrieve.vue
uni_modules/uni-id-pages/pages/retrieve/retrieve.vue
+5
-5
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
...s/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
+2
-2
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
...les/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
+4
-4
uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage.vue
...dules/uni-id-pages/pages/userinfo/cropImage/cropImage.vue
+1
-1
uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
...les/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
+1
-1
uni_modules/uni-id-pages/pages/userinfo/set-pwd/set-pwd.vue
uni_modules/uni-id-pages/pages/userinfo/set-pwd/set-pwd.vue
+1
-1
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
+48
-51
未找到文件。
pages/index/index.vue
浏览文件 @
e62a9ae4
<
template
>
<
template
>
<view
class=
"content"
>
<view
class=
"content"
>
<button
@
click=
"toUserInfoPage"
>
个人资料
</button>
<button
@
click=
"toUserInfoPage"
>
个人资料
</button>
<uni-forms-item
label=
"登录方式"
>
<uni-forms-item
label=
"登录方式"
labelWidth=
"70"
>
<uni-data-checkbox
:multiple=
"false"
v-model=
"loginType"
:localdata=
"loginTypeOption"
></uni-data-checkbox>
<uni-data-checkbox
:multiple=
"false"
v-model=
"loginType"
:localdata=
"loginTypeOption"
></uni-data-checkbox>
</uni-forms-item>
</uni-forms-item>
<button
@
click=
"toLogin"
>
前往登录
</button>
<button
@
click=
"toLogin"
>
前往登录
</button>
...
...
uni_modules/uni-id-pages/changelog.md
浏览文件 @
e62a9ae4
## 1.0.37(2022-12-09)
-
优化admin端样式
## 1.0.36(2022-12-08)
## 1.0.36(2022-12-08)
-
uni-id-co 优化 手机号与邮箱验证规则为空字符串时不校验
-
uni-id-co 优化 手机号与邮箱验证规则为空字符串时不校验
-
uni-id-co 修复
`updateUser`
接口部分参数为空时数据修改异常
-
uni-id-co 修复
`updateUser`
接口部分参数为空时数据修改异常
...
...
uni_modules/uni-id-pages/common/login-page.mixin.js
浏览文件 @
e62a9ae4
...
@@ -36,7 +36,7 @@ let mixin = {
...
@@ -36,7 +36,7 @@ let mixin = {
})
})
}
}
this
.
$nextTick
(
n
=>
{
this
.
$nextTick
(
n
=>
{
console
.
log
(
this
.
$refs
.
uniFabLogin
);
//
console.log(this.$refs.uniFabLogin);
this
.
$refs
.
uniFabLogin
.
login
({
this
.
$refs
.
uniFabLogin
.
login
({
code
:
e
.
code
code
:
e
.
code
},
'
weixin
'
)
},
'
weixin
'
)
...
...
uni_modules/uni-id-pages/common/login-page.scss
浏览文件 @
e62a9ae4
...
@@ -115,9 +115,10 @@
...
@@ -115,9 +115,10 @@
text-align
:
center
;
text-align
:
center
;
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
margin
:
15px
0
0
0
;
margin
:
15px
0
10px
0
;
color
:
#FFF
!
important
;
color
:
#FFF
!
important
;
border-radius
:
5px
;
border-radius
:
5px
;
font-size
:
16px
;
}
}
.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd
{
.uni-body.uni_modules-uni-id-pages-pages-login-login-withoutpwd
{
...
...
uni_modules/uni-id-pages/common/store.js
浏览文件 @
e62a9ae4
...
@@ -6,20 +6,20 @@ const db = uniCloud.database();
...
@@ -6,20 +6,20 @@ const db = uniCloud.database();
const
usersTable
=
db
.
collection
(
'
uni-id-users
'
)
const
usersTable
=
db
.
collection
(
'
uni-id-users
'
)
let
hostUserInfo
=
uni
.
getStorageSync
(
'
uni-id-pages-userInfo
'
)
||
{}
let
hostUserInfo
=
uni
.
getStorageSync
(
'
uni-id-pages-userInfo
'
)
||
{}
console
.
log
(
hostUserInfo
);
//
console.log( hostUserInfo);
const
data
=
{
const
data
=
{
userInfo
:
hostUserInfo
,
userInfo
:
hostUserInfo
,
hasLogin
:
Object
.
keys
(
hostUserInfo
).
length
!=
0
hasLogin
:
Object
.
keys
(
hostUserInfo
).
length
!=
0
}
}
console
.
log
(
'
data
'
,
data
);
//
console.log('data', data);
// 定义 mutations, 修改属性
// 定义 mutations, 修改属性
export
const
mutations
=
{
export
const
mutations
=
{
// data不为空,表示传递要更新的值(注意不是覆盖是合并),什么也不传时,直接查库获取更新
// data不为空,表示传递要更新的值(注意不是覆盖是合并),什么也不传时,直接查库获取更新
async
updateUserInfo
(
data
=
false
)
{
async
updateUserInfo
(
data
=
false
)
{
if
(
data
)
{
if
(
data
)
{
usersTable
.
where
(
'
_id==$env.uid
'
).
update
(
data
).
then
(
e
=>
{
usersTable
.
where
(
'
_id==$env.uid
'
).
update
(
data
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
if
(
e
.
result
.
updated
)
{
if
(
e
.
result
.
updated
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
"
更新成功
"
,
title
:
"
更新成功
"
,
...
@@ -41,7 +41,7 @@ export const mutations = {
...
@@ -41,7 +41,7 @@ export const mutations = {
let
res
=
await
usersTable
.
where
(
"
'_id' == $cloudEnv_uid
"
)
let
res
=
await
usersTable
.
where
(
"
'_id' == $cloudEnv_uid
"
)
.
field
(
'
mobile,nickname,username,email,avatar_file
'
)
.
field
(
'
mobile,nickname,username,email,avatar_file
'
)
.
get
()
.
get
()
console
.
log
(
'
fromDbData
'
,
res
.
result
.
data
);
//
console.log('fromDbData',res.result.data);
this
.
setUserInfo
(
res
.
result
.
data
[
0
])
this
.
setUserInfo
(
res
.
result
.
data
[
0
])
}
catch
(
e
)
{
}
catch
(
e
)
{
this
.
setUserInfo
({},{
cover
:
true
})
this
.
setUserInfo
({},{
cover
:
true
})
...
@@ -50,11 +50,11 @@ export const mutations = {
...
@@ -50,11 +50,11 @@ export const mutations = {
}
}
},
},
async
setUserInfo
(
data
,
{
cover
}
=
{
cover
:
false
})
{
async
setUserInfo
(
data
,
{
cover
}
=
{
cover
:
false
})
{
console
.
log
(
'
set-userInfo
'
,
data
);
//
console.log('set-userInfo', data);
let
userInfo
=
cover
?
data
:
Object
.
assign
(
store
.
userInfo
,
data
)
let
userInfo
=
cover
?
data
:
Object
.
assign
(
store
.
userInfo
,
data
)
store
.
userInfo
=
Object
.
assign
({},
userInfo
)
store
.
userInfo
=
Object
.
assign
({},
userInfo
)
store
.
hasLogin
=
Object
.
keys
(
store
.
userInfo
).
length
!=
0
store
.
hasLogin
=
Object
.
keys
(
store
.
userInfo
).
length
!=
0
console
.
log
(
'
store.userInfo
'
,
store
.
userInfo
);
//
console.log('store.userInfo', store.userInfo);
uni
.
setStorage
({
uni
.
setStorage
({
key
:
"
uni-id-pages-userInfo
"
,
key
:
"
uni-id-pages-userInfo
"
,
data
:
store
.
userInfo
data
:
store
.
userInfo
...
@@ -90,7 +90,7 @@ export const mutations = {
...
@@ -90,7 +90,7 @@ export const mutations = {
}
}
// #ifdef H5
// #ifdef H5
if (e.loginType == 'weixin') {
if (e.loginType == 'weixin') {
console.log('window.history', window.history);
//
console.log('window.history', window.history);
return window.history.go(-3)
return window.history.go(-3)
}
}
// #endif
// #endif
...
@@ -110,10 +110,7 @@ export const mutations = {
...
@@ -110,10 +110,7 @@ export const mutations = {
const {
const {
showToast = true, toastText = '登录成功', autoBack = true, uniIdRedirectUrl = '', passwordConfirmed
showToast = true, toastText = '登录成功', autoBack = true, uniIdRedirectUrl = '', passwordConfirmed
} = e
} = e
console.log({
// console.log({toastText,autoBack});
toastText,
autoBack
});
if (showToast) {
if (showToast) {
uni.showToast({
uni.showToast({
title: toastText,
title: toastText,
...
...
uni_modules/uni-id-pages/components/uni-id-pages-avatar/uni-id-pages-avatar.vue
浏览文件 @
e62a9ae4
...
@@ -48,7 +48,7 @@
...
@@ -48,7 +48,7 @@
async
mounted
()
{
async
mounted
()
{
// #ifdef H5
// #ifdef H5
this
.
isPC
=
!
[
'
ios
'
,
'
android
'
].
includes
(
uni
.
getSystemInfoSync
().
platform
);
this
.
isPC
=
!
[
'
ios
'
,
'
android
'
].
includes
(
uni
.
getSystemInfoSync
().
platform
);
console
.
log
(
'
this.isPC
'
,
this
.
isPC
,
uni
.
getSystemInfoSync
().
platform
);
//
console.log(' this.isPC', this.isPC, uni.getSystemInfoSync().platform);
// #endif
// #endif
},
},
computed
:
{
computed
:
{
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
mutations
.
updateUserInfo
({
avatar_file
})
mutations
.
updateUserInfo
({
avatar_file
})
},
},
uploadAvatarImg
(
res
)
{
uploadAvatarImg
(
res
)
{
console
.
log
(
this
.
hasLogin
);
//
console.log(this.hasLogin);
if
(
!
this
.
hasLogin
){
if
(
!
this
.
hasLogin
){
return
uni
.
navigateTo
({
return
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd
'
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd
'
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
count
:
1
,
count
:
1
,
crop
,
crop
,
success
:
async
(
res
)
=>
{
success
:
async
(
res
)
=>
{
console
.
log
(
res
);
//
console.log(res);
let
tempFile
=
res
.
tempFiles
[
0
],
let
tempFile
=
res
.
tempFiles
[
0
],
avatar_file
=
{
avatar_file
=
{
// #ifdef H5
// #ifdef H5
...
@@ -109,13 +109,13 @@
...
@@ -109,13 +109,13 @@
}
}
},
},
complete
(
e
)
{
complete
(
e
)
{
console
.
log
(
e
);
//
console.log(e);
}
}
});
});
})
})
}
}
// #endif
// #endif
console
.
log
(
this
.
userInfo
);
//
console.log(this.userInfo);
let
cloudPath
=
this
.
userInfo
.
_id
+
''
+
Date
.
now
()
let
cloudPath
=
this
.
userInfo
.
_id
+
''
+
Date
.
now
()
avatar_file
.
name
=
cloudPath
avatar_file
.
name
=
cloudPath
uni
.
showLoading
({
uni
.
showLoading
({
...
@@ -131,9 +131,7 @@
...
@@ -131,9 +131,7 @@
});
});
// console.log(result)
// console.log(result)
avatar_file
.
url
=
fileID
avatar_file
.
url
=
fileID
console
.
log
({
// console.log({avatar_file});
avatar_file
});
uni
.
hideLoading
()
uni
.
hideLoading
()
this
.
setAvatarFile
(
avatar_file
)
this
.
setAvatarFile
(
avatar_file
)
}
}
...
...
uni_modules/uni-id-pages/components/uni-id-pages-bind-mobile/uni-id-pages-bind-mobile.vue
浏览文件 @
e62a9ae4
...
@@ -28,12 +28,12 @@
...
@@ -28,12 +28,12 @@
uni
.
showLoading
({
mask
:
true
})
uni
.
showLoading
({
mask
:
true
})
wx
.
checkSession
({
wx
.
checkSession
({
success
()
{
success
()
{
console
.
log
(
'
session_key 未过期
'
);
//
console.log('session_key 未过期');
resolve
()
resolve
()
uni
.
hideLoading
()
uni
.
hideLoading
()
},
},
fail
()
{
fail
()
{
console
.
log
(
'
session_key 已经失效,正在执行更新
'
);
//
console.log('session_key 已经失效,正在执行更新');
wx
.
login
({
wx
.
login
({
success
({
success
({
code
code
...
@@ -41,13 +41,13 @@
...
@@ -41,13 +41,13 @@
uniCloud
.
importObject
(
"
uni-id-co
"
,{
uniCloud
.
importObject
(
"
uni-id-co
"
,{
customUI
:
true
customUI
:
true
}).
loginByWeixin
({
code
}).
then
(
e
=>
{
}).
loginByWeixin
({
code
}).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
resolve
()
resolve
()
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
);
console
.
log
(
e
);
reject
()
reject
()
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
hideLoading
()
uni
.
hideLoading
()
})
})
},
},
...
@@ -61,13 +61,13 @@
...
@@ -61,13 +61,13 @@
})
})
},
},
async
bindMobileByMpWeixin
(
e
)
{
async
bindMobileByMpWeixin
(
e
)
{
console
.
log
(
e
);
//
console.log(e);
if
(
e
.
detail
.
errMsg
==
"
getPhoneNumber:ok
"
)
{
if
(
e
.
detail
.
errMsg
==
"
getPhoneNumber:ok
"
)
{
console
.
log
(
e
.
detail
);
//
console.log(e.detail);
//检查登录信息是否过期,否则通过重新登录刷新session_key
//检查登录信息是否过期,否则通过重新登录刷新session_key
await
this
.
beforeGetphonenumber
()
await
this
.
beforeGetphonenumber
()
uniIdCo
.
bindMobileByMpWeixin
(
e
.
detail
).
then
(
e
=>
{
uniIdCo
.
bindMobileByMpWeixin
(
e
.
detail
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
this
.
$emit
(
'
success
'
)
this
.
$emit
(
'
success
'
)
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
this
.
closeMe
()
this
.
closeMe
()
...
...
uni_modules/uni-id-pages/components/uni-id-pages-email-form/uni-id-pages-email-form.vue
浏览文件 @
e62a9ae4
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,
{
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,
{
customUI
:
true
customUI
:
true
})
})
console
.
log
(
'
uniIdCo
'
,
uniIdCo
)
//
console.log('uniIdCo', uniIdCo)
console
.
log
(
'
sendEmailCode
'
,{
console
.
log
(
'
sendEmailCode
'
,{
"
email
"
:
this
.
email
,
"
email
"
:
this
.
email
,
"
scene
"
:
this
.
type
,
"
scene
"
:
this
.
type
,
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
"
scene
"
:
this
.
type
,
"
scene
"
:
this
.
type
,
"
captcha
"
:
this
.
captcha
"
captcha
"
:
this
.
captcha
}).
then
(
result
=>
{
}).
then
(
result
=>
{
console
.
log
(
result
.
code
);
//
console.log(result.code);
uni
.
showToast
({
uni
.
showToast
({
title
:
"
邮箱验证码发送成功
"
,
title
:
"
邮箱验证码发送成功
"
,
icon
:
'
none
'
,
icon
:
'
none
'
,
...
@@ -161,7 +161,7 @@
...
@@ -161,7 +161,7 @@
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
this
.
getCode
();
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
JSON
.
stringify
(
e
));
//
console.log(JSON.stringify(e));
if
(
e
.
code
==
"
uni-id-invalid-mail-template
"
)
{
if
(
e
.
code
==
"
uni-id-invalid-mail-template
"
)
{
this
.
modelValue
=
"
123456
"
this
.
modelValue
=
"
123456
"
uni
.
showToast
({
uni
.
showToast
({
...
...
uni_modules/uni-id-pages/components/uni-id-pages-fab-login/uni-id-pages-fab-login.vue
浏览文件 @
e62a9ae4
...
@@ -49,7 +49,7 @@
...
@@ -49,7 +49,7 @@
return
this
.
getParentComponent
().
agree
return
this
.
getParentComponent
().
agree
},
},
set
(
agree
)
{
set
(
agree
)
{
console
.
log
(
'
setAgree
'
,
agree
);
//
console.log('setAgree', agree);
return
this
.
getParentComponent
().
agree
=
agree
return
this
.
getParentComponent
().
agree
=
agree
}
}
}
}
...
@@ -294,15 +294,13 @@
...
@@ -294,15 +294,13 @@
}
}
//判断是否需要弹出隐私协议授权框
//判断是否需要弹出隐私协议授权框
console
.
log
(
type
,
this
.
agree
);
//
console.log(type, this.agree);
let
needAgreements
=
(
config
?.
agreements
?.
scope
||
[]).
includes
(
'
register
'
)
let
needAgreements
=
(
config
?.
agreements
?.
scope
||
[]).
includes
(
'
register
'
)
console
.
log
({
// console.log({needAgreements});
needAgreements
});
if
(
type
!=
'
univerify
'
&&
needAgreements
&&
!
this
.
agree
)
{
if
(
type
!=
'
univerify
'
&&
needAgreements
&&
!
this
.
agree
)
{
let
agreementsRef
=
this
.
getParentComponent
().
$refs
.
agreements
let
agreementsRef
=
this
.
getParentComponent
().
$refs
.
agreements
return
agreementsRef
.
popup
(()
=>
{
return
agreementsRef
.
popup
(()
=>
{
console
.
log
(
type
,
navigateBack
);
//
console.log(type, navigateBack);
this
.
login_before
(
type
,
navigateBack
,
options
)
this
.
login_before
(
type
,
navigateBack
,
options
)
})
})
}
}
...
@@ -314,7 +312,7 @@
...
@@ -314,7 +312,7 @@
document
.
domain
+
document
.
domain
+
(
window
.
location
.
href
.
includes
(
'
#
'
)?
'
/#
'
:
''
)
+
(
window
.
location
.
href
.
includes
(
'
#
'
)?
'
/#
'
:
''
)
+
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd?is_weixin_redirect=true&type=weixin
'
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd?is_weixin_redirect=true&type=weixin
'
console
.
log
(
'
redirectUrl----
'
,
redirectUrl
);
//
console.log('redirectUrl----',redirectUrl);
let
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
let
ua
=
window
.
navigator
.
userAgent
.
toLowerCase
();
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'
micromessenger
'
){
if
(
ua
.
match
(
/MicroMessenger/i
)
==
'
micromessenger
'
){
// console.log('在微信公众号内');
// console.log('在微信公众号内');
...
@@ -340,7 +338,7 @@
...
@@ -340,7 +338,7 @@
if
(
type
==
'
univerify
'
)
{
if
(
type
==
'
univerify
'
)
{
let
univerifyManager
=
uni
.
getUniverifyManager
()
let
univerifyManager
=
uni
.
getUniverifyManager
()
let
onButtonsClickFn
=
async
res
=>
{
let
onButtonsClickFn
=
async
res
=>
{
console
.
log
(
'
点击了第三方登录,provider:
'
,
res
,
res
.
provider
,
this
.
univerifyStyle
.
buttons
.
list
);
//
console.log('点击了第三方登录,provider:', res, res.provider, this.univerifyStyle.buttons.list);
//同步一键登录弹出层隐私协议框是否打勾
//同步一键登录弹出层隐私协议框是否打勾
let
agree
=
(
await
uni
.
getCheckBoxState
())[
1
].
state
let
agree
=
(
await
uni
.
getCheckBoxState
())[
1
].
state
//console.log('agree',agree);
//console.log('agree',agree);
...
@@ -381,7 +379,7 @@
...
@@ -381,7 +379,7 @@
return
univerifyManager
.
login
({
return
univerifyManager
.
login
({
"
univerifyStyle
"
:
this
.
univerifyStyle
,
"
univerifyStyle
"
:
this
.
univerifyStyle
,
success
:
res
=>
{
success
:
res
=>
{
console
.
log
(
'
login success
'
,
res
)
//
console.log('login success', res)
this
.
login
(
res
.
authResult
,
'
univerify
'
)
this
.
login
(
res
.
authResult
,
'
univerify
'
)
},
},
fail
(
err
)
{
fail
(
err
)
{
...
@@ -392,7 +390,7 @@
...
@@ -392,7 +390,7 @@
});
});
},
},
complete
:
async
e
=>
{
complete
:
async
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
hideLoading
()
uni
.
hideLoading
()
//同步一键登录弹出层隐私协议框是否打勾
//同步一键登录弹出层隐私协议框是否打勾
this
.
agree
=
(
await
uni
.
getCheckBoxState
())[
1
].
state
this
.
agree
=
(
await
uni
.
getCheckBoxState
())[
1
].
state
...
@@ -415,7 +413,7 @@
...
@@ -415,7 +413,7 @@
"
univerifyStyle
"
:
this
.
univerifyStyle
,
"
univerifyStyle
"
:
this
.
univerifyStyle
,
// #endif
// #endif
success
:
async
e
=>
{
success
:
async
e
=>
{
console
.
log
(
e
);
//
console.log(e);
if
(
type
==
'
apple
'
)
{
if
(
type
==
'
apple
'
)
{
let
res
=
await
this
.
getUserInfo
({
let
res
=
await
this
.
getUserInfo
({
provider
:
"
apple
"
provider
:
"
apple
"
...
@@ -434,18 +432,15 @@
...
@@ -434,18 +432,15 @@
})
})
},
},
login
(
params
,
type
)
{
//联网验证登录
login
(
params
,
type
)
{
//联网验证登录
console
.
log
(
'
执行登录开始----
'
);
// console.log('执行登录开始----');
console
.
log
({
console
.
log
({
params
,
type
});
params
,
type
});
//toLowerCase
//toLowerCase
let
action
=
'
loginBy
'
+
type
.
trim
().
replace
(
type
[
0
],
type
[
0
].
toUpperCase
())
let
action
=
'
loginBy
'
+
type
.
trim
().
replace
(
type
[
0
],
type
[
0
].
toUpperCase
())
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,{
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
,{
customUI
:
true
customUI
:
true
})
})
uniIdCo
[
action
](
params
).
then
(
result
=>
{
uniIdCo
[
action
](
params
).
then
(
result
=>
{
console
.
log
(
"
login-result
"
,
result
);
//
console.log("login-result", result);
uni
.
showToast
({
uni
.
showToast
({
title
:
'
登录成功
'
,
title
:
'
登录成功
'
,
icon
:
'
none
'
,
icon
:
'
none
'
,
...
@@ -468,7 +463,7 @@
...
@@ -468,7 +463,7 @@
mutations
.
loginSuccess
(
result
)
mutations
.
loginSuccess
(
result
)
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
showModal
({
uni
.
showModal
({
content
:
e
.
message
,
content
:
e
.
message
,
confirmText
:
"
知道了
"
,
confirmText
:
"
知道了
"
,
...
...
uni_modules/uni-id-pages/components/uni-id-pages-sms-form/uni-id-pages-sms-form.vue
浏览文件 @
e62a9ae4
...
@@ -146,7 +146,7 @@
...
@@ -146,7 +146,7 @@
"
scene
"
:
this
.
type
,
"
scene
"
:
this
.
type
,
"
captcha
"
:
this
.
captcha
"
captcha
"
:
this
.
captcha
}).
then
(
result
=>
{
}).
then
(
result
=>
{
console
.
log
(
result
.
code
);
//
console.log(result.code);
uni
.
showToast
({
uni
.
showToast
({
title
:
"
短信验证码发送成功
"
,
title
:
"
短信验证码发送成功
"
,
icon
:
'
none
'
,
icon
:
'
none
'
,
...
@@ -155,7 +155,7 @@
...
@@ -155,7 +155,7 @@
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
reverseNumber
=
Number
(
this
.
count
);
this
.
getCode
();
this
.
getCode
();
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
JSON
.
stringify
(
e
));
//
console.log(JSON.stringify(e));
if
(
e
.
code
==
"
uni-id-invalid-sms-template-id
"
)
{
if
(
e
.
code
==
"
uni-id-invalid-sms-template-id
"
)
{
this
.
modelValue
=
"
123456
"
this
.
modelValue
=
"
123456
"
uni
.
showToast
({
uni
.
showToast
({
...
...
uni_modules/uni-id-pages/components/uni-id-pages-user-profile/uni-id-pages-user-profile.vue
浏览文件 @
e62a9ae4
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
uni
.
getUserProfile
({
uni
.
getUserProfile
({
desc
:
"
用于设置账户昵称和头像
"
,
desc
:
"
用于设置账户昵称和头像
"
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
console
.
log
(
"
getUserProfile:
"
,
e
);
//
console.log("getUserProfile:", e);
callBack
(
e
)
callBack
(
e
)
}
}
})
})
...
...
uni_modules/uni-id-pages/config.js
浏览文件 @
e62a9ae4
...
@@ -5,7 +5,7 @@ export default {
...
@@ -5,7 +5,7 @@ export default {
登录类型 未列举到的或运行环境不支持的,将被自动隐藏。
登录类型 未列举到的或运行环境不支持的,将被自动隐藏。
如果需要在不同平台有不同的配置,直接用条件编译即可
如果需要在不同平台有不同的配置,直接用条件编译即可
*/
*/
"
isAdmin
"
:
fals
e
,
// 区分管理端与用户端
"
isAdmin
"
:
tru
e
,
// 区分管理端与用户端
"
loginTypes
"
:
[
"
loginTypes
"
:
[
// "qq",
// "qq",
// "xiaomi",
// "xiaomi",
...
...
uni_modules/uni-id-pages/init.js
浏览文件 @
e62a9ae4
...
@@ -50,7 +50,7 @@ export default async function() {
...
@@ -50,7 +50,7 @@ export default async function() {
uni
.
preLogin
({
uni
.
preLogin
({
provider
:
'
univerify
'
,
provider
:
'
univerify
'
,
complete
:
e
=>
{
complete
:
e
=>
{
console
.
log
(
e
);
//
console.log(e);
}
}
})
})
}
}
...
@@ -65,10 +65,7 @@ export default async function() {
...
@@ -65,10 +65,7 @@ export default async function() {
code
,
// 错误码详见https://uniapp.dcloud.net.cn/uniCloud/clientdb?id=returnvalue
code
,
// 错误码详见https://uniapp.dcloud.net.cn/uniCloud/clientdb?id=returnvalue
message
message
})
{
})
{
console
.
error
(
'
onDBError
'
,
{
// console.error('onDBError', {code,message});
code
,
message
});
}
}
// 解绑clientDB错误事件
// 解绑clientDB错误事件
//db.off('error', onDBError)
//db.off('error', onDBError)
...
@@ -77,17 +74,17 @@ export default async function() {
...
@@ -77,17 +74,17 @@ export default async function() {
//4. 同步客户端push_clientid至device表
//4. 同步客户端push_clientid至device表
if
(
uniCloud
.
onRefreshToken
)
{
if
(
uniCloud
.
onRefreshToken
)
{
uniCloud
.
onRefreshToken
(()
=>
{
uniCloud
.
onRefreshToken
(()
=>
{
console
.
log
(
'
onRefreshToken
'
);
//
console.log('onRefreshToken');
if
(
uni
.
getPushClientId
)
{
if
(
uni
.
getPushClientId
)
{
uni
.
getPushClientId
({
uni
.
getPushClientId
({
success
:
async
function
(
e
)
{
success
:
async
function
(
e
)
{
console
.
log
(
e
)
//
console.log(e)
let
pushClientId
=
e
.
cid
let
pushClientId
=
e
.
cid
console
.
log
(
pushClientId
);
//
console.log(pushClientId);
let
res
=
await
uniIdCo
.
setPushCid
({
let
res
=
await
uniIdCo
.
setPushCid
({
pushClientId
pushClientId
})
})
console
.
log
(
'
getPushClientId
'
,
res
);
//
console.log('getPushClientId', res);
},
},
fail
(
e
)
{
fail
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
...
...
uni_modules/uni-id-pages/package.json
浏览文件 @
e62a9ae4
{
{
"id"
:
"uni-id-pages"
,
"id"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"displayName"
:
"uni-id-pages"
,
"version"
:
"1.0.3
6
"
,
"version"
:
"1.0.3
7
"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"description"
:
"云端一体简单、统一、可扩展的用户中心页面模版"
,
"keywords"
:
[
"keywords"
:
[
"用户管理"
,
"用户管理"
,
...
...
uni_modules/uni-id-pages/pages/common/webview/webview.vue
浏览文件 @
e62a9ae4
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
});
});
title
=
"
页面路径错误
"
title
=
"
页面路径错误
"
}
else
{
}
else
{
console
.
log
(
url
,
title
);
//
console.log(url,title);
this
.
url
=
url
;
this
.
url
=
url
;
}
}
if
(
title
){
if
(
title
){
...
...
uni_modules/uni-id-pages/pages/login/login-smscode.vue
浏览文件 @
e62a9ae4
...
@@ -38,7 +38,7 @@
...
@@ -38,7 +38,7 @@
this
.
phone
=
phoneNumber
;
this
.
phone
=
phoneNumber
;
},
},
onShow
()
{
onShow
()
{
console
.
log
(
'
onShow
'
);
//
console.log('onShow');
// #ifdef H5
// #ifdef H5
document
.
onkeydown
=
event
=>
{
document
.
onkeydown
=
event
=>
{
var
e
=
event
||
window
.
event
;
var
e
=
event
||
window
.
event
;
...
@@ -68,14 +68,14 @@
...
@@ -68,14 +68,14 @@
"
code
"
:
this
.
code
,
"
code
"
:
this
.
code
,
"
captcha
"
:
this
.
captcha
"
captcha
"
:
this
.
captcha
}).
then
(
e
=>
{
}).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
this
.
loginSuccess
(
e
)
this
.
loginSuccess
(
e
)
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
if
(
e
.
errCode
==
'
uni-id-captcha-required
'
)
{
if
(
e
.
errCode
==
'
uni-id-captcha-required
'
)
{
this
.
$refs
.
popup
.
open
()
this
.
$refs
.
popup
.
open
()
}
else
{
}
else
{
console
.
log
(
e
.
errMsg
);
console
.
log
(
e
.
errMsg
);
console
.
log
(
e
.
errCode
);
//
console.log(e.errCode);
}
}
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
this
.
captcha
=
''
this
.
captcha
=
''
...
...
uni_modules/uni-id-pages/pages/login/login-withoutpwd.vue
浏览文件 @
e62a9ae4
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<text
class=
"tip"
>
将根据第三方账号服务平台的授权范围获取你的信息
</text>
<text
class=
"tip"
>
将根据第三方账号服务平台的授权范围获取你的信息
</text>
<view
class=
"quickLogin"
>
<view
class=
"quickLogin"
>
<image
v-if=
"type !== 'weixinMobile'"
@
click=
"quickLogin"
:src=
"imgSrc"
mode=
"widthFix"
class=
"quickLoginBtn"
></image>
<image
v-if=
"type !== 'weixinMobile'"
@
click=
"quickLogin"
:src=
"imgSrc"
mode=
"widthFix"
class=
"quickLoginBtn"
></image>
<button
v-else
type=
"primary"
open-type=
"getPhoneNumber"
@
getphonenumber=
"quickLogi
n"
>
微信授权手机号登录
</button>
<button
v-else
type=
"primary"
open-type=
"getPhoneNumber"
@
getphonenumber=
"quickLogin"
class=
"uni-bt
n"
>
微信授权手机号登录
</button>
<uni-id-pages-agreements
scope=
"register"
ref=
"agreements"
></uni-id-pages-agreements>
<uni-id-pages-agreements
scope=
"register"
ref=
"agreements"
></uni-id-pages-agreements>
</view>
</view>
</
template
>
</
template
>
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
}
}
},
},
async
onLoad
(
e
)
{
async
onLoad
(
e
)
{
console
.
log
(
e
);
//
console.log(e);
//获取通过url传递的参数type设置当前登录方式,如果没传递直接默认以配置的登录
//获取通过url传递的参数type设置当前登录方式,如果没传递直接默认以配置的登录
let
type
=
e
.
type
||
config
.
loginTypes
[
0
]
let
type
=
e
.
type
||
config
.
loginTypes
[
0
]
this
.
type
=
type
this
.
type
=
type
...
@@ -111,7 +111,7 @@
...
@@ -111,7 +111,7 @@
this
.
$refs
.
uniFabLogin
.
login_before
(
this
.
type
,
true
,
options
)
this
.
$refs
.
uniFabLogin
.
login_before
(
this
.
type
,
true
,
options
)
},
},
toSmsPage
()
{
toSmsPage
()
{
console
.
log
(
'
toSmsPage
'
,
this
.
agree
);
//
console.log('toSmsPage',this.agree);
if
(
!
this
.
isPhone
)
{
if
(
!
this
.
isPhone
)
{
this
.
focusPhone
=
true
this
.
focusPhone
=
true
return
uni
.
showToast
({
return
uni
.
showToast
({
...
@@ -148,6 +148,12 @@
...
@@ -148,6 +148,12 @@
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@import
"@/uni_modules/uni-id-pages/common/login-page.scss"
;
@media
screen
and
(
min-width
:
690px
)
{
.uni-content
{
height
:
350px
;
}
}
.uni-content
,
.uni-content
,
.quickLogin
{
.quickLogin
{
/* #ifndef APP-NVUE */
/* #ifndef APP-NVUE */
...
...
uni_modules/uni-id-pages/pages/login/login-withpwd.vue
浏览文件 @
e62a9ae4
...
@@ -152,7 +152,7 @@
...
@@ -152,7 +152,7 @@
@media
screen
and
(
min-width
:
690px
)
{
@media
screen
and
(
min-width
:
690px
)
{
.uni-content
{
.uni-content
{
max-height
:
65
0px
;
height
:
60
0px
;
}
}
}
}
...
...
uni_modules/uni-id-pages/pages/register/register-admin.vue
浏览文件 @
e62a9ae4
...
@@ -102,18 +102,18 @@
...
@@ -102,18 +102,18 @@
}).
catch
((
errors
)
=>
{
}).
catch
((
errors
)
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
);
//
console.log(key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
},
},
submitForm
(
params
)
{
submitForm
(
params
)
{
uniIdCo
.
registerAdmin
(
this
.
formData
).
then
(
e
=>
{
uniIdCo
.
registerAdmin
(
this
.
formData
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
navigateBack
()
uni
.
navigateBack
()
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
console
.
log
(
e
.
message
);
//
console.log(e.message);
//更好的体验:登录错误,直接刷新验证码
//更好的体验:登录错误,直接刷新验证码
this
.
$refs
.
captcha
.
getImageCaptcha
()
this
.
$refs
.
captcha
.
getImageCaptcha
()
uni
.
showModal
({
uni
.
showModal
({
...
@@ -153,6 +153,7 @@
...
@@ -153,6 +153,7 @@
@media
screen
and
(
min-width
:
690px
)
{
@media
screen
and
(
min-width
:
690px
)
{
.uni-content
{
.uni-content
{
padding
:
30px
40px
60px
;
padding
:
30px
40px
60px
;
max-height
:
520px
;
}
}
.link-box
{
.link-box
{
...
...
uni_modules/uni-id-pages/pages/register/register-by-email.vue
浏览文件 @
e62a9ae4
...
@@ -144,22 +144,22 @@
...
@@ -144,22 +144,22 @@
}).
catch
((
errors
)
=>
{
}).
catch
((
errors
)
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
);
//
console.log(key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
},
},
submitForm
(
params
)
{
submitForm
(
params
)
{
uniIdCo
.
registerUserByEmail
(
this
.
formData
).
then
(
e
=>
{
uniIdCo
.
registerUserByEmail
(
this
.
formData
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withpwd
'
,
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withpwd
'
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
console
.
log
(
e
);
//
console.log(e);
}
}
})
})
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
console
.
log
(
e
.
message
);
console
.
log
(
e
.
message
);
})
})
},
},
...
...
uni_modules/uni-id-pages/pages/register/register.vue
浏览文件 @
e62a9ae4
...
@@ -109,17 +109,17 @@
...
@@ -109,17 +109,17 @@
}).
catch
((
errors
)
=>
{
}).
catch
((
errors
)
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
);
//
console.log(key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
},
},
submitForm
(
params
)
{
submitForm
(
params
)
{
uniIdCo
.
registerUser
(
this
.
formData
).
then
(
e
=>
{
uniIdCo
.
registerUser
(
this
.
formData
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
this
.
loginSuccess
(
e
)
this
.
loginSuccess
(
e
)
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
console
.
log
(
e
.
message
);
console
.
log
(
e
.
message
);
//更好的体验:登录错误,直接刷新验证码
//更好的体验:登录错误,直接刷新验证码
this
.
$refs
.
captcha
.
getImageCaptcha
()
this
.
$refs
.
captcha
.
getImageCaptcha
()
...
...
uni_modules/uni-id-pages/pages/retrieve/retrieve-by-email.vue
浏览文件 @
e62a9ae4
...
@@ -137,8 +137,8 @@
...
@@ -137,8 +137,8 @@
* 完成并提交
* 完成并提交
*/
*/
submit
()
{
submit
()
{
console
.
log
(
"
formData
"
,
this
.
formData
);
//
console.log("formData", this.formData);
console
.
log
(
'
rules
'
,
this
.
rules
);
//
console.log('rules', this.rules);
this
.
$refs
.
form
.
validate
()
this
.
$refs
.
form
.
validate
()
.
then
(
res
=>
{
.
then
(
res
=>
{
let
{
let
{
...
@@ -153,11 +153,11 @@
...
@@ -153,11 +153,11 @@
password
,
password
,
captcha
captcha
}).
then
(
e
=>
{
}).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withpwd
'
,
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withpwd
'
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
console
.
log
(
e
);
//
console.log(e);
}
}
})
})
})
})
...
@@ -171,11 +171,11 @@
...
@@ -171,11 +171,11 @@
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
if
(
key
==
'
code
'
){
if
(
key
==
'
code
'
){
console
.
log
(
this
.
$refs
.
shortCode
);
//
console.log(this.$refs.shortCode);
return
this
.
$refs
.
shortCode
.
focusSmsCodeInput
=
true
return
this
.
$refs
.
shortCode
.
focusSmsCodeInput
=
true
}
}
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
,
'
focus
'
+
key
);
//
console.log(key,'focus'+key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
},
},
...
...
uni_modules/uni-id-pages/pages/retrieve/retrieve.vue
浏览文件 @
e62a9ae4
...
@@ -166,8 +166,8 @@
...
@@ -166,8 +166,8 @@
* 完成并提交
* 完成并提交
*/
*/
submit
()
{
submit
()
{
console
.
log
(
"
formData
"
,
this
.
formData
);
//
console.log("formData", this.formData);
console
.
log
(
'
rules
'
,
this
.
rules
);
//
console.log('rules', this.rules);
this
.
$refs
.
form
.
validate
()
this
.
$refs
.
form
.
validate
()
.
then
(
res
=>
{
.
then
(
res
=>
{
let
{
let
{
...
@@ -182,7 +182,7 @@
...
@@ -182,7 +182,7 @@
password
,
password
,
captcha
captcha
}).
then
(
e
=>
{
}).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
navigateBack
()
uni
.
navigateBack
()
})
})
.
catch
(
e
=>
{
.
catch
(
e
=>
{
...
@@ -195,11 +195,11 @@
...
@@ -195,11 +195,11 @@
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
if
(
key
==
'
code
'
){
if
(
key
==
'
code
'
){
console
.
log
(
this
.
$refs
.
shortCode
);
//
console.log(this.$refs.shortCode);
return
this
.
$refs
.
shortCode
.
focusSmsCodeInput
=
true
return
this
.
$refs
.
shortCode
.
focusSmsCodeInput
=
true
}
}
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
,
'
focus
'
+
key
);
//
console.log(key,'focus'+key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
},
},
...
...
uni_modules/uni-id-pages/pages/userinfo/bind-mobile/bind-mobile.vue
浏览文件 @
e62a9ae4
...
@@ -65,10 +65,10 @@
...
@@ -65,10 +65,10 @@
});
});
}
}
console
.
log
(
this
.
formData
);
//
console.log(this.formData);
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
const
uniIdCo
=
uniCloud
.
importObject
(
"
uni-id-co
"
)
uniIdCo
.
bindMobileBySms
(
this
.
formData
).
then
(
e
=>
{
uniIdCo
.
bindMobileBySms
(
this
.
formData
).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
showToast
({
uni
.
showToast
({
title
:
e
.
errMsg
,
title
:
e
.
errMsg
,
icon
:
'
none
'
,
icon
:
'
none
'
,
...
...
uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd.vue
浏览文件 @
e62a9ae4
...
@@ -82,8 +82,8 @@
...
@@ -82,8 +82,8 @@
* 完成并提交
* 完成并提交
*/
*/
submit
()
{
submit
()
{
console
.
log
(
"
formData
"
,
this
.
formData
);
//
console.log("formData", this.formData);
console
.
log
(
'
rules
'
,
this
.
rules
);
//
console.log('rules', this.rules);
this
.
$refs
.
form
.
validate
()
this
.
$refs
.
form
.
validate
()
.
then
(
res
=>
{
.
then
(
res
=>
{
let
{
let
{
...
@@ -94,7 +94,7 @@
...
@@ -94,7 +94,7 @@
oldPassword
,
oldPassword
,
newPassword
newPassword
}).
then
(
e
=>
{
}).
then
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
removeStorageSync
(
'
uni_id_token
'
);
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
setStorageSync
(
'
uni_id_token_expired
'
,
0
)
uni
.
redirectTo
({
uni
.
redirectTo
({
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,7 @@
}).
catch
(
errors
=>
{
}).
catch
(
errors
=>
{
let
key
=
errors
[
0
].
key
let
key
=
errors
[
0
].
key
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
key
=
key
.
replace
(
key
[
0
],
key
[
0
].
toUpperCase
())
console
.
log
(
key
,
'
focus
'
+
key
);
//
console.log(key, 'focus' + key);
this
[
'
focus
'
+
key
]
=
true
this
[
'
focus
'
+
key
]
=
true
})
})
}
}
...
...
uni_modules/uni-id-pages/pages/userinfo/cropImage/cropImage.vue
浏览文件 @
e62a9ae4
...
@@ -12,7 +12,7 @@ export default {
...
@@ -12,7 +12,7 @@ export default {
data
()
{
return
{
path
:
''
,
options
:{
"
width
"
:
600
,
"
height
"
:
600
}}},
data
()
{
return
{
path
:
''
,
options
:{
"
width
"
:
600
,
"
height
"
:
600
}}},
onLoad
({
path
,
options
})
{
onLoad
({
path
,
options
})
{
this
.
path
=
path
this
.
path
=
path
console
.
log
(
'
path-path-path-path
'
,
path
);
//
console.log('path-path-path-path',path);
if
(
options
){
if
(
options
){
this
.
options
=
JSON
.
parse
(
options
)
this
.
options
=
JSON
.
parse
(
options
)
}
}
...
...
uni_modules/uni-id-pages/pages/userinfo/deactivate/deactivate.vue
浏览文件 @
e62a9ae4
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
const
uniIdco
=
uniCloud
.
importObject
(
"
uni-id-co
"
);
const
uniIdco
=
uniCloud
.
importObject
(
"
uni-id-co
"
);
uniIdco
.
closeAccount
().
then
((
e
)
=>
{
uniIdco
.
closeAccount
().
then
((
e
)
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
showToast
({
uni
.
showToast
({
title
:
'
注销成功
'
,
title
:
'
注销成功
'
,
duration
:
3000
duration
:
3000
...
...
uni_modules/uni-id-pages/pages/userinfo/set-pwd/set-pwd.vue
浏览文件 @
e62a9ae4
...
@@ -115,7 +115,7 @@ export default {
...
@@ -115,7 +115,7 @@ export default {
this
.
$refs
.
popup
.
open
()
this
.
$refs
.
popup
.
open
()
}
else
{
}
else
{
console
.
log
(
e
.
errMsg
);
console
.
log
(
e
.
errMsg
);
console
.
log
(
e
.
errCode
);
//
console.log(e.errCode);
}
}
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
this
.
formData
.
captcha
=
''
this
.
formData
.
captcha
=
''
...
...
uni_modules/uni-id-pages/pages/userinfo/userinfo.vue
浏览文件 @
e62a9ae4
...
@@ -78,7 +78,7 @@
...
@@ -78,7 +78,7 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd
'
,
url
:
'
/uni_modules/uni-id-pages/pages/login/login-withoutpwd
'
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
console
.
log
(
e
);
//
console.log(e);
}
}
})
})
},
},
...
@@ -92,7 +92,7 @@
...
@@ -92,7 +92,7 @@
uni
.
navigateTo
({
uni
.
navigateTo
({
url
:
'
/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd
'
,
url
:
'
/uni_modules/uni-id-pages/pages/userinfo/change_pwd/change_pwd
'
,
complete
:
(
e
)
=>
{
complete
:
(
e
)
=>
{
console
.
log
(
e
);
//
console.log(e);
}
}
})
})
},
},
...
@@ -123,14 +123,14 @@
...
@@ -123,14 +123,14 @@
"
provider
"
:
'
univerify
'
,
"
provider
"
:
'
univerify
'
,
"
univerifyStyle
"
:
this
.
univerifyStyle
,
"
univerifyStyle
"
:
this
.
univerifyStyle
,
success
:
async
e
=>
{
success
:
async
e
=>
{
console
.
log
(
e
.
authResult
);
//
console.log(e.authResult);
uniIdCo
.
bindMobileByUniverify
(
e
.
authResult
).
then
(
res
=>
{
uniIdCo
.
bindMobileByUniverify
(
e
.
authResult
).
then
(
res
=>
{
console
.
log
(
res
);
//
console.log(res);
mutations
.
updateUserInfo
()
mutations
.
updateUserInfo
()
}).
catch
(
e
=>
{
}).
catch
(
e
=>
{
console
.
log
(
e
);
console
.
log
(
e
);
}).
finally
(
e
=>
{
}).
finally
(
e
=>
{
console
.
log
(
e
);
//
console.log(e);
uni
.
closeAuthView
()
uni
.
closeAuthView
()
})
})
},
},
...
@@ -148,7 +148,7 @@
...
@@ -148,7 +148,7 @@
})
})
},
},
setNickname
(
nickname
)
{
setNickname
(
nickname
)
{
console
.
log
(
nickname
);
//
console.log(nickname);
if
(
nickname
)
{
if
(
nickname
)
{
mutations
.
updateUserInfo
({
nickname
})
mutations
.
updateUserInfo
({
nickname
})
this
.
$refs
.
dialog
.
close
()
this
.
$refs
.
dialog
.
close
()
...
@@ -178,9 +178,7 @@
...
@@ -178,9 +178,7 @@
provider
:
provider
.
toLowerCase
(),
provider
:
provider
.
toLowerCase
(),
onlyAuthorize
:
true
,
onlyAuthorize
:
true
,
success
:
async
e
=>
{
success
:
async
e
=>
{
const
res
=
await
uniIdCo
[
'
bind
'
+
provider
]({
const
res
=
await
uniIdCo
[
'
bind
'
+
provider
]({
code
:
e
.
code
})
code
:
e
.
code
})
if
(
res
.
errCode
)
{
if
(
res
.
errCode
)
{
uni
.
showToast
({
uni
.
showToast
({
title
:
res
.
errMsg
||
'
绑定失败
'
,
title
:
res
.
errMsg
||
'
绑定失败
'
,
...
@@ -195,7 +193,6 @@
...
@@ -195,7 +193,6 @@
}
}
})
})
}
}
}
}
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录