搜索筛选功能数据对接

This commit is contained in:
952108534@qq.com
2022-01-11 15:24:00 +08:00
parent 1d659446ae
commit 629f8f0085
3 changed files with 114 additions and 32 deletions

View File

@@ -211,18 +211,38 @@ export const biaomessage = (stype,name) => {
return fetch('product/query?petType='+stype, data, 'POST' )
}
export const searchchanpin = (stype,categoryName,tagUsedAge,tagFunction,tagBreed) => {
console.log(stype);
export const searchchanpin = (stype) => {
let list={};
stype.map(item=>{
console.log(item);
list=item
})
var str = "?";
for(var key in list){
str = str + key + "=" + list[key] + "&";
}
str = str.substr(0,str.length-1);
var data = {
petType:stype,
page:1,
row:10
}
// return fetch('product/query?petType='+stype+'&categoryName='+categoryName+'&tagUsedAge='+tagUsedAge+'&tagFunction='+tagFunction+'&tagBreed='+tagBreed, data, 'POST' )
return fetch('product/query'+ str, data, 'POST' )
}
// var str = "?";
// for(var key in data){
// str = str + key + "=" + data[key] + "&";
// }
// str = str.substr(0,str.length-1);
//查询订单
export const userindent = (phoneNumber,orderNumber,) => {
var data = {