2025-05-26 16:48:12 +08:00
|
|
|
<template>
|
|
|
|
<view class="login-container">
|
2025-06-19 17:03:31 +08:00
|
|
|
<image class="back-imge" src="https://www.focusnu.com/media/directive/login/back.png" @click="goback" />
|
|
|
|
<image class="title-imge" src="https://www.focusnu.com/media/directive/login/icon.png" />
|
|
|
|
<image class="photo-imge" src="https://www.focusnu.com/media/directive/login/bgc.png" />
|
2025-05-26 16:48:12 +08:00
|
|
|
<view class="under-container">
|
|
|
|
<view class="under-container-title">
|
|
|
|
<view class="under-container-input">
|
|
|
|
<view class="input-left">+86</view>
|
2025-06-19 17:03:31 +08:00
|
|
|
<input type="number" style="width: 600rpx;font-size: 33rpx;" maxlength="11" placeholder="请输入手机号"
|
2025-05-28 17:36:42 +08:00
|
|
|
@input="isRight" />
|
2025-05-26 16:48:12 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2025-06-19 17:03:31 +08:00
|
|
|
<view class="button-blue" v-if="canClick" @click="jumpto">
|
2025-05-26 16:48:12 +08:00
|
|
|
获得验证码
|
|
|
|
</view>
|
2025-06-19 17:03:31 +08:00
|
|
|
<view class="button-gray" v-if="!canClick">
|
2025-05-26 16:48:12 +08:00
|
|
|
获得验证码
|
|
|
|
</view>
|
|
|
|
</view>
|
2025-05-28 17:36:42 +08:00
|
|
|
<view class="bg-mask" v-if="huakuaiOpen" @click="huakuaiOpen=false" >
|
2025-06-03 17:29:22 +08:00
|
|
|
<huakuai @click.stop @success="codeIsOk" />
|
2025-05-28 17:36:42 +08:00
|
|
|
</view>
|
|
|
|
|
|
|
|
|
2025-05-26 16:48:12 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
|
|
|
import {
|
|
|
|
reactive,
|
|
|
|
ref
|
|
|
|
} from 'vue';
|
|
|
|
|
2025-05-28 17:36:42 +08:00
|
|
|
import huakuai from "@/compontent/public/huakuai.vue"
|
2025-06-03 17:29:22 +08:00
|
|
|
import { getHkCode } from "@/api/loginApi.js"
|
2025-05-28 17:36:42 +08:00
|
|
|
|
|
|
|
const huakuaiOpen = ref(false);
|
2025-05-26 16:48:12 +08:00
|
|
|
|
2025-05-28 17:36:42 +08:00
|
|
|
const jumpto = () => {
|
2025-06-03 17:29:22 +08:00
|
|
|
huakuaiOpen.value = true;
|
|
|
|
}
|
|
|
|
const codeIsOk = () =>{
|
|
|
|
huakuaiOpen.value = false;
|
|
|
|
getHkCode({mobile:phonenumber.value}).then(res=>{
|
2025-06-19 17:03:31 +08:00
|
|
|
// uni.navigateTo({
|
|
|
|
// url: `/pages/login/code?mobile=${phonenumber.value}&hkcode=${res.message}`
|
|
|
|
// });
|
2025-06-03 17:29:22 +08:00
|
|
|
if(res.success){
|
|
|
|
uni.navigateTo({
|
|
|
|
url: `/pages/login/code?mobile=${phonenumber.value}&hkcode=${res.message}`
|
|
|
|
});
|
|
|
|
}else{
|
|
|
|
uni.showToast({
|
|
|
|
title: res.message,
|
|
|
|
icon: 'none', // 不显示图标(提示信息)
|
|
|
|
duration: 2000 // 显示时长(毫秒)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
})
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
|
|
|
//检测是不是11位手机号
|
|
|
|
function is11DigitNumber(value) {
|
2025-05-28 17:36:42 +08:00
|
|
|
return /^\d{11}$/.test(value.toString());
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
|
|
|
const phonenumber = ref("");
|
|
|
|
const canClick = ref(false);
|
2025-05-28 17:36:42 +08:00
|
|
|
const isRight = (res) => {
|
|
|
|
console.log("????", res.detail.value)
|
|
|
|
if (is11DigitNumber(res.detail.value)) {
|
2025-05-26 16:48:12 +08:00
|
|
|
phonenumber.value = res.detail.value
|
|
|
|
canClick.value = true;
|
2025-05-28 17:36:42 +08:00
|
|
|
} else {
|
2025-05-26 16:48:12 +08:00
|
|
|
canClick.value = false;
|
|
|
|
}
|
2025-05-28 17:36:42 +08:00
|
|
|
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
2025-06-19 17:03:31 +08:00
|
|
|
const goback = () => {
|
|
|
|
uni.navigateBack()
|
|
|
|
}
|
2025-05-26 16:48:12 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
.login-container {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2025-05-28 17:36:42 +08:00
|
|
|
min-height: 100vh;
|
2025-05-26 16:48:12 +08:00
|
|
|
width: 100%;
|
|
|
|
background-color: rgb(239, 241, 252);
|
|
|
|
position: relative;
|
|
|
|
|
2025-06-19 17:03:31 +08:00
|
|
|
.title-imge {
|
|
|
|
width: 150rpx;
|
|
|
|
height: 210rpx;
|
|
|
|
margin: 0 auto;
|
|
|
|
margin-top: 500rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.photo-imge {
|
|
|
|
position: absolute;
|
2025-06-19 17:03:31 +08:00
|
|
|
top: 200rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
left: 0;
|
|
|
|
width: 100%;
|
2025-06-19 17:03:31 +08:00
|
|
|
height: 1300rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.under-container {
|
2025-05-28 17:36:42 +08:00
|
|
|
position: fixed;
|
2025-05-26 16:48:12 +08:00
|
|
|
left: 0;
|
|
|
|
bottom: 0;
|
|
|
|
width: 100%;
|
2025-06-19 17:03:31 +08:00
|
|
|
height: 27vh;
|
2025-05-26 16:48:12 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
.radio-circle {
|
|
|
|
position: relative;
|
|
|
|
margin-top: 2rpx;
|
|
|
|
width: 40rpx;
|
|
|
|
height: 40rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: 2rpx solid #C0C5D9;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.radio-circle-target {
|
|
|
|
position: relative;
|
|
|
|
margin-top: 2rpx;
|
|
|
|
width: 40rpx;
|
|
|
|
height: 40rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: 2rpx solid #C0C5D9;
|
|
|
|
background-color: transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
.radio-circle-target::after {
|
|
|
|
content: "";
|
|
|
|
position: absolute;
|
|
|
|
top: 50%;
|
|
|
|
left: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
width: 30rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
background-color: #00C9FF;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.under-container-title {
|
|
|
|
display: flex;
|
|
|
|
margin-top: 60rpx;
|
2025-06-19 17:03:31 +08:00
|
|
|
margin-bottom: 55rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
font-size: 25rpx;
|
|
|
|
font-weight: 500;
|
|
|
|
width: 100%;
|
2025-05-28 17:36:42 +08:00
|
|
|
|
2025-05-26 16:48:12 +08:00
|
|
|
.radio-circle-blue {
|
|
|
|
color: #0083FF;
|
|
|
|
margin-top: 3rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.radio-circle-font {
|
|
|
|
color: #5A607F;
|
|
|
|
margin-left: 18rpx;
|
|
|
|
margin-top: 3rpx;
|
|
|
|
}
|
2025-05-28 17:36:42 +08:00
|
|
|
|
|
|
|
.under-container-input {
|
2025-05-26 16:48:12 +08:00
|
|
|
width: 80%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2025-06-19 17:03:31 +08:00
|
|
|
height: 90rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
border-radius: 43rpx;
|
|
|
|
color: #5A607F;
|
|
|
|
font-size: 33rpx;
|
|
|
|
border: 2rpx solid #C0C5D9;
|
2025-05-28 17:36:42 +08:00
|
|
|
|
|
|
|
.input-left {
|
2025-05-26 16:48:12 +08:00
|
|
|
margin: 0 30rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.button-gray {
|
|
|
|
width: 80%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2025-06-19 17:03:31 +08:00
|
|
|
height: 90rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
border-radius: 43rpx;
|
2025-06-19 17:03:31 +08:00
|
|
|
background: linear-gradient(to right, #00C9FF, #0076FF);
|
|
|
|
opacity: 0.4;
|
2025-05-26 16:48:12 +08:00
|
|
|
color: #fff;
|
|
|
|
font-size: 33rpx;
|
2025-06-19 17:03:31 +08:00
|
|
|
margin-bottom: 50rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
2025-05-28 17:36:42 +08:00
|
|
|
|
2025-05-26 16:48:12 +08:00
|
|
|
.button-blue {
|
|
|
|
width: 80%;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
2025-06-19 17:03:31 +08:00
|
|
|
height: 90rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
border-radius: 43rpx;
|
|
|
|
background: linear-gradient(to right, #00C9FF, #0076FF);
|
|
|
|
color: #fff;
|
|
|
|
font-size: 33rpx;
|
2025-06-19 17:03:31 +08:00
|
|
|
margin-bottom: 50rpx;
|
2025-05-26 16:48:12 +08:00
|
|
|
}
|
|
|
|
|
2025-05-28 17:36:42 +08:00
|
|
|
.bg-mask {
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
width: 100vw;
|
|
|
|
height: 100vh;
|
|
|
|
background: rgba(0, 0, 0, 0.3);
|
|
|
|
backdrop-filter: blur(5rpx);
|
|
|
|
z-index: 998;
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2025-06-19 17:03:31 +08:00
|
|
|
.back-imge{
|
|
|
|
position: absolute;
|
|
|
|
top: 100rpx;
|
|
|
|
left: 30rpx;
|
|
|
|
width: 50rpx;
|
|
|
|
height: 50rpx;
|
|
|
|
}
|
2025-05-26 16:48:12 +08:00
|
|
|
</style>
|