Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
account-book
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
刘文虎
account-book
Commits
83bb399e
Commit
83bb399e
authored
Nov 09, 2022
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 接受二维码分享
parent
d4414ded
Pipeline
#3999
canceled with stages
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
index.vue
pages/index/index.vue
+12
-1
No files found.
pages/index/index.vue
View file @
83bb399e
...
@@ -270,7 +270,7 @@ export default {
...
@@ -270,7 +270,7 @@ export default {
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
.
q
)
{
if
(
options
.
q
)
{
const
q
=
decodeURIComponent
(
options
.
q
);
// 获取到二维码原始链接内容
const
q
=
decodeURIComponent
(
options
.
q
);
// 获取到二维码原始链接内容
console
.
log
(
q
);
uni
.
setStorageSync
(
'shareUserId'
,
this
.
getShareUserId
(
q
))
}
}
if
(
options
&&
options
.
shareUserId
)
{
// 点别人的分享邀请进来
if
(
options
&&
options
.
shareUserId
)
{
// 点别人的分享邀请进来
uni
.
setStorageSync
(
'shareUserId'
,
options
.
shareUserId
)
uni
.
setStorageSync
(
'shareUserId'
,
options
.
shareUserId
)
...
@@ -305,6 +305,17 @@ export default {
...
@@ -305,6 +305,17 @@ export default {
uni
.
$off
(
'bill-list-reload'
);
uni
.
$off
(
'bill-list-reload'
);
},
},
methods
:
{
methods
:
{
getShareUserId
(
q
)
{
var
array
=
q
.
split
(
'?'
)
if
(
array
.
length
>
1
)
{
var
arr
=
array
[
1
].
split
(
'&'
)
for
(
var
item
of
arr
)
{
if
(
item
.
indexOf
(
'shareUserId='
)
!=
-
1
)
{
return
item
.
split
(
'='
)[
1
]
}
}
}
},
changeEye
()
{
changeEye
()
{
this
.
$store
.
dispatch
(
'Save_eye_fill'
,
!
this
.
eyeClose
);
this
.
$store
.
dispatch
(
'Save_eye_fill'
,
!
this
.
eyeClose
);
},
},
...
...
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