From 847e27bc4a270588763cbf46b5270b0e6f37cfb1 Mon Sep 17 00:00:00 2001 From: Vion Date: Mon, 17 Jan 2022 16:14:32 +0800 Subject: [PATCH] Index updated --- rc-busness/ajax/getData.js | 47 ++++---- rc-busness/assets/css/global.less | 26 ++++- rc-busness/assets/css/index.less | 171 +++++++++++++++++------------- rc-busness/components/header.vue | 50 +++++++-- rc-busness/pages/index.vue | 135 +++++++++++------------ 5 files changed, 252 insertions(+), 177 deletions(-) diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index b1cfa7e2..d5f33740 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -200,32 +200,27 @@ export const userque = (stype) => { //标品全部信息 -export const biaomessage = (stype,name) => { - console.log(stype); - if(stype.length>1){ - console.log("========"); - let list={}; - stype.map(item=>{ - console.log(item); - list=item - }) - var str = "?"; - for(var key in list){ - str = str + key + "=" + list[key] + "&"; - } - stype = str.substr(0,str.length-1); - var data = { - page:1, - row:10 - } - return fetch('product/query'+stype, data, 'POST' ) - }else{ - console.log('-=='); - return fetch('product/query?petType='+stype,data, 'POST' ) - - } - - +export const biaomessage = (stype,name,curPage,curRow) => { + if(!curPage) + curPage=1; + if(!curRow) + curRow=10; + let queryTail='&page='+curPage+'&rows='+curRow; + if(stype.length>1){ + let list={}; + stype.map(item=>{ + console.log(item); + list=item + }) + var str = "?"; + for(var key in list){ + str = str + key + "=" + list[key] + "&"; + } + stype = str.substr(0,str.length-1); + return fetch('product/query'+stype+queryTail, '', 'POST' ) + }else{ + return fetch('product/query?petType='+stype+queryTail, '', 'POST' ) + } } export const searchchanpin = (stype) => { diff --git a/rc-busness/assets/css/global.less b/rc-busness/assets/css/global.less index 4b86db4f..9852cece 100644 --- a/rc-busness/assets/css/global.less +++ b/rc-busness/assets/css/global.less @@ -39,8 +39,7 @@ img, picture { flex-wrap: wrap; justify-content: space-evenly; &:after{ - content:""; - width:154px; + } li{ border: 1px solid #D7D7D7; @@ -366,17 +365,25 @@ img, picture { display:block; li{ max-width:20rem; - margin-right:.9rem; - margin-left:.9rem; + //margin-right:.875rem; + margin-left:2.2vw; .rc-column{ span{ font-size:1.875rem; height: 5.2rem; } } + &:nth-child(4n+1){ + margin-left:0; + } + &:nth-child(4n){ + //margin-right:0; + } } img{ width:20rem; + max-width:320px; + min-width:160px; } } .ts-right-arr { @@ -508,4 +515,15 @@ img, picture { .rc-xl-down { display: none!important; } +} +@media screen and (min-width: 769px) and (max-width: 1370px) +{ + .ts-product-list { + display:flex; + justify-content: space-between; + li{ + margin-left:0; + margin-right:0; + } + } } \ No newline at end of file diff --git a/rc-busness/assets/css/index.less b/rc-busness/assets/css/index.less index c6d0c550..b82d3f0b 100644 --- a/rc-busness/assets/css/index.less +++ b/rc-busness/assets/css/index.less @@ -5,6 +5,36 @@ /deep/.van-swipe__indicator--active{ background-color: #E1001A; } +.rc-ma{ + .ul-zhuan{ + li{ + background: unset;; + img{ + border-radius: 50%; + } + &.active { + img{ + border: 3px solid #E2001A; + } + color: #E2001A; + + } + &.unactive { + color: #444444; + img{ + border: 3px solid #D7D7D7; + } + } + } + } +} +.uservideo{ + overflow: hidden; + video{ + height:100%; + width:auto; + } +} @media screen and (max-width:768px){ .ul-dog{ display: none; @@ -24,16 +54,14 @@ display: block; } img{ - width: 0.64rem; - height: 0.64rem; + width: 4rem; + height: 4rem; display: block; } li{ display: inline-block; margin-left: 0.20rem; - width: 0.64rem; text-align: center; - height: 0.64rem; background: #F6F6F6; border-radius: 50%; opacity: 1; @@ -261,12 +289,7 @@ li{ display: inline-block; margin-left: 1.25rem; - width: 4rem; text-align: center; - height: 4rem; - background: #F6F6F6; - border-radius: 50%; - opacity: 1; } } @@ -281,15 +304,16 @@ } } .active { - font-size: 0.14rem; - border: 1px solid red; - color: red; - + font-size: 0.14rem; + img{ + border-width: 1px; + } } .unactive { - font-size: 0.14rem; - color: #444444; - border: 1px solid #D7D7D7; + font-size: 0.14rem; + img{ + border-width: 1px; + } } // .usermain{ @@ -412,35 +436,33 @@ object-fit: cover; margin-top: 1rem; } } -.uservideo{ -width: 35rem; -height: 31.6rem; -display: block; -border: 1px solid red; - -} -.userleft{ -position: absolute; -top: 50%; -left:0; -margin-top: -.72rem; -img{ - width: .69rem; - height: 1.38rem; - display: block; -} -} -.userright{ -position: absolute; -top: 50%; -right:0; -margin-top: -.72rem; -img{ - width: .69rem; - height: 1.375rem; - display: block; -} -} + .uservideo{ + width: 35rem; + height: 31.6rem; + display: block; + } + .userleft{ + position: absolute; + top: 50%; + left:0; + margin-top: -.72rem; + img{ + width: .69rem; + height: 1.38rem; + display: block; + } + } + .userright{ + position: absolute; + top: 50%; + right:0; + margin-top: -.72rem; + img{ + width: .69rem; + height: 1.375rem; + display: block; + } + } } } @@ -495,23 +517,19 @@ img{ flex-wrap: wrap; flex-direction: row; span{ - margin-top: 2.5rem; + margin-top: 1vw; display: block; } img{ - width: 9.5rem; - height: 9.5rem; + width: 10vw; + height: 10vw; display: block; } li{ cursor: pointer; font-size: 16px; - width: 9.875rem; text-align: center; - height: 9.875rem; - background: #F6F6F6; - border-radius: 50%; - margin-left:1.25rem; + margin-left:1.3vw; } } @@ -526,8 +544,6 @@ img{ } .usermain{ - margin-top: 2.5rem; - padding-bottom: 2.82rem; .ul-dog{ width: 100%; display: flex; @@ -594,17 +610,18 @@ margin-left: 2.5rem; } } } -.active { - font-size: 1rem; - border: 3px solid red; - color: red; - -} -.unactive { - font-size: 1rem; - color: #444444; - border: 1px solid #D7D7D7; -} + .active { + font-size: 1rem; + img{ + border-width: 3px; + } + } + .unactive { + font-size: 1rem; + img{ + border-width: 1px; + } + } .rc-maa{ ul{ width: 100%; @@ -636,15 +653,12 @@ border-radius: 50%; } - .userselection { - font-size: 0.16rem; - -color: #E2001A; - -} + .userselection { + font-size: 0.16rem; + color: #E2001A; + } .unselection { font-size: 0.16rem; - } .rc-usermessage{ span{ @@ -654,3 +668,14 @@ color: #E2001A; } } } + +@media screen and (min-width:600px) and (max-width:768px) +{ + .ul-zhuan{ + display: flex; + justify-content: space-evenly; + li{ + margin-left:0; + } + } +} \ No newline at end of file diff --git a/rc-busness/components/header.vue b/rc-busness/components/header.vue index 14ef436a..7c10461f 100644 --- a/rc-busness/components/header.vue +++ b/rc-busness/components/header.vue @@ -379,17 +379,19 @@