地图页面 及页面加语言编译
This commit is contained in:
@@ -0,0 +1,233 @@
|
||||
<template>
|
||||
<view class="page">
|
||||
<view class="title">
|
||||
<image src="/static/image/hesu.png" mode=""></image>
|
||||
</view>
|
||||
|
||||
<view class="form">
|
||||
<view class="inputs_button">
|
||||
|
||||
<view class="inputs">
|
||||
<view class="laber">{{$t('email')}}</view>
|
||||
<view class="vcode">
|
||||
<u--input
|
||||
type="text"
|
||||
v-model="email"
|
||||
:placeholder="$t('email')"
|
||||
border="none"
|
||||
></u--input>
|
||||
<text v-if="vcodeTime==0" @click="getVcode">{{$t('getcode')}}</text>
|
||||
<text v-else style="color:#fff">({{vcodeTime}}s)</text>
|
||||
</view>
|
||||
<view class="password">
|
||||
<u--input
|
||||
type="text"
|
||||
v-model="code"
|
||||
:placeholder="$t('code')"
|
||||
border="none"
|
||||
></u--input>
|
||||
</view>
|
||||
<view class="laber">{{$t('password')}}</view>
|
||||
<view class="account">
|
||||
<u--input
|
||||
type="password"
|
||||
v-model="password"
|
||||
:placeholder="$t('password')"
|
||||
border="none"
|
||||
></u--input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="button">
|
||||
<view @click="login">
|
||||
{{$t('reg')}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { request,showToast } from '@/api/apiT.js'
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
email: "",
|
||||
code:'',
|
||||
password: "",
|
||||
pactChecked: false,
|
||||
vcodeTime: 0,
|
||||
vcodeTimer: null
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
leftClick(){
|
||||
uni.navigateBack({})
|
||||
},
|
||||
login() {
|
||||
if(this.email==''){
|
||||
uni.showToast({
|
||||
title:this.$t('emailerr'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(this.password==''){
|
||||
uni.showToast({
|
||||
title:this.$t('passworerr'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
if(this.code==''){
|
||||
uni.showToast({
|
||||
title:this.$t('codeerr'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
request({
|
||||
url:'user/register',
|
||||
method:'POST',
|
||||
data:{
|
||||
email: this.email,
|
||||
password: this.password,
|
||||
code: this.code,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
uni.showToast({
|
||||
title: res.data.message,
|
||||
icon: 'none'
|
||||
});
|
||||
if(res.data.code ==0){
|
||||
setTimeout(() => {
|
||||
uni.navigateTo({
|
||||
url: '/pages/login/index'
|
||||
})
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
},
|
||||
getVcode() {
|
||||
if(this.email==''){
|
||||
uni.showToast({
|
||||
title:this.$t('emailerr'),
|
||||
icon: 'none'
|
||||
});
|
||||
return false
|
||||
}
|
||||
this.vcodeTime = 60
|
||||
this.vcodeTimer = setInterval(() => {
|
||||
if (this.vcodeTime > 0) {
|
||||
this.vcodeTime--
|
||||
} else {
|
||||
clearInterval(this.vcodeTimer)
|
||||
this.vcodeTimer = null
|
||||
}
|
||||
}, 1000)
|
||||
request({
|
||||
url:'user/sendCode',
|
||||
method:'POST',
|
||||
data:{
|
||||
email: this.email,
|
||||
}
|
||||
}).then(res => {
|
||||
console.log(res.data.data)
|
||||
uni.showToast({
|
||||
title:res.data.message,
|
||||
icon: 'none'
|
||||
})
|
||||
})
|
||||
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page {
|
||||
min-height: 100vh;
|
||||
background-image: url("../../static/image/login/loginbg.png");
|
||||
background-size: 100%;
|
||||
background-repeat: no-repeat;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
padding-top: 220rpx;
|
||||
text-align: center;
|
||||
image{
|
||||
width: 160px;
|
||||
height: 37px;
|
||||
}
|
||||
}
|
||||
|
||||
.form {
|
||||
flex: 1;
|
||||
margin: 0 76rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.inputs_button {
|
||||
.inputs {
|
||||
padding: 150rpx 0px 0;
|
||||
margin-bottom: 20rpx;
|
||||
.laber{
|
||||
color: #222222;
|
||||
font-size: 32rpx;
|
||||
line-height: 48px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.account,
|
||||
.vcode,
|
||||
.password{
|
||||
height: 80rpx;
|
||||
border-radius: 50px;
|
||||
padding: 0 30rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #F6F6F6;
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.account {
|
||||
margin-bottom: 48rpx;
|
||||
}
|
||||
.vcode {
|
||||
margin-bottom: 10px;
|
||||
padding-right: 0px;
|
||||
text {
|
||||
text-wrap: nowrap;
|
||||
font-size: 26rpx;
|
||||
padding: 14rpx 30rpx;
|
||||
background-color: #3471FF;
|
||||
border-radius: 50px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.button {
|
||||
padding: 0 32rpx;
|
||||
margin-top: 80rpx;
|
||||
view {
|
||||
line-height: 80rpx;
|
||||
border-radius: 50px;
|
||||
text-align: center;
|
||||
font-size: 32rpx;
|
||||
background: linear-gradient(to right, #3471FF, #6776FF);
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user