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
d0379f97
Commit
d0379f97
authored
Feb 17, 2020
by
chenhui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3c7e29ff
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
11 deletions
+24
-11
src/pages/wxPay/index.vue
+24
-11
No files found.
src/pages/wxPay/index.vue
View file @
d0379f97
...
...
@@ -15,6 +15,7 @@ export default {
shopmixid
:
""
,
openId
:
""
,
options
:
{},
options_orderType
:
''
,
// 购买会员卡新页面
options_isCard
:
''
,
options_isCardTitle
:
''
,
...
...
@@ -27,6 +28,7 @@ export default {
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
//mpvue 的混合周期 使用小程序生命周期数据未初始化
console
.
log
(
"onload//"
);
this
.
options
=
JSON
.
parse
(
options
.
ordercode
);
this
.
options_orderType
=
options
.
orderType
;
this
.
options_isCard
=
options
.
isCard
;
this
.
options_isCardTitle
=
options
.
isCardTit
;
let
that
=
this
;
...
...
@@ -55,21 +57,32 @@ export default {
const
orderSn
=
this
.
options
.
orderSn
;
try
{
if
(
this
.
$store
.
state
.
subscribeMessageObj
&&
Object
.
keys
(
this
.
$store
.
state
.
subscribeMessageObj
).
length
>
0
)
{
const
subscribeMessageObj
=
this
.
$store
.
state
.
subscribeMessageObj
;
if
(
subscribeMessageObj
&&
Object
.
keys
(
subscribeMessageObj
).
length
>
0
)
{
// TODO 小程序订阅消息埋点
wx
.
requestSubscribeMessage
({
tmplIds
:
Object
.
values
(
this
.
$store
.
state
.
subscribeMessageObj
),
success
(
res
)
{
console
.
log
(
"message success response: "
,
res
);
},
fail
(
res
)
{
console
.
log
(
"message fail response: "
,
res
)
}
})
const
tmplIds
=
[];
for
(
var
key
in
subscribeMessageObj
)
{
// 送礼订单
if
(
this
.
options_orderType
==
5
&&
(
key
==
'gift_be_expire'
||
key
==
'gift_draw'
))
{
tmplIds
.
push
(
subscribeMessageObj
[
key
]);
}
}
if
(
tmplIds
.
length
>
0
)
{
wx
.
requestSubscribeMessage
({
tmplIds
:
tmplIds
,
success
(
res
)
{
console
.
log
(
"message success response: "
,
res
);
},
fail
(
res
)
{
console
.
log
(
"message fail response: "
,
res
)
}
})
}
}
}
catch
(
err
)
{
console
.
error
(
"subscribeMessage-err"
,
err
);
}
}
this
.
message
=
"支付成功"
;
if
(
!
this
.
options_isCard
){
let
query
=
{
...
...
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