Files
x-forend/src/pages/edit-password/index.vue
T
2025-01-28 10:55:29 +08:00

124 lines
3.5 KiB
Vue

<route lang="json5">
{
style: {
navigationBarTitleText: '忘记密码',
navigationStyle: 'custom',
},
notNeedLogin: true,
}
</route>
<template>
<view class="login-container pb-50 relative">
<NavBar />
<view class="pt-45">
<view class="mx-15 px-15 shadow-[0_0_10px_rgba(10,68,245,0.1)] rounded-10">
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/phone.png" mode="aspectFit" />
<input
type="text"
placeholder-class="text-#889BC6"
class="text-right flex-1 text-14"
placeholder="请输入用户名"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/message.png" mode="aspectFit" />
<input
type="text"
placeholder-class="text-#889BC6"
class="text-right flex-1 text-14"
placeholder="请输入短信验证码"
/>
<view
class="py-6 rounded-full ml-15 px-15 text-12 text-white btn-gradient text-14 text-#889BC6"
@click="handleGetCode"
>
获取验证码
</view>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请输入登录密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请再次输入登录密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请输入支付密码"
/>
</view>
<view class="flex items-center py-15">
<image class="w-24 h-24" src="@/static/images/login/password.png" mode="aspectFit" />
<input
placeholder-class="text-#889BC6"
type="password"
class="text-right flex-1 text-14"
placeholder="请再次输入支付密码"
/>
</view>
</view>
<view
class="mt-50 text-center py-12 rounded-full mx-15 text-15 text-white btn-gradient"
@click="handleRegister"
>
确认
</view>
</view>
</view>
</template>
<script lang="ts" setup>
import NavBar from '@/components/NavBar.vue'
import { isLogged } from '@/interceptors/route'
import { useUserStore } from '@/store/user'
const userStore = useUserStore()
let redirect = '/'
onLoad((options) => {
redirect = options.redirect ?? '/'
})
const handleRegister = () => {
userStore.setUserInfo({
token: '123456',
})
uni.reLaunch({
url: redirect,
})
}
onLoad(() => {
if (isLogged()) {
uni.reLaunch({
url: redirect,
})
}
})
</script>
<style lang="scss" scoped>
.login-container {
box-sizing: border-box;
min-height: 100vh;
background-image: url('@/static/images/login-bg.jpg');
background-repeat: no-repeat;
background-size: cover;
}
</style>