提交产品以及搜索

This commit is contained in:
952108534@qq.com
2022-01-18 21:50:16 +08:00
parent becd40d550
commit b67734b6ce
6 changed files with 1191 additions and 660 deletions

View File

@@ -224,14 +224,22 @@ export const biaomessage = (stype,name,curPage,curRow) => {
}
}
export const searchchanpin = (stype) => {
export const searchchanpin = (stype,usertype,curPage,curRow) => {
console.log(stype,usertype);
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='&page='+curPage+'&rows='+curRow;
console.log(stype);
let list={};
stype.map(item=>{
console.log(item);
list=item
})
var str = "?";
var str = "&";
for(var key in list){
str = str + key + "=" + list[key] + "&";
@@ -242,7 +250,7 @@ export const searchchanpin = (stype) => {
row:10
}
return fetch('product/query'+ str, data, 'POST' )
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
}
@@ -294,14 +302,20 @@ export const biaomessa = (stype) => {
return fetch('product/query', data, 'POST' )
}
export const biaome = (stype) => {
export const biaome = (usertype,stype,curPage,rows) => {
if(!curPage)
curPage=1;
if(!rows)
rows=10;
let queryTail='&page='+curPage+'&rows='+rows;
let username='&name='+stype
console.log(stype);
var data = {
name:stype,
rows:10,
page:1,
}
return fetch('product/query?name='+stype,data, 'POST' )
return fetch('product/query?petType='+usertype+username+queryTail,data, 'POST' )
}