1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-04-06 03:57:53 +08:00
花裤衩 5d981eee7e Revert "change codefund"
This reverts commit 136d962c1e52e21989cc14f048b4b78884c72b7c.
2019-12-03 10:35:00 +08:00

63 lines
1.1 KiB
Vue

<template>
<div id="codefund" />
</template>
<script>
import axios from 'axios'
export default {
data() {
return {
loadSuccess: true
}
},
watch: {
'$route.path': {
handler: function(val, oldVal) {
this.getCodefund()
}
}
},
mounted() {
this.getCodefund()
},
methods: {
getCodefund() {
if (this.$isServer) return
const codefundId = this.isGitee()
? '111'
: '96'
const template = 'horizontal'
axios.get(`https://codefund.io/properties/${codefundId}/funder.html?template=${template}`)
.then(function(response) {
document.getElementById('codefund').innerHTML = response.data
})
},
isGitee() {
const origin = window.location.origin
if (origin.includes('gitee.io')) {
return true
}
return false
},
loadError(oError) {
this.loadSuccess = false
}
}
}
</script>
<style lang="scss">
.cf-wrapper {
margin: 0 !important;
}
.fixed-header+#codefund {
margin-top: 50px;
}
.hasTagsView {
.fixed-header+#codefund {
margin-top: 84px;
}
}
</style>