From ee213bf458d3961a0560ce3b68a3ad38322ece97 Mon Sep 17 00:00:00 2001 From: 杨磊 <505174330@qq.com> Date: 星期一, 25 八月 2025 01:15:06 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/xiehe_website --- src/layout/components/footerPage.vue | 329 +++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 319 insertions(+), 10 deletions(-) diff --git a/src/layout/components/footerPage.vue b/src/layout/components/footerPage.vue index 15aaa44..3e2ebf4 100644 --- a/src/layout/components/footerPage.vue +++ b/src/layout/components/footerPage.vue @@ -1,16 +1,325 @@ <template> - <div class="footerBox">FOOT</div> + <div class="pageFooter"> + <div class="footerContent contentBox flex"> + <div class="infoBox"> + <ul class="linkBox"> + <li class="link" @click="innerLink(item)" v-for="(item, index) in linkList" :key="index"> + {{ item.name }} + </li> + </ul> + <ul class="linkBox"> + <li class="link" @click="innerLink(item)" v-for="(item, index) in newList" :key="index"> + {{ item.name }} + </li> + </ul> + <ul class="linkBox"> + <li + class="link" + @click="toAboutus(item)" + v-for="(item, index) in serviceList" + :key="index" + > + {{ item.name }} + </li> + </ul> + <ul class="linkBox"> + <li class="link" @click="toAboutus({ name: '澶╃尗鏃楄埌搴�' })">澶╃尗鏃楄埌搴�</li> + <li + class="link" + style="opacity: 1; font-size: 16px" + @click="toAboutus({ name: '浜笢鏃楄埌搴�' })" + > + 浜笢鏃楄埌搴� + </li> + </ul> + </div> + <div class="QRCodeBox"> + <div style="font-size: 16px; color: #fff">濯掍綋鐭╅樀</div> + <div class="codeItem"> + <img src="@/assets/images/pageFooter/xieheCode.png" /> + </div> + </div> + </div> + <el-divider + style="border-color: rgba(255, 255, 255, 0.25); width: 1369px; margin: auto" + ></el-divider> + <div class="copyrightBox"> + <span + >涓浗鍗忓拰鍖荤澶у鍑虹増绀炬湁闄愬叕鍙� 涓� 澶囨搴忓彿锛�<span class="beian" @click="toLink" + >浜琁CP澶� 05029104鍙�-4浜掕仈缃戝嚭鐗堣鍙瘉 鏂板嚭缃戣瘉 锛堜含 锛�</span + > + </span> + <span style="display: block">Copyright漏2013 涓浗鍗忓拰鍖荤澶у鍑虹増绀炬湁闄愬叕鍙� 鐗堟潈鎵�鏈�!</span> + </div> + <teacherCertification :isShow="teacherDialog" @dialog-Change="dialogChange" /> + </div> </template> -<script setup lang="ts"></script> +<script setup lang="ts"> +import { inject, onMounted, reactive, ref } from 'vue' +import teacherCertification from '@/views/personalCenter/teacherCertification.vue' +const MG = inject('MG') +const config = inject('config') +import { useRouter, useRoute } from 'vue-router' +const router = useRouter() +import { ElMessage } from 'element-plus' +const logIn = inject('logIn') +const toLinkList = reactive([]) +const thirdPartyLink = reactive([]) +let teacherDialog = ref(false) +onMounted(() => { + getBanner() + getLinkList() +}) -<style scoped> -.footerBox { - width: 100%; - height: 240px; - min-width: 1200px; - color: #fff; - background-color: #f0f0f0; - text-align: center; +const dialogChange = (val) => { + getTeacherInfo() + if (val == false) { + teacherDialog.value = false + } else { + teacherDialog.value = true + } +} + +//鏁欏笀淇℃伅 +function getTeacherInfo() { + const data = { + start: 0, + size: 10, + topicIdOrRefCode: 'teacherRoleApproval', + appRefCode: config.appRefCode, + sort: { + type: 'Desc', + field: 'CreateDate', + }, + } + MG.ugc.getTopicMessageList(data).then((res) => { + try { + const resData = res.datas.find((i) => i.appUserCreator.userId == userId.value) + if (resData) { + teacherState.value = resData.state + if (resData.feedBack != null) { + reasonTxt.value = JSON.parse(resData.feedBack).reason + } + } else { + teacherState.value = '' + } + loading.value = false + } catch (error) { + loading.value = false + } + }) +} + +const getBanner = () => { + MG.resource + .getItem({ + path: 'friendshipLink', + fields: { link: [] }, + paging: { start: 0, size: 99 }, + }) + .then((res) => { + console.log(res, 'link') + toLinkList.push(...res.datas) + }) +} +const getLinkList = () => { + MG.resource + .getItem({ + path: 'purchaseMethod', + fields: { link: [] }, + paging: { start: 0, size: 99 }, + }) + .then((res) => { + toLinkList.push(...res.datas) + console.log(toLinkList, 'toLinkList') + }) +} + +const innerLink = (item) => { + console.log(item, 'item') + switch (item.name) { + case '鍏充簬鎴戜滑': + router.push('/aboutUs') + break + case '鑱旂郴鎴戜滑': + router.push('/aboutUs') + break + case '鎰忚鍙嶉': + ElMessage({ + message: '寤鸿涓�...', + type: 'warning', + }) + break + case '鎿嶄綔鎸囧崡': + ElMessage({ + message: '寤鸿涓�...', + type: 'warning', + }) + break + case '鏁欏笀璁よ瘉': + console.log(localStorage.getItem(config.tokenKey)) + + if (localStorage.getItem(config.tokenKey)) { + teacherDialog.value = true + } else { + logIn() + } + break + default: + break + } +} + +const toAboutus = (item) => { + console.log(item.name, 'item') + const currentLink = toLinkList.find((i) => i.name === item.name) + console.log(currentLink, 'currentLink') + console.log(toLinkList, 'toLinkList') + if (currentLink) { + window.open(currentLink.link) + } +} + +const linkList = reactive([ + { + name: '鍏充簬鎴戜滑', + url: '', + }, + { + name: '鍏充簬鎴戜滑', + url: '', + }, + { + name: '鑱旂郴鎴戜滑', + url: '', + }, + { + name: '鎰忚鍙嶉', + url: '', + }, +]) +const newList = reactive([ + { + name: '鏂版墜涓婅矾', + url: '', + }, + { + name: '鎿嶄綔鎸囧崡', + url: '', + }, + { + name: '鏁欏笀璁よ瘉', + url: '', + }, +]) +const serviceList = reactive([ + { + name: '鍙嬫儏閾炬帴', + url: '', + }, + { + name: '鍥藉绉戝鎶�鏈儴', + url: '', + }, + { + name: '鍥藉鍗敓鍋ュ悍濮�', + url: '', + }, + { + name: '鍥藉鏁欒偛閮�', + url: '', + }, + { + name: '鍖椾含甯傚崼鐢熷仴搴峰', + url: '', + }, +]) +</script> + +<style lang="less" scoped> +.pageFooter { + background: #444444; + background-image: url('@/assets/images/xiehe/home/footer-bg.png'); + background-repeat: no-repeat; + background-size: 100% 100%; + .footerContent { + padding: 30px 0; + justify-content: start; + .infoBox { + display: flex; + .linkBox { + font-size: 16px; + margin-left: 50px; + .link { + padding-right: 15px; + cursor: pointer; + color: #fff; + margin-top: 20px; + font-size: 14px; + + opacity: 0.7; + &::after { + margin-left: 15px; + } + &:last-child::after { + display: none; + } + &:first-child { + color: #fff; + opacity: 1; + font-size: 16px; + margin-bottom: 10px; + } + } + } + .address { + margin-top: 30px; + font-size: 14px; + color: #ccc; + span { + margin-right: 30px; + } + } + .logo { + height: 50px; + margin-top: 30px; + img { + height: 100%; + } + } + } + .QRCodeBox { + margin-left: 240px; + + .codeItem { + display: inline-block; + text-align: center; + p { + font-size: 16px; + } + img { + width: 100px; + height: 100px; + margin-top: 20px; + } + } + } + } + .copyrightBox { + text-align: center; + color: #fff; + + height: 80px; + line-height: 40px; + font-size: 14px; + // border-top: 1px solid #ccc; + .beian { + cursor: pointer; + } + .beian:hover { + color: blue; + } + } } </style> -- Gitblit v1.9.1