Compare commits
2 Commits
34d87f99b9
...
aeabc3efb7
| Author | SHA1 | Date |
|---|---|---|
|
|
aeabc3efb7 | |
|
|
f3eaa34635 |
17
src/App.vue
17
src/App.vue
|
|
@ -1,5 +1,20 @@
|
|||
<script setup>
|
||||
import { RouterView } from 'vue-router'
|
||||
import { RouterView } from 'vue-router';
|
||||
import { onBeforeMount, onMounted } from 'vue';
|
||||
import http from '@/io/http';
|
||||
import { showToast } from 'vant';
|
||||
import { useWebsite } from '@/stores/website';
|
||||
|
||||
const website = useWebsite();
|
||||
|
||||
onBeforeMount(() => {
|
||||
http('/api/web/setting', {}, 'get').then(res => {
|
||||
document.title = res.data.web_title;
|
||||
website.updateInfo(res.data);
|
||||
}).catch(err => {
|
||||
showToast(err.message);
|
||||
});
|
||||
});
|
||||
|
||||
</script>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,20 +1,24 @@
|
|||
<template>
|
||||
<div class="footer">
|
||||
<div class="logo">海兔LOGO</div>
|
||||
<div class="info">
|
||||
<p>集团介绍 广州市xx有限公司,总部设在广州市番禺区,经过10多年的发展与改革,构成以房地产、矿业开发、国际贸易、装备制造、物流</p>
|
||||
<div class="logo">
|
||||
<img :src="website.info.web_footer_logo" :alt="website.info.web_title">
|
||||
</div>
|
||||
<div class="qrcode"><img src="" alt=""></div>
|
||||
<div class="info">
|
||||
<p>{{ website.info.web_footer_description }}</p>
|
||||
</div>
|
||||
<div class="qrcode"><img :src="website.info.contact_qrcode" :alt="website.info.web_title"></div>
|
||||
<div class="contactInfo">
|
||||
<p>联系电话:600-8374623</p>
|
||||
<p>邮箱:23423423@qq.com</p>
|
||||
<p>联系地址:重庆市沙坪坝区三峡广场130号</p>
|
||||
<p>联系电话:{{ website.info.contact_phone }}</p>
|
||||
<p>邮箱:{{ website.info.contact_email }}</p>
|
||||
<p>联系地址:{{ website.info.contact_address }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useWebsite } from '@/stores/website';
|
||||
|
||||
const website = useWebsite();
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
|
@ -29,7 +33,18 @@
|
|||
text-align: center;
|
||||
font-size: 22px;
|
||||
.logo{
|
||||
width: 400px;
|
||||
height: 112px;
|
||||
box-sizing: content-box;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
img{
|
||||
object-fit: contain;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
.info{
|
||||
font-size: 22px;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
<template>
|
||||
<div class="header">
|
||||
<div class="logo">logo</div>
|
||||
<div class="logo">
|
||||
<img :src="website.info.web_logo" :alt="website.info.web_title">
|
||||
</div>
|
||||
<div class="title">{{$route.meta.title}}</div>
|
||||
<div class="nav">
|
||||
<div class="navBtn" @click.stop="toggleMenu"><van-icon name="wap-nav" size="0.6rem" /></div>
|
||||
|
|
@ -52,8 +54,9 @@ import { useRouter, useRoute } from 'vue-router';
|
|||
import { showToast } from 'vant';
|
||||
import Auth from '@/components/auth/index.vue';
|
||||
import { useAuthModal } from '@/stores/authModal';
|
||||
import { useWebsite } from '@/stores/website';
|
||||
|
||||
|
||||
const website = useWebsite();
|
||||
const userInfo = useUserInfo();
|
||||
const router = useRouter();
|
||||
const route = useRoute();
|
||||
|
|
@ -155,9 +158,15 @@ const jump = (url)=>{
|
|||
z-index: 9;
|
||||
.logo{
|
||||
width: 230px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
align-items: center;
|
||||
img{
|
||||
object-fit: contain;
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
}
|
||||
}
|
||||
.title{
|
||||
width: 230px;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,11 @@
|
|||
import { ref, computed } from "vue";
|
||||
import { defineStore } from "pinia";
|
||||
|
||||
export const useWebsite = defineStore("website", () => {
|
||||
const info = ref({});
|
||||
function updateInfo(data) {
|
||||
info.value = data;
|
||||
}
|
||||
|
||||
return { info, updateInfo };
|
||||
});
|
||||
Loading…
Reference in New Issue