Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
integral-mall
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
integralMall
integral-mall
Commits
f6c5a0d9
Commit
f6c5a0d9
authored
Mar 22, 2022
by
crushh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: dist
parent
d4037b79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
detail.vue
src/views/goods/coupon/detail.vue
+8
-0
No files found.
src/views/goods/coupon/detail.vue
View file @
f6c5a0d9
...
@@ -1092,6 +1092,8 @@ export default {
...
@@ -1092,6 +1092,8 @@ export default {
// 子组件触发方法
// 子组件触发方法
selectCard
(
arr
)
{
selectCard
(
arr
)
{
console
.
log
(
arr
);
console
.
log
(
arr
);
console
.
log
(
this
.
cardList
);
if
(
arr
.
length
+
this
.
cardList
.
length
>
15
)
{
if
(
arr
.
length
+
this
.
cardList
.
length
>
15
)
{
this
.
$message
.
error
(
`最多支持添加15张卡券,目前一共选择
${
arr
.
length
+
this
.
cardList
.
length
}
张卡券`
);
this
.
$message
.
error
(
`最多支持添加15张卡券,目前一共选择
${
arr
.
length
+
this
.
cardList
.
length
}
张卡券`
);
return
;
return
;
...
@@ -1114,6 +1116,7 @@ export default {
...
@@ -1114,6 +1116,7 @@ export default {
});
});
this
.
limitTimesNumArr
.
push
(
val
.
cardLimit
);
this
.
limitTimesNumArr
.
push
(
val
.
cardLimit
);
this
.
couponCardStockArr
.
push
(
val
.
couponStock
);
this
.
couponCardStockArr
.
push
(
val
.
couponStock
);
console
.
log
(
this
.
couponCardStockArr
);
this
.
limitTimes
=
Math
.
min
.
apply
(
null
,
this
.
limitTimesNumArr
);
this
.
limitTimes
=
Math
.
min
.
apply
(
null
,
this
.
limitTimesNumArr
);
this
.
limitTimesNum
=
Math
.
min
.
apply
(
null
,
this
.
limitTimesNumArr
);
this
.
limitTimesNum
=
Math
.
min
.
apply
(
null
,
this
.
limitTimesNumArr
);
this
.
couponCardStock
=
Math
.
min
.
apply
(
null
,
this
.
couponCardStockArr
);
this
.
couponCardStock
=
Math
.
min
.
apply
(
null
,
this
.
couponCardStockArr
);
...
@@ -1126,6 +1129,7 @@ export default {
...
@@ -1126,6 +1129,7 @@ export default {
};
};
this
.
getCardCost
(
params
);
this
.
getCardCost
(
params
);
}
}
console
.
log
(
this
.
limitTimesNumArr
);
},
},
async
getCardCost
(
params
)
{
async
getCardCost
(
params
)
{
const
res
=
await
request
.
post
(
'/api-integral-mall/get-integral-mall-CashCost'
,
qs
.
stringify
(
params
));
const
res
=
await
request
.
post
(
'/api-integral-mall/get-integral-mall-CashCost'
,
qs
.
stringify
(
params
));
...
@@ -1149,6 +1153,8 @@ export default {
...
@@ -1149,6 +1153,8 @@ export default {
this
.
cardList
.
splice
(
index
,
1
);
this
.
cardList
.
splice
(
index
,
1
);
this
.
cardCouponList
.
splice
(
index
,
1
);
this
.
cardCouponList
.
splice
(
index
,
1
);
this
.
costValueArr
.
splice
(
index
,
1
);
this
.
costValueArr
.
splice
(
index
,
1
);
this
.
couponCardStockArr
.
splice
(
index
,
1
);
// 删除对应 卡券库存数组中的值
this
.
limitTimesNumArr
.
splice
(
index
,
1
);
// 删除对应 卡券领取限制数组中的值
if
(
this
.
costValueArr
.
length
)
{
if
(
this
.
costValueArr
.
length
)
{
const
sum
=
this
.
costValueArr
.
reduce
(
function
(
prev
,
cur
,
index
,
array
)
{
const
sum
=
this
.
costValueArr
.
reduce
(
function
(
prev
,
cur
,
index
,
array
)
{
return
prev
+
cur
;
return
prev
+
cur
;
...
@@ -1173,6 +1179,8 @@ export default {
...
@@ -1173,6 +1179,8 @@ export default {
this
.
couponCardStock
=
''
;
this
.
couponCardStock
=
''
;
this
.
couponForm
.
limitTimesStatus
=
false
;
this
.
couponForm
.
limitTimesStatus
=
false
;
}
}
console
.
log
(
this
.
limitTimesNumArr
);
console
.
log
(
this
.
cardList
);
},
},
// 券包积分计算
// 券包积分计算
handleIntegralCostTotal
()
{
handleIntegralCostTotal
()
{
...
...
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