Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-business
/
scrm-equity-new
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit cca906cb
authored
Dec 20, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
券详情添加二维码
1 parent
28ec73f7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
115 additions
and
39 deletions
package-lock.json
src/api/api.js
src/views/cardRoll/couponsDetail.vue
package-lock.json
deleted
100644 → 0
View file @
28ec73f
This diff could not be displayed because it is too large.
src/api/api.js
View file @
cca906c
...
@@ -181,6 +181,10 @@ export const cardRoll = {
...
@@ -181,6 +181,10 @@ export const cardRoll = {
/**套餐申请售后 */
/**套餐申请售后 */
applySale
(
data
)
{
applySale
(
data
)
{
return
request
(
data
,
'scrm.api.equity.merchant.order.refund'
)
return
request
(
data
,
'scrm.api.equity.merchant.order.refund'
)
},
/**将字符串转成二维码 */
strChangeCode
(
data
)
{
return
request
(
data
,
'scrm.api.equity.coupon.verification.code'
)
}
}
}
}
export
const
oilStation
=
{
export
const
oilStation
=
{
...
...
src/views/cardRoll/couponsDetail.vue
View file @
cca906c
...
@@ -11,18 +11,47 @@
...
@@ -11,18 +11,47 @@
>
>
</div>
</div>
<div
class=
"coupons_info_wrap"
>
<div
class=
"coupons_info_wrap"
>
<span
class=
"title_text info_title"
>
我的核销码
</span>
<span
class=
"title_text info_title"
>
{{
couponsInfo
.
couponName
}}
</span>
<span
class=
"info_tip"
>
到店使用服务后请出示该核销码给店员进行核销
</span>
<span
class=
"info_tip"
>
到店使用服务后请出示该核销码给店员进行核销
</span>
<span
class=
"info_code"
:class=
"!failure ? '' : 'info_code_ds_text'"
>
<span
class=
"info_code"
:class=
"!failure || !future ? '' : 'info_code_ds_text'"
>
{{
couponsInfo
.
verificationCode
}}
{{
couponsInfo
.
verificationCode
}}
<span
v-if=
"failure"
class=
"info_code_disable"
>
已失效
</span>
<!--
<span
v-if=
"failure"
class=
"info_code_disable"
>
已失效
</span>
-->
<span
v-if=
"future"
class=
"info_code_disable info_code_disable_date"
>
<!--
<span
v-if=
"future"
class=
"info_code_disable info_code_disable_date"
>
<span
v-if=
"couponsInfo.nextLimitDays"
>
{{
couponsInfo
.
nextLimitDays
}}
天
</span>
<span
v-if=
"couponsInfo.nextLimitDays"
<span
v-if=
"couponsInfo.nextLimitHours"
>
{{
couponsInfo
.
nextLimitHours
}}
时
</span>
>
{{
couponsInfo
.
nextLimitDays
}}
天
</span
<span
v-if=
"couponsInfo.nextLimitMin"
>
{{
couponsInfo
.
nextLimitMin
}}
分
</span>
>
<span
v-if=
"couponsInfo.nextLimitHours"
>
{{
couponsInfo
.
nextLimitHours
}}
时
</span
>
<span
v-if=
"couponsInfo.nextLimitMin"
>
{{
couponsInfo
.
nextLimitMin
}}
分
</span
>
<span>
后可用
</span>
<span>
后可用
</span>
</span>
-->
</span>
</span>
</span>
<div
class=
"qrcode_wrap"
>
<img
:class=
"[
{ op30: failure || future }]"
v-if="qrcode"
:src="qrcode"
/>
<div
v-if=
"failure"
class=
"qrBtn"
>
已失效
</div>
<div
v-if=
"future"
class=
"qrBtn qrtext"
>
<span
v-if=
"couponsInfo.nextLimitDays"
>
{{
couponsInfo
.
nextLimitDays
}}
天
</span
>
<span
v-if=
"couponsInfo.nextLimitHours"
>
{{
couponsInfo
.
nextLimitHours
}}
时
</span
>
<span
v-if=
"couponsInfo.nextLimitMin"
>
{{
couponsInfo
.
nextLimitMin
}}
分
</span
>
<span>
后可用
</span>
</div>
</div>
<div
v-if=
"couponsInfo.countState"
class=
"info_count"
>
不限制次数
</div>
<div
v-if=
"couponsInfo.countState"
class=
"info_count"
>
不限制次数
</div>
<div
v-else
class=
"info_count"
>
<div
v-else
class=
"info_count"
>
剩余可用次数
<span
class=
"red_text"
剩余可用次数
<span
class=
"red_text"
...
@@ -79,10 +108,11 @@ export default {
...
@@ -79,10 +108,11 @@ export default {
showNote
:
false
,
showNote
:
false
,
status
:
0
,
status
:
0
,
failure
:
false
,
failure
:
false
,
future
:
false
,
future
:
false
,
dayDiff
:
0
,
dayDiff
:
0
,
hourDiff
:
0
,
hourDiff
:
0
,
minDiff
:
0
,
minDiff
:
0
,
qrcode
:
""
,
};
};
},
},
beforeCreate
()
{
beforeCreate
()
{
...
@@ -90,19 +120,18 @@ export default {
...
@@ -90,19 +120,18 @@ export default {
},
},
mounted
()
{
mounted
()
{
let
sign
=
this
.
getEnvironmentAndSource
();
let
sign
=
this
.
getEnvironmentAndSource
();
if
(
sign
.
platform
==
'mini'
)
{
if
(
sign
.
platform
==
"mini"
)
{
let
options
=
this
.
$route
.
query
;
let
options
=
this
.
$route
.
query
;
if
(
options
.
urlParam
)
{
if
(
options
.
urlParam
)
{
let
{
sessionId
,
id
}
=
JSON
.
parse
(
options
.
urlParam
)
let
{
sessionId
,
id
}
=
JSON
.
parse
(
options
.
urlParam
);
this
.
sessionId
=
sessionId
this
.
sessionId
=
sessionId
;
sessionStorage
.
setItem
(
'URL_PARAM'
,
options
.
urlParam
)
sessionStorage
.
setItem
(
"URL_PARAM"
,
options
.
urlParam
);
this
.
getDetailInfo
(
id
);
this
.
getDetailInfo
(
id
);
}
}
}
else
{
}
else
{
let
options
=
this
.
$route
.
query
;
let
options
=
this
.
$route
.
query
;
this
.
getDetailInfo
(
options
.
id
);
this
.
getDetailInfo
(
options
.
id
);
}
}
},
},
methods
:
{
methods
:
{
getDetailInfo
(
id
)
{
getDetailInfo
(
id
)
{
...
@@ -117,17 +146,18 @@ export default {
...
@@ -117,17 +146,18 @@ export default {
let
{
code
,
data
}
=
res
;
let
{
code
,
data
}
=
res
;
if
(
code
==
0
)
{
if
(
code
==
0
)
{
this
.
couponsInfo
=
data
;
this
.
couponsInfo
=
data
;
this
.
changeCodeImage
(
data
.
verificationCode
);
this
.
showNote
=
data
.
list
.
length
?
true
:
false
;
this
.
showNote
=
data
.
list
.
length
?
true
:
false
;
this
.
couponsInfo
.
verificationCode
=
this
.
couponsInfo
.
verificationCode
=
this
.
couponsInfo
.
verificationCode
.
replace
(
/
(
.
{4})
/g
,
"$1 "
);
this
.
couponsInfo
.
verificationCode
.
replace
(
/
(
.
{4})
/g
,
"$1 "
);
if
(
data
.
couponState
==
2
)
{
if
(
data
.
couponState
==
2
)
{
this
.
failure
=
true
this
.
failure
=
true
;
}
else
if
(
data
.
couponState
==
1
)
{
}
else
if
(
data
.
couponState
==
1
)
{
this
.
failure
=
false
this
.
failure
=
false
;
}
else
if
(
data
.
couponState
==
3
)
{
}
else
if
(
data
.
couponState
==
3
)
{
this
.
future
=
true
this
.
future
=
true
;
}
else
if
(
data
.
couponState
==
4
)
{
}
else
if
(
data
.
couponState
==
4
)
{
this
.
future
=
true
this
.
future
=
true
;
}
}
// 如果相等,则表示当前有效期已用完次数
// 如果相等,则表示当前有效期已用完次数
// if (data.timeSlotUsedAmount == data.timeSlotLimitAmount) {
// if (data.timeSlotUsedAmount == data.timeSlotLimitAmount) {
...
@@ -171,9 +201,9 @@ export default {
...
@@ -171,9 +201,9 @@ export default {
//计算相差秒数
//计算相差秒数
let
leave3
=
leave2
%
(
60
*
1000
);
//计算分钟数后剩余的毫秒数
let
leave3
=
leave2
%
(
60
*
1000
);
//计算分钟数后剩余的毫秒数
let
seconds
=
Math
.
round
(
leave3
/
1000
);
let
seconds
=
Math
.
round
(
leave3
/
1000
);
this
.
dayDiff
=
dayDiff
this
.
dayDiff
=
dayDiff
;
this
.
hourDiff
=
hours
this
.
hourDiff
=
hours
;
this
.
minDiff
=
minutes
this
.
minDiff
=
minutes
;
console
.
log
(
console
.
log
(
"相差"
+
"相差"
+
dayDiff
+
dayDiff
+
...
@@ -186,6 +216,17 @@ export default {
...
@@ -186,6 +216,17 @@ export default {
"秒"
"秒"
);
);
},
},
changeCodeImage
(
code
)
{
let
para
=
{
verificationCode
:
code
,
merchantId
:
sessionStorage
.
getItem
(
"GL_WX_MERCHANTID"
),
};
cardRoll
.
strChangeCode
(
para
).
then
((
res
)
=>
{
if
(
res
.
code
==
0
)
{
this
.
qrcode
=
res
.
data
.
data
;
}
});
},
},
},
};
};
</
script
>
</
script
>
...
@@ -229,16 +270,13 @@ export default {
...
@@ -229,16 +270,13 @@ export default {
.info_tip
{
.info_tip
{
color
:
#b1b1b3
;
color
:
#b1b1b3
;
font-size
:
12px
;
font-size
:
12px
;
margin-bottom
:
10
px
;
margin-bottom
:
5
px
;
}
}
.info_code
{
.info_code
{
font-size
:
2
2
px
;
font-size
:
2
0
px
;
font-family
:
DINAlternate-Bold
,
DINAlternate
;
font-family
:
DINAlternate-Bold
,
DINAlternate
;
font-weight
:
bold
;
font-weight
:
bold
;
color
:
#fc5b32
;
color
:
#fc5b32
;
line-height
:
37px
;
//
letter-spacing
:
6px
;
margin-bottom
:
12px
;
position
:
relative
;
position
:
relative
;
}
}
.info_code_ds_text
{
.info_code_ds_text
{
...
@@ -259,9 +297,9 @@ export default {
...
@@ -259,9 +297,9 @@ export default {
text-align
:
center
;
text-align
:
center
;
line-height
:
32px
;
line-height
:
32px
;
}
}
.info_code_disable_date
{
.info_code_disable_date
{
background
:
#
FDDED
5
;
background
:
#
fdded
5
;
color
:
#
FC5B
32
;
color
:
#
fc5b
32
;
width
:
170px
;
width
:
170px
;
}
}
.info_passcode
{
.info_passcode
{
...
@@ -287,7 +325,41 @@ export default {
...
@@ -287,7 +325,41 @@ export default {
.info_count
{
.info_count
{
color
:
#3b3b3d
;
color
:
#3b3b3d
;
font-size
:
12px
;
font-size
:
12px
;
margin-top
:
16px
;
}
.qrcode_wrap
{
width
:
151px
;
height
:
151px
;
position
:
relative
;
margin
:
16px
0
;
>
img
{
width
:
100%
;
height
:
100%
;
}
.qrBtn
{
position
:
absolute
;
left
:
50%
;
top
:
50%
;
transform
:
translate
(
-50%
,
-50%
);
width
:
118px
;
height
:
32px
;
background
:
#ffffff
;
border
:
1px
solid
#979797
;
box-shadow
:
0px
2px
4px
0px
rgba
(
0
,
0
,
0
,
0.29
);
border-radius
:
8px
;
font-size
:
12px
;
color
:
#656566
;
font-weight
:
400
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
z-index
:
3
;
}
.op30
{
opacity
:
0.3
;
}
.qrtext
{
color
:
#FC5B32
;
}
}
}
}
}
.user_step_wrap
{
.user_step_wrap
{
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment