From abd4ea6a6bb00f4fd70084c79c07d28689e05549 Mon Sep 17 00:00:00 2001 From: Vion Date: Tue, 11 Jan 2022 20:36:54 +0800 Subject: [PATCH] Merged 0 version --- rc-busness/assets/css/global.less | 4 +- rc-busness/assets/css/login.less | 270 ++++++++++++++++++ rc-busness/components/header.vue | 2 +- rc-busness/pages/index.vue | 89 +++--- rc-busness/pages/personal/mypersonal.vue | 85 +++--- rc-busness/pages/productdetails/producted.vue | 14 +- .../pages/productdetails/productlist.vue | 142 +++++++-- rc-busness/pages/usersearch/search.vue | 31 +- 8 files changed, 498 insertions(+), 139 deletions(-) create mode 100644 rc-busness/assets/css/login.less diff --git a/rc-busness/assets/css/global.less b/rc-busness/assets/css/global.less index a3fdaa94..7802d729 100644 --- a/rc-busness/assets/css/global.less +++ b/rc-busness/assets/css/global.less @@ -205,8 +205,8 @@ img, picture { color: #666666; } .tuntop{ - width: 100%; - height: 60px; + width: 1.25rem; + height: auto; background: #FFFFFF; box-shadow: 0px 0px 6px rgba(0, 0, 0, 0.1); opacity: 1; diff --git a/rc-busness/assets/css/login.less b/rc-busness/assets/css/login.less new file mode 100644 index 00000000..f785969b --- /dev/null +++ b/rc-busness/assets/css/login.less @@ -0,0 +1,270 @@ +// 手机端 +@media screen and(min-width: 320px) and(max-width:768px) { +.van-field-one{ + width: 335px; + background: #F6F6F6; + border-radius: 4px; + margin: 0 auto; + } + .van-field-two{ + margin: 0 auto; + width: 335px; + height: 48px; + background: #F6F6F6; + margin: 0 auto; + border-radius: 4px; + margin-top: 24px; + } + .usecheck{ + display: flex; + text-align: left; + width: 335px; + margin: 0 auto; + align-items: center; + margin-top: 18px; + + } + .container { + font-size: 0.1rem; + .van-field__body { + border-bottom: 1px solid red; + } + .content { + margin-top: 24px; + } + .userfoget { + font-size: 14px; + color: #333333; + border-bottom: 1px solid #333333; + margin-left: 20px; + } + .rc-header { + text-align: center; + } + .rc-header span:first-of-type { + margin-right: 60px; + } + .rc-header span:last-child { + margin-right: 20px; + } + .active { + font-size: 18px; + color: #666666; + } + .unactive { + font-size: 18px; + color: #999999; + } + .rc-use { + width: 155px; + height: 48px; + opacity: 1; + border-radius: 30px; + outline: none; + border: none; + border: 2px solid #e1001a; + color: #e1001a; + font-size: 14px; + } + .rc-user { + width: 100%; + display: flex; + align-items: center; + margin-top: 40px; + } + .userbutton { + width: 335px; + height: 48px; + background: #e2001a; + opacity: 1; + border-radius: 30px; + outline: none; + border: none; + margin: 0 auto; + } + van-button { + width: 335px; + height: 48px; + background: #e2001a; + opacity: 1; + border-radius: 30px; + } + input { + border: none; + outline: none; + } + button { + outline: none; + border: none; + list-style: none; + background: none; + } + .rc-center { + font-size: 30px; + color: #333333; + text-align: center; + } + .rc-center input { + color: #999999; + font-size: 14px; + } + .userlogin { + width: 92%; + margin: 0 auto; + } + .rc-button { + font-size: 14px; + width:335px; + display: flex; + align-items: center; + justify-content: space-between; + margin: 0 auto; + color: #333333; + } + .rc-button span { + border-bottom: 1px solid #333333; + } + .rc-button span { + margin-left: 20px; + margin-top: 24px; + } + .rc-button span:last-child { + margin-right: 20px; + display: block; + } + } +} +// /* 最小768px最大1920 *pc端/ +@media screen and (min-width: 768px) and (max-width: 1920px) { + .usecheck{ + display: flex; + text-align: left; + width: 395px; + margin: 0 auto; + align-items: center; + margin-top: 18px; + + } + /deep/ + .van-field-one{ + width: 395px; +height: 48px; +background: #F6F6F6; +border-radius: 4px; +margin: 0 auto; + } + .van-field-two{ + margin: 0 auto; + width: 395px; +height: 48px; +background: #F6F6F6; +margin: 0 auto; +border-radius: 4px; +margin-top: 24px; + } + .container { + .content { + margin-top: 24px; + } + .userfoget { + font-size: 14px; + color: #333333; + border-bottom: 1px solid #333333; + margin-left: 20px; + } + .rc-header { + text-align: center; + } + .rc-header span:first-of-type { + margin-right: 60px; + } + .rc-header span:last-child { + margin-right: 20px; + } + .active { + font-size: 0.1rem; + color: #666666; + } + .unactive { + font-size: 0.1rem; + color: #999999; + } + .rc-use { + width: 1.55rem; + height: 0.48rem; + opacity: 1; + border-radius: 0.15rem; + border: 2px solid #e1001a; + color: #e1001a; + font-size: 0.14rem; + background: white; + + } + .rc-user { + width: 100%; + display: flex; + align-items: center; + margin-top: 40px; + } + .userbutton { + width: 3.8rem; + height: 0.48rem; + background: #e2001a; + border-radius: 0.15rem; + outline: none; + border: none; + margin: 0 auto; + } + van-button { + width: 335px; + height: 48px; + background: #e2001a; + opacity: 1; + border-radius: 30px; + } + + input { + border: none; + outline: none; + } + button { + outline: none; + border: none; + list-style: none; + background: none; + } + .rc-center { + font-size: 30px; + color: #333333; + text-align: center; + } + .rc-center input { + color: #999999; + font-size: 14px; + } + .userlogin { + width: 92%; + margin: 0 auto; + } + .rc-button { + font-size: 14px; + width:395px; + display: flex; + align-items: center; + justify-content: space-between; + margin: 0 auto; + color: #333333; + } + .rc-button span { + border-bottom: 1px solid #333333; + } + .rc-button span { + margin-left: 20px; + margin-top: 24px; + } + .rc-button span:last-child { + margin-right: 20px; + display: block; + } + } +} \ No newline at end of file diff --git a/rc-busness/components/header.vue b/rc-busness/components/header.vue index c3ae6851..b362dc1e 100644 --- a/rc-busness/components/header.vue +++ b/rc-busness/components/header.vue @@ -177,7 +177,7 @@ Royal Canin Logo diff --git a/rc-busness/pages/index.vue b/rc-busness/pages/index.vue index 658871fe..53c8f01e 100644 --- a/rc-busness/pages/index.vue +++ b/rc-busness/pages/index.vue @@ -630,7 +630,7 @@ import unlogin from "~/components/unlogin.vue"; import tabs from "@/components/tabs.vue"; import '@vant/touch-emulator'; - import { userquery,postCourseId,biaomessage,userque } from "../ajax/getData"; + import { userquery,postCourseId,biaomessage,userque,searchchanpin } from "../ajax/getData"; const settings = require("@/config"); export default { middleware: 'metaTitle', @@ -640,10 +640,12 @@ return{ processinformation:[], catshi:[], + userstype:'', userunlogin:false, searchBar:true, usermessage:[], catgan:[], + userserachlist:[{}], doggan:[], dogtype:[ { @@ -656,14 +658,7 @@ { title: "老年犬", }, - // { - // title: "品种猫", - - // }, - // { - // title: "亚健康", - - // }, + ], dogshi:[], catlist:[], @@ -970,14 +965,22 @@ activeInde3:0, }, methods:{ userdog(item,index){ - this.dogmessage(index) + this.userstype=1; + let petType={ + petType:1, + name:index, + } + for(let i =0;i=0) + if((scrolltop-fixedCatbarSeperator.offsetTop)>0) { this.gotop = true this.searchBar=false @@ -1025,37 +1028,44 @@ activeInde3:0, }, 10); }, async courseId(item) { - console.log(item); - console.log(this.usermessage); let data = await postCourseId(this.productCode,1,this.usermessage.data.id,this.usermessage.data.mobile,item.picFile,item.name,item.basePrice,item.specifications); if(data){ this.productlist=data; } - console.log(data); }, //请求猫 - async catmessage() { - let data = await biaomessage(0); - + async catmessage(stype) { + let data=[]; + if(stype==undefined||stype==null){ + data = await biaomessage(0); + }else{ + data = await biaomessage(this.userserachlist); + } if(data){ - console.log(data); this.catlist=data; let userlist=[]; userlist=data.slice(0,6); - console.log(userlist); this.catshi=userlist; this.catgan=userlist; + + } }, //请求犬 - async dogmessage(name) { - let data = await biaomessage(1,name); + async dogmessage(stype) { + let data=[]; + if(stype==undefined||stype==null){ + + data = await biaomessage(1); + }else{ + data = await biaomessage(this.userserachlist); + } if(data){ let userlist=[]; userlist=data.slice(0,6); - this.doglist=data; + this.doglist=data; this.doggan=userlist; this.dogshi=userlist; } @@ -1079,7 +1089,6 @@ activeInde3:0, //请求处方量信息数据 async userchufang() { - console.log("-----"); let list=[]; let data = await userque(); if(data){ @@ -1089,27 +1098,38 @@ activeInde3:0, } - console.log(data); }, //点击请求处方量标签信息数据 async userquery(item) { - console.log("-----"); let data = await userquery(item); if(data){ this.processinformation=data; - console.log(this.processinformation); - console.log(data); } - console.log(data); - }, + }, + //处方用粮筛选 userclick(item,index){ this.userquery(index) }, + //全价猫湿粮筛选 + catclick(item,index){ + this.userstype=0; + let petType={ + petType:0, + name:index, + } + for(let i =0;i

服务工具

-
+
{{ item.title }} @@ -186,38 +186,42 @@ export default { }, methods: { userinter(){ - console.log(this.userid); - if(this.userid!==null||this.userid!==undefined){ - this.$router.push({ + let user= localStorage.getItem("userInfo"); + if(user==undefined||user==null||user==''){ + this.$message({ + type: 'warning', + message: '您还未登录' + }); + return + + }else{ + this.$router.push({ path: "/personal/integral/", query: { stype: 1, }, }); - }else{ - this.$message({ - type: 'warning', - message: '您还未登录' - }); - return } }, findall(){ console.log('PPP'); console.log(this.userid.length); - if(this.userid!==null||this.userid!==undefined){ - this.$router.push({ + + let user= localStorage.getItem("userInfo"); + if(user==undefined||user==null||user==''){ + this.$message({ + type: 'warning', + message: '您还未登录' + }); + return + + }else{ + this.$router.push({ path: "/personal/useraddress/", query: { stype: 0, }, }); - }else{ - this.$message({ - type: 'warning', - message: '您还未登录' - }); - return } }, @@ -225,9 +229,17 @@ userinter(){ obligation(item,index){ console.log(index); console.log(item); + let user= localStorage.getItem("userInfo"); + if(user==undefined||user==null||user==''){ + this.$message({ + type: 'warning', + message: '您还未登录' + }); + return + - if(this.userid!==null||this.userid!==undefined){ - if(item.title=='待付款'){ + }else{ + if(item.title=='待付款'){ this.$router.push({ path: "/personal/useraddress", query: { @@ -253,13 +265,6 @@ obligation(item,index){ }, }); } - - }else{ - this.$message({ - type: 'warning', - message: '您还未登录' - }); - return } }, @@ -299,12 +304,21 @@ obligation(item,index){ this.dialogInfo1=false; } }, - openaddress(index){ - console.log(index); - if(this.userid!==null||this.userid!==undefined){ - if(index==2){ + openaddress(item,index){ + console.log(item,index); + let user= localStorage.getItem("userInfo"); + if(user==undefined||user==null||user==''){ + console.log('---='); + this.$message({ + type: 'warning', + message: '您还未登录' + }); + return + + }else{ + if(index==2){ this.$router.push({ - path: `/useraddress/openaddress/` + path: `/personal/useraddress/` }) console.log('这是地址的跳转'); @@ -322,13 +336,6 @@ this.$router.push({ } - }else{ - console.log('---='); - this.$message({ - type: 'warning', - message: '您还未登录' - }); - return } }, diff --git a/rc-busness/pages/productdetails/producted.vue b/rc-busness/pages/productdetails/producted.vue index 5e259bc5..0ff97258 100644 --- a/rc-busness/pages/productdetails/producted.vue +++ b/rc-busness/pages/productdetails/producted.vue @@ -214,7 +214,7 @@ export default { productCode:'',//商品code productlist:[], userbuy:true, - sales_num:1, + sales_num:1, usernewlist: [ { price: "30", @@ -538,9 +538,18 @@ usertanchu(item,orderm){ }, userget(){ - this.userdraw(this.usermessage.data.mobile); + + + let user= localStorage.getItem("userInfo"); + if(user==undefined||user==null||user==''){ + this.dialogInfo2=true; + return + }else{ + this.userdraw(this.usermessage.data.mobile); this.alldrawlist(this.usermessage.data.id); this.dialogInfo1=true; + } + }, selectsearch(item, index) { @@ -554,6 +563,7 @@ usertanchu(item,orderm){ }; +