Commit 3795454a by 陈羽

update: 多企业登录

parent 08a4fabf
......@@ -49,6 +49,11 @@ export const constantRouterMap = [
component: _import('login', 'index')
},
{
path: '/loginMore',
name: '登录',
component: _import('login', 'login-more')
},
{
path: '/index',
name: 'index',
component: _import('index', 'index')
......
......@@ -3,8 +3,23 @@
<div class="daily-set-content border-box">
<div class="salutatory-set-wrap m-t-20">
<el-form label-width="100px" ref="form" :model="form">
<el-form-item label="欢迎语标题"> </el-form-item>
<el-form-item label="文本内容"> </el-form-item>
<el-form-item label="欢迎语标题"><el-input show-word-limit placeholder="请输入欢迎语标题" type="text" v-model="form.appName" maxlength="20"></el-input> </el-form-item>
<el-form-item label="文本内容">
<p>建议以文本+其他类型内容组合创建欢迎语</p>
<el-input show-word-limit placeholder="请输入文本内容" type="textarea" v-model="form.appName2" maxlength="1000"></el-input>
<div class="text-bottom flex">
<el-popover placement="top" width="388" trigger="click">
<ul class="flex flex-wrap">
<li v-for="(item, index) in emojiList" :key="index + 'emoji'">
<img :src="item.gifUrl" alt="" @click="selectEmoji(item)" />
</li>
</ul>
<img class="emoji-img cursor-pointer" slot="reference" src="https://pic01-10001430.image.myqcloud.com/b0d3c14f-69e7-4753-8fbc-3bffcff9f8ce" alt="" />
</el-popover>
<div class="put">插入&lt; 微信昵称 &gt;</div>
</div>
</el-form-item>
<el-button type="primary">保存</el-button>
</el-form>
</div>
</div>
......@@ -14,25 +29,28 @@
import { getRequest } from '@/api/api';
// import { _debounce } from '@/common/js/public';
// import showMsg from '@/common/js/showmsg';
import limitTextarea from '@/components/limit-textarea.vue';
import errMsg from '@/common/js/error';
import { emojiArr } from '@/utils/emoji';
export default {
props: {},
data() {
return {
form: {}
form: {
appName: '121sdc',
appName2: 'zxkjhckzxjhckjxzhkc'
},
emojiList: emojiArr
};
},
methods: {
/**
* 跳转
*/
changeRoute() {
this.$router.push('/contactsList');
},
/**
* 获取数据
*/
selectEmoji(item) {
const that = this;
that.form.appName2 = that.form.appName2 + item.key;
},
getData(val) {
const that = this;
let para = {
......@@ -42,7 +60,7 @@ export default {
.then(res => {
let resData = res.data;
if (resData.errorCode == 1 && resData.result) {
that.form = resData.result;
// that.form = resData.result;
}
errMsg.errorMsg(resData);
})
......@@ -64,68 +82,12 @@ export default {
destroyed() {
document.documentElement.style.backgroundColor = '#fff';
},
components: {}
components: {
limitTextarea
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.bg-ebecf0 {
background: #ebecf0;
}
.color-c0c4cc {
display: inline-block;
line-height: 34px;
padding-left: 10px;
color: #c0c4cc;
}
.condition-tips {
display: inline-block;
vertical-align: middle;
line-height: 32px;
}
.p-l-30 {
padding-left: 30px;
}
.p-l-40 {
padding-left: 40px;
}
.p-l-55 {
padding-left: 55px;
}
.p-l-85 {
padding-left: 85px;
}
.m-l-20 {
margin-left: 20px;
}
.line-50 {
height: 50px;
line-height: 50px;
}
.el-alert--info {
align-items: flex-start;
width: 700px;
padding-top: 5px;
font-size: 14px;
color: #606266;
background: rgba(240, 245, 255, 1);
border-radius: 2px;
border: 1px solid rgba(133, 165, 255, 1);
}
.el-icon-info {
width: 12px;
font-size: 12px;
color: #2f54eb;
margin-top: 5px;
}
.el-alert__content {
padding-left: 9px;
.el-alert__title {
font-size: 13px;
font-weight: 400;
color: #303133;
line-height: 22px;
}
}
.daily-set-wrap {
height: 100%;
.daily-set-content {
......@@ -135,51 +97,8 @@ export default {
}
}
}
.salutatory-wrap {
height: 160px;
background: #f5f7fa;
.top {
display: flex;
justify-content: space-between;
align-items: center;
height: 47px;
padding: 0 20px 0 29px;
.left {
font-size: 14px;
font-weight: 600;
color: #303133;
line-height: 20px;
}
.right {
.date {
font-size: 12px;
font-weight: 400;
color: #909399;
line-height: 17px;
margin-right: 30px;
}
}
}
.line {
box-sizing: border-box;
border: 1px solid #e4e7ed;
border-style: none none solid none;
}
.bottom {
padding: 16px 20px 0 29px;
.el-form-item {
margin-bottom: 13px;
>>> .el-form-item__label {
padding: 0;
}
>>> .el-form-item__label,
>>> .el-form-item__content {
line-height: 20px;
font-size: 14px;
font-weight: 400;
color: #303133;
}
}
.salutatory-set-wrap {
.text-bottom {
}
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors : 无尘
* @LastEditTime : 2020-04-04 09:45:36
-->
<template>
<div class="login-wrap">
<section>
<div class="login-body-head border-box flex">
<img class="login-body-logo" src="../../assets/logo.png" alt="logo" />
<span class="login-body-title">好办管理后台</span>
</div>
<div class="login-body">
<el-carousel arrow="always" height="262px" :autoplay="false" @change="changeEnterprise">
<el-carousel-item v-for="item in enterpriseList" :key="item.wxEnterpriseId">
<div class="info flex">
<p class="info_img"><img :src="item.corpSquareLogoUrl" alt="" /></p>
<p class="info_name">{{ item.corpName }}</p>
</div>
</el-carousel-item>
</el-carousel>
<el-button type="primary" @click="toIndex">登录</el-button>
</div>
</section>
</div>
</template>
<script>
import { _debounce } from '@/common/js/public';
import errMsg from '@/common/js/error';
import { getRequest } from '@/api/api';
export default {
name: 'login',
data() {
return {
active: 0,
enterpriseId: '', // 当前选择的 企业 id
// 企业列表
enterpriseList: [
/*{
enterpriseId : '1231',
logoUrl: require("../../assets/logo.png"),
enterpriseName: '达摩网络'
},*/
],
// 登录
numberCode: ''
};
},
computed: {},
methods: {
/**
* 处理路由跳转
*/
toRouterView(val) {
const that = this;
// 模拟检查数据,有两个参数
that.$router.push({
path: val.path
});
},
/**
* 登录
*/
toIndex: _debounce(function() {
const that = this;
that.toLogin();
}, 500),
/**
* 登录 --- api
*/
toLogin() {
const that = this;
const href = `${window.location.origin}/haoban-manage3-web/gic-login?wxEnterpriseId=${that.enterpriseList[that.active].wxEnterpriseId}&random=${that.$route.query.random}`;
window.location.href = href;
},
changeEnterprise(val) {
this.active = val;
},
getList() {
getRequest(`/haoban-manage3-web/login-wx-enterprise-list?random=${this.$route.query.random}`, {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
this.enterpriseList = resData.result;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
this.$message.error({
duration: 1000,
message: error.message
});
});
}
},
mounted() {
const that = this;
if (this.$route.query.random) {
that.getList();
}
if (!!localStorage.getItem('userInfos')) {
localStorage.removeItem('userInfos');
}
},
components: {}
};
</script>
<style lang="scss" scoped>
.login-wrap {
width: 100%;
min-height: 100vh;
padding-top: 178px;
box-sizing: border-box;
background-image: linear-gradient(180deg, rgba(142, 166, 236, 0.11) 0%, rgba(142, 166, 236, 0) 100%);
.login-body-head {
justify-content: center;
align-items: center;
margin-bottom: 34px;
.login-body-logo {
width: 26px;
margin-right: 13px;
}
.login-body-title {
font-size: 16px;
font-weight: 600;
color: #2da8ff;
line-height: 22px;
}
}
.login-body {
width: 430px;
height: 283px;
background: #ffffff;
box-shadow: 0px 6px 8px 0px rgba(215, 218, 231, 0.49);
border-radius: 8px;
margin: 0 auto;
>>> .el-carousel__indicators {
display: none;
}
.info {
padding-top: 70px;
flex-direction: column;
align-items: center;
.info_img {
width: 46px;
height: 46px;
border-radius: 100%;
overflow: hidden;
margin-bottom: 17px;
img {
width: 100%;
}
}
.info_name {
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 20px;
}
}
}
.el-button {
position: relative;
top: -56px;
z-index: 3;
display: block;
margin: 0 auto;
width: 281px;
height: 40px;
background: #2f54eb;
border-radius: 2px;
}
}
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment