Rx goods modified

This commit is contained in:
Vion 2022-01-22 23:04:56 +08:00
parent 144e0820bf
commit 358f0f66b9
4 changed files with 28 additions and 18 deletions

View File

@ -188,16 +188,14 @@ export const userquery = (stype, ) => {
return fetch('goods?petType='+stype, data, 'POST' ) return fetch('goods?petType='+stype, data, 'POST' )
} }
//处方信息 //处方信息
export const userque = (stype, curPage,curRow) => { export const userque = (goodsName, curPage,curRow) => {
if(!curPage) if(!curPage)
curPage=1; curPage=1;
if(!curRow) if(!curRow)
curRow=10; curRow=10;
let queryTail='page='+curPage+'&rows='+curRow; let queryTail='page='+curPage+'&rows='+curRow;
if(stype) if(goodsName)
queryTail = '?stype='+queryTail+'&'+queryTail; queryTail = '?goodsName='+goodsName;
else
queryTail = '?'+queryTail;
var data = { var data = {
} }
return fetch('goods'+queryTail, data, 'POST' ) return fetch('goods'+queryTail, data, 'POST' )

View File

@ -1164,7 +1164,7 @@
} }
window.addEventListener("scroll", this.handleScroll, true); window.addEventListener("scroll", this.handleScroll, true);
this.userchufang();// this.userchufang();//
this.catmessage();// this.catmessage();//
this.catclickGan(); this.catclickGan();
this.catclickShi(); this.catclickShi();
@ -1468,9 +1468,9 @@
this.dataLoaded=false; this.dataLoaded=false;
let data=[]; let data=[];
if(stype==undefined||stype==null){ if(stype==undefined||stype==null){
data = await biaomessage(0,'',1,6); data = await biaomessage(0,'',1,12);
}else{ }else{
data = await biaomessage(this.userserachlist,'',1,6); data = await biaomessage(this.userserachlist,'',1,12);
} }
if(data){ if(data){
let userlist=[]; let userlist=[];
@ -1546,12 +1546,14 @@
}, },
// //
async userchufang() { async userchufang(item) {
if(!item)
item = this.discounchufang[0].title;
this.dataLoaded=false; this.dataLoaded=false;
let list=[]; let list=[];
let data = await userque(); let data = await userque(item,1,8);
if(data){ if(data){
list=data.slice(0,6); list=data.slice(0,8);
this.processinformation=list; this.processinformation=list;
this.chufanlist=data; this.chufanlist=data;
this.dataLoaded=true; this.dataLoaded=true;
@ -1560,15 +1562,17 @@
// //
async userquery(item) { async userquery(item) {
this.dataLoaded=false; this.dataLoaded=false;
let list=[];
let data = await userquery(item); let data = await userquery(item);
if(data){ if(data){
this.processinformation=data; list=data.slice(0,8);
this.processinformation=list;
this.dataLoaded=true; this.dataLoaded=true;
} }
}, },
// //
userclick(item,index){ userclick(item,index){
this.userquery(index) this.userchufang(index)
}, },
// //
catclickGan(){ catclickGan(){

View File

@ -343,6 +343,7 @@ export default {
activeIndexd: "-1", activeIndexd: "-1",
activeIndexe: "-1", activeIndexe: "-1",
activeIndexf: "-1", activeIndexf: "-1",
inRxGoods:false,
isadrond: true, isadrond: true,
isshow: false, isshow: false,
openshow: false, openshow: false,
@ -527,7 +528,7 @@ export default {
} }
} }
} }
data = await searchchanpin(searchCriteria, usertype, 1, 12); data = await searchchanpin(searchCriteria, usertype, 1, 120);
} }
if (data) { if (data) {
this.rccontair = data; this.rccontair = data;
@ -698,9 +699,12 @@ export default {
tmp.checked=true; tmp.checked=true;
} }
}); });
this.inRxGoods=true;
} }
else else {
this.prefecture[this.rxGoodsIndexPointer].checked=false; this.prefecture[this.rxGoodsIndexPointer].checked=false;
this.inRxGoods=false;
}
}, },
resetAllOptions(){ resetAllOptions(){
let _self = this; let _self = this;
@ -736,7 +740,7 @@ export default {
let isRxGoods=false; let isRxGoods=false;
let productCode = []; let productCode = [];
let mainProductCode = item.productCode; let mainProductCode = item.productCode;
if(!item.ecPrice && !item.price) if(this.inRxGoods)
{ {
isRxGoods=1; isRxGoods=1;
productCode = [item.productCode]; productCode = [item.productCode];

View File

@ -363,6 +363,7 @@ export default {
activeIndexd: "-1", activeIndexd: "-1",
activeIndexe: "-1", activeIndexe: "-1",
activeIndexf: "-1", activeIndexf: "-1",
inRxGoods:false,
isadrond: true, isadrond: true,
isshow: false, isshow: false,
openshow: false, openshow: false,
@ -590,7 +591,7 @@ export default {
} }
} }
} }
data = await searchchanpin(searchCriteria, usertype, 1, 12); data = await searchchanpin(searchCriteria, usertype, 1, 120);
} }
if (data) { if (data) {
this.rccontair = data; this.rccontair = data;
@ -706,9 +707,12 @@ export default {
tmp.checked=true; tmp.checked=true;
} }
}); });
this.inRxGoods=true;
} }
else else {
this.prefecture[this.rxGoodsIndexPointer].checked=false; this.prefecture[this.rxGoodsIndexPointer].checked=false;
this.inRxGoods=false;
}
}, },
resetAllOptions(){ resetAllOptions(){
let _self = this; let _self = this;