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
d6a95277
Commit
d6a95277
authored
Sep 21, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plus_重新登陆更新缓存
parent
661ecb83
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
paymentStatus.js
src/subPackage/page/pages/paymentStatus/paymentStatus.js
+9
-8
No files found.
src/subPackage/page/pages/paymentStatus/paymentStatus.js
View file @
d6a95277
...
@@ -33,12 +33,12 @@ wxService.page({
...
@@ -33,12 +33,12 @@ wxService.page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
const
{
amount
,
status
}
=
this
.
options
const
{
amount
,
status
}
=
this
.
options
console
.
log
(
'this.options'
,
status
)
console
.
log
(
'this.options'
,
status
)
this
.
setData
({
this
.
setData
({
amount
,
amount
,
status
status
},
()
=>
{
},
()
=>
{
// 当前用户是否关注公众号
// 当前用户是否关注公众号
this
.
getMemberSubscribe
()
this
.
getMemberSubscribe
()
this
.
loginUpdateStroage
()
//登录更新plus缓存
this
.
loginUpdateStroage
()
//登录更新plus缓存
...
@@ -49,30 +49,31 @@ wxService.page({
...
@@ -49,30 +49,31 @@ wxService.page({
title
:
status
==
'S'
?
'支付成功'
:
'支付失败'
title
:
status
==
'S'
?
'支付成功'
:
'支付失败'
})
})
},
},
loginUpdateStroage
(){
loginUpdateStroage
()
{
const
code
=
wx
.
getStorageSync
(
'_loginCode'
)
const
code
=
wx
.
getStorageSync
(
'_loginCode'
)
const
wechatInfo
=
wx
.
getStorageSync
(
'_wechatInfo'
)
const
wechatInfo
=
wx
.
getStorageSync
(
'_wechatInfo'
)
wxService
.
login
().
then
((
res
)
=>
{
wxService
.
post
(
`/member/minaLogin`
,
{
wxService
.
post
(
`/member/minaLogin`
,
{
code
,
code
:
res
.
code
,
wechatInfo
,
wechatInfo
,
brandId
:
app
.
globalData
.
brandId
,
brandId
:
app
.
globalData
.
brandId
,
})
})
})
},
},
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
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
if
(
result
==
0
)
{
wxService
.
router
(
`/subPackage/page/pages/subPage/subPage?pageId=
${
data
.
page
.
pageId
}
`
)
wxService
.
router
(
`/subPackage/page/pages/subPage/subPage?pageId=
${
data
.
page
.
pageId
}
`
)
}
}
})
})
},
},
getMemberSubscribe
(){
getMemberSubscribe
()
{
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
{
openid
}
=
baseUserInfo
.
member
const
{
openid
}
=
baseUserInfo
.
member
wxService
.
post
(
`/member/subscribe?openid=
${
openid
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/member/subscribe?openid=
${
openid
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
if
(
result
==
0
)
{
// 0 未关注 1 已关注
// 0 未关注 1 已关注
this
.
setData
({
this
.
setData
({
isSubscribe
:
data
==
0
?
false
:
true
isSubscribe
:
data
==
0
?
false
:
true
...
...
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