2025-03-14 16:55:12 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view class="page">
|
|
|
|
|
|
<view class="title">
|
2025-03-15 15:46:16 +08:00
|
|
|
|
<image src="/static/image/hesu.png" mode=""></image>
|
2025-03-14 16:55:12 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="form">
|
|
|
|
|
|
<view class="inputs_button">
|
|
|
|
|
|
<view class="inputs">
|
|
|
|
|
|
<view class="account">
|
2025-03-15 15:46:16 +08:00
|
|
|
|
<input type="number" v-model="email" :adjust-position="false" placeholder="手机号" />
|
2025-03-14 16:55:12 +08:00
|
|
|
|
</view>
|
2025-03-15 15:46:16 +08:00
|
|
|
|
<view class="password">
|
2025-03-14 16:55:12 +08:00
|
|
|
|
<u--input
|
|
|
|
|
|
type="password"
|
|
|
|
|
|
placeholder="请输入内容"
|
|
|
|
|
|
border="none"
|
|
|
|
|
|
></u--input>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-03-15 15:46:16 +08:00
|
|
|
|
<view class="forgot-password">
|
|
|
|
|
|
<text @click="forgotPassword">忘记密码?</text>
|
|
|
|
|
|
</view>
|
2025-03-14 16:55:12 +08:00
|
|
|
|
<view class="button">
|
|
|
|
|
|
<view @click="login">
|
|
|
|
|
|
登录
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
</view>
|
2025-03-15 15:46:16 +08:00
|
|
|
|
<view class="three">
|
|
|
|
|
|
<u-divider text="第三方登录" style="padding: 0px 40px;"></u-divider>
|
|
|
|
|
|
<u-grid :border="false" @click="click" align="center">
|
|
|
|
|
|
<u-grid-item>
|
|
|
|
|
|
<image src="/static/image/login/fenshu.png" mode=""></image>
|
|
|
|
|
|
<text class="grid-text">飞书</text>
|
|
|
|
|
|
</u-grid-item>
|
|
|
|
|
|
<u-grid-item>
|
|
|
|
|
|
<image src="/static/image/login/emali.png" mode=""></image>
|
|
|
|
|
|
<text class="grid-text">邮箱</text>
|
|
|
|
|
|
</u-grid-item>
|
|
|
|
|
|
<u-grid-item>
|
|
|
|
|
|
<image src="/static/image/login/phone.png" mode=""></image>
|
|
|
|
|
|
<text class="grid-text">手机</text>
|
|
|
|
|
|
</u-grid-item>
|
|
|
|
|
|
</u-grid>
|
|
|
|
|
|
</view>
|
|
|
|
|
|
<view class="pact">
|
|
|
|
|
|
<radio :checked="pactChecked" activeBackgroundColor="#3264ed" activeBorderColor="#3264ed"
|
|
|
|
|
|
<view>我已经阅读并同意<text @click="toPact">《用户协议》</text>和<text @click="toPact">《隐私协议》</text></view>
|
|
|
|
|
|
</view>
|
2025-03-14 16:55:12 +08:00
|
|
|
|
</view>
|
2025-03-15 15:46:16 +08:00
|
|
|
|
|
2025-03-14 16:55:12 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-03-15 15:46:16 +08:00
|
|
|
|
import { request,showToast } from '@/api/apiT.js'
|
2025-03-14 16:55:12 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
2025-03-15 15:46:16 +08:00
|
|
|
|
email: "",
|
2025-03-14 16:55:12 +08:00
|
|
|
|
password: "",
|
|
|
|
|
|
pactChecked: false,
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad() {
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
|
|
|
login() {
|
2025-03-15 15:46:16 +08:00
|
|
|
|
if(this.email==''){
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title:'邮箱不能为空',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
});
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
if(this.password==''){
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title:'密码不能为空',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
});
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
if(!this.pactChecked){
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title:'请先勾选同意用户服务协议以及隐私政策',
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
});
|
|
|
|
|
|
return false
|
|
|
|
|
|
}
|
|
|
|
|
|
request({
|
|
|
|
|
|
url:'user/login',
|
|
|
|
|
|
method:'POST',
|
|
|
|
|
|
data:{
|
|
|
|
|
|
email: this.email,
|
|
|
|
|
|
password: this.password,
|
|
|
|
|
|
}
|
|
|
|
|
|
}).then(res => {
|
|
|
|
|
|
console.log(res.data.data)
|
|
|
|
|
|
if (res.data.code == -1) {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: res.data.msg,
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
} else if (res.data.code == 0) {
|
|
|
|
|
|
//返回数据接收成功
|
|
|
|
|
|
uni.reLaunch({
|
|
|
|
|
|
url: '/pages/index/index',// 替换为你要跳转的页面路径
|
|
|
|
|
|
});
|
2025-03-14 16:55:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
})
|
|
|
|
|
|
},
|
|
|
|
|
|
toPact() {
|
|
|
|
|
|
uni.showToast({
|
|
|
|
|
|
title: "协议",
|
|
|
|
|
|
icon: 'none'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
.page {
|
|
|
|
|
|
min-height: 100vh;
|
2025-03-15 15:46:16 +08:00
|
|
|
|
background-image: url("../../static/image/login/loginbg.png");
|
2025-03-14 16:55:12 +08:00
|
|
|
|
background-size: 100%;
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
|
padding-top: 220rpx;
|
2025-03-15 15:46:16 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 160px;
|
|
|
|
|
|
height: 37px;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.form {
|
|
|
|
|
|
flex: 1;
|
2025-03-15 15:46:16 +08:00
|
|
|
|
margin: 0 76rpx;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
overflow: hidden;
|
|
|
|
|
|
|
|
|
|
|
|
.inputs_button {
|
|
|
|
|
|
.inputs {
|
2025-03-15 15:46:16 +08:00
|
|
|
|
padding: 150rpx 0px 0;
|
|
|
|
|
|
margin-bottom: 20rpx;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
.account,
|
2025-03-15 15:46:16 +08:00
|
|
|
|
.password{
|
|
|
|
|
|
height: 80rpx;
|
|
|
|
|
|
border-radius: 50px;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
padding: 0 48rpx;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
2025-03-15 15:46:16 +08:00
|
|
|
|
background-color: #F6F6F6;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
|
|
|
|
|
|
input {
|
|
|
|
|
|
flex: 1;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.account {
|
|
|
|
|
|
margin-bottom: 48rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.button {
|
|
|
|
|
|
padding: 0 32rpx;
|
|
|
|
|
|
|
|
|
|
|
|
view {
|
2025-03-15 15:46:16 +08:00
|
|
|
|
line-height: 80rpx;
|
|
|
|
|
|
border-radius: 50px;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
text-align: center;
|
|
|
|
|
|
font-size: 32rpx;
|
2025-03-15 15:46:16 +08:00
|
|
|
|
background: linear-gradient(to right, #3471FF, #6776FF);
|
2025-03-14 16:55:12 +08:00
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-03-15 15:46:16 +08:00
|
|
|
|
.three{
|
|
|
|
|
|
margin: 40rpx 0px;
|
|
|
|
|
|
padding: 20rpx 40rpx;
|
|
|
|
|
|
image{
|
|
|
|
|
|
width: 100rpx;
|
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
.forgot-password {
|
|
|
|
|
|
text-align: right;
|
|
|
|
|
|
margin-bottom: 20px;
|
2025-03-14 16:55:12 +08:00
|
|
|
|
}
|
|
|
|
|
|
.pact {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
font-size: 24rpx;
|
|
|
|
|
|
|
|
|
|
|
|
text {
|
|
|
|
|
|
color: #3264ed;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
radio {
|
|
|
|
|
|
:deep(.uni-radio-input) {
|
|
|
|
|
|
border: 1rpx solid #3264ed;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
transform:scale(0.6)
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|