文件

144 行
5.4 KiB
HTML
可执行文件

<script type="text/javascript" src="__PUBLIC__/vue/js/vue2.5.16.js"></script>
<!--[1.6.64]-->
<script src="__PUBLIC__/jquery/js/jquery-3.2.1.min.js"></script>
<style>
.header {
box-shadow: 0px 1px 10px rgba(0, 0, 0, 0.2);
}
ul {
margin: 0;
}
a {
color: #000;
text-decoration: none;
}
</style>
<script type="text/javascript">
// 头部
Vue.component('template-header', {
template: `<header class="header">
<div class="header-wrap clear-float">
<div class="header-logo">
<img :src="headerObj.logo" alt="logo">
</div>
<ul class="header-nav">
<li class="header-li" v-for="(nav,index) in headerObj.navs">
<!--<a :href="nav.href" :class="{'activeLi':nav.id==item}">{{nav.headerText}}</a>-->
<a :href="nav.href" :class="{'activeLi':nav.id==item}">{{nav.headerText}}</a>
</li>
</ul>
<div class="header-btn">
<a :href="headerObj.login" style="text-align: center;" target="_blank" v-if="headerObj.login" class="login-btn" >登录</a>
</div>
</div>
</header>`,
props: {
'header': {
type: Object,
},
},
data: function () {
return {
item: '{$Think.CONTROLLER_NAME}',
headerObj: this.header
}
},
created: function () {
console.log(this.item)
console.log(this.headerObj)
},
})
// 底部
Vue.component('template-footer', {
template: `<footer class='footer'>
<p>
<template v-if="footer.record_no">
<a target="_blank" style="color: #A5AAAB;padding-right: 10px;font-size: 14px" href="http://beian.miit.gov.cn">{{footer.record_no}}</a>
</template>
<span style="margin-left: 10px" v-if="footer.police_record_address&&footer.police_record_no">
<img style="width: 16px;margin-top: 1px;display: inline-block;vertical-align: top;" src="/Public/login/images/copy-right-icon.png" alt="">
<a target="_blank" style="color: #A5AAAB;padding-right: 10px;font-size: 14px" :href="'http://www.beian.gov.cn/portal/registerSystemInfo?recordcode='+footer.police_record_no">{{footer.police_record_address}}{{footer.police_record_no}}号</a>
</span>
<span v-html="footer.recordNumber"></span>
<span>版权所有:{{footer.copyright}}</span>
<!--<a :href="adminlogo" style="text-align: center;padding:10px;margin-left: 10px;" target="_blank" class="login-btn">管理员登录</a>-->
</p>
</footer>`,
props: {
'footer': {
type: Object,
},
'adminlogo': {
type: String,
},
},
methods: {
}
})
var data = {
logo: "{$webinfo['logo']['weblogo']}",
nav: [
{
id: 'Index',
headerText: "首页",
href: '{:U("Main/Index/index")}'
}, {
id: 'Product',
headerText: "产品中心",
href: '{:U("Main/Product/index")}'
}, {
id: 'About',
headerText: "关于我们",
href: '{:U("Main/About/index")}'
}, {
id: 'News',
headerText: "新闻动态",
href: '{:U("Main/News/index")}'
}, {
id: 'Contact',
headerText: "联系我们",
href: "{:U('Main/Contact/index')}",
},
],
login: "{:U('Retail/login/index')}",
recordNumber: `{$aboutusinfofooter['footone']}`,
url: "{$aboutusinfofooter['url']}",
copyright: "{$aboutusinfofooter['companyname']}",
record_no: "{$aboutusinfofooter['record_no']}",
police_record_address: "{$aboutusinfofooter['police_record_address']}",
police_record_no: "{$aboutusinfofooter['police_record_no']}",
qq: 123654,
wx: '__PUBLIC__/webinfo/Templateone/images/rwm.png',
deputy: "人民",
phone: '19900009999',
}
new Vue({
el: "#Template",
data: {
page: 0,
header: {
logo: data.logo,
navs: data.nav,
login: data.login,
},
footer: {
recordNumber: data.recordNumber,
copyright: data.copyright,
record_no: data.record_no,
police_record_address: data.police_record_address,
police_record_no: data.police_record_no,
},
adminlogo: "{:U('Retail/login/index')}",
sidebar: {
qq: "{$aboutusinfofooter['qq']}",
deputy: "{$aboutusinfofooter['name']}",
wx: "{$aboutusinfofooter['wxurl']}",
phone: "{$aboutusinfofooter['tell']}",
}
}
})
</script>