Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
ybf
Project
Project
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
xulili
ybf
Commits
fc538223
Commit
fc538223
authored
Apr 23, 2020
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改轮盘&修改送券活动领取&优惠券创建bug
parent
69a1d0ce
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
431 additions
and
82 deletions
+431
-82
activeDetail.vue
wx_application/src/views/active/activeDetail.vue
+375
-51
createBigWheelActive.vue
wx_application/src/views/active/createBigWheelActive.vue
+54
-29
addCoupon.vue
wx_application/src/views/coupon/addCoupon.vue
+2
-2
No files found.
wx_application/src/views/active/activeDetail.vue
View file @
fc538223
This diff is collapsed.
Click to expand it.
wx_application/src/views/active/createBigWheelActive.vue
View file @
fc538223
...
...
@@ -615,10 +615,20 @@ export default {
this
.
$toast
(
"请完整填写表单!"
);
return
false
;
}
if
(
Number
(
this
.
basicInfo
.
jointimes
)
>
Number
(
this
.
basicInfo
.
total_join
))
{
if
(
Number
(
this
.
basicInfo
.
jointimes
)
>
Number
(
this
.
basicInfo
.
total_join
)
)
{
this
.
$toast
(
"会员单日参与次数应小于等于会员总参与次数"
);
return
false
;
}
if
(
this
.
prizeList
.
length
<
2
||
this
.
prizeList
.
length
%
2
!=
0
||
this
.
prizeList
.
length
>
8
)
{
this
.
$toast
(
"奖项必须大于2小于8,且为偶数个!"
);
return
false
;
}
let
validate
=
null
;
for
(
let
i
in
this
.
prizeList
)
{
if
(
this
.
prizeList
[
i
].
type
==
""
)
{
...
...
@@ -640,14 +650,20 @@ export default {
break
;
}
if
(
Number
(
this
.
prizeList
[
i
].
total_limit
)
<
Number
(
this
.
prizeList
[
i
].
preLimit
))
{
if
(
Number
(
this
.
prizeList
[
i
].
total_limit
)
<
Number
(
this
.
prizeList
[
i
].
preLimit
)
)
{
console
.
log
(
this
.
prizeList
[
i
].
total_limit
);
console
.
log
(
this
.
prizeList
[
i
].
preLimit
);
this
.
$toast
(
`奖项
${
i
+
1
}
,总发放数量应大于等于每日发放数量`
);
validate
=
false
;
break
;
}
if
(
Number
(
this
.
prizeList
[
i
].
total_limit
)
<
Number
(
this
.
prizeList
[
i
].
limit
))
{
if
(
Number
(
this
.
prizeList
[
i
].
total_limit
)
<
Number
(
this
.
prizeList
[
i
].
limit
)
)
{
this
.
$toast
(
`奖项
${
i
+
1
}
,总发放数量应大于每人限领数量`
);
validate
=
false
;
break
;
...
...
@@ -716,28 +732,30 @@ export default {
},
activityPrizes
:
params_prizeList
};
API_Active
.
createActive
(
params
).
then
(
res
=>
{
this
.
create_times
=
1
;
if
(
res
.
result
===
"fail"
)
{
this
.
$toast
(
res
.
errorMsg
);
return
false
;
}
Toast
.
success
(
"创建成功"
);
setTimeout
(()
=>
{
this
.
$router
.
push
({
name
:
"createSuccess"
,
params
:
{
activityId
:
res
.
data
.
activityInfo
.
id
,
activityType
:
"wheel"
,
logo
:
this
.
logo_imgs
[
0
].
url
,
des
:
this
.
message
}
});
},
200
);
}).
catch
(
error
=>
{
this
.
create_times
=
1
;
console
.
log
(
error
);
});
API_Active
.
createActive
(
params
)
.
then
(
res
=>
{
this
.
create_times
=
1
;
if
(
res
.
result
===
"fail"
)
{
this
.
$toast
(
res
.
errorMsg
);
return
false
;
}
Toast
.
success
(
"创建成功"
);
setTimeout
(()
=>
{
this
.
$router
.
push
({
name
:
"createSuccess"
,
params
:
{
activityId
:
res
.
data
.
activityInfo
.
id
,
activityType
:
"wheel"
,
logo
:
this
.
logo_imgs
[
0
].
url
,
des
:
this
.
message
}
});
},
200
);
})
.
catch
(
error
=>
{
this
.
create_times
=
1
;
console
.
log
(
error
);
});
},
startTimeChange
(
e
)
{
let
startTimeArr
=
e
.
getValues
();
...
...
@@ -855,14 +873,21 @@ export default {
return
newString
;
},
addPrice
()
{
if
(
this
.
prizeList
.
length
>
5
)
{
this
.
$toast
(
"最多设置
6
个奖项"
);
return
;
if
(
this
.
prizeList
.
length
>
7
)
{
this
.
$toast
(
"最多设置
8
个奖项"
);
return
false
;
}
// 计算剩余 概率
let
temp
=
100
;
let
total
=
0
;
this
.
prizeList
.
forEach
(
p
=>
{
temp
-=
Number
(
p
.
probability
);
total
+=
Number
(
p
.
probability
);
if
(
total
===
100
)
{
this
.
prizeList
[
0
].
probability
-=
1
;
temp
=
1
;
}
else
{
temp
-=
Number
(
p
.
probability
);
}
});
// this.remain_probability -= Number(this.prizeList[this.prizeList.length-1].probability)
this
.
prizeList
.
push
({
...
...
wx_application/src/views/coupon/addCoupon.vue
View file @
fc538223
...
...
@@ -138,7 +138,7 @@
/>
</
template
>
</van-cell>
<van-cell
title=
"优惠券ID"
style=
"font-size:14px;"
>
<
!-- <
van-cell title="优惠券ID" style="font-size:14px;">
<template slot="default">
<div class="npbr">
<van-field
...
...
@@ -156,7 +156,7 @@
/>
</div>
</template>
</van-cell>
</van-cell>
-->
<van-cell
title=
"总限制次数"
style=
"font-size:14px;"
class=
"js"
>
<van-stepper
v-model=
"addForm.limitOfUse"
...
...
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