zs 2 rokov pred
rodič
commit
bfccb73940
1 zmenil súbory, kde vykonal 14 pridanie a 2 odobranie
  1. 14 2
      pagesMy/order/after.vue

+ 14 - 2
pagesMy/order/after.vue

@@ -2,7 +2,7 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				<input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品" @scroll="toScroll">
+				<input type="text" v-model="searchInfo.goods" @input="toInput" placeholder="搜索商品" @scroll="toScroll">
 			</view>
 			<view class="two">
 				<tabs :tabs="tabs" @tabsChange="tabsChange">
@@ -76,6 +76,7 @@
 				// 系统设置
 				config: {},
 				user: {},
+				searchInfo: {},
 				// 售后类型
 				typeList: [],
 				// 售后状态
@@ -149,6 +150,7 @@
 				const arr = await that.$api(`/afterSale`, 'GET', {
 					customer: user._id,
 					type: that.type,
+					...that.searchInfo
 				});
 				if (arr.errcode == '0') {
 					let list = [...that.list, ...arr.data];
@@ -217,6 +219,17 @@
 				let num = Math.sign(up - e.detail.scrollTop);
 				if (num == 1) that.$set(that, `is_bottom`, false);
 			},
+			// 输入框
+			toInput(e) {
+				const that = this;
+				if (that.searchInfo.goods) {
+					that.$set(that.searchInfo, `goods`, e.detail.value)
+				} else {
+					that.$set(that, `searchInfo`, {})
+				}
+				that.clearPage();
+				that.search();
+			},
 			// 选择选项卡
 			tabsChange(e) {
 				const that = this;
@@ -275,7 +288,6 @@
 					}
 				});
 			},
-
 			// 清空列表
 			clearPage() {
 				const that = this;