Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
bfbb8bb3
Commit
bfbb8bb3
authored
Sep 20, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
当前用户是否关注公众号
parent
dae56f42
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
3 deletions
+18
-3
paymentStatus.js
src/subPackage/page/pages/paymentStatus/paymentStatus.js
+17
-2
paymentStatus.wxml
src/subPackage/page/pages/paymentStatus/paymentStatus.wxml
+1
-1
No files found.
src/subPackage/page/pages/paymentStatus/paymentStatus.js
View file @
bfbb8bb3
...
@@ -13,6 +13,7 @@ wxService.page({
...
@@ -13,6 +13,7 @@ wxService.page({
data
:
{
data
:
{
amount
:
0
,
amount
:
0
,
status
:
'S'
,
status
:
'S'
,
isSubscribe
:
false
},
},
/**
/**
...
@@ -37,14 +38,15 @@ wxService.page({
...
@@ -37,14 +38,15 @@ wxService.page({
this
.
setData
({
this
.
setData
({
amount
,
amount
,
status
status
},()
=>
{
// 当前用户是否关注公众号
this
.
getMemberSubscribe
()
})
})
// 动态设置title
// 动态设置title
wx
.
setNavigationBarTitle
({
wx
.
setNavigationBarTitle
({
title
:
status
==
'S'
?
'支付成功'
:
'支付失败'
title
:
status
==
'S'
?
'支付成功'
:
'支付失败'
})
})
},
},
toPlus
()
{
toPlus
()
{
wxService
.
post
(
`/merchant/modelPage/mainSetting/page?brandId=
${
app
.
globalData
.
brandId
}
&isMain=3&type=2`
).
then
(
res
=>
{
wxService
.
post
(
`/merchant/modelPage/mainSetting/page?brandId=
${
app
.
globalData
.
brandId
}
&isMain=3&type=2`
).
then
(
res
=>
{
...
@@ -54,6 +56,19 @@ wxService.page({
...
@@ -54,6 +56,19 @@ wxService.page({
}
}
})
})
},
},
getMemberSubscribe
(){
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
openid
}
=
baseUserInfo
.
member
wxService
.
post
(
`/member/subscribe?openid=
${
openid
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
// 0 未关注 1 已关注
this
.
setData
({
isSubscribe
:
data
==
0
?
false
:
true
})
}
})
},
goPayAgain
()
{
goPayAgain
()
{
console
.
log
(
'goPayAgain'
)
console
.
log
(
'goPayAgain'
)
},
},
...
...
src/subPackage/page/pages/paymentStatus/paymentStatus.wxml
View file @
bfbb8bb3
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
</view>
</view>
</view>
</view>
<view class="status-look df">
<view class="status-look df"
wx:if="{{!isSubscribe}}"
>
<official-account style="width:100%;height:168rpx;"></official-account>
<official-account style="width:100%;height:168rpx;"></official-account>
</view>
</view>
...
...
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