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
3765d75d
Commit
3765d75d
authored
Dec 16, 2021
by
Lightsnow
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小程序修复客流渠道扫码数据存储
parent
44a027f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletions
+24
-1
src/pages/index/index.vue
+24
-1
No files found.
src/pages/index/index.vue
View file @
3765d75d
...
...
@@ -82,6 +82,29 @@ export default {
}
}
}
// 小程序登录绑定手机号后回调页面记录客流渠道记录数据。
if
(
wx
.
getStorageSync
(
'sessionid'
)
&&
wx
.
getStorageSync
(
'attractingCustomerChannelId'
)
&&
this
.
pageUrl
.
indexOf
(
'open_id'
)
!=
-
1
)
{
console
.
log
(
'绑定手机号后登陆回调页'
)
let
openId
=
this
.
pageUrl
.
split
(
'open_id='
)[
1
].
split
(
'&'
)[
0
]
let
unionId
=
null
if
(
this
.
pageUrl
.
split
(
'unionId='
)[
1
])
{
unionId
=
this
.
pageUrl
.
split
(
'unionId='
)[
1
].
split
(
'&'
)[
0
]
}
indexApi
.
addRecord
(
{
attractingCustomersChannelId
:
wx
.
getStorageSync
(
'attractingCustomerChannelId'
),
miniOpenId
:
openId
,
unionId
:
unionId
,
registerFlag
:
1
,
newRegisterFlag
:
0
,
}
).
then
(
ele
=>
{
if
(
ele
.
data
.
data
)
{
//清空引客渠道id
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
''
);
}
})
}
}
},
onLoad
(
options
)
{
...
...
@@ -217,7 +240,7 @@ export default {
success
:
res
=>
{
login
.
get_open_id_by_code
({
code
:
res
.
code
}).
then
(
res1
=>
{
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
wx
.
setStorage
Sync
({
key
:
"openid"
,
data
:
res1
.
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