From b67734b6ce807d4beb61c5435bf161e2ba62969d Mon Sep 17 00:00:00 2001 From: "952108534@qq.com" <952108534@qq.com> Date: Tue, 18 Jan 2022 21:50:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BA=A7=E5=93=81=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rc-busness/ajax/getData.js | 24 +- rc-busness/assets/css/global.less | 3 +- rc-busness/assets/css/product-list.less | 102 +- rc-busness/assets/css/search.less | 112 +- .../pages/productdetails/productlist.vue | 319 ++-- rc-busness/pages/usersearch/search.vue | 1291 ++++++++++------- 6 files changed, 1191 insertions(+), 660 deletions(-) diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index 88f6404c..0c1a5e5d 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -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' ) } diff --git a/rc-busness/assets/css/global.less b/rc-busness/assets/css/global.less index c3305061..edefb690 100644 --- a/rc-busness/assets/css/global.less +++ b/rc-busness/assets/css/global.less @@ -378,7 +378,8 @@ img, picture { } .ts-scrollable{ li{ - width: 4.125rem; + // width: 4.125rem; + padding: 0 0.62rem; height: 1.625rem; margin-left: .5rem; font-size:.75rem; diff --git a/rc-busness/assets/css/product-list.less b/rc-busness/assets/css/product-list.less index 3490328c..cf1e3bef 100644 --- a/rc-busness/assets/css/product-list.less +++ b/rc-busness/assets/css/product-list.less @@ -16,12 +16,31 @@ ul li ol li em strong i { //rc-main end } + //手机端 @media screen and (max-width: 768px) { + .usercontentshow{ position: relative; + .userrccat{ + width: 32%; + height: 34px; + background: #ffffff; + border-radius: 100px; + display: flex; + align-items: center; + justify-content: center; + margin-left: 0; + font-size: 12px; + margin-right: 0.2rem; + img { + width: 24px; + height: 16px; + } + border: 2px solid #d7d7d7; + } } .online{height:.08rem;} .rc-mubu{ @@ -96,6 +115,25 @@ ul li ol li em strong i { height: 16px; } } + .userrccat{ + width: 32%; + height: 34px; + background: #ffffff; + border-radius: 100px; + display: flex; + align-items: center; + justify-content: center; + margin-left: 0; + font-size: 14px; + span { + margin-left: 3px; + } + img { + width: 24px; + height: 16px; + } + border: 2px solid #E2001A; + } } } @@ -233,14 +271,60 @@ ul li ol li em strong i { } } */ + .ts-scrollable{ + .useractive{ + width: 126px; + height: 36px; + border: 2px solid #E1001A; + border-radius: 100px; + } + .userunactive{ + width: 126px; + height: 36px; + background: #FFFFFF; + border: 2px solid #D7D7D7; + opacity: 1; + border-radius: 100px; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.14rem; + img{ + width: 24px; + height: 16px; + display: block; + max-width: 100%; + } + + } + } + } //pc端 @media screen and (min-width: 768px){ + .userrccat{ + width: 327px; + height: 48px; + border-radius: 30px; + background: #ffffff; + border-radius: 100px; + display: flex; + align-items: center; + justify-content: center; + font-size: 14px; + margin-left: 16px; + + img { + width: 24px; + height: 16px; + } + border: 2px solid #d7d7d7; + } .usersearch { margin: 0 auto; overflow: hidden; - margin-top: 5rem; + margin-top: 2.6rem; } .online{ width:100%; @@ -457,4 +541,20 @@ border-radius: 30px; } } */ +.ts-scrollable-container{ + overflow-y: hidden; + overflow-x: clip; + width: 100%; + h2{ + display: flex; + align-items: center; + width: 4%; + } + .ts-scrollable{ + overflow-y: hidden; + overflow-x: clip; + width: 100%; + } + } + } \ No newline at end of file diff --git a/rc-busness/assets/css/search.less b/rc-busness/assets/css/search.less index 86ff520b..5b777d36 100644 --- a/rc-busness/assets/css/search.less +++ b/rc-busness/assets/css/search.less @@ -13,11 +13,15 @@ ul li ol li em strong i { .rc-main { position: relative; margin-top: 5.25rem; + .usersearch { width: 100%; margin: 0 auto; overflow: hidden; margin-top: 20px; + .rc-padding--md{ + padding: 0; + } } .active{ border: 2px solid #E2001A; @@ -34,6 +38,41 @@ ul li ol li em strong i { } //手机端 @media screen and (max-width: 768px) { + .rc-button + { + display: flex; + justify-content: center; + font-size: 14px; + width: 100%; + box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1); + height: 80px; + align-items: center; + span + { + width: 160px; + height: 48px; + border: 2px solid #E2001A; + border-radius: 30px; + display: flex; + align-items: center; + justify-content: center; + color: #E2001A; + } + em{ + font-style: normal; + width: 164px; + height: 48px; + background: #E2001A; + cursor: pointer; + border-radius: 30px; + display: flex; + align-items: center; + justify-content: center; + color: #FFFFFF; + margin-left: 40px; + } + } + .active{ border: 2px solid #E2001A; color: #E2001A; @@ -48,6 +87,9 @@ ul li ol li em strong i { } //搜索 .usersearch { + .ts-standard-btn{ + display: none; + } strong{ font-size: 18px; color: #333333; @@ -83,7 +125,10 @@ strong{ margin: 0 auto; color: #333333; margin-top: 1.5rem; - + h2{ + font-size: 18px; + font-weight: bold; + } span { font-size: 14px; color: #666666; @@ -93,7 +138,6 @@ strong{ } // 热门搜索 .rc-variety { - margin-top: 1.06rem; ul { display: flex; align-items: center; @@ -184,7 +228,12 @@ margin-left: 0.18rem; font-weight: normal; } } - + .rc-padding--md{ + padding: 0; + } + h2{ + margin-left: 0; + } } @@ -286,7 +335,7 @@ border-radius: 100px; h2 { font-size: 18px; color: #333333; - margin-left: 12px; + font-weight: bold; } .ts-scrollable{ margin-top: 1rem; @@ -324,6 +373,30 @@ border-radius: 100px; } //pc端 @media screen and (min-width: 768px){ + + /deep/.el-dialog__header { + padding: 0; + margin: 0; + } + /deep/.el-dialog__body { + + } + .ts-scrollable-container{ + // overflow-y: hidden; + // overflow-x: clip; + // margin-top: 0; + h2{ + display: flex; + align-items: center; + width: 6%; + } + .ts-scrollable{ + // overflow-y: hidden; + // overflow-x: clip; + // width: 100%; + } + } + strong{ font-size: 26px; color: #333333; @@ -351,17 +424,19 @@ cursor: pointer; } /deep/.el-dialog { width: 920px; - height: 570px; background: #FFFFFF; } /deep/.van-search__action{ display: block; } .rc-search { - width: 100%; - text-align: center; - font-size:1.25rem ; - color: #666666; + width: 4.31rem; + height: 2rem; + background: #e1001a; + border-radius: 2rem; + text-align: center; + color: white; + font-size:0.87rem ; } .rc-productcat { display: flex; @@ -445,7 +520,8 @@ margin-left: 8px; justify-content: center; font-size: 16px; width: 100%; - padding: 40px 0 40px 0; + margin-top: 35px; + span { width: 160px; @@ -505,17 +581,28 @@ border-radius: 30px; } .form-search { width: 100%; - height: 110px; + display: flex; + align-items: center; + .ts-standard-btn{ + + } + .rc-search{ + display: none; + } + } /deep/.van-search__content--square{ background: white; } .van-search__content--square{ - height: 110px; display: flex; align-items: center; justify-content: center; background: white; + border: 1px solid #D7D7D7; + height: 80px; + width: 1200px; + border-radius: 200px; } /deep/.van-field__left-icon { @@ -525,7 +612,6 @@ border-radius: 30px; } /deep/.van-field__body { - height: 110px; } diff --git a/rc-busness/pages/productdetails/productlist.vue b/rc-busness/pages/productdetails/productlist.vue index d4ec3058..46c7d047 100644 --- a/rc-busness/pages/productdetails/productlist.vue +++ b/rc-busness/pages/productdetails/productlist.vue @@ -1,5 +1,10 @@