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
fd1aa5ac
Commit
fd1aa5ac
authored
Sep 19, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分销
parent
21821c93
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
27 deletions
+30
-27
src/pages/index/index.vue
+30
-27
No files found.
src/pages/index/index.vue
View file @
fd1aa5ac
...
@@ -44,7 +44,7 @@ export default {
...
@@ -44,7 +44,7 @@ export default {
}
else
if
(
options
.
from
&&
options
.
from
==
"h5login"
)
{
}
else
if
(
options
.
from
&&
options
.
from
==
"h5login"
)
{
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"sessionid"
,
key
:
"sessionid"
,
data
:
options
.
sessionid
data
:
JSON
.
parse
(
options
.
params
)
.
sessionid
});
});
}
else
if
(
options
.
from
&&
options
.
from
==
"login"
)
{
}
else
if
(
options
.
from
&&
options
.
from
==
"login"
)
{
//来自登录页面
//来自登录页面
...
@@ -69,11 +69,39 @@ export default {
...
@@ -69,11 +69,39 @@ export default {
var
query
=
options
.
query
.
dentistId
;
// 参数二维码传递过来的场景参数
var
query
=
options
.
query
.
dentistId
;
// 参数二维码传递过来的场景参数
}
}
console
.
log
(
"url"
,
this
.
link
+
this
.
page
+
this
.
params
);
console
.
log
(
"url"
,
this
.
link
+
this
.
page
+
this
.
params
);
},
},
components
:
{
components
:
{
// card
// card
},
},
methods
:
{
methods
:
{
async
getSpokesman
()
{
await
spokesman
.
getSpokesmanidByShare
().
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
data
.
hasInvitationStatus
==
1
)
{
this
.
hasInvitationStatus
=
1
;
this
.
spokesmanGroupId
=
res
.
data
.
data
.
groupId
;
this
.
spokesmanShopId
=
res
.
data
.
data
.
shopId
;
this
.
spokesmanRelId
=
res
.
data
.
data
.
spokesmanId
;
if
(
res
.
data
.
data
.
spokesmanBindId
||
(
res
.
data
.
data
.
spokesmanBindId
!=
null
||
res
.
data
.
data
.
belongToShopId
!=
0
||
res
.
data
.
data
.
belongToShopId
!=
""
)
)
{
this
.
spokesmanBindId
=
res
.
data
.
data
.
belongToShopId
;
}
if
(
this
.
spokesmanBindId
)
{
this
.
newHref
=
`&spokesmanGroupId=
${
this
.
spokesmanGroupId
}
&spokesmanShopId=
${
this
.
spokesmanShopId
}
&spokesmanRelId=
${
this
.
spokesmanRelId
}
&spokesmanBindId=
${
this
.
spokesmanBindId
}
`
;
}
else
{
this
.
newHref
=
`&spokesmanGroupId=
${
this
.
spokesmanGroupId
}
&spokesmanShopId=
${
this
.
spokesmanShopId
}
&spokesmanRelId=
${
this
.
spokesmanRelId
}
`
;
}
}
console
.
log
(
this
.
newHref
,
"this.newHrefthis.newHrefthis.newHref"
);
}
});
},
bindViewTap
()
{
bindViewTap
()
{
const
url
=
"../logs/main"
;
const
url
=
"../logs/main"
;
if
(
mpvuePlatform
===
"wx"
)
{
if
(
mpvuePlatform
===
"wx"
)
{
...
@@ -107,32 +135,7 @@ export default {
...
@@ -107,32 +135,7 @@ export default {
// }
// }
},
},
async
onShareAppMessage
(
res
)
{
async
onShareAppMessage
(
res
)
{
console
.
log
(
111111111111111
);
await
this
.
getSpokesman
();
await
spokesman
.
getSpokesmanidByShare
().
then
(
res
=>
{
if
(
res
.
code
==
200
)
{
if
(
res
.
data
.
hasInvitationStatus
==
1
)
{
this
.
hasInvitationStatus
=
1
;
this
.
spokesmanGroupId
=
res
.
data
.
groupId
;
this
.
spokesmanShopId
=
res
.
data
.
shopId
;
this
.
spokesmanRelId
=
res
.
data
.
spokesmanId
;
if
(
res
.
data
.
spokesmanBindId
||
(
res
.
data
.
spokesmanBindId
!=
null
||
res
.
data
.
belongToShopId
!=
0
||
res
.
data
.
belongToShopId
!=
""
)
)
{
this
.
spokesmanBindId
=
res
.
data
.
belongToShopId
;
}
if
(
this
.
spokesmanBindId
)
{
this
.
newHref
=
`&spokesmanGroupId=
${
spokesmanGroupId
}
&spokesmanShopId=
${
spokesmanShopId
}
&spokesmanRelId=
${
spokesmanRelId
}
&spokesmanBindId=
${
spokesmanBindId
}
`
;
}
else
{
this
.
newHref
=
`&spokesmanGroupId=
${
spokesmanGroupId
}
&spokesmanShopId=
${
spokesmanShopId
}
&spokesmanRelId=
${
spokesmanRelId
}
`
;
}
}
// this.newHref = `&spokesmanGroupId=${spokesmanGroupId}&spokesmanShopId=${spokesmanShopId}&spokesmanRelId=${spokesmanRelId}`;
}
});
console
.
log
(
this
.
newHref
,
"////////"
);
//获取webview当前页面地址
//获取webview当前页面地址
this
.
shareUrl
=
res
.
webViewUrl
+
this
.
newHref
;
this
.
shareUrl
=
res
.
webViewUrl
+
this
.
newHref
;
console
.
log
(
"share"
,
res
,
this
.
shareUrl
);
console
.
log
(
"share"
,
res
,
this
.
shareUrl
);
...
...
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