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
6a650ddb
Commit
6a650ddb
authored
Sep 19, 2019
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
f5b8d24e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
34 deletions
+35
-34
src/pages/index/index.vue
+32
-25
src/pages/wxPay/index.vue
+3
-9
No files found.
src/pages/index/index.vue
View file @
6a650ddb
...
...
@@ -29,7 +29,7 @@ export default {
spokesmanRelId
:
"3"
,
//代言人的id
spokesmanBindId
:
"4"
,
//代言人街道id
hasInvitationStatus
:
0
,
// 邀请资格:0-不能够邀请下级,1-能够邀请下级
newHref
:
""
newHref
:
""
};
},
onLoad
(
options
)
{
...
...
@@ -45,6 +45,14 @@ export default {
//来自登录页面
this
.
page
=
decodeURIComponent
(
options
.
backpath
);
this
.
params
+=
"&"
+
decodeURIComponent
(
options
.
params
);
}
else
if
(
options
.
from
&&
options
.
from
==
"logout"
)
{
this
.
page
=
"/"
;
wx
.
removeStorage
({
key
:
"sessionid"
});
wx
.
removeStorage
({
key
:
"openid"
});
}
else
if
(
options
.
from
==
"wxPay"
)
{
//来自支付页面
this
.
page
=
options
.
backpath
;
...
...
@@ -96,34 +104,33 @@ export default {
async
onShareAppMessage
(
res
)
{
console
.
log
(
111111111111111
);
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
}
`
;
}
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
}
`
;
}
});
this
.
newHref
=
`&spokesmanGroupId=
${
spokesmanGroupId
}
&spokesmanShopId=
${
spokesmanShopId
}
&spokesmanRelId=
${
spokesmanRelId
}
`
;
}
});
// await checkSpokesman();
console
.
log
(
this
.
newHref
,
'////////'
);
console
.
log
(
this
.
newHref
,
"////////"
);
//获取webview当前页面地址
this
.
shareUrl
=
res
.
webViewUrl
+
this
.
newHref
;
this
.
shareUrl
=
res
.
webViewUrl
+
this
.
newHref
;
console
.
log
(
"share"
,
res
,
this
.
shareUrl
);
return
{
title
:
this
.
shareUrl
,
// 默认是小程序的名称
...
...
src/pages/wxPay/index.vue
View file @
6a650ddb
<
template
>
<div>
{{
message
}}
</div>
<div
class=
"domain"
>
{{
message
}}
</div>
</
template
>
<
script
>
...
...
@@ -101,13 +101,7 @@ export default {
</
script
>
<
style
>
.log-list
{
display
:
flex
;
flex-direction
:
column
;
padding
:
40
rpx
;
}
.log-item
{
margin
:
10
rpx
;
.domain
{
text-align
:
center
;
}
</
style
>
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