Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mayi-mp-shop
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
程默
mayi-mp-shop
Commits
0c6204a1
Commit
0c6204a1
authored
Dec 12, 2019
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
会员卡支付成功页加判断
parent
c4b5e895
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
9 deletions
+25
-9
src/pages/wxPay/index.vue
+25
-9
No files found.
src/pages/wxPay/index.vue
View file @
0c6204a1
...
...
@@ -14,7 +14,10 @@ export default {
message
:
"正在支付中"
,
shopmixid
:
""
,
openId
:
""
,
options
:
{}
options
:
{},
// 购买会员卡新页面
options_isCard
:
''
,
options_isCardTitle
:
''
,
};
},
onLoad
(
options
)
{
...
...
@@ -24,6 +27,8 @@ export default {
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
//mpvue 的混合周期 使用小程序生命周期数据未初始化
console
.
log
(
"onload//"
);
this
.
options
=
JSON
.
parse
(
options
.
ordercode
);
this
.
options_isCard
=
options
.
isCard
;
this
.
options_isCardTitle
=
options
.
isCardTit
;
let
that
=
this
;
wx
.
getStorage
({
key
:
"openid"
,
...
...
@@ -48,14 +53,25 @@ export default {
payData
.
success
=
res
=>
{
console
.
log
(
"支付成功"
,
res
,
this
.
options
);
this
.
message
=
"支付成功"
;
let
query
=
{
orderSn
:
this
.
options
.
orderSn
};
wx
.
redirectTo
({
url
:
`../index/main?from=wxPay&backpath=/pay/paySuccess¶ms=
${
JSON
.
stringify
(
query
)}
`
});
if
(
!
this
.
options_isCard
){
let
query
=
{
orderSn
:
this
.
options
.
orderSn
};
wx
.
redirectTo
({
url
:
`../index/main?from=wxPay&backpath=/pay/paySuccess¶ms=
${
JSON
.
stringify
(
query
)}
`
});
}
else
{
let
query
=
{
cardTitle
:
this
.
options_isCardTitle
};
wx
.
redirectTo
({
url
:
`../index/main?from=wxPay&backpath=/pay/payCardSuccess¶ms=
${
JSON
.
stringify
(
query
)}
`
});
}
};
payData
.
fail
=
res
=>
{
console
.
log
(
"支付失败"
,
res
,
this
.
options
.
orderSn
);
...
...
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