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
e3e6296f
Commit
e3e6296f
authored
Jun 04, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: 开卡弹框
parent
2b908196
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
45 additions
and
24 deletions
+45
-24
wxService.js
src/utils/wxService.js
+45
-24
No files found.
src/utils/wxService.js
View file @
e3e6296f
...
@@ -416,34 +416,55 @@ class WXService extends Http {
...
@@ -416,34 +416,55 @@ class WXService extends Http {
return
false
return
false
}
}
this
.
showOpenCardModelLock
=
true
// 避免多次弹出开卡对话窗
this
.
showOpenCardModelLock
=
true
// 避免多次弹出开卡对话窗
wx
.
showModal
({
// 开卡
title
:
'请激活会员卡'
,
wx
.
navigateToMiniProgram
({
content
:
'为了您更好的购物体验,请您先完善会员信息'
,
appId
:
'wxeb490c6f9b154ef9'
,
// 固定为此 appid,不可改动
showCancel
:
true
,
extraData
:
options
,
// 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
success
:
res
=>
{
success
:
function
(
data
)
{
if
(
res
.
confirm
)
{
console
.
log
(
'navigateToMiniProgram success data is %o'
,
data
)
wx
.
navigateToMiniProgram
({
_self
.
lock
=
false
appId
:
'wxeb490c6f9b154ef9'
,
// 固定为此 appid,不可改动
extraData
:
options
,
// 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
success
:
function
(
data
)
{
console
.
log
(
'navigateToMiniProgram success data is %o'
,
data
)
_self
.
lock
=
false
},
fail
:
function
(
data
)
{
console
.
log
(
'navigateToMiniProgram fail data is %o'
,
data
)
_self
.
lock
=
false
reject
(
data
)
}
})
}
else
{
this
.
router
(
'/pages/welcome/welcome'
)
console
.
log
(
'取消开卡跳转'
)
}
},
},
complete
:
()
=>
{
fail
:
function
(
data
)
{
console
.
log
(
'navigateToMiniProgram fail data is %o'
,
data
)
this
.
router
(
'/pages/userCenter/userCenter'
)
// this.router('/pages/welcome/welcome')
_self
.
lock
=
false
reject
(
data
)
},
complete
()
{
this
.
showOpenCardModelLock
=
false
this
.
showOpenCardModelLock
=
false
}
}
})
})
// wx.showModal({
// title: '请激活会员卡',
// content: '为了您更好的购物体验,请您先完善会员信息',
// showCancel: true,
// success: res => {
// if (res.confirm) {
// wx.navigateToMiniProgram({
// appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
// extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
// success: function (data) {
// console.log('navigateToMiniProgram success data is %o', data)
// _self.lock = false
// },
// fail: function (data) {
// console.log('navigateToMiniProgram fail data is %o', data)
// _self.lock = false
// reject(data)
// }
// })
// } else {
// this.router('/pages/welcome/welcome')
// console.log('取消开卡跳转')
// }
// },
// complete: () => {
// this.showOpenCardModelLock = false
// }
// })
}
}
openCard
()
{
openCard
()
{
...
...
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