Commit 9f7ae9da by crushh

udpate: dist

parent 6bdcf7f6
...@@ -76,18 +76,18 @@ Vue.axios.interceptors.request.use( ...@@ -76,18 +76,18 @@ Vue.axios.interceptors.request.use(
Vue.axios.interceptors.response.use( Vue.axios.interceptors.response.use(
data => { data => {
removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除 removePending(data.config); //在一个ajax响应后再执行一下取消操作,把已经完成的请求从pending中移除
// if (data.status && data.status == 200 && (data.data.errorCode != 1||data.data.code!=1)) { if (data.status && data.status == 200 && (data.data.errorCode != 1 || data.data.code != 1)) {
// if (data.data.errorCode == 4) { if (data.data.errorCode == 4) {
// if (window.location.href.indexOf('gic-error') != -1) { if (window.location.href.indexOf('gic-error') != -1) {
// return false; return false;
// } }
// window.location.href = gicHost + '/gic-web/#/login?ishb=1'; window.location.href = gicHost + '/gic-web/#/login?ishb=1';
// } }
// if (data.data.errorCode == 10 || data.data.errorCode == 7) { if (data.data.errorCode == 10 || data.data.errorCode == 7) {
// window.location.href = gicHost + '/haoban-3/#/index'; window.location.href = gicHost + '/haoban-3/#/index';
// } }
// return data; return data;
// } }
return data; return data;
}, },
err => { err => {
......
...@@ -80,7 +80,8 @@ router.beforeEach((to, from, next) => { ...@@ -80,7 +80,8 @@ router.beforeEach((to, from, next) => {
baseUrl = host; baseUrl = host;
} }
const { fromPath = [] } = from.meta || {}; const { fromPath = [],refresh } = from.meta || {};
if (Array.isArray(fromPath)) { if (Array.isArray(fromPath)) {
from.meta.keepAlive = fromPath.some(el => { from.meta.keepAlive = fromPath.some(el => {
let menuUrlReg = el; let menuUrlReg = el;
...@@ -96,7 +97,14 @@ router.beforeEach((to, from, next) => { ...@@ -96,7 +97,14 @@ router.beforeEach((to, from, next) => {
const reg = new RegExp(menuUrlReg); const reg = new RegExp(menuUrlReg);
return reg.test(to.path); return reg.test(to.path);
}); });
if(from.meta.keepAlive){
to.meta.refresh=false;
}else{
to.meta.refresh=refresh;
}
} }
console.log(from)
console.log(to)
next(); next();
}); });
......
...@@ -4,7 +4,11 @@ const attractFlowLinkRouter = [ ...@@ -4,7 +4,11 @@ const attractFlowLinkRouter = [
{ {
path: '/attractFlowLink', path: '/attractFlowLink',
name: '引流链接', name: '引流链接',
component: _import('salesleads/actCodeManage/attractFlowLink', 'index') component: _import('salesleads/actCodeManage/attractFlowLink', 'index'),
meta: {
keepAlive: true,
fromPath: ['/attractFlowLinkAdd', '/attractFlowLinkEdit/:id', '/attractFlowLinkInfo/:id']
}
}, },
{ {
path: '/attractFlowLinkAdd', path: '/attractFlowLinkAdd',
...@@ -33,7 +37,11 @@ const attractFlowLinkRouter = [ ...@@ -33,7 +37,11 @@ const attractFlowLinkRouter = [
{ {
path: '/ladingPageList', path: '/ladingPageList',
name: '落地页列表', name: '落地页列表',
component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'list') component: _import('salesleads/actCodeManage/attractFlowLink/landingPage', 'list'),
meta: {
keepAlive: true,
fromPath: ['/ladingPageAdd', '/ladingPageEdit/:id']
}
}, },
{ {
path: '/ladingPageAdd', path: '/ladingPageAdd',
......
...@@ -100,7 +100,11 @@ export const constantRouterMap = [ ...@@ -100,7 +100,11 @@ export const constantRouterMap = [
{ {
path: '/salutatory', path: '/salutatory',
name: '欢迎语', name: '欢迎语',
component: _import('enterprise', 'salutatoryIndex') component: _import('enterprise', 'salutatoryIndex'),
meta:{
keepAlive: true,
fromPath: ['/editSalutatorySet','/salutatorySet']
}
}, },
{ {
path: '/salutatorySet', path: '/salutatorySet',
......
...@@ -124,9 +124,18 @@ export default { ...@@ -124,9 +124,18 @@ export default {
}; };
}, },
mounted() { mounted() {
const that = this; this.getData();
that.getData(); console.log('mounted');
// this.getSetting(); },
activated() {
if (this.$route.meta.refresh) {
this.form = {
title: '',
pageSize: 20,
pageNum: 1
};
}
this.getData();
}, },
props: { props: {
type: { type: {
...@@ -187,8 +196,9 @@ export default { ...@@ -187,8 +196,9 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
getRequest('/haoban-manage3-web/welcome/remove', { welcomeId: row.welcomeId }).then(res => { getRequest('/haoban-manage3-web/welcome/remove', { welcomeId: row.welcomeId }).then(res => {
console.log(res);
let resData = res.data; let resData = res.data;
if (resData.code == 0 && resData.result) { if (resData.code == 0) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getData(); this.getData();
} }
...@@ -197,7 +207,6 @@ export default { ...@@ -197,7 +207,6 @@ export default {
}, },
delType2(row) { delType2(row) {
getRequest('/haoban-manage3-web/welcome/statistics', { welcomeId: row.welcomeId }).then(res => { getRequest('/haoban-manage3-web/welcome/statistics', { welcomeId: row.welcomeId }).then(res => {
console.log(res);
const { result } = res.data; const { result } = res.data;
let str = ''; let str = '';
if (result) { if (result) {
...@@ -223,8 +232,9 @@ export default { ...@@ -223,8 +232,9 @@ export default {
type: 'warning' type: 'warning'
}).then(() => { }).then(() => {
getRequest('/haoban-manage3-web/welcome/remove', { welcomeId: row.welcomeId }).then(res => { getRequest('/haoban-manage3-web/welcome/remove', { welcomeId: row.welcomeId }).then(res => {
console.log(res);
let resData = res.data; let resData = res.data;
if (resData.code == 0 && resData.result) { if (resData.code == 0) {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getData(); this.getData();
} }
...@@ -253,7 +263,7 @@ export default { ...@@ -253,7 +263,7 @@ export default {
postJsonRequest('/haoban-manage3-web/welcome/list', { ...this.form, wxEnterpriseId: this.wxEnterpriseId, type: this.type }) postJsonRequest('/haoban-manage3-web/welcome/list', { ...this.form, wxEnterpriseId: this.wxEnterpriseId, type: this.type })
.then(res => { .then(res => {
let resData = res.data; let resData = res.data;
console.log(resData);
if (resData.code == 0 && resData.result) { if (resData.code == 0 && resData.result) {
this.tableData = resData.result.result; this.tableData = resData.result.result;
this.tableData.forEach(item => { this.tableData.forEach(item => {
......
...@@ -27,6 +27,9 @@ export default { ...@@ -27,6 +27,9 @@ export default {
this.activeName = Number(sessionStorage.getItem('activeName')); this.activeName = Number(sessionStorage.getItem('activeName'));
} }
}, },
destroyed() {
sessionStorage.setItem('activeName', 1);
},
watch: { watch: {
activeName(val) { activeName(val) {
sessionStorage.setItem('activeName', val); sessionStorage.setItem('activeName', val);
......
...@@ -674,7 +674,7 @@ export default { ...@@ -674,7 +674,7 @@ export default {
para.suitDepartmentDeleteList.forEach(item => { para.suitDepartmentDeleteList.forEach(item => {
item.selectType = 1; item.selectType = 1;
}); });
console.log(para);
this.submitbtnLoading = true; this.submitbtnLoading = true;
postJsonRequest('/haoban-manage3-web/welcome/save', para) postJsonRequest('/haoban-manage3-web/welcome/save', para)
.then(res => { .then(res => {
...@@ -684,7 +684,9 @@ export default { ...@@ -684,7 +684,9 @@ export default {
type: 'success', type: 'success',
message: '保存成功!' message: '保存成功!'
}); });
// this.$router.push('/salutatory'); if (!this.$route.query.id) {
this.$route.meta.refresh = true;
}
this.$router.go(-1); this.$router.go(-1);
} }
}) })
......
...@@ -177,8 +177,10 @@ export default { ...@@ -177,8 +177,10 @@ export default {
storeData: [], storeData: [],
form: { form: {
linkType: 1, linkType: 1,
memberLabelName: '测试标签值名称重复- 温州青童时代店', memberLabelName: '',
memberLabelId: 'edd3901afd1e418d93fdc3b50bb24784', memberLabelId: '',
// memberLabelName: '测试标签值名称重复- 温州青童时代店',
// memberLabelId: 'edd3901afd1e418d93fdc3b50bb24784',
storeList: [], storeList: [],
name: '', name: '',
pageId: '', pageId: '',
...@@ -351,6 +353,7 @@ export default { ...@@ -351,6 +353,7 @@ export default {
data.storeRuleJson = JSON.stringify(data.storeRuleJson); data.storeRuleJson = JSON.stringify(data.storeRuleJson);
data.customRuleJson = JSON.stringify(data.customRuleJson); data.customRuleJson = JSON.stringify(data.customRuleJson);
data.wxEnterpriseId = this.wxEnterpriseId; data.wxEnterpriseId = this.wxEnterpriseId;
delete data.memberLabelStatus;
this.$refs.form.validate(val => { this.$refs.form.validate(val => {
if (!val) { if (!val) {
this.scrollToError(this); this.scrollToError(this);
...@@ -362,6 +365,7 @@ export default { ...@@ -362,6 +365,7 @@ export default {
.then(res => { .then(res => {
setTimeout(() => { setTimeout(() => {
this.btnLoading = false; this.btnLoading = false;
this.$route.meta.refresh = true;
this.$router.go(-1); this.$router.go(-1);
}, 1000); }, 1000);
}) })
......
...@@ -191,6 +191,18 @@ export default { ...@@ -191,6 +191,18 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
activated() {
if (this.$route.meta.refresh) {
this.form = {
pageSize: 20,
pageNum: 1,
linkType: '',
searchParams: '',
dateRange: []
};
}
this.getList();
},
components: { components: {
links links
}, },
......
...@@ -126,6 +126,7 @@ export default { ...@@ -126,6 +126,7 @@ export default {
guidePageSave(this.form) guidePageSave(this.form)
.then(_ => { .then(_ => {
this.$router.go(-1); this.$router.go(-1);
this.$route.meta.refresh = true;
this.$message.success('保存成功'); this.$message.success('保存成功');
}) })
.finally(_ => { .finally(_ => {
......
...@@ -113,10 +113,22 @@ export default { ...@@ -113,10 +113,22 @@ export default {
mounted() { mounted() {
this.getList(); this.getList();
}, },
activated() {
if (this.$route.meta.refresh) {
this.form = {
pageSearchText: '',
dateRange: [],
pageSize: 20,
pageNum: 1
};
}
this.getList();
},
methods: { methods: {
toInput: _debounce(function(e, value) { toInput: _debounce(function(e, value) {
this.getList(); this.getList();
}, 500), }, 500),
getList() { getList() {
const param = { ...this.form }; const param = { ...this.form };
if (this.form.dateRange && this.form.dateRange.length) { if (this.form.dateRange && this.form.dateRange.length) {
......
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