Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
672d90c6
Commit
672d90c6
authored
Mar 18, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
消息通知逻辑判断
parent
623dc73b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
10 deletions
+43
-10
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+18
-6
refund.js
src/pages/refund/refund.js
+25
-4
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
672d90c6
...
...
@@ -749,8 +749,6 @@ wxService.page({
wx
.
requestPayment
(
Object
.
assign
({
success
(
res
)
{
wx
.
hideLoading
()
// 支付成功页面
//消息订阅
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
wxService
.
post
(
`
${
'/merchant/message/wxSubMsgMapping/getListByParams'
}
`
,
{
...
...
@@ -758,11 +756,20 @@ wxService.page({
sourceFrom
:
2
,
switchType
:
3
}).
then
(
res
=>
{
let
tempArr
=
res
.
data
.
data
;
let
tempArr
=
res
.
data
.
data
?
res
.
data
.
data
:
[];
let
currentType
=
_this
.
data
.
currentType
;
if
(
tempArr
.
length
==
0
){
wx
.
redirectTo
({
url
:
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
&type=
${
currentType
}
`
,
});
return
;
}
let
tempids
=
[];
tempArr
.
map
(
item
=>
{
tempids
.
push
(
item
.
templateId
);
})
});
wx
.
requestSubscribeMessage
({
tmplIds
:
tempids
,
success
:
(
res
)
=>
{
...
...
@@ -772,15 +779,20 @@ wxService.page({
memberId
:
baseUserInfo
.
memberId
,
scenarioId
:
tempArr
[
i
].
scenarioId
,
templateId
:
tempArr
[
i
].
templateId
}).
then
(
resp
=>
{
})
}).
then
(
resp
=>
{
});
}
},
complete
:
(
res
)
=>
{
wx
.
redirectTo
({
url
:
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
&type=
${
_this
.
data
.
currentType
}
`
,
url
:
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
&type=
${
currentType
}
`
,
});
}
})
}).
catch
(
err
=>
{
let
currentType
=
_this
.
data
.
currentType
;
wx
.
redirectTo
({
url
:
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
&type=
${
currentType
}
`
,
});
})
},
fail
(
res
)
{
...
...
src/pages/refund/refund.js
View file @
672d90c6
...
...
@@ -96,11 +96,23 @@ wxService.page({
sourceFrom
:
2
,
switchType
:
3
}).
then
(
res
=>
{
let
tempArr
=
res
.
data
.
data
;
let
tempArr
=
res
.
data
.
data
?
res
.
data
.
data
:[];
if
(
tempArr
.
length
==
0
){
wx
.
showToast
({
title
:
'申请退款成功'
,
});
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
});
},
2000
);
return
;
}
let
tempids
=
[];
tempArr
.
map
(
item
=>
{
tempids
.
push
(
item
.
templateId
);
})
})
;
wx
.
requestSubscribeMessage
({
tmplIds
:
tempids
,
success
:
(
res
)
=>
{
...
...
@@ -119,14 +131,23 @@ wxService.page({
});
// 订单列表
setTimeout
(()
=>
{
// wxService.router(`/pages/order/order`).search({params})
wx
.
navigateBack
({
delta
:
1
});
},
2000
)
}
})
})
}).
catch
(
err
=>
{
wx
.
showToast
({
title
:
'申请退款成功'
,
});
// 订单列表
setTimeout
(()
=>
{
wx
.
navigateBack
({
delta
:
1
});
},
2000
)
});
}
}
})
...
...
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