Files
jiapuapp/pages/auth/entry.vue
T
2026-07-13 14:47:28 +08:00

115 lines
2.3 KiB
Vue

<template>
<view class="entry-page">
<image class="guide-art" :src="entryGuideVisual" mode="widthFix" />
<view class="entry-hit entry-login-hit" @click="openLogin" />
<view class="entry-hit entry-wechat-hit" @click="prepareWechatLogin" />
<view class="entry-hit entry-register-hit" @click="prepareRegister" />
<view class="entry-hit entry-agreement-hit" @click="toggleAgreement" />
<view class="entry-hit entry-agreement-copy-hit" @click.stop="prepareAgreement" />
<view v-if="agreed" class="agreement-confirmed"></view>
</view>
</template>
<script setup>
import { ref } from 'vue'
import entryGuideVisual from '@/docs/design/screens/A01-启动登录引导-效果稿-v3-文字注册入口.png'
const agreed = ref(false)
const toggleAgreement = () => {
agreed.value = !agreed.value
}
const requireAgreement = () => {
if (agreed.value) return true
uni.showToast({ title: '请先阅读并同意相关协议', icon: 'none' })
return false
}
const openLogin = () => {
if (!requireAgreement()) return
uni.navigateTo({ url: '/pages/auth/login?agreed=1' })
}
const prepareWechatLogin = () => {
if (!requireAgreement()) return
uni.showToast({ title: '微信登录功能准备中', icon: 'none' })
}
const prepareRegister = () => {
if (!requireAgreement()) return
uni.showToast({ title: '注册页面准备中', icon: 'none' })
}
const prepareAgreement = () => {
uni.showToast({ title: '协议页面准备中', icon: 'none' })
}
</script>
<style scoped lang="scss">
.entry-page {
position: relative;
width: 750rpx;
min-height: 1625rpx;
background: #f9f5ed;
}
.guide-art {
display: block;
width: 750rpx;
height: 1625rpx;
}
.entry-hit {
position: absolute;
z-index: 1;
}
.entry-login-hit {
top: 799rpx;
left: 99rpx;
width: 552rpx;
height: 126rpx;
}
.entry-wechat-hit {
top: 960rpx;
left: 99rpx;
width: 552rpx;
height: 126rpx;
}
.entry-register-hit {
top: 1155rpx;
left: 200rpx;
width: 350rpx;
height: 72rpx;
}
.entry-agreement-hit {
top: 1362rpx;
left: 126rpx;
width: 60rpx;
height: 60rpx;
}
.entry-agreement-copy-hit {
top: 1362rpx;
left: 190rpx;
width: 450rpx;
height: 60rpx;
}
.agreement-confirmed {
position: absolute;
z-index: 2;
top: 1365rpx;
left: 134rpx;
color: #b7170d;
font-size: 38rpx;
font-weight: 700;
line-height: 52rpx;
}
</style>