|
- <template>
- <view class="content">
- <view class="sadsadasdasdsadasd">智能高效客户管理平台</view>
- <view class="sction">
- <view class="mama">
- <view class="mamaz">
- <input type="text" v-model="msg" maxlength="4" placeholder="请输入验证码" placeholder-class="input-class" class="input" />
- </view>
- <view class="mamay">
- <view class="sada" v-if="sendAuthCode" style="font-size: 35rpx;" @click="getAuthCode">获取验证码</view>
- <text class="sada" v-if="!sendAuthCode">
- 重新发送
- <text>({{ auth_time }})</text>
- </text>
- </view>
- </view>
- <view class="login-btn" :style="{ background: msg == '' ? '#F2F2F2' : '#2B6EFF' }" @click="denglu"><text
- class="">确认</text></view>
- <view class="code-login" @click="passwordlogin"><text>密码登录</text></view>
- </view>
- </view>
- </template>
-
- <script>
- var util = require("../../utils/util.js");
- var config = require("../../config");
- var app = getApp();
- export default {
- data() {
- return {
- sendAuthCode: true,
- auth_time: 0,
- msg: '',
- phonecet: '',
- role:''
- };
- },
- onLoad: function(options) {
- var phonese = options.username;
- var phonexxz = phonese.substring(0, 3) + '****' + phonese.substring(7);
- this.phone = phonexxz,
- this.phonecet = options.username,
- this.role = options.role
-
- this.sendAuthCode = false;
- this.auth_time = 60;
- var auth_timetimer = setInterval(() => {
- this.auth_time--;
- if (this.auth_time <= 0) {
- this.sendAuthCode = true;
- clearInterval(auth_timetimer);
- }
- }, 1000);
- },
- methods: {
- //跳转密码登录页面
- passwordlogin() {
- uni.reLaunch()({
- url: '/pages/login/index',
- })
- },
- //获取验证码
- getAuthCode() {
- this.sendAuthCode = false;
- this.auth_time = 60;
- var auth_timetimer = setInterval(() => {
- this.auth_time--;
- if (this.auth_time <= 0) {
- this.sendAuthCode = true;
- clearInterval(auth_timetimer);
- }
- }, 1000);
- },
- //登录
- denglu() {
- if (this.msg=='') {
- uni.showToast({
- title: '验证码不能为空',
- icon: 'none'
- });
- return
- }
- if (this.msg.length == 4) {
- uni.navigateTo({
- url: '/pages/login/Setthepassword?username='+'18655732363',
- })
- } else {
- uni.showToast({
- title: '验证码位数不正确',
- icon: 'none'
- });
- }
-
- },
- }
- };
- </script>
-
- <style>
- .mama {
- width: 620rpx;
- display: flex;
- border-bottom: 1px solid #E1E1E1;
- margin: 60rpx auto;
- }
-
- .sadsadasdasdsadasd {
- font-size: 34rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #008EF2;
- width: 100%;
- text-align: center;
- padding-top: 340rpx;
- }
-
- .mamaz {
- width: 50%;
- height: 90rpx;
- }
-
- .mamay {
- width: 50%;
- height: 90rpx;
- }
-
- .input {
- width: 350rpx;
- color: #78DFB0;
- height: 100%;
- line-height: 90rpx;
- font-size: 17px;
- color: #171717;
- }
-
- .sada {
- width: 70%;
- line-height: 90rpx;
- color: #2B6EFF;
- text-align: right;
- font-size: 35rpx;
- margin-left: 100rpx;
- display: block;
- }
- .content {
- margin: 0;
- padding: 0;
- background-image: url(https://qufang.oss-cn-beijing.aliyuncs.com/channelHelper/background.png);
- background-size: 100vw auto;
- background-repeat: no-repeat;
- }
-
- .login-text {
- font-size: 60rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: rgba(23, 23, 23, 1);
- letter-spacing: 8rpx;
- margin-left: 75rpx;
- font-weight: bold;
- }
-
- .login-input {
- border-bottom: 1px solid #e1e1e1;
- color: #c9cac9;
- margin: 98rpx 64rpx 200rpx 75rpx;
- font-size: 17px;
-
- }
-
- .login-btn {
- margin: 0 auto;
- margin-top: 240rpx;
- width: 567rpx;
- height: 86rpx;
- border-radius: 2em;
- font-size: 17px;
- font-weight: bold;
- border: none;
- display: flex;
- justify-content: center;
- align-items: center;
- color: #ffffff;
- }
-
- .code-login {
- display: flex;
- justify-content: center;
- margin-top: 40rpx;
- color: #D6D7D6;
- margin-bottom: 200rpx;
- font-size: 30rpx;
- }
-
- .log-box {
- display: flex;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- font-size: 28rpx;
- color: #bfc0bf;
- margin-bottom: 65rpx;
- }
-
- .hengx {
- margin: 0 20rpx 0 20rpx;
- height: 2rpx;
- width: 232rpx;
- background: #e1e1e1;
- }
-
- .wechat {
- display: flex;
- justify-content: center;
- align-items: center;
- width: 93rpx;
- height: 93rpx;
- background: rgba(255, 255, 255, 1);
- box-shadow: 0px 10rpx 30rpx rgba(120, 223, 176, 0.22);
- border-radius: 50%;
- margin: 0 auto;
- }
-
- .btn-get {
- width: 250rpx;
- font-size: 17px;
- color: #c9cac9;
- position: relative;
- top: -290rpx;
- right: -450rpx;
- }
-
- .input-class {
- color: #D6D7D6;
- font-size: 17px;
- letter-spacing: 1rpx;
- }
- </style>
|