Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cauchy-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
cauchy-ui
Commits
b809a695
Commit
b809a695
authored
Jul 13, 2021
by
FE-安焕焕
👣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
联调
parent
ebe2eb93
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
76 additions
and
51 deletions
+76
-51
pay.js
src/service/pay.js
+3
-3
RechargeInput.vue
src/views/home/components/RechargeInput.vue
+25
-9
RechargeList.vue
src/views/home/components/RechargeList.vue
+1
-1
index.vue
src/views/home/index.vue
+3
-3
index.vue
src/views/orderDetail/index.vue
+2
-1
index.vue
src/views/pay/index.vue
+14
-17
payWaiting.vue
src/views/pay/payWaiting.vue
+25
-14
SpuList.vue
src/views/vipLife/components/SpuList.vue
+1
-1
index.vue
src/views/vipLife/index.vue
+2
-2
No files found.
src/service/pay.js
View file @
b809a695
...
...
@@ -77,12 +77,12 @@ function payByWeixinH5(info) {
* @return:
*/
function
payByALIH5
(
info
)
{
if
(
!
info
.
order_string
)
return
;
console
.
log
(
'
ali:
'
,
info
.
order_string
);
if
(
!
info
.
url
)
return
;
console
.
log
(
'
ali:
'
,
info
.
url
);
const
aliWrap
=
document
.
createElement
(
'
div
'
);
aliWrap
.
id
=
'
ALIWEB_WRAP
'
;
aliWrap
.
setAttribute
(
'
id
'
,
'
ALIWEB_WRAP
'
);
aliWrap
.
innerHTML
=
info
.
order_string
;
aliWrap
.
innerHTML
=
info
.
url
;
document
.
body
.
appendChild
(
aliWrap
);
document
.
forms
[
0
].
submit
();
...
...
src/views/home/components/RechargeInput.vue
View file @
b809a695
...
...
@@ -10,17 +10,17 @@
class
=
"
center-phone-field
"
placeholder
=
"
请输入手机号码
"
@
input
=
"
changeTelFormat
"
@
blur
=
"
searchPhoneNoHome
"
@
blur
=
"
searchPhoneNo(rechargeTel)
"
@
focus
=
"
inputBlur = true
"
/>
<
div
class
=
"
center-phone__list
"
:
class
=
"
{ show: inputBlur
}
"
>
<
div
v
-
for
=
"
(item, index) in list
"
:
key
=
"
index
"
class
=
"
center-phone__list-item
"
@
click
=
"
se
archPhoneNoHom
e(item)
"
@
click
=
"
se
lectPhon
e(item)
"
>
<
span
class
=
"
phone
"
>
{{
phoneFormat
(
item
.
phone
)
}}
<
/span
>
<
span
class
=
"
phone-home
"
>
{{
item
.
home
}}
<
/span
>
<
span
class
=
"
phone
"
>
{{
phoneFormat
(
item
)
}}
<
/span
>
<
span
v
-
if
=
"
index === 0
"
class
=
"
current
"
>
上次充值
<
/span
>
<
/div
>
<
/div
>
...
...
@@ -65,18 +65,29 @@ export default {
this
.
queryhome
();
}
}
,
async
searchPhoneNo
Home
()
{
async
searchPhoneNo
()
{
if
(
!
this
.
phoneNo
)
return
;
if
(
!
checkPhoneFormat
(
this
.
phoneNo
))
{
this
.
$toast
.
fail
(
'
请您输入正确的手机号
'
);
this
.
$emit
(
'
input
'
,
{
phoneNo
:
''
,
phoneNoHome
:
this
.
phoneNoHome
}
);
this
.
input
(
);
return
;
}
this
.
$emit
(
'
input
'
,
{
phoneNo
:
this
.
phoneNo
,
phoneNoHome
:
this
.
phoneNoHome
}
);
!
this
.
phoneHome
&&
this
.
queryhome
();
this
.
input
();
}
,
selectPhone
(
phone
)
{
this
.
inputBlur
=
false
;
if
(
phone
)
{
this
.
rechargeTel
=
phoneFormat
(
phone
);
}
this
.
searchPhoneNo
();
}
,
async
queryhome
()
{
const
[
data
]
=
await
getPhoneHome
(
this
.
phoneNo
);
this
.
phoneNoHome
=
data
?.
phoneHome
;
this
.
input
();
}
,
input
()
{
this
.
$emit
(
'
input
'
,
{
phoneNo
:
this
.
phoneNo
,
phoneNoHome
:
this
.
phoneNoHome
}
);
}
}
...
...
@@ -87,6 +98,9 @@ export default {
position
:
relative
;
&-
phone
{
border
-
bottom
:
@
border
-
width
-
base
solid
@
gray
-
2
;
.
cr
-
field
:
not
(:
last
-
child
)::
after
{
display
:
none
;
}
.
cr
-
cell__title
{
display
:
none
;
}
...
...
@@ -103,9 +117,11 @@ export default {
text
-
indent
:
-
2
px
;
}
&
__list
{
//
display: none;
display
:
none
;
position
:
absolute
;
top
:
50
px
;
top
:
100
px
;
width
:
100
%
;
margin
:
auto
;
left
:
-
@
padding
-
lg
;
right
:
-
@
padding
-
lg
;
z
-
index
:
3
;
...
...
src/views/home/components/RechargeList.vue
View file @
b809a695
...
...
@@ -51,7 +51,7 @@ export default {
methods
:
{
async
changeRechargeType
(
name
)
{
const
[
data
]
=
await
getSkuList
(
this
.
phoneRecharge
[
`
${
name
}
SpuNo`
],
this
.
phoneRecharge
[
`
${
name
}
SpuNo
s
`
],
this
.
phoneRecharge
[
`
${
name
}
Type`
]
);
this
.
$emit
(
'
changeRechargetype
'
,
name
);
...
...
src/views/home/index.vue
View file @
b809a695
...
...
@@ -50,7 +50,7 @@ export default {
phoneRecharge
:
{
}
,
userPhoneInfo
:
{
}
,
rechargeType
:
'
recharge
'
,
historyRecordList
:
[
{
}
,
{
}
],
historyRecordList
:
[
'
17611682272
'
,
'
222222222
'
],
rechargePhoneInfo
:
{
}
,
selectedRechargeInfo
:
{
}
}
;
...
...
@@ -80,7 +80,7 @@ export default {
}
,
async
goOrderApi
()
{
/* 需要加防抖 */
const
{
skuNo
,
salePrice
}
=
this
.
selectedRechargeInfo
;
const
{
skuNo
s
,
salePrice
}
=
this
.
selectedRechargeInfo
;
const
token
=
localStorage
.
get
(
'
vccToken
'
);
if
(
!
token
)
{
await
getTokenFromNative
();
...
...
@@ -93,7 +93,7 @@ export default {
virtualRechargeType
:
this
.
phoneRecharge
[
`${this.rechargeType
}
Type`
],
skuList
:
[
{
skuNo
,
skuNo
:
skuNos
,
count
:
1
}
]
...
...
src/views/orderDetail/index.vue
View file @
b809a695
...
...
@@ -185,7 +185,8 @@ export default {
this
.
showCancelPopup
=
true
;
},
toPay
()
{
this
.
$router
.
push
({
path
:
'
/pay
'
,
query
:
{
orderNo
:
this
.
currentOrder
.
orderNo
}
});
console
.
log
(
this
.
currentOrder
.
orderNo
);
this
.
$router
.
push
({
path
:
'
/pay
'
,
query
:
{
orderNo
:
this
.
orderNo
}
});
},
toGoods
()
{
this
.
$router
.
push
({
path
:
'
/goods
'
});
...
...
src/views/pay/index.vue
View file @
b809a695
...
...
@@ -118,6 +118,8 @@ import {
ACCOUNT_APPLY_FAIL
,
creditPayStatusType
,
ACCOUNT_APPLY_SUCCESS
,
CREDIT_AND_WECHAT_PAY
,
CREDIT_AND_ALIPAY_PAY
,
ACCOUNT_APPLY_AUDIT_FAIL
,
SMS_VERIFICATION_CODE_PAY
,
//短信验证码
FACE_VERIFICATION_CODE_PAY
...
...
@@ -380,6 +382,7 @@ export default {
this
.
goH5
(
url
);
return
;
}
localStorage
.
set
(
'
orderNo
'
,
this
.
orderNo
);
const
paramsData
=
{
...
params
,
quitUrl
:
`
${
window
.
location
.
origin
}
/payWaiting`
,
...
...
@@ -406,35 +409,29 @@ export default {
const
creditPayStatus
=
creditPayInfo
.
creditPayStatus
;
this
.
flowOrderNo
=
flowOrderNo
;
if
(
!
params
&&
this
.
payType
===
WECHAT_PAY
)
{
if
(
!
params
&&
(
this
.
payType
===
WECHAT_PAY
||
this
.
payType
===
CREDIT_AND_WECHAT_PAY
)
)
{
/* 微信支付 */
payByWay
(
this
.
tradeType
,
{
...
wxPayInfo
,
url
:
wxPayInfo
.
mwebUrl
});
return
;
}
if
(
!
params
&&
this
.
payType
===
ALIPAY_PAY
)
{
}
else
if
(
!
params
&&
(
this
.
payType
===
ALIPAY_PAY
||
CREDIT_AND_ALIPAY_PAY
))
{
/* 支付宝支付 */
payByWay
(
'
ALIWEB
'
,
aliPayInfo
);
payByWay
(
'
ALIWEB
'
,
{
...
aliPayInfo
,
url
:
aliPayInfo
.
order_string
}
);
return
;
}
if
(
creditPayStatus
===
PAY_SUCCESS
)
{
if
(
IS_GROUP_PAY
(
this
.
payType
))
{
//组合支付成功后跳转支付中
this
.
payResult
(
'
Waiting
'
);
return
;
}
/* 支付成功 */
}
else
if
(
creditPayStatus
===
PAY_SUCCESS
)
{
/* 信用支付成功 */
this
.
close
();
this
.
payResult
(
'
Success
'
);
return
;
}
if
(
creditPayStatus
===
PAYMENT_CODE_PAY
||
creditPayStatus
===
SMS_VERIFICATION_CODE_PAY
)
{
}
else
if
(
creditPayStatus
===
PAYMENT_CODE_PAY
||
creditPayStatus
===
SMS_VERIFICATION_CODE_PAY
)
{
/* 密码或者短信鉴权 */
this
.
close
();
this
[
`
${
creditPayStatusType
[
creditPayStatus
]}
Modal`
]
=
true
;
return
;
}
/* 人脸鉴权 */
if
(
creditPayStatus
===
FACE_VERIFICATION_CODE_PAY
)
{
}
else
if
(
creditPayStatus
===
FACE_VERIFICATION_CODE_PAY
)
{
/* 人脸鉴权 */
this
.
goOcr
();
}
},
...
...
src/views/pay/payWaiting.vue
View file @
b809a695
...
...
@@ -25,6 +25,7 @@
<
script
>
import
{
registeredEvents
}
from
'
@/service/sa.service
'
;
import
{
queryPayStatus
}
from
'
@/api/pay.api
'
;
import
localStorage
from
'
@/service/localStorage.service
'
;
export
default
{
components
:
{},
data
()
{
...
...
@@ -35,19 +36,14 @@ export default {
};
},
created
()
{
const
{
orderNo
}
=
this
.
$route
.
query
;
this
.
orderNo
=
orderNo
;
this
.
orderNo
=
this
.
$route
.
query
.
orderNo
||
localStorage
.
set
(
'
orderNo
'
);
},
mounted
()
{
// eslint-disable-next-line space-before-function-paren
this
.
timer
=
setInterval
(
async
()
=>
{
this
.
time
-=
1
;
if
(
this
.
time
%
2
===
0
)
{
const
[
data
]
=
await
queryPayStatus
({
orderNo
:
this
.
orderNo
});
if
(
data
.
payStatus
===
3
)
{
this
.
goPay
();
}
// 结果处理,如果未支付弹窗提示是否支付成功,跳转支付中页面
this
.
query
();
}
if
(
this
.
time
<
1
)
{
clearInterval
(
this
.
timer
);
...
...
@@ -59,18 +55,33 @@ export default {
},
methods
:
{
goHome
()
{
// 去
页面
// 去
首页
this
.
$router
.
replace
({
name
:
'
home
'
});
},
goSuccess
()
{
// 支付成功
this
.
$router
.
replace
({
name
:
'
paySuccess
'
});
},
goOrderDetail
()
{
this
.
$router
.
replace
({
name
:
'
orderDetail
'
,
query
:
{
order
:
this
.
orderNo
}
});
this
.
$router
.
replace
({
name
:
'
orderDetail
'
,
query
:
{
order
No
:
this
.
orderNo
}
});
// 去订单详情页面
},
goPay
()
{
registeredEvents
(
'
PD_YXMMAEC_UserClickCashierPaymentAgainBtn
'
,
{
order_id
:
this
.
orderNo
});
this
.
$router
.
replace
({
name
:
'
pay
'
,
query
:
{
order
:
this
.
orderNo
}
});
async
query
()
{
const
[
data
]
=
await
queryPayStatus
({
orderNo
:
this
.
orderNo
});
if
(
+
data
?.
payStatus
===
3
)
{
this
.
goSuccess
();
}
else
if
(
+
data
?.
payStatus
===
1
)
{
this
.
$dialog
({
message
:
'
是否支付成功?
'
,
confirmButtonText
:
'
确定
'
,
cancelButtonText
:
'
取消
'
,
confirmButtonColor
:
'
#EC1500
'
,
onCancel
:
()
=>
{},
onConfirm
:
()
=>
{
this
.
query
();
}
});
}
}
}
};
...
...
src/views/vipLife/components/SpuList.vue
View file @
b809a695
...
...
@@ -5,7 +5,7 @@
v-for=
"(item, index) in list"
:key=
"index"
class=
"Vl__spu-item"
:class=
"
{ 'Vl__spu-item_active': info.spuNo
=== item.spuNo
}"
:class=
"
{ 'Vl__spu-item_active': info.spuNo
s === item.spuNos
}"
@click="handleSpuClick($event, item, index)"
>
<cr-image
:src=
"item.icon"
height=
"1.093333rem"
width=
"1.093333rem"
class=
"Vl__spu-icon"
/>
...
...
src/views/vipLife/index.vue
View file @
b809a695
...
...
@@ -64,7 +64,7 @@ export default {
return
this
.
spuData
[
this
.
currentTab
-
1
]
?
this
.
spuData
[
this
.
currentTab
-
1
].
itemList
:
[];
},
tips
()
{
return
tipsData
[
this
.
spuInfo
.
spuNo
];
return
tipsData
[
this
.
spuInfo
.
spuNo
s
];
}
},
mounted
()
{
...
...
@@ -117,7 +117,7 @@ export default {
},
async
getSkuList
()
{
this
.
skuList
=
[];
const
{
spuNo
:
spuNo
s
,
type
}
=
this
.
spuInfo
;
const
{
spuNos
,
type
}
=
this
.
spuInfo
;
const
[
res
]
=
await
rechargeApi
.
getSkuList
(
spuNos
,
type
);
if
(
res
)
{
this
.
skuList
=
res
.
rechargeList
;
...
...
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