Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
group-buy-ui
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
ui
group-buy-ui
Commits
3a02a582
Commit
3a02a582
authored
Sep 26, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
dcebf31a
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
172 additions
and
184 deletions
+172
-184
smallPic.less
src/views/goodsDetail/smallPic.less
+7
-0
smallPic.vue
src/views/goodsDetail/smallPic.vue
+6
-1
STATIC_DATA.js
src/views/pay/STATIC_DATA.js
+13
-7
CouponCard.vue
src/views/pay/components/CouponCard.vue
+65
-92
PayCardItem.vue
src/views/pay/components/PayCardItem.vue
+2
-2
PayGroupCard.vue
src/views/pay/components/PayGroupCard.vue
+1
-1
SmsModal.vue
src/views/pay/components/SmsModal.vue
+3
-2
index.vue
src/views/pay/index.vue
+51
-59
payWaiting.vue
src/views/pay/payWaiting.vue
+24
-20
No files found.
src/views/goodsDetail/smallPic.less
View file @
3a02a582
...
@@ -112,6 +112,13 @@
...
@@ -112,6 +112,13 @@
margin-right: @padding-x;
margin-right: @padding-x;
flex-shrink: 0;
flex-shrink: 0;
position: relative;
position: relative;
&-img-box{
width: 100%;
height: 100%;
/deep/ img {
border-radius: 6px;
}
}
}
}
&-desc{
&-desc{
flex: 1;
flex: 1;
...
...
src/views/goodsDetail/smallPic.vue
View file @
3a02a582
...
@@ -16,7 +16,12 @@
...
@@ -16,7 +16,12 @@
class=
"goods-product-info-tag"
class=
"goods-product-info-tag"
>
{{
detailInfo
.
groupBuyInfo
.
groupBuyLimitUserCount
}}
人团
</span
>
{{
detailInfo
.
groupBuyInfo
.
groupBuyLimitUserCount
}}
人团
</span
>
>
<cr-image
width=
"108px"
:src=
"detailInfo.thumbImageUrl"
/>
<cr-image
class=
"goods-product-info-img-img-box"
width=
""
height=
""
:src=
"detailInfo.thumbImageUrl"
/>
</div>
</div>
<div
class=
"goods-product-info-desc"
>
<div
class=
"goods-product-info-desc"
>
<div
class=
"goods-product-info-desc-part1"
>
<div
class=
"goods-product-info-desc-part1"
>
...
...
src/views/pay/STATIC_DATA.js
View file @
3a02a582
...
@@ -36,10 +36,9 @@ const WECHAT_PAY = 2;
...
@@ -36,10 +36,9 @@ const WECHAT_PAY = 2;
const
ALIPAY_PAY
=
3
;
const
ALIPAY_PAY
=
3
;
const
CREDIT_AND_WECHAT_PAY
=
4
;
const
CREDIT_AND_WECHAT_PAY
=
4
;
const
CREDIT_AND_ALIPAY_PAY
=
5
;
const
CREDIT_AND_ALIPAY_PAY
=
5
;
const
CASH_PAY
=
6
;
// 三方支付
// 三方支付
const
IS_THIRD_PAY
=
method
=>
[
WECHAT_PAY
,
ALIPAY_PAY
,
CASH_PAY
].
indexOf
(
method
)
>
-
1
;
const
IS_THIRD_PAY
=
method
=>
[
WECHAT_PAY
,
ALIPAY_PAY
].
indexOf
(
method
)
>
-
1
;
//组合支付
//组合支付
const
IS_GROUP_PAY
=
method
=>
[
CREDIT_AND_WECHAT_PAY
,
CREDIT_AND_ALIPAY_PAY
].
indexOf
(
method
)
>
-
1
;
const
IS_GROUP_PAY
=
method
=>
[
CREDIT_AND_WECHAT_PAY
,
CREDIT_AND_ALIPAY_PAY
].
indexOf
(
method
)
>
-
1
;
//信用支付
//信用支付
...
@@ -53,8 +52,6 @@ const FACE_VERIFICATION_CODE_PAY = 4; //人脸验证
...
@@ -53,8 +52,6 @@ const FACE_VERIFICATION_CODE_PAY = 4; //人脸验证
const
PAY_SUCCESS
=
3
;
// 支付成功
const
PAY_SUCCESS
=
3
;
// 支付成功
const
PAY_PAYING
=
2
;
//支付中
const
PAY_PAYING
=
2
;
//支付中
const
CASH_PAY_SUCCESS
=
1
;
// 现金券支付成功
function
isDetentionFn
()
{
function
isDetentionFn
()
{
// 推荐开通享花卡
// 推荐开通享花卡
if
(
this
.
creditPayInfo
.
accountStatus
!==
ACCOUNT_APPLY_SUCCESS
)
{
if
(
this
.
creditPayInfo
.
accountStatus
!==
ACCOUNT_APPLY_SUCCESS
)
{
...
@@ -136,10 +133,19 @@ function filterAllPayList(type, data) {
...
@@ -136,10 +133,19 @@ function filterAllPayList(type, data) {
}
}
return
data
;
return
data
;
}
}
const
payTypeMap
=
{
'
1
'
:
'
信用支付
'
,
'
2
'
:
'
微信支付
'
,
'
3
'
:
'
支付宝支付
'
,
'
4
'
:
'
信用支付_微信支付
'
,
'
5
'
:
'
信用支付_支付宝支付
'
,
'
6
'
:
'
虚拟支付0元付
'
};
export
{
export
{
status
,
status
,
codeArr
,
codeArr
,
CASH_PAY
,
payTypeE
,
payTypeE
,
payStatus
,
payStatus
,
PAY_PAYING
,
PAY_PAYING
,
...
@@ -157,7 +163,6 @@ export {
...
@@ -157,7 +163,6 @@ export {
filterAllPayList
,
filterAllPayList
,
ACCOUNT_NO_APPLY
,
ACCOUNT_NO_APPLY
,
PAYMENT_CODE_PAY
,
PAYMENT_CODE_PAY
,
CASH_PAY_SUCCESS
,
ACCOUNT_APPLY_FAIL
,
ACCOUNT_APPLY_FAIL
,
creditPayStatusType
,
creditPayStatusType
,
CREDIT_AND_WECHAT_PAY
,
CREDIT_AND_WECHAT_PAY
,
...
@@ -166,5 +171,6 @@ export {
...
@@ -166,5 +171,6 @@ export {
ACCOUNT_APPLY_AUDITING
,
ACCOUNT_APPLY_AUDITING
,
ACCOUNT_APPLY_AUDIT_FAIL
,
ACCOUNT_APPLY_AUDIT_FAIL
,
SMS_VERIFICATION_CODE_PAY
,
SMS_VERIFICATION_CODE_PAY
,
FACE_VERIFICATION_CODE_PAY
FACE_VERIFICATION_CODE_PAY
,
payTypeMap
};
};
src/views/pay/components/CouponCard.vue
View file @
3a02a582
<
template
>
<
template
>
<div
class=
"coupon"
>
<div
class=
"pay-type-list"
>
<p
class=
"coupon-face"
>
<p
class=
"type-title"
>
{{
value
.
title
}}
</p>
<span
class=
"coupon-amount"
>
{{
value
.
faceValue
}}
</span>
<payGroupItem
<span
class=
"coupon-name"
>
{{
value
.
name
}}
</span>
v-if=
"value.isGroupPay"
</p>
v-model=
"payList"
<p
class=
"coupon-content"
>
:pay-type=
"payType"
<span
class=
"coupon-desc"
>
{{
value
.
description
}}
</span>
:disabled=
"disabled"
<span
class=
"coupon-time"
>
{{
value
.
couponValidTime
}}
</span>
:coupon-info=
"couponInfo"
</p>
:show-coupon=
"showCoupon"
<p
class=
"coupon-action"
>
:coupon-disabled=
"showCoupon && !payCouponCouldBeUsed"
<cr-button
size=
"mini"
type=
"primary"
shape=
"circle"
class=
"coupon-button"
@
click=
"goNavUrl"
/>
>
去使用
</cr-button
<template
v-else
>
>
<template
v-for=
"(item, key) of payList"
>
</p>
<payCardItem
v-if=
"item.show"
:key=
"key"
:pay-type=
"payType"
:value=
"item"
:disabled=
"disabled"
:coupon-info=
"couponInfo"
:show-coupon=
"showCoupon"
:coupon-disabled=
"showCoupon && !payCouponCouldBeUsed"
/>
</
template
>
</template>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
payCardItem
from
'
./PayCardItem
'
;
import
payGroupItem
from
'
./PayGroupCard.vue
'
;
export
default
{
export
default
{
name
:
'
PayCard
'
,
components
:
{
payCardItem
,
payGroupItem
},
provide
()
{
return
{
payCard
:
this
};
},
props
:
{
props
:
{
value
:
Object
value
:
Object
,
payType
:
Number
,
payText
:
String
,
disabled
:
Boolean
,
couponInfo
:
Object
,
riskLimit
:
Boolean
,
showCoupon
:
Boolean
,
payCouponCouldBeUsed
:
Boolean
,
single
:
{
type
:
Boolean
,
default
:
false
},
creditPay
:
{
type
:
Boolean
,
default
:
false
}
},
},
methods
:
{
data
()
{
goNavUrl
()
{
return
{
this
.
$emit
(
'
click
'
);
payList
:
this
?.
value
?.
payList
||
{}
}
};
}
},
mounted
()
{},
methods
:
{}
};
};
</
script
>
</
script
>
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
>
.coupon {
.pay-type-list {
width: 327px;
background-color: #fff;
height: 97px;
border-radius: @border-radius-sm;
background-size: 100%;
margin-top: @padding-sm;
background-image: url('../../../assets/images/pay/couponCard.png');
.type-title {
margin-right: @padding-sm;
height: 48px;
padding: @padding-unit;
.text-16;
box-sizing: border-box;
&-face {
width: 90px;
color: @red-light;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
span {
display: block;
}
}
&-amount {
.text-30;
width: 100%;
display: flex;
flex-wrap: wrap;
word-break: break-all;
text-align: center;
font-family: PingFangSC-Medium;
&::before {
content: '¥';
.text-12;
}
}
&-name {
.text-12;
}
&-content {
width: 137px;
display: inline-flex;
flex-direction: column;
align-items: center;
justify-content: center;
span {
display: inline-block;
width: 100%;
}
}
&-desc {
.text-14;
color: @black;
overflow: hidden;
font-weight: bold;
font-weight: bold;
display: -webkit-box !important;
padding-left: @padding-md;
-webkit-box-orient: vertical;
position: relative;
-webkit-line-clamp: 3;
line-height: 48px;
overflow: hidden;
}
&-time {
.text-12;
display: flex;
color: @gray-5;
word-break: break-all;
align-items: flex-start;
}
&-action {
width: 90px;
display: inline-flex;
align-items: center;
justify-content: center;
text-align: center;
}
&-button {
width: 64px;
}
}
}
}
</
style
>
</
style
>
src/views/pay/components/PayCardItem.vue
View file @
3a02a582
...
@@ -20,10 +20,10 @@
...
@@ -20,10 +20,10 @@
<p>
{{
value
.
accountStatusDesc
}}
</p>
<p>
{{
value
.
accountStatusDesc
}}
</p>
</div>
</div>
</div>
</div>
<div
v-if=
"showCoupon && value.payType === 1
&& !value.riskLimitDesc
"
class=
"coupon"
>
<div
v-if=
"showCoupon && value.payType === 1"
class=
"coupon"
>
<p
class=
"couponDes"
:class=
"
{ disable: couponDisabled }" @click.stop="openCouponModal">
<p
class=
"couponDes"
:class=
"
{ disable: couponDisabled }" @click.stop="openCouponModal">
<span
v-if=
"couponInfo.pickupId"
>
<span
v-if=
"couponInfo.pickupId"
>
{{
`满${couponInfo.limitAmount
}
减${couponInfo.faceValue
}
元`
}}
{{
`满${couponInfo.limitAmount
New
}
减${couponInfo.faceValueNew
}
元`
}}
<
/span
>
<
/span
>
<
span
v
-
else
>
<
span
v
-
else
>
未选择优惠券
未选择优惠券
...
...
src/views/pay/components/PayGroupCard.vue
View file @
3a02a582
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<div
class=
"dashed"
>
<div
class=
"dashed"
>
<p
class=
"dashed-line"
/>
<p
class=
"dashed-line"
/>
<cr-image
<cr-image
src=
"
../../..
/assets/images/pay/addicon.png"
src=
"
@
/assets/images/pay/addicon.png"
width=
"24px"
width=
"24px"
height=
"24px"
height=
"24px"
class=
"dashed-icon"
class=
"dashed-icon"
...
...
src/views/pay/components/SmsModal.vue
View file @
3a02a582
...
@@ -83,8 +83,9 @@ export default {
...
@@ -83,8 +83,9 @@ export default {
}
}
},
},
getPhone
()
{
getPhone
()
{
const
phone
=
localStorage
.
get
(
'
userInfo
'
)?.
phoneNumber
;
const
phone
=
localStorage
.
get
(
'
phoneNo
'
);
return
phone
;
const
phoneS
=
`
${
phone
}
`
.
replace
(
/
(\d{3})\d
*
(\d{4})
/
,
'
+86 $1 **** $2
'
);
return
phoneS
;
},
},
clearTimer
()
{
clearTimer
()
{
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer
);
...
...
src/views/pay/index.vue
View file @
3a02a582
This diff is collapsed.
Click to expand it.
src/views/pay/payWaiting.vue
View file @
3a02a582
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
width=
"63px"
width=
"63px"
height=
"63px"
height=
"63px"
class=
"info__image"
class=
"info__image"
src=
"
../..
/assets/images/pay/paying.png"
src=
"
@
/assets/images/pay/paying.png"
/>
/>
<div
v-if=
"init"
class=
"info__desc"
>
<div
v-if=
"init"
class=
"info__desc"
>
<p
class=
"info__text"
>
<p
class=
"info__text"
>
...
@@ -16,16 +16,16 @@
...
@@ -16,16 +16,16 @@
<p
class=
"tips"
>
<p
class=
"tips"
>
努力返回支付结果中,请留心查看!
努力返回支付结果中,请留心查看!
</p>
</p>
<div
class=
"actions
"
>
<div
:class=
"['actions', !isOrder && 'no-order']
"
>
<cr-button
<cr-button
class=
"actions__back"
class=
"actions__back"
:plain=
"true"
:plain=
"true"
type=
"primary"
type=
"primary"
shape=
"circle"
shape=
"circle"
@
click=
"goHome('正在支付')"
@
click=
"goHome('正在支付')"
>
返回首页
</cr-button
>
{{
returnUrl
?
'
返回秒杀
'
:
'
返回首页
'
}}
</cr-button
>
>
<cr-button
shape=
"circle"
type=
"primary"
@
click=
"goOrderDetail('正在支付')"
<cr-button
v-if=
"isOrder"
shape=
"circle"
type=
"primary"
@
click=
"goOrderDetail('正在支付')"
>
查看订单
</cr-button
>
查看订单
</cr-button
>
>
</div>
</div>
...
@@ -34,9 +34,9 @@
...
@@ -34,9 +34,9 @@
<
script
>
<
script
>
import
{
queryPayStatus
}
from
'
@/api/pay.api
'
;
import
{
queryPayStatus
}
from
'
@/api/pay.api
'
;
import
cookies
from
'
@/service/cookieStorage.service
'
;
import
cookies
from
'
@/service/cookieStorage.service
'
;
// import localStorage from '@/service/localStorage.service';
import
{
goUrlExtends
}
from
'
./extends
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
// import { isIOS } from '@/service/validation.service';
import
{
isApp
}
from
'
@/service/validation.service
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
export
default
{
export
default
{
components
:
{},
components
:
{},
extends
:
goUrlExtends
,
extends
:
goUrlExtends
,
...
@@ -46,20 +46,20 @@ export default {
...
@@ -46,20 +46,20 @@ export default {
timer
:
null
,
timer
:
null
,
time
:
10
,
time
:
10
,
init
:
false
,
init
:
false
,
isWx
:
false
returnUrl
:
''
,
isOrder
:
true
};
};
},
},
created
()
{
created
()
{
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
cookies
.
get
(
'
orderNo
'
)?.
orderNo
;
this
.
isWx
=
this
.
$route
.
query
.
isWx
;
if
(
!
isApp
)
{
// if (!localStorage.get('isAppInner')) {
setTimeout
(()
=>
{
// const schema = isIOS ? 'xincheng://' : 'app://xincheng/splash';
window
.
location
.
href
=
'
xyqb://openApp
'
;
// setTimeout(() => {
},
2000
);
// window.location.href = schema;
}
// }, 2000);
// }
},
},
mounted
()
{
mounted
()
{
this
.
getQuery
();
this
.
$dialog
({
this
.
$dialog
({
message
:
'
请确认订单已完成支付
'
,
message
:
'
请确认订单已完成支付
'
,
confirmButtonText
:
'
已完成支付
'
,
confirmButtonText
:
'
已完成支付
'
,
...
@@ -78,6 +78,12 @@ export default {
...
@@ -78,6 +78,12 @@ export default {
clearInterval
(
this
.
timer
);
clearInterval
(
this
.
timer
);
},
},
methods
:
{
methods
:
{
getQuery
()
{
this
.
returnUrl
=
cookies
.
get
(
'
returnUrl
'
)
||
''
;
if
(
localStorage
.
get
(
'
hideOrder
'
))
{
this
.
isOrder
=
false
;
}
},
loop
()
{
loop
()
{
this
.
query
();
this
.
query
();
this
.
timer
=
setInterval
(()
=>
{
this
.
timer
=
setInterval
(()
=>
{
...
@@ -95,11 +101,7 @@ export default {
...
@@ -95,11 +101,7 @@ export default {
this
.
$router
.
replace
({
name
:
'
paySuccess
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
this
.
$router
.
replace
({
name
:
'
paySuccess
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
},
},
goPay
()
{
goPay
()
{
if
(
this
.
isWx
)
{
this
.
$router
.
replace
({
name
:
'
pay
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
this
.
$router
.
go
(
-
2
);
return
;
}
this
.
$router
.
go
(
-
1
);
},
},
async
query
()
{
async
query
()
{
const
[
data
,
error
]
=
await
queryPayStatus
({
orderNo
:
this
.
orderNo
});
const
[
data
,
error
]
=
await
queryPayStatus
({
orderNo
:
this
.
orderNo
});
...
@@ -166,7 +168,9 @@ export default {
...
@@ -166,7 +168,9 @@ export default {
flex-direction: row;
flex-direction: row;
margin-top: @padding-lg;
margin-top: @padding-lg;
justify-content: space-between;
justify-content: space-between;
&.no-order {
justify-content: center;
}
&__back {
&__back {
color: @cherry-color-error;
color: @cherry-color-error;
border: 1px solid @cherry-color-error;
border: 1px solid @cherry-color-error;
...
...
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