前端
parent
7f046fc9e5
commit
dfc2aecae7
@ -0,0 +1,77 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<!-- Teacher Section -->
|
||||
<navigator url="/pages/login/zhuce/register/teacher">
|
||||
<view class="section">
|
||||
<image src='../../../static/teacher.png' mode="aspectFit" class="identity-image" />
|
||||
<button class="identity-button" @click="selectIdentity('teacher')">我是老师</button>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
|
||||
<view class="divider"></view>
|
||||
|
||||
<!-- Student Section -->
|
||||
<navigator url="/pages/login/zhuce/register/register">
|
||||
<view class="section">
|
||||
<image src='../../../static/student.png' mode="aspectFit" class="identity-image" />
|
||||
<button class="identity-button" @click="selectIdentity('student')">我是学生</button>
|
||||
</view>
|
||||
</navigator>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
methods: {
|
||||
selectIdentity(identity) {
|
||||
// Record the identity (e.g., store in local storage or state management)
|
||||
uni.setStorageSync('selectedIdentity', identity);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
justify-content: flex-start; /* 更改为向上对齐 */
|
||||
padding-top: 100px; /* 添加顶部内边距以整体上移
|
||||
padding-bottom: 20px; /* 可选:保持底部间距 */
|
||||
}
|
||||
|
||||
|
||||
.section {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
margin: 20px 0;
|
||||
}
|
||||
|
||||
.identity-image {
|
||||
width: 120px;
|
||||
height: 120px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.identity-button {
|
||||
width: 150px;
|
||||
padding: 5px;
|
||||
background-color: #4CAF50;
|
||||
color: white;
|
||||
border: none;
|
||||
border-radius: 25px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.divider {
|
||||
width: 80%;
|
||||
height: 1px;
|
||||
background-color: #ccc;
|
||||
margin: 20px 0;
|
||||
}
|
||||
</style>
|
Loading…
Reference in new issue