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
bf93f3b0
Commit
bf93f3b0
authored
Mar 10, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix index重复渲染
parent
5ae6f5b5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
18 deletions
+22
-18
src/pages/index/index.vue
+22
-18
No files found.
src/pages/index/index.vue
View file @
bf93f3b0
...
...
@@ -82,24 +82,28 @@ export default {
this
.
options
=
options
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
this
.
withoutScene
=
true
;
//获取openId
wx
.
login
({
success
:
res
=>
{
this
.
code
=
res
.
code
;
login
.
miniLogin
({
code
:
this
.
code
}).
then
(
res1
=>
{
console
.
log
(
res1
,
555555
)
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
key
:
"openid"
,
data
:
res1
.
data
.
data
.
openid
});
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
console
.
log
(
this
.
code
,
77777
,
this
.
params
)
})
},
})
let
op
=
wx
.
getStorageSync
(
"openid"
)
if
(
op
)
{
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
this
.
withoutScene
=
true
;
}
else
{
//获取openId
wx
.
login
({
success
:
res
=>
{
this
.
code
=
res
.
code
;
login
.
miniLogin
({
code
:
this
.
code
}).
then
(
res1
=>
{
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
key
:
"openid"
,
data
:
res1
.
data
.
data
.
openid
});
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
this
.
withoutScene
=
true
;
})
},
})
}
// 移除重复参数
if
(
options
.
params
)
{
let
params
=
decodeURIComponent
(
options
.
params
)
...
...
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