Commit 015f0009 by damodmg

列表编辑搜索条件缓存

parent 81401769
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.588cf49e82e1aafc034c1f08b7336346.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.a2d24120408662bb0b58.js></script></body></html>
\ No newline at end of file
<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><link rel=stylesheet type=text/css href=./static/css/iconfont.css><link rel=stylesheet type=text/css href=./static/css/common.css><link rel="shortcut icon" type=image/x-icon href=./static/img/favicon.ico><title>积分商城</title><link href=./static/css/app.2ad2864873377a80966667b30c0aec98.css rel=stylesheet></head><body><div id=app></div><script src=//web-1251519181.file.myqcloud.com/lib/vue/2.5.2/vue.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vue-router/3.0.2/vue-router.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/vuex/3.1.0/vuex.min.js></script><script src=//web-1251519181.file.myqcloud.com/lib/elementUI/index.2.5.4.js></script><script src=//web-1251519181.file.myqcloud.com/components/header.2.0.20.js></script><script src=//web-1251519181.file.myqcloud.com/components/aside-menu.2.0.05.js></script><script src=//web-1251519181.file.myqcloud.com/components/footer.2.0.02.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-linkage.2.0.01.js></script><script src=//web-1251519181.file.myqcloud.com/components/store-new.2.0.11.js></script><script src=//web-1251519181.file.myqcloud.com/components/card.2.0.03.js></script><script src=//web-1251519181.file.myqcloud.com/components/export-excel.2.0.04.js></script><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.bf93010d9b9b1322a27b.js></script><script type=text/javascript src=./static/js/app.bd15e04f3b224b229d33.js></script></body></html>
\ No newline at end of file
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.
......@@ -161,10 +161,22 @@ export default {
mallProId: '',
type: '',
costValue: ''
}
},
couponListObj: {}
};
},
created() {
if (localStorage.getItem('couponListObj')) {
this.couponListObj = JSON.parse(localStorage.getItem('couponListObj'));
this.currentPage = this.couponListObj.currentPage;
this.pageSize = this.couponListObj.pageSize;
this.total = this.couponListObj.total;
this.shelf = this.couponListObj.shelf;
this.searchValue = this.couponListObj.searchValue;
this.sortType = this.couponListObj.sortType;
this.sortColumn = this.couponListObj.sortColumn;
localStorage.removeItem('couponListObj'); //使用完就清除缓存
}
this.getList();
},
methods: {
......@@ -340,6 +352,16 @@ export default {
},
// 编辑
goAdd(item) {
this.couponListObj = {
currentPage: this.currentPage,
pageSize: this.pageSize,
total: this.total,
shelf: this.shelf,
searchValue: this.searchValue,
sortType: this.sortType,
sortColumn: this.sortColumn
};
window.localStorage.setItem('couponListObj', JSON.stringify(this.couponListObj));
this.$router.push({ name: 'couponInfo', query: { giftId: item.integralMallProId, coupCardId: item.proReferId } });
},
handleTable(item, type) {
......
......@@ -231,6 +231,10 @@ export default {
};
},
created() {
window.onbeforeunload = function(e) {
var storage = window.localStorage;
storage.clear();
};
let val = {
storeType: 0,
storeGroupIds: '',
......
......@@ -198,10 +198,23 @@ export default {
list: [],
type: ''
},
list: []
list: [],
giftListObj: {} //缓存数据
};
},
created() {
if (localStorage.getItem('giftListObj')) {
this.giftListObj = JSON.parse(localStorage.getItem('giftListObj'));
this.currentPage = this.giftListObj.currentPage;
this.pageSize = this.giftListObj.pageSize;
this.total = this.giftListObj.total;
this.shelf = this.giftListObj.shelf;
this.searchValue = this.giftListObj.searchValue;
this.giftType = this.giftListObj.giftType;
this.sortType = this.giftListObj.sortType;
this.sortColumn = this.giftListObj.sortColumn;
localStorage.removeItem('giftListObj'); //使用完就清除缓存
}
this.getList();
},
methods: {
......@@ -393,6 +406,17 @@ export default {
},
// 编辑
goAdd(item) {
this.giftListObj = {
currentPage: this.currentPage,
pageSize: this.pageSize,
total: this.total,
shelf: this.shelf,
giftType: this.giftType,
searchValue: this.searchValue,
sortType: this.sortType,
sortColumn: this.sortColumn
};
window.localStorage.setItem('giftListObj', JSON.stringify(this.giftListObj));
this.$router.push({ name: 'giftInfo', query: { type: item.giftType, giftId: item.integralMallProId, proReferId: item.proReferId } });
},
//编辑序号
......
......@@ -401,6 +401,10 @@ export default {
};
},
created() {
window.onbeforeunload = function(e) {
var storage = window.localStorage;
storage.clear();
};
this.giftType = Number(this.$route.query.type); //列表上实物是1虚拟是0
this.mallProId = this.$route.query.giftId;
this.giftForm.proReferId = this.$route.query.proReferId;
......
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