Commit 602c6eb1 by caoyanzhi

Merge branch 'test' of http://git.gicdev.com/office/haoban-3 into test

parents 4596f3ff fb94809f
......@@ -23,7 +23,7 @@ module.exports = {
// Various Dev Server settings
// host: '0.0.0.0', // can be overwritten by process.env.HOST
host: 'localhost',//'192.168.1.20',//
port: 8006, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port: 8001, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: false,
errorOverlay: true,
notifyOnErrors: true,
......
......@@ -9,12 +9,19 @@
module.exports = {
proxyList: {
'/haoban-manage3-web/': {
target: 'https://www.gicdev.com/haoban-manage3-web/',
target: 'https://www.gicdev.com/haoban-manage3-web',
changeOrigin: true,
pathRewrite: {
'^/haoban-manage3-web': ''
}
},
'/api-plug/': {
target: 'https://www.gicdev.com/api-plug/',
changeOrigin: true,
pathRewrite: {
'^/api-plug': ''
}
},
'/haoban-app-customer-web/': {
target: 'https://www.gicdev.com/haoban-app-customer-web/',
changeOrigin: true,
......
......@@ -13,8 +13,9 @@
<meta charset="utf-8">
<link rel="shortcut icon" href="./favicon.ico" />
<title>好办管理平台</title>
<link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.69.css" />
<link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1628375_vcg1gtmx7lb.css" /> <!--好办后台3.0-->
<link rel="stylesheet" type="text/css" href="//web-1251519181.file.myqcloud.com/custom-element/custom-element.1.0.73.css" />
<!--好办后台3.0-->
<!-- <link rel="stylesheet" type="text/css" href="//at.alicdn.com/t/font_1628375_vcg1gtmx7lb.css" /> -->
<script src="//at.alicdn.com/t/font_1628375_vcg1gtmx7lb.js"></script>
<!-- 3.0组件库图标 -->
<link rel="stylesheet" href="//at.alicdn.com/t/font_2859043_udehp133w1.css">
......
......@@ -52,6 +52,13 @@ module.exports = [
]
},
{
menu: ['活码管理', '', 1, 'iconrenwuchuda'],
children: [
{ menu: ['员工活码', 'staffActCode', 1] },
{ menu: ['引流链接', 'attractFlowLink', 1] }
]
},
{
menu: ['卡券活动', '', 1, 'iconkaquanhuodong'],
children: [
{
......
......@@ -40,6 +40,7 @@
"vue-amap": "^0.5.10",
"vue-awesome-swiper": "^3.1.3",
"vue-clipboard2": "^0.2.0",
"vue-qr": "^1.5.3",
"vue-runtime-helpers": "^1.1.2",
"xlsx": "^0.13.5"
},
......@@ -96,7 +97,7 @@
"vue-axios": "^2.1.1",
"vue-loader": "^13.3.0",
"vue-style-loader": "^3.0.1",
"vue-template-compiler": "2.6.6",
"vue-template-compiler": "^2.6.6",
"vuedraggable": "^2.23.2",
"webpack": "^3.6.0",
"webpack-bundle-analyzer": "^2.9.0",
......
import { postRequest, getRequest, postJsonRequest } from '@/api/api';
// 新增活码分组
export const addActCodeGroupApi = params => postRequest('/haoban-manage3-web/hm/group/save', params);
// 编辑活码分组
export const editActCodeGroupApi = params => postRequest('/haoban-manage3-web/hm/group/edit', params);
// 删除分组
export const delActCodeGroupApi = params => postRequest('/haoban-manage3-web/hm/group/delete', params);
// 活码列表
export const actCodeListApi = params => postJsonRequest('/haoban-manage3-web/hm/qrcode/list', params);
// 落地页模板列表
export const guidePageList = params => getRequest('/haoban-manage3-web/hm/guide/page/list', params);
// 落地页模板删除
export const guidePageDel = params => postRequest('/haoban-manage3-web/hm/guide/page/delete', params);
// 落地页模板关联详情
export const guidePageRelation = params => getRequest('/haoban-manage3-web/hm/guide/page/relation', params);
// 落地页模板详情
export const guidePageDetail = params => getRequest('/haoban-manage3-web/hm/guide/page/detail', params);
// 落地页 获取当前企业电话、logo
export const wxEnterpriseList = params => postRequest('/haoban-manage3-web/wx-enterprise-list?filteRight=1&requestProject=haoban-manage-web', params);
// 落地页模板编辑详情
export const guidePageEdit = params => postRequest('/haoban-manage3-web/hm/guide/page/edit', params);
// 落地页模板新增详情
export const guidePageSave = params => postRequest('/haoban-manage3-web/hm/guide/page/save', params);
// 【活码链接】 -- 列表
export const linkPage = params => postRequest('/haoban-manage3-web/hm/link/page', params);
//【活码】详情-查看明细列表
export const detailClerkList = params => postJsonRequest('/haoban-manage3-web/hm/qrcode/detail-clerk-list-page', params);
//【欢迎语】-- 特殊欢迎语关联详情列表
export const welcomeRelationList = params => getRequest('/haoban-manage3-web/welcome/relation/list', params);
// 【活码链接】-- 新增
export const linkAdd = params => postJsonRequest('/haoban-manage3-web/hm/link/add', params);
// 【活码链接】-- 编辑
export const linkUpdate = params => postJsonRequest('/haoban-manage3-web/hm/link/update', params);
// 【活码链接】-- 详情 actCode
export const linkDetail = params => getRequest('/haoban-manage3-web/hm/link/detail', params);
// 【活码链接】 -- 统计-总计
export const statisticsTotal = params => postJsonRequest('/haoban-manage3-web/hm/link/statistics/total', params);
// 【活码链接】 -- 统计-图表
export const statisticsChart = params => postJsonRequest('/haoban-manage3-web/hm/link/statistics/chart', params);
// 【活码链接】 -- 统计--查看明细
export const statisticsClerk = params => postJsonRequest('/haoban-manage3-web/hm/link/statistics/clerk', params);
// 【活码链接】-- 门店列表
export const storeListApi = params => getRequest('/haoban-manage3-web/hm/store-list', params);
......@@ -21,10 +21,11 @@ Vue.axios.defaults.timeout = 500000;
let local = window.location.origin;
const userInfos = JSON.parse(sessionStorage.getItem('userInfos') || '{}');
let gicHost = typeof userInfos.gicHost == 'string' ? userInfos.gicHost.replace(/\/$/, '') : '';
console.log(gicHost);
if (local.indexOf('localhost') >= 0) {
gicHost = local;
}
gicHost = local;
// gicHost = local;
// let local = process.env.NODE_ENV == 'development' ? 'https://www.gicdev.com' : '';
......@@ -56,6 +57,13 @@ Vue.axios.interceptors.request.use(
cancel
});
});
/**
* 获取好办 企业 id
*/
if (!!sessionStorage.getItem('userInfoBrandId')) {
let haobanSign = sessionStorage.getItem('userInfoBrandId');
haobanSign ? (config.headers.enterpriseId = haobanSign) : '';
}
return config;
},
err => {
......@@ -67,30 +75,29 @@ Vue.axios.interceptors.request.use(
Vue.axios.interceptors.response.use(
data => {
removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
if (data.status && data.status == 200 && data.data.errorCode != 1) {
if (data.data.errorCode == 4) {
if (window.location.href.indexOf('gic-error') != -1) {
return false;
}
window.location.href = gicHost + '/gic-web/#/login?ishb=1';
}
if (data.data.errorCode == 10 || data.data.errorCode == 7) {
window.location.href = gicHost + '/haoban-3/#/index';
}
return data;
}
// if (data.status && data.status == 200 && (data.data.errorCode != 1||data.data.code!=1)) {
// if (data.data.errorCode == 4) {
// if (window.location.href.indexOf('gic-error') != -1) {
// return false;
// }
// window.location.href = gicHost + '/gic-web/#/login?ishb=1';
// }
// if (data.data.errorCode == 10 || data.data.errorCode == 7) {
// window.location.href = gicHost + '/haoban-3/#/index';
// }
// return data;
// }
return data;
},
err => {
if (err.response.status == 502) {
window.location.href = gicHost + '/gic-web/#/login?ishb=1';
Message.error({ message: '服务异常⊙﹏⊙∥' });
}
if (err.response.status != 403) {
window.location.href = gicHost + '/gic-web/#/login?ishb=1';
Message.error({ message: '登录失效!' });
}
// if (err.response.status == 502) {
// window.location.href = gicHost + '/gic-web/#/login?ishb=1';
// Message.error({ message: '服务异常⊙﹏⊙∥' });
// }
// if (err.response.status != 403) {
// window.location.href = gicHost + '/gic-web/#/login?ishb=1';
// Message.error({ message: '登录失效!' });
// }
return Promise.resolve(err);
}
);
......@@ -116,6 +123,26 @@ export const getRequest = (url, params) => {
});
};
/*
*
* 统一 delete 请求方法
* @url: 请求的 url
* @params: 请求带的参数
* @header: 带 token
*
*/
export const deleteRequest = (url, params) => {
params.requestProject = 'haoban-manage-web';
return Vue.axios({
method: 'delete',
url: `${local}${url}`,
data: {},
params: params,
headers: {
'Content-type': 'application/x-www-form-urlencoded'
} // "token": token
});
};
/**
*
* 统一 post 请求方法
......
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
@font-face {
font-family: "iconfont-hb3"; /* Project id 1628375 */
src: url('iconfont.woff2?t=1657521279508') format('woff2'),
url('iconfont.woff?t=1657521279508') format('woff'),
url('iconfont.ttf?t=1657521279508') format('truetype');
}
.iconfont-hb3 {
font-family: "iconfont-hb3" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icondianhua:before {
content: "\ebeb";
}
.iconzhibiaoshuoming:before {
content: "\eb57";
}
.iconmore:before {
content: "\ec97";
}
.iconclose1:before {
content: "\e62c";
}
.iconliushihuiyuan:before {
content: "\e6ca";
}
.iconxinzengyonghu:before {
content: "\e636";
}
.iconPlusOutlined:before {
content: "\e61f";
}
.iconbiaoge-erweima:before {
content: "\e614";
}
.iconguanliyuanka:before {
content: "\e6d9";
}
.iconxiajiantou:before {
content: "\e9e9";
}
.iconshangjiantou:before {
content: "\ea62";
}
.iconno-permission:before {
content: "\ec9c";
}
.iconqiweikehu:before {
content: "\e64f";
}
.iconcheck:before {
content: "\e7fc";
}
.iconshouquanshanghu:before {
content: "\ec95";
}
.iconyingyongjieru:before {
content: "\ec94";
}
.icondaogoushezhi:before {
content: "\ec93";
}
.iconshangpinzhongxin:before {
content: "\ec92";
}
.icontongxunlu1:before {
content: "\ec91";
}
.iconshenhezhongxin1:before {
content: "\ec90";
}
.iconhuanyingyu-o:before {
content: "\ec8f";
}
.iconhuihuarenwujilu:before {
content: "\ec8e";
}
.iconqunfarenwujilu:before {
content: "\ec8d";
}
.iconyuezhibiao:before {
content: "\ec8c";
}
.iconyunribao:before {
content: "\ec8b";
}
.icondenglushuju:before {
content: "\ec8a";
}
.iconsucaiku1:before {
content: "\ec88";
}
.iconpingjiahuifang:before {
content: "\ec87";
}
.iconkaquanhuodong:before {
content: "\ec86";
}
.iconrenwuchuda:before {
content: "\ec85";
}
.iconkehushezhi:before {
content: "\e697";
}
.iconkehubiaoqian:before {
content: "\ec84";
}
.iconwodekehu:before {
content: "\ec83";
}
.icongongzhonghao:before {
content: "\e60f";
}
.icongongzhonghao1:before {
content: "\e691";
}
.iconshurumima-mingma:before {
content: "\ec6d";
}
.iconshurumima-anma:before {
content: "\ec6c";
}
.iconreload-outlined:before {
content: "\e61e";
}
.iconerweima:before {
content: "\e620";
}
.iconxianshiping:before {
content: "\e62e";
}
.iconclose:before {
content: "\e992";
}
.iconchaolianjiebeifen:before {
content: "\e6e1";
}
.iconwenjianleixing-xiaochengxu:before {
content: "\ec29";
}
.iconwenjianleixing-lianjie:before {
content: "\ec28";
}
.iconwenjianleixing-wenjian:before {
content: "\ec26";
}
.iconwenjianleixingshipin:before {
content: "\ec24";
}
.iconwenjianleixingtupian:before {
content: "\e643";
}
.iconxiangyou:before {
content: "\e60c";
}
.iconlianjie:before {
content: "\e62b";
}
.iconduankailianjie:before {
content: "\e674";
}
.iconshezhi:before {
content: "\e688";
}
.iconshenhezhongxin:before {
content: "\e627";
}
.iconkongbiaoqian:before {
content: "\e64c";
}
.icondingdan_pingjia:before {
content: "\e654";
}
.iconxiaochengxu:before {
content: "\e625";
}
.iconpre:before {
content: "\e641";
}
.iconnext:before {
content: "\e640";
}
.iconhuanyingci:before {
content: "\e60d";
}
.iconnew:before {
content: "\e61d";
}
.iconmingxibeifen:before {
content: "\eae0";
}
.iconshangpinshezhi:before {
content: "\e60b";
}
.icongukeguanliicon:before {
content: "\e60a";
}
.iconshuaxin1:before {
content: "\e613";
}
.icongou:before {
content: "\e606";
}
.iconshouquanyanzheng:before {
content: "\e687";
}
.iconhuaban:before {
content: "\e62a";
}
.iconsucaiku:before {
content: "\eab6";
}
.iconwenjian1:before {
content: "\eaae";
}
.iconbofang1:before {
content: "\eaad";
}
.iconbiaoqing:before {
content: "\e612";
}
.iconwenzi:before {
content: "\e611";
}
.icondaima:before {
content: "\e6bc";
}
.icontupian:before {
content: "\e73a";
}
.iconwenjian:before {
content: "\e62d";
}
.iconshipin:before {
content: "\e605";
}
.icontuozhuaiopen:before {
content: "\e61c";
}
.icontoufang2:before {
content: "\e845";
}
.iconcelve:before {
content: "\eaa9";
}
.iconmoban:before {
content: "\e619";
}
.icontongxunlu:before {
content: "\e64e";
}
.iconwodeqiaquan-:before {
content: "\e6bb";
}
.iconhuihuajinglingicon-:before {
content: "\e678";
}
.iconshibai:before {
content: "\e60e";
}
.iconchenggong:before {
content: "\e63c";
}
.iconqiyeweixin:before {
content: "\e628";
}
.iconnan:before {
content: "\e629";
}
.iconxingbienv:before {
content: "\e66b";
}
.iconrenwuzhipai:before {
content: "\e7a5";
}
.iconwanchengrenwu:before {
content: "\ea6c";
}
.iconziyuan1:before {
content: "\e6a4";
}
.icondingwei:before {
content: "\e918";
}
.icongengduo2:before {
content: "\ea5b";
}
.iconqiyexinxi:before {
content: "\ea7a";
}
.iconjia:before {
content: "\ea79";
}
.icondaishenhe_orange:before {
content: "\e604";
}
.iconrenwu1:before {
content: "\e607";
}
.iconshenhe:before {
content: "\e772";
}
.icongengduo1:before {
content: "\e68c";
}
.iconjian:before {
content: "\e634";
}
.iconguanliyuanliebiao:before {
content: "\e609";
}
.iconbumen:before {
content: "\ea78";
}
.iconxiafa:before {
content: "\e64a";
}
.icongengduo:before {
content: "\e603";
}
.iconxitongguanlitubiao_mobanshezhi:before {
content: "\e618";
}
.iconribao:before {
content: "\e750";
}
.iconribaoshezhi:before {
content: "\e7f4";
}
.iconrenwu:before {
content: "\e77a";
}
.iconzhibiao:before {
content: "\e610";
}
.iconhuawujinengzupeizhi:before {
content: "\e601";
}
.iconbuliangpingjiashezhi:before {
content: "\e7f6";
}
.iconhuawushuju:before {
content: "\e600";
}
.iconshuaxin:before {
content: "\e61b";
}
.iconqiaquan:before {
content: "\e6b6";
}
.iconjichushezhi:before {
content: "\e65e";
}
.icontianjiajiahaowubiankuang:before {
content: "\e81a";
}
.iconchengyuan:before {
content: "\e61a";
}
.iconnavigate_next:before {
content: "\e62f";
}
.iconchangyongicon-:before {
content: "\e617";
}
.iconqiye-tianchong:before {
content: "\e730";
}
.iconzuzhijiagouguanli:before {
content: "\e635";
}
.icondianpu-kuai:before {
content: "\e602";
}
.iconxiala:before {
content: "\e608";
}
.iconrizhifuwu:before {
content: "\e65a";
}
This source diff could not be displayed because it is too large. You can view the blob instead.
/* Logo 字体 */
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1657604571745" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4621" xmlns:xlink="http://www.w3.org/1999/xlink" width="48" height="48"><defs><style type="text/css">@font-face { font-family: feedback-iconfont; src: url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff2?t=1630033759944") format("woff2"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.woff?t=1630033759944") format("woff"), url("//at.alicdn.com/t/font_1031158_u69w8yhxdu.ttf?t=1630033759944") format("truetype"); }
</style></defs><path d="M0 0h1022.464v1024H0V0z" fill="#F1F4F9" p-id="4622"></path><path d="M840.192 962.048c-1.024-154.624-147.456-260.096-328.192-260.096-178.176 0-323.584 102.4-328.192 253.44v26.112c0 23.04 13.824 41.984 31.232 41.984h594.432c16.896 0 31.232-18.944 31.232-41.984l-0.512-19.456c0 0.512 0 0 0 0z" fill="#DBE1EB" p-id="4623"></path><path d="M512 701.952c-37.376 0-75.264 4.096-111.616 12.8 26.112 25.6 58.88 44.544 94.208 54.784 58.88 17.92 122.368 0 163.328-45.568-47.104-14.848-96.256-22.016-145.92-22.016z" fill="#B9C4D6" p-id="4624"></path><path d="M512 245.76h245.76v245.76c0 135.68-110.08 245.76-245.76 245.76s-245.76-110.08-245.76-245.76 110.08-245.76 245.76-245.76z" fill="#DBE1EB" p-id="4625"></path><path d="M336.384 491.52c0 96.768 78.336 175.616 175.616 175.616S687.616 588.8 687.616 491.52c0-96.768-78.336-175.616-175.616-175.616C415.232 315.904 336.384 394.24 336.384 491.52z" fill="#FFFFFF" opacity=".8" p-id="4626"></path><path d="M415.232 421.376c0 9.728 7.68 17.408 17.408 17.408s17.408-7.68 17.408-17.408-7.68-17.408-17.408-17.408c-9.216-0.512-17.408 7.68-17.408 17.408zM573.44 421.376c0 9.728 7.68 17.408 17.408 17.408s17.408-7.68 17.408-17.408-7.68-17.408-17.408-17.408c-9.728-0.512-17.408 7.68-17.408 17.408z" fill="#4A4D53" opacity=".8" p-id="4627"></path><path d="M411.136 474.112h44.032c8.704 0 13.312 4.608 13.312 13.312 0 8.704-4.608 13.312-13.312 13.312h-44.032c-8.704 0-13.312-4.608-13.312-13.312 0-9.216 4.608-13.312 13.312-13.312zM568.832 474.112h44.032c8.704 0 13.312 4.608 13.312 13.312 0 8.704-4.608 13.312-13.312 13.312h-44.032c-8.704 0-13.312-4.608-13.312-13.312 0.512-9.216 4.608-13.312 13.312-13.312z" fill="#F9BCBC" opacity=".8" p-id="4628"></path><path d="M513.536 442.368c0 7.68-5.632 13.824-13.312 13.824s-13.312-6.656-13.312-13.824c0-1.024 0-2.56 0.512-3.584 1.536 6.144 6.656 10.24 12.8 10.752 6.144 0 11.776-4.608 13.312-10.752 1.536 6.144 6.656 10.24 13.312 10.752 6.144 0 11.264-4.608 12.8-10.752 0.512 1.024 0.512 2.56 0.512 3.584 0 7.68-5.632 13.824-13.312 13.824s-13.312-6.144-13.312-13.824z" fill="#4A4D53" opacity=".94" p-id="4629"></path></svg>
\ No newline at end of file
......@@ -14,25 +14,24 @@
export default {
/*
* var storeBusinessTime="10:00-22:00" to
*/
* var storeBusinessTime="10:00-22:00" to
*/
timeToDate: function(val) {
var date = new Date()
var date = new Date();
var y = date.getFullYear();
var m = date.getMonth() +1;
var m = date.getMonth() + 1;
var day = date.getDate();
var d = [],newArr = [];
var d = [],
newArr = [];
var dArr = val.split('-');
dArr.forEach(function(ele,index){
newArr.push(ele.split(':'))
})
d = [new Date(y,m,day,newArr[0][0],newArr[0][1]),new Date(y,m,day,newArr[1][0],newArr[1][1])]
dArr.forEach(function(ele, index) {
newArr.push(ele.split(':'));
});
d = [new Date(y, m, day, newArr[0][0], newArr[0][1]), new Date(y, m, day, newArr[1][0], newArr[1][1])];
return d;
},
dateToTime(val) {
// console.log(val)
// (0-9)年月数字的显示
......@@ -40,9 +39,9 @@ export default {
return num > 9 ? '' + num : '0' + num;
}
var t;
var t1 = formatDig(new Date(val[0]).getHours())+':'+formatDig(new Date(val[0]).getMinutes())
var t2 = formatDig(new Date(val[1]).getHours())+':'+formatDig(new Date(val[1]).getMinutes())
t= t1+'-'+t2
var t1 = formatDig(new Date(val[0]).getHours()) + ':' + formatDig(new Date(val[0]).getMinutes());
var t2 = formatDig(new Date(val[1]).getHours()) + ':' + formatDig(new Date(val[1]).getMinutes());
t = t1 + '-' + t2;
return t;
}
}
};
var SIGN_REGEXP = /([yMdhsm])(\1*)/g;
var DEFAULT_PATTERN = 'yyyy-MM-dd';
function padding(s, len) {
var len = len - (s + '').length;
for (var i = 0; i < len; i++) { s = '0' + s; }
return s;
};
var len = len - (s + '').length;
for (var i = 0; i < len; i++) {
s = '0' + s;
}
return s;
}
export default {
getQueryStringByName: function (name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
var context = "";
if (r != null)
context = r[2];
reg = null;
r = null;
return context == null || context == "" || context == "undefined" ? "" : context;
getQueryStringByName: function(name) {
var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
var r = window.location.search.substr(1).match(reg);
var context = '';
if (r != null) context = r[2];
reg = null;
r = null;
return context == null || context == '' || context == 'undefined' ? '' : context;
},
formatDate: {
format: function(date, pattern) {
pattern = pattern || DEFAULT_PATTERN;
return pattern.replace(SIGN_REGEXP, function($0) {
switch ($0.charAt(0)) {
case 'y':
return padding(date.getFullYear(), $0.length);
case 'M':
return padding(date.getMonth() + 1, $0.length);
case 'd':
return padding(date.getDate(), $0.length);
case 'w':
return date.getDay() + 1;
case 'h':
return padding(date.getHours(), $0.length);
case 'm':
return padding(date.getMinutes(), $0.length);
case 's':
return padding(date.getSeconds(), $0.length);
}
});
},
formatDate: {
format: function (date, pattern) {
pattern = pattern || DEFAULT_PATTERN;
return pattern.replace(SIGN_REGEXP, function ($0) {
switch ($0.charAt(0)) {
case 'y': return padding(date.getFullYear(), $0.length);
case 'M': return padding(date.getMonth() + 1, $0.length);
case 'd': return padding(date.getDate(), $0.length);
case 'w': return date.getDay() + 1;
case 'h': return padding(date.getHours(), $0.length);
case 'm': return padding(date.getMinutes(), $0.length);
case 's': return padding(date.getSeconds(), $0.length);
}
});
},
parse: function (dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP);
var matchs2 = dateString.match(/(\d)+/g);
if (matchs1.length == matchs2.length) {
var _date = new Date(1970, 0, 1);
for (var i = 0; i < matchs1.length; i++) {
var _int = parseInt(matchs2[i]);
var sign = matchs1[i];
switch (sign.charAt(0)) {
case 'y': _date.setFullYear(_int); break;
case 'M': _date.setMonth(_int - 1); break;
case 'd': _date.setDate(_int); break;
case 'h': _date.setHours(_int); break;
case 'm': _date.setMinutes(_int); break;
case 's': _date.setSeconds(_int); break;
}
}
return _date;
}
return null;
parse: function(dateString, pattern) {
var matchs1 = pattern.match(SIGN_REGEXP);
var matchs2 = dateString.match(/(\d)+/g);
if (matchs1.length == matchs2.length) {
var _date = new Date(1970, 0, 1);
for (var i = 0; i < matchs1.length; i++) {
var _int = parseInt(matchs2[i]);
var sign = matchs1[i];
switch (sign.charAt(0)) {
case 'y':
_date.setFullYear(_int);
break;
case 'M':
_date.setMonth(_int - 1);
break;
case 'd':
_date.setDate(_int);
break;
case 'h':
_date.setHours(_int);
break;
case 'm':
_date.setMinutes(_int);
break;
case 's':
_date.setSeconds(_int);
break;
}
}
return _date;
}
return null;
}
}
};
......@@ -48,7 +48,7 @@
<div class="upload-content">
<el-upload class="avatar-uploader" action="123" :show-file-list="false" :on-success="handleAvatarSuccess" :before-upload="beforeAvatarUpload">
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
<i v-else class="iconfont-hb3 iconPlusOutlined avatar-uploader-icon"></i>
</el-upload>
<p>请上传长宽比为5:4的图片</p>
</div>
......@@ -695,8 +695,8 @@ export default {
}
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
font-size: 24px;
color: #303133;
width: 150px;
height: 150px;
line-height: 150px;
......
......@@ -236,18 +236,12 @@ export default {
});
that.$forceUpdate();
}
return;
}
if (resData.errorCode != 1 && resData.errorCode != 10031) {
errMsg.errorMsg(resData);
}
})
.catch(function(error) {
that.$message.error({
duration: 1000,
message: error.message
});
});
.catch(function(error) {});
}
},
watch: {
......
<template>
<el-dialog title="链接信息" :visible.sync="show" width="600px" :before-close="close">
<div v-loading="loading" class="links-block">
<div class="links__body">
<div class="links__body--url">{{ src }}</div>
<div class="links__body--btn">
<el-button v-clipboard:text="src" v-show="src" type="text" icon="iconfont icon-lianjie fz14">复制链接</el-button>
</div>
</div>
<div class="link__divider"></div>
<div class="links__qr">
<div style="text-align:center">
<vue-qr id="qrImg" :text="src" :size="102" :margin="5"></vue-qr>
</div>
<el-button class="links__qr--btn" v-show="src" type="text" icon="iconfont icon-icon_yunxiazai fz14 mr4" @click="downloadImg">二维码下载</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import VueQr from 'vue-qr';
export default {
name: 'links',
components: {
VueQr
},
props: {
show: {
type: Boolean,
default: false
},
src: {
type: String,
default: ''
},
imageName: {
type: String,
default: ''
}
},
data() {
return {
loading: false,
miniprogram: {
link: '',
url: ''
}
};
},
watch: {
show(val) {
if (val) {
console.log(this.src);
}
}
},
methods: {
close() {
this.$emit('update:show', false);
},
downloadImg() {
const qrcode = document.getElementById('qrImg');
console.log(qrcode);
let img = qrcode.getElementsByTagName('img')[0];
let link = document.createElement('a');
let url = img.getAttribute('src');
link.setAttribute('href', url);
link.setAttribute('download', `${this.imageName}.png`);
link.click();
}
}
};
</script>
<style lang="scss" scoped>
.links__body {
// border: 1px solid #ddd;
flex: 1;
&--url {
height: 138px;
overflow-x: hidden;
overflow-y: auto;
word-break: break-all;
padding: 13px 16px 0 16px;
line-height: 17px;
font-size: 12px;
}
&--btn {
text-align: center;
line-height: 1;
}
}
.links__qr {
padding: 22px 30px 10px 24px;
text-align: center;
&--btn {
margin: 18px 0 0;
}
}
.link__divider {
margin-top: 19px;
height: 130px;
width: 1px;
background-color: #ebecf0;
}
.links-block {
display: flex;
background: #f7f8fa;
margin: 10px 0 10px;
}
.link-title {
display: flex;
align-items: center;
font-weight: 500;
color: #303133;
line-height: 20px;
margin-top: 20px;
i {
font-size: 20px;
margin-right: 8px;
}
}
</style>
<template>
<el-popover placement="bottom" style="min-width: 357px" v-model="departmentVisible">
<dm-simple-transfer v-model="selected" :props="props" :data="data" :item-size="66" :titles="['选择门店', '已选门店']" filterable filter-placeholder="请输入门店名称/code" @change="change">
<div slot-scope="{ option }">
<p>{{ option.storeName }}</p>
<p style="font-size: 12px;line-height: 18px">{{ option.storeCode }}</p>
<p v-show="option.isOver == 1" class="isOver">所有导购今日添加已到上限</p>
</div>
</dm-simple-transfer>
<div class="show-select-num cursor-pointer w-250" slot="reference">
已经选择{{ selected.length }}家门店
<span class="el-input__suffix"
><span class="el-input__suffix-inner"><i :class="['el-select__caret el-input__icon el-icon-arrow-up', departmentVisible ? 'is-reverse' : '']"></i></span
></span>
</div>
</el-popover>
</template>
<script>
export default {
props: {
selected: {
type: Array,
default: () => []
},
data: {
type: Array,
default: () => []
}
},
data() {
return {
departmentVisible: false,
props: {
key: 'storeId',
label: 'storeName'
}
};
},
methods: {
change(val) {
console.log(val);
this.$emit('change', val);
}
}
};
</script>
<style lang="scss" scoped>
.show-select-num {
position: relative;
display: inline-block;
font-size: inherit;
height: 32px;
line-height: 32px;
padding-left: 10px;
-webkit-appearance: none;
background-color: #fff;
background-image: none;
border-radius: 4px;
border: 1px solid #dcdfe6;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #606266;
.el-select__caret {
color: #c0c4cc;
font-size: 14px;
transition: transform 0.3s;
transform: rotate(180deg);
cursor: pointer;
&.is-reverse {
transform: rotate(0deg);
}
}
}
.isOver {
font-size: 12px;
color: #fa8c16;
line-height: 18px;
}
</style>
<template>
<div class="hb-layout" 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%' }">
<bread-menu v-if="activedMenu.length > 3" :menu-list="activedMenu.slice(2)"></bread-menu>
<div class="hb-layout-pager" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%', 'padding-bottom': pagePaddingBottom }">
<!-- 页面内容 -->
<!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> -->
<keep-alive>
<router-view :brand-id="enterpriseId" v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :brand-id="enterpriseId"></router-view>
<div>
<notice></notice>
<div class="hb-layout" 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%' }">
<bread-menu v-if="activedMenu.length > 3" :menu-list="activedMenu.slice(2)"></bread-menu>
<div class="hb-layout-pager" id="hb-layout-pager-one" :style="{ height: activedMenu.length > 3 ? `calc(100% - 30px)` : '100%', 'padding-bottom': pagePaddingBottom }">
<!-- 页面内容 -->
<!-- <router-view v-if="activeBrand" :brandId="activeBrand" :activeGroupId="activeGroup" :tabType="activeTab" @showTab="showTab"></router-view> -->
<keep-alive>
<router-view :brand-id="enterpriseId" v-if="$route.meta.keepAlive"></router-view>
</keep-alive>
<router-view v-if="!$route.meta.keepAlive" :brand-id="enterpriseId"></router-view>
</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';
......@@ -25,7 +29,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: {
// 菜单树数据
......
......@@ -22,8 +22,7 @@
<div class="imageList">
<el-upload class="avatar-uploader" v-show="!disabled" :multiple="limit > 1 ? true : false" :file-list="imgList" :show-file-list="false" :http-request="handleRequest" :before-upload="beforeUpload">
<div v-if="!videoSrc" class="flex-column">
<i class="el-icon-plus vatar-uploader-icon"></i>
<p class="font-12 color-606266" style="line-height: 22px;">上传图片</p>
<i class="iconfont-hb3 iconPlusOutlined avatar-uploader-icon"></i>
</div>
</el-upload>
<p class="upload-tip color-909399 font-12 pos-bottom">
......@@ -150,6 +149,7 @@ export default {
position: relative;
overflow: hidden;
margin-top: 5px;
border-radius: 2px;
}
}
......
<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;
} else if (otherExpireServices.length) {
this.expireTip.content = `${otherExpireServices[0].serviceName}将于 ${otherExpireServices[0].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');
}
}
};
</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);
}
<template>
<div class="iphone">
<span class="pageTitle">{{ card.pageTitle }}</span>
<div class="content">
<img :src="card.pageBackgroundImg" class="bgImg" v-if="card.pageBackgroundImg" />
<div class="enterpriseInfo">
<div class="logo">
<img :src="card.merchantLogo" v-if="card.merchantLogo" />
</div>
<div class="name">{{ card.merchantName }}</div>
</div>
<div class="QRcode"></div>
<div class="leadingText">{{ card.guideComment }}</div>
<div class="enterpriseNum">
<i class="iconfont-hb3 iconhuawushuju"></i>
<p>{{ card.merchantPhoneNumber }}</p>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
card: {
pageTitle: '',
merchantName: '',
merchantPhoneNumber: '',
merchantLogo: '',
pageBackgroundImg: '',
guideComment: ''
}
};
},
props: {
data: {
type: Object,
default: () => {}
}
},
watch: {
data: {
handler(val) {
if (val) {
const { pageTitle, merchantName, merchantPhoneNumber, merchantLogo, pageBackgroundImg, guideComment } = val;
this.card = { pageTitle, merchantName, merchantPhoneNumber, merchantLogo, pageBackgroundImg, guideComment };
}
},
deep: true,
immediate: true
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.iphone {
position: relative;
display: inline-block;
font-size: 0;
line-height: 0;
background-image: url('../assets/iphone3.png');
background-repeat: no-repeat;
background-size: 280px auto;
width: 280px;
height: 543px;
.pageTitle {
font-size: 14px;
position: sticky;
color: #000000;
font-weight: 500;
top: 105px;
width: 125px;
margin-left: 78px;
line-height: 20px;
display: inline-block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
text-align: center;
}
.content {
width: 228px;
height: 410px;
box-sizing: border-box;
padding: 20px 16px;
position: absolute;
top: 97px;
left: 26px;
background: #ffffff;
display: flex;
align-items: center;
flex-direction: column;
border-radius: 10px 10px 24px 24px;
.bgImg {
position: absolute;
width: 228px;
border-radius: 10px 10px 24px 24px;
top: 0;
z-index: 0;
max-height: 410px;
}
.enterpriseInfo {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
z-index: 100;
.logo {
width: 36px;
height: 36px;
background: #f6f6f6;
border-radius: 60px;
img {
width: 36px;
height: 36px;
border-radius: 60px;
}
}
.name {
margin-left: 10px;
font-size: 12px;
font-weight: 500;
color: #242835;
line-height: 17px;
width: 80%;
}
}
.QRcode {
z-index: 100;
width: 176px;
height: 176px;
margin: 11px 0 16px 0;
background: #f6f6f6;
background-image: url('../assets/QRcode.png');
background-size: 176px auto;
}
.leadingText {
z-index: 100;
font-size: 10px;
color: #7f818a;
line-height: 14px;
width: 88%;
text-align: center;
}
.enterpriseNum {
z-index: 100;
min-width: 130px;
margin-top: 68px;
height: 32px;
box-sizing: border-box;
border-radius: 40px;
border: 1px solid #9da0a6;
display: flex;
align-items: center;
padding: 9px 12px;
line-height: 14px;
color: #63666b;
font-size: 12px;
i {
font-size: 12px;
}
p {
margin-left: 5px;
}
}
}
}
</style>
<template>
<div class="iphone">
<div class="infoList">
<div class="infoListBox">
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div class="textInfo">
<div class="content" v-html="welcomeContent"></div>
</div>
</div>
<div class="infoListBox" v-for="(item, index) in mediaList" :key="index">
<div>
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div v-if="item.mediaType == 1 || item.mediaType == 7" class="imgInfo">
<img :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 2" class="videoInfo" @click="blank(item.mediaUrl)">
<video :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 3" class="docInfo" @click="blank(item.mediaUrl)">
<div class="docTitle">
<b>{{ item.mediaTitle }}</b>
<p>{{ item.mediaSize }} KB</p>
</div>
<svg-icon iconname="iconwenjianleixing-wenjian" size="40"> </svg-icon>
</div>
<div v-if="item.mediaType == 4" class="urlInfo">
<div class="urlTitle">{{ item.mediaTitle }}</div>
<div class="urlContent">
<b>{{ item.mediaTitle }}</b>
<svg-icon iconname="iconwenjianleixing-lianjie" size="40"> </svg-icon>
</div>
</div>
<div v-if="item.mediaType == 5 || item.mediaType == 6" class="appletsInfo">
<div class="appletsTitle">{{ item.miniProgramName }}</div>
<div class="appletsTitle" style="font-size:12px">{{ item.mediaTitle }}</div>
<img :src="item.mediaUrl" />
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {};
},
props: {
welcomeContent: {
type: String,
default: ''
},
mediaList: {
type: Array,
default: () => []
}
},
watch: {
mediaList(val) {
console.log(val);
}
},
methods: {
blank(url) {
window.open(url);
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.iphone {
border-radius: 4px;
position: relative;
margin-left: 117px;
display: inline-block;
font-size: 0;
line-height: 0;
background-image: url('../assets/iphone2.png');
background-repeat: no-repeat;
width: 240px;
min-height: 495px;
background-size: 240px auto;
color: #303133;
.infoList {
padding: 0 10px;
margin-top: 80px;
border-radius: 6px;
max-height: 360px;
overflow: auto;
.infoListBox {
.infoAvatar {
display: inline-block;
vertical-align: top;
margin-right: 10px;
img {
vertical-align: top;
width: 26px;
height: 26px;
}
}
.imgInfo,
.videoInfo {
display: inline-block;
overflow: hidden;
border-radius: 4px;
position: relative;
cursor: default;
img {
min-height: 27px;
max-width: 140px;
}
}
.videoInfo {
video {
min-height: 27px;
max-width: 140px;
max-height: 250px;
cursor: pointer;
}
}
.textInfo,
.docInfo,
.urlInfo,
.appletsInfo {
min-height: 28px;
background-color: #fff;
border: 1px solid #e4e6e9;
max-width: 166px;
display: inline-block;
text-align: left;
padding: 5px 6px;
border-radius: 4px;
min-width: 24px;
box-sizing: border-box;
position: relative;
&::before {
top: 10px;
display: block;
content: ' ';
width: 0;
line-height: 0;
font-size: 0;
border-style: solid;
border-color: transparent;
position: absolute;
left: -6px;
border-width: 4px 6px;
border-left: 0;
border-right-color: #fff;
}
.content {
font-size: 12px;
word-break: break-all;
letter-spacing: 0;
line-height: 18px;
height: auto;
}
}
.docInfo {
display: inline-flex;
align-items: center;
cursor: pointer;
}
.docTitle {
padding-right: 10px;
max-width: 100px;
float: left;
overflow-wrap: break-word;
b {
font-size: 12px;
text-align: left;
line-height: 16px;
}
p {
margin-top: 5px;
font-size: 12px;
color: #787878;
text-align: left;
line-height: 14px;
}
}
.urlTitle,
.appletsTitle {
font-size: 14px;
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
margin-bottom: 3px;
}
.urlInfo {
.urlContent {
overflow-wrap: break-word;
b {
color: #606266;
padding-right: 10px;
font-size: 12px;
text-align: left;
line-height: 17px;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
max-width: 100px;
float: left;
}
}
}
.appletsInfo {
.appletsTitle {
color: #606266;
}
img {
width: 144px;
height: 144px;
}
}
}
.infoListBox + .infoListBox {
margin-top: 15px;
}
}
}
</style>
......@@ -19,7 +19,7 @@
</el-form-item>
<el-form-item label="文件" prop="link">
<el-upload class="upload-demo" :action="uploadUrl()" :before-upload="beforeFileUpload" :on-success="handleFileSuccess" :on-change="handleFileChange" :on-remove="handleRemove" :limit="1" :on-exceed="handleExceed" :file-list="fileDatas">
<el-button type="primary"><i class="el-icon-upload el-icon--right" style="font-size: 16px;padding-right:5px;"></i>上传</el-button>
<el-button type="primary"><i class="iconfont-hb3 iconPlusOutlined avatar-uploader-icon el-icon--right" style="font-size: 16px;padding-right:5px;"></i>上传</el-button>
<div slot="tip" class="font-12 color-909399">普通文件,不大于20MB。支持word及excel,pdf,ppt,zip,rar格式</div>
</el-upload>
</el-form-item>
......@@ -254,4 +254,7 @@ export default {
}
}
}
.avatar-uploader-icon{
color: #303133;
}
</style>
......@@ -19,22 +19,22 @@
<img v-if="imgSrc" :src="imgSrc" class="avatar" @mouseover="showImage(imgSrc)" />
<video v-if="videoSrc != '' && videoFlag == false" :src="videoSrc" class="avatar">您的浏览器不支持视频播放</video>
<div v-if="!imgSrc && !videoSrc">
<i class="el-icon-plus avatar-uploader-icon"></i>
<p class="font-12 color-606266">{{ uploadType == 1 || uploadType == 2 || uploadType == 4 ? '上传图片' : '上传视频' }}</p>
<i class="iconfont-hb3 iconPlusOutlined avatar-uploader-icon"></i>
<p class="font-12 color-606266" style="line-height:6px;">{{ uploadType == 1 || uploadType == 2 || uploadType == 4 ? '上传图片' : '上传视频' }}</p>
</div>
<!-- <el-progress v-if="videoFlag == true" type="circle" :percentage="videoUploadPercent" style="margin-top:30px;"></el-progress> -->
</el-upload>
<p v-if="uploadType == 1" class="upload-tip color-909399 font-12">
<p v-if="uploadType == 1 && showTips" class="upload-tip color-909399 font-12">
图片支持png、jpg、jpeg格式,大小不超过2M,可上传1张
</p>
<p v-if="uploadType == 2" class="upload-tip color-909399 font-12">
<p v-if="uploadType == 2 && showTips" class="upload-tip color-909399 font-12">
建议尺寸:160×160;支持jpg、jpeg、png格式,图片大小不超过1MB
</p>
<p v-if="uploadType == 3" class="upload-tip color-909399 font-12">
<p v-if="uploadType == 3 && showTips" class="upload-tip color-909399 font-12">
视频支持MP4格式,大小不超过10M,上传企业微信后3天内有效
</p>
<p v-if="uploadType == 4" class="upload-tip color-909399 font-12">
<p v-if="uploadType == 4 && showTips" class="upload-tip color-909399 font-12">
建议尺寸:520×416,支持png、jpg、jpeg格式,大小不超过1M
</p>
<!-- 图片预览 -->
......@@ -64,6 +64,14 @@ export default {
type: String,
default: ''
},
imgType: {
type: Array,
default: () => ['image/jpeg', 'image/jpg', 'image/png']
},
showTips: {
type: Boolean,
default: true
},
uploadLimit: {
type: [Number, String],
default: 2
......@@ -98,14 +106,8 @@ export default {
*/
uploadUrl() {
const that = this;
let host = window.location.origin;
let baseUrl;
if (host.indexOf('localhost') != '-1') {
baseUrl = 'https://www.gicdev.com';
} else {
baseUrl = host;
}
that.upUrl = baseUrl + `/haoban-manage3-web/upload-file?fileType=${that.fileType}`;
that.upUrl = `/haoban-manage3-web/upload-file?fileType=${that.fileType}`;
return that.upUrl;
},
......@@ -128,13 +130,14 @@ export default {
/* eslint-disable */
beforeAvatarUpload(file) {
const that = this;
// console.log(file);
that.fileType = file.type === 'image/jpeg' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
const isJPG = file.type === 'image/jpeg' || file.type === 'image/jpg' || file.type === 'image/png';
// console.log(file);
that.fileType = file.type === 'image/jpeg'|| file.type === 'image/gif' ? 'jpeg' : file.type === 'image/jpg' ? 'jpg' : file.type === 'image/png' ? 'png' : file.type == 'video/mp4' ? 'mp4' : '';
const isJPG = this.imgType.includes(file.type);
const isMP4 = file.type == 'video/mp4';
const isLt2M = file.size / 1024 / 1024 < that.uploadLimit;
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isJPG) {
that.$message.error('上传图片支持png、jpg、jpeg格式!');
that.$message.error(`上传图片支持${ this.imgType.map(item=>item.split('/')[1]).join('、')}格式!`);
}
if ((that.uploadType == 1 || that.uploadType == 2 || that.uploadType == 4) && !isLt2M) {
that.$message.error(`上传图片大小不能超过 ${that.uploadLimit}MB!`);
......@@ -210,10 +213,10 @@ export default {
width: 100px;
height: 100px;
border: 1px dashed #c4c6cf;
border-radius: 0px;
cursor: pointer;
position: relative;
overflow: hidden;
border-radius: 2px;
}
}
......@@ -263,12 +266,8 @@ export default {
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 100px;
// height: 100px;
// line-height: 100px;
text-align: center;
font-size: 24px;
color:#303133;
}
.avatar {
max-width: 100px;
......
<template>
<div class="target-group">
<div class="target" :style="{ width: `${100 / dataList.length}%` }" v-for="(el, index) in dataList" :key="index">
<div class="target-label">
{{ el.label }}
<el-tooltip v-if="el.tips" placement="top" popper-class="target-tooltip">
<div slot="content" v-html="el.tips" style="max-width: 450px"></div>
<i class="iconfont icon-QuestionCircleOutlined target-label-icon"></i>
</el-tooltip>
</div>
<div class="target-value">
{{ el.value }}<span v-if="el.unit" class="target-value-unit">{{ el.unit }}</span>
</div>
</div>
</div>
</template>
<script>
export default {
name: 'TargetGroup',
props: {
dataList: {
type: Array,
default: () => []
}
}
};
</script>
<style lang="scss" scoped>
.target-group {
display: flex;
justify-content: flex-start;
align-items: flex-start;
margin-top: 16px;
padding: 20px;
width: 100%;
min-width: 265px;
background: #f7f8fa;
border-radius: 4px;
box-sizing: border-box;
.target {
flex-shrink: 0;
.target-label {
font-size: 14px;
font-weight: 400;
color: #606266;
line-height: 20px;
.target-label-icon {
font-size: inherit;
}
}
.target-value {
display: flex;
justify-content: flex-start;
align-items: flex-end;
margin-top: 8px;
font-size: 24px;
font-family: DIN Alternate-Bold, DIN Alternate;
font-weight: bold;
color: #303133;
line-height: 28px;
.target-value-unit {
font-size: 14px;
line-height: 25px;
font-weight: 600;
}
}
}
}
</style>
/**
* v-clipboard 剪切板
*/
import Vue from 'vue';
const clipboard = {
bind(el, binding, vnode, oldVnode) {
el.val = binding.value;
el.handler = function() {
const val = el.val;
const input = document.createElement('input');
el.appendChild(input);
input.value = val;
input.select();
document.execCommand('Copy');
Vue.prototype.$message({ type: 'success', message: '复制成功' });
input.parentNode.removeChild(input);
};
el.addEventListener('click', el.handler);
},
update(el, binding, vnode, oldVnode) {
el.val = binding.value;
},
unbind: function(el) {
el.removeEventListener('click', el.handler);
}
};
export default { clipboard };
......@@ -12,7 +12,10 @@ promise.polyfill();
import App from './App';
import router from './router';
import store from './store/store';
import directives from '@/components/utils/directives';
/* eslint-disable */
import './assets/font/iconfont.css'
import './assets/gic后台font/iconfont.css'
import '../static/css/index.less';
import '../theme/index.css';
......@@ -34,6 +37,7 @@ import buttonCode from '../menu-data/button-code.json';
import HbFormBottom from '@/components/layout/hb-form-bottom.vue';
// Vue.use(contentmenu);
Object.keys(directives).map(item => Vue.directive(item, directives[item]));
Vue.use(VueAMap);
VueAMap.initAMapApiLoader({
key: 'd53a58848be368a7398dc56d5670fe9c',
......@@ -95,7 +99,7 @@ router.beforeEach((to, from, next) => {
}
next();
});
// 将按钮code挂到vue的原型上,供页面中埋点使用
Vue.prototype.$buttonCode = buttonCode;
......
import _import from '../_import.js';
const attractFlowLinkRouter = [
{
path: '/attractFlowLink',
name: '引流链接',
component: _import('salesleads/actCodeManage/attractFlowLink', 'index')
},
{
path: '/attractFlowLinkAdd',
name: '新增引流链接',
meta: {
type: 'add'
},
component: _import('salesleads/actCodeManage/attractFlowLink', 'detail')
},
{
path: '/attractFlowLinkEdit/:id',
name: '编辑引流链接',
meta: {
type: 'edit'
},
component: _import('salesleads/actCodeManage/attractFlowLink', 'detail')
},
{
path: '/attractFlowLinkInfo/:id',
name: '详情引流链接',
meta: {
type: 'info'
},
component: _import('salesleads/actCodeManage/attractFlowLink', 'info')
},
{
path: '/ladingPageList',
name: '落地页列表',
component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'list')
},
{
path: '/ladingPageAdd',
name: '新建落地页',
meta: {
type: 'add'
},
component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'detail')
},
{
path: '/ladingPageEdit/:id',
name: '编辑落地页',
meta: {
type: 'edit'
},
component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'detail')
}
];
export default attractFlowLinkRouter;
import staffActCodeRouter from './staffActCodeRouter';
import attractFlowLinkRouter from './attractFlowLinkRouter';
const actCodeMangeRouter = [...staffActCodeRouter, ...attractFlowLinkRouter];
export default actCodeMangeRouter;
import _import from '../_import.js';
const staffActCodeRouter = [
{
path: '/staffActCode',
name: '员工活码',
component: _import('salesleads/actCodeManage/staffActCode', 'index')
},
{
path: '/actCodeRecord',
name: '查看记录',
component: _import('salesleads/actCodeManage/staffActCode', 'actCodeRecord')
},
{
path: '/actCodeDetail',
name: '活码详情',
component: _import('salesleads/actCodeManage/staffActCode', 'actCodeDetail')
},
{
path: '/actCodeAdd',
name: '新增活码',
component: _import('salesleads/actCodeManage/staffActCode/views', 'setActCode'),
meta: {
keepAlive: true,
fromPath: ['/salutatorySet']
}
},
{
path: '/actCodeEdit',
name: '编辑活码',
component: _import('salesleads/actCodeManage/staffActCode/views', 'setActCode'),
meta: {
keepAlive: true,
fromPath: ['/salutatorySet']
}
},
{
path: '/actCodeBatch',
name: '批量创建活码',
component: _import('salesleads/actCodeManage/staffActCode/views', 'batchAddCode'),
meta: {
keepAlive: true,
fromPath: ['/salutatorySet']
}
}
];
export default staffActCodeRouter;
......@@ -9,6 +9,7 @@
import Vue from 'vue';
import Router from 'vue-router';
import _import from './_import.js';
import actCodeManageRouter from './actCodeManageRouter';
Vue.use(Router);
const errorPage = r => {
......@@ -99,7 +100,7 @@ export const constantRouterMap = [
{
path: '/salutatory',
name: '欢迎语',
component: _import('enterprise', 'salutatory')
component: _import('enterprise', 'salutatoryIndex')
},
{
path: '/salutatorySet',
......@@ -435,6 +436,8 @@ export const constantRouterMap = [
name: '订单评价',
component: _import('apps/order-evaluate', 'evaluate-set')
},
// 活码相关路由
...actCodeManageRouter,
{
path: '/403',
......
......@@ -3,32 +3,32 @@
*/
export function isvalidUsername(str) {
const valid_map = ['admin', 'editor']
return valid_map.indexOf(str.trim()) >= 0
const valid_map = ['admin', 'editor'];
return valid_map.indexOf(str.trim()) >= 0;
}
/* 合法uri*/
export function validateURL(textval) {
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/
return urlregex.test(textval)
const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/;
return urlregex.test(textval);
}
/* 小写字母*/
export function validateLowerCase(str) {
const reg = /^[a-z]+$/
return reg.test(str)
const reg = /^[a-z]+$/;
return reg.test(str);
}
/* 大写字母*/
export function validateUpperCase(str) {
const reg = /^[A-Z]+$/
return reg.test(str)
const reg = /^[A-Z]+$/;
return reg.test(str);
}
/* 大小写字母*/
export function validateAlphabets(str) {
const reg = /^[A-Za-z]+$/
return reg.test(str)
const reg = /^[A-Za-z]+$/;
return reg.test(str);
}
/**
......@@ -37,7 +37,23 @@ export function validateAlphabets(str) {
* @returns {boolean}
*/
export function validateEmail(email) {
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
return re.test(email)
const re = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
return re.test(email);
}
/** 表单校验滚动到第一个错误项
* @param {Object} that vue实例
* this.scrollToError(this);
*/
export const scrollToError = that => {
that.$nextTick(_ => {
const isError = document.getElementsByClassName('is-error');
isError[0].scrollIntoView({
// 滚动到指定节点
// 值有start,center,end,nearest,当前显示在视图区域中间
block: 'center',
// 值有auto、instant,smooth,缓动动画(当前是慢速的)
behavior: 'smooth'
});
});
};
<template>
<el-dialog title="关联详情" width="610px" :visible.sync="dialogVisible" @close="$emit('update:dialogVisible', false)">
<div class="daily-set-content boder-box">
<div class="flex flex-space-between m-b-16">
<el-input placeholder="请输入关联ID / 关联名称 " class="w-260" v-model="form.searchContent" @keyup.native="value => toInput(value, searchInput)" clearable @clear="getList"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div>
</div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" height="450" tooltip-effect="dark">
<el-table-column prop="referCode" label="关联ID"></el-table-column>
<el-table-column prop="referName" label="关联名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="type" label="类型">
<template slot-scope="{ row }">
{{ row.type == 1 ? '员工活码' : '引流链接' }}
</template>
</el-table-column>
<el-table-column prop="status" label="状态">
<template slot-scope="{ row }">
<div class="status-class">
<span :class="['state-point', logStatusClass[row.status]]">{{ relationSatusMap[row.status] }}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="" label="操作" width="80">
<template slot-scope="{ row }">
<el-button type="text" @click="$emit('goLinkDetail', row)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination class="text-right margin-pg" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size.sync="form.pageSize" :current-page.sync="form.pageNum" layout="prev, pager, next" :total="total"> </el-pagination>
</el-dialog>
</template>
<script>
import { welcomeRelationList } from '@/api/actCode';
import { _debounce } from '@/common/js/public';
export default {
data() {
return {
form: {
searchContent: '',
welcomeId: '',
pageNum: 1,
pageSize: 20
},
loading: false,
total: 0,
tableData: [],
relationSatusMap: {
1: '启用',
0: '删除',
2: '废弃'
},
logStatusClass: { 1: 'state-point-success', 0: 'state-point-error', 2: 'state-point-warning' }
};
},
props: {
id: {
type: String,
default: ''
},
dialogVisible: {
type: Boolean,
default: false
}
},
watch: {
id(val) {
if (val) {
this.form = { searchContent: '', welcomeId: val, pageNum: 1, pageSize: 20 };
this.getList();
}
}
},
methods: {
toInput: _debounce(function(e, value) {
this.getList();
}, 500),
getList() {
this.loading = true;
welcomeRelationList(this.form)
.then(res => {
const { totalCount, result } = res.data.result;
if (result) {
this.total = totalCount;
this.tableData = result;
}
// let obj = { referCode: 'HM01421002535046766593', referId: '421002535046766593', referName: '吴苏兰', relationId: '421002538737754114', status: 1, type: 2, typeText: null };
// for (let i = 0; i < 50; i++) {
// this.tableData.push(obj);
// }
// this.total = 50;
})
.finally(_ => {
this.loading = false;
});
},
handleSizeChange(val) {
this.form.pageNum = 1;
this.form.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.form.pageNum = val;
this.getList();
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.margin-pg {
margin: 20px 0 0 0;
}
</style>
<template>
<div class="salutatory">
<el-tabs v-model="activeName">
<el-tab-pane label="普通欢迎语" :name="1">
<salutatory :type="activeName" v-if="activeName == 1" />
</el-tab-pane>
<el-tab-pane label="特殊欢迎语" :name="2">
<salutatory :type="activeName" v-if="activeName == 2" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import salutatory from './salutatory.vue';
export default {
components: {
salutatory
},
data() {
return {
activeName: 1
};
},
mounted() {
if (sessionStorage.getItem('activeName')) {
this.activeName = Number(sessionStorage.getItem('activeName'));
}
},
watch: {
activeName(val) {
sessionStorage.setItem('activeName', val);
}
}
};
</script>
<style type="text/scss" lang="scss" scoped></style>
......@@ -2,7 +2,7 @@
<div class="daily-set-wrap">
<div class="daily-set-content border-box">
<div class="salutatory-set-wrap m-t-20">
<el-form label-width="117px" ref="form" :model="form" :rules="rules" refs="form" class="form">
<el-form label-width="117px" ref="form" :model="form" :rules="rules" class="form">
<el-form-item label="欢迎语标题" prop="title">
<el-input show-word-limit placeholder="请输入欢迎语标题" type="text" v-model="form.title" maxlength="20" class="w-384"></el-input>
</el-form-item>
......@@ -54,7 +54,7 @@
<p style="font-size:12px;color:#909399">(附件不超过9个,单个大小不超过2M)</p>
</div>
</el-form-item>
<el-form-item label="使用范围" required>
<el-form-item label="使用范围" required v-if="form.type == 1">
<el-radio v-model="form.defaultWelcomeFlag" :disabled="defaultWelcomeFlag && echoDefaultWelcomeFlag == 0" :label="1">全体成员</el-radio>
<el-radio v-model="form.defaultWelcomeFlag" :label="0">部分成员</el-radio>
<span @click="openScopeDialog" v-if="form.defaultWelcomeFlag == 0" class="color-2f54eb cursor-pointer" style="margin-left:8px;"> {{ form.suitDepartmentAddList.length ? '修改使用范围' : '请选择使用范围' }}</span>
......@@ -77,50 +77,7 @@
<el-button type="primary" style="margin-left:117px;margin-bottom:20px" :loading="submitbtnLoading" @click="submit">保存</el-button>
<el-button style="margin-bottom:20px" @click="$router.go(-1)">返回</el-button>
</el-form>
<div class="iphone">
<div class="infoList">
<div class="infoListBox" v-if="form.welcomeContent || form.title">
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div class="textInfo">
<div class="content" v-html="form.welcomeContent"></div>
</div>
</div>
<div class="infoListBox" v-for="(item, index) in form.welcomeMediaList" :key="index">
<div>
<div class="infoAvatar">
<img src="@/assets/head_default.jpg" />
</div>
<div v-if="item.mediaType == 1 || item.mediaType == 7" class="imgInfo">
<img :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 2" class="videoInfo" @click="blank(item.mediaUrl)">
<video :src="item.mediaUrl" />
</div>
<div v-if="item.mediaType == 3" class="docInfo">
<div class="docTitle">
<b>{{ item.mediaTitle }}</b>
<p>{{ item.mediaSize }} KB</p>
</div>
<svg-icon iconname="iconwenjianleixing-wenjian" size="40"> </svg-icon>
</div>
<div v-if="item.mediaType == 4" class="urlInfo">
<div class="urlTitle">{{ item.mediaTitle }}</div>
<div class="urlContent">
<b>{{ item.mediaTitle }}</b>
<svg-icon iconname="iconwenjianleixing-lianjie" size="40"> </svg-icon>
</div>
</div>
<div v-if="item.mediaType == 5 || item.mediaType == 6" class="appletsInfo">
<div class="appletsTitle">{{ item.miniProgramName }}</div>
<div class="appletsTitle" style="font-size:12px">{{ item.mediaTitle }}</div>
<img :src="item.mediaUrl" />
</div>
</div>
</div>
</div>
</div>
<preview :welcomeContent="form.welcomeContent" :mediaList="form.welcomeMediaList" />
</div>
<el-dialog title="添加公众号" width="585px" class="replay-link-dialog" :visible.sync="addReplayDialog" @closed="onClosed">
<el-form label-position="right" ref="form" :model="{}" label-width="100px" @submit.native.prevent>
......@@ -216,6 +173,8 @@ import limitTextarea from '@/components/limit-textarea.vue';
import { emojiArr } from '@/utils/emoji';
import multUpload from '@/components/mult-upload-img.vue';
import singleUpload from '@/components/single-upload.vue';
import iphone2 from '@/assets/iphone2.png';
import preview from '@/components/preview-welcome.vue';
export default {
props: {},
data() {
......@@ -230,6 +189,7 @@ export default {
},
form: {
title: '',
type: 1, // 1普通类型;2特殊类型
welcomeContent: '你好,<微信昵称>',
welcomeMediaList: [],
suitDepartmentAddList: [],
......@@ -298,7 +258,8 @@ export default {
appletDialogVisible: false,
defaultWelcomeFlag: false,
isNew: true,
echoDefaultWelcomeFlag: 0
echoDefaultWelcomeFlag: 0,
iphone2
};
},
watch: {
......@@ -321,18 +282,20 @@ export default {
const userInfos = JSON.parse(sessionStorage.getItem('userInfos'));
this.wxEnterpriseId = userInfos.wxEnterpriseId;
this.enterpriseId = userInfos.enterpriseId;
const { id } = this.$route.query;
const { id, type } = this.$route.query;
if (id) {
this.getData();
this.isNew = false;
}
this.form.type = type;
this.getExistDefaultWelcome();
this.getAppleList();
},
components: {
limitTextarea,
singleUpload,
multUpload
multUpload,
preview
},
methods: {
getExistDefaultWelcome(isNew) {
......@@ -540,9 +503,6 @@ export default {
this.$refs.tree.setCheckedKeys(this.form.suitDepartmentAddList.map(item => item.departmentId));
});
},
blank(url) {
window.open(url);
},
handleUploadList(item, index) {
if (['图片', '视频', '文件'].includes(item.title)) {
document.getElementsByClassName('upload-input')[index].click();
......@@ -672,8 +632,8 @@ export default {
.then(res => {
let resData = res.data;
if (resData.code == 0 && resData.result) {
const { suitDepartmentList, title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag } = resData.result;
this.form = { suitDepartmentList: suitDepartmentList || [], suitDepartmentAddList: JSON.parse(JSON.stringify(suitDepartmentList)) || [], title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag };
const { suitDepartmentList, title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag, type } = resData.result;
this.form = { type, suitDepartmentList: suitDepartmentList || [], suitDepartmentAddList: JSON.parse(JSON.stringify(suitDepartmentList)) || [], title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag };
this.form = Object.assign({}, this.form);
this.echoDefaultWelcomeFlag = defaultWelcomeFlag;
}
......@@ -686,14 +646,14 @@ export default {
});
},
submit() {
if (!this.form.defaultWelcomeFlag && !this.form.suitDepartmentAddList.length) {
if (this.form.type == 1 && !this.form.defaultWelcomeFlag && !this.form.suitDepartmentAddList.length) {
this.$message.error('请选择使用范围');
return;
}
this.$refs.form.validate(value => {
if (value) {
const { suitDepartmentAddList, suitDepartmentList, title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag } = this.form;
const para = { title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId: wxEnterpriseId || this.wxEnterpriseId, defaultWelcomeFlag };
const { suitDepartmentAddList, suitDepartmentList, title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId, defaultWelcomeFlag, type } = this.form;
const para = { title, welcomeId, welcomeContent, welcomeMediaList, wxEnterpriseId: wxEnterpriseId || this.wxEnterpriseId, defaultWelcomeFlag, type };
const addArr = [];
const delArr = [];
suitDepartmentAddList.forEach(ele => {
......@@ -724,7 +684,8 @@ export default {
type: 'success',
message: '保存成功!'
});
this.$router.push('/salutatory');
// this.$router.push('/salutatory');
this.$router.go(-1);
}
})
.catch(function(error) {
......
<template>
<div class="p-20">
<dm-sub-title class="m-b-10">
<div class="title">
<span>引流加入</span>
<el-button type="text"><i class="iconfont-hb3 iconzhibiaoshuoming info-icon"></i>指标说明</el-button>
</div>
</dm-sub-title>
<!-- <el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="引流加人" name="first"> -->
<div class="flex flex-space-between m-b-16">
<div class="flex flex-align-center">
<el-input placeholder="请输入模板ID/名称、创建人" class="w-260" v-model="form.searchParams" @keyup.native="value => toInput(value, searchInput)" clearable @clear="getList"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
<el-select class="m-l-10 w-160" v-model="form.linkType" placeholder="全部类型" @change="getList" clearable @clear="clear">
<el-option v-for="item in options" :key="item.key" :label="item.label" :value="item.key"> </el-option>
</el-select>
<el-date-picker class="m-l-10 w-256" v-model="form.dateRange" @change="getList" type="daterange" :value-format="'yyyy-MM-dd'" clearable @clear="getList" range-separator="~" start-placeholder="创建开始日期" end-placeholder="创建结束日期"> </el-date-picker>
</div>
<div>
<el-button @click="goLanding">落地页模板</el-button>
<el-button type="primary" @click="$router.push('attractFlowLinkAdd')">新增链接</el-button>
</div>
</div>
<el-table :data="tableData" style="width:100%" v-loading="loading" @sort-change="handleSortChange">
<el-table-column width="120" prop="linkId" label="链接ID" />
<el-table-column minWidth="180" prop="memberId" label="链接信息">
<template slot-scope="{ row }">
<p class="overFlow">{{ row.name }}</p>
<p class="tips">{{ row.linkCode }}</p>
</template>
</el-table-column>
<el-table-column width="110" prop="linkType" label="链接类型">
<template slot-scope="{ row }">
<el-tag size="mini" v-if="row.linkType == 1"> 专用链接 </el-tag>
<el-tag v-else size="mini" class="el-tag--cyan">通用链接</el-tag>
</template>
</el-table-column>
<el-table-column v-for="v in tableHeader" :show-overflow-tooltip="v.tooltip" :width="v.width" :min-width="v.minWidth" :align="v.align" :key="v.prop" :prop="v.prop" :label="v.label" :formatter="v.formatter" :sortable="v.sortable" :fixed="v.fixed">
<template slot-scope="scope">
<span v-if="v.formatter" v-html="v.formatter(scope.row)"></span>
<span v-else>{{ scope.row[v.prop] }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="160" fixed="right">
<template slot-scope="{ row }">
<dm-dropdown ref="drop" :scope-data="row" :configs="btnArr" />
</template>
</el-table-column>
</el-table>
<div class="text-right" v-if="tableData.length != 0">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size.sync="form.pageSize" :current-page.sync="form.pageNum" layout="total, sizes, prev, pager, next, jumper" :page-sizes="[20, 40, 60, 80]" :total="total"> </el-pagination>
</div>
<links :src="linkUrl" :show.sync="show" :imageName="imageName" />
<!-- </el-tab-pane>
<el-tab-pane label="引流入群" name="second">引流入群</el-tab-pane>
</el-tabs> -->
</div>
</template>
<script>
import { _debounce } from '@/common/js/public';
import { linkPage } from '@/api/actCode';
import filters from '@/filters/index';
import links from '@/components/common/links';
const tableHead = [
{
label: '添加好友人数',
prop: 'addNumT',
width: '130',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.addNumT ? row.addNumT : '- -'}</span>`;
}
},
{
label: '今日新增人数',
prop: 'addNum',
width: '130',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.addNum ? row.addNum : '- -'}</span>`;
}
},
{
label: '点击总人次',
prop: 'clickTimesT',
width: '120',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.clickTimesT ? row.clickTimesT : '- -'}</span>`;
}
},
{
label: '今日点击人次',
prop: 'clickNum',
width: '130',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.clickNum ? row.clickNum : '- -'}</span>`;
}
},
{
label: '点击总人数',
prop: 'clickNumT',
width: '120',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.clickNumT ? row.clickNumT : '- -'}</span>`;
}
},
{
label: '今日点击人数',
prop: 'clickNum',
width: '130',
sortable: 'custom',
formatter: function(row) {
return `<span>${row.clickNum ? row.clickNum : '- -'}</span>`;
}
},
{
label: '创建人',
minWidth: '100',
tooltip: true,
prop: 'creatorName',
formatter: function(row) {
return `<span>${row.creatorName ? row.creatorName : '- -'}</span>`;
}
},
{
label: '创建时间',
width: '120',
tooltip: true,
prop: 'createTime',
formatter: function(row) {
let ymd = filters.timeStampToYmd(row.createTime);
let sfm = filters.timeStampToHms(row.createTime);
return `${ymd}<br /> ${sfm}`;
}
}
];
export default {
data() {
return {
activeName: 'first',
loading: false,
form: {
pageSize: 20,
pageNum: 1,
linkType: '',
searchParams: '',
dateRange: []
},
options: [
{
label: '专用链接',
key: 1
},
{
label: '通用链接',
key: 2
}
],
btnArr: [
{
text: '数据',
handler: row => this.goDetail(row, 'second')
},
{
text: '详情',
handler: row => this.goDetail(row, 'first')
},
{
text: '链接',
visible: row => {
return row.linkType == 2;
},
handler: row => this.goLink(row)
},
{
text: '编辑',
handler: row => this.goEdit(row)
}
],
total: '',
tableData: [],
tableHeader: tableHead,
show: false,
linkUrl: ''
};
},
mounted() {
this.getList();
},
components: {
links
},
methods: {
clear() {
console.log('clear');
},
toInput: _debounce(function(e, value) {
this.getList();
}, 500),
getList() {
const param = { ...this.form };
if (this.form.dateRange && this.form.dateRange.length) {
param.startDate = this.form.dateRange[0] + ' 00:00:00';
param.endDate = this.form.dateRange[1] + ' 23:59:59';
}
delete param.dateRange;
console.log(param);
this.loading = true;
linkPage(param)
.then(res => {
console.log(res);
if (res.data.result) {
const { totalCount, result } = res.data.result;
this.tableData = result;
this.total = totalCount;
}
})
.finally(_ => {
this.loading = false;
});
},
handleSizeChange(val) {
this.form.pageNum = 1;
this.form.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.form.pageNum = val;
this.getList();
},
handleSortChange(data) {
const { prop, order } = data;
console.log(order);
if (order == 'descending') {
this.form.sortColumn = prop;
this.form.sortType = 'desc';
} else if (order === 'ascending') {
this.form.sortColumn = prop;
this.form.sortType = 'asc';
} else {
this.form.sortColumn = '';
this.form.sortType = undefined;
}
this.form.pageNum = 1;
this.getList();
},
goLanding() {
this.$router.push('/ladingPageList');
},
goDetail(row, type) {
this.$router.push(`attractFlowLinkInfo/${row.linkId}?type=${type}`);
},
goLink(row) {
this.linkUrl = row.linkUrl;
this.imageName = `${row.linkId}_${row.name}`;
this.show = true;
console.log(row);
},
goEdit(row) {
console.log(row);
this.$router.push(`attractFlowLinkEdit/${row.linkId}`);
}
}
};
</script>
<style lang="scss" scoped>
.title {
width: 100%;
display: flex;
justify-content: space-between;
.info-icon {
margin-right: 8px;
}
}
.overFlow {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<template>
<div class="card">
<div class="head">
<div class="operation">
<div class="idNum">ID:{{ card.pageCode }}</div>
<div class="btns">
<el-button type="text" @click="$emit('relationDetail')">关联详情</el-button>
<el-button type="text" @click="$emit('deleteTemp')">删除</el-button>
<el-button type="text" @click="$emit('editTemp')">编辑</el-button>
</div>
</div>
<div class="tempName">{{ card.pageName }}</div>
<div class="cardName">
<div class="createName">{{ card.createorName }}</div>
<div class="createTime">{{ card.createTime | formatTimeStamp }}</div>
</div>
</div>
<div class="iphone-content">
<div class="iphone">
<span class="pageTitle">{{ card.pageTitle }}</span>
<img src="@/assets/iphone-head.png" />
<div class="content">
<img :src="card.pageBackgroudImg" v-show="card.pageBackgroudImg" class="bgImg" />
<div class="enterpriseInfo">
<div class="logo">
<img :src="card.merchantLogo" />
</div>
<div class="name">{{ card.merchantName }}</div>
</div>
<div class="QRcode"></div>
<div class="leadingText">{{ card.guideComment }}</div>
<div class="enterpriseNum">
<i class="iconfont-hb3 iconhuawushuju"></i>
<p>{{ card.merchantPhoneNumber }}</p>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
card: {
pageName: '',
pageCode: '',
pageId: '',
pageTitle: '',
merchantName: '',
merchantPhoneNumber: '',
merchantLogo: '',
pageBackgroudImg: '',
guideComment: ''
}
};
},
props: {
content: {
type: Object,
default: () => {}
}
},
watch: {
content: {
handler(val) {
if (val) {
const { pageName, pageCode, pageId, pageTitle, merchantName, merchantPhoneNumber, merchantLogo, pageBackgroudImg, guideComment, createorName, createTime } = val;
this.card = { pageName, pageCode, pageId, pageTitle, merchantName, merchantPhoneNumber, merchantLogo, pageBackgroudImg, guideComment, createorName, createTime };
}
},
immediate: true
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.card {
width: 384px;
height: 687px;
border-radius: 8px;
border: 1px solid #dcdfe6;
background: #e5e7ed;
.head {
width: 384px;
height: 87px;
border-radius: 8px 8px 0px 0px;
box-sizing: border-box;
padding: 15px 16px 8px 16px;
}
.operation {
display: flex;
justify-content: space-between;
margin-bottom: 7px;
.idNum {
font-size: 12px;
color: #606266;
line-height: 17px;
}
}
.tempName {
font-size: 14px;
font-weight: 500;
color: #303133;
line-height: 20px;
}
.cardName {
display: flex;
justify-content: space-between;
.createName,
.createTime {
font-size: 12px;
color: #606266;
line-height: 17px;
}
}
.iphone-content {
width: 384px;
height: 600px;
display: flex;
justify-content: center;
background: #ffffff;
border-radius: 0px 0px 8px 8px;
}
.iphone {
width: 320px;
height: 570px;
background: #f7f8fa;
box-shadow: 0px 4px 8px 0px rgba(220, 223, 230, 0.6);
border-radius: 8px;
position: relative;
margin-top: 11px;
.pageTitle {
position: absolute;
font-size: 14px;
color: #000000;
font-weight: 500;
width: 135px;
margin-left: 85px;
line-height: 20px;
white-space: nowrap;
text-align: center;
top: 44px;
}
.content {
width: 320px;
height: 475px;
background: #ffffff;
border-radius: 8px;
top: 95px;
left: 0;
box-sizing: border-box;
padding: 20px 16px;
position: absolute;
display: flex;
align-items: center;
flex-direction: column;
.bgImg {
position: absolute;
width: 100%;
border-radius: 8px;
top: 0;
z-index: 0;
max-height: 100%;
}
.enterpriseInfo {
display: flex;
justify-content: flex-start;
align-items: center;
width: 100%;
z-index: 100;
margin-bottom: 19px;
.logo {
width: 48px;
height: 48px;
background: #f6f6f6;
border-radius: 60px;
img {
width: 48px;
height: 48px;
border-radius: 60px;
}
}
.name {
margin-left: 10px;
font-size: 14px;
font-weight: 500;
color: #242835;
line-height: 20px;
width: 80%;
}
}
.QRcode {
z-index: 100;
width: 236px;
height: 236px;
background: #f6f6f6;
background-image: url('../../../../../assets/QRcode.png');
background-size: 236px auto;
}
.leadingText {
z-index: 100;
font-size: 12px;
color: #7f818a;
line-height: 17px;
width: 88%;
margin-top: 16px;
height: 50px;
text-align: center;
}
.enterpriseNum {
z-index: 100;
min-width: 160px;
margin-top: 25px;
height: 40px;
box-sizing: border-box;
border-radius: 40px;
border: 1px solid #9da0a6;
display: flex;
align-items: center;
padding: 9px 12px;
line-height: 14px;
color: #63666b;
font-size: 12px;
i {
font-size: 17px;
}
p {
margin-left: 5px;
}
}
}
}
}
</style>
<template>
<div>
<div class="daily-set-content">
<el-form label-width="100px" ref="form" :model="form" :rules="rules" class="form">
<el-form-item label="模板名称" prop="pageName" required>
<el-input show-word-limit placeholder="请输入模板名称" type="text" v-model="form.pageName" maxlength="20" class="w-340"></el-input>
</el-form-item>
<el-form-item label="页面标题" prop="pageTitle">
<el-input show-word-limit placeholder="请输入页面标题" type="text" v-model="form.pageTitle" maxlength="10" class="w-340"></el-input>
</el-form-item>
<el-form-item label="商户名称" prop="merchantName">
<el-input show-word-limit placeholder="请输入商户名称" type="text" v-model="form.merchantName" maxlength="20" class="w-340"></el-input>
</el-form-item>
<el-form-item label="商户电话" prop="merchantPhoneNumber">
<el-input show-word-limit placeholder="请输入商户电话" type="text" v-model="form.merchantPhoneNumber" maxlength="20" class="w-340"></el-input>
</el-form-item>
<el-form-item label="商户LOGO">
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.merchantLogo" :field="''" class="app-set" :uploadLimit="2" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<p style="margin-top: 6px;font-size: 12px;color: #909399;line-height: 17px;">图片建议尺寸 240*240px,格式 jpg/jpep/png/gif,大小 200KB 以内。</p>
</el-form-item>
<el-form-item label="页面背景">
<single-upload uploadType="1" :showTips="false" :imgSrc.sync="form.pageBackgroundImg" :field="''" class="app-set" :uploadLimit="2" :imgType="['image/jpeg', 'image/jpg', 'image/png', 'image/gif']"> </single-upload>
<p style="margin-top: 6px;font-size: 12px;color: #909399;line-height: 17px;">图片建议尺寸 750*1334px,格式 jpg/png/gif,大小 200KB 以内。</p>
</el-form-item>
<el-form-item label="引导语" prop="guideComment">
<el-input show-word-limit placeholder="请输入引导语" type="textarea" v-model="form.guideComment" maxlength="50" class="w-340" :autosize="{ minRows: 4, maxRows: 6 }"></el-input>
</el-form-item>
</el-form>
<div class="rightContent">
<p class="previewTitle">落地页预览</p>
<previewPage :data="form" class="preview" />
<p class="previewBottom">此二维码只是样式预览效果,请勿直接使用</p>
</div>
</div>
<div class="footBtn">
<el-button type="primary" @click="save">保存</el-button>
</div>
</div>
</template>
<script>
import singleUpload from '@/components/single-upload.vue';
import previewPage from '@/components/preview-page.vue';
import { guidePageDetail, guidePageEdit, guidePageSave, wxEnterpriseList } from '@/api/actCode';
export default {
components: {
previewPage,
singleUpload
},
data() {
const merchantPhoneNumberVal = (rules, value, callback) => {
const reg = /^[0-9 \+\-]{0,20}$/;
const reg1 = /^\s*$/;
const reg2 = /^\+*$/;
const reg3 = /^\-*$/;
if (reg1.test(value) || reg2.test(value) || reg3.test(value)) {
callback('请输入手机号');
}
if (!reg.test(value)) {
callback('仅支持输入数字,空格,-,+');
}
callback();
};
return {
form: {
pageName: '',
pageTitle: '',
merchantName: '',
merchantPhoneNumber: '',
merchantLogo: '',
//https://pic01-10001430.image.myqcloud.com/b91f73af-43e4-4733-a4d3-0ab0bcb4ce7f
pageBackgroundImg: '',
guideComment: '长按保存图片并识别二维码添加您的专属导购'
},
wxEnterpriseId: sessionStorage.getItem('userInfos') ? JSON.parse(sessionStorage.getItem('userInfos')).wxEnterpriseId : '',
logoImageList: [],
isEdit: this.$route.meta.type == 'edit',
isAdd: this.$route.meta.type == 'add',
loading: false,
rules: {
merchantPhoneNumber: [{ validator: merchantPhoneNumberVal }]
}
};
},
mounted() {
if (this.isEdit) {
this.getDetail();
} else {
this.getEchoEnterpriseInfo();
}
},
methods: {
getDetail() {
console.log(this.$route);
guidePageDetail({ pageId: this.$route.params.id }).then(res => {
if (res.data.result) {
const result = res.data.result;
this.form = result;
}
});
},
getEchoEnterpriseInfo() {
wxEnterpriseList({}).then(res => {
let resData = res.data;
if (!!resData.result && !!resData.result.length) {
const { conactsPhone, enterpriseLogo, enterpriseName } = resData.result.filter(item => item.wxEnterpriseId == this.wxEnterpriseId)[0];
this.form.merchantLogo = enterpriseLogo;
this.form.merchantPhoneNumber = conactsPhone;
this.form.merchantName = enterpriseName;
}
});
},
guidePageEdit() {
this.loading = true;
guidePageEdit(this.form)
.then(_ => {
this.$router.go(-1);
this.$message.success('保存成功');
})
.finally(_ => {
this.loading = false;
});
},
guidePageSave() {
this.loading = true;
guidePageSave(this.form)
.then(_ => {
this.$router.go(-1);
this.$message.success('保存成功');
})
.finally(_ => {
this.loading = false;
});
},
save() {
this.$refs.form.validate(val => {
if (!val) return;
if (this.isEdit) {
this.guidePageEdit();
} else {
this.guidePageSave();
}
});
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.daily-set-content {
padding: 20px;
}
.form {
float: left;
}
.rightContent {
margin-left: 734px;
width: 280px;
display: flex;
flex-direction: column;
align-items: center;
}
.previewTitle {
font-weight: 500;
color: #303133;
line-height: 20px;
font-size: 14px;
width: 70px;
text-align: center;
margin-bottom: 20px;
}
.footBtn {
width: 100%;
height: 56px;
background: #ffffff;
box-shadow: 1px -2px 8px 0px rgba(220, 223, 230, 0.6);
position: fixed;
bottom: 0;
display: flex;
align-items: center;
justify-content: center;
}
.previewBottom {
font-size: 12px;
text-align: center;
width: 228px;
color: #909399;
line-height: 17px;
}
</style>
<template>
<div class="daily-set-content">
<div class="flex flex-space-between m-b-16">
<div class="flex flex-align-center">
<el-input placeholder="请输入模板ID/名称、创建人" class="w-260" v-model="form.pageSearchText" @keyup.native="toInput" clearable @clear="getList"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
<span style="font-size:14px;" class="m-l-10">模板创建时间:</span>
<el-date-picker class="m-l-10 w-256" v-model="form.dateRange" @change="getList" type="daterange" :value-format="'yyyy-MM-dd'" clearable @clear="getList" range-separator="~" start-placeholder="开始日期" end-placeholder="结束日期"> </el-date-picker>
</div>
<el-button type="primary" @click="addTemp">新增模板</el-button>
</div>
<div class="tips m-b-16">
二维码只是样式预览效果,请勿直接使用
</div>
<div class="card-content" v-loading="loading">
<card-view :content="item" v-for="item in list" :key="item.pageId" @relationDetail="relationDetail(item)" @deleteTemp="deleteTemp(item)" @editTemp="editTemp(item)" />
</div>
<relation-dialog :dialogVisible.sync="dialogVisible" :pageId="pageId" @goLinkDetail="goLinkDetail" />
<div class="text-right" v-if="list.length != 0">
<el-pagination background @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size.sync="form.pageSize" :current-page.sync="form.pageNum" layout="total, sizes, prev, pager, next, jumper" :page-sizes="[20, 40, 60, 80]" :total="total"> </el-pagination>
</div>
</div>
</template>
<script>
import cardView from './cardView';
import relationDialog from './relationDialog';
import { guidePageList, guidePageDel, guidePageRelation } from '@/api/actCode';
import { _debounce } from '@/common/js/public';
export default {
data() {
return {
form: {
pageSearchText: '',
dateRange: [],
pageSize: 20,
pageNum: 1
},
loading: false,
total: 0,
pageId: '',
list: [
{
pageName: '模板名称模板名称模板名称模板名称模板',
pageCode: 'MB01123456789012300001',
pageId: '1',
pageTitle: '页面页面页面页面标题',
merchantName: '商户名称商户名称商户名称商户名称商户名称',
merchantPhoneNumber: '0571-1234567',
merchantLogo: 'https://pic01-10001430.image.myqcloud.com/d4b383df-8eb1-49d6-9c84-8e3e36958464',
pageBackgroudImg: 'https://pic01-10001430.image.myqcloud.com/b91f73af-43e4-4733-a4d3-0ab0bcb4ce7f',
guideComment: '长按保存图片并识别二长按保存图片并识别二长按保存图片并识别二长按保存图片并识别二长按保存图片并识别二',
createorName: '艾蜜雪管理员',
createTime: 1657257986000
},
{
pageName: '模板名称模板名称模板名称模板名称模板',
pageCode: 'MB01123456789012300001',
pageId: '2',
pageTitle: '页面标题2',
merchantName: '商户名称',
merchantPhoneNumber: '0571-1234567',
merchantLogo: 'https://pic01-10001430.image.myqcloud.com/d4b383df-8eb1-49d6-9c84-8e3e36958464',
pageBackgroudImg: '',
guideComment: '长按识别二维码添加您的专属导购',
createorName: '艾蜜雪管理员',
createTime: 1657257986000
},
{
pageName: '模板名称模板名称模板名称模板名称模板',
pageCode: 'MB01123456789012300001',
pageId: '3',
pageTitle: '页面标题3',
merchantName: '商户名称',
merchantPhoneNumber: '0571-1234567',
merchantLogo: 'https://pic01-10001430.image.myqcloud.com/d4b383df-8eb1-49d6-9c84-8e3e36958464',
pageBackgroudImg: 'https://pic01-10001430.image.myqcloud.com/b91f73af-43e4-4733-a4d3-0ab0bcb4ce7f',
guideComment: '长按识别二维码添加您的专属导购',
createorName: '艾蜜雪管理员',
createTime: 1657257986000
},
{
pageName: '模板名称模板名称模板名称模板名称模板',
pageCode: 'MB01123456789012300001',
pageId: '4',
pageTitle: '页面标题4',
merchantName: '商户名称',
merchantPhoneNumber: '0571-1234567',
merchantLogo: 'https://pic01-10001430.image.myqcloud.com/d4b383df-8eb1-49d6-9c84-8e3e36958464',
pageBackgroudImg: 'https://pic01-10001430.image.myqcloud.com/b91f73af-43e4-4733-a4d3-0ab0bcb4ce7f',
guideComment: '长按识别二维码添加您的专属导购',
createorName: '艾蜜雪管理员',
createTime: 1657257986000
},
{
pageName: '模板名称模板名称模板名称模板名称模板',
pageCode: 'MB01123456789012300001',
pageId: '5',
pageTitle: '页面标题5',
merchantName: '商户名称',
merchantPhoneNumber: '0571-1234567',
merchantLogo: 'https://pic01-10001430.image.myqcloud.com/d4b383df-8eb1-49d6-9c84-8e3e36958464',
pageBackgroudImg: 'https://pic01-10001430.image.myqcloud.com/b91f73af-43e4-4733-a4d3-0ab0bcb4ce7f',
guideComment: '长按识别二维码添加您的专属导购',
createorName: '艾蜜雪管理员',
createTime: 1657257986000
}
]
};
},
components: {
cardView,
relationDialog
},
mounted() {
this.getList();
},
methods: {
toInput: _debounce(function(e, value) {
this.getList();
}, 500),
getList() {
const param = { ...this.form };
if (this.form.dateRange && this.form.dateRange.length) {
param.startTime = this.form.dateRange[0] + ' 00:00:00';
param.endTime = this.form.dateRange[1] + ' 23:59:59';
}
delete param.dateRange;
this.loading = true;
guidePageList(param)
.then(res => {
const { result, totalCount } = res.data.result;
if (result) {
this.total = totalCount;
this.list = result;
}
})
.finally(_ => {
this.loading = false;
});
},
handleSizeChange(val) {
this.form.pageNum = 1;
this.form.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.form.pageNum = val;
this.getList();
},
addTemp() {
this.$router.push('/ladingPageAdd');
},
relationDetail(item) {
this.dialogVisible = true;
this.pageId = item.pageId;
},
deleteTemp(item) {
guidePageRelation({ pageId: item.pageId }).then(res => {
const { totalCount } = res.data.result;
if (totalCount) {
this.$confirm(`当前模板已关联链接(${totalCount}),请确认投放链接已投放结束,取消关联后才可删除该模板`, '无法删除该模板', {
confirmButtonText: '关联详情',
cancelButtonText: '取消',
type: 'warning'
}).then(_ => {
this.relationDetail(item);
});
} else {
this.$confirm('模板删除后将无法恢复', '确认要删除该模板吗?', {
confirmButtonText: '删除',
cancelButtonText: '取消',
type: 'warning'
}).then(_ => {
this.deleteRequest(item);
});
}
});
},
deleteRequest(item) {
guidePageDel({ pageId: item.pageId }).then(res => {
this.$message.success('删除成功');
this.getList();
});
},
editTemp(item) {
this.$router.push(`/ladingPageEdit/${item.pageId}`);
},
goLinkDetail(referId) {
console.log(referId);
this.$router.push(`/ladingPageEdit/${referId}`);
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.daily-set-content {
padding: 20px;
}
.card-content {
width: 100%;
display: flex;
flex-wrap: wrap;
gap: 20px;
}
</style>
<template>
<el-dialog title="关联详情" width="600px" :visible.sync="dialogVisible" @close="$emit('update:dialogVisible', false)">
<div class="daily-set-content boder-box">
<div class="flex flex-space-between m-b-16">
<el-input placeholder="请输入链接名称/ID" class="w-260" v-model="form.searchContent" @keyup.native="value => toInput(value, searchInput)" clearable @clear="getList"> <i slot="prefix" class="el-input__icon el-icon-search"></i> </el-input>
</div>
</div>
<el-table class="select-table" ref="multipleTable" v-loading="loading" :data="tableData" height="450" tooltip-effect="dark">
<el-table-column prop="releationId" label="链接ID" show-overflow-tooltip></el-table-column>
<el-table-column prop="referName" label="链接名称" show-overflow-tooltip></el-table-column>
<el-table-column prop="" label="操作" width="80">
<template slot-scope="{ row }">
<el-button type="text" @click="$emit('goLinkDetail', row.referId)">查看</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination class="text-right margin-pg" @size-change="handleSizeChange" @current-change="handleCurrentChange" :page-size.sync="form.pageSize" :current-page.sync="form.pageNum" layout="prev, pager, next" :total="total"> </el-pagination>
</el-dialog>
</template>
<script>
import { guidePageRelation } from '@/api/actCode';
import { _debounce } from '@/common/js/public';
export default {
data() {
return {
form: {
searchContent: '',
pageId: '',
pageNum: 1,
pageSize: 20
},
loading: false,
total: 0,
tableData: []
};
},
props: {
pageId: {
type: String,
default: ''
},
dialogVisible: {
type: Boolean,
default: false
}
},
watch: {
pageId(val) {
if (val) {
this.form = { searchContent: '', pageId: val, pageNum: 1, pageSize: 20 };
this.getList();
}
}
},
methods: {
toInput: _debounce(function(e, value) {
this.getList();
}, 500),
getList() {
this.loading = true;
guidePageRelation(this.form)
.then(res => {
const { totalCount, result } = res.data.result;
if (result) {
this.total = totalCount;
this.tableData = result;
}
})
.finally(_ => {
this.loading = false;
});
},
handleSizeChange(val) {
this.form.pageNum = 1;
this.form.pageSize = val;
this.getList();
},
handleCurrentChange(val) {
this.form.pageNum = val;
this.getList();
}
}
};
</script>
<style type="text/scss" lang="scss" scoped>
.margin-pg {
margin: 20px 0 0 0;
}
</style>
<template>
<div :id="id"></div>
<!-- <div v-if="charData.length" :id="id"></div> -->
<!-- <div v-else class="chart--nodata"></div> -->
</template>
<script>
// import G2 from '@antv/g2';
import * as G2 from '@antv/g2';
export default {
data() {
return {
chart: null
};
},
props: {
charData: {
type: Array,
default() {
return [];
}
},
id: String,
width: {
type: Number,
default: 1192
}
},
mounted() {
setTimeout(() => {
this.drawChart(); // 第一步是创建的时候更新图表,但是这个不适用于异步请求接口获取相关数据,采用下面的监听的方式
}, 30);
},
beforeUpdate() {
this.drawChart();
},
watch: {
charData() {
this.drawChart();
}
},
methods: {
async drawChart() {
this.chart && this.chart.destroy();
this.chart = new G2.Chart({
container: this.id,
height: 359,
forceFit: true,
width: this.width,
padding: [20, 40, 80, 80]
});
this.chart.data(this.charData, {
bizDate: {
// type: 'cat', //分类
alias: '日期' //别名
},
addNum: {
alias: '今日添加人数'
},
clickNum: {
alias: '今日点击人数'
},
clickTimes: {
alias: '今日点击人次'
}
});
//坐标轴配置(法一配置)
this.chart.axis('bizDate', {
line: {
style: {
stroke: '#606266',
lineDash: [3, 3]
}
},
tickLine: {
style: {
fill: '#E4E7ED',
lineDash: [3, 3]
}
},
label: {
style: {
fill: '#606266'
}
}
});
// this.chart.axis('新增人数', {
// grid: {
// line: {
// type: 'line',
// style: {
// stroke: '#E4E7ED',
// lineDash: [3, 3]
// }
// }
// },
// label: {
// style: {
// fill: '#606266'
// },
// formatter: val => {
// // 格式化参数值
// return val;
// }
// }
// });
// 图例
this.chart.legend({
custom: true,
position: 'top-left',
items: [
{ name: '今日添加人数', value: 'addNum', marker: { symbol: 'line', style: { stroke: '#4B74E8', lineWidth: 12, lineHeight: 8 } } },
{ name: '今日点击人次', value: 'clickTimes', marker: { symbol: 'line', style: { stroke: '#D6B38C', lineWidth: 12, lineHeight: 8 } } },
{ name: '今日点击人数', value: 'clickNum', marker: { symbol: 'line', style: { stroke: '#14C9C9', lineWidth: 12, lineHeight: 8 } } }
]
});
this.chart
.line()
.position('bizDate*addNum')
.color('#4B74E8');
this.chart
.line()
.position('bizDate*clickTimes')
.color('#D6B38C');
this.chart
.line()
.position('bizDate*clickNum')
.color('#14C9C9');
this.chart.removeInteraction('legend-filter'); // 自定义图例,移除默认的分类图例筛选交互
//图表绘制的最后一步,用于将图表渲染至画布
this.chart.render();
}
}
};
</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