Compare commits

...

2 Commits

Author SHA1 Message Date
fuxiaochun aeabc3efb7 Merge branch 'master' of https://gitea.hmily.club/haitu/aigc-h5 2023-08-18 16:35:37 +08:00
fuxiaochun f3eaa34635 网站信息 2023-08-18 16:35:33 +08:00
4 changed files with 60 additions and 10 deletions

View File

@ -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>

View File

@ -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;

View File

@ -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;

View File

@ -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 };
});