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
d8251aa5
Commit
d8251aa5
authored
Mar 10, 2021
by
程智春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'nativehome_tst' of
http://code.mayi888.com/chengmo/mayi-mp-shop
into nativehome_tst
parents
49fcb96d
bf93f3b0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
src/App.vue
+3
-3
src/pages/index/index.vue
+6
-2
No files found.
src/App.vue
View file @
d8251aa5
...
@@ -11,9 +11,9 @@ export default {
...
@@ -11,9 +11,9 @@ export default {
process
.
env
.
NODE_ENV
==
"production"
||
process
.
env
.
NODE_ENV
==
"production"
||
JSON
.
stringify
(
extConfig
)
==
"{}"
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
)
{
// extConfig = { mixid: "jordan", shopid: 471
};
extConfig
=
{
mixid
:
"antgood"
,
shopid
:
67
};
extConfig
=
{
"mixid"
:
"antgood
"
,
// extConfig = { "mixid":"xyyx
",
"shopid"
:
67
};
// "shopid":133
};
}
}
console
.
log
(
"1444444444"
,
extConfig
);
console
.
log
(
"1444444444"
,
extConfig
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
...
...
src/pages/index/index.vue
View file @
d8251aa5
...
@@ -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