|
@@ -27,6 +27,10 @@ export default defineComponent({
|
|
sort: {
|
|
sort: {
|
|
type: Number,
|
|
type: Number,
|
|
defalut: 0
|
|
defalut: 0
|
|
|
|
+ },
|
|
|
|
+ keyword: {
|
|
|
|
+ type: String as any,
|
|
|
|
+ defalut: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
@@ -40,6 +44,7 @@ export default defineComponent({
|
|
productAttributeCategoryId: null as any,
|
|
productAttributeCategoryId: null as any,
|
|
brandId: null as any,
|
|
brandId: null as any,
|
|
sort: null as any, // 1->按新品;2->按销量;3->价格从低到高;4->价格从高到低
|
|
sort: null as any, // 1->按新品;2->按销量;3->价格从低到高;4->价格从高到低
|
|
|
|
+ keyword: '',
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
pageSize: 20
|
|
pageSize: 20
|
|
},
|
|
},
|
|
@@ -71,6 +76,7 @@ export default defineComponent({
|
|
: undefined
|
|
: undefined
|
|
params.brandId = this.brandId ? this.brandId : undefined
|
|
params.brandId = this.brandId ? this.brandId : undefined
|
|
params.sort = this.sort ? this.sort : undefined
|
|
params.sort = this.sort ? this.sort : undefined
|
|
|
|
+ params.keyword = this.keyword ? this.keyword : undefined
|
|
const res = await request.post('/api-mall-portal/product/search', {
|
|
const res = await request.post('/api-mall-portal/product/search', {
|
|
data: {
|
|
data: {
|
|
...params
|
|
...params
|