Commit b9a93418 by LJM

js

parent 35fbec8a
Showing with 13 additions and 17 deletions
...@@ -46,7 +46,6 @@ export default { ...@@ -46,7 +46,6 @@ export default {
list: [], list: [],
count: [], count: [],
searchParams: { searchParams: {
status: '',
page: 1, page: 1,
limit: 1000, limit: 1000,
user_id: getCookie('Yo4teW_uid') user_id: getCookie('Yo4teW_uid')
...@@ -64,27 +63,24 @@ export default { ...@@ -64,27 +63,24 @@ export default {
methods: { methods: {
tab(index) { tab(index) {
this.curr = index; this.curr = index;
if (index == 0) {
this.searchParams.status = '';
} else if (index == 1) {
this.searchParams.status = 0;
} else if (index == 2) {
this.searchParams.status = 1;
}
this.getData(); this.getData();
}, },
getData() { getData() {
this.request(Api_Url + '/ucoupon/count', 'POST', {}, true, true).then(res => { if (this.curr == 0) {
if (res.err_code === 0) { var params = Object.assign({}, this.searchParams);
this.count[0] = res.data[-1]; } else if (this.curr == 1) {
this.count[1] = res.data[1]; var params = Object.assign({}, this.searchParams, { status: 0 });
this.count[2] = res.data[-2]; } else if (this.curr == 2) {
this.text_arr = ['全部', '待处理', '已答复']; var params = Object.assign({}, this.searchParams, { status: 1 });
} }
});
this.request(Api_Url + '/help/help/feedback_list', 'POST', this.searchParams, true, true).then(res => { this.request(Api_Url + '/help/help/feedback_list', 'POST', params, true, true).then(res => {
if (res.err_code === 0) { if (res.err_code === 0) {
this.list = res.data.list; this.list = res.data.list;
this.count[0] = res.data.amount.all;
this.count[1] = res.data.amount.todo;
this.count[2] = res.data.amount.responded;
this.text_arr = ['全部', '待处理', '已答复'];
} else if (res.err_code == 11012) { } else if (res.err_code == 11012) {
uni.navigateTo({ uni.navigateTo({
url: '/login?referer=/user/inquery' url: '/login?referer=/user/inquery'
......
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 sign in to comment