完成性别界面代码

master^2
Gary 4 weeks ago
parent 7671e04efc
commit d57bc9d5b7

@ -1,6 +1,6 @@
{
"pages": [
{
/*{
"path": "pages/transition/page1/page1",
"style": {
"navigationStyle": "custom"
@ -53,47 +53,41 @@
"style": {
"navigationStyle": "custom"
}
},
},*/
{
"path": "pages/information/sex/sex",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
"path": "pages/information/boy_height/boy_height",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
"path": "pages/information/girl_height/girl_height",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
"path": "pages/information/boy_weight/boy_weight",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
"path": "pages/information/gril_weight/gril_weight",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
},
{
"path": "pages/login/forget_password/forget_password",
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": false
"navigationStyle": "custom"
}
}
],

@ -1,17 +1,42 @@
<template>
<view>
<view class="background">
<!--按钮-->
<image class="button" @click="click" src="@/static/transition/page2/pictures/button.png"></image>
</view>
</template>
<script>
export default {
data() {
return {};
methods: {
click() {
uni.navigateTo({
url: '/pages/inforamtion/boy_weight/boy_weight' // page3
});
}
}
}
</script>
<style lang="scss">
.background {
background-image: url("@/static/transition/page2/pictures/background.png");
background-size: cover;
background-position: center;
height: 100vh;
display: flex;
flex-direction: column; /* 纵向排列 */
align-items: center; /* 水平居中 */
justify-content: flex-end; /* 使内容向底部对齐 */
position: relative; /* 为绝对定位子元素提供相对定位的上下文 */
}
.button {
position: absolute; /* 绝对定位 */
width: 315px;
height: 60px;
bottom: 20%; /* 距离底部 20% 的位置 */
left: 50%; /* 水平居中 */
transform: translateX(-50%); /* 通过 translateX 使其居中 */
}
</style>

@ -1,17 +1,76 @@
<template>
<view>
<view class="background">
<!-- 男生按钮 -->
<image
class="boy_image"
@click="clickBoyImage"
v-if="!isBoySelected"
:class="{'slide-in-left': !isBoySelected}"
src="/static/information/sex/pictures/boy.png"
></image>
<image
class="boy_image"
@click="clickBoyImage"
v-else
:class="{'slide-in-left': !isBoySelected}"
src="/static/information/sex/pictures/shift_boy.png"
></image>
<!-- 女生按钮 -->
<image
class="girl_image"
@click="clickGirlImage"
v-if="!isGirlSelected"
:class="{'slide-in-right': !isGirlSelected}"
src="/static/information/sex/pictures/girl.png"
></image>
<image
class="girl_image"
@click="clickGirlImage"
v-else
:class="{'slide-in-right': !isGirlSelected}"
src="/static/information/sex/pictures/shift_girl.png"
></image>
<!-- 底部下一步按钮 -->
<image
class="button"
@click="goToNextPage"
src="/static/information/sex/pictures/button.png"
></image>
</view>
</template>
<script>
export default {
data() {
return {};
}
}
return {
isBoySelected: false,
isGirlSelected: false,
};
},
methods: {
//
goToNextPage() {
const targetPage = this.isBoySelected
? "/pages/information/boy_height/boy_height"
: "/pages/information/girl_height/girl_height";
uni.navigateTo({
url: targetPage, //
});
},
clickBoyImage() {
this.isBoySelected = true;
this.isGirlSelected = false; //
},
clickGirlImage() {
this.isGirlSelected = true;
this.isBoySelected = false; //
},
},
};
</script>
<style lang="scss">
@import "@/static/information/sex/css/sex.css";
</style>

@ -36,7 +36,7 @@
</view>
<view class="forget_passage">忘了密码</view>
<view class="button_box login_form_item">
<button name="submit_button" class="login_button"></button>
<button name="submit_button" class="login_button" @click="login"></button>
</view>
</view>
</form>
@ -70,8 +70,6 @@ const passageWordsBottomBorder = computed(() => isPassagePage.value? "0.1rem sol
const captchaWordsBottomBorder = computed(() => isPassagePage.value? "none":"0.1rem solid #094ABC"); //
const isOpened = ref(true); //
const eyesStateIcon = ref("../../../static/login/account_login/login_part/closedeyes.png");
//
function toCaptchaEvent(){
isPassagePage.value = false;
@ -97,7 +95,12 @@ function sendCaptchaEvent(){
},1000)
};
}
function login(){
//TODO:
uni.navigateTo({
url: '@pages/information/sex/sex.vue'//
})
}
//
function toPassageEvent(){
isPassagePage.value = true;

@ -0,0 +1,48 @@
.background {
background-image: url("/static/information/sex/pictures/background.png");
background-size: cover;
background-position: center;
height: 100vh;
display: flex;
flex-direction: column; /* 纵向排列 */
align-items: center; /* 水平居中 */
justify-content: flex-end; /* 使内容向底部对齐 */
position: relative; /* 为绝对定位子元素提供相对定位的上下文 */
}
.boy_image {
position: absolute; /* 绝对定位 */
width: 30%;
height: 16%;
bottom: 33%; /* 距离底部 20% 的位置 */
left: 10%; /* 水平居中 */
}
.girl_image {
position: absolute; /* 绝对定位 */
width: 30%;
height: 16%;
bottom: 33%; /* 距离底部 20% 的位置 */
right: 10%; /* 水平居中 */
}
.button {
position: absolute; /* 绝对定位 */
width: 90%;
height: 12%;
bottom: 2%; /* 距离底部 20% 的位置 */
left: 50%; /* 水平居中 */
transform: translateX(-50%); /* 通过 translateX 使其居中 */
}
.boy_image,
.girl_image {
transition: transform 0.3s ease; /* 设置过渡效果 */
}
.boy_image:hover,
.girl_image:hover {
transform: scale(1.1); /* 鼠标悬浮时放大 */
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

@ -1,8 +1,8 @@
{
"hash": "239ea83a",
"configHash": "3f4641d2",
"hash": "3dcffc29",
"configHash": "cc60d382",
"lockfileHash": "e3b0c442",
"browserHash": "619b4131",
"browserHash": "e601f541",
"optimized": {},
"chunks": {}
}
Loading…
Cancel
Save