You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
179 lines
4.0 KiB
179 lines
4.0 KiB
<template>
|
|
<view>
|
|
<view class="containerBox">
|
|
<view class="img">
|
|
<image :src="baseImgUrl + 'liao-ning/title.png'" mode="widthFix"></image>
|
|
</view>
|
|
<view class="formUser">
|
|
<view class="userIcon">
|
|
<image :src="baseImgUrl + 'liao-ning/yonghhu-nor.png'" mode="widthFix"></image>
|
|
</view>
|
|
<view class="inputBox">
|
|
<!-- 企业端 -->
|
|
<!-- <input v-model="loginForm.urne" type="text" placeholder="请输入账号" maxlength="20" /> -->
|
|
<!-- 公众端 -->
|
|
<input v-model="form.username" type="text" placeholder="请输入辽事通手机号" maxlength="20" />
|
|
</view>
|
|
</view>
|
|
<view class="formUser">
|
|
<view class="userIcon">
|
|
<image :src="baseImgUrl + 'liao-ning/mima-nor.png'" mode="widthFix"></image>
|
|
</view>
|
|
<view class="inputBox">
|
|
<!-- 企业端 -->
|
|
<!-- <input v-model="loginForm.pdma" type="password" placeholder="请输入密码" maxlength="20" /> -->
|
|
<!-- 公众端 -->
|
|
<input v-model="form.password" type="password" placeholder="请输入密码" maxlength="20" />
|
|
</view>
|
|
</view>
|
|
<!-- 企业端 -->
|
|
<!-- <view class="formUser" id="btn" @click="handleLogin(0)"><text style="margin-right: 20rpx;">登</text>录</view> -->
|
|
<!-- 公众端 -->
|
|
<view class="formUser" id="btn" @click="handleLogin(1)"><text style="margin-right: 20rpx">登</text>录</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getCodeImg,
|
|
ControllerLogin,
|
|
remoteLogin
|
|
} from "@/api/login";
|
|
import {
|
|
getSelfInfo
|
|
} from "@/api/system/user.js";
|
|
import {
|
|
setToken
|
|
} from "@/utils/auth";
|
|
export default {
|
|
data() {
|
|
return {
|
|
baseImgUrl: getApp().globalData.config.iamgeBaseUrl,
|
|
codeUrl: "",
|
|
captchaEnabled: false,
|
|
globalConfig: getApp().globalData.config,
|
|
// 企业端
|
|
// pdma: "MTExMTEx",
|
|
// urne: "2100002310090",
|
|
// 公众端
|
|
// pdma: "UEBzc3dvcjY=",
|
|
// urne: "2100002310090",
|
|
loginForm: {
|
|
pdma: "UEBzc3dvcjY=",
|
|
urne: "2100002310090",
|
|
},
|
|
form: {
|
|
password: "",
|
|
score: "1",
|
|
username: "",
|
|
},
|
|
usertype: 0,
|
|
};
|
|
},
|
|
created() {
|
|
// this.getCode();
|
|
},
|
|
methods: {
|
|
// 登录方法
|
|
handleLogin(type) {
|
|
console.log(type);
|
|
// this.usertype = type;
|
|
// uni.setStorageSync("roleId", type);
|
|
// if (this.loginForm.urne === "") {
|
|
// this.$modal.msgError("请输入您的账号");
|
|
// } else if (this.loginForm.pdma === "") {
|
|
// this.$modal.msgError("请输入您的密码");
|
|
// } else {
|
|
// uni.showLoading({
|
|
// title: "登录中",
|
|
// });
|
|
// }
|
|
// this.$tab.reLaunch("/pages/company-home/index");
|
|
this.$tab.reLaunch("/pages/public-home/index");
|
|
},
|
|
// 密码登录
|
|
async pwdLogin() {
|
|
// 小程序登录
|
|
this.loginSuccess()
|
|
},
|
|
// 登录成功后,处理函数
|
|
loginSuccess(result) {
|
|
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.containerBox {
|
|
height: 100vh;
|
|
width: 100%;
|
|
background: url("https://yth.scjg.ln.gov.cn/sgfs-enterprise/liaoning-app-file/file/liao-ning/img_bg.png");
|
|
background-size: cover;
|
|
box-sizing: border-box;
|
|
|
|
.img {
|
|
text-align: center;
|
|
padding-top: 80rpx;
|
|
width: 100%;
|
|
margin-bottom: 40rpx;
|
|
|
|
image {
|
|
width: 300rpx;
|
|
height: 400rpx;
|
|
}
|
|
}
|
|
|
|
.formUser {
|
|
margin: 0 auto;
|
|
margin-bottom: 40rpx;
|
|
border-radius: 12rpx;
|
|
width: 85%;
|
|
background-color: #f2f4f9;
|
|
height: 100rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
|
|
.userIcon {
|
|
width: 15%;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
position: relative;
|
|
|
|
&::before {
|
|
content: "";
|
|
position: absolute;
|
|
top: 32rpx;
|
|
right: 12rpx;
|
|
width: 3rpx;
|
|
height: 40rpx;
|
|
background-color: #b9c3ce;
|
|
}
|
|
|
|
image {
|
|
width: 40rpx;
|
|
}
|
|
}
|
|
|
|
.inputBox {
|
|
width: 83%;
|
|
|
|
input {
|
|
height: 100%;
|
|
}
|
|
}
|
|
}
|
|
|
|
#btn {
|
|
background: linear-gradient(-90deg, #1969fc, #46b5fd);
|
|
justify-content: center;
|
|
align-items: center;
|
|
font-size: 34rpx;
|
|
color: #ffffff;
|
|
font-weight: 600;
|
|
}
|
|
}
|
|
</style> |