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
提交
9bd1045d
提交
9bd1045d
编写于
6月 26, 2024
作者:
徐益明
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 现金红包
上级
0edc7edb
变更
7
展开全部
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
6777 行增加
和
45 行删除
+6777
-45
course-ware.vue
src/components/course/course-ware.vue
+1
-1
main.js
src/main.js
+1
-1
fetch.js
src/utils/fetch.js
+2
-1
index.vue
src/views/coupon-center/index.vue
+13
-8
coupon-item.vue
src/views/coupon/components/coupon-item.vue
+17
-1
coupon-tips.vue
src/views/coupon/components/coupon-tips.vue
+45
-33
yarn.lock
yarn.lock
+6698
-0
未找到文件。
src/components/course/course-ware.vue
浏览文件 @
9bd1045d
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
* 需引用ES5
* 需引用ES5
* GlobalWorkerOptions.workerSrc需要一个加载路径
* GlobalWorkerOptions.workerSrc需要一个加载路径
*/
*/
import
pdfJS
from
'pdfjs-dist/es5/build/pdf'
;
//
import pdfJS from 'pdfjs-dist/es5/build/pdf';
pdfJS
.
GlobalWorkerOptions
.
workerSrc
=
'//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.js'
;
pdfJS
.
GlobalWorkerOptions
.
workerSrc
=
'//cdn.bootcdn.net/ajax/libs/pdf.js/2.4.456/pdf.worker.js'
;
import
coverImg
from
'@/images/course/lock-big.png'
;
import
coverImg
from
'@/images/course/lock-big.png'
;
...
...
src/main.js
浏览文件 @
9bd1045d
...
@@ -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
浏览文件 @
9bd1045d
...
@@ -24,6 +24,7 @@ service.interceptors.request.use(config => {
...
@@ -24,6 +24,7 @@ service.interceptors.request.use(config => {
config
.
headers
[
'deviceInfo'
]
=
JSON
.
stringify
({
"app_channel"
:
""
,
"app_mac"
:
""
,
"app_uuid"
:
""
,
"app_version"
:
""
,
"device_brand"
:
""
,
"device_ip"
:
""
,
"device_model"
:
""
,
"device_net"
:
""
,
"device_ops"
:
""
,
"resolution_wh"
:
""
,
"system_level"
:
""
,
"device_type"
:
'10'
})
config
.
headers
[
'deviceInfo'
]
=
JSON
.
stringify
({
"app_channel"
:
""
,
"app_mac"
:
""
,
"app_uuid"
:
""
,
"app_version"
:
""
,
"device_brand"
:
""
,
"device_ip"
:
""
,
"device_model"
:
""
,
"device_net"
:
""
,
"device_ops"
:
""
,
"resolution_wh"
:
""
,
"system_level"
:
""
,
"device_type"
:
'10'
})
}
}
config
.
headers
.
token
=
'DB7F56CDC4C74C279C456B3953520326'
return
config
return
config
},
error
=>
{
},
error
=>
{
console
.
debug
(
'service.interceptors.request: '
,
error
)
console
.
debug
(
'service.interceptors.request: '
,
error
)
...
@@ -34,7 +35,7 @@ service.interceptors.request.use(config => {
...
@@ -34,7 +35,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
浏览文件 @
9bd1045d
...
@@ -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,9 +86,10 @@ export default {
...
@@ -86,9 +86,10 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
selectedCoupon
:{},
couponList
:
[],
couponList
:
[],
hasTips
:
true
,
hasTips
:
true
,
show
:
fals
e
,
show
:
tru
e
,
token
:
""
,
token
:
""
,
couponToken
:
""
,
couponToken
:
""
,
shareUrl
:
""
,
shareUrl
:
""
,
...
@@ -203,10 +204,12 @@ export default {
...
@@ -203,10 +204,12 @@ 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
;
console
.
log
(
"this.selectedCoupon"
,
this
.
selectedCoupon
);
this
.
show
=
true
;
// } else {
// } else {
this
.
$toast
(
"领取成功"
);
//
this.$toast("领取成功");
// this.getSearchCoupons();
// this.getSearchCoupons();
// }
// }
})
})
...
@@ -229,7 +232,9 @@ export default {
...
@@ -229,7 +232,9 @@ export default {
}
}
console
.
log
(
this
.
show
,
item
);
console
.
log
(
this
.
show
,
item
);
},
},
close
()
{},
close
()
{
},
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
浏览文件 @
9bd1045d
...
@@ -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
:
{
// 获取日期
// 获取日期
...
...
src/views/coupon/components/coupon-tips.vue
浏览文件 @
9bd1045d
<
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"
>
领取成功!
领取成功!
...
@@ -50,45 +50,57 @@
...
@@ -50,45 +50,57 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
export
default
{
export
default
{
components
:
{},
components
:
{},
props
:
{
props
:
{
tabsDetail
:
{
tabsDetail
:
{
type
:
Array
,
type
:
Array
,
default
()
{
default
()
{
return
[];
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
);
},
},
};
},
};
</
script
>
</
script
>
<
style
scoped
lang=
"less"
>
<
style
scoped
lang=
"less"
>
.coupon-dialog{
.coupon-dialog{
/deep/ .van-dialog__content{
/deep/ .van-dialog__content{
height: 273px;
height: 273px
!important
;
}
}
.body {
.content {
position: absolute;
height: 215px;
height: 215px;
width: 295px;
width: 295px;
background: url("https://files.yunqueyi.com/image/png/common/20240510112413239.png")
background: url("https://files.yunqueyi.com/image/png/common/20240510112413239.png")
...
...
yarn.lock
0 → 100644
浏览文件 @
9bd1045d
此差异已折叠。
点击以展开。
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录