<template>
|
<v-page >
|
<template v-for="item in navList">
|
<component
|
v-if="cashViews.includes(item.tel)"
|
v-show="tab == item.tel"
|
:is="item.tel"
|
:key="item.tel"
|
:isShow="tab == item.tel && tabShow"
|
:tabs="tab"
|
class="layout-main"
|
></component>
|
</template>
|
<view class="footer d-flex p-y-xs bg-tab-nav flex-wrap fn-center" >
|
<view
|
class="item line-height-1 flex-fill"
|
:class="{ 'router-link-active': tab == item.tel }"
|
v-for="item in navList"
|
:key="item.tel"
|
v-if="item.tel != 'exchange-operation' && item.tel != 'option-list'"
|
@click="tabChange1(item.tel)"
|
>
|
<view class="icon">
|
<img
|
class="h-22"
|
v-if="tab == item.tel"
|
:src="item.activeIcon"
|
alt=""
|
/>
|
<img class="h-22" v-else :src="item.icon" alt="" />
|
</view>
|
<view class="fn-12" style="margin-top: 4px">{{ item.label }}</view>
|
</view>
|
<!-- #ifdef APP-PLUS -->
|
<view class="w-max" style="height:20px"></view>
|
<!-- #endif -->
|
</view>
|
|
<!-- <view class="mode d-flex flex-wrap" v-if="is_show">
|
<view class="w-600 p-50 box-border" style=" display: flex
|
;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
width: 80%;
|
color: #000;
|
margin: auto;
|
background: #fff;
|
border-radius: 20px;
|
padding-top: 20px;
|
}">
|
<view class="font-700 text-center font-36 textColor">
|
提示
|
</view>
|
<view class="flex justify-center " >
|
</view>
|
<view class="py-36 textColor" style=" display: flex
|
;
|
flex-direction: column;
|
justify-content: center;
|
align-items: center;
|
width: 100%;
|
color: rgb(0, 0, 0); text-align: center;">此项目均为吉星科技出品认准技术✈️号:
|
<view >商务2:@jixingkj05</view>
|
<view >商务3: @xuyuankeji02</view>
|
<view>非我司认准均为骗子,禁止盗用我司演示,谨防受骗上当!</view>
|
</view>
|
|
<van-button
|
color="#1D91FF"
|
class="w-full h-80 rounded-full"
|
type="info"
|
style="margin-top: 20px;"
|
@click="closeclick"
|
>
|
{{ $t("我知道了") }}
|
</van-button>
|
</view>
|
</view> -->
|
<view class="mode d-flex flex-wrap" v-if="mode">
|
<img class="w-max m-x-xl" src='static/img/right.png'/>
|
<text class="p-x-50">微信客户端请点击右上角【...】选择在浏览器打开</text>
|
</view>
|
</v-page>
|
</template>
|
|
<script>
|
import Home from "./home";
|
import ExchangeOperation from "./exchange-operation";
|
import SymbolList from "./symbol-list";
|
import Mine from "./mine";
|
import OptionList from "./option-list";
|
import Mining from "./mining";
|
import Lists from "./list";
|
import Contract from "./contract";
|
import { mapState, mapActions } from "vuex";
|
export default {
|
name: "Base",
|
components: {
|
Home,
|
SymbolList,
|
ExchangeOperation,
|
OptionList,
|
Mine,
|
Contract,
|
Mining,
|
Lists
|
},
|
computed: {
|
bgstyle() {
|
return {
|
backgroundImage: 'url("/static/img/shouyebg.png")',
|
backgroundSize: '100% 35%',
|
backgroundRepeat: 'no-repeat',
|
backgroundColor:'#f72e1c',
|
|
}
|
},
|
navList() {
|
return [
|
{
|
label: this.$t("base.d0"),
|
tel: "home",
|
icon: "static/img/icon/home_0.png",
|
activeIcon: "static/img/icon/home_1.png",
|
},
|
{
|
label: this.$t("common.c28"),
|
tel: "SymbolList",
|
icon: "static/img/icon/fx_0.png",
|
activeIcon: "static/img/icon/fx_1.png",
|
},
|
{
|
label: this.$t("exchange.a0"),
|
tel: "exchange-operation",
|
icon: "static/img/base_link_0.png",
|
activeIcon: "static/img/base_link_1.png",
|
},
|
{
|
label: this.$t("base.a4"),
|
tel: "option-list",
|
icon: "static/img/base_qukuai_0.png",
|
activeIcon: "static/img/base_qukuai_1.png",
|
},
|
{
|
label: this.$t("exchange.a2"),
|
tel: "contract",
|
icon: "static/img/icon/caidan_0.png",
|
activeIcon: "static/img/icon/caidan_1.png",
|
},
|
|
// {
|
// label: this.$t("common.c6"),
|
// tel: "mining",
|
// icon: "static/img/base_assets_0.png",
|
// activeIcon: "static/img/base_assets_1.png",
|
// },
|
{
|
label: this.$t("base.d2"),
|
tel: "mine",
|
icon: "static/img/icon/assets_0.png",
|
activeIcon: "static/img/icon/assets_1.png",
|
},
|
];
|
},
|
},
|
data() {
|
return {
|
is_show:true,
|
cashViews: [],
|
tab: "",
|
tabShow: true,
|
mode:false,
|
bg:'background-image: url("/static/img/shouyebg.png")'
|
};
|
},
|
methods: {
|
...mapActions({
|
setTheme: "setTheme",
|
}),
|
closeclick(){
|
this.is_show = false
|
},
|
tabChange(name) {
|
// location.href='#/pages/base/index?tel='+name
|
this.tab = name;
|
if (!this.cashViews.includes(name)) {
|
this.cashViews.push(name);
|
}
|
},
|
tabChange1(name) {
|
uni.redirectTo({
|
url:'/pages/base/index?tel='+name
|
})
|
|
},
|
// #ifdef H5
|
isWeiXinLogin() {
|
var ua = window.navigator.userAgent.toLowerCase();
|
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
|
this.mode=true
|
} else {
|
return false // 普通浏览器中打开
|
}
|
}
|
// #endif
|
},
|
onShow() {
|
this.tabShow = true;
|
// #ifdef H5
|
this.isWeiXinLogin()
|
// #endif
|
// uni.showModal({
|
// title: "提示",
|
// content: "源码联系飞机@jacksdo",
|
// confirmText: "确定",
|
// confirmColor: "#667799",
|
// cancelText: "取消",
|
// cancelColor: "#000000",
|
// success(res) {
|
// if (res.confirm) {
|
// window.location.href = uni.getStorageSync('kf')
|
// } else {
|
// console.log('取消')
|
// }
|
// }
|
// })
|
|
},
|
onLoad(query) {
|
if (query.tel) {
|
this.tabChange(query.tel);
|
} else {
|
this.tabChange("home");
|
}
|
this.setTheme("light");
|
},
|
mounted() {},
|
onHide() {
|
this.tabShow = false;
|
},
|
};
|
</script>
|
<style lang="scss" scoped>
|
.footer {
|
box-shadow: $tab-nav-shadow;
|
position: relative;
|
z-index:5;
|
}
|
.router-link-active {
|
color: #333;
|
}
|
.mode{
|
position: fixed;
|
z-index: 1000000;
|
top: 0;
|
left: 0;
|
right: 0;
|
bottom: 0;
|
width: 100%;
|
height: 100%;
|
color: white;
|
background: rgba(0,0,0,0.5);
|
font-size: 16px;
|
box-sizing: border-box;
|
img{
|
width: 95%;
|
height: auto;
|
box-sizing: border-box;
|
}
|
}
|
.p-x-50{
|
padding: 0 50px;
|
}
|
</style>
|