Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
educationStu
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
向伟
educationStu
Commits
56cc89a1
Commit
56cc89a1
authored
Jan 14, 2022
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
2
parent
ce0848b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
10 deletions
+15
-10
indexassembly.vue
src/pages/index/components/indexassembly.vue
+15
-10
No files found.
src/pages/index/components/indexassembly.vue
View file @
56cc89a1
...
...
@@ -4,7 +4,7 @@
<slot>
登录
</slot>
<button
class=
"hotsopt"
style=
""
open-type=
"getUserInfo"
@
tap=
"getUserProfile()"
></button>
<button
class=
"hotsopt"
style=
""
open-type=
"getUserInfo"
@
tap=
"getUserProfile()"
@
click=
"getCode"
></button>
</view>
<van-popup
:show=
"showPhone"
>
...
...
@@ -32,7 +32,8 @@
import
{
reactive
,
toRefs
,
onMounted
,
onMounted
,
getCurrentInstance
,
inject
}
from
"vue"
;
import
{
...
...
@@ -47,7 +48,11 @@
state
:
String
,
},
components
:
{},
setup
(
props
,{
attrs
,
slots
,
emit
})
{
setup
(
props
,{
attrs
,
slots
,
emit
})
{
const
pages
=
getCurrentPages
()
// 获取栈实例
const
currentRoute
=
pages
[
pages
.
length
-
1
].
route
;
// 获取当前页面路由
let
Toast
=
inject
(
"$toast"
);
let
data
=
reactive
({
obj
:
{
...
...
@@ -56,7 +61,6 @@
},
showPhone
:
false
,
showLogin
:
true
,
//多次点击
});
let
methods
=
{
getUserProfile
()
{
...
...
@@ -67,9 +71,10 @@
success
:
(
info
)
=>
{
data
.
obj
.
Name
=
info
.
userInfo
.
nickName
;
data
.
obj
.
Photo
=
info
.
userInfo
.
avatarUrl
;
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
uni
.
hideTabBar
()
//手机授权弹窗出现 隐藏tabbar 不是层级过高
data
.
showPhone
=
true
;
//显示获取手机号码弹窗
if
(
currentRoute
==
"pages/index/index"
){
uni
.
hideTabBar
()
//手机授权弹窗出现 隐藏tabbar
}
},
fail
:
()
=>
{
uni
.
showToast
({
...
...
@@ -89,8 +94,8 @@
// console.log(e)
data
.
obj
.
iv
=
e
.
detail
.
iv
data
.
obj
.
encryptedData
=
e
.
detail
.
encryptedData
that
.
getCode
()
//
that.getCode()
that
.
parsePhoneNum
(
data
.
obj
.
encryptedData
,
data
.
obj
.
iv
,
data
.
obj
.
code
)
}
},
getCode
()
{
//获取code
...
...
@@ -103,7 +108,7 @@
success
:
(
res
)
=>
{
//获取code
data
.
obj
.
code
=
res
.
code
that
.
parsePhoneNum
(
data
.
obj
.
encryptedData
,
data
.
obj
.
iv
,
res
.
code
)
},
fail
:
()
=>
{
uni
.
showToast
({
...
...
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