Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica-professional-exam
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
com.pica.cloud.education.frontend
pica-professional-exam
提交
f7c90bbd
提交
f7c90bbd
编写于
6月 27, 2024
作者:
zhongyao.qiao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'feature/xym' into 'release'
Feature/xym See merge request
!10
上级
0edc7edb
e9d2470d
变更
5
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
100 行增加
和
60 行删除
+100
-60
main.js
src/main.js
+1
-1
fetch.js
src/utils/fetch.js
+1
-1
index.vue
src/views/coupon-center/index.vue
+13
-8
coupon-item.vue
src/views/coupon/components/coupon-item.vue
+18
-2
coupon-tips.vue
src/views/coupon/components/coupon-tips.vue
+67
-48
未找到文件。
src/main.js
浏览文件 @
f7c90bbd
...
@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
...
@@ -100,7 +100,7 @@ router.beforeEach((to, from, next) => {
if
(
to
.
meta
.
title
)
{
if
(
to
.
meta
.
title
)
{
document
.
title
=
to
.
meta
.
title
document
.
title
=
to
.
meta
.
title
}
}
next
();
next
();
})
})
...
...
src/utils/fetch.js
浏览文件 @
f7c90bbd
...
@@ -34,7 +34,7 @@ service.interceptors.request.use(config => {
...
@@ -34,7 +34,7 @@ service.interceptors.request.use(config => {
service
.
interceptors
.
response
.
use
(
service
.
interceptors
.
response
.
use
(
response
=>
{
response
=>
{
const
res
=
response
.
data
const
res
=
response
.
data
/*
/*
baseUrl时,返回000000为成功
baseUrl时,返回000000为成功
apiUrl时,返回200为成功
apiUrl时,返回200为成功
*/
*/
...
...
src/views/coupon-center/index.vue
浏览文件 @
f7c90bbd
...
@@ -62,7 +62,7 @@
...
@@ -62,7 +62,7 @@
</div>
</div>
</van-pull-refresh>
</van-pull-refresh>
</div>
</div>
<coupon-tips
:visible
.
sync=
"show"
@
close=
"close"
/>
<coupon-tips
:vi
ew-value=
"selectedCoupon"
:vi
sible
.
sync=
"show"
@
close=
"close"
/>
</div>
</div>
</section>
</section>
</
template
>
</
template
>
...
@@ -86,6 +86,7 @@ export default {
...
@@ -86,6 +86,7 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
selectedCoupon
:{},
couponList
:
[],
couponList
:
[],
hasTips
:
true
,
hasTips
:
true
,
show
:
false
,
show
:
false
,
...
@@ -203,12 +204,14 @@ export default {
...
@@ -203,12 +204,14 @@ export default {
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
console
.
log
(
res
,
"receiveCoupon"
);
console
.
log
(
res
,
"receiveCoupon"
);
// couponType 1 满减 2 立减 todo 现金红包
// couponType 1 满减 2 立减 todo 现金红包
// if (item.couponType === 2) {
if
(
item
.
couponType
==
4
)
{
// this.show = true;
this
.
selectedCoupon
=
item
;
// } else {
console
.
log
(
"this.selectedCoupon"
,
this
.
selectedCoupon
);
this
.
show
=
true
;
}
else
{
this
.
$toast
(
"领取成功"
);
this
.
$toast
(
"领取成功"
);
// this.getSearchCoupons();
// this.getSearchCoupons();
//
}
}
})
})
.
catch
((
err
)
=>
{
.
catch
((
err
)
=>
{
this
.
$set
(
this
.
couponList
[
index
],
"hasDown"
,
false
);
this
.
$set
(
this
.
couponList
[
index
],
"hasDown"
,
false
);
...
@@ -229,7 +232,9 @@ export default {
...
@@ -229,7 +232,9 @@ export default {
}
}
console
.
log
(
this
.
show
,
item
);
console
.
log
(
this
.
show
,
item
);
},
},
close
()
{},
close
()
{
this
.
getSearchCoupons
();
},
goBack
()
{
goBack
()
{
console
.
log
(
"back"
);
console
.
log
(
"back"
);
window
.
history
.
back
();
window
.
history
.
back
();
...
@@ -263,7 +268,7 @@ export default {
...
@@ -263,7 +268,7 @@ export default {
background-color: #fff;
background-color: #fff;
}
}
.page-content {
.page-content {
height: 100%;
height: 100%;
}
}
.list {
.list {
padding: 10px 12px 0 ;
padding: 10px 12px 0 ;
...
@@ -273,4 +278,4 @@ export default {
...
@@ -273,4 +278,4 @@ export default {
padding-bottom: 50px;
padding-bottom: 50px;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/views/coupon/components/coupon-item.vue
浏览文件 @
f7c90bbd
...
@@ -30,6 +30,13 @@
...
@@ -30,6 +30,13 @@
>
>
满
{{
couponDetail
.
requiredTotalFee
/
100
}}
可用
满
{{
couponDetail
.
requiredTotalFee
/
100
}}
可用
</div>
</div>
<div
v-if=
"couponDetail.couponType == 4"
class=
"card-item-left-top"
>
<span
:class=
"
{ unit: true, opacity5: hasUsed }">¥
</span>
<span
:class=
"
{ amount: true, opacity5: hasUsed }">
{{
couponDetail
.
discountAmount
/
100
}}
</span>
</div>
<div
v-if=
"couponDetail.couponType == 4"
:class=
"['card-item-left-bottom', hasUsed ? 'cr-c1c1c1 ' : '']"
>
现金红包
</div
>
</div>
</div>
<div
<div
v-if=
"couponDetail.couponType == 3"
v-if=
"couponDetail.couponType == 3"
...
@@ -39,6 +46,7 @@
...
@@ -39,6 +46,7 @@
>
{{
couponDetail
.
discountPercent
}}
折
</span
>
{{
couponDetail
.
discountPercent
}}
折
</span
>
>
</div>
</div>
</div>
</div>
<div
class=
"bar"
>
<div
class=
"bar"
>
<div
class=
"bar-top"
/>
<div
class=
"bar-top"
/>
...
@@ -116,7 +124,7 @@
...
@@ -116,7 +124,7 @@
</div>
</div>
</div>
</div>
<div
<div
v-if=
"[0, 1, 4].includes(couponDetail.couponStatus)"
v-if=
"[0, 1, 4].includes(couponDetail.couponStatus)
&& couponBtnShow
"
class=
"use-coupon"
class=
"use-coupon"
@
click=
"goUse"
@
click=
"goUse"
>
>
...
@@ -241,6 +249,14 @@ export default {
...
@@ -241,6 +249,14 @@ export default {
hasUsed
()
{
hasUsed
()
{
return
[
3
,
5
,
6
,
7
,
8
].
includes
(
this
.
couponDetail
.
couponStatus
);
return
[
3
,
5
,
6
,
7
,
8
].
includes
(
this
.
couponDetail
.
couponStatus
);
},
},
couponBtnShow
()
{
console
.
log
(
'tag'
,
this
.
$route
.
path
)
if
(
this
.
$route
.
path
===
"/coupon-center"
)
{
return
true
;
}
else
{
return
this
.
couponDetail
.
couponType
==
4
?
false
:
true
;
}
},
},
},
methods
:
{
methods
:
{
// 获取日期
// 获取日期
...
@@ -270,7 +286,7 @@ export default {
...
@@ -270,7 +286,7 @@ export default {
if
(
if
(
this
.
$route
.
path
==
"/coupon-center"
&&
this
.
$route
.
path
==
"/coupon-center"
&&
this
.
couponDetail
.
couponStatus
==
0
&&
this
.
couponDetail
.
couponStatus
==
0
&&
!
this
.
hasDown
!
this
.
hasDown
&&
this
.
couponDetail
.
couponType
!=
4
)
{
)
{
this
.
$emit
(
"update:hasDown"
,
!
this
.
hasDown
);
this
.
$emit
(
"update:hasDown"
,
!
this
.
hasDown
);
}
}
...
...
src/views/coupon/components/coupon-tips.vue
浏览文件 @
f7c90bbd
<
template
>
<
template
>
<div>
<div
class=
"container"
>
<van-dialog
<van-dialog
v-model=
"visible"
v-model=
"visible"
class=
"coupon-dialog"
class=
"coupon-dialog"
:show-confirm-button=
"false"
:show-confirm-button=
"false"
>
>
<div
class=
"
body
"
>
<div
class=
"
content
"
>
<div
class=
"title"
>
<div
class=
"title"
>
<div
class=
"title-text"
>
<div
class=
"title-text"
>
领取成功!
领取成功!
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<div
class=
"card-item-left shadow"
>
<div
class=
"card-item-left shadow"
>
<div
class=
"card-item-left-top"
>
<div
class=
"card-item-left-top"
>
<span
class=
"unit"
>
¥
</span>
<span
class=
"amount"
>
<span
class=
"unit"
>
¥
</span>
<span
class=
"amount"
>
20
{{
amountPrice
}}
</span>
</span>
</div>
</div>
<div
class=
"card-item-left-bottom"
>
<div
class=
"card-item-left-bottom"
>
...
@@ -36,13 +36,13 @@
...
@@ -36,13 +36,13 @@
<div
class=
"card-item-right flex shadow"
>
<div
class=
"card-item-right flex shadow"
>
<div
class=
"card-item-right-center"
>
<div
class=
"card-item-right-center"
>
<div
class=
"right-coupon"
>
<div
class=
"right-coupon"
>
可至「云鹊医App-个人中心-账户余额」中提现
可至「云鹊医App
/小程序
-个人中心-账户余额」中提现
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"card-bottom"
>
<div
@
click=
"navigateToWithdraw"
class=
"card-bottom"
>
<span
class=
"card-text"
>
去提现
</span>
<span
class=
"card-text"
>
去提现
</span>
</div>
</div>
</div>
</div>
...
@@ -50,47 +50,65 @@
...
@@ -50,47 +50,65 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
import
{
getWebPageUrl
}
from
"@/utils"
;
components
:
{},
props
:
{
export
default
{
tabsDetail
:
{
components
:
{},
type
:
Array
,
props
:
{
default
()
{
tabsDetail
:
{
return
[];
type
:
Array
,
},
default
()
{
},
return
[];
visible
:
{
type
:
Boolean
,
},
},
},
},
data
()
{
visible
:
{
return
{
type
:
Boolean
,
currentIndex
:
0
,
};
},
},
mounted
()
{},
viewValue
:
{
type
:
Object
,
methods
:
{
default
()
{
changeTab
(
index
)
{
return
{}
if
(
this
.
currentIndex
===
index
)
return
;
}
this
.
currentIndex
=
index
;
}
this
.
$emit
(
'changeTab'
,
this
.
currentIndex
);
},
},
data
()
{
close
()
{
return
{
this
.
$emit
(
'update:visible'
,
false
);
currentIndex
:
0
,
this
.
$emit
(
'close'
,
false
);
};
},
},
mounted
()
{
},
computed
:
{
amountPrice
()
{
let
price
=
this
.
viewValue
.
discountAmount
/
100
;
return
Number
.
isNaN
(
price
)
?
""
:
price
;
},
},
methods
:
{
changeTab
(
index
)
{
if
(
this
.
currentIndex
===
index
)
return
;
this
.
currentIndex
=
index
;
this
.
$emit
(
'changeTab'
,
this
.
currentIndex
);
},
close
()
{
this
.
$emit
(
'update:visible'
,
false
);
this
.
$emit
(
'close'
,
false
);
},
},
};
navigateToWithdraw
()
{
let
webUrl
=
getWebPageUrl
(
`mall/banlance-detail?type=1`
);
location
.
replace
(
webUrl
);
return
}
},
};
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.coupon-dialog{
.coupon-dialog{
/deep/ .van-dialog__content{
height: auto !important;
height: 273px
;
overflow: visible !important
;
}
.content {
.body {
position: absolute;
height: 215px;
//
height: 215px;
width: 29
5
px;
width: 29
0
px;
background: url("https://files.yunqueyi.com/image/png/common/20240510112413239.png")
background: url("https://files.yunqueyi.com/image/png/common/20240510112413239.png")
no-repeat;
no-repeat;
background-size: 100% 100%;
background-size: 100% 100%;
...
@@ -99,13 +117,14 @@
...
@@ -99,13 +117,14 @@
left: 50%;
left: 50%;
transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
top: 50%;
top: 50%;
box-sizing: content-box;
padding: 28px 24px 30px;
padding: 28px 24px 30px;
.title {
.title {
position: relative;
position: relative;
margin-bottom: 25px;
margin-bottom: 25px;
&-text {
&-text {
font-weight:
600
;
font-weight:
bold
;
font-size: 28px;
font-size: 28px;
color: #812603;
color: #812603;
line-height: 28px;
line-height: 28px;
...
@@ -121,9 +140,9 @@
...
@@ -121,9 +140,9 @@
.card-item {
.card-item {
margin-bottom: 10px;
margin-bottom: 10px;
&-left {
&-left {
width: 11
9
px;
width: 11
7
px;
&-top {
&-top {
font-weight:
600
;
font-weight:
bold
;
font-size: 33px;
font-size: 33px;
color: #fff;
color: #fff;
line-height: 33px;
line-height: 33px;
...
@@ -133,13 +152,13 @@
...
@@ -133,13 +152,13 @@
align-items: baseline;
align-items: baseline;
justify-content: center;
justify-content: center;
.unit {
.unit {
font-weight:
600
;
font-weight:
bold
;
font-size: 15px;
font-size: 15px;
color: #fff;
color: #fff;
line-height: 15px;
line-height: 15px;
}
}
.amount {
.amount {
font-weight:
600
;
font-weight:
bold
;
font-size: 33px;
font-size: 33px;
color: #fff;
color: #fff;
line-height: 33px;
line-height: 33px;
...
@@ -193,8 +212,8 @@
...
@@ -193,8 +212,8 @@
padding: 0 14px;
padding: 0 14px;
height: 100px;
height: 100px;
.right-coupon {
.right-coupon {
font-weight:
600
;
font-weight:
bold
;
font-size: 1
3
px;
font-size: 1
1
px;
color: #fff;
color: #fff;
line-height: 15px;
line-height: 15px;
padding-top: 31px;
padding-top: 31px;
...
@@ -219,7 +238,7 @@
...
@@ -219,7 +238,7 @@
no-repeat;
no-repeat;
background-size: 100% 100%;
background-size: 100% 100%;
.card-text {
.card-text {
font-weight:
600
;
font-weight:
bold
;
font-size: 16px;
font-size: 16px;
color: #ffffff;
color: #ffffff;
line-height: 19px;
line-height: 19px;
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录