|
@@ -15,7 +15,7 @@
|
15
|
15
|
<input type="text" placeholder="搜索" v-model="search" @input="searchFn()">
|
16
|
16
|
</div>
|
17
|
17
|
<ul class="foods-wrapper">
|
18
|
|
- <li v-for="data in items" class="food-item border-1px" @click="toKnowDetails(data)">
|
|
18
|
+ <li v-for="(data, i) in items" class="food-item border-1px" :key="i" @click="toKnowDetails(data)">
|
19
|
19
|
<div class="food-content">
|
20
|
20
|
<div class="title">
|
21
|
21
|
<div>
|
|
@@ -176,14 +176,22 @@ export default {
|
176
|
176
|
this.$http
|
177
|
177
|
.post("service/solution/fetchDataList/solution", postData)
|
178
|
178
|
.then(function(res) {
|
179
|
|
- if (res.data.list.length > 0) {
|
180
|
|
- that.items=that.items.concat(res.data.list);
|
181
|
|
- that.wushuju = false;
|
182
|
|
- } else {
|
183
|
|
- that.wushuju = true;
|
184
|
|
- that.$refs.scroll.forceUpdate()
|
|
179
|
+ if(that.search === postData.solution.searchWord){
|
|
180
|
+ if(that.idx == 0){
|
|
181
|
+ if (res.data.list.length > 0) {
|
|
182
|
+ that.items=res.data.list || [];
|
|
183
|
+ that.wushuju = false;
|
|
184
|
+ } else {
|
|
185
|
+ that.wushuju = true;
|
|
186
|
+ that.$refs.scroll.forceUpdate()
|
|
187
|
+ }
|
|
188
|
+ }else{
|
|
189
|
+ that.items=that.items.concat(res.data.list || []);
|
|
190
|
+ that.wushuju = false;
|
|
191
|
+ }
|
|
192
|
+
|
|
193
|
+ that.loadShow = false;
|
185
|
194
|
}
|
186
|
|
- that.loadShow = false;
|
187
|
195
|
});
|
188
|
196
|
},
|
189
|
197
|
onPullingDown() {
|