Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
萌新之路
uni-starter
提交
ade564ef
U
uni-starter
项目概览
萌新之路
/
uni-starter
与 Fork 源项目一致
Fork自
DCloud / uni-starter
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-starter
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ade564ef
编写于
5月 07, 2021
作者:
DCloud_JSON
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化设置页面打开卡顿问题
上级
64d418f3
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
36 addition
and
31 deletion
+36
-31
js_sdk/request.js
js_sdk/request.js
+1
-1
pages.json
pages.json
+1
-1
pages/list/detail.vue
pages/list/detail.vue
+1
-1
pages/ucenter/login-page/phone-code/phone-code.vue
pages/ucenter/login-page/phone-code/phone-code.vue
+2
-2
pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
+2
-3
pages/ucenter/settings/settings.vue
pages/ucenter/settings/settings.vue
+21
-23
uniCloud-aliyun/cloudfunctions/test/index.js
uniCloud-aliyun/cloudfunctions/test/index.js
+8
-0
未找到文件。
js_sdk/request.js
浏览文件 @
ade564ef
...
...
@@ -8,7 +8,7 @@
const
debug
=
true
;
//开启后,会alert错误信息
export
default
function
request
(
name
,
params
,
callback
=
false
,{
showLoading
=
false
,
loadText
=
''
,
fail
=
()
=>
{}}
=
{}){
// console.log('request');
showLoading
||
loadText
?
uni
.
showLoading
({
title
:
loadText
}):
''
;
showLoading
||
loadText
?
uni
.
showLoading
({
title
:
loadText
,
mask
:
true
}):
''
;
let
routers
=
name
.
split
(
'
/
'
);
var
action
=
false
if
(
routers
.
length
>
1
){
...
...
pages.json
浏览文件 @
ade564ef
...
...
@@ -156,7 +156,7 @@
},
{
"path"
:
"pages/ucenter/login-page/pwd-retrieve/pwd-retrieve"
,
"style"
:
{
"navigationBarTitleText"
:
""
"navigationBarTitleText"
:
"
重置密码
"
}
},
{
"path"
:
"pages/ucenter/login-page/phone-code/phone-code"
,
...
...
pages/list/detail.vue
浏览文件 @
ade564ef
...
...
@@ -109,7 +109,7 @@
icon
:
'
none
'
,
title
:
'
出错了,新闻ID为空
'
})
}
}
},
methods
:
{
setFavorite
()
{
...
...
pages/ucenter/login-page/phone-code/phone-code.vue
浏览文件 @
ade564ef
...
...
@@ -50,8 +50,8 @@
e
=>
{
console
.
log
(
e
);
this
.
loginSuccess
(
e
)
}
)
}
,
{
showLoading
:
true
}
)
}
}
}
...
...
pages/ucenter/login-page/pwd-retrieve/pwd-retrieve.vue
浏览文件 @
ade564ef
<
template
>
<view
class=
"content"
>
<!-- 顶部文字 -->
<text
class=
"title"
>
重置密码
</text>
<text
v-show=
"isPhone"
class=
"login-iknow"
>
{{
tipText
}}
</text>
<!-- 登录框 (选择手机号所属国家和地区需要另行实现) -->
<uni-forms
ref=
"form"
:value=
"formData"
:rules=
"rules"
>
...
...
@@ -163,7 +162,7 @@
<
style
>
@import
url("../common/login-page.css")
;
.content
-top-title
{
margin-bottom
:
6px
;
.content
{
padding-top
:
36
rpx
;
}
</
style
>
pages/ucenter/settings/settings.vue
浏览文件 @
ade564ef
...
...
@@ -9,10 +9,10 @@
<uni-list
class=
"mt10"
:border=
"false"
>
<!-- #ifdef APP-PLUS -->
<!-- 检查push过程未结束不显示,push设置项 -->
<uni-list-item
title=
"清理缓存"
@
click=
"clearTmp"
link
></uni-list-item>
<uni-list-item
v-if=
"pushIsOn != 'wait'"
@
click.native=
"
openSetting
()"
title=
"推送功能"
showSwitch
:switchChecked=
"pushIsOn"
></uni-list-item>
<uni-list-item
title=
"清理缓存"
@
click=
"clearTmp"
link
></uni-list-item>
<uni-list-item
v-if=
"pushIsOn != 'wait'"
@
click.native=
"
pushIsOn?pushServer.off():pushServer.on
()"
title=
"推送功能"
showSwitch
:switchChecked=
"pushIsOn"
></uni-list-item>
<!-- #endif -->
<uni-list-item
v-if=
"supportMode.includes('fingerPrint')"
title=
"指纹解锁"
@
click=
"startSoterAuthentication('fingerPrint')"
link
></uni-list-item>
<uni-list-item
v-if=
"supportMode.includes('fingerPrint')"
title=
"指纹解锁"
@
click
.native
=
"startSoterAuthentication('fingerPrint')"
link
></uni-list-item>
<uni-list-item
v-if=
"supportMode.includes('facial')"
title=
"人脸解锁"
@
click=
"startSoterAuthentication('facial')"
link
></uni-list-item>
</uni-list>
<!-- #endif -->
...
...
@@ -26,17 +26,15 @@
</
template
>
<
script
>
import
{
isOn
,
setting
}
from
'
./dc-push/push.js
'
;
import
pushServer
from
'
./dc-push/push.js
'
;
import
{
mapMutations
,
mapGetters
}
from
'
vuex
'
;
export
default
{
data
()
{
return
{
return
{
pushServer
:
pushServer
,
supportMode
:[],
pushIsOn
:
"
wait
"
}
...
...
@@ -64,8 +62,8 @@
// 检查手机端获取推送是否开启
//#ifdef APP-PLUS
setTimeout
(()
=>
{
this
.
pushIsOn
=
isOn
();
},
1
)
this
.
pushIsOn
=
pushServer
.
isOn
();
},
300
)
//#endif
},
methods
:
{
...
...
@@ -89,17 +87,23 @@
/**
* 开始生物认证
*/
startSoterAuthentication
(
checkAuthMode
)
{
startSoterAuthentication
(
checkAuthMode
)
{
console
.
log
(
checkAuthMode
);
let
title
=
{
"
fingerPrint
"
:
"
指纹解锁
"
,
"
facial
"
:
"
人脸解锁
"
}[
checkAuthMode
]
// 检查是否开启认证
this
.
checkIsSoterEnrolledInDevice
({
checkAuthMode
,
title
})
.
then
(()
=>
{
.
then
(()
=>
{
console
.
log
(
checkAuthMode
,
title
);
// 开始认证
uni
.
startSoterAuthentication
({
checkAuthModes
:
[
request
AuthMode
],
requestAuthModes
:
[
check
AuthMode
],
challenge
:
'
123456
'
,
// 微信端挑战因子
authContent
:
`请用
${
title
}
`
,
success
:
(
res
)
=>
{
authContent
:
`请用
${
title
}
`
,
complete
:
(
res
)
=>
{
console
.
log
(
res
);
},
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
errCode
==
0
)
{
/**
* 验证成功后开启自己的业务逻辑
...
...
@@ -133,7 +137,8 @@
return
new
Promise
((
resolve
,
reject
)
=>
{
uni
.
checkIsSoterEnrolledInDevice
({
checkAuthMode
,
success
:
(
res
)
=>
{
success
:
(
res
)
=>
{
console
.
log
(
res
);
if
(
res
.
isEnrolled
)
{
return
resolve
(
res
);
}
...
...
@@ -218,13 +223,6 @@
console
.
log
(
e
);
}
});
},
/**
* 打开设置页面
*/
openSetting
()
{
console
.
log
(
'
openSetting
'
);
setting
();
}
}
}
...
...
uniCloud-aliyun/cloudfunctions/test/index.js
0 → 100644
浏览文件 @
ade564ef
'
use strict
'
;
exports
.
main
=
async
(
event
,
context
)
=>
{
//event为客户端上传的参数
//返回数据给客户端
return
uniCloud
.
database
().
collection
(
'
opendb-news-articles
'
).
field
({
'
_id
'
:
false
}).
get
()
};
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录