Commit 548132d0 by 程默

ff

parent cfa88f5e
<!--
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>
import Vue from 'vue'
import App from './index'
const app = new Vue(App)
app.$mount()
{
"usingComponents": {
"van-loading": "/static/vant/loading/index"
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment