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
1beb5fbb
Commit
1beb5fbb
authored
Apr 14, 2020
by
leiqingsong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券活动
parent
920c80e0
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
14 deletions
+33
-14
activeDetail.vue
wx_application/src/views/active/activeDetail.vue
+16
-8
createActive.vue
wx_application/src/views/active/createActive.vue
+6
-1
createBigWheelActive.vue
wx_application/src/views/active/createBigWheelActive.vue
+11
-5
No files found.
wx_application/src/views/active/activeDetail.vue
View file @
1beb5fbb
...
...
@@ -8,14 +8,14 @@
<div
class=
"coupon-content"
>
<img
src=
"../../../public/img/coupon.png"
alt=
"coupon_bg"
/>
<div
class=
"content"
>
<div
class=
"money"
>
10
元
</div>
<div
class=
"money"
>
{{
couponDetail
.
unit
}}
元
</div>
<div
class=
"split"
>
<img
src=
"../../../public/img/split.png"
alt=
"split"
/>
</div>
<div
class=
"other"
>
<p>
满
50
元可用
</p>
<p>
有效期:
09.09-09.10
</p>
<p>
全
店通用
</p>
<p>
满
{{
couponDetail
.
salesUnit
}}
元可用
</p>
<p>
有效期:
<span
style=
"font-size: 12px;"
>
{{
couponDetail
.
end_date
}}
</span>
</p>
<p>
{{
couponDetail
.
deptId
}}
号
店通用
</p>
</div>
</div>
</div>
...
...
@@ -102,6 +102,7 @@ export default {
components
:
{
wxAuth
},
data
()
{
return
{
couponDetail
:
{},
game_end
:
false
,
res_error
:
false
,
error_message
:
""
,
...
...
@@ -173,7 +174,7 @@ export default {
if
(
!
sessionStorage
.
getItem
(
"userId"
))
{
// 1.获取code
if
(
this
.
$route
.
query
.
unionid
===
undefined
)
{
this
.
getUnionid
();
//
this.getUnionid();
}
else
{
console
.
log
(
"有unionid"
);
this
.
userBaseInfo
.
unionid
=
JSON
.
stringify
(
this
.
$route
.
query
.
unionid
);
...
...
@@ -224,12 +225,12 @@ export default {
methods
:
{
// 领取
handleGet
()
{
console
.
log
(
"中奖奖品信息"
,
this
.
awardGood
);
let
params
=
{
couponId
:
this
.
awardGood
.
activityPrize
.
couponId
,
couponId
:
this
.
awardGood
.
activityPrize
?
this
.
awardGood
.
activityPrize
.
couponId
:
this
.
couponDetail
.
couponId
,
unionId
:
this
.
userBaseInfo
.
unionid
,
vipId
:
this
.
userBaseInfo
.
vipId
};
console
.
log
(
'领取'
,
params
);
APi_Active
.
collectMyCoupon
(
params
).
then
(
res
=>
{
this
.
showAward
=
false
;
this
.
$toast
(
...
...
@@ -249,7 +250,14 @@ export default {
8
)}
`
+
time
.
substring
(
8
);
this
.
prizeListOrigin
=
res
.
data
.
list
;
let
time2
=
res
.
data
.
coupon
.
end_date
;
res
.
data
.
coupon
.
end_date
=
`
${
time2
.
substring
(
0
,
4
)}
-
${
time2
.
substring
(
4
,
6
)}
-
${
time2
.
substring
(
6
,
8
)}
`
+
time2
.
substring
(
8
);
this
.
couponDetail
=
res
.
data
.
coupon
;
});
},
handleCheckAuth
()
{
this
.
showAuthDialog
=
false
;
...
...
@@ -396,7 +404,7 @@ export default {
left
:
0
;
right
:
0
;
bottom
:
0
;
width
:
8
0
%
;
width
:
8
5
%
;
height
:
92%
;
margin
:
0
auto
;
display
:
flex
;
...
...
wx_application/src/views/active/createActive.vue
View file @
1beb5fbb
...
...
@@ -191,7 +191,10 @@ export default {
this
.
logo_imgs
[
0
]
=
{
url
:
res
.
data
.
activityInfo
.
logo
};
this
.
maxNumber
=
res
.
data
.
activityInfo
.
joinLimit
?.
toString
();
this
.
totalLimit
=
res
.
data
.
activityInfo
.
totalLimit
?.
toString
();
this
.
couponId
=
res
.
data
.
activityInfo
.
couponId
;
this
.
checked_coupon
=
{
couponId
:
res
.
data
.
activityInfo
.
couponId
,
name
:
res
.
data
.
activityInfo
.
couponName
}
this
.
message
=
res
.
activityInfo
.
des
;
let
imgs
=
JSON
.
parse
(
res
.
data
.
activityInfo
.
image
);
let
img_list
=
[];
...
...
@@ -204,6 +207,7 @@ export default {
});
},
onSelect
(
val
)
{
console
.
log
(
val
);
this
.
checked_coupon
=
val
;
this
.
showCoupon
=
false
;
},
...
...
@@ -280,6 +284,7 @@ export default {
joinLimit
:
Number
(
this
.
maxNumber
),
// 总发放数量
totalLimit
:
Number
(
this
.
totalLimit
),
couponName
:
this
.
checked_coupon
.
name
,
couponId
:
this
.
checked_coupon
.
couponId
,
des
:
this
.
message
,
...
...
wx_application/src/views/active/createBigWheelActive.vue
View file @
1beb5fbb
...
...
@@ -367,8 +367,8 @@ export default {
)}
-
${
end_time
.
substring
(
6
,
8
)}
`
+
end_time
.
substring
(
8
);
this
.
bg_imgs
[
0
]
=
{
url
:
res
.
data
.
activityInfo
.
backImage
};
this
.
logo_imgs
[
0
]
=
{
url
:
res
.
data
.
activityInfo
.
logo
};
this
.
basicInfo
.
jointimes
=
res
.
data
.
activityInfo
.
joinLimit
.
toString
();
this
.
basicInfo
.
total_join
=
res
.
data
.
activityInfo
.
totalLimit
.
toString
();
this
.
basicInfo
.
jointimes
=
res
.
data
.
activityInfo
.
joinLimit
?
.
toString
();
this
.
basicInfo
.
total_join
=
res
.
data
.
activityInfo
.
totalLimit
?
.
toString
();
this
.
message
=
res
.
data
.
activityInfo
.
des
;
let
imgs
=
JSON
.
parse
(
res
.
data
.
activityInfo
.
image
);
let
img_list
=
[];
...
...
@@ -419,7 +419,10 @@ export default {
item
.
limit
=
p
.
personLimit
?.
toString
();
item
.
probability
=
p
.
probability
?.
toString
();
item
.
preLimit
=
p
.
limitReceive
?.
toString
();
item
.
checked_coupon
.
couponId
=
p
.
coupon_id
;
this
.
checked_coupon
=
{
couponId
:
p
.
coupon_id
,
name
:
p
.
couponName
};
prizes
.
push
(
item
);
});
this
.
prizeList
=
prizes
;
...
...
@@ -493,7 +496,9 @@ export default {
// console.log(val);
},
handleCreate
()
{
if
(
new
Date
(
this
.
basicInfo
.
startTime1
)
>=
new
Date
(
this
.
basicInfo
.
endTime1
))
{
if
(
new
Date
(
this
.
basicInfo
.
startTime1
)
>=
new
Date
(
this
.
basicInfo
.
endTime1
)
)
{
this
.
$toast
(
"活动开始时间应小于活动开始时间"
);
return
;
}
...
...
@@ -514,7 +519,8 @@ export default {
temp
.
probability
=
p
.
probability
;
total_probability
+=
Number
(
p
.
probability
);
temp
.
limitReceive
=
p
.
preLimit
;
temp
.
coupon_id
=
p
.
checked_coupon
.
couponId
;
temp
.
couponId
=
p
.
checked_coupon
.
couponId
;
temp
.
couponName
=
p
.
checked_coupon
.
name
;
params_prizeList
.
push
(
temp
);
});
if
(
total_probability
!=
100
)
{
...
...
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