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
25b9edfc
Commit
25b9edfc
authored
Mar 09, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
393d6252
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
20 deletions
+24
-20
src/App.vue
+3
-4
src/pages/home/index.vue
+0
-2
src/pages/index/index.vue
+7
-12
src/pages/login/index.vue
+11
-0
src/utils/mayi.js
+3
-2
No files found.
src/App.vue
View file @
25b9edfc
...
...
@@ -8,12 +8,11 @@ export default {
let
extConfig
=
wx
.
getExtConfigSync
?
wx
.
getExtConfigSync
()
:
{};
console
.
log
(
extConfig
,
"-----------extConfig"
);
if
(
process
.
env
.
NODE_ENV
==
"production"
||
JSON
.
stringify
(
extConfig
)
==
"{}"
)
{
// extConfig = { mixid: "jordan", shopid: 471
};
extConfig
=
{
"mixid"
:
"xyyx"
,
"shopid"
:
133
};
extConfig
=
{
mixid
:
"antgood"
,
shopid
:
67
};
//
extConfig = { "mixid":"xyyx",
//
"shopid":133 };
}
console
.
log
(
"1444444444"
,
extConfig
);
this
.
$store
.
commit
(
"setExtConfig"
,
extConfig
.
mixid
);
...
...
src/pages/home/index.vue
View file @
25b9edfc
...
...
@@ -276,7 +276,6 @@ export default {
setFooterShow
(
el
){
let
afterScrollTop
=
el
.
scrollTop
;
let
delta
=
afterScrollTop
-
this
.
beforeScrollTop
;
let
{
showFlag
}
=
this
.
$mp
.
page
.
getTabBar
().
data
;
if
(
delta
===
0
||
afterScrollTop
<
0
||
...
...
@@ -287,7 +286,6 @@ export default {
this
.
beforeScrollTop
=
afterScrollTop
;
return
;
}
this
.
$mp
.
page
.
getTabBar
().
setData
({
'showFlag'
:
delta
>
0
?
'down'
:
'up'
})
},
scrolltolower
(){
console
.
log
(
"scrolltolower"
)
...
...
src/pages/index/index.vue
View file @
25b9edfc
...
...
@@ -3,7 +3,7 @@
<div
style=
"width:100%;height:90vh;display:flex;justify-content: center;align-items: center;"
>
<van-loading
size=
"40px"
type=
"spinner"
></van-loading>
</div>
<web-view
v-if=
"withoutScene"
:src=
"
'https://test-m-shop.mayi888.cn/?mixid=antgood'
"
@
message=
"getMessage"
@
error=
"handleError"
@
load=
"handleLoad"
></web-view>
<web-view
v-if=
"withoutScene"
:src=
"
pageUrl
"
@
message=
"getMessage"
@
error=
"handleError"
@
load=
"handleLoad"
></web-view>
</div>
</
template
>
...
...
@@ -25,13 +25,11 @@ export default {
page
:
"/"
,
location_obj
:
encodeURIComponent
(
wx
.
getStorageSync
(
"location"
)),
params
:
"?mixid="
+
this
.
shopId
+
`&native_test=1&location_obj=
${
this
.
location_obj
}
`
,
userInfo
:
{
nickName
:
"mpvue"
,
avatarUrl
:
"http://mpvue.com/assets/logo.png"
},
shareUrl
:
""
,
//分享
shopConfig
:
null
,
spokesmanGroupId
:
""
,
// 代言人的集团id
...
...
@@ -82,13 +80,16 @@ export default {
this
.
options
=
options
;
Object
.
assign
(
this
.
$data
,
this
.
$options
.
data
());
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
=>
{
console
.
log
(
res1
,
555555
)
if
(
res1
.
data
.
code
==
200
)
{
wx
.
setStorage
({
key
:
"openid"
,
...
...
@@ -96,10 +97,11 @@ export default {
});
}
this
.
params
+=
'&open_id='
+
wx
.
getStorageSync
(
"openid"
);
console
.
log
(
this
.
code
,
77777
,
this
.
params
)
this
.
withoutScene
=
true
;
})
},
})
}
// 移除重复参数
if
(
options
.
params
)
{
let
params
=
decodeURIComponent
(
options
.
params
)
...
...
@@ -324,13 +326,6 @@ export default {
if
(
ss
&&
!
this
.
params
.
includes
(
"sessionid"
))
{
this
.
params
+=
`&sessionid=
${
ss
}
`
}
console
.
log
(
this
.
getTabBar
,
'312'
)
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
this
.
index
})
}
},
methods
:
{
init
()
{
...
...
src/pages/login/index.vue
View file @
25b9edfc
...
...
@@ -316,6 +316,17 @@ export default {
delta
:
1
});
}
else
{
wx
.
reLaunch
({
url
:
`../index/main?from=login&backpath=
${
this
.
backPath
}
¶ms=
${
encodeURIComponent
(
this
.
backParams
)}
`
});
return
let
parseLink
=
decodeURIComponent
(
this
.
backPath
);
let
isTabbarIndex
=
checkTabbarPage
(
parseLink
)
console
.
log
(
'32111'
,
isTabbarIndex
,
parseLink
,
this
.
backParams
)
...
...
src/utils/mayi.js
View file @
25b9edfc
...
...
@@ -42,13 +42,14 @@ export function $themeToLink(data, option) {
//判断是否市跳转到tabbar页面 替换首页位置
let
isTabbarIndex
=
checkTabbarPage
(
parseLink
);
// console.log('
44',isTabbarIndex)
console
.
log
(
'4444
44'
,
isTabbarIndex
)
if
(
isTabbarIndex
>=
0
)
{
// isTabbarIndex = isTabbarIndex == 0 ? checkTabbarPage('/') : isTabbarIndex
// wx.switchTab({
// url: parseLink == '/' ? '/pages/home/main' : `/pages/tabBar${isTabbarIndex}/main`,
// })
wx
.
redirectTo
({
console
.
log
(
parseLink
,
'parseLink'
)
wx
.
reLaunch
({
url
:
`../index/main?from=home&backpath=
${
encodeURIComponent
(
parseLink
)}
`
})
return
...
...
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