From 83358b4e5bfa49f851ebfafffe6ce23c2c3034c2 Mon Sep 17 00:00:00 2001 From: "952108534@qq.com" <952108534@qq.com> Date: Thu, 27 Jan 2022 15:38:06 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=BD=AE=E6=92=AD=E5=9B=BE?= =?UTF-8?q?=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rc-busness/pages/index.vue | 3429 ++++++++++++++++++++---------------- 1 file changed, 1883 insertions(+), 1546 deletions(-) diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index d4b984eb..cfa54835 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -1,41 +1,53 @@ + //请求犬 + async dogmessage(stype, dataType) { + this.dataLoaded = false; + let data = []; + if (stype == undefined || stype == null) { + data = await biaomessage(1, "", 1, 6); + } else { + data = await biaomessage(this.userserachlist, "", 1, 6); + } + if (data) { + let userlist = []; + //userlist=data.slice(0,6); + if (dataType) { + if (dataType == "Shi") this.dogshi = data; + else if (dataType == "Gan") this.doggan = data; + } else { + this.doglist = data; + //this.doggan=userlist; + //this.dogshi=userlist; + } + this.dataLoaded = true; + } + }, + + selectproduce(item) { + let isRxGoods = false; + let productCode = []; + let mainProductCode = item.productCode; + if (!item.ecPrice && !item.price) { + isRxGoods = 1; + productCode = [item.productCode]; + } else { + for (let i of item.productList) { + productCode.push(i.productCode); + } + } + this.$router.push({ + path: "/productdetails/producted", + query: { + stype: 1, + isRxGoods: isRxGoods, + mainProductCode: mainProductCode, + productCode: productCode.join(","), + }, + }); + }, + + //请求处方量信息数据 + async userchufang(item) { + if (!item) item = this.discounchufang[0].title; + this.dataLoaded = false; + let list = []; + let data = await userque(item, 1, 8); + if (data) { + list = data.slice(0, 8); + this.processinformation = list; + this.chufanlist = data; + this.dataLoaded = true; + } + }, + //点击请求处方量标签信息数据 + async userquery(item) { + this.dataLoaded = false; + let list = []; + let data = await userquery(item); + if (data) { + list = data.slice(0, 8); + this.processinformation = list; + this.dataLoaded = true; + } + }, + //处方用粮筛选 + userclick(item, index) { + this.userchufang(index); + }, + //全价猫干粮筛选 + catclickGan() { + this.userstype = 0; + this.maoganCurIndex = this.maoganCurIndex ? this.maoganCurIndex : 0; + let apiCatAgeType = this.discoun[this.maoshiCurIndex].title; + let petType = { + petType: 0, + tagStatus: 1, //干 + tagUsedAge: apiCatAgeType, + }; + for (let i = 0; i < this.userserachlist.length; i++) { + if (!this.userserachlist.includes(petType)) { + this.userserachlist.push(petType); + } + } + this.catmessage(this.userserachlist, "Gan"); + }, + catclickShi() { + this.userstype = 0; + this.maoshiCurIndex = this.maoshiCurIndex ? this.maoshiCurIndex : 0; + let apiCatAgeType = this.discoun[this.maoshiCurIndex].title; + let petType = { + petType: 0, + tagStatus: 2, //湿 + tagUsedAge: apiCatAgeType, + }; + for (let i = 0; i < this.userserachlist.length; i++) { + if (!this.userserachlist.includes(petType)) { + this.userserachlist.push(petType); + } + } + this.catmessage(this.userserachlist, "Shi"); + }, + userbuy(item) { + let user = localStorage.getItem("userInfo"); + this.courseId(item); + this.$router.push({ + path: "/myorder/userrecord", + }); + }, + + selectGoods(item, index) { + //console.log(item,index); + this.activeIndex = index; + //console.log(item.title); + this.ifadroind(item, index, this.useraindex); + // this.ifAdoid(item,index); + }, + quanshi(item, index) { + this.activeIndex5 = index; + this.userdogShi(); + }, + userdoghot(item, index) { + this.activeIndex6 = index; + this.userdogGan(); + }, + selectGo(item, index) { + this.activeInde2 = index; + }, + selectGoo(item, index) { + this.activeInde3 = index; + }, + }, +}; + \ No newline at end of file