Commit fc201c48 by 曾经

Merge branch '停复机-copy' into master-copy

* 停复机-copy: (102 commits)
  提示 占用 高度计算
  移动横栏位置 不改变框架高度计算
  好办功能即将到期提示
  消息通知组件
  验证展示效果代码删除
  去除调试查看 调用接口
  看效果
  调试
  接口调用注释
  请求不调用
  续费 不调用请求
  dist
  no message
  好办 模拟过期
  update: dist
  update: dist
  update: dist
  update: dist
  update: dist
  update: dist
  ...

# Conflicts:
#	dist/index.html
#	dist/static/css/index.less
#	dist/static/css/public.css
#	dist/static/js/49.807401f5792ada71e97a.js
#	dist/static/js/50.6e0ff0963e754df4d083.js
#	dist/static/js/50.a1015b29c62714ed4720.js
#	dist/static/js/51.3d27cc017de523b3681b.js
#	dist/static/js/52.4e303a459cce381b78f2.js
#	dist/static/js/52.6787e341b6db605d59cb.js
#	dist/static/js/53.2054052aba70bb38ed8b.js
#	dist/static/js/54.bd74a8552e242d23a2a3.js
#	dist/static/js/55.32d0cfad0434efe88df4.js
#	dist/static/js/55.8e5a59b31576b8166215.js
#	dist/static/js/6.8ce178bff02820b743a4.js
#	dist/static/js/60.af2565e8989c037b9353.js
#	dist/static/js/64.8f931ae5c230a8078f56.js
#	dist/static/js/83.dd23d1e732f2559371c1.js
#	dist/static/js/84.9235b0acae13a0283193.js
#	dist/static/js/84.c38cae3e613a1118eead.js
#	dist/static/js/85.074b79f8ca7fec6cf035.js
#	dist/static/js/86.ef1bb7b695c60c7f8800.js
#	dist/static/js/94.9dd6925c4492cc34c03f.js
#	dist/static/js/96.0358ce4b94a445e60b6b.js
#	dist/static/js/97.b09d8bd34179f669239d.js
#	dist/static/js/app.a955176c1d2a2acb1da9.js
#	dist/static/js/manifest.094659dcdca9738443aa.js
#	index.html
#	package.json
#	src/api/actCode.js
#	src/api/api.js
#	src/assets/QRcode.png
#	src/assets/font/demo_index.html
#	src/assets/font/iconfont.css
#	src/assets/font/iconfont.js
#	src/assets/font/iconfont.json
#	src/assets/font/iconfont.ttf
#	src/assets/font/iconfont.woff
#	src/assets/font/iconfont.woff2
#	src/assets/iphone-head.png
#	src/components/common/links.vue
#	src/components/common/selectShop.vue
#	src/components/layout/index.vue
#	src/components/preview-page.vue
#	src/components/single-upload.vue
#	src/components/utils/directives.js
#	src/router/actCodeManageRouter/attractFlowLinkRouter.js
#	src/router/actCodeManageRouter/staffActCodeRouter.js
#	src/router/index.js
#	src/views/enterprise/salutatory.vue
#	src/views/enterprise/salutatoryIndex.vue
#	src/views/enterprise/salutatorySet.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/detail.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/index.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/landingPage/cardView.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/landingPage/detail.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/landingPage/list.vue
#	src/views/salesleads/actCodeManage/attractFlowLink/landingPage/relationDialog.vue
#	src/views/salesleads/actCodeManage/components/select-clerk/index.vue
#	src/views/salesleads/actCodeManage/components/select-clerk/select-clerk.vue
#	src/views/salesleads/actCodeManage/components/select-clerk/selected-clerk-item.vue
#	src/views/salesleads/actCodeManage/staffActCode/actCodeDetail.vue
#	src/views/salesleads/actCodeManage/staffActCode/actCodeDetailStatistics.vue
#	src/views/salesleads/actCodeManage/staffActCode/actCodeRecord.vue
#	src/views/salesleads/actCodeManage/staffActCode/index.vue
#	src/views/salesleads/actCodeManage/staffActCode/newAddChart.vue
#	src/views/salesleads/actCodeManage/staffActCode/views/act-code-table.vue
#	src/views/salesleads/actCodeManage/staffActCode/views/batchAddCode.vue
#	src/views/salesleads/actCodeManage/staffActCode/views/group-list.vue
#	src/views/salesleads/actCodeManage/staffActCode/views/setActCode.vue
#	src/views/salesleads/components/actCodeDetailInfo.vue
#	src/views/salesleads/components/dataDetail.vue
#	src/views/salesleads/components/welcomesItem.vue
#	static/css/public.css
parents 7cf6242b 2afbd796
......@@ -49,7 +49,7 @@ export default {
margin-right: 16px;
padding: 8px 10px;
width: 190px;
height: calc(100vh - 60px);
height: calc(100% - 60px);
box-sizing: border-box;
overflow-y: auto;
.aside-menu-list {
......
<template>
<div class="hb-layout" v-loading="fullLoading.visible">
<div>
<notice @showNotice="_ => (isShowNotice = _)" />
<div class="hb-layout" :style="{ height: isShowNotice ? 'calc(100vh - 42px)' : '100vh' }" v-loading="fullLoading.visible">
<main-menu ref="mainMenu" :menu-list="menuList" :actived-code="activedMenu.length > 0 ? activedMenu[0].menuCode : ''" @showLoading="onShowLoading"></main-menu>
<aside-menu v-show="showAside" :menu-list="activedMenu.length > 0 ? activedMenu[0].childList : []" :actived-code="activedMenu.length > 2 ? activedMenu[2].menuCode : ''"></aside-menu>
<div class="hb-layout-content" :style="{ width: showAside ? 'calc(100% - 206px)' : '100%' }">
......@@ -12,9 +14,11 @@
</div>
</div>
</div>
</div>
</template>
<script>
import Notice from '../notice/notice.vue';
import { getRequest } from '@/api/api.js';
import errorMsg from '@/common/js/error.js';
import MainMenu from './main-menu.vue';
......@@ -23,7 +27,7 @@ import BreadMenu from './bread-menu.vue';
let provideData = { layoutVm: {} };
export default {
name: 'DmHbLayout',
components: { MainMenu, AsideMenu, BreadMenu },
components: { Notice, MainMenu, AsideMenu, BreadMenu },
provide: () => provideData,
props: {
// 菜单树数据
......@@ -39,6 +43,7 @@ export default {
data() {
return {
keepAlive: [],
isShowNotice: false,
showAside: true,
pagePaddingBottom: null,
enterpriseId: '',
......@@ -185,7 +190,7 @@ export default {
overflow-x: auto;
.hb-layout-content {
padding-top: 20px;
height: calc(100vh - 60px);
height: calc(100% - 60px);
box-sizing: border-box;
.hb-layout-pager {
height: 100%;
......
<template>
<el-dialog title="查看服务到期时间" :visible.sync="visible" width="600px" @close="onClose">
<el-table :data="list" max-height="700">
<el-table-column label="服务" prop="serviceName"></el-table-column>
<el-table-column label="到期时间" prop="expireDayStr"></el-table-column>
</el-table>
</el-dialog>
</template>
<script>
export default {
name: 'ExpireDialog',
data() {
return {};
},
props: {
visible: false,
list: []
},
methods: {
onClose() {
this.$emit('update:visible', false);
}
}
};
</script>
<style scoped></style>
<template>
<div>
<el-alert v-if="showNotice" class="notice-box" type="warning" show-icon @close="onClose">
<div class="notice-content" slot="title">
<div
class="expire-tip"
v-if="expireTip.show"
:style="{
'max-width': rechargeTip.show ? 'calc(100% - 500px)' : '100%'
}"
>
{{ expireTip.content }}
<el-button type="text" class="more-btn" @click="showDialog = true" v-if="expireTip.showButton">更多到期时间<i class="iconfont-components3 icon-cp-right"></i></el-button>
</div>
<div v-if="expireTip.show && rechargeTip.show" class="separator"></div>
<div v-if="rechargeTip.show" class="recharge-tip">
当前账户已欠费,为不影响正常的通讯业务,请及时充值。
<el-button type="text" class="rechange-btn" @click="toRecharge">前往充值中心<i class="iconfont-components3 icon-cp-right"></i></el-button>
</div>
</div>
</el-alert>
<expire-dialog :visible.sync="showDialog" :list="otherExpireServices"></expire-dialog>
</div>
</template>
<script>
import ExpireDialog from './expire-dialog.vue';
import { getAccountStateInfo, getExpireData } from './request.js';
export default {
name: 'Notice',
inject: ['projectName'],
components: { ExpireDialog },
data() {
return {
showNotice: false,
expireTip: {
show: false,
content: ''
},
rechargeTip: {
show: false
},
showDialog: false,
otherExpireServices: []
};
},
created() {
// 关闭通知后,所有页面都不再显示
// 下次登录后,如果任然欠费,需要再次显示通知
// 所以关闭通知后,不再查询账户欠费状态
if (sessionStorage.getItem('dmShowNotice') != 0) {
this.getAccountState();
}
},
methods: {
getAccountState() {
// this.loadAccountStateInfo();
this.loadExpireData();
},
loadAccountStateInfo() {
getAccountStateInfo().then(res => {
const { errorCode, result } = res.data || {};
if (errorCode != 0) return;
this.rechargeTip.show = result.accountBlance <= 0;
if (this.rechargeTip.show) {
this.updateNoticeShow();
}
});
},
loadExpireData() {
let dmUserInfo = JSON.parse(sessionStorage.getItem('userInfos'));
let service = {
serviceType: 1,
serviceName: '好办'
};
let serviceType = service.serviceType;
getExpireData({
serviceType
}).then(res => {
const { errorCode, result } = res.data || {};
if (errorCode != 0) return;
let { otherExpireServices, expireStatus, expireDayStr } = result;
otherExpireServices = otherExpireServices || [];
if (expireStatus == 1) {
this.expireTip.content = `${service.serviceName}将于 ${expireDayStr} 到期,到期后功能无法使用,请及时联系运营人员续费。`;
this.expireTip.show = true;
}
this.expireTip.showButton = otherExpireServices.length && serviceType == 11;
this.otherExpireServices = otherExpireServices || [];
if (serviceType == 11 && !dmUserInfo.superAdmin) {
this.expireTip.show = false;
}
if (this.expireTip.show) {
this.updateNoticeShow();
}
});
},
updateNoticeShow() {
if (this.showNotice) return;
this.showNotice = true;
this.$emit('show');
},
onClose() {
sessionStorage.setItem('dmShowNotice', 0);
this.showNotice = false;
this.$emit('close');
},
toRecharge() {
window.open(location.origin + '/marketing/#/recharge/do');
}
},
watch: {
showNotice(n) {
this.$emit('showNotice', n);
}
}
};
</script>
<style scoped>
.notice-box {
flex-shrink: 0;
padding: 0 21px;
width: 100%;
height: 42px;
background: #fef3eb;
}
.notice-box /deep/ .el-alert__content {
width: 100%;
}
.notice-box .notice-content {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
font-size: 14px;
font-weight: 400;
color: #303133;
line-height: 42px;
}
.notice-box .recharge-tip {
flex-shrink: 0;
width: 500px;
}
.notice-box .recharge-tip .rechange-btn {
margin-left: 12px;
font-weight: 500;
color: #fa8c16;
}
.notice-box .recharge-tip .rechange-btn /deep/ span {
display: flex;
align-items: center;
}
.notice-box .separator {
margin: 0 25px;
width: 2px;
height: 28px;
background: linear-gradient(180deg, rgba(253, 192, 49, 0) 0%, #fa8c16 50%, rgba(253, 192, 49, 0) 100%);
}
.notice-box .expire-tip {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-weight: 600;
}
.notice-box .more-btn {
margin-left: 12px;
font-weight: 500;
color: #fa8c16;
}
.notice-box .more-btn /deep/ span {
display: flex;
align-items: center;
}
.notice-box /deep/ .el-alert__closebtn {
top: 50%;
transform: translateY(-50%);
font-size: 18px;
color: #606266;
}
</style>
import axios from 'axios';
function getRequest(url, params) {
return axios({
method: 'get',
url: `${window.origin}${url}`,
data: {},
params: params,
headers: { 'content-type': 'application/x-www-form-urlencoded' } // "token": token
});
}
export function getAccountStateInfo() {
return getRequest('api-marketing/account-state-info', {
requestProject: 'haoban-manage-web'
});
}
export function getExpireData(params) {
params = params || {};
let dmUserInfo = JSON.parse(sessionStorage.getItem('userInfos'));
let serviceType = 1;
return getRequest('/api-admin/enterprise_expirebar', {
requestProject: 'haoban-manage-web',
serviceType: serviceType,
isSuperAdmin: dmUserInfo.superAdmin,
enterpriseId: dmUserInfo.enterpriseId,
...params
});
}
// 1好办,2微盟,3取数平台,4观云台,5万象仪,6分享有礼,7付费会员,8会员通,9抖音 10云服务器 11商户后台
const config = {
'/api-auth/login-for-haoban?requestProject=1': {
serviceName: '好办',
serviceType: 1
},
'/data-hook-frontend/#/flat-query-list': {
serviceName: '取数平台',
serviceType: 3
},
'/gicweb/cloud/#/storelist': {
serviceName: '观云台',
serviceType: 4
},
'/share-config/shareIndex': {
serviceName: '分享有礼',
serviceType: 6
},
'/gic-web/#/memberCardSet': {
serviceName: '付费会员',
serviceType: 7
}
};
const defaultService = {
serviceType: 11,
serviceName: '商户'
};
function getService(key) {
return config[key] || defaultService;
}
export function getCurrentService() {
return getService(window.location.pathname + window.location.hash);
}
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