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
dbcf051f
Commit
dbcf051f
authored
Sep 21, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f555208b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
5 deletions
+22
-5
src/pages/index/index.vue
+6
-1
src/pages/login/index.vue
+5
-1
src/utils/index.js
+11
-3
No files found.
src/pages/index/index.vue
View file @
dbcf051f
...
...
@@ -6,7 +6,7 @@
<
script
>
import
spokesman
from
"@/api/spokesman.js"
;
import
{
serialize
}
from
"@/utils/index"
;
import
{
serialize
,
getQueryVariable
}
from
"@/utils/index"
;
export
default
{
data
()
{
return
{
...
...
@@ -42,6 +42,11 @@ export default {
if
(
options
.
share
)
{
//来自分享
this
.
link
=
decodeURIComponent
(
options
.
share
);
this
.
spokesmanGroupId
=
getQueryVariable
(
this
.
link
,
"spokesmanGroupId"
);
this
.
spokesmanShopId
=
getQueryVariable
(
this
.
link
,
"spokesmanShopId"
);
this
.
spokesmanRelId
=
getQueryVariable
(
this
.
link
,
"spokesmanRelId"
);
this
.
spokesmanBindId
=
getQueryVariable
(
this
.
link
,
"spokesmanBindId"
);
this
.
page
=
""
;
this
.
params
=
""
;
}
else
if
(
options
.
from
&&
options
.
from
==
"h5login"
)
{
...
...
src/pages/login/index.vue
View file @
dbcf051f
...
...
@@ -204,7 +204,11 @@ export default {
country
:
this
.
userInfo
.
country
,
province
:
this
.
userInfo
.
province
,
city
:
this
.
userInfo
.
city
,
otherPhone
:
0
otherPhone
:
0
,
spokesmanRelId
:
''
,
spokesmanGroupId
:
''
,
spokesmanShopId
:
''
,
spokesmanBindId
:
''
})
.
then
(
res
=>
{
//绑定成功
...
...
src/utils/index.js
View file @
dbcf051f
...
...
@@ -33,7 +33,14 @@ export function serialize(obj) {
return
str
.
join
(
"&"
);
}
export
default
{
formatNumber
,
formatTime
//获取url参数
export
function
getQueryVariable
(
query
,
variable
)
{
// var query = window.location.search.substring(1);
var
vars
=
query
.
split
(
"&"
);
for
(
var
i
=
0
;
i
<
vars
.
length
;
i
++
)
{
var
pair
=
vars
[
i
].
split
(
"="
);
if
(
pair
[
0
]
==
variable
)
{
return
pair
[
1
];
}
}
return
(
false
);
}
\ No newline at end of file
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