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
533a70e0
Commit
533a70e0
authored
Jul 28, 2022
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领取优惠券功能
parent
a4ff3991
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
5 deletions
+24
-5
src/components/activity/coupon.vue
+24
-5
No files found.
src/components/activity/coupon.vue
View file @
533a70e0
...
...
@@ -511,12 +511,30 @@ export default {
},
// 领取优惠券
receiveCoupon
(
code
,
item
)
{
console
.
log
(
"----领取优惠券"
,
code
,
item
)
this
.
usingIntegrals
=
(
item
.
consumeIntegral
-
0
).
toFixed
(
0
);
this
.
couponCode
=
code
;
this
.
couItem
=
item
;
let
_this
=
this
;
if
(
item
.
receiveCostType
==
1
)
{
this
.
showGetCouponPop
=
true
;
return
;
wx
.
showModal
({
content
:
`是否消耗
${
this
.
usingIntegrals
}
积分领取`
,
confirmText
:
"确认"
,
cancelText
:
"取消"
,
success
:
function
(
res
)
{
console
.
log
(
res
);
//点击“确认”时打开设置页面
if
(
res
.
confirm
)
{
console
.
log
(
"用户点击确认"
);
_this
.
useCoupon
();
}
else
{
console
.
log
(
"用户点击取消"
);
}
},
fail
:
function
(
res
)
{
wx
.
navigateBack
();
}
});
}
else
{
this
.
useCoupon
(
1
);
}
...
...
@@ -538,10 +556,11 @@ export default {
icon
:
"success"
})
}
// item.receive=false;
}
else
{
this
.
$toast
(
res
.
msg
);
// item.receive=true;
wx
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
})
}
});
},
...
...
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