本地备份:商家UI调整前当前完整版本(未推送)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
XingQue
2026-06-27 06:04:45 +08:00
parent 5e50f6a486
commit fc0ee9a4d1
28 changed files with 3190 additions and 3264 deletions

View File

@@ -34,6 +34,10 @@ Page({
list: [],
displayList: [],
searchKeyword: '',
isOwner: false,
},
@@ -124,7 +128,9 @@ Page({
const raw = (res.data.data && res.data.data.list) || [];
this.setData({ list: this.formatList(raw) });
this._allList = this.formatList(raw);
this.applySearchFilter();
}
@@ -140,9 +146,31 @@ Page({
goBack() { wx.navigateBack(); },
applySearchFilter() {
const kw = (this.data.searchKeyword || '').trim().toLowerCase();
const all = this._allList || [];
if (!kw) {
this.setData({ list: all, displayList: all });
return;
}
const filtered = all.filter((item) => {
const uid = String(item.uid || '').toLowerCase();
const remark = String(item.merchant_remark || '').toLowerCase();
const nick = String(item.nickname || '').toLowerCase();
return uid.includes(kw) || remark.includes(kw) || nick.includes(kw);
});
this.setData({ list: all, displayList: filtered });
},
onSearchInput(e) {
this.setData({ searchKeyword: e.detail.value || '' });
this.applySearchFilter();
},
goBack() { wx.navigateBack(); },
clearSearch() {
this.setData({ searchKeyword: '' });
this.applySearchFilter();
},
goStaffOrders(e) {
const id = e.currentTarget.dataset.id;