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
5221a9f5
Commit
5221a9f5
authored
May 18, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领取会员卡方法优化
parent
2e15a091
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
src/utils/mayi.js
+13
-2
No files found.
src/utils/mayi.js
View file @
5221a9f5
...
@@ -288,15 +288,18 @@ export function themeMemberCardClick (item) {
...
@@ -288,15 +288,18 @@ export function themeMemberCardClick (item) {
cardData
=
innerItem
;
cardData
=
innerItem
;
}
}
});
});
if
(
cardData
.
receiveWay
==
0
)
{
// 无门槛
let
cardId
=
cardData
.
id
;
let
cardId
=
cardData
.
id
;
let
userInfo
=
wx
.
getStorageSync
(
"userInfo"
)
?
JSON
.
parse
(
wx
.
getStorageSync
(
"userInfo"
))
:
""
;
let
userInfo
=
wx
.
getStorageSync
(
"userInfo"
)
?
JSON
.
parse
(
wx
.
getStorageSync
(
"userInfo"
))
:
""
;
if
(
cardData
.
receiveWay
==
0
)
{
// 无门槛
shop
.
drawV3Card
(
cardId
).
then
(
res
=>
{
shop
.
drawV3Card
(
cardId
).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
`开通【
${
cardData
.
title
}
】成功`
,
title
:
`开通【
${
cardData
.
title
}
】成功`
,
icon
:
"none"
icon
:
"none"
}).
then
(
res
=>
{
let
backParams
=
`&cardId=
${
cardData
.
id
}
&userTel=
${
userInfo
.
mobilephone
}
`
;
toPage
(
"/personalCenter/membershipCard"
,
backParams
);
});
});
}
else
{
}
else
{
if
(
res
.
data
.
msg
==
"不能重复领卡"
)
{
if
(
res
.
data
.
msg
==
"不能重复领卡"
)
{
...
@@ -327,6 +330,13 @@ export function themeMemberCardClick (item) {
...
@@ -327,6 +330,13 @@ export function themeMemberCardClick (item) {
}
}
}
else
{
}
else
{
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
});
if
(
res
.
data
.
code
==
300
)
{
console
.
log
(
'----------334'
)
// 未登录
const
url
=
`/pages/login/main?back=
${
encodeURIComponent
(
'/'
)}
`
;
wx
.
navigateTo
({
url
:
url
});
}
}
}
});
});
};
};
\ No newline at end of file
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