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
baad3538
Commit
baad3538
authored
Dec 13, 2021
by
李嘉林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取openid
parent
ad9ecfd0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
16 deletions
+24
-16
src/pages/index/index.vue
+24
-16
No files found.
src/pages/index/index.vue
View file @
baad3538
...
@@ -104,7 +104,7 @@ export default {
...
@@ -104,7 +104,7 @@ export default {
this
.
withoutScene
=
true
;
this
.
withoutScene
=
true
;
}
else
{
}
else
{
//获取openId
//获取openId
wx
.
login
({
wx
.
login
({
success
:
res
=>
{
success
:
res
=>
{
this
.
code
=
res
.
code
;
this
.
code
=
res
.
code
;
console
.
log
(
this
.
code
,
'-----------------------------110---code'
)
console
.
log
(
this
.
code
,
'-----------------------------110---code'
)
...
@@ -213,21 +213,29 @@ export default {
...
@@ -213,21 +213,29 @@ export default {
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'storeId'
,
paramsObj
.
storeId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
,
paramsObj
.
sellerId
);
wx
.
setStorageSync
(
this
.
$store
.
state
.
mixid
+
'sellerId'
,
paramsObj
.
sellerId
);
console
.
log
(
res
.
data
.
data
)
console
.
log
(
res
.
data
.
data
)
console
.
log
(
wx
.
getStorageSync
(
"openid"
))
wx
.
login
({
console
.
log
(
333333
)
success
:
res
=>
{
if
(
wx
.
getStorageSync
(
"openid"
))
{
login
.
get_open_id_by_code
({
code
:
res
.
code
}).
then
(
res1
=>
{
indexApi
.
addRecord
(
if
(
res1
.
data
.
code
==
200
)
{
{
wx
.
setStorage
({
attractingCustomersChannelId
:
paramsObj
.
attractingCustomerChannelId
,
key
:
"openid"
,
miniOpenId
:
wx
.
getStorageSync
(
"openid"
),
data
:
res1
.
data
.
data
registerFlag
:
1
,
});
newRegisterFlag
:
0
,
indexApi
.
addRecord
(
}
{
).
then
(
ele
=>
{
attractingCustomersChannelId
:
paramsObj
.
attractingCustomerChannelId
,
//清空引客渠道id
miniOpenId
:
res1
.
data
.
data
,
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
''
);
registerFlag
:
1
,
})
newRegisterFlag
:
0
,
}
}
).
then
(
ele
=>
{
//清空引客渠道id
wx
.
setStorageSync
(
'attractingCustomerChannelId'
,
''
);
})
}
})
},
})
let
params
=
''
;
let
params
=
''
;
for
(
let
i
in
paramsObj
){
for
(
let
i
in
paramsObj
){
params
+=
"&"
+
i
+
'='
+
paramsObj
[
i
]
params
+=
"&"
+
i
+
'='
+
paramsObj
[
i
]
...
...
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