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
548132d0
Commit
548132d0
authored
Mar 01, 2021
by
程默
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ff
parent
cfa88f5e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
83 additions
and
0 deletions
+83
-0
src/pages/tabBar4/index.vue
+72
-0
src/pages/tabBar4/main.js
+5
-0
src/pages/tabBar4/main.json
+6
-0
No files found.
src/pages/tabBar4/index.vue
0 → 100644
View file @
548132d0
<!--
tabbar
-->
<
template
>
<div>
<web-view
:src=
"pageUrl"
@
error=
"handleError"
></web-view>
<div
style=
"width:100%;height:90vh;display:flex;justify-content: center;align-items: center;"
>
<van-loading
size=
"40px"
type=
"spinner"
></van-loading>
</div>
</div>
</
template
>
<
script
>
import
{
getUrlofLink
,
setTabBarActive
,
checkTabbarPage
,
}
from
"../../utils/mayi.js"
;
export
default
{
data
()
{
return
{
link
:
process
.
env
.
BASE_URL
,
page
:
"/"
,
params
:
"?mixid="
+
this
.
$store
.
state
.
mixid
+
"&tabbar=4&native=1"
,
index
:
4
,
ss
:
""
,
};
},
computed
:
{
pageUrl
()
{
return
this
.
link
+
this
.
page
+
this
.
params
+
this
.
ss
;
},
},
onLoad
(
options
)
{
let
ss
=
wx
.
getStorageSync
(
"sessionid"
);
this
.
ss
=
ss
?
`&sessionid=
${
ss
}
`
:
""
;
// tabbar 跳转
let
homeIndex
=
checkTabbarPage
(
"/"
);
homeIndex
!=
0
&&
homeIndex
==
this
.
index
&&
(
this
.
index
=
0
);
if
(
this
.
mpApp
.
globalData
.
footerVal
.
componentData
.
list
[
this
.
index
].
link
)
{
let
p
=
getUrlofLink
(
this
.
mpApp
.
globalData
.
footerVal
.
componentData
.
list
[
this
.
index
].
link
);
let
pl
=
p
.
split
(
'?'
)
if
(
pl
[
1
])
{
this
.
page
=
pl
[
0
]
this
.
params
+=
'&'
+
pl
[
1
]
}
else
{
this
.
page
=
p
}
this
.
mpApp
.
globalData
.
tabBarPageLink
=
""
;
}
},
onShow
()
{
let
ss
=
wx
.
getStorageSync
(
"sessionid"
);
if
(
!
this
.
ss
&&
ss
)
{
this
.
ss
=
`&sessionid=
${
ss
}
`
;
}
setTabBarActive
.
bind
(
this
)(
this
.
index
);
},
methods
:
{
handleError
(
data
)
{
wx
.
showLoading
({
title
:
"网页加载失败 请右上角刷新"
,
});
},
},
};
</
script
>
<
style
lang=
"scss"
scoped
></
style
>
src/pages/tabBar4/main.js
0 → 100644
View file @
548132d0
import
Vue
from
'vue'
import
App
from
'./index'
const
app
=
new
Vue
(
App
)
app
.
$mount
()
src/pages/tabBar4/main.json
0 → 100644
View file @
548132d0
{
"usingComponents"
:
{
"van-loading"
:
"/static/vant/loading/index"
}
}
\ No newline at end of file
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