From cbcfcefaa31c9752593188c9f18340ea2046b981 Mon Sep 17 00:00:00 2001 From: sunh <10151317@qq.com> Date: Sun, 18 Mar 2018 20:08:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=88=97=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/goodspage.vue | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/src/pages/goodspage.vue b/src/pages/goodspage.vue index 1042461..39e53f9 100644 --- a/src/pages/goodspage.vue +++ b/src/pages/goodspage.vue @@ -15,7 +15,7 @@
- @@ -105,7 +105,8 @@ edit_show:false, del_show:false, - content:'' + content:'', + type: 'all' } }, @@ -129,12 +130,14 @@ } }, methods: { - getList(innerCb){ + getList(innerCb, opt){ var self = this; + if(typeof opt === 'undefined') { + opt = {} + } + opt.token = self.$root.TOKEN ajax.goodsList({ - param:{ - token:self.$root.TOKEN - }, + param: opt, cb(data){ if(data.datalist){ self.list = data.datalist; @@ -183,7 +186,11 @@ }) } }, - search(){} + search(){ + this.getList(null, this.type === 'all' ? null : { + type: this.type + }); + } }, mounted(){ this.getList(); -- Gitee