|
@@ -5,7 +5,7 @@
|
|
|
<view class="fixed-top">
|
|
|
<!-- 搜索 -->
|
|
|
<view class="fixed-top-search flex">
|
|
|
- <u-input v-model="title" @confirm="getList()" confirmType="search" placeholder="请输入商品名称" border="none" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" />
|
|
|
+ <u-input v-model="title" @confirm="pageList()" confirmType="search" placeholder="请输入商品名称" border="none" prefixIcon="search" prefixIconStyle="font-size: 22px;color: #909399" />
|
|
|
</view>
|
|
|
<!-- 选择 -->
|
|
|
<view class="fixed-top-choice flex">
|
|
@@ -86,20 +86,16 @@
|
|
|
this.tagIds = opthios.tagIds
|
|
|
this.categoryId = Number(opthios.categoryId)
|
|
|
}
|
|
|
- this.getList()
|
|
|
- },
|
|
|
-
|
|
|
- onShow() {
|
|
|
- // this.pageList()
|
|
|
+ this.pageList()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
- // pageList() {
|
|
|
- // this.pageNum = 1
|
|
|
- // this.total = 0
|
|
|
- // this.list = []
|
|
|
- // this.getList()
|
|
|
- // },
|
|
|
+ pageList() {
|
|
|
+ this.pageNum = 1
|
|
|
+ this.total = 0
|
|
|
+ this.list = []
|
|
|
+ this.getList()
|
|
|
+ },
|
|
|
|
|
|
// 商品列表
|
|
|
getList() {
|
|
@@ -150,7 +146,7 @@
|
|
|
this.priceShow = !this.priceShow
|
|
|
this.priceSort = this.priceShow ? 1 : 2
|
|
|
}
|
|
|
- this.getList()
|
|
|
+ this.pageList()
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -159,7 +155,7 @@
|
|
|
if (this.total > this.pageNum * 20) {
|
|
|
setTimeout(() => {
|
|
|
++this.pageNum
|
|
|
- this.getList()
|
|
|
+ this.pageList()
|
|
|
}, 500)
|
|
|
} else {
|
|
|
uni.$u.toast('已经到底了')
|