Commit 75f91932 by caoyanzhi

init commit

parent 5ef14d31
/*
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-07-20 15:30:24
*/
// import Vue from 'vue';
import axios from 'axios';
import qs from 'qs';
import { Message } from 'element-ui';
/**
* 获取好办 企业 id
*/
// if (!!localStorage.getItem('userInfos')) {
// let haobanSign = JSON.parse(localStorage.getItem('userInfos')).enterpriseId;
// axios.defaults.headers.post['haobansign'] = haobanSign;
// axios.defaults.headers.get['haobansign'] = haobanSign;
// }
axios.defaults.timeout = 500000;
let local = window.location.origin;
/* if (local.indexOf('localhost') != -1) {
local = 'http://www.gicdev.com';
} */
let axiosPromiseArr = []; //储存cancel toke
let pending = []; //声明一个数组用于存储每个ajax请求的取消函数和ajax标识
let CancelToken = axios.CancelToken;
let removePending = ever => {
for (let p in pending) {
if (pending[p].u === ever.url + '&' + ever.method) {
//当当前请求在数组中存在时执行函数体
pending[p].f(); //执行取消操作
pending.splice(p, 1); //把这条记录从数组中移除
}
}
};
axios.interceptors.request.use(
config => {
removePending(config); //在一个ajax发送前执行一下取消操作
config.cancelToken = new CancelToken(c => {
// 这里的ajax标识我是用请求地址&请求方式拼接的字符串,当然你可以选择其他的一些方式
pending.push({
u: config.url + '&' + config.method,
f: c
});
});
// 在发送请求设置cancel token
config.cancelToken = new axios.CancelToken(cancel => {
axiosPromiseArr.push({
cancel
});
});
return config;
},
err => {
Message.error({ message: '请求超时!' });
return Promise.resolve(err);
}
);
axios.interceptors.response.use(
data => {
removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
// console.log(data);
if (data.status && data.status == 200 && data.data.errorCode != 1) {
// Message.error({message: data.data.message});
if (data.data.errorCode == 4) {
if (window.location.href.indexOf('gic-error') != -1) {
return false;
}
window.location.href = local + '/haoban-4/#/login';
}
/* if (data.data.errorCode == 3) {
Message.error({ message: data.data.message });
window.location.href = local + '/haoban-3/#/login';
} */
if (data.data.errorCode == 10 || data.data.errorCode == 7) {
window.location.href = local + '/haoban-4/#/index';
}
return data;
}
return data;
},
err => {
// console.log(err, typeof err, err.response);
if (axios.isCancel(err)) {
// console.log('请求取消');
}
if (err.response.status == 502) {
window.location.href = local + '/haoban-4/#/login';
Message.error({ message: '服务异常⊙﹏⊙∥' });
}
// Message.error({message: err.response.message});
if (err.response.status == 504 || err.response.status == 404) {
// window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '服务异常⊙﹏⊙∥'});
} else if (err.response.status == 403) {
// window.location.href= local + "/haoban-3/#/login"
// Message.error({message: '权限不足,请联系管理员!'});
} else {
window.location.href = local + '/haoban-4/#/login';
Message.error({ message: '登录失效!' });
}
return Promise.resolve(err);
}
);
/*
*
* 统一 get 请求方法
* @url: 请求的 url
* @params: 请求带的参数
* @header: 带 token
*
*/
export const getRequest = (url, params) => {
params.requestProject = 'haoban-manage-web';
return axios({
method: 'get',
url: `${local}${url}`,
data: {},
params: params,
headers: {
'Content-type': 'application/x-www-form-urlencoded'
}
});
};
/**
*
* 统一 post 请求方法
* url: 请求的 url
* @params: 请求带的参数
* @header:
*
*/
export const postRequest = (url, params) => {
params.requestProject = 'haoban-manage-web';
return axios({
method: 'post',
url: `${local}${url}`,
data: qs.stringify(params),
headers: {
'Content-type': 'application/x-www-form-urlencoded'
}
});
};
export const postJsonRequest = (url, params) => {
params.requestProject = 'haoban-manage-web';
return axios({
method: 'post',
url: `${local}${url}`,
data: '{}',
params: params,
headers: { 'Content-Type': 'application/json;charset=UTF-8' }
});
};
/**
* method: 'post'
* 'Content-Type': 'application/json;charset=UTF-8'
* @data: params
* @requestProject: 'haoban-manage-web'
*
*/
export const postJson = (url, params) => {
// params.requestProject = "haoban-manage-web";
return axios({
method: 'post',
url: `${local}${url}`,
data: params,
params: { requestProject: 'haoban-manage-web' },
headers: { 'Content-Type': 'application/json;charset=UTF-8' } //multipart/form-data{"token": token}
});
};
/**
* method: 'post'
* data: params
*
*/
export const postForm = (url, params) => {
params.requestProject = 'haoban-manage-web';
return axios({
method: 'post',
url: `${local}${url}`,
data: params,
headers: {}
});
};
/**
* post excel
*/
export const postExcel = (url, params) => {
params.requestProject = 'haoban-manage-web';
return axios({
method: 'post',
url: `${local}${url}`,
data: qs.stringify(params),
responseType: 'blob',
headers: {
'content-type': 'application/x-www-form-urlencoded'
}
});
};
import getFetch from './getFetch.js';
let api = {
// 获取品牌列表
getBrandList: '/brand-list',
// 获取经营类目
getCategory: '/list-all-businesscategory',
// 编辑、新建品牌
saveBrand: '/brand-save',
// 删除品牌
delBrand: {
url: '/brand-del',
useIntercept: false
},
// 并入、批量并入
mergeBrand: {
url: '/brand-merge',
useIntercept: false
},
// 获取关联商户品牌列表
getConcatBrandList: '/brand-ref-list',
}
api = getFetch(api, '/gic-operation-web');
export default api;
import { request } from '@/utils/request.js';
export default function getFetch (api, baseUrl) {
api = api || {};
let keys = Object.keys(api);
keys.forEach(key => {
let opt = api[key];
if (typeof opt === 'string') opt = { url: opt };
opt.url = `${baseUrl}${opt.url}`;
api[key] = params => request(opt, params);
})
return api;
}
import * as api from './api'; import getFetch from './getFetch.js';
let api = {
// 获取用户信息
getUserInfo: '/user/userinfo',
// 登出
getLoginOut: '/logout'
}
api = getFetch(api, '/gic-operation-web');
export default api; export default api;
\ No newline at end of file
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-03-11 17:33:01
-->
<template>
<div class="navwrap border-box flex flex-space-between">
<el-breadcrumb separator-class="el-icon-arrow-right">
<template v-for="(item, index) in navpath">
<template v-if="!!item.path">
<el-breadcrumb-item :key="'nav' + index" :to="{ path: item.path }" @click="changeRoute(item.path, item.relocation)">
<span class="el-breadcrumb__inner is-link" @click="changeRoute(item.path, item.relocation)">
{{ item.name }}
</span>
</el-breadcrumb-item>
</template>
<template v-else>
<el-breadcrumb-item :key="'nav' + index">{{ item.name }}</el-breadcrumb-item>
</template>
</template>
</el-breadcrumb>
<div class="my-customer-brand">
<el-tooltip class="item" effect="dark" content="不同品牌的工作台可分别进行管理。点击后切换,可以管理不同品牌下的应用" placement="top-start">
<span class="font-14 color-606266" style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">授权商户名称 </span>
</el-tooltip>
<el-select class="p-l-10" v-model="activeBrand" placeholder="请选择" @change="changeSelect">
<el-option v-for="item in brandListData" :key="item.enterpriseId" :label="item.enterpriseName" :value="item.enterpriseId"> </el-option>
</el-select>
</div>
</div>
</template>
<script>
import { postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'navpath',
data() {
return {
projectName: 'haoban', // 当前项目名
activeBrand: '',
brandListData: []
};
},
props: {
navpath: {
type: Array,
default: function() {
return [];
}
},
slotFlag: {
type: Boolean,
default: false
},
navtip: {
type: Boolean,
default: false
},
subNavText: {
type: String,
default: ''
}
},
watch: {
brandId: function(newData, oldData) {
const that = this;
that.getBrandData();
}
},
methods: {
changeRoute(path, relocation) {
let that = this;
if (relocation) {
window.location.href = path;
} else {
that.$router.push(path);
}
},
/**
* 选择品牌
*/
changeSelect(val) {
let that = this;
let enterpriseId = '';
that.brandListData.forEach(ele => {
if (ele.enterpriseId == val) {
enterpriseId = ele.enterpriseId;
}
});
that.$emit('selectBrandId', val, enterpriseId);
},
/**
* 获取品牌
*/
getBrandData() {
const that = this;
postRequest('/haoban-manage3-web/wx-enterprise-list', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!!resData.result && !!resData.result.length) {
that.brandListData = resData.result;
if (!!that.$route.query.enterpriseId) {
that.activeBrand = that.$route.query.enterpriseId;
that.$emit('selectBrandId', that.$route.query.enterpriseId);
return false;
}
that.activeBrand = that.brandListData[0].enterpriseId;
// 由于门店选择组件中没有品牌id ,只有 groupId
that.$emit('selectBrandId', that.brandListData[0].enterpriseId, that.brandListData[0].enterpriseId);
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
mounted() {
const that = this;
that.getBrandData();
}
};
</script>
<style type="text/less" lang="less" scoped>
.navwrap {
height: 48px;
line-height: 48px;
padding: 0 20px;
box-sizing: border-box;
.el-breadcrumb {
line-height: 48px;
}
}
.boxbttom {
border-bottom: 1px solid #e4e7ed;
}
.boxshow {
border-bottom: 1px solid #e4e7ed;
box-shadow: 5px -1px 5px #dfdfdf;
}
.navtitle {
margin: 24px 0 0 0;
font-size: 20px;
color: #303133;
font-weight: 500;
}
.navtip {
width: 100%;
height: 38px;
line-height: 38px;
font-size: 13px;
border-radius: 2px;
color: #606266;
background-color: #f4f4f5;
}
.navmTop {
margin-top: 25px;
}
.navtipcolor {
margin: 0 12px;
color: #2f54eb;
}
.el-breadcrumb__inner.is-link:hover,
.el-breadcrumb__inner a:hover {
color: #2f54eb;
}
.el-breadcrumb__item:last-child .el-breadcrumb__inner,
.el-breadcrumb__item:last-child .el-breadcrumb__inner a,
.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,
.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover {
font-weight: 700;
text-decoration: none;
cursor: pointer;
color: #303133;
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-03-11 17:32:16
-->
<template>
<div class="navwrap border-box">
<el-breadcrumb separator-class="el-icon-arrow-right">
<template v-for="(item, index) in navpath">
<template v-if="!!item.path">
<el-breadcrumb-item :key="'nav' + index" :to="{ path: item.path }" @click="changeRoute(item.path, item.relocation)">
<span class="el-breadcrumb__inner is-link" @click="changeRoute(item.path, item.relocation)">
{{ item.name }}
</span>
</el-breadcrumb-item>
</template>
<template v-else>
<el-breadcrumb-item :key="'nav' + index">{{ item.name }}</el-breadcrumb-item>
</template>
</template>
</el-breadcrumb>
</div>
</template>
<script>
import { postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
export default {
name: 'navpath',
data() {
return {
projectName: 'member' // 当前项目名
// navpath: [
// {
// name: '首页',
// path: ''
// },
// {
// name: '会员标签',
// path: ''
// },
// ],
};
},
props: {
navpath: {
type: Array,
default: function() {
return [];
}
},
slotFlag: {
type: Boolean,
default: false
},
navtip: {
type: Boolean,
default: false
},
subNavText: {
type: String,
default: ''
}
},
methods: {
changeRoute(path, relocation) {
let that = this;
if (relocation) {
window.location.href = path;
} else {
that.$router.push(path);
}
},
// get nav path
getNavPath() {
let that = this;
let para = {
project: that.projectName,
path: that.$route.path.split('/')[1]
};
postRequest('/api-auth/get-current-memu-data', para)
.then(res => {
// console.log(res,res.data,res.data.errorCode)
var resData = res.data;
if (resData.errorCode == 0) {
if (!resData.result) {
return false;
}
that.navpath = [];
if (!!resData.result.list && !!resData.result.list.length) {
resData.result.list.forEach(function(ele, index) {
ele.name = ele.menuName;
ele.path = '';
if (index == resData.result.list.length - 1) {
ele.path = '/' + ele.menuUrl;
}
if (index > 0) {
that.navpath.push(ele);
}
});
// that.navpath = resData.result.list
}
// that.navpath[0].name = resData.result.level2.menuName;
// that.navpath[0].path = ''
// that.navpath[1].name = resData.result.level3.menuName;
// that.navpath[1].path = ''
// if (!!resData.result.level4) {
// that.navpath[2] = {
// name:'',
// path: ''
// }
// that.navpath[2].name = resData.result.level4.menuName;
// that.navpath[2].path = ''
// }
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
// that.toLogin()
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
/* eslint-disable */
mounted() {
// var that = this;
// that.getNavPath();
}
};
</script>
<style scoped>
.navwrap {
padding: 12px 20px;
}
.boxbttom {
border-bottom: 1px solid #e4e7ed;
}
.boxshow {
border-bottom: 1px solid #e4e7ed;
box-shadow: 5px -1px 5px #dfdfdf;
}
.navtitle {
margin: 24px 0 0 0;
font-size: 20px;
color: #303133;
font-weight: 500;
}
.navtip {
width: 100%;
height: 38px;
line-height: 38px;
font-size: 13px;
border-radius: 2px;
color: #606266;
background-color: #f4f4f5;
}
.navmTop {
margin-top: 25px;
}
.navtipcolor {
margin: 0 12px;
color: #2f54eb;
}
.el-breadcrumb__inner.is-link:hover, .el-breadcrumb__inner a:hover {
color: #2f54eb;
}
.el-breadcrumb__item:last-child .el-breadcrumb__inner,
.el-breadcrumb__item:last-child .el-breadcrumb__inner a,
.el-breadcrumb__item:last-child .el-breadcrumb__inner a:hover,
.el-breadcrumb__item:last-child .el-breadcrumb__inner:hover {
font-weight: 700;
text-decoration: none;
cursor: pointer;
color: #303133;
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 17:21:32
* @LastEditors: 无尘
* @LastEditTime: 2020-07-20 14:35:39
-->
<template>
<div class="navheader">
<!-- logo -->
<div class="navheader-logo fl cursor-pointer" :class="{ moveleft: isCollapse, moveright: !isCollapse }" @click="toIndex"><span class="pro-name">好办管理平台</span></div>
<div class="navheader-item fl">
<template v-for="(menuitem, index) in menuHead">
<a :key="index" :class="['itemlink menu-mall menu-font-16']" @click="changeRouter(menuitem.url)">
<span :class="['inline-block bottom', menuitem.url.indexOf(pathName) != -1 ? 'current-module' : '']">{{ menuitem.rightName }}</span>
</a>
</template>
<!-- 最右侧用户信息 -->
<div class="navuserinfo fr">
<span class="span-log color-909399 iconfont iconrizhifuwu"></span>
<el-popover placement="bottom" title="" width="95" trigger="hover" popper-class="user-header-pop" style="min-width: 95px;">
<ul class="navsuerwrap">
<li class="user-item loginout" style="text-align: center" @click.stop="toLoginOut"><a class="usertext">退出登录</a></li>
</ul>
<a class="nav-user-name" slot="reference">
<span class="font-12 color-606266">{{ userInfo.staffDTO.staffName || '--' }}</span> <i class="iconfont iconxiala arrowico color-c0c4cc"></i>
</a>
</el-popover>
</div>
</div>
<!-- <div v-if="!checkShow && !$route.path.includes('enterpriseSet')" class="set-tip-body">
<set-tip v-if="!checkShow" :tipText="tipText"></set-tip>
</div> -->
</div>
</template>
<script>
// import setTip from '@/components/app/set-tip.vue';
import { getRequest, postRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import qs from 'qs';
export default {
name: 'vue-office-header',
props: ['menuRouter', 'collapseFlag', 'projectName'],
components: {
// setTip
},
data() {
return {
checkShow: true,
tipText: '请先完成商户初始化设置后,再进行其他操作',
repProjectName: 'haoban-manage-web', // 项目名
// 当前路由
pathName: '',
isCollapse: false, // 是否收起左侧
// 菜单数据
menuHead: [
{
menuCode: null,
rightName: '工作台',
url: '/index',
parentCode: null,
project: 'office'
},
{
menuCode: null,
rightName: '通讯录',
url: '/contactsList',
parentCode: null,
project: 'office'
},
{
menuCode: null,
rightName: '审核中心',
url: '/unreview?/reviewed/reviewSet',
parentCode: null,
project: 'office'
},
{
menuCode: null,
rightName: '企业设置',
url: '/enterpriseSet?/adminList',
parentCode: null,
project: 'office'
}
// {
// menuCode: null,
// rightName: '企业数据',
// url: '/enterpriseUseData?/enterpriseUseData',
// parentCode: null,
// project: 'office'
// }
],
// 获取 location origin
baseUrl: '',
routePathName: '', // 当前路由值
userInfo: {
name: '',
phoneNumber: '',
headPic: '',
staffDTO: {
staffName: ''
}
}
};
},
beforeMount() {
const that = this;
let host = window.location.origin;
if (host.indexOf('localhost') != '-1') {
that.baseUrl = 'http://www.gicdev.com';
} else {
that.baseUrl = host;
}
},
methods: {
/**
* 获取企业数据开关
*/
getSwitchData(wxEnterpriseId) {
const that = this;
let para = {
wxEnterpriseId: wxEnterpriseId
};
getRequest('/haoban-manage3-web/web/use-haoban3-service', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (resData.result) {
if (that.menuHead[that.menuHead.length - 1].rightName.indexOf('企业数据') == -1) {
that.menuHead.push({
menuCode: null,
rightName: '企业数据',
url: '/enterpriseUseData?/enterpriseUseData',
parentCode: null,
project: 'office'
});
}
} else if (that.menuHead[that.menuHead.length - 1].rightName.indexOf('企业数据') != -1) {
that.menuHead.splice(that.menuHead.length - 1, 1);
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取显示的提示
*/
getTipData() {
const that = this;
let para = {};
getRequest('/haoban-manage3-web/is-wx-enterprise-secret-set', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.checkShow = resData.result;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
toIndex() {
const that = this;
that.$router.push('/index');
},
/**
* 路由跳转
*/
changeRouter(path) {
const that = this;
that.$router.push(path);
},
// 处理折叠
handleCollapse() {
const that = this;
that.isCollapse = that.isCollapse == true ? false : true;
that.$emit('collapseTag', that.isCollapse);
},
// 跳转 gic 管理后台
toGicLogin() {
let toUrl = window.location.origin.includes('demogic.com') ? window.location.origin : 'https://hope.demogic.com';
window.location.href = toUrl + '/gic-web/#/';
},
//退出登录
toLoginOut() {
const that = this;
that
.$confirm('确认退出吗?', '提示', {
type: 'warning'
})
.then(() => {
that.axios
.post('/haoban-manage3-web/login-out', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.$message({
message: '退出成功',
type: 'success'
});
// 跳转登录页
window.location.href = window.location.origin + '/haoban-3/#/login';
return;
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
})
.catch(() => {});
},
// 触发父组件路由
toRouter(path, name, code) {
const that = this;
let obj = {
path: '/' + path,
name: name
};
that.$emit('toRouterView', obj);
},
/**
* 简单数组-->父子数组对象
*/
treeData(data) {
let tree = data.filter(father => {
//循环所有项
let branchArr = data.filter(child => {
return father.haobanMenuRightId == child.parentRightId; //返回每一项的子级数组
});
if (branchArr.length > 0) {
father.children = branchArr; //如果存在子级,则给父级添加一个children属性,并赋值
}
return father.parentRightId == -1; //返回第一层
});
return tree;
},
/**
* 获取菜单详情
*/
getMenuDetail() {
const that = this;
let para = {
router: that.routePathName,
project: that.repProjectName,
requestProject: that.repProjectName
};
that.axios
.post(that.baseUrl + '/haoban-manage-web/menu-detail', qs.stringify(para))
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.pathName = '/' + resData.result.top.url;
return;
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取菜单
*/
getHeaderMenu() {
const that = this;
let para = {
project: that.repProjectName,
requestProject: that.repProjectName
};
that.axios
.post(that.baseUrl + '/haoban-manage-web/menu-list', qs.stringify(para))
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
resData.result.forEach(function(ele, index) {
ele.url = '/' + ele.url;
});
that.menuHead = that.treeData(resData.result);
that.$nextTick(() => {
that.userInfo = JSON.parse(localStorage.getItem('userInfos'));
if (!that.userInfo) {
that.userInfo = {
name: '',
headPic: '',
phoneNumber: ''
};
that.getUserData();
}
});
return;
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
getUserData() {
const that = this;
that.axios
.get(that.baseUrl + '/haoban-manage-web/emp/get-user-info', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.userInfo = resData.result;
localStorage.setItem('userInfos', JSON.stringify(resData.result));
return;
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 登录 --- api
*/
toLogin() {
const that = this;
let para = {};
postRequest('/haoban-manage3-web/get-login-info', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
// localStorage.removeItem('userInfos');
if (!resData.result.staffDTO) {
resData.result.staffDTO = {
staffName: ''
};
}
localStorage.setItem('userInfos', JSON.stringify(resData.result));
that.userInfo = resData.result;
that.getSwitchData(resData.result.wxEnterpriseId);
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
watch: {
$route: {
handler: function(val, oldVal) {
// const that = this;
// that.getMenuDetail();
},
// 深度观察监听
deep: true
},
collapseFlag: function(newData, oldData) {
const that = this;
that.isCollapse = newData;
},
projectName: function(newData, oldData) {
const that = this;
that.repProjectName = newData || 'haoban-manage-web';
}
},
mounted() {
const that = this;
that.pathName = that.$route.path;
// 获取项目名 pathname (路由的hash)
that.routePathName = window.location.hash.split('/')[1];
if (that.routePathName.indexOf('?') != -1) {
that.routePathName = that.routePathName.split('?')[0];
}
if (that.routePathName.indexOf('/') != -1) {
that.routePathName = that.routePathName.split('/')[0];
}
// 项目名
that.repProjectName = that.projectName || 'haoban-manage-web';
that.isCollapse = that.collapseFlag;
// 获取菜单
that.toLogin();
that.getTipData();
/* if (!localStorage.getItem('userInfos')) {
that.toLogin();
} else {
that.userInfo = JSON.parse(localStorage.getItem('userInfos'));
} */
// Promise.all([that.getHeaderMenu(), that.getMenuDetail()]);
// that.userInfo = JSON.parse(localStorage.getItem('userInfos'));
}
};
</script>
<style lang="less" scoped>
@base-color: #353944;
@hover-color: #3c92eb;
@hoverbg-color: #20242d;
@main-color: #2f54eb;
@navbgcolor: #04143a;
@sidebgcolor: #020b21;
@userinfobgcolor: #ecf5ff;
@contentbgcolor: #f5f7fa;
@bordercolor: #dcdfe6;
@customnavcolor: #04143a;
@btnbgcolor: #f5f7fa;
@iconbgcolor: #e6e9f2;
@elmenuisactive: #2f54eb;
/* flex */
.flex {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.flex-1 {
-webkit-box-flex: 1;
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
}
.flex-column {
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
-o-flex-direction: column;
flex-direction: column;
}
.flex-row {
-webkit-flex-direction: row;
-moz-flex-direction: row;
-ms-flex-direction: row;
-o-flex-direction: row;
flex-direction: row;
}
.flex-align-center {
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
}
.flex-pack-center {
-webkit-box-pack: center;
-webkit-justify-content: center;
-ms-flex-pack: center;
justify-content: center;
}
.flex-between {
-webkit-justify-content: space-between;
justify-content: space-between;
}
.flex-wrap {
-webkit-flex-wrap: wrap;
-moz-flex-wrap: wrap;
-ms-flex-wrap: wrap;
-o-flex-wrap: wrap;
flex-wrap: wrap;
}
.border-box {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.flex1(@width, @height) {
flex: 0 0 @width;
width: @width;
height: @height;
}
.set-tip-body {
position: fixed;
left: 50%;
top: 91px;
z-index: 999;
}
.pro-name {
font-size: 16px;
font-weight: 600;
color: rgba(48, 49, 51, 1);
line-height: 22px;
background: linear-gradient(270deg, rgba(91, 74, 219, 1) 0%, rgba(45, 168, 255, 1) 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
.user-item {
padding: 10px 0;
&:hover {
color: @main-color;
background-color: @userinfobgcolor;
cursor: pointer;
}
}
.navsuerwrap /deep/ {
.user-item {
color: #606266;
a {
color: #606266;
}
&:hover .usertext {
display: block;
color: @main-color;
background-color: @userinfobgcolor;
cursor: pointer;
}
}
.loginout {
// border-top: 1px solid #eee;
// box-sizing: border-box;
// padding: 15px 0;
// margin-bottom: 20px;
}
}
.navheader /deep/ {
position: fixed;
display: flex;
top: 0;
left: 0;
width: 100%;
/*min-width: 1400px;*/
height: 46px;
line-height: 46px;
font-size: 14px;
background-color: #fff;
padding: 0;
z-index: 99;
color: #fff;
-webkit-box-shadow: 0px 4px 6px 0px rgba(221, 227, 237, 0.29);
box-shadow: 0px 4px 6px 0px rgba(221, 227, 237, 0.29);
.fl {
float: left;
}
.fr {
float: right;
}
&-logo {
flex: 0 0 200px;
width: 200px;
height: 46px;
float: left;
padding-left: 50px;
font-size: 20px;
color: #1f2f3d;
text-align: left;
background: url('../assets/logo.png') no-repeat 20px center;
background-size: 22px;
.border-box;
}
&-pic {
vertical-align: middle;
}
&-item {
flex: 1;
}
.itemlink {
float: left;
display: inline-block;
width: 133px;
height: 44px;
text-align: center;
cursor: pointer;
color: #606266;
&.menu-font-16 {
font-size: 16px;
}
&.icon-collapse {
width: auto;
padding: 0 23px 0 14px;
}
&:hover {
color: @main-color;
}
}
.bottom:hover {
/* border-bottom: 2px solid @main-color; */
}
/* 选中 */
.current-module.bottom {
color: @main-color;
/* border-bottom: 2px solid @main-color; */
font-weight: 600;
position: relative;
&::after {
content: '';
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 1;
margin: 0 auto;
width: 100%;
animation: borders 0.5s;
border-top: 2px solid #2f54ed;
}
}
/* logo */
.moveleft {
margin-left: -136px;
transition: all 0.3s ease;
background-position: 151px 10px;
color: transparent;
}
.moveright {
margin-left: 0px;
transition: all 0.2s ease;
}
}
li {
list-style: none;
}
/*用户信息*/
.navuserinfo {
/*width: 140px;*/
/*font-size: 0;*/
text-align: center;
padding-right: 20px;
.span-log {
position: relative;
font-size: 18px;
padding-right: 10px;
/* border-right: 1px solid #e4e7ed; */
&::after {
content: '';
position: absolute;
top: 3px;
right: 0;
width: 0;
height: 14px;
border-right: 1px solid #e4e7ed;
}
}
.el-button--text {
padding-right: 24px;
font-size: 14px;
color: #606266;
margin-left: 30px;
}
}
.nav-user-name {
position: relative;
display: inline-block;
padding: 0 20px 0 10px;
color: #606266;
text-align: center;
&:hover {
color: #2f54eb;
}
&:hover .arrowico {
transform: rotate(180deg);
}
}
.user-left-img {
img {
width: 24px;
height: 24px;
border-radius: 50%;
}
}
@keyframes borders {
from {
width: 0;
}
to {
width: 100%;
}
}
/* 当浏览器的可视区域小于1280px */
@media screen and (max-width: 1280px) {
.navheader {
min-width: 1280px;
}
}
@media screen and (min-width: 1280px) and (max-width: 1366px) {
.navheader {
min-width: 1280px;
}
}
@media screen and (min-width: 1366px) and (max-width: 1440px) {
.navheader {
min-width: 1366px;
}
}
@media screen and (min-width: 1440px) and (max-width: 1920px) {
.navheader {
min-width: 1440px;
}
}
</style>
<template>
<div class="aside-menu">
<ul class="aside-menu__wrapper">
<template v-for="item in tabData">
<li
v-if="item.isShow == 1"
:class="['tab-left-list-cell p-l-14', {'active-tab': item.uri === activeTab}]"
:key="item.id"
@click="selectTab(item)"
>
<!-- <i class="my-icon" :class="['iconfont', item.icon, !!item.onlyIconActive ? 'iconActive' : '']"></i> -->
{{ item.menuName }}
<i v-if="item.nodeChildren && item.nodeChildren.length" :class="[item.collapsFlag ? 'el-icon-arrow-up' : 'el-icon-arrow-down']"></i>
</li>
<ul class="child-tab-left-list" :key="`${item.id}-sub`" v-show="item.collapsFlag">
<template v-for="childitem in item.nodeChildren">
<li
v-if="childitem.isShow == 1"
:class="['tab-left-list-cell p-l-40', {'active-tab': childitem.uri == activeTab}]"
:key="childitem.id"
@click="selectTab(childitem)"
>
{{ childitem.menuName }}
<i v-if="childitem.nodeChildren && childitem.nodeChildren.length" :class="[childitem.collapsFlag ? 'el-icon-arrow-up' : 'el-icon-arrow-down']"></i>
</li>
<ul class="third-tab-left-list" :key="`${childitem.id}-sub`" v-show="childitem.collapsFlag">
<template v-for="thirditem in childitem.nodeChildren">
<li
v-if="thirditem.isShow == 1"
:class="['tab-left-list-cell p-l-60', {'active-tab': thirditem.uri === activeTab }]"
:key="thirditem.id"
@click="selectTab(thirditem)"
>
{{ thirditem.menuName }}
</li>
</template>
</ul>
</template>
</ul>
</template>
</ul>
</div>
</template>
<script>
export default {
name: 'aside-menu',
props: {
menu: Array
},
data() {
return {
activeTab: '',
tabData: []
};
},
watch: {
'$route.path': {
immediate: true,
handler(path) {
this.activeTab = path;
}
},
menu: {
immediate: true,
handler(menu) {
let that = this;
let menuTree = menu.filter(item => item.code === 'enterprise')[0] || {};
this.tabData = setCollapsFlag(menuTree.nodeChildren || []);
function setCollapsFlag(arr) {
arr = arr.slice();
return arr.map(item => {
that.$set(item, 'collapsFlag', true)
if (item.nodeChildren && item.nodeChildren.length > 0) {
item.nodeChildren = setCollapsFlag(item.nodeChildren);
}
return item;
})
}
}
}
},
methods: {
selectTab(item) {
if (Array.isArray(item.nodeChildren) && item.nodeChildren.length > 0) {
item.collapsFlag = !item.collapsFlag;
} else {
this.$router.push({path: item.uri});
}
},
}
};
</script>
<style lang="less" scoped>
.aside-menu {
position: fixed;
top: 0;
bottom: 0;
left: 20px;
z-index: 1;
padding-top: 84px;
width: 200px;
height: 100%;
.aside-menu__wrapper {
padding: 20px 0;
width: 100%;
height: 100%;
background-color: #fff;
overflow-y: auto;
box-shadow: 3px 0 4px 0 rgba(214, 224, 240, 0.3);
}
.tab-left-list-cell {
position: relative;
margin-top: 15px;
height: 30px;
font-size: 14px;
color: #303133;
text-align: left;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
.iconActive {
color: @blue;
}
&:hover {
color: #606266;
background: rgba(24, 144, 255, 0.06);
i {
color: @blue;
}
}
&.active-tab {
color: @gray02;
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: @blue;
z-index: 1;
}
i {
color: @blue;
}
}
.my-icon {
font-size: 17px;
color: #000;
padding-right: 8px;
width: 25px;
display: inline-block;
box-sizing: border-box;
}
}
.child-tab-left-list {
-webkit-transition: all 0.5s ease-in-out;
-o-transition: all 0.5s ease-in-out;
-moz-transition: all 0.5s ease-in-out;
transition: all 0.5s ease-in-out;
li {
position: relative;
text-align: left;
height: 30px;
line-height: 30px;
white-space: nowrap;
overflow: hidden;
cursor: pointer;
&:hover {
background: rgba(24, 144, 255, 0.06);
i {
color: @blue;
}
}
&.active-tab {
background: rgba(24, 144, 255, 0.06);
&::before {
content: ' ';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 2px;
background: @blue;
z-index: 1;
}
i {
color: @blue;
}
}
}
}
}
.p-l-14 {
padding-left: 14px;
}
.p-l-40 {
padding-left: 40px;
}
.p-l-60 {
padding-left: 60px;
}
</style>
<template> <template>
<dm-layout/> <div>
<yw-header @updateAsideMenu="updateAsideMenu"></yw-header>
<div class="main">
<aside-menu :menu="menu"></aside-menu>
<keep-alive>
<router-view v-if="$route.meta.keepAlive" :key="$route.fullPath"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :key="$route.fullPath"></router-view>
</div>
</div>
</template> </template>
<script> <script>
import YwHeader from './yw-header.vue';
import AsideMenu from './aside-menu.vue';
export default { export default {
name: 'layout' name: 'layout',
components: { YwHeader, AsideMenu },
data() {
return {
menu: []
}
},
methods: {
updateAsideMenu(menu) {
this.menu = menu || [];
},
}
} }
</script> </script>
<template>
<div class="header">
<a :href="`${origin}/operation-platform/#/index`" class="logo">
<img src="../images/logo.png" alt="" />
<span>好办运维平台</span>
</a>
<el-dropdown trigger="hover" placement="bottom">
<span>{{ userInfo.realName }}<i class="el-icon-arrow-down" style="margin-left: 10px"></i></span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item @click.native="showUserInfo = true">账号信息</el-dropdown-item>
<el-dropdown-item @click.native="onLoginOut">退出登录</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dialog title="账户信息" :visible.sync="showUserInfo" width="430px" append-to-body>
<el-form ref="userForm" label-width="100px">
<el-form-item label="姓名">
<el-input v-model="userInfo.realName" disabled/>
</el-form-item>
<el-form-item label="性别">
<el-radio-group v-model="userInfo.sex" disabled>
<el-radio label="1"></el-radio>
<el-radio label="0"></el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="工号">
<el-input v-model="userInfo.employeeNumber" disabled></el-input>
</el-form-item>
<el-form-item label="手机号码">
<el-input v-model="userInfo.userMobile" disabled></el-input>
</el-form-item>
<el-form-item label="职位">
<el-input v-model="userInfo.position" disabled></el-input>
</el-form-item>
</el-form>
</el-dialog>
</div>
</template>
<script>
import { origin } from '@/config'
import fetch from '@/api';
const { getUserInfo, getLoginOut } = fetch;
export default {
name: 'ywHeader',
data() {
return {
origin,
userInfo: {},
showUserInfo: false
}
},
created() {
this.getUserInfo();
},
methods: {
// 获取用户信息
getUserInfo() {
getUserInfo().then(res => {
const result = res.result || {};
this.userInfo = Object.assign({}, result);
this.$emit('updateAsideMenu', result.menuTree || []);
})
},
// 退出登录
onLoginOut() {
this.$confirm('确认退出吗?', '提示', { type: 'warning' }).then(() => {
getLoginOut().then(res => {
this.$message.success('退出成功');
window.location.href = '/operation-platform/#/';
})
})
}
}
}
</script>
<style lang="less" scoped>
.header {
position: fixed;
top: 0;
right: 0;
left: 0;
z-index: 20;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 45px;
width: 100%;
min-width: 1400px;
height: 64px;
background: #fff;
box-shadow: 0px 3px 4px 0px rgba(214, 224, 240, 0.3);
.logo {
display: flex;
align-items: center;
cursor: pointer;
img {
margin-right: 10px;
width: 30px;
height: 30px;
}
span {
padding-top: 2px;
font-size: 16px;
color: #303133;
}
}
}
</style>
/*
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-07-17 10:38:29
* @LastEditors: 无尘
* @LastEditTime: 2020-07-17 11:07:42
*/
/* eslint-disable */
module.exports = (parantfile, file) => r => {
import('@/views/' + parantfile + '/' + file + '.vue').then(module => {
r(module);
});
};
...@@ -6,44 +6,44 @@ ...@@ -6,44 +6,44 @@
* @LastEditors: 无尘 * @LastEditors: 无尘
* @LastEditTime: 2020-07-21 09:52:25 * @LastEditTime: 2020-07-21 09:52:25
*/ */
import _import from './_import.js'; import Layout from '@/layout/layout.vue';
const errorPage = r => {
import('@/views/errorPage/index.vue').then(module => {
r(module);
});
};
export const routes = [ export const routes = [
{ {
path: '/', path: '/',
name: '/', component: Layout,
redirect: 'login' children: [
{
path: '/enterprise-list',
name: '企业管理',
component: () => import('@/views/enterprise/enterprise-list.vue')
}, },
{ {
path: '/login', path: '/enterprise-detail',
name: '登录', name: '企业详情',
component: _import('login', 'index') component: () => import('@/views/enterprise/enterprise-detail.vue')
}, },
{ {
path: '/index', path: '/menu-config',
name: 'index', name: '菜单配置',
component: _import('index', 'index') component: () => import('@/views/permission/menu-config.vue')
},
]
}, },
{ {
path: '/403', path: '/403',
name: '无权访问', name: '无权访问',
component: errorPage component: () => import('@/views/errorPage/index.vue')
}, },
{ {
path: '/404', path: '/404',
name: 'error404', name: 'error404',
component: errorPage component: () => import('@/views/errorPage/index.vue')
}, },
{ {
path: '/500', path: '/500',
name: 'error500', name: 'error500',
component: errorPage component: () => import('@/views/errorPage/index.vue')
}, },
{ {
path: '*', path: '*',
......
import axios from 'axios';
import qs from 'qs';
import { Message } from 'element-ui';
// import { getToken } from '@/'
/* eslint-disable-next-line */
// const BASEURL = process.env.NODE_ENV !== 'production' ? window.location.origin : '';
/* eslint-disable-next-line */
const isPro = process.env.NODE_ENV === 'production';
const BASEURL = isPro ? window.location.origin : 'https://four.gicdev.com';
axios.defaults.baseURL = BASEURL;
const request = (opt, params) => {
params = Object.assign({}, params);
opt = Object.assign({}, opt);
let requestConfig = {
// 请求路径
url: '',
params: '',
data: '',
// 请求type
method: 'get',
// request body 是否使用 formData格式
useFormData: false,
// response 是否使用 code === '0000' 验证
useIntercept: true,
// 设置headers, 但是好像没效果,以后再说吧
headers: {}
}
requestConfig = Object.assign(requestConfig, opt);
if (requestConfig.useFormData) params = qs.stringify(params);
switch (requestConfig.method.toLowerCase()) {
case 'get':
requestConfig.params = params;
break;
case 'post':
requestConfig.data = params;
break;
default:
requestConfig.data = params;
break;
}
return new Promise((resolve, reject) => {
axios(requestConfig).then(res => {
let resp = res.data;
if (!requestConfig.useIntercept || resp.code === '0000') {
return resolve(resp);
};
Message({
message: resp.message,
type: 'warning',
duration: 3000
});
reject(resp);
}).catch(error => {
let { response } = error;
response = response || {};
let { data, status } = response
data = data || {};
if (status === 401) {
let url = isPro ? '../operation-platform/' : 'https://four.gicdev.com/operation-platform/'
window.location.href = url;
}
Message({
message: data.message,
type: 'warning'
})
reject(error);
})
});
}
export {axios, request};
<template>
<div>企业管理详情</div>
</template>
<script>
export default {
name: 'enterprise-detail'
}
</script>
<template>
<div>企业管理列表</div>
</template>
<script>
export default {
name: 'enterprise-list'
}
</script>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-07-17 11:45:18
-->
<template>
<div id="index">
<vue-office-header ref="headerMenu" :projectName="projectName" @collapseTag="collapseTag" @toRouterView="toRouterView"> </vue-office-header>
<div id="content" class="content">
<div class="content-body border-box" style="min-height: calc(100vh - 46px);">
<div class="index-body flex flex-row">
<div class="index-body-left">
<div class="index-body-left_top border-box">
<div class="app-title font-16 color-303133 flex flex-space-between">
<span class="font-16 color-303133 font-w-600 line-h-32 color-primary">已使用</span>
</div>
<ul>
<li class="border-box" v-for="(item, index) in purchaseApp" :key="index + 'app'" @click="toAppView(item)">
<div class="app-li-cell border-box flex">
<div class="app-cell-left">
<img :src="item.applicationUrl" alt="img" />
</div>
<div class="app-cell-right flex flex-column flex-align-center flex-pack-center">
<div class="app-name font-14 color-303133">{{ item.applicationName }}</div>
<div v-if="!item.applicationPath" class="app-info">
<span class="font-14 color-909399">里面为空~</span>
<!-- <div class="app-version font-12 color-909399">{{ item.versionName }}</div> -->
<!-- <div class="app-date font-12 color-909399">{{ item.date | timeStampToYmd }}</div> -->
</div>
</div>
<div class="app-cell-arrow">
<el-dropdown class="app-cell-dropdown" trigger="hover">
<span class="el-dropdown-link"><i class="el-icon-more el-icon--right" style="cursor: pointer;"></i> </span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item class="p-0">
<span @click.stop="changeSwitch(item)">{{ item.openFlag == 1 ? '停用' : '启用' }}</span>
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</li>
</ul>
</div>
<div v-if="noPurchaseApp.length" class="bg-space"></div>
<div :class="['index-body-left_bottom border-box', noPurchaseApp.length ? 'bottom-0' : 'bottom-9999']">
<div class="app-title font-16 color-303133">已停用</div>
<ul>
<li class="border-box" v-for="(item, index) in noPurchaseApp" :key="index + 'appno'">
<div class="app-li-cell border-box flex">
<div class="app-cell-left">
<img :src="item.applicationUrl" alt="img" />
</div>
<div class="app-cell-right">
<div class="app-name stop-app-name font-14 color-303133">{{ item.applicationName }}</div>
<div class="app-info stop-app-info">
<el-switch v-model="item.openFlag" active-text="" inactive-text="" @change="changeAppSwitch($event, item)"> </el-switch>
<!-- <div class="app-describe font-12 color-909399">{{ item.describe }}</div> -->
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="index-body-right">
<div class="index-body-right_top border-box">
<div class="serve-info">
<div class="serve-date-info">
<div class="font-14 color-909399 p-t-10 m-b-13" style="font-weight:300;">{{ new Date().getTime() | timeStampToYm }}</div>
<div class="font-12 color-909399">农历{{ getLunarDay(new Date().getFullYear(), new Date().getMonth() + 1, new Date().getDate()) }}</div>
<div class="serve-date-day">
<div class="serve-date-day_inner ">
<div class="color-fff font-26 p-t-10" style="letter-spacing: 2px;">{{ new Date().getDate() }}</div>
<div class="color-fff font-12">{{ weeks[new Date().getDay()] }}</div>
</div>
</div>
</div>
<div class="serve-version flex">
<span class="w-86 font-14 color-909399 text-left">企业</span>
<span class="font-14 color-303133">{{ versionData.corpName }}</span>
</div>
<div class="serve-date flex m-t-20">
<span class="w-86 font-14 color-909399 text-left">版本</span>
<span class="font-14 color-303133">{{ versionData.smallVersion }}</span>
</div>
<div v-if="false" class="serve-store flex m-t-20">
<span class="w-86 font-14 color-909399 text-left">
<!-- <el-popover placement="top-start" title="" width="200" trigger="hover" content="GIC已同步上线门店总数,实时获取">
<span class="w-86 font-14 color-909399 text-left" slot="reference" style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">门店总数</span>
</el-popover> -->
<el-tooltip class="item" effect="dark" content="GIC已同步上线门店总数,实时获取" placement="top-start">
<span class="w-86 font-14 color-909399 text-left" style="cursor: pointer;padding-bottom: 2px; border-bottom: 1px dashed #2F54EB;">门店总数</span>
</el-tooltip>
</span>
<span class="font-14 color-303133 ">{{ versionData.storeTotal }}</span
><!-- <span v-if="versionData.storeTotal > versionData.storeNum" class=" cursor-pointer font-12 p-l-10 color-f5222d" @click="toOverStore">{{ versionData.storeTotal - versionData.storeNum }}家门店溢出)</span> -->
</div>
<!-- <div class="serve-btn text-center m-t-30">
<el-button type="primary" @click="goShopping">前往订购</el-button>
</div> -->
</div>
</div>
<div class="bg-margin-10"></div>
<div class="index-body-right_bottom border-box">
<div class="help-title font-16 color-303133 font-w-600">帮助中心</div>
<ul class="help-list m-t-15">
<li v-for="(item, index) in helpList" :key="index + 'help'" class="cursor-pointer font-14 color-606266" @click="toRedirect(item)">
{{ item.helpTitle }}
</li>
<li class="text-center li-more cursor-pointer" @click="goUdesk">查看更多</li>
</ul>
</div>
</div>
</div>
</div>
<!-- <vue-gic-footer></vue-gic-footer> -->
</div>
</div>
</template>
<script>
// 公共头部菜单
import vueOfficeHeader from '@/components/vue-office-header.vue';
import { getRequest } from '@/api/api';
import errMsg from '@/common/js/error';
import showMsg from '@/common/js/showmsg';
export default {
name: 'index',
data() {
return {
checkShow: true,
tipText: '请先完成商户初始化设置后,再进行其他操作',
projectName: 'haoban-manage-web', // 当前项目名
contentHeight: '0px', // 页面内容高度
collapseFlag: false, // 折叠参数
showCustomDialog: false, // 自定义弹框显示标志
customType: '', // 自定义弹框标志
customTitle: '', // 自定义弹框标题
wxEnterpriseId: localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
// 购买应用
purchaseApp: [
/* {
applicationId: 1,
applicationUrl: 'https://hope.demogic.com/mobile-haoban-file/images/appicon/workbench/customer_center.png',
applicationName: '我的顾客',
versionName: '基础版',
date: new Date().getTime(),
describe: '应用描述应用描述应用描述应用描述应用描述'
} */
],
weeks: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
// 未购买应用
noPurchaseApp: [],
versionData: {
id: 1,
smallVersion: '',
corpName: '',
date: new Date().getTime(),
storeNum: 100,
storeTotal: ''
},
helpList: [
/* {
helpId: 1,
helpTitle: '测试帮助中心',
helpUrl: ''
} */
]
};
},
methods: {
// getExpired() {
// const that = this;
// let para = {
// enterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : ''
// };
// getRequest('/haoban-manage3-web/enterprise-is-over', para)
// .then(res => {
// let resData = res.data;
// if (resData.errorCode == 1) {
// that.expiredFlag = resData.result;
// return;
// }
// errMsg.errorMsg(resData);
// })
// .catch(function(error) {
// that.$message.error({
// duration: 1000,
// message: error.message
// });
// });
// },
/**
* 跳转更多 udesk
*/
goUdesk() {
window.open('https://demogic.udesk.cn/hc/categories/96671?api_name=');
},
/* eslint-disable */
getLunarDay(solarYear, solarMonth, solarDay) {
// 拷贝别人又自己调整过的获取农历日期的代码,想要原来的代码估计百度一下就有了
const madd = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
// const tgString = '甲乙丙丁戊己庚辛壬癸'
// const dzString = '子丑寅卯辰巳午未申酉戌亥'
const numString = '一二三四五六七八九十';
const monString = '正二三四五六七八九十冬腊';
const CalendarData = [0xa4b, 0x5164b, 0x6a5, 0x6d4, 0x415b5, 0x2b6, 0x957, 0x2092f, 0x497, 0x60c96, 0xd4a, 0xea5, 0x50da9, 0x5ad, 0x2b6, 0x3126e, 0x92e, 0x7192d, 0xc95, 0xd4a, 0x61b4a, 0xb55, 0x56a, 0x4155b, 0x25d, 0x92d, 0x2192b, 0xa95, 0x71695, 0x6ca, 0xb55, 0x50ab5, 0x4da, 0xa5b, 0x30a57, 0x52b, 0x8152a, 0xe95, 0x6aa, 0x615aa, 0xab5, 0x4b6, 0x414ae, 0xa57, 0x526, 0x31d26, 0xd95, 0x70b55, 0x56a, 0x96d, 0x5095d, 0x4ad, 0xa4d, 0x41a4d, 0xd25, 0x81aa5, 0xb54, 0xb6a, 0x612da, 0x95b, 0x49b, 0x41497, 0xa4b, 0xa164b, 0x6a5, 0x6d4, 0x615b4, 0xab6, 0x957, 0x5092f, 0x497, 0x64b, 0x30d4a, 0xea5, 0x80d65, 0x5ac, 0xab6, 0x5126d, 0x92e, 0xc96, 0x41a95, 0xd4a, 0xda5, 0x20b55, 0x56a, 0x7155b, 0x25d, 0x92d, 0x5192b, 0xa95, 0xb4a, 0x416aa, 0xad5, 0x90ab5, 0x4ba, 0xa5b, 0x60a57, 0x52b, 0xa93, 0x40e95];
if (!(solarYear < 1921 || solarYear > 2100)) {
solarMonth = parseInt(solarMonth) > 0 ? solarMonth - 1 : 11;
const timeArr = [solarYear, solarMonth, solarDay];
let TheDate = timeArr.length !== 3 ? new Date() : new Date(timeArr[0], timeArr[1], timeArr[2]);
let total;
let m;
let n;
let k;
let isEnd = false;
let theDateYear = TheDate.getFullYear();
total = (theDateYear - 1921) * 365 + Math.floor((theDateYear - 1921) / 4) + madd[TheDate.getMonth()] + TheDate.getDate() - 38;
if (theDateYear % 4 === 0 && TheDate.getMonth() > 1) {
total++;
}
for (m = 0; ; m++) {
k = CalendarData[m] < 0xfff ? 11 : 12;
for (n = k; n >= 0; n--) {
if (total <= this.getBit(CalendarData[m], n)) {
isEnd = true;
break;
}
total = total - this.getBit(CalendarData[m], n);
}
if (isEnd) {
break;
}
}
let cMonth;
let cDay; // cYear,
// cYear = 1921 + m
cMonth = k - n + 1;
cDay = total;
if (k === 12) {
if (cMonth === Math.floor(CalendarData[m] / 0x10000) + 1) {
cMonth = 1 - cMonth;
}
if (cMonth > Math.floor(CalendarData[m] / 0x10000) + 1) {
cMonth--;
}
}
// let run = ''
let cDayStr = numString.charAt(cDay - 1);
/* if (cMonth < 1) {
run = '(闰)'
} */
if (cDay % 10 !== 0 || cDay === 10) {
cDayStr = numString.charAt((cDay - 1) % 10);
}
console.log();
return cDay === 1 ? monString.charAt(cMonth - 1) + '月初一' : monString.charAt(cMonth - 1) + '月' + (cDay < 11 ? '初' : cDay < 20 ? '十' : cDay < 30 ? '廿' : '三十') + cDayStr; // tgString.charAt((cYear - 4) % 10) + dzString.charAt((cYear - 4) % 12) + '年 ' + run + monString.charAt(cMonth - 1) + '月' +
}
},
getBit(m, n) {
// 也是拷贝的,不是很明白这段代码干嘛的,不过很明显是处理二进制数据的
return 29 + ((m >> n) & 1);
},
/**
* 帮助中心跳转
*/
toRedirect(item) {
if (!item.helpUrl) {
return false;
}
window.open(item.helpUrl);
},
/**
* 路由跳转
*/
changeRoute(route) {
this.$router.push(route);
},
/**
* 跳转溢出门店
*/
toOverStore() {
const that = this;
that.changeRoute('/overStoreList');
},
/**
* 跳转应用
*/
toAppView(item) {
const that = this;
if (!item.applicationPath) {
//无更多设置项,不可进入!
showMsg.showmsg('无更多设置项,不可进入!', 'warning');
return false;
}
that.changeRoute(`${item.applicationPath}`);
},
/**
* 跳转购买
*/
goShopping(item) {
const that = this;
that.changeRoute(`/`);
},
/**
* 处理路由跳转
*/
toRouterView(val) {
const that = this;
// 模拟检查数据,有两个参数
that.$router.push({
path: val.path
});
},
/**
* 启用停用应用
*/
changeSwitch(item) {
const that = this;
let flag = item.openFlag == 1 ? '关闭' : '开启';
that
.$confirm(`确认${flag}${item.applicationName}】应用吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postSwitch(item);
})
.catch(() => {
item.openFlag == 1;
});
},
postSwitch(item) {
let that = this;
let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
applicationId: item.applicationId,
openFlag: item.openFlag == 1 ? 0 : 1
};
getRequest('/haoban-manage3-web/open-or-close', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('操作成功', 'success');
that.getAppData(1);
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 启用停用应用
*/
changeAppSwitch(e, item) {
const that = this;
that
.$confirm(`确定要${e == true ? '启用' : '停用'}${item.applicationName}】?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
that.postAppSwitch(item);
})
.catch(() => {
item.openFlag = false;
});
},
postAppSwitch(item) {
const that = this;
let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
applicationId: item.applicationId,
openFlag: item.openFlag ? 1 : 0
};
getRequest('/haoban-manage3-web/open-or-close', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
showMsg.showmsg('启用成功', 'success');
that.getAppData(1);
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 折叠事件
*/
collapseTag(val) {
const that = this;
that.collapseFlag = val;
},
/**
* 弹窗提示
*/
toAlert() {
const that = this;
that
.$confirm('您所在企业尚未订购好办 ,请前往升级版本后继续使用。', '提示', {
confirmButtonText: '立即前往订购',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
window.open('');
});
},
toTip() {
const that = this;
that
.$confirm('您没有该功能的使用权限,请联系管理员授权后继续使用。', '提示', {
confirmButtonText: '知道了',
type: 'warning'
})
.then(() => {
window.open('');
});
},
/**
* 获取帮助中心
*/
getHelpData() {
const that = this;
getRequest('/haoban-manage3-web/get-help-list', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.helpList = resData.result || [];
return;
}
that.$message.error({
duration: 1000,
message: resData.message
});
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取数据概览
*/
getAppData(type) {
const that = this;
let para = {
wxEnterpriseId: that.wxEnterpriseId || localStorage.getItem('userInfos') ? JSON.parse(localStorage.getItem('userInfos')).wxEnterpriseId : '',
type: type // 1已购买2未购买
};
getRequest('/haoban-manage3-web/application-open-close-list', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
resData.result.open.forEach(ele => {
ele.openFlag = 1;
});
that.purchaseApp = JSON.parse(JSON.stringify(resData.result.open)) || [];
resData.result.close.forEach(ele => {
ele.openFlag = false;
});
that.noPurchaseApp = JSON.parse(JSON.stringify(resData.result.close)) || [];
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取绑定
*/
getBindData() {
const that = this;
let para = {};
getRequest('/haoban-manage3-web/has-bind-contract', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
if (!resData.result) {
that.getBindUrl();
}
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取绑定
*/
getBindUrl() {
const that = this;
let para = {};
getRequest('/haoban-manage3-web/get-auth-url', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
window.location.href = `${resData.result}`;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 登录 --- api
*/
toLogin() {
const that = this;
return new Promise((resolve, reject) => {
let para = {};
getRequest('/haoban-manage3-web/get-login-info', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
// localStorage.removeItem('userInfos');
localStorage.setItem('userInfos', JSON.stringify(resData.result));
resolve(resData.result.wxEnterpriseId);
return;
}
errMsg.errorMsg(resData);
resolve({
wxEnterpriseId: ''
});
})
.catch(function(error) {
resolve({
wxEnterpriseId: ''
});
that.$message.error({
duration: 1000,
message: error.message
});
});
});
},
/**
* 获取显示的提示
*/
getTipData() {
const that = this;
let para = {};
getRequest('/haoban-manage3-web/is-wx-enterprise-secret-set', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.checkShow = resData.result;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
/**
* 获取企业数据
*/
getCompanyData() {
const that = this;
const para = {
wxEnterpriseId: that.wxEnterpriseId
};
getRequest('/haoban-manage3-web/wxEnterprise-detail', para)
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.versionData = resData.result;
return false;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
},
},
async mounted() {
const that = this;
that.getBindData();
that.wxEnterpriseId = await that.toLogin();
that.getAppData(1);
that.getHelpData();
/* that.getAppData(2); */
// that.getTipData();
that.getCompanyData();
that.contentHeight = (document.documentElement.clientHeight || document.body.clientHeight) - 92 + 'px';
},
components: {
vueOfficeHeader
}
};
</script>
<style lang="less" scoped>
// @import '~less_vars';
.color-f5222d {
color: @red-error;
}
.line-h-32 {
line-height: 32px;
}
.font-26 {
font-size: 26px;
}
.p-t-10 {
padding-top: 10px;
}
.m-t-15 {
margin-top: 15px;
}
.m-b-13 {
margin-bottom: 5px;
}
.m-b-13 {
margin-bottom: 13px;
}
.w-86 {
width: 86px;
}
.serve-date-info {
position: relative;
margin-bottom: 45px;
.serve-date-day {
position: absolute;
top: 0;
right: 23px;
width: 74px;
height: 67px;
text-align: center;
.serve-date-day_inner {
position: relative;
height: 100%;
text-align: center;
background: linear-gradient(180deg, rgba(47, 84, 235, 1) 0%, rgba(116, 153, 253, 1) 100%);
border-radius: 0 0 10px 10px;
&::after {
content: '';
width: 0;
height: 0;
border-left: 37px solid transparent;
border-right: 37px solid transparent;
border-bottom: 10px solid #fff;
position: absolute;
bottom: 0px;
left: 50%;
-webkit-transform: translate(-50%);
-moz-transform: translate(-50%);
transform: translate(-50%);
}
}
}
}
#index {
.content {
padding-top: 46px;
box-sizing: border-box;
/*overflow: auto;*/
min-width: 1400px;
height: auto;
background: #f0f2f5;
.content-body {
display: flex;
flex-direction: column;
padding: 20px;
background: #f0f2f5;
overflow: hidden;
/* display */
.top {
vertical-align: top;
}
.middle {
vertical-align: middle;
}
.m-t-24 {
margin-top: 24px;
}
.m-r-24 {
margin-right: 24px;
}
.bg-margin-10 {
width: 100%;
height: 10px;
background: #f0f2f5;
}
.border-b-e4e7e7 {
border-bottom: 1px solid #e4e7e7;
}
.radius-2 {
border-radius: 2px;
}
.icon-zidingyi {
cursor: pointer;
&:hover {
color: #2f54eb;
}
}
.icon-xinxixianshi {
cursor: pointer;
color: #909399;
font-size: 14px;
}
.square-item {
width: 40px;
height: 40px;
border-radius: 4px;
i {
font-size: 24px;
color: #fff;
}
}
.index-body {
width: 100%;
min-height: 340px;
.index-body-left {
flex: 1;
margin: 0px 10px 0px 0px;
min-height: calc(100vh - 86px);
background: #fff;
.app-title {
padding: 15px 0 18px 10px;
font-weight: 600;
}
ul {
font-size: 0;
li {
display: inline-block;
padding: 0 10px;
font-size: 14px;
cursor: pointer;
height: 106px;
.app-li-cell {
position: relative;
width: 186px;
height: 81px;
padding: 10px;
border-radius: 4px;
border: 1px solid #e4e7ed;
transition: all 0.3s;
.app-cell-arrow {
position: absolute;
right: 10px;
top: 8px;
width: 20px;
height: 20px;
.el-dropdown-link {
display: inline-block;
width: 20px;
height: 20px;
i {
color: #c0c4cc;
}
&:hover {
i {
color: #606266;
}
}
}
}
img {
width: 60px;
height: 60px;
border-radius: 10px;
}
.app-cell-right {
padding-left: 10px;
.app-name {
align-self: flex-start;
line-height: 22px;
&.stop-app-name {
margin-top: 6px;
}
}
.app-info {
margin-top: 3px;
line-height: 16px;
&.stop-app-info {
margin-top: 6px;
}
}
}
}
&:hover {
.app-li-cell {
// border-color: #2f54eb;
-webkit-transform: translateY(-3px);
-moz-transform: translateY(-3px);
-o-transform: translateY(-3px);
transform: translateY(-3px);
box-shadow: 0 2px 7px rgba(122, 138, 203, 0.2);
}
}
}
}
.index-body-left_top {
width: 100%;
padding: 10px;
background: #fff;
}
.bg-space {
width: 100%;
height: 10px;
background: #f0f2f5;
}
.index-body-left_bottom {
position: relative;
bottom: 0;
width: 100%;
padding: 10px;
background: #fff;
transition: all 0.3s;
&.bottom-0 {
bottom: 0;
}
&.bottom-9999 {
bottom: -9999px;
}
.app-describe {
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
}
}
}
.index-body-right {
width: 312px;
background: #fff;
.index-body-right_top {
width: 100%;
height: 197px;
padding: 0px 0 20px 30px;
background: #fff;
.serve-btn {
.el-button--primary {
width: 133px;
height: 32px;
// background: #2f54eb;
border-radius: 2px;
}
}
}
.index-body-right_bottom {
width: 100%;
// height: 100%;
padding: 30px;
background: #fff;
.help-list {
li {
height: 40px;
line-height: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
transition: all 0.3s;
&:hover {
color: #303133;
-webkit-transform: translateX(5px);
-moz-transform: translateX(5px);
transform: translateX(5px);
}
/* border-bottom: 1px solid #e4e7ed; */
&.li-more {
font-size: 14px;
color: #909399;
&:hover {
color:#2f54ed;
-webkit-transform: translateX(0px);
-moz-transform: translateX(0px);
transform: translateX(0px);
}
}
}
}
}
}
}
}
}
}
/* 隐藏 头部 */
.navheader {
div.itemlink-gic.bottom {
display: none;
}
a.itemlink.bottom {
display: none;
}
}
.el-table__empty-block {
height: 256px;
}
.el-table__empty-text {
width: auto;
margin-bottom: 80px;
&::before {
content: ' ';
display: block;
width: 60px;
height: 60px;
background: url(../../assets/no-data_icon.png) no-repeat center;
margin: 0px auto 22px auto;
}
}
.el-submenu__title {
height: 40px;
line-height: 40px;
}
.user-header-pop {
min-width: 95px;
}
.el-popover.user-header-pop {
min-width: 95px;
}
.el-menu.el-menu--popup {
background: #020b21;
border-radius: 4px;
}
/* 输入框 focus*/
.el-form-item.is-success .el-input__inner,
.el-form-item.is-success .el-input__inner:focus,
.el-form-item.is-success .el-textarea__inner,
.el-form-item.is-success .el-textarea__inner:focus {
border-color: #dcdfe6;
}
/* 箭头*/
.icon-to-pre {
cursor: pointer;
font-size: 18px;
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
-o-transform: rotate(90deg);
transform: rotate(90deg);
}
.icon-to-next {
cursor: pointer;
font-size: 18px;
-webkit-transform: rotate(-90deg);
-ms-transform: rotate(-90deg);
-o-transform: rotate(-90deg);
transform: rotate(-90deg);
}
/* 富文本编辑器 */
.mce-tinymce {
-webkit-box-shadow: none;
box-shadow: none;
}
</style>
<!--
* @Descripttion: 当前组件信息
* @version: 1.0.0
* @Author: 无尘
* @Date: 2020-07-16 10:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-07-17 11:21:20
-->
<template>
<div class="login-wrap">
<section>
<div class="login-body-top">
<div class="login-body-head">
<div class="login-body-head_inner border-box flex">
<img class="login-body-logo" src="../../assets/logo.png" alt="logo" />
<span class="login-body-title p-l-7">好办管理后台</span>
</div>
</div>
<div class="login-body-qrcode">
<div class="login-qrcode-inner border-box">
<div class="qrcode-title font-18 color-303133 m-b-20">企业微信扫码登录</div>
<div id="qrcode" title=""></div>
<div class="qrcode-refresh m-t-20">
<el-button class="font-12" type="text" @click="refreshCode">刷新 <span class="color-2f54eb iconfont iconshuaxin"></span></el-button>
</div>
</div>
</div>
<div class="bg-dot"></div>
<div class="bg-dot-center"></div>
</div>
<div class="login-body-bottom"></div>
</section>
<footer class="p-t-35">
<vue-gic-footer></vue-gic-footer>
</footer>
</div>
</template>
<script>
import errMsg from '@/common/js/error';
import { postRequest } from '@/api/api';
export default {
name: 'login',
data() {
return {
qrcodeNum: '', // 二维码数据
};
},
computed: {},
methods: {
/**
* 处理路由跳转
*/
toRouterView(val) {
const that = this;
// 模拟检查数据,有两个参数
that.$router.push({
path: val.path
});
},
/**
* 登录---获取二维码字符串 API
*/
getQrcode() {
const that = this;
postRequest('/haoban-manage3-web/get-login-qrcode', {})
.then(res => {
let resData = res.data;
if (resData.errorCode == 1) {
that.qrcodeNum = resData.result;
window.location.href = `${resData.result}`;
return;
}
errMsg.errorMsg(resData);
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
}
},
mounted() {
const that = this;
that.getQrcode();
// that.toLogin();
if (!!localStorage.getItem('userInfos')) {
localStorage.removeItem('userInfos');
}
},
components: {}
};
</script>
<style lang="less" scoped>
.login-wrap {
width: 100%;
min-height: 100vh;
.p-l-7 {
padding-left: 7px;
}
.login-body-top {
position: relative;
width: 100%;
height: 431px;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
background-color: #2f54eb;
.login-body-head {
width: 100%;
.login-body-head_inner {
width: 100%;
padding: 22px 0 0 24px;
img {
width: 25px;
}
.login-body-title {
font-weight: 600;
color: #fff;
font-size: 18px;
padding-top: 5px;
}
}
}
.bg-dot {
position: absolute;
left: 50%;
bottom: -93px;
margin-left: -500px;
width: 87px;
height: 142px;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
.bg-dot-center {
position: absolute;
left: 50%;
bottom: -233px;
margin-left: -71px;
width: 142px;
height: 87px;
background-repeat: no-repeat;
background-size: cover;
background-position: center center;
}
.login-body-qrcode {
position: absolute;
left: 50%;
bottom: -173px;
margin-left: -183px;
width: 366px;
height: 343px;
background: rgba(255, 255, 255, 1);
box-shadow: 0px 6px 8px 0px rgba(208, 213, 232, 0.27);
border-radius: 5px;
z-index: 1;
.login-qrcode-inner {
width: 100%;
padding: 40px 88px 25px 88px;
text-align: center;
#qrcode {
width: 190px;
height: 190px;
}
}
}
}
.login-body-bottom {
width: 100%;
height: 300px;
background: #fff;
}
}
</style>
<template>
<div>菜单配置</div>
</template>
<script>
export default {
name: 'menu-config'
}
</script>
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