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
29e4f272
Commit
29e4f272
authored
Jun 19, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify: console
parent
0063859f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
10 deletions
+4
-10
app.js
src/app.js
+4
-9
util.js
src/utils/util.js
+0
-1
No files found.
src/app.js
View file @
29e4f272
...
@@ -35,18 +35,15 @@ App({
...
@@ -35,18 +35,15 @@ App({
},
},
onShow
:
function
(
options
=
{})
{
onShow
:
function
(
options
=
{})
{
console
.
log
(
'app-onshow'
,
options
)
console
.
log
(
'app-onshow'
,
options
)
// 是不是第一次进入小程序
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
)
{
// wxService.getUserInfo()
}
if
(
options
.
referrerInfo
.
extraData
!=
null
){
if
(
options
.
referrerInfo
.
extraData
!=
null
){
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
const
{
activate_ticket
,
card_id
,
code
,
errCode
,
wx_activate_after_submit_url
}
=
options
.
referrerInfo
.
extraData
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
urlData
=
wx_activate_after_submit_url
.
split
(
"?"
);
let
url
=
urlData
[
0
];
let
url
=
urlData
[
0
];
let
parmas
=
urlData
[
1
];
let
parmas
=
urlData
[
1
];
// wxService.router(`${url}`).search(parmas);
// encodeURIComponent
// decodeURIComponent
wxService
.
router
(
`
${
url
}
`
).
search
({
wxService
.
router
(
`
${
url
}
`
).
search
({
activate_ticket
:
encodeURIComponent
(
activate_ticket
),
activate_ticket
:
encodeURIComponent
(
activate_ticket
),
card_id
,
card_id
,
...
@@ -54,8 +51,6 @@ App({
...
@@ -54,8 +51,6 @@ App({
errCode
,
errCode
,
wx_activate_after_submit_url
:
parmas
wx_activate_after_submit_url
:
parmas
});
});
// encodeURIComponent
// decodeURIComponent
// 激活成功 变更 _baseUserInfo
// 激活成功 变更 _baseUserInfo
baseUserInfo
.
wechatCardId
=
card_id
baseUserInfo
.
wechatCardId
=
card_id
...
@@ -70,7 +65,7 @@ App({
...
@@ -70,7 +65,7 @@ App({
console
.
log
(
res
.
status
)
// loaded
console
.
log
(
res
.
status
)
// loaded
},
},
fail
:
function
(
res
)
{
fail
:
function
(
res
)
{
console
.
log
(
res
.
status
)
// error
console
.
log
(
res
.
status
)
// error
}
}
})
})
...
...
src/utils/util.js
View file @
29e4f272
...
@@ -278,7 +278,6 @@ function getUserInfoByBtn(userInfo) {
...
@@ -278,7 +278,6 @@ function getUserInfoByBtn(userInfo) {
},
(
err
)
=>
{
},
(
err
)
=>
{
return
Promise
.
reject
(
err
)
return
Promise
.
reject
(
err
)
}).
then
(
response
=>
{
}).
then
(
response
=>
{
console
.
log
(
JSON
.
stringify
(
response
))
logger
.
log
(
'getCrmUserInfo response'
,
response
)
logger
.
log
(
'getCrmUserInfo response'
,
response
)
if
(
response
.
data
.
data
.
rspCode
===
-
1
)
{
if
(
response
.
data
.
data
.
rspCode
===
-
1
)
{
return
Promise
.
reject
(
response
.
data
.
data
)
return
Promise
.
reject
(
response
.
data
.
data
)
...
...
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