QYF-GitLab1
17 小时以前 cf7e71c6d0fb64eeb6b5deac540da843b4bb465c
src/layout/components/footerPage.vue
@@ -1,21 +1,21 @@
<template>
  <div class="pageFooter">
    <div class="footerContent contentBox flex">
      <div class="infoBox flex1">
      <div class="infoBox">
        <ul class="linkBox">
          <li class="link" @click="toAboutus(index)" v-for="(item, index) in linkList" :key="index">
          <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="toAboutus(index)" v-for="(item, index) in newList" :key="index">
          <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(index)"
            @click="toAboutus(item)"
            v-for="(item, index) in serviceList"
            :key="index"
          >
@@ -23,37 +23,163 @@
          </li>
        </ul>
        <ul class="linkBox">
          <li class="link" @click="toAboutus(index)">天猫旗舰店</li>
          <li class="link" style="opacity: 1; font-size: 20px" @click="toAboutus(index)">
          <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/wechatCode.png" />
        </div>
        <div class="codeItem">
          <img src="@/assets/images/pageFooter/weiboCode.png" />
          <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"
          >京ICP备 05029104号-4互联网出版许可证 新出网证 (京 )</span
        >
        丨 增值电信业务经营许可证:京B2-20224426</span
      >
      </span>
      <span style="display: block">Copyright©2013 中国协和医科大学出版社有限公司 版权所有!</span>
    </div>
    <teacherCertification :isShow="teacherDialog" @dialog-Change="dialogChange" />
  </div>
</template>
<script setup lang="ts">
import { reactive } from 'vue'
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()
})
const toAboutus = () => {}
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([
  {
@@ -105,7 +231,7 @@
    url: '',
  },
  {
    name: '北京市卫健委',
    name: '北京市卫生健康委',
    url: '',
  },
])
@@ -115,8 +241,11 @@
.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 {
@@ -127,6 +256,8 @@
          cursor: pointer;
          color: #fff;
          margin-top: 20px;
          font-size: 14px;
          opacity: 0.7;
          &::after {
            margin-left: 15px;
@@ -137,7 +268,7 @@
          &:first-child {
            color: #fff;
            opacity: 1;
            font-size: 20px;
            font-size: 16px;
            margin-bottom: 10px;
          }
        }
@@ -159,10 +290,11 @@
      }
    }
    .QRCodeBox {
      margin-left: 240px;
      .codeItem {
        display: inline-block;
        text-align: center;
        margin-left: 40px;
        p {
          font-size: 16px;
        }
@@ -180,8 +312,8 @@
    height: 80px;
    line-height: 40px;
    font-size: 12px;
    border-top: 1px solid #e6e6e6;
    font-size: 14px;
    // border-top: 1px solid #ccc;
    .beian {
      cursor: pointer;
    }