更新商品设置热门

This commit is contained in:
gyq 2024-08-02 15:11:27 +08:00
parent 744632324b
commit 07551be485
1 changed files with 4 additions and 5 deletions

View File

@ -110,7 +110,7 @@ export default {
return {
dayjs,
query: {
productId:'',
productId: '',
name: '',
categoryId: '',
typeEnum: ''
@ -172,11 +172,10 @@ export default {
},
//
async changeHot(e, row) {
console.log(row)
try {
this.tableData.loading = true
await tbProductIsHot({
shopId: localStorage.getItem('shopId'),
isHot: e,
id: row.id
})
this.getTableData()
@ -203,7 +202,7 @@ export default {
async getTableData() {
try {
let localQuery = JSON.parse(localStorage.getItem('shopIndexQuery'))
if (localQuery != null&&localQuery.hasOwnProperty('productId')) {
if (localQuery != null && localQuery.hasOwnProperty('productId')) {
this.query = localQuery
}
@ -214,7 +213,7 @@ export default {
size: this.tableData.size,
name: this.query.name,
categoryId: this.query.categoryId,
id:this.query.productId,
id: this.query.productId,
typeEnum: this.query.typeEnum,
shopId: localStorage.getItem('shopId')
})