Skip to content

feat: 更新按钮 #5

Merged
merged 1 commit into from
Feb 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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