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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/pages/index/index.vue
+6
-2
No files found.
src/pages/index/index.vue
View file @
bf93f3b0
...
@@ -82,13 +82,16 @@ export default {
...
@@ -82,13 +82,16 @@ export default {
this
.
options
=
options
;
this
.
options
=
options
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
let
op
=
wx
.
getStorageSync
(
"openid"
)
if
(
op
)
{
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
this
.
withoutScene
=
true
;
this
.
withoutScene
=
true
;
}
else
{
//获取openId
//获取openId
wx
.
login
({
wx
.
login
({
success
:
res
=>
{
success
:
res
=>
{
this
.
code
=
res
.
code
;
this
.
code
=
res
.
code
;
login
.
miniLogin
({
code
:
this
.
code
}).
then
(
res1
=>
{
login
.
miniLogin
({
code
:
this
.
code
}).
then
(
res1
=>
{
console
.
log
(
res1
,
555555
)
if
(
res1
.
data
.
code
==
200
)
{
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
wx
.
setStorage
({
key
:
"openid"
,
key
:
"openid"
,
...
@@ -96,10 +99,11 @@ export default {
...
@@ -96,10 +99,11 @@ export default {
});
});
}
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
console
.
log
(
this
.
code
,
77777
,
this
.
params
)
this
.
withoutScene
=
true
;
})
})
},
},
})
})
}
// 移除重复参数
// 移除重复参数
if
(
options
.
params
)
{
if
(
options
.
params
)
{
let
params
=
decodeURIComponent
(
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