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
fb84552a
Commit
fb84552a
authored
Sep 23, 2021
by
Xuguangxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 处理支付结果页
parent
7d16b7f5
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
57 deletions
+48
-57
rules.vue
src/components/rules.vue
+9
-1
env.config.js
src/config/env.config.js
+1
-0
smallPic.vue
src/views/goodsDetail/smallPic.vue
+1
-1
createOrder.vue
src/views/order/createOrder.vue
+1
-1
index.vue
src/views/pay/index.vue
+7
-2
payResult.vue
src/views/pay/payResult.vue
+29
-52
No files found.
src/components/rules.vue
View file @
fb84552a
...
@@ -32,10 +32,18 @@
...
@@ -32,10 +32,18 @@
</
style
>
</
style
>
<
script
>
<
script
>
export
default
{
export
default
{
props
:
{
groupInfo
:
{
type
:
Object
,
default
:
()
=>
{
return
{};
}
}
},
methods
:
{
methods
:
{
showRules
()
{
showRules
()
{
this
.
$dialog
({
this
.
$dialog
({
message
:
'
啊啊啊啊啊啊啊啊啊
'
,
message
:
this
.
groupInfo
.
groupBuyDesc
||
'
'
,
title
:
'
拼团须知
'
,
title
:
'
拼团须知
'
,
showCancelButton
:
false
,
showCancelButton
:
false
,
confirmButtonText
:
'
我知道了
'
confirmButtonText
:
'
我知道了
'
...
...
src/config/env.config.js
View file @
fb84552a
...
@@ -14,6 +14,7 @@ const kdspHost = 'https://kdsp-api-vcc3.liangkebang.net';
...
@@ -14,6 +14,7 @@ const kdspHost = 'https://kdsp-api-vcc3.liangkebang.net';
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.25.210:8080'; // 张超
// const talosHost = 'http://192.168.28.83:80'; // 董彪
// const talosHost = 'http://192.168.28.83:80'; // 董彪
// const talosHost = 'http://192.168.25.122:8098'; // 王永杰
// const talosHost = 'http://192.168.25.122:8098'; // 王永杰
// const talosHost = protocol + '//192.168.28.41'; // 超人
const
opapiHost
=
'
https://opapi-vcc3.liangkebang.net
'
;
const
opapiHost
=
'
https://opapi-vcc3.liangkebang.net
'
;
const
VCC_CHANNEL
=
''
;
const
VCC_CHANNEL
=
''
;
const
TERMINAL
=
'
H5
'
;
const
TERMINAL
=
'
H5
'
;
...
...
src/views/goodsDetail/smallPic.vue
View file @
fb84552a
...
@@ -70,7 +70,7 @@
...
@@ -70,7 +70,7 @@
}"
}"
/>
/>
</
template
>
</
template
>
<rules
/>
<rules
:group-info=
"detailInfo.groupBuyInfo || {}"
/>
</div>
</div>
<span
v-if=
"detailImgList.length"
id=
"goodDetail"
class=
"goods-divider"
>
宝贝详情
</span>
<span
v-if=
"detailImgList.length"
id=
"goodDetail"
class=
"goods-divider"
>
宝贝详情
</span>
<div
class=
"goods-detail-imgs"
>
<div
class=
"goods-detail-imgs"
>
...
...
src/views/order/createOrder.vue
View file @
fb84552a
...
@@ -204,7 +204,7 @@ export default {
...
@@ -204,7 +204,7 @@ export default {
cookies
.
set
(
'
skuID
'
,
params
.
skuList
[
0
].
skuNo
);
cookies
.
set
(
'
skuID
'
,
params
.
skuList
[
0
].
skuNo
);
if
(
isWxMp
)
{
if
(
isWxMp
)
{
this
.
nativeBridge
.
openNewUrl
({
this
.
nativeBridge
.
openNewUrl
({
newUrl
:
`/pages/pay/index?orderNo=
${
data
.
orderNo
}
`
newUrl
:
`/pages/pay/index?orderNo=
${
data
.
orderNo
}
&from=groupbuy
`
});
});
}
else
if
(
isApp
)
{
}
else
if
(
isApp
)
{
this
.
nativeBridge
.
openNewUrl
({
this
.
nativeBridge
.
openNewUrl
({
...
...
src/views/pay/index.vue
View file @
fb84552a
...
@@ -184,7 +184,8 @@ export default {
...
@@ -184,7 +184,8 @@ export default {
payContractInfo
:
{},
payContractInfo
:
{},
isCheckAgreement
:
false
,
isCheckAgreement
:
false
,
mergePayPretreatmentInfo
:
{},
mergePayPretreatmentInfo
:
{},
tradeType
:
isWechat
?
'
JSAPI
'
:
'
MWEB
'
tradeType
:
isWechat
?
'
JSAPI
'
:
'
MWEB
'
,
amountInfo
:
{}
};
};
},
},
computed
:
{
computed
:
{
...
@@ -539,7 +540,10 @@ export default {
...
@@ -539,7 +540,10 @@ export default {
name
:
`pay
${
type
}
`
,
name
:
`pay
${
type
}
`
,
query
:
{
query
:
{
reason
:
error
,
reason
:
error
,
orderNo
:
this
.
orderNo
orderNo
:
this
.
orderNo
,
payType
:
this
.
payType
,
finalAmt
:
this
.
amountInfo
.
finalAmt
||
''
,
freeAmount
:
this
.
amountInfo
.
freeAmount
||
''
}
}
});
});
},
},
...
@@ -629,6 +633,7 @@ export default {
...
@@ -629,6 +633,7 @@ export default {
:
(
orderAmt
-
faceValue
||
0
).
toFixed
(
2
);
:
(
orderAmt
-
faceValue
||
0
).
toFixed
(
2
);
const
freeAmount
=
const
freeAmount
=
!
IS_THIRD_PAY
(
this
.
payType
)
&&
this
.
showCoupon
?
faceValue
||
'
0.00
'
:
'
0.00
'
;
!
IS_THIRD_PAY
(
this
.
payType
)
&&
this
.
showCoupon
?
faceValue
||
'
0.00
'
:
'
0.00
'
;
this
.
amountInfo
=
{
finalAmt
,
freeAmount
};
cookies
.
set
(
'
amount
'
,
{
finalAmt
,
freeAmount
});
cookies
.
set
(
'
amount
'
,
{
finalAmt
,
freeAmount
});
},
},
async
reissueContract
()
{
async
reissueContract
()
{
...
...
src/views/pay/payResult.vue
View file @
fb84552a
...
@@ -18,16 +18,9 @@
...
@@ -18,16 +18,9 @@
拼团成功即可退款0元拿,拼团失败立即退款
拼团成功即可退款0元拿,拼团失败立即退款
</p>
</p>
<div
class=
"actions"
>
<div
class=
"actions"
>
<cr-button
shape=
"circle"
type=
"default"
@
click=
"goOrderList(payStatus)"
<cr-button
shape=
"circle"
type=
"default"
@
click=
"goPage(1)"
>
我的拼团
</cr-button>
>
我的拼团
</cr-button
<cr-button
shape=
"circle"
class=
"actions__back"
:plain=
"true"
type=
"primary"
@
click=
"share"
>
>
邀请好友
</cr-button
<cr-button
shape=
"circle"
class=
"actions__back"
:plain=
"true"
type=
"primary"
@
click=
"goPage(1)"
>
查看订单
</cr-button
>
>
</div>
</div>
</div>
</div>
...
@@ -69,11 +62,11 @@
...
@@ -69,11 +62,11 @@
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
cookies
from
'
@/service/cookieStorage.service
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
import
{
goUrlExtends
}
from
'
./extends
'
;
import
CouponCard
from
'
./components/CouponCard.vue
'
;
import
CouponCard
from
'
./components/CouponCard.vue
'
;
import
{
getCouponList
}
from
'
@/api/pay.api
'
;
import
{
getCouponList
}
from
'
@/api/pay.api
'
;
import
Goods
from
'
@/components/RecoGoods/RecoGoods.vue
'
;
import
Goods
from
'
@/components/RecoGoods/RecoGoods.vue
'
;
import
{
isApp
,
isWxMp
}
from
'
@/service/validation.service
'
;
export
default
{
export
default
{
components
:
{
components
:
{
Goods
,
Goods
,
...
@@ -90,52 +83,28 @@ export default {
...
@@ -90,52 +83,28 @@ export default {
couponList
:
[],
couponList
:
[],
payStatusName
:
''
,
payStatusName
:
''
,
payMethodName
:
''
,
payMethodName
:
''
,
payTrackInfo
:
{},
payType
:
''
skuID
:
''
};
};
},
},
created
()
{
created
()
{
const
{
orderNo
,
reason
}
=
this
.
$route
.
query
;
const
{
orderNo
,
reason
,
finalAmt
,
freeAmount
,
payType
}
=
this
.
$route
.
query
;
const
{
success
}
=
this
.
$route
.
meta
;
const
{
success
}
=
this
.
$route
.
meta
;
const
amount
=
cookies
.
get
(
'
amount
'
)
||
{};
this
.
payType
=
payType
||
''
;
this
.
payTrackInfo
=
cookies
.
get
(
'
payTrackInfo
'
)
||
{};
this
.
money
=
finalAmt
||
''
;
this
.
skuID
=
String
(
cookies
.
get
(
'
skuID
'
))
||
''
;
this
.
money
=
amount
.
finalAmt
;
this
.
orderNo
=
orderNo
;
this
.
orderNo
=
orderNo
;
this
.
reason
=
reason
||
''
;
this
.
reason
=
reason
||
''
;
this
.
isSuccess
=
success
||
false
;
this
.
isSuccess
=
success
||
false
;
this
.
freeAmount
=
amount
.
freeAmount
;
this
.
freeAmount
=
freeAmount
||
''
;
this
.
payStatus
=
success
?
'
订单支付成功
'
:
'
订单支付失败
'
;
this
.
payStatus
=
success
?
'
订单支付成功
'
:
'
订单支付失败
'
;
this
.
payStatusName
=
success
?
'
支付成功
'
:
'
支付失败
'
;
this
.
payStatusName
=
success
?
'
支付成功
'
:
'
支付失败
'
;
this
.
$track
?.
registeredEvents
(
'
h5_RechargeResultPageExposure
'
,
{
this
.
$track
?.
registeredEvents
(
'
h5_RechargeResultPageExposure
'
,
{
pay_status
:
this
.
payStatus
pay_status
:
this
.
payStatus
});
});
this
.
$track
?.
registeredEvents
(
'
H5_2BPaymentPageExposure
'
,
{
order_no
:
orderNo
,
pay_result
:
this
.
payStatus
,
vcc_state
:
this
.
payTrackInfo
.
vcc_state
,
pay_method
:
this
.
payTrackInfo
.
pay_method
,
pay_amount
:
amount
.
finalAmt
});
this
.
getCouponList
();
this
.
getCouponList
();
this
.
payMethod
();
},
},
methods
:
{
methods
:
{
payMethod
()
{
share
()
{
const
name
=
this
.
payTrackInfo
.
pay_method
;
// 分享
switch
(
name
)
{
case
1
:
this
.
payMethodName
=
'
享花卡
'
;
break
;
case
2
:
this
.
payMethodName
=
'
微信
'
;
break
;
case
3
:
this
.
payMethodName
=
'
支付宝
'
;
break
;
default
:
''
;
}
},
},
// goPay() {
// goPay() {
// this.$track?.registeredEvents('h5_RechargeResultPageClick', {
// this.$track?.registeredEvents('h5_RechargeResultPageClick', {
...
@@ -148,18 +117,26 @@ export default {
...
@@ -148,18 +117,26 @@ export default {
// this.$router.replace({ name: 'pay', query: { orderNo: this.orderNo } });
// this.$router.replace({ name: 'pay', query: { orderNo: this.orderNo } });
// },
// },
goPage
(
type
)
{
goPage
(
type
)
{
const
name
=
type
?
'
查看订单
'
:
'
重新支付
'
;
this
.
$track
?.
registeredEvents
(
'
H5_2B_PaymentResultPageBtnClick
'
,
{
commodity_id
:
this
.
skuID
,
order_number
:
this
.
orderNo
,
pay_method
:
this
.
payMethodName
,
pay_status
:
this
.
payStatusName
,
buttons_name
:
name
});
if
(
type
==
1
)
{
if
(
type
==
1
)
{
this
.
$router
.
replace
({
name
:
'
orderList
'
,
params
:
{
state
:
0
}
});
this
.
$router
.
replace
({
path
:
'
/orderList/0
'
});
}
else
{
}
else
{
this
.
$router
.
replace
({
name
:
'
pay
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
if
(
isWxMp
)
{
this
.
nativeBridge
.
openNewUrl
({
newUrl
:
`/pages/pay/index?orderNo=
${
this
.
orderNo
}
&from=groupbuy`
});
}
else
if
(
isApp
)
{
this
.
nativeBridge
.
openNewUrl
({
newUrl
:
`/pay?orderNo=
${
this
.
orderNo
}
`
});
}
else
{
return
;
// todo 处理纯h5情况
// this.$dialog({
// message: '请在App或小程序中参与活动~',
// title: '',
// showCancelButton: false,
// confirmButtonText: '我知道了'
// });
}
}
}
},
},
async
getCouponList
()
{
async
getCouponList
()
{
...
...
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