|
|
@ -151,12 +151,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) { |
|
|
@ -165,8 +160,7 @@ |
|
|
this.$navTo('pages/category/tradingentity/detail',{name}) |
|
|
this.$navTo('pages/category/tradingentity/detail',{name}) |
|
|
} else { |
|
|
} else { |
|
|
this.targetTab = val |
|
|
this.targetTab = val |
|
|
await this.getGoodsList() |
|
|
await this.upCallback(1) |
|
|
await this.getHomeListImage() |
|
|
|
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
/** |
|
|
/** |
|
|
@ -208,6 +202,9 @@ |
|
|
source_type: '', |
|
|
source_type: '', |
|
|
is_user_data: '1', |
|
|
is_user_data: '1', |
|
|
} |
|
|
} |
|
|
|
|
|
GoodsApi.nbgoods(param).then(resultTotal => { |
|
|
|
|
|
app.total = resultTotal.data.total |
|
|
|
|
|
}) |
|
|
if (app.searchValue != '') { |
|
|
if (app.searchValue != '') { |
|
|
param.goods_name = app.searchValue |
|
|
param.goods_name = app.searchValue |
|
|
} |
|
|
} |
|
|
@ -219,10 +216,9 @@ |
|
|
return new Promise((resolve, reject) => { |
|
|
return new Promise((resolve, reject) => { |
|
|
GoodsApi.nbgoods(param) |
|
|
GoodsApi.nbgoods(param) |
|
|
.then(result => { |
|
|
.then(result => { |
|
|
if (result.data.length > 0) { |
|
|
if (result.data.data.length > 0) { |
|
|
// 合并新数据 |
|
|
// 合并新数据 |
|
|
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) |
|
|
|