Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
zhwy
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 22e6020e
authored
Oct 08, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
领卡
1 parent
4dd0bebc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
packageEquity/pages/freecard/freecard.js
packageEquity/pages/freecard/freecard.js
View file @
22e6020
...
@@ -116,7 +116,7 @@ Page({
...
@@ -116,7 +116,7 @@ Page({
}
}
if
(
code
==
0
)
{
if
(
code
==
0
)
{
// 获取会员卡信息
// 获取会员卡信息
wx
.
p
.
api
.
equityApi
.
checkOpenMember
().
then
(
res
=>
{
wx
.
p
.
api
.
equityApi
.
checkOpenMember
(
{
isTrialCardFlag
:
1
}
).
then
(
res
=>
{
if
(
res
.
code
==
0
&&
res
.
data
)
{
if
(
res
.
code
==
0
&&
res
.
data
)
{
this
.
receiveRed
(
res
.
data
.
equityFreeCardId
)
this
.
receiveRed
(
res
.
data
.
equityFreeCardId
)
}
}
...
@@ -130,7 +130,7 @@ Page({
...
@@ -130,7 +130,7 @@ Page({
equityFreeCardId
equityFreeCardId
}
}
wx
.
p
.
api
.
equityApi
.
checkReceiveRed
(
params
).
then
(
res
=>
{
wx
.
p
.
api
.
equityApi
.
checkReceiveRed
(
params
).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
,
'checkReceiveRed---'
)
let
{
code
,
message
,
data
}
=
res
let
{
code
,
message
,
data
}
=
res
if
(
code
!=
0
)
{
if
(
code
!=
0
)
{
this
.
showTips
(
message
||
'服务不可用'
)
this
.
showTips
(
message
||
'服务不可用'
)
...
@@ -153,7 +153,7 @@ Page({
...
@@ -153,7 +153,7 @@ Page({
// 先判断登录
// 先判断登录
const
authStatus
=
await
wx
.
p
.
router
.
intercept
(
false
)
const
authStatus
=
await
wx
.
p
.
router
.
intercept
(
false
)
if
(
authStatus
)
return
if
(
authStatus
)
return
wx
.
p
.
api
.
equityApi
.
checkOpenMember
().
then
(
res
=>
{
wx
.
p
.
api
.
equityApi
.
checkOpenMember
(
{
isTrialCardFlag
:
1
}
).
then
(
res
=>
{
let
flag
=
false
let
flag
=
false
if
(
res
.
code
==
0
&&
res
.
data
)
{
if
(
res
.
code
==
0
&&
res
.
data
)
{
flag
=
true
flag
=
true
...
@@ -168,23 +168,23 @@ Page({
...
@@ -168,23 +168,23 @@ Page({
})
})
},
},
//
sceneGetId(id) {
sceneGetId
(
id
)
{
//
wx.p.api.equityApi.sceneGetId({ id }).then(res => {
wx
.
p
.
api
.
equityApi
.
sceneGetId
({
id
}).
then
(
res
=>
{
//
let { code, data, message } = res
let
{
code
,
data
,
message
}
=
res
//
if (code == 0) {
if
(
code
==
0
)
{
//
this.setData({
this
.
setData
({
//
merchantId: data?.scene.split('=')[1]
merchantId
:
data
?.
scene
.
split
(
'='
)[
1
]
//
})
})
//
} else {
}
else
{
//
this.showTips(message)
this
.
showTips
(
message
)
//
}
}
//
})
})
//
},
},
async
onLoad
(
options
)
{
async
onLoad
(
options
)
{
let
system
=
wx
.
getSystemInfoSync
()
let
system
=
wx
.
getSystemInfoSync
()
const
authStatus
=
await
wx
.
p
.
router
.
intercept
(
false
)
const
authStatus
=
await
wx
.
p
.
router
.
intercept
(
false
)
const
merchantId
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
this
.
setData
({
this
.
setData
({
merchantId
merchantId
})
})
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment