immediatelyList.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863
  1. <template>
  2. <view class="container commodity-list-wrapper" :style="{'overflow':(showSkeleton? 'hidden' : 'auto'),'height': (showSkeleton? windowHeight + 'px' : 'auto')}">
  3. <view class="good-search clearfix" v-if="searchStatus">
  4. <view class="nav-tab-bar u-f-ajc">
  5. <block v-for="(tab,index) in tabBars" :key='tab.id' :class="{ current: tabIndex === index }">
  6. <view class="tabstyle u-f-ajc" :class="{'addstyle':tabIndex==index}" @tap="changeTab(index)">{{tab.name}}
  7. <i v-if='(tabIndex==index)' class='nav-tab-line iconfont icon-gou'></i>
  8. </view>
  9. </block>
  10. </view>
  11. <view class="search-from name">
  12. <text class="iconfont icon-iconfonticonfontsousuo1"></text>
  13. <input class="input"
  14. type="text"
  15. focus
  16. confirm-type="search"
  17. v-model="searchInputVal"
  18. placeholder="请输入商品关键词"
  19. @input="onShowClose"
  20. @confirm="searchOpertor(tabIndex)"
  21. maxlength="20"/>
  22. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
  23. </view>
  24. <view class="search-btn" :class="tabIndex">
  25. <button class="search-btn" type="default" @click.stop="searchOpertor(tabIndex)" >搜索</button>
  26. </view>
  27. </view>
  28. <list-skeleton v-if="showSkeleton"></list-skeleton>
  29. <view class="empty-container" v-if="isShowEmpty" >
  30. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"></image>
  31. <text class="error-text">{{isShowEmptyText}}</text>
  32. </view>
  33. <!-- 单一商品 -->
  34. <view class="product-container" v-else >
  35. <view :class="tabIndex" v-if="tabIndex === 0" :style="{paddingTop:searchStatus?'128rpx':''}">
  36. <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y v-if="productList.length > 0">
  37. <view v-for="(item,index) in productList" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.productID)" >
  38. <image mode='widthFix' :src="item.mainImage" class="list-img" alt="list-img"></image>
  39. <view class="list-details-info">
  40. <text class="list-details-title">{{item.name}}</text>
  41. <text class="list-details-specs">规格:{{item.unit?item.unit:''}}</text>
  42. <text class="list-details-miniQuantity list-details-specs">起订量:{{item.minBuyNumber}}</text>
  43. <view class="list-details-specs" v-if="item.productCode!=''&&item.productCode!=null">
  44. <view>商品编码:{{item.productCode}}</view>
  45. </view>
  46. <view class="list-details-price">
  47. <view class="list-shop">
  48. <view class="list-price" >
  49. <text class="price-view activity" v-if="item.isShowActFlg">活动价</text>
  50. <text class="price-larger" >¥{{item.retailPrice.toFixed(2)}}</text>
  51. <text class="price-view ladder" v-if="item.ladderPriceFlag == '1'" @click.stop="alertjieti(item)">阶</text>
  52. </view>
  53. <view class="list-price-none" v-if="item.repurchasePriceState">
  54. <text class="price-none">¥{{item.discountPrice}}</text>
  55. <text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
  56. </view>
  57. </view>
  58. <button class="add-cart-btn" @click.stop="operationHanld(item)">数量</button>
  59. </view>
  60. </view>
  61. </view>
  62. <view v-if="showLoading && productList.length > 4 && !showRegularBtn">
  63. <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
  64. <view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
  65. </view>
  66. </scroll-view>
  67. </view>
  68. <!-- 组合商品 -->
  69. <view :class="tabIndex" v-if="tabIndex === 1">
  70. <scroll-view :style="{'height':scrollHeight+'px'}" @scrolltolower="scrolltolower(tabIndex)" scroll-y>
  71. <view class="all-zuhe-list" v-for="(item,index) in combinationProduct" :key="index" :id="item.id" :style="{paddingTop:searchStatus?'112rpx':''}" >
  72. <view class="zuhe_title" :class="index%2==0 ? 'active' : ''">{{item.name}}</view>
  73. <view v-for="(pros,proIndex) in item.combinationProductList" :class="index%2==0 ? 'stylecontent' : ''" :key="proIndex" :id="pros.productID" class="zuhe-list-content commodity-list" >
  74. <view class="list-details-info" >
  75. <text class="list-details-title zuhe_list_text">商品编码:{{pros.productCode}}</text>
  76. <text class="list-details-specs zuhe_list_text" @click.stop="navToDetailPage(pros.productID)">{{pros.name}}</text>
  77. <view class="list-details-price zuhe_list_price">
  78. <view class="list-shop">
  79. <view class="list-price zuhe_list_price" >
  80. <view class="zuhe_price-larger zuhe_list_text" >价格:¥{{pros.retailPrice.toFixed(2)}}</view>
  81. <view :style="{'overflow':'hidden'}">
  82. <view class="price-two zuhe_list_text" >总价:<text class="zuhe_list_zj">¥ {{pros.totalPrice.toFixed(2)}}</text></view>
  83. <text class="price-view ladder zuhe-price-ladder" v-if="pros.ladderPriceFlag == '1'" @click.stop="alertjieti(pros)">阶</text>
  84. <text class="price-view activity" v-if="pros.actStatus == '1'">活动价</text>
  85. </view>
  86. </view>
  87. <view class="list-price-none" v-if="pros.repurchasePriceState">
  88. <text class="price-none">价格:¥{{pros.discountPrice}}</text>
  89. <text class="iconfont icon-wenhao" @click.stop="repurchModel"></text>
  90. </view>
  91. <view class="count">
  92. <view class="number-box">
  93. <view class="iconfont icon-jianhao" @click.stop="changeCountSub(item,pros)"></view>
  94. <input class="btn-input" type="number" maxlength='6' v-model="pros.initProductNum" @blur="changeNnmber($event,item,pros)">
  95. <view class="iconfont icon-jiahao" @click.stop="changeCountAdd(item,pros)"></view>
  96. </view>
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </view>
  102. <view class="foot_conten" >
  103. <view class="zuhe_foot-box">
  104. <view class="">
  105. <text>种类:{{item.productKind}}</text>
  106. <text >总数:{{item.productTotalNum}}</text>
  107. </view>
  108. <text>总额:<text class="foot_text">{{item.productTotalAmount.toFixed(2)}}</text></text>
  109. </view>
  110. <button type="default" class="buycart" @click.stop="operationHanld(item)">加入购物车</button>
  111. </view>
  112. </view>
  113. <view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
  114. <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
  115. <view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
  116. </view>
  117. </scroll-view>
  118. </view>
  119. </view>
  120. <view class="cart-icon" @click="toCartPage">
  121. <text v-if="cartQuantity > 0" class="uni-badge uni-badge-error uni-small uni-badge--small icon-num">
  122. {{cartQuantity >= 100 ? '99+' : cartQuantity}}
  123. </text>
  124. <image src='../../../static/icon-cart-active@3x.png' mode="widthFix"></image>
  125. </view>
  126. <!-- 透明模态层 -->
  127. <modal-layer v-if='isModallayer'></modal-layer>
  128. </view>
  129. </template>
  130. <script>
  131. import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
  132. import modalLayer from "@/components/modal-layer"
  133. import uniStars from '@/components/uni-stars/uni-stars.vue'
  134. import { getSellerProduct,getcombinationProduct } from "@/api/seller.js"
  135. import { mapState,mapMutations } from 'vuex';
  136. export default{
  137. name:'productList',
  138. components:{
  139. listSkeleton,
  140. modalLayer,
  141. uniStars
  142. },
  143. props: {
  144. searchStatus:{
  145. type:Boolean,
  146. default:false
  147. }
  148. },
  149. data(){
  150. return{
  151. isShowClose:false,
  152. searchInputVal:'',
  153. isModallayer:false,
  154. windowHeight: '',
  155. showSkeleton: false,
  156. isShowEmpty: false,
  157. isShowEmptyText: '搜索相关商品',
  158. clubUserId: '',
  159. scrollHeight: '',
  160. productList: [],
  161. combinationProduct:[],
  162. zuheProductList:[],//组合商品列表
  163. showLoading: false,
  164. loadingNow: true,
  165. loadingText: '上拉加载更多',
  166. pageSize: 10,
  167. zuhepageSize:5,
  168. pageNum: 1,
  169. hasNextPage: false,
  170. pullFlag: true,
  171. fromRegularPurchasePage: false,
  172. cartQuantity: 0,
  173. showRegularBtn: false,
  174. isPrecedence:false,
  175. ladderPriceList:[],//是否 阶梯,
  176. tabIndex:0,
  177. goodsList:[],
  178. tabBars:[
  179. {name:'单一',id:'danyi'},
  180. {name:'组合',id:'zuhe'}
  181. ],
  182. isShow: false,
  183. }
  184. },
  185. created() {
  186. this.setScrollHeight();
  187. this.$api.getComStorage('orderUserInfo').then((resolve) =>{
  188. this.clubUserId = resolve.userID
  189. })
  190. },
  191. computed: {
  192. ...mapState(['hasLogin','userInfo'])
  193. },
  194. methods:{
  195. scrolltolower(tabIndex) {
  196. if(this.hasNextPage && this.pullFlag) {
  197. if(tabIndex ==0){
  198. this.getProductAgainInfo(true);
  199. }else if(tabIndex==1){
  200. this.getcombinationProduct(true);
  201. }
  202. }
  203. },
  204. setScrollHeight() {
  205. const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
  206. this.windowHeight = windowHeight - 1;
  207. this.scrollHeight = windowHeight - 1;
  208. },
  209. getProductAgainInfo(loadMore) {
  210. this.showLoading = true;
  211. this.loadingNow = true;
  212. this.loadingText = '加载中';
  213. this.isShowEmpty = false;
  214. if(loadMore) {this.pageNum += 1;}
  215. let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.pageSize,searchWord:this.searchInputVal}
  216. getSellerProduct(params).then(response =>{
  217. this.isShowWrapper = true
  218. const responseData = response.data;
  219. if(responseData.results && responseData.results.length > 0){
  220. this.hasNextPage = responseData.hasNextPage;
  221. this.isShowEmpty = false;
  222. if(loadMore) {
  223. this.productList = [...this.productList,...responseData.results];
  224. } else {
  225. this.productList = [...responseData.results];
  226. this.showSkeleton = false;
  227. }
  228. //价格显示处理
  229. let isActFlg,newProductList=[];
  230. this.productList.map((item, index)=> {
  231. if(item.actStatus == 1){
  232. isActFlg = true
  233. }else if(item.actStatus == 1 && item.ladderPriceFlag == '1'){
  234. isActFlg = true
  235. }else{
  236. isActFlg = false
  237. }
  238. newProductList.push(Object.assign({},item,{isShowActFlg:isActFlg}))
  239. })
  240. this.productList = newProductList
  241. // 防上拉暴滑
  242. this.pullFlag = false;
  243. setTimeout(()=>{
  244. this.pullFlag = true;
  245. },500)
  246. // 底部提示文案
  247. if(this.hasNextPage) {
  248. this.loadingText = '上拉加载更多';
  249. } else {
  250. this.showLoading = true;
  251. this.loadingNow = false;
  252. }
  253. } else {
  254. console.log('111111111')
  255. this.isShowEmpty = true;
  256. this.isShowEmptyText ='暂无相关商品'
  257. }
  258. }).catch(error =>{
  259. this.$util.msg(error.msg,2000);
  260. })
  261. },
  262. searchOpertor(tabIndex){//搜索商品
  263. if(tabIndex == 0){
  264. if(this.searchInputVal == ''){
  265. this.$util.msg('请输入商品关键词',2000)
  266. }else{
  267. this.pageNum = 1
  268. this.showSkeleton = true;
  269. this.getProductAgainInfo();
  270. }
  271. }else{
  272. this.pageNum = 1
  273. this.showSkeleton = true;
  274. this.getcombinationProduct();
  275. }
  276. },
  277. getcombinationProduct(loadMore){//组合搜索商品
  278. this.showLoading = true;
  279. this.loadingNow = true;
  280. this.loadingText = '加载中';
  281. this.isShowEmpty = false;
  282. if(loadMore) {this.pageNum += 1;}
  283. let params = {clubUserId:this.clubUserId,pageNum:this.pageNum,pageSize:this.zuhepageSize,searchWord:this.searchInputVal}
  284. getcombinationProduct(params).then(response =>{
  285. this.isShowWrapper = true
  286. const responseData = response.data;
  287. if(responseData.results && responseData.results.length > 0){
  288. this.hasNextPage = responseData.hasNextPage;
  289. this.isShowEmpty = false;
  290. if(loadMore) {
  291. this.combinationProduct = [...this.combinationProduct,...responseData.results];
  292. } else {
  293. this.combinationProduct = [...responseData.results];
  294. this.showSkeleton = false;
  295. }
  296. // 防上拉暴滑
  297. this.pullFlag = false;
  298. setTimeout(()=>{
  299. this.pullFlag = true;
  300. },500)
  301. // 底部提示文案
  302. if(this.hasNextPage) {
  303. this.loadingText = '上拉加载更多';
  304. } else {
  305. this.showLoading = true;
  306. this.loadingNow = false;
  307. }
  308. } else {
  309. this.isShowEmpty = true;
  310. this.isShowEmptyText ='暂无相关商品'
  311. }
  312. }).catch(error =>{
  313. this.$util.msg(error.msg,2000);
  314. })
  315. },
  316. changeCountAdd(item,pros){//商品数量加加
  317. if(pros.initProductNum == 0){
  318. pros.initProductNum = pros.minBuyNumber
  319. this.processActivityPrice(pros)
  320. }else if(pros.initProductNum >= pros.minBuyNumber){
  321. pros.initProductNum++
  322. this.processActivityPrice(pros)
  323. }
  324. this.totalPeice(item)
  325. this.totalCount(item)
  326. this.totalKind(item)
  327. },
  328. changeCountSub(item,pros){//商品数量减减
  329. if(pros.initProductNum==0){
  330. this.$util.msg(`采购数量不能小于0`,2000);
  331. return
  332. }else if(pros.initProductNum == pros.minBuyNumber){
  333. pros.initProductNum = 0;
  334. this.processActivityPrice(pros);
  335. }else{
  336. pros.initProductNum--
  337. this.processActivityPrice(pros)
  338. }
  339. this.totalPeice(item)
  340. this.totalCount(item)
  341. this.totalKind(item)
  342. },
  343. changeNnmber(e,item,pros){//输入商品数量更新
  344. let _value = e.detail.value;
  345. if(!this.$api.isNumber(_value)){
  346. pros.initProductNum = pros.minBuyNumber
  347. }else if(_value < pros.minBuyNumber){
  348. this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`,2000);
  349. pros.initProductNum = pros.minBuyNumber
  350. }else{
  351. pros.initProductNum = parseInt(e.detail.value)
  352. this.processActivityPrice(pros)
  353. }
  354. this.totalPeice(item)
  355. this.totalCount(item)
  356. this.totalKind(item)
  357. },
  358. totalPeice(item){ //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
  359. let prosPrice=0;
  360. let productsList =[];
  361. productsList=item.combinationProductList;
  362. productsList.forEach(pros=>{
  363. prosPrice+=pros.retailPrice*pros.initProductNum;
  364. item.productTotalAmount = prosPrice;
  365. })
  366. // console.log(prosPrice)
  367. },
  368. totalCount(item){//计算总数量
  369. let prosAllCount=0
  370. let productsList =[];
  371. productsList = item.combinationProductList
  372. productsList.forEach(pros=>{
  373. prosAllCount+=parseInt(pros.initProductNum);
  374. item.productTotalNum = prosAllCount
  375. })
  376. // console.log(prosAllCount)
  377. },
  378. totalKind(item){//计算商品种类
  379. let productsList =[];
  380. let checkList = [];
  381. productsList=item.combinationProductList;
  382. productsList.forEach(pros=>{
  383. if(pros.initProductNum>0){
  384. checkList.push(pros)
  385. item.productKind = checkList.length;
  386. }else{
  387. item.productKind = checkList.length;
  388. }
  389. })
  390. },
  391. processActivityPrice(pros){//单独处理活动价格和阶梯价格
  392. let ladderPriceList = pros.ladderPriceList;
  393. if(pros.ladderPriceFlag == '0' || pros.actStatus == 1){
  394. pros.totalPrice = pros.initProductNum*pros.retailPrice
  395. }else{
  396. ladderPriceList.forEach((item,index)=>{
  397. if(pros.initProductNum>=item.buyNum){
  398. pros.retailPrice = item.buyPrice
  399. pros.totalPrice = pros.initProductNum*item.buyPrice
  400. }
  401. })
  402. }
  403. },
  404. operationHanld(prop){
  405. this.$emit('operationConfim',prop);
  406. },
  407. alertjieti(pros){
  408. this.$emit('alertjietiConfim',pros);
  409. },
  410. changeTab(index){
  411. this.tabIndex = index;
  412. if(index == 0){
  413. this.loadingNow = false
  414. this.isShowEmpty = true;
  415. this.isShowEmptyText ='暂无相关商品'
  416. }
  417. this.$emit('changetab',index);
  418. },
  419. navToDetailPage(id) {
  420. this.isModallayer = true;
  421. this.$api.navigateTo(`/pages/goods/product?id=${id}`);
  422. this.isModallayer = false;
  423. },
  424. toCartPage() {
  425. this.$emit('goCartPage')
  426. },
  427. repurchModel(){
  428. this.$util.modal('','此商品的价格有变化,原来的购买价已不适用','知道了','',false,() =>{})
  429. },
  430. onShowClose () {//输入框失去焦点时触发
  431. if(this.searchInputVal != ''){
  432. this.isShowClose = true
  433. }else{
  434. this.isShowClose = false
  435. }
  436. },
  437. delInputText(tabIndex){//清除输入框内容
  438. if(tabIndex==0){
  439. this.searchInputVal = '';
  440. this.productList =[];
  441. this.isShowClose = false;
  442. this.loadingNow = false;
  443. this.isShowEmpty = true; this.isShowEmptyText ='暂无相关商品'
  444. }else{
  445. this.searchInputVal = '';
  446. this.isShowClose = false;
  447. this.getcombinationProduct();
  448. }
  449. }
  450. }
  451. }
  452. </script>
  453. <style lang="scss">
  454. .all-zuhe-list{
  455. background: #FFFFFF;
  456. }
  457. .foot_conten{
  458. width: 655rpx;
  459. background: #fff;
  460. font-size: 28rpx;
  461. height: 80rpx;
  462. // line-height: 80rpx;
  463. display: inherit;
  464. padding: 10px;
  465. overflow: hidden;
  466. margin: 20rpx auto;
  467. }
  468. .zuhe_foot-box{
  469. float: left;
  470. overflow: hidden;
  471. white-space: nowrap;
  472. // text-overflow: ellipsis;
  473. width: 490rpx;
  474. }
  475. .zuhe_foot-box text{
  476. margin-right: 36rpx;
  477. }
  478. .foot_text{
  479. color: #FF2A2A;
  480. }
  481. .foot_conten .buycart{
  482. width: 162rpx;
  483. height: 64rpx;
  484. background: #EFAF00 !important;
  485. color: #fff;
  486. font-size: 28rpx;
  487. border-radius: 36rpx;
  488. text-align: center;
  489. line-height: 64rpx;
  490. float: right;
  491. }
  492. .price-none{
  493. font-size: 24rpx;
  494. color: #666666;
  495. }
  496. .zuhe_title{
  497. background:#FFFFFF;
  498. height: 76rpx;
  499. font-size: 28rpx;
  500. color: #1675E1;
  501. border-bottom: 4rpx solid #1675E1 ;
  502. line-height: 76rpx;
  503. padding-left: 30rpx;
  504. &.active{
  505. color: #E15616;
  506. border-bottom: 4rpx solid #E15616;
  507. }
  508. }
  509. .icon-gou{
  510. color: #E15616;
  511. position: absolute;
  512. top: 30rpx;
  513. right: 0rpx;
  514. font-weight: bold
  515. }
  516. .addstyle{
  517. background: linear-gradient(-42deg, transparent 28rpx, #E15616 0) top right;
  518. color: #FFFFFF;
  519. }
  520. .tabstyle{
  521. width: 128rpx;
  522. height: 76rpx;
  523. font-size: 26rpx;
  524. display: inline-block;
  525. border-radius: 10rpx;
  526. text-align: center;
  527. line-height: 76rpx;
  528. border: 2rpx solid #EEEEEE;
  529. position: relative;
  530. margin-right: 12rpx;
  531. }
  532. .commodity-list-wrapper {
  533. scroll-view {
  534. height: 100%;
  535. }
  536. .show-more-btn {
  537. width: 276rpx;
  538. height: 52rpx;
  539. line-height: 52rpx;
  540. border: 2rpx solid #D8D8D8;
  541. background: #F7F7F7;
  542. font-size: 26rpx;
  543. margin: 26rpx 0;
  544. position: absolute;
  545. left: 50%;
  546. margin-left: -138rpx;
  547. }
  548. }
  549. .good-search{
  550. height: 80rpx;
  551. width: 100%;
  552. padding: 24rpx;
  553. background: #FFFFFF;
  554. display: flex;
  555. align-items: center;
  556. margin-bottom: 20rpx;
  557. position: fixed;
  558. top: 0;
  559. left: 0;
  560. z-index: 999;
  561. .search-from{
  562. width: 326rpx;
  563. height: 80rpx;
  564. background: #F7F7F7;
  565. border-radius: 14rpx;
  566. float: left;
  567. position: relative;
  568. .input{
  569. // width: 500rpx;
  570. height: 80rpx;
  571. float: left;
  572. line-height: 80rpx;
  573. color: $text-color;
  574. font-size: $font-size-24;
  575. }
  576. .icon-iconfonticonfontsousuo1{
  577. width: 64rpx;
  578. height: 80rpx;
  579. line-height: 80rpx;
  580. text-align: center;
  581. display: block;
  582. font-size: $font-size-38;
  583. float: left;
  584. color: #999999;
  585. }
  586. .icon-shanchu1{
  587. font-size: $font-size-32;
  588. color: #999999;
  589. position: absolute;
  590. width: 120rpx;
  591. height: 80rpx;
  592. line-height: 80rpx;
  593. top: 0;
  594. right: 0;
  595. text-align: center;
  596. z-index: 10;
  597. }
  598. }
  599. .search-btn{
  600. // width: 120rpx;
  601. line-height: 64rpx;
  602. text-align: center;
  603. font-size: $font-size-28;
  604. color: $color-system;
  605. float: left;
  606. background: #FFFFFF;
  607. margin-left: 10rpx;
  608. }
  609. }
  610. .all-type-list-content {
  611. // height: 240rpx;
  612. padding: 24rpx;
  613. background: #fff;
  614. margin-bottom: 2rpx;
  615. display: flex;
  616. flex-direction: row;
  617. box-sizing: content-box;
  618. .list-img {
  619. width: 312rpx;
  620. height: 207rpx !important;
  621. margin-right: 26rpx;
  622. border-radius: 10rpx;
  623. border: 2rpx solid #f3f3f3;
  624. }
  625. }
  626. .zuhe-list-content{
  627. width: 655rpx;
  628. // height: 214rpx;
  629. background: #fff;
  630. border: 2rpx solid #DEF4FF;
  631. display: flex;
  632. flex-direction: row;
  633. box-sizing: content-box;
  634. margin-top: 10rpx;
  635. border-radius: 14rpx;
  636. margin: 10rpx auto;
  637. padding: 20rpx;
  638. &.stylecontent{
  639. border: 2rpx solid #FFF0DE;
  640. }
  641. }
  642. .list-details-info {
  643. width: 100%;
  644. flex-direction: column;
  645. font-size: 26rpx;
  646. position: relative;
  647. .list-details-title {
  648. line-height: 38rpx;
  649. text-overflow: ellipsis;
  650. overflow: hidden;
  651. display: -webkit-box;
  652. -webkit-line-clamp: 2;
  653. line-clamp: 2;
  654. -webkit-box-orient: vertical;
  655. }
  656. .list-details-specs {
  657. width: 100%;
  658. display: inline-block;
  659. margin-top: 8rpx;
  660. color: #666666;
  661. }
  662. .list-details-miniQuantity {
  663. width: 100%;
  664. display: inline-block;
  665. margin-top: 7rpx;
  666. }
  667. }
  668. .list-details-price {
  669. width: 100%;
  670. display: flex;
  671. flex-direction: row;
  672. justify-content: space-between;
  673. .price-icon {
  674. width: 22rpx;
  675. height: 28rpx;
  676. vertical-align: middle;
  677. margin-right: 10rpx;
  678. }
  679. .price-icon + text {
  680. font-size: 25rpx;
  681. vertical-align: middle;
  682. }
  683. .list-login-now {
  684. width: 375rpx;
  685. color: #F8C499;
  686. position: absolute;
  687. bottom: 0;
  688. .p-no{
  689. float: left;
  690. font-size: $font-size-24;
  691. color: $color-system;
  692. margin-right: 10rpx;
  693. }
  694. }
  695. .login-now {
  696. padding: 10rpx 10rpx 10rpx 0;
  697. }
  698. .list-none{
  699. margin-top: 15rpx;
  700. .price-small{
  701. font-size:$font-size-24;
  702. line-height: 40rpx;
  703. color: #FF2A2A;
  704. }
  705. }
  706. .list-shop{
  707. width: 100%;
  708. height: auto;
  709. flex: 6;
  710. overflow: hidden;
  711. .list-price {
  712. // width: 100%;
  713. color: #FF2A2A;
  714. float: left;
  715. line-height:36rpx ;
  716. align-items: center;
  717. justify-content: center;
  718. .price-larger {
  719. margin-top: 20rpx;
  720. font-size: $font-size-30;
  721. display: inline-block;
  722. margin-right: 20rpx;
  723. }
  724. .zuhe_price-larger{
  725. color: #666666;
  726. // float: left;
  727. // margin-right: 85rpx;
  728. }
  729. .price-two{
  730. color: #666666;
  731. float: left;
  732. }
  733. .zuhe_list_zj{
  734. color: #FF2A2A;
  735. }
  736. .price-view{
  737. display: inline-block;
  738. width: 40rpx;
  739. border-radius: 10rpx;
  740. font-size: $font-size-24;
  741. text-align: center;
  742. color: #FFFFFF;
  743. height: 36rpx;
  744. line-height: 36rpx;
  745. margin-right: 8rpx;
  746. &.ladder{
  747. background: linear-gradient(135deg,rgba(255,0,0,1) 0%,rgba(242,143,49,1) 100%);
  748. }
  749. &.activity{
  750. background: linear-gradient(135deg,rgba(128,0,255,1) 0%,rgba(242,49,153,1) 100%);
  751. }
  752. }
  753. }
  754. .zuhe_list_price .price-view{
  755. margin-left:20rpx;
  756. float: left;
  757. margin-top: 5rpx;
  758. }
  759. .zuhe_list_price{
  760. width: 400rpx;
  761. overflow: hidden;
  762. margin-top: 10rpx;
  763. }
  764. .count{
  765. margin-top: 50rpx;
  766. float: right;
  767. border: 1px solid #EEEEEE;
  768. border-radius: 10rpx;
  769. .number-box{
  770. display: flex;
  771. justify-content: center;
  772. align-items: center;
  773. .iconfont{
  774. font-size: $font-size-24;
  775. padding:0 16rpx;
  776. color: $text-color;
  777. text-align: center;
  778. line-height: 48rpx;
  779. font-weight: bold;
  780. }
  781. .btn-input{
  782. width: 100rpx;
  783. height: 48rpx;
  784. line-height: 48rpx;
  785. background: #F8F8F8;
  786. border-radius: 4rpx;
  787. text-align: center;
  788. font-size: $font-size-24;
  789. border-right: 1px solid #EEEEEE;
  790. border-left: 1px solid #EEEEEE;
  791. }
  792. }
  793. }
  794. .list-price-none{
  795. width: 100%;
  796. .price-none{
  797. text-decoration: line-through;
  798. color: #999999;
  799. display: inline-block;
  800. }
  801. .icon-wenhao{
  802. font-size: $font-size-32;
  803. color: #0091FF;
  804. margin-left: 6rpx;
  805. }
  806. }
  807. }
  808. .add-cart-btn {
  809. flex: 4;
  810. width: 156rpx;
  811. height: 64rpx;
  812. line-height: 64rpx;
  813. border-radius: 32rpx;
  814. color: #333333;
  815. font-size: 26rpx;
  816. margin-right: 0;
  817. // background:linear-gradient(135deg,rgba(242,143,49,1) 0%,rgba(225,86,22,1) 100%);
  818. background: #FFFFFF;
  819. border: 2rpx solid #C9C9C9;
  820. }
  821. .zuhe_btn{
  822. float: right;
  823. }
  824. }
  825. .zuhe_list_price{
  826. display: block !important;
  827. }
  828. .cart-icon {
  829. width: 92rpx;
  830. height: 92rpx;
  831. border-radius: 50%;
  832. background: rgba(255, 147, 0, 0.5);
  833. position: fixed;
  834. right: 24rpx;
  835. bottom: 37%;
  836. display: flex;
  837. align-items: center;
  838. justify-content: center;
  839. cursor: pointer;
  840. image {
  841. width: 58rpx;
  842. height: 58rpx;
  843. }
  844. text {
  845. font-size: 28rpx;
  846. position: absolute;
  847. top: -10rpx;
  848. right: 0;
  849. }
  850. }
  851. .zuhe_list_text{
  852. margin-top: 10rpx;
  853. }
  854. </style>