Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
e91ef76c
Commit
e91ef76c
authored
Nov 21, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
亮度调节
parent
667e1cc7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
src/pages/wo/showPassCheck/index.vue
+24
-0
No files found.
src/pages/wo/showPassCheck/index.vue
View file @
e91ef76c
...
@@ -64,6 +64,7 @@ export default {
...
@@ -64,6 +64,7 @@ export default {
qrCode
:
""
,
qrCode
:
""
,
qrCodeImg
:
""
,
qrCodeImg
:
""
,
userInfo
:
{},
userInfo
:
{},
currentBrightness
:
0
,
};
};
},
},
components
:
{},
components
:
{},
...
@@ -76,7 +77,18 @@ export default {
...
@@ -76,7 +77,18 @@ export default {
console
.
log
(
"---onLoad"
);
console
.
log
(
"---onLoad"
);
},
},
onShow
()
{
onShow
()
{
let
_this
=
this
;
wx
.
getScreenBrightness
({
success
:
(
res
)
=>
{
_this
.
currentBrightness
=
res
.
value
},
fail
:
(
res
)
=>
{
console
.
log
(
res
,
'-------getScreenBrightness--fail'
)
}
});
console
.
log
(
this
.
currentBrightness
,
'---currentBrightness'
);
console
.
log
(
"---onShow"
);
console
.
log
(
"---onShow"
);
this
.
setScreenBrightness
(
1
);
this
.
getQrCode
();
this
.
getQrCode
();
this
.
TimeOut
=
null
;
this
.
TimeOut
=
null
;
this
.
TimeOut
=
setInterval
(()
=>
{
this
.
TimeOut
=
setInterval
(()
=>
{
...
@@ -85,13 +97,25 @@ export default {
...
@@ -85,13 +97,25 @@ export default {
this
.
init
();
this
.
init
();
},
},
onHide
()
{
onHide
()
{
this
.
setScreenBrightness
(
this
.
currentBrightness
);
clearInterval
(
this
.
TimeOut
);
clearInterval
(
this
.
TimeOut
);
},
},
onUnload
()
{
onUnload
()
{
this
.
setScreenBrightness
(
this
.
currentBrightness
);
clearInterval
(
this
.
TimeOut
);
clearInterval
(
this
.
TimeOut
);
},
},
mounted
()
{},
mounted
()
{},
methods
:
{
methods
:
{
setScreenBrightness
(
val
=
0.7
){
if
(
wx
.
setScreenBrightness
)
{
//设置屏幕亮度 参数值:0-1,越大越亮
wx
.
setScreenBrightness
({
value
:
val
});
}
else
{
console
.
log
(
"------微信版本过低------"
)
}
},
init
()
{
init
()
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
"加载中..."
,
title
:
"加载中..."
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment