|
|
@ -20,7 +20,7 @@
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
</up-input>
|
|
|
|
</up-input>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="login-input">
|
|
|
|
<view class="login-input" >
|
|
|
|
<up-input placeholder="请输入密码" :password="true">
|
|
|
|
<up-input placeholder="请输入密码" :password="true">
|
|
|
|
<template #prefix>
|
|
|
|
<template #prefix>
|
|
|
|
<up-text
|
|
|
|
<up-text
|
|
|
@ -39,19 +39,29 @@
|
|
|
|
<span>123123123</span>
|
|
|
|
<span>123123123</span>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<up-code-input v-model="code" :maxlength="6"></up-code-input>
|
|
|
|
<up-code-input v-model="code" :maxlength="6"></up-code-input>
|
|
|
|
|
|
|
|
<view style="display: flex; justify-content: space-between; align-items: center; margin-top: 20rpx;">
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
style="text-align: left; color: #e3af1c;"
|
|
|
|
|
|
|
|
@click=""
|
|
|
|
|
|
|
|
>重新发送</span>
|
|
|
|
|
|
|
|
<span
|
|
|
|
|
|
|
|
style="text-align: right; color: #e3af1c;"
|
|
|
|
|
|
|
|
@click="goToPassword"
|
|
|
|
|
|
|
|
>密码登录</span>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view> </view>
|
|
|
|
|
|
|
|
<view> </view>
|
|
|
|
<view> </view>
|
|
|
|
<view
|
|
|
|
<view
|
|
|
|
style="text-align: right; color: #e3af1c; margin-top: 20rpx"
|
|
|
|
style="text-align: right; color: #e3af1c; margin-top: 20rpx"
|
|
|
|
@click="toCode"
|
|
|
|
@click="toCode" v-if="!isCode"
|
|
|
|
>验证码登录</view
|
|
|
|
>验证码登录</view
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<up-button
|
|
|
|
<up-button
|
|
|
|
style="width: 626rpx; margin: auto; height: 96rpx"
|
|
|
|
style="width: 626rpx; margin: auto; height: 96rpx;margin-top: 90rpx;"
|
|
|
|
color="#EFC54E"
|
|
|
|
color="#EFC54E"
|
|
|
|
throttleTime="5"
|
|
|
|
throttleTime="5"
|
|
|
|
:loading="loading"
|
|
|
|
:loading="loading"
|
|
|
|
|
|
|
|
@click="logining"
|
|
|
|
v-if="!isCode"
|
|
|
|
v-if="!isCode"
|
|
|
|
>登录</up-button
|
|
|
|
>登录</up-button
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -62,6 +72,10 @@
|
|
|
|
<script setup>
|
|
|
|
<script setup>
|
|
|
|
import { ref } from "vue";
|
|
|
|
import { ref } from "vue";
|
|
|
|
import useToast from "@/hooks/toast/useToast.js";
|
|
|
|
import useToast from "@/hooks/toast/useToast.js";
|
|
|
|
|
|
|
|
import {
|
|
|
|
|
|
|
|
userLogin
|
|
|
|
|
|
|
|
} from "@/api/login.js";
|
|
|
|
|
|
|
|
console.log(userLogin())
|
|
|
|
const { showMessage } = useToast();
|
|
|
|
const { showMessage } = useToast();
|
|
|
|
const loading = ref(false);
|
|
|
|
const loading = ref(false);
|
|
|
|
const isCode = ref(false);
|
|
|
|
const isCode = ref(false);
|
|
|
@ -72,6 +86,25 @@ const code = ref("");
|
|
|
|
const toCode = () => {
|
|
|
|
const toCode = () => {
|
|
|
|
isCode.value = true;
|
|
|
|
isCode.value = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
const goToPassword = () =>{
|
|
|
|
|
|
|
|
isCode.value=false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 登录方法
|
|
|
|
|
|
|
|
const logining = () => {
|
|
|
|
|
|
|
|
loading.value = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
|
|
|
url: '/pages/index/index',
|
|
|
|
|
|
|
|
success: () => {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
fail: () => {
|
|
|
|
|
|
|
|
loading.value = false;
|
|
|
|
|
|
|
|
showMessage({ type: "default", message: "跳转失败" });
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
<style lang="scss" scoped>
|
|
|
|