add:popup component, update:register/forget/change pages

master
xhhing 4 weeks ago
parent 9d2b0e22e0
commit 562283d89e

@ -10,10 +10,12 @@ import tarbar_home from "@/components/tarbar_home/tarbar_home.vue";
import tarbar_user from "@/components/tarbar_user/tarbar_user.vue";
import tarbar_community from "@/components/tarbar_community/tarbar_community.vue";
import tarbar_puppy_chat from "@/components/tarbar_puppy_chat/tarbar_puppy_chat.vue";
import myPopUp from './components/my-pop-up/my-pop-up.vue';
export default {
components: {
tarbar
tarbar,
myPopUp, //js-
},
onLaunch: function() {
console.log('App Launch');

@ -0,0 +1,147 @@
<template>
<view class="pop_up_componnet" v-if="isOpened">
<!-- 遮罩层 -->
<view class="background_blur"></view>
<!-- 弹窗 -->
<view class="pop_up_box" >
<!-- 背景飞机 -->
<image class="plane_image" src="../../static/components/my_pop_up/plane.png"></image>
<!-- 关闭图标 -->
<image class="close_image" @click="onClose" src="../../static/components/my_pop_up/close_icon.png"></image>
<!-- 标题 -->
<view class="title">{{title}}</view>
<!-- 内容 -->
<view class="content">{{content}}</view>
<!-- 横线 -->
<image class="line" src="../../static/components/my_pop_up/line.png"></image>
<!-- 按钮 -->
<button class="button" @click="onButtonClick"></button>
</view>
</view>
</template>
<script>
import { ref } from 'vue'
export default{
name:'my-pop-up',
props:{
title:{
default:'提示',
},
content:{
default:'',
},
isOpened:{
default:true,
}
},
data(){
return{
}
},
methods:{
onButtonClick(){
this.$emit('onClick','onButtonclick');
},
onClose(){
this.$emit('onClose');
}
}
}
</script>
<style lang="scss">
.pop_up_componnet{
height: 100vh;
width: 100vw;
position: relative;
.background_blur{
height: 100%;
width: 100%;
float: left;
background-repeat: no-repeat;
background: #ffffff;
background-position: center;
background-size: cover;
opacity: 70%;
}
.pop_up_box{
background-color: #EAF5FF;
height: 13vh;
width: 50vw;
border-radius: 12px;
position: absolute;
top: 50%;
left: 50%;
transform: translateX(-50%) translateY(-50%);
.plane_image{
position: absolute;
left: 0%;
top: 0%;
width: 15.3vw;
height: 5vh;
}
.close_image{
position: absolute;
right: 10%;
top: 10%;
width: 0.7rem;
height: 0.7rem;
}
.title{
/* 错误 */
position: absolute;
left: 50%;
top: 10.74%;
transform: translateX(-50%);
font-family: 'PingFang SC';
font-style: normal;
font-weight: 400;
font-size: 1rem;
display: flex;
align-items: center;
color: #000364;
}
.content{
position: absolute;
left: 50%;
top: 41.32%;
transform: translateX(-50%);
font-family: 'PingFang SC';
font-style: normal;
font-weight: 400;
font-size: 0.8rem;
display: flex;
align-items: center;
color: #5FA0D1;
}
.line{
position: absolute;
left: 4.93%;
top: 63.64%;
height: 0.1rem;
width: 90.14%;
opacity: 0.35;
}
.button{
position: absolute;
left: 50%;
top: 71.07%;
transform: translateX(-50%);
background: #7BC0FE;
border-radius: 8px;
color: #ffffff;
height: 3vh;
width: 37vw;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
}
.button:active{
color: #4A69F7;
}
}
}
</style>

@ -8,7 +8,10 @@
<script>
export default {
data() {
return {};
return {
};
},
methods:{
}
}
</script>

@ -34,6 +34,7 @@
</view>
<view class="error_tip" v-if="isPassageError">*</view>
</view>
<!-- 验证码输入框 -->
<view class="captcha_box login_form_item" v-else>
<view class="form_input_box captcha_input_box">
<input class="captcha" name="captcha" type="text" placeholder="请输入你的验证码"/>
@ -82,9 +83,9 @@ const captchaWordsBottomBorder = computed(() => isPassagePage.value? "none":"0.1
const isOpened = ref(true); //
const eyesStateIcon = ref("../../../static/login/account_login/login_part/closedeyes.png");
const isPhoneError = ref(true);
const isPassageError = ref(true);
const isCaptchaError = ref(true);
const isPhoneError = ref(false);
const isPassageError = ref(false);
const isCaptchaError = ref(false);
//
function toCaptchaEvent(){
@ -230,11 +231,6 @@ function forgetPassageClick(){
.account_box{
display: flex;
flex-direction: column;
// .account_input_box{
// padding-left: 3%;
// padding-right: 3%;
// background-color: #D5E9FF;
// border-radius: 12px;
.account{
height: 5.5vh;
padding-left: 11%;
@ -245,7 +241,6 @@ function forgetPassageClick(){
background-color: #D5E9FF;
font-size: 0.8rem;
}
// }
}
.passage_box{
display: flex;

@ -10,41 +10,62 @@
<form class="change_password_form">
<!-- 密码输入 -->
<view class="passage_box change_password_form_item">
<input type="text" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<image @click="openEyesEvent_1" class="eyes" :src="eyesStateIcon_1"></image>
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<image @click="openEyesEvent_1" class="eyes" :src="eyesStateIcon_1"></image>
</view>
<!-- <view class="error_tip" v-if="isPassageError">*</view> -->
</view>
<!-- 确认密码输入 -->
<view class="passage_box change_password_form_item">
<input type="text" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<image @click="openEyesEvent_2" class="eyes" :src="eyesStateIcon_2"></image>
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<image @click="openEyesEvent_2" class="eyes" :src="eyesStateIcon_2"></image>
</view>
<view class="error_tip" v-if="isPassageSameError">*</view>
</view>
<!-- 注册按钮 -->
<view class="ensure_button_box change_password_form_item">
<button class="ensure_button" @click="ensureClickEvent"></button>
</view>
</form>
<!-- 修改成功弹窗 -->
<my-pop-up
class="change_tip"
@onClick="onOpenUpClick"
@onClose="onClosePopUPClick"
:is-opened="isOpenPopUp"
:title="title"
:content="content"
></my-pop-up>
</view>
</template>
<script setup>
import { ref, computed } from 'vue';
const isPassageSameError = ref(false);
const title = '成功'; //
const content = '密码修改成功'; //
const isOpenPopUp = ref(false);//
const isOpened_1 = ref(true); //
const eyesStateIcon_1 = ref("../../../static/login/register/pictures/closedeyes.png");
const eyesStateIcon_1 = ref("../../../static/login/change_password/pictures/closedeyes.png");
const isOpened_2 = ref(true); //
const eyesStateIcon_2 = ref("../../../static/login/register/pictures/closedeyes.png");
const eyesStateIcon_2 = ref("../../../static/login/change_password/pictures/closedeyes.png");
//
function openEyesEvent_1(){
if (isOpened_1.value)
{
isOpened_1.value = false;
eyesStateIcon_1.value = "../../../static/login/register/pictures/openedeyes.png";
eyesStateIcon_1.value = "../../../static/login/change_password/pictures/openedeyes.png";
}
else
{
isOpened_1.value =true;
eyesStateIcon_1.value = "../../../static/login/register/pictures/closedeyes.png";
eyesStateIcon_1.value = "../../../static/login/change_password/pictures/closedeyes.png";
}
}
//
@ -52,28 +73,38 @@ function openEyesEvent_2(){
if (isOpened_2.value)
{
isOpened_2.value = false;
eyesStateIcon_2.value = "../../../static/login/register/pictures/openedeyes.png";
eyesStateIcon_2.value = "../../../static/login/change_password/pictures/openedeyes.png";
}
else
{
isOpened_2.value =true;
eyesStateIcon_2.value = "../../../static/login/register/pictures/closedeyes.png";
eyesStateIcon_2.value = "../../../static/login/change_password/pictures/closedeyes.png";
}
}
//
function ensureClickEvent(){
console.log('密码确认修改');
isOpenPopUp.value = true; //
}
function onOpenUpClick(){
//TODO:
uni.navigateTo({
url:"/pages/login/account_login/account_login"
})
url: '/pages/login/account_login/account_login',
animationType: 'pop-in', //
animationDuration: 200
});
}
function onClosePopUPClick(){
//TODO:
isOpenPopUp.value = false;
}
</script>
<style lang="scss">
.change_password_box{
background-image: url("../../../static/login/register/pictures/background.png");
background-image: url("../../../static/login/change_password/pictures/background.png");
background-size: cover;
background-position: center;
height: 100vh;
@ -112,31 +143,46 @@ function ensureClickEvent(){
top: 40%;
//
.change_password_form_item{
height: 15.6%;
height: auto;
margin-bottom: 5%;
.form_input_box{
padding-left: 3%;
padding-right: 3%;
background-color: #D5E9FF;
border-radius: 12px;
}
.error_tip{
margin-top: 0.6vh;
padding-left: 3%;
font-size: 0.8rem;
color: #FF1E1E;
}
}
//
.passage_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.passage{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/lock_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.7% 50%;
font-size: 0.8rem;
}
.eyes{
width: 1rem;
height: 1rem;
position: absolute;
right: 9%;
flex-direction: column;
.passage_input_box{
display: flex;
align-items: center;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.passage{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/change_password/pictures/lock_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.7% 50%;
font-size: 0.8rem;
}
.eyes{
width: 1rem;
height: 1rem;
position: absolute;
right: 13%;
}
}
}
//
@ -145,7 +191,7 @@ function ensureClickEvent(){
align-items: center;
justify-content: center;
margin-top: 8%;
height: 100%;
height: 5.5vh;
border-radius: 12px;
background-color: #4A69F7;
color: #FFFCFC;

@ -10,15 +10,21 @@
<form class="forget_passage_form">
<!-- 手机号输入 -->
<view class="phone_number_box forget_passage_form_item">
<input type="text" class="phone_number" placeholder="请输入你的电话号码"/>
<view class="form_input_box">
<input type="text" class="phone_number" placeholder="请输入你的电话号码"/>
</view>
<view class="error_tip" v-if="isPhoneError">*</view>
</view>
<!-- 验证码输入 -->
<view class="captcha_box forget_passage_form_item">
<input type="text" class="captcha" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
</button>
<view class="form_input_box captcha_input_box">
<input type="text" class="captcha" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
</button>
</view>
<view class="error_tip" v-if="isCaptchaError">*</view>
</view>
<!-- 下一步按钮 -->
<view class="forget_passage_button_box forget_passage_form_item">
@ -30,6 +36,9 @@
<script setup>
import { ref, computed } from 'vue';
const isPhoneError = ref(false);
const isCaptchaError = ref(false);
const isSendCaptcha = ref(false); //
var codeTime = ref(0); //
@ -111,51 +120,69 @@ function nextClickEvent(){
top: 40%;
//
.forget_passage_form_item{
height: 15.6%;
// height: 15.6%;
// margin-bottom: 5%;
// }
height: auto;
margin-bottom: 5%;
.form_input_box{
padding-left: 3%;
padding-right: 3%;
background-color: #D5E9FF;
border-radius: 12px;
}
.error_tip{
margin-top: 0.6vh;
padding-left: 3%;
font-size: 0.8rem;
color: #FF1E1E;
}
}
//
.phone_number_box{
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
.phone_number{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/phone_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 3% 50%;
font-size: 0.8rem;
}
display: flex;
flex-direction: column;
.phone_number{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/forget_password/pictures/phone_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 3% 50%;
background-color: #D5E9FF;
font-size: 0.8rem;
}
}
//
.captcha_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
//
.captcha{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/captcha_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.5% 50%;
font-size: 0.8rem;
}
//
.captcha_button{
width: 5.5rem;
height: 1.9rem;
border-radius: 15px;
font-size: 0.8rem;
color: #000364;
position: absolute;
right: 5%;
flex-direction: column;
.captcha_input_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.captcha{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/forget_password/pictures/captcha_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.5% 50%;
font-size: 0.8rem;
}
.captcha_button{
/* 发送验证码 */
width: 5.5rem;
height: 1.9rem;
border-radius: 15px;
font-size: 0.8rem;
color: #000364;
position: absolute;
right: 5%;
}
}
}
//
@ -164,7 +191,7 @@ function nextClickEvent(){
align-items: center;
justify-content: center;
margin-top: 8%;
height: 100%;
height: 5.5vh;
border-radius: 12px;
background-color: #4A69F7;
color: #FFFCFC;

@ -12,36 +12,65 @@
<form class="register_form">
<!-- 手机号输入 -->
<view class="phone_number_box register_form_item">
<input type="text" class="phone_number" placeholder="请输入你的电话号码"/>
<view class="form_input_box">
<input type="text" class="phone_number" placeholder="请输入你的电话号码"/>
</view>
<view class="error_tip" v-if="isPhoneError">*</view>
</view>
<!-- 验证码输入 -->
<view class="captcha_box register_form_item">
<input type="text" class="captcha" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
</button>
<view class="form_input_box captcha_input_box">
<input class="captcha" name="captcha" type="text" placeholder="请输入你的验证码"/>
<button class="captcha_button" @click="sendCaptchaEvent"
:style="{color:captchaButtonColor, backgroundColor:captchaButtonBackgroundColor}">
{{captchaButtonText}}
</button>
</view>
<view class="error_tip" v-if="isCaptchaError">*</view>
</view>
<!-- 密码输入 -->
<view class="passage_box register_form_item">
<input type="text" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<image @click="openEyesEvent_1" class="eyes" :src="eyesStateIcon_1"></image>
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_1" placeholder="请输入你的密码"/>
<image @click="openEyesEvent_1" class="eyes" :src="eyesStateIcon_1"></image>
</view>
<!-- <view class="error_tip" v-if="isPassageError">*</view> -->
</view>
<!-- 确认密码输入 -->
<view class="passage_box register_form_item">
<input type="text" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<image @click="openEyesEvent_2" class="eyes" :src="eyesStateIcon_2"></image>
<view class="form_input_box passage_input_box">
<input type="text" class="passage" :password="isOpened_2" placeholder="请再次确认密码"/>
<image @click="openEyesEvent_2" class="eyes" :src="eyesStateIcon_2"></image>
</view>
<view class="error_tip" v-if="isPassageSameError">*</view>
</view>
<!-- 注册按钮 -->
<view class="register_button_box register_form_item">
<button class="register_button" @click="registerEvent"></button>
</view>
</form>
<!-- 成功弹窗 -->
<my-pop-up
class="register_tip"
@onClick="onOpenUpClick"
@onClose="onClosePopUPClick"
:is-opened="isOpenPopUp"
:title="title"
:content="content"
></my-pop-up>
</view>
</template>
<script setup>
import { ref, computed } from 'vue';
const isCaptchaError = ref(false);
const isPhoneError = ref(false);
const isPassageSameError = ref(false);
const title = '成功'; //
const content = '注册成功'; //
const isOpenPopUp = ref(false);//
const isSendCaptcha = ref(false); //
var codeTime = ref(0); //
@ -105,13 +134,21 @@ function openEyesEvent_2(){
//
function registerEvent(){
//
//
isOpenPopUp.value = true; //
}
function onOpenUpClick(){
//TODO:
uni.navigateTo({
url: '/pages/login/account_login/account_login',
animationType: 'pop-in', //
animationDuration: 200
});
}
function onClosePopUPClick(){
//TODO:
isOpenPopUp.value = false;
}
</script>
@ -165,75 +202,93 @@ function registerEvent(){
top: 40%;
//
.register_form_item{
height: 15.6%;
height: auto;
margin-bottom: 5%;
.form_input_box{
padding-left: 3%;
padding-right: 3%;
background-color: #D5E9FF;
border-radius: 12px;
}
.error_tip{
margin-top: 0.6vh;
padding-left: 3%;
font-size: 0.8rem;
color: #FF1E1E;
}
}
//
.phone_number_box{
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
.phone_number{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/phone_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 3% 50%;
font-size: 0.8rem;
}
display: flex;
flex-direction: column;
.phone_number{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/phone_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 3% 50%;
background-color: #D5E9FF;
font-size: 0.8rem;
}
}
//
.captcha_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
//
.captcha{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/captcha_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.5% 50%;
font-size: 0.8rem;
}
//
.captcha_button{
width: 5.5rem;
height: 1.9rem;
border-radius: 15px;
font-size: 0.8rem;
color: #000364;
position: absolute;
right: 5%;
flex-direction: column;
.captcha_input_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.captcha{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/captcha_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.5% 50%;
font-size: 0.8rem;
}
.captcha_button{
/* 发送验证码 */
width: 5.5rem;
height: 1.9rem;
border-radius: 15px;
font-size: 0.8rem;
color: #000364;
position: absolute;
right: 5%;
}
}
}
//
.passage_box{
display: flex;
align-items: center;
padding-left: 3%;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.passage{
height: 100%;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/lock_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.7% 50%;
font-size: 0.8rem;
}
.eyes{
width: 1rem;
height: 1rem;
position: absolute;
right: 9%;
flex-direction: column;
.passage_input_box{
display: flex;
align-items: center;
background-color: #D5E9FF;
border-radius: 12px;
position: relative;
.passage{
height: 5.5vh;
padding-left: 11%;
background-image: url("../../../static/login/register/pictures/lock_icon.png");
background-repeat: no-repeat;
background-size: 0.8rem;
background-position: 4.7% 50%;
font-size: 0.8rem;
}
.eyes{
width: 1rem;
height: 1rem;
position: absolute;
right: 13%;
}
}
}
//
@ -242,14 +297,13 @@ function registerEvent(){
align-items: center;
justify-content: center;
margin-top: 8%;
height: 100%;
height: 5.5vh;
border-radius: 12px;
background-color: #4A69F7;
color: #FFFCFC;
text-align: center;
font-size: 1.2rem;
}
// }
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 835 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

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