Skip to content

Commit

Permalink
feat: 更新按钮
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzi committed Feb 14, 2023
1 parent 2ee9193 commit 8ca7278
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions src/views/Page1/Page1.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,19 @@ const swiperList = [
}
]
const mainIntroduce = ref('E个魂的APP')
// onMounted(() => {})
const { isIOS, isMobile } = getBrowserInfo()
const buttontext = computed(() => {
if (!isMobile) {
return '前往官网'
}
if (isIOS) {
return '暂无下载链接'
}
return '前往下载'
})
const download = () => {
if (!isMobile) {
window.open('https://www.eoefans.com')
type TypeDownload = 'Android' | 'Web' | 'IOS'
const download = (type: TypeDownload) => {
if (type === 'Android') {
window.open('https://eoe.best/appdl')
return
}
if (!isIOS) {
window.open('https://eoe.best/appdl')
if (type === 'Web') {
window.open('https://eoefans.com')
return
}
if (type === 'IOS') {
return
}
}
</script>
Expand All @@ -65,7 +58,8 @@ const download = () => {
Welcome to eoe world.
</div>
<section class="button-section">
<div class="download-button__base" @click="download">{{ buttontext }}</div>
<div class="download-button__base" @click="download('Web')">前往PC官网</div>
<div class="download-button__base" @click="download('Android')">安卓下载</div>
</section>
</section>
<!-- 使用示例 -->
Expand Down Expand Up @@ -142,8 +136,13 @@ const download = () => {
align-items: center;
justify-content: center;
background-color: #fff;
background-color: rgba(255, 255, 255, 0.7);
border-radius: 6px;
cursor: pointer;
transition: all 0.3s;
}
.download-button__base:hover {
box-shadow: 0px 0px 10px 0px #fff;
}
}
.example-section {
Expand Down

0 comments on commit 8ca7278

Please sign in to comment.