|
|
@ -146,12 +146,7 @@ |
|
|
methods: { |
|
|
methods: { |
|
|
// 搜索 |
|
|
// 搜索 |
|
|
async onSearch() { |
|
|
async onSearch() { |
|
|
if (this.searchValue == '') { |
|
|
await this.upCallback(1) |
|
|
this.$error('请输入搜索关键词'); |
|
|
|
|
|
} else { |
|
|
|
|
|
await this.getGoodsList() |
|
|
|
|
|
await this.getHomeListImage() |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 切换tab |
|
|
// 切换tab |
|
|
async changeTab(val) { |
|
|
async changeTab(val) { |
|
|
@ -159,8 +154,7 @@ |
|
|
this.$error('更多内容,敬请期待!') |
|
|
this.$error('更多内容,敬请期待!') |
|
|
} else { |
|
|
} else { |
|
|
this.targetTab = val |
|
|
this.targetTab = val |
|
|
await this.getGoodsList() |
|
|
await this.upCallback(1) |
|
|
await this.getHomeListImage() |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
@ -210,12 +204,15 @@ |
|
|
} else if (app.targetTab === 3) { |
|
|
} else if (app.targetTab === 3) { |
|
|
param.order_type = 'price' |
|
|
param.order_type = 'price' |
|
|
} |
|
|
} |
|
|
|
|
|
GoodsApi.nbgoods(param).then(resultTotal => { |
|
|
|
|
|
param.goods_name = '' |
|
|
|
|
|
app.total = resultTotal.data.total |
|
|
|
|
|
}) |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
GoodsApi.nbgoods(param) |
|
|
GoodsApi.nbgoods(param) |
|
|
.then(result => { |
|
|
.then(result => { |
|
|
// 合并新数据 |
|
|
// 合并新数据 |
|
|
const newList = app.initList(result.data) |
|
|
const newList = app.initList(result.data) |
|
|
app.total = result.data.total |
|
|
|
|
|
app.list.data = getMoreListData(newList, app.list, pageNo) |
|
|
app.list.data = getMoreListData(newList, app.list, pageNo) |
|
|
app.userList = newList.data[0].user |
|
|
app.userList = newList.data[0].user |
|
|
app.userList.stateStr = this.getUserStateStr(app.userList.state) |
|
|
app.userList.stateStr = this.getUserStateStr(app.userList.state) |
|
|
|