Commit 11cd21ff by 胡悦

提交案例视频

1 parent eb673129
...@@ -182,7 +182,8 @@ export default { ...@@ -182,7 +182,8 @@ export default {
this.name = e.detail.value this.name = e.detail.value
if (this.name == '') if (this.name == '')
this.isSearch = false this.isSearch = false
this.list = this.searchList.filter(i => i.name.includes(this.name)) // this.list = this.searchList.filter(i => i.name.includes(this.name))
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
}, },
selectType() { selectType() {
this.isSelect = !this.isSelect this.isSelect = !this.isSelect
...@@ -191,12 +192,12 @@ export default { ...@@ -191,12 +192,12 @@ export default {
console.log(val) console.log(val)
this.selectIndex = val.value this.selectIndex = val.value
this.isSelect = false this.isSelect = false
this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex) this.getCaseList(this.selectIndex == '全部' ? '' : this.selectIndex, this.name)
}, },
async getCaseList(category = '') { async getCaseList(category = '', name = '') {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo; // 44217687
const res = await uni.$api.boutiqueApi.getCaseList({merchantId: 44217687, category}) const res = await uni.$api.boutiqueApi.getCaseList({merchantId: shopMerchantId, category, name})
console.log(res) console.log(res)
this.list = res.list this.list = res.list
this.searchList = res.list this.searchList = res.list
...@@ -204,7 +205,7 @@ export default { ...@@ -204,7 +205,7 @@ export default {
async getCategory() { async getCategory() {
const userInfo = uni.$storage.get("userInfo"), const userInfo = uni.$storage.get("userInfo"),
{ shopMerchantId } = userInfo; { shopMerchantId } = userInfo;
const res = await uni.$api.boutiqueApi.getCategory({ merchantId: 44217687 }) const res = await uni.$api.boutiqueApi.getCategory({ merchantId: shopMerchantId })
console.log(res) console.log(res)
const _list = res.map(item => { const _list = res.map(item => {
return { return {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!