Commit 0ca7451b authored by 赵啸非's avatar 赵啸非

修改配置文件

parent 966a179c
......@@ -8,20 +8,20 @@
<div class="header-item">
<i style="color:#7c6aa6" class="contact-icon am-icon-phone"></i>
<div class="item">
<strong>15284734573</strong>
<strong>{{ companyInfo.name }}</strong>
<span>周一 ~ 周五, 8:30 - 17:30</span>
</div>
</div>
<div class="header-item">
<i style="color:#7c6aa6" class="contact-icon am-icon-map-marker"></i>
<div class="item">
<strong>四川省成都市高新区</strong>
<span>四川XXXX有限公司</span>
<strong>{{companyInfo.address}}</strong>
<span>{{companyInfo.name}}</span>
</div>
</div>
</div>
<div class="header-right">
<a href="tel:+18583266628" class="">
<a :href="'tel:'+companyInfo.phone" class="">
<button type="button" >联系我们</button>
</a>
</div>
......@@ -48,11 +48,27 @@ export default {
components: {},
data(){
return{
companyInfo: {},
AppFunctions,
}
},
methods: {
getCompanyInfo() {
//获取公司信息,默认第一个
this.$post("/company/interlist", {})
.then((res) => {
if (res.code == 1) {
console.log(res)
if (res.data.data.length > 0) {
this.companyInfo = res.data.data[0]
}
}
})
.catch((error) => {
this.$message.error(error.message);
});
},
toggleStickyHeader() {
const scrolled = document.documentElement.scrollTop;
if (scrolled > 100) {
......@@ -66,6 +82,7 @@ export default {
window.addEventListener('scroll', this.toggleStickyHeader);
},
mounted() {
this.getCompanyInfo()
this.toggleStickyHeader();
},
beforeDestroy() {
......
......@@ -19,6 +19,7 @@ Router.prototype.push = function push(location, onResolve, onReject) {
const router = new Router({
routes: [
//不需要鉴权的页面
builder("/", "portal/IndexView"),
builder("/index", "portal/IndexView"),
builder("/product", "portal/ProductView"),
builder("/product/productId/:productId", "portal/ProductDetailsView"),
......
......@@ -130,15 +130,15 @@ export default {
let date = new Date(Number(time));
let Y = date.getFullYear() + '-';
let M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
let D = panLeft(date.getDate()) + ' ';
let h = panLeft(date.getHours()) + ':';
let m = panLeft(date.getMinutes()) + ':';
let s = panLeft(date.getSeconds());
let D = this.panLeft(date.getDate()) + ' ';
let h = this.panLeft(date.getHours()) + ':';
let m = this.panLeft(date.getMinutes()) + ':';
let s = this.panLeft(date.getSeconds());
return Y + M + D + h + m + s;
},
panLeft(num) {
return num < 10 ? '0' + num : num;
}
return num < 10 ? '0' + num : num;
}
}
}
</script>
......
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