2024-01-15 14:02:04 +08:00
|
|
|
|
<template>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view class="login_page ">
|
2024-03-13 16:07:11 +08:00
|
|
|
|
<view class="iconfont icon-shouye" @click="toIndex()" style="height: 25px;position: absolute;top: 60px;width: 30px;"></view>
|
2024-01-16 16:42:05 +08:00
|
|
|
|
<view class="login_top">
|
|
|
|
|
<view class="login_logo">
|
2024-04-23 11:48:55 +08:00
|
|
|
|
<image src="https://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/loginLogo.png" class="demupng"></image>
|
2024-01-16 16:42:05 +08:00
|
|
|
|
</view>
|
2024-04-23 11:48:55 +08:00
|
|
|
|
<view class="name">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
自动化MES管理系统
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="login_centre">
|
|
|
|
|
<view class="login_switch text_color_black font14">
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view :class="['login_name', tab==1?'font_bold':'']" @click="changeTab(1)">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
账号登录
|
|
|
|
|
</view>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view :class="['login_name', tab==2?'font_bold':'']" @click="changeTab(2)">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
手机号登录
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view class="font12 text_color_black" v-if="tab==1">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
<view class="login_input">
|
2024-03-13 16:07:11 +08:00
|
|
|
|
<input placeholder="请输入账号" v-model="accountValue"/>
|
2024-01-16 16:42:05 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="login_input">
|
2024-03-13 16:07:11 +08:00
|
|
|
|
<input password type="text" v-model="passValue" placeholder="请输入密码" />
|
2024-01-16 16:42:05 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view class="font12 text_color_black" v-if="tab==2">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
<view class="login_input">
|
|
|
|
|
<input placeholder="请输入手机号"/>
|
|
|
|
|
</view>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
<view class="flex_layout">
|
|
|
|
|
<input class="login_input login_code" placeholder="请输入验证码"/>
|
2024-01-16 16:42:05 +08:00
|
|
|
|
<view class="getCaptcha">{{codename}}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
2024-04-23 11:48:55 +08:00
|
|
|
|
<view class="" v-if="tab==1" style="color: #C4C4C4;font-size: 12px;padding-top: 14px;">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
记住密码
|
|
|
|
|
</view>
|
2024-03-13 16:07:11 +08:00
|
|
|
|
<view class="loginbut" @click="login()">
|
2024-01-16 16:42:05 +08:00
|
|
|
|
登录
|
|
|
|
|
</view>
|
2024-03-13 16:07:11 +08:00
|
|
|
|
<button class="persontc " type="default" open-type="getPhoneNumber" @getphonenumber="getPhone">
|
|
|
|
|
<view class="" style="color: #009688;text-align: center;font-size: 13px;">
|
|
|
|
|
手机号快捷登录
|
|
|
|
|
</view>
|
|
|
|
|
</button>
|
|
|
|
|
<!-- <button class="persontc" open-type="getPhoneNumber" @getphonenumber="getPhoneNumber">
|
|
|
|
|
<view class="" style="color: #009688;text-align: center;font-size: 13px;">
|
|
|
|
|
手机号快捷登录
|
|
|
|
|
</view>
|
|
|
|
|
</button> -->
|
2024-01-16 16:42:05 +08:00
|
|
|
|
</view>
|
|
|
|
|
<view class="login_below">
|
|
|
|
|
<view class="">
|
|
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
<view class="">
|
|
|
|
|
|
|
|
|
|
</view>
|
2024-02-19 16:53:38 +08:00
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
2024-01-16 16:42:05 +08:00
|
|
|
|
codename:'获取验证码',
|
2024-02-19 16:53:38 +08:00
|
|
|
|
tab:1,
|
2024-03-13 16:07:11 +08:00
|
|
|
|
accountValue:'long',
|
|
|
|
|
passValue:'123456',
|
2024-02-19 16:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
//切换登录方式
|
|
|
|
|
changeTab(tab){
|
|
|
|
|
this.$set(this,"tab",tab);
|
|
|
|
|
},
|
2024-03-13 16:07:11 +08:00
|
|
|
|
toIndex(){
|
2024-04-23 11:48:55 +08:00
|
|
|
|
uni.reLaunch({
|
|
|
|
|
url:'/pages/index/index'
|
2024-03-13 16:07:11 +08:00
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
login(){
|
|
|
|
|
this.$api.postFuncLoading('/user.login',{login_name:this.accountValue,password:this.passValue}).then(res=>{
|
|
|
|
|
let obj = new Object();
|
|
|
|
|
obj.mes_user_name=res.data.user.name;
|
|
|
|
|
obj.mes_token=res.data.token;
|
|
|
|
|
this.$wf.setLoginData(obj)
|
|
|
|
|
|
|
|
|
|
uni.switchTab({
|
|
|
|
|
url:'/pages/index/index'
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
},
|
2024-02-19 16:53:38 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2024-01-16 16:42:05 +08:00
|
|
|
|
<style>
|
|
|
|
|
.login_page{
|
|
|
|
|
padding: 0 32px;
|
|
|
|
|
background: url('https://dm-auto.oss-cn-shanghai.aliyuncs.com/mes_wechat/background.png') no-repeat;
|
2024-04-23 11:48:55 +08:00
|
|
|
|
background-position: center;
|
2024-01-16 16:42:05 +08:00
|
|
|
|
background-size: cover;
|
2024-02-19 16:53:38 +08:00
|
|
|
|
height: 100vh;
|
|
|
|
|
}
|
2024-04-23 11:48:55 +08:00
|
|
|
|
.login_top{padding-top: 160px;padding-bottom: 32px;}
|
|
|
|
|
.login_top .name{letter-spacing: 1.2px;background: linear-gradient(to right, #fff, rgba(255,255,255,0.1));
|
|
|
|
|
-webkit-background-clip: text;
|
|
|
|
|
-webkit-text-fill-color: transparent;
|
|
|
|
|
}
|
2024-02-19 16:53:38 +08:00
|
|
|
|
.login_logo{display: flex;align-items: center;margin-bottom: 17px;}
|
2024-04-23 11:48:55 +08:00
|
|
|
|
.demupng{width: 117px;height: 43px;}
|
2024-01-16 16:42:05 +08:00
|
|
|
|
.login_centre{border-radius: 16px;background: #FFF;padding: 20px 24px 40px;}
|
|
|
|
|
.login_switch{display: flex;}
|
2024-03-13 16:07:11 +08:00
|
|
|
|
.login_name{flex: 1;text-align: center;
|
|
|
|
|
padding-bottom: 5px;
|
|
|
|
|
margin-bottom: 10px;
|
|
|
|
|
}
|
|
|
|
|
.login_name:focus {
|
|
|
|
|
outline: none; /* 去除默认的外边框效果 */
|
|
|
|
|
border-width: 3px; /* 当元素被点击或者获得焦点时,将边框宽度修改为3像素 */
|
|
|
|
|
}
|
|
|
|
|
.font_bold{
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
.font_bold::after{
|
|
|
|
|
content: '';
|
|
|
|
|
position: absolute;
|
|
|
|
|
left: calc(50% - 15px);
|
|
|
|
|
bottom: -4px;
|
|
|
|
|
z-index: 10;
|
|
|
|
|
width: 30px;
|
2024-04-23 11:48:55 +08:00
|
|
|
|
border-bottom: 3px solid #009688;
|
2024-03-13 16:07:11 +08:00
|
|
|
|
}
|
2024-04-23 11:48:55 +08:00
|
|
|
|
.login_input{border-radius: 21.5px;background: #F3F5F9;margin-top: 12px;padding: 9px 15px;font-size: 14px;}
|
2024-02-19 16:53:38 +08:00
|
|
|
|
.getCaptcha{border-radius: 21.5px;background: #009688;height: auto;color: white;display: flex;align-items: center;width: 40%;justify-content: center;}
|
|
|
|
|
.flex_layout{display: flex;margin-top: 12px;}
|
|
|
|
|
.login_code{margin-top: unset;width:60%;margin-right: 12px;}
|
2024-04-23 11:48:55 +08:00
|
|
|
|
.loginbut{background: #009688;text-align: center;margin-top: 40px;margin-bottom: 18px;padding: 9px;border-radius: 66rpx;}
|
2024-03-13 16:07:11 +08:00
|
|
|
|
.persontc{
|
|
|
|
|
border: none;
|
|
|
|
|
margin: 0;
|
|
|
|
|
padding: 0;
|
|
|
|
|
outline: none;
|
|
|
|
|
border-radius: 0;
|
|
|
|
|
background: none!important;
|
|
|
|
|
line-height: normal;
|
|
|
|
|
}
|
|
|
|
|
.persontc::after {
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-19 16:53:38 +08:00
|
|
|
|
</style>
|