mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-11-17 16:13:48 +08:00
提交产品以及搜索
This commit is contained in:
@@ -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' )
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user