更新商品设置热门

This commit is contained in:
gyq
2024-08-02 15:11:27 +08:00
parent 744632324b
commit 07551be485

View File

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