Browse Source

Merge branch 'master' of ssh://101.201.226.163:50022/binbin0314/datang-ui

master
song 3 years ago
parent
commit
1b4a9c5d83
  1. 38
      src/components/Footer/Footer.vue
  2. 3
      src/config/api.js

38
src/components/Footer/Footer.vue

@ -1,6 +1,12 @@
<template>
<div class="footer-box" :class="isTrue ? 'white' : 'blue'" style="position:relative">
<div v-if="!isTrue" class="other-link"></div>
<div v-if="!isTrue" class="other-link d-flex ">
<div class="link-title content-1180 d-flex justify-space-between align-center">
<div v-for="(item, index) in otherLink.content" :key="index" @click="openPage(item.url)">
{{ item.content }}
</div>
</div>
</div>
<div class="content-1180">
<div class="d-flex" style="margin-top:20px" :class="isTrue ? '' : 'justify-center'">
<div class="footer-title">
@ -47,11 +53,14 @@
</div>
</template>
<script>
import { getLink } from 'config/api';
export default {
data() {
return {
isTrue: true,
str: '',
otherLink: {},
};
},
watch: {
@ -63,10 +72,35 @@ export default {
}
},
},
methods: {},
created() {
this.getData();
},
methods: {
async getData() {
try {
const res = await getLink();
console.log(res.data.data);
const { code, msg, data } = res.data;
if (code === 200) {
const obj = {
code: data.code,
content: JSON.parse(data.value),
};
this.otherLink = obj;
}
} catch (error) {}
},
openPage(url) {
window.open(url);
},
},
};
</script>
<style scoped>
.link-title {
font-size: 20px;
cursor: pointer;
}
.other-link {
height: 80px;
width: 100%;

3
src/config/api.js

@ -28,3 +28,6 @@ export const getCondition = params => axios.get(`${content}/condition?showPage=$
// 查询飘窗内容
export const getBay = params => axios.get(`${constant}/get?code=piaochuang`);
// 查询其他链接
export const getLink = params => axios.get(`${constant}/get?code=otherLink`);

Loading…
Cancel
Save