search.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759
  1. <template>
  2. <view class="search-container">
  3. <view class="search-main">
  4. <view class="search-tab">
  5. <view class="search-tab-btn" @click="topBubble">
  6. <text>{{ tabValue }}</text>
  7. <text class="iconfont icon-xiangxiajiantou"></text>
  8. </view>
  9. <tui-bubble-popup :show="show" :mask="true" position="absolute" direction="top" @close="topBubble" width="140rpx"
  10. left="10rpx" bottom="0rpx" translateY="100%" triangleRight="60rpx" triangleTop="-22rpx" :maskBgColor="maskBgColor">
  11. <view class="tui-menu-item" @tap="selectTabs(1)">产品</view>
  12. <view class="tui-menu-item" @tap="selectTabs(2)">供应商</view>
  13. <view class="tui-menu-item" @tap="selectTabs(3)">项目仪器</view>
  14. </tui-bubble-popup>
  15. </view>
  16. <view class="gosearch-btn">
  17. <text class="iconfont icon-sousuo"></text>
  18. <input class="input" maxlength="20" :focus="isFocus" type="text" value="" confirm-type="search" @focus="onFocus" @input="onShowClose" @confirm="subMitSearch()" placeholder="请输入搜索关键字" v-model.trim="listQuery.keyword"/>
  19. <text class="iconfont icon-shanchu1" v-if="isShowClose" @click.stop="delInputText()"></text>
  20. </view>
  21. <view class="search-btn" @click="subMitSearch()">搜索</view>
  22. </view>
  23. <view class="search-container-history" v-if="!isShowWrapper">
  24. <view :class="'s-' + themeClass" v-if="serachRecordList.length>0">
  25. <view class="header">
  26. 搜索历史<text class="iconfont icon-shanchu" @click="confirmDetele"></text>
  27. </view>
  28. <view class="list">
  29. <view v-for="(item,index) in serachRecordList" :key="index" @click="keywordsClick(item.searchWord)">{{item.searchWord}}</view>
  30. </view>
  31. </view>
  32. </view>
  33. <view v-else class="commodity-list-wrapper" :style="{'overflow':'auto','height':(listData.length>4? windowHeight + 'px' : 'auto')}">
  34. <scroll-view :style="{'height':(listData.length>4? scrollHeight+'px' : 'auto')}" @scrolltolower="scrolltolower" scroll-y v-if="!showEmpty">
  35. <view v-for="(item,index) in listData" :key="index" :id="item.id" class="all-type-list-content commodity-list" @click.stop="navToDetailPage(item.p_id)">
  36. <image mode='widthFix' :src="item.p_image" class="list-img" alt="list-img"></image>
  37. <view class="list-details-info">
  38. <view class="list-details-title">{{isInterceptHtmlFn(item.p_name)}}</view>
  39. <text class="list-details-specs">规格:{{item.p_unit}}</text>
  40. <view class="list-details-specs" v-if="item.p_code!=''&&item.p_code!=null">
  41. <view>商品编码:{{item.p_code}}</view>
  42. </view>
  43. <view class="list-details-price">
  44. <template v-if="userIdentity == 3">
  45. <view class="floor-item-act" v-if="item.actStatus==1">
  46. <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
  47. {{item.promotions.name}}<text v-if="item.p_price_flag != '1' && item.supplierId === shopId">:¥{{ item.price | NumFormat }}</text>
  48. </view>
  49. <view class="floor-tags" v-else>{{item.promotions.name}}</view>
  50. </view>
  51. <view class="floor-item-act" v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
  52. <view class="floor-tags">阶梯价格</view>
  53. </view>
  54. </template>
  55. <template v-else>
  56. <view class="floor-item-act" v-if="item.actStatus==1">
  57. <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
  58. {{item.promotions.name}}<text v-if="hasLogin && item.p_price_flag != '1'">:¥{{ item.price | NumFormat }}</text>
  59. </view>
  60. <view class="floor-tags" v-else>{{item.promotions.name}}</view>
  61. </view>
  62. <view class="floor-item-act" v-if="item.actStatus ==0 && item.ladderPriceFlag==1">
  63. <view class="floor-tags">阶梯价格</view>
  64. </view>
  65. </template>
  66. <view v-if="hasLogin" class="list-price">
  67. <template v-if="userIdentity == 1">
  68. <text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
  69. <text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  70. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  71. </text>
  72. </template>
  73. <template v-if="userIdentity == 4">
  74. <view class="price-larger" v-if="item.p_price_flag == '1'">
  75. <text class="txt">¥未公开价格</text>
  76. </view>
  77. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  78. <view v-else>
  79. <view class="price-larger" v-if="item.p_price_flag == '2'">
  80. <text class="txt">¥价格仅会员可见</text>
  81. </view>
  82. <text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  83. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  84. </text>
  85. </view>
  86. </template>
  87. <template v-if="userIdentity == 3">
  88. <template v-if="item.supplierId == shopId">
  89. <view class="price-larger" v-if="item.p_price_flag == '1'">
  90. <text class="txt">¥未公开价格</text>
  91. </view>
  92. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  93. <text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  94. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  95. </text>
  96. </template>
  97. <template v-else>
  98. <view class="list-login-now">
  99. <text class="p-no">¥</text>
  100. <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
  101. </view>
  102. </template>
  103. </template>
  104. <template v-if="userIdentity == 2">
  105. <view class="price-larger" v-if="item.p_price_flag == '1'">
  106. <text class="txt">¥未公开价格</text>
  107. </view>
  108. <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
  109. <text v-else class="price-larger" :class="PromotionsFormat(item.promotions) ? 'none' : ''">
  110. ¥{{ (PromotionsFormat(item.promotions) ? item.originalPrice : item.price) | NumFormat}}
  111. </text>
  112. </template>
  113. </view>
  114. <view v-else class="list-login-now">
  115. <text class="p-no">¥</text>
  116. <uni-grader :grade="Number(item.p_price_grade)"></uni-grader>
  117. </view>
  118. </view>
  119. </view>
  120. </view>
  121. <view v-if="showLoading && listData.length > 4">
  122. <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow">{{loadingText}}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view>
  123. <view class="loading-wrapper loading-wrapper-btm" v-else>———<text class="btm-text">已至底部</text>———</view>
  124. </view>
  125. </scroll-view>
  126. <view class="empty-container" v-if="showEmpty">
  127. <image class="empty-container-image" src="https://img.caimei365.com/group1/M00/03/8D/Cmis215XHXWAHCoqAAELHadZ9Xg365.png"></image>
  128. <text class="error-text">抱歉,没有相关商品!</text>
  129. </view>
  130. </view>
  131. <!-- 透明模态层 -->
  132. <modal-layer v-if='isModallayer'></modal-layer>
  133. </view>
  134. </template>
  135. <script>
  136. import { mapState,mapMutations } from 'vuex'
  137. import modalLayer from "@/components/modal-layer"
  138. import uniGrader from '@/components/uni-grade/uni-grade.vue'
  139. import authorize from '@/common/config/authorize.js'
  140. export default {
  141. components: {
  142. modalLayer,
  143. uniGrader
  144. },
  145. data() {
  146. return {
  147. shopId:0,
  148. userID:0,
  149. tabValue:'产品',
  150. themeClass: 'block',
  151. show:false,
  152. userIdentity:'',
  153. searchKeyType:1,
  154. isShowClose:false, //是否显示清空输入框图标
  155. isSearchHistory:false,//是都显示搜索历史
  156. serachRecordList:[],//历史搜索记录
  157. isShowWrapper:false,
  158. isModallayer:false,
  159. isFocus:false,
  160. priceLoading:true,
  161. windowHeight: '',
  162. showEmpty: false,
  163. scrollHeight: '',
  164. listData: [],
  165. productIds:'',//查询价格的商品ID
  166. showLoading: false,
  167. loadingNow: true,
  168. loadingText: '上拉加载更多',
  169. pullFlag: true,
  170. listQuery:{
  171. identity:0,
  172. keyword:'',
  173. sortField:'',
  174. sortType:'',
  175. pageNum: 1,
  176. pageSize: 20,
  177. },
  178. total:0
  179. }
  180. },
  181. onLoad(option) {
  182. console.log(option)
  183. this.$api.getStorage().then((resolve) =>{
  184. this.userID = resolve.userID ? resolve.userID : 0;
  185. this.shopId = resolve.shopID ? resolve.shopID : 0;
  186. this.userIdentity = resolve.userIdentity;
  187. this.listQuery.identity = this.identity;
  188. if(option.keyWord){
  189. this.listQuery.keyword = option.keyWord
  190. this.setSearchHistoryAdd()
  191. this.getListFromServer()
  192. this.isFocus = false
  193. }else{
  194. this.isFocus = true
  195. this.initGetSerachRecord()
  196. }
  197. })
  198. },
  199. filters: {
  200. NumFormat:function(text) {//处理金额
  201. return Number(text).toFixed(2);
  202. },
  203. },
  204. computed: {
  205. ...mapState(['hasLogin','userInfo','identity'])
  206. },
  207. methods:{
  208. initGetSerachRecord(){//查询搜索历史记录
  209. this.ProductService.GetProductSearchHistory({userId:this.userID}).then(response =>{
  210. if(response.code == 0){
  211. this.serachRecordList = response.data
  212. }
  213. })
  214. },
  215. subMitSearch() {//搜索
  216. if (this.listQuery.keyword == '') {
  217. this.$util.msg('请输入搜索关键词',2000);
  218. }else{
  219. switch(this.searchKeyType){
  220. case 1:
  221. this.listData =[]
  222. this.setSearchHistoryAdd()
  223. this.getListFromServer()
  224. this.isFocus = false
  225. break;
  226. case 2:
  227. this.setSearchHistoryAdd()
  228. this.$api.navigateTo(`/pages/search/search-supplier?keyword=${this.listQuery.keyword}`);
  229. break;
  230. case 3:
  231. this.setSearchHistoryAdd()
  232. this.$api.navigateTo(`/pages/search/search-instrument?keyword=${this.listQuery.keyword}`);
  233. break;
  234. }
  235. }
  236. },
  237. scrolltolower() {
  238. if(this.total>this.listData.length && this.pullFlag) {
  239. this.getListFromServer(true);
  240. }
  241. },
  242. getListFromServer(loadMore) {
  243. this.showLoading = true;
  244. this.loadingNow = true;
  245. this.loadingText = '加载中';
  246. this.showEmpty = false;
  247. if(loadMore) {
  248. this.listQuery.pageNum += 1;
  249. }
  250. this.ProductService.GetProductSearchList(this.listQuery).then(response =>{
  251. this.isShowWrapper = true
  252. const resData = JSON.parse(response.data);
  253. const resList = resData.items;
  254. if(resList && resList.length > 0){
  255. this.total = resData.total;
  256. this.showEmpty = false;
  257. if(loadMore) {
  258. this.listData = [...this.listData,...resList];
  259. this.getProductPrice()
  260. } else {
  261. this.listData = [...resList];
  262. this.getProductPrice()
  263. }
  264. // 防上拉暴滑
  265. this.pullFlag = false;
  266. setTimeout(()=>{ this.pullFlag = true; },500)
  267. // 底部提示文案
  268. if(this.totalPage>this.listData.length) {
  269. this.loadingText = '上拉加载更多';
  270. } else {
  271. this.showLoading = true;
  272. this.loadingNow = false;
  273. }
  274. } else {
  275. if(!loadMore) {
  276. this.showEmpty = true;
  277. }
  278. }
  279. }).catch(error =>{
  280. this.$util.msg(error.msg,2000);
  281. })
  282. },
  283. setSearchHistoryAdd(){//添加搜索记录
  284. if (!this.hasLogin) {return false;}
  285. this.ProductService.GetAddProductSearchHistory({userId: this.userID,keyword:this.listQuery.keyword}).then(response =>{
  286. //此为每次搜索同时添加用户的搜索记录
  287. }).catch(error =>{
  288. this.$util.msg(error.msg,2000);
  289. })
  290. },
  291. getProductPrice(){//获取价格
  292. let productIdArr = [];
  293. this.listData.map(item=>{// 0公开价格 1不公开价格 2仅对会员机构公开
  294. productIdArr.push(item.p_id)
  295. })
  296. this.productIds = productIdArr.join(",");
  297. this.ProductService.querySearchProductPrice({userId: this.userID,productIds:this.productIds}).then(response =>{
  298. if (response.data) {
  299. this.listData = this.ReturnNewProducts(this.listData,response.data);
  300. }
  301. this.priceLoading = false;
  302. }).catch(error =>{
  303. this.$util.msg(error.msg,2000)
  304. })
  305. },
  306. ReturnNewProducts(Array,list){//处理对应商品ID的商品价格
  307. let NewArray = []
  308. Array.map(item=>{
  309. for (let i = 0; i < list.length; i++) {
  310. if( item.p_id == list[i].productId ){
  311. NewArray.push(Object.assign(item,list[i]))
  312. }
  313. }
  314. });
  315. return NewArray
  316. },
  317. PromotionsFormat(promo){//促销活动类型数据处理
  318. if(promo!=null){
  319. if(promo.type == 1 && promo.mode == 1){
  320. return true
  321. }else{
  322. return false
  323. }
  324. }
  325. return false
  326. },
  327. onShowClose () {//输入框输入时触发
  328. this.inputEmpty(this.listQuery.keyword)
  329. },
  330. onFocus () { //输入框获取焦点时触发
  331. this.inputEmpty(this.listQuery.keyword)
  332. this.initGetSerachRecord()
  333. },
  334. delInputText () { //清除输入框内容
  335. this.listQuery.keyword = ''
  336. this.isShowClose = false
  337. this.isShowWrapper = false
  338. this.inputEmpty(this.listQuery.keyword)
  339. this.initGetSerachRecord()
  340. },
  341. keywordsClick (item) {//关键词搜索与历史搜索
  342. this.listQuery.keyword = item;
  343. this.isShowClose = true;
  344. this.isFocus = false
  345. this.subMitSearch();
  346. },
  347. confirmDetele() {//清空历史记录
  348. this.$util.modal('提示','确定删除历史记录?','确定','取消',true,() =>{
  349. this.ProductService.GetDeleteProductSearchHistory({userId:this.userID}).then(response =>{
  350. this.$util.msg('删除成功',2000,true,'success')
  351. this.serachRecordList=[];
  352. }).catch(error =>{
  353. this.$util.msg(error.msg,2000)
  354. })
  355. })
  356. },
  357. inputEmpty(val){
  358. this.isShowWrapper = false
  359. if(val != ''){
  360. this.isShowClose = true
  361. this.isFocus = true
  362. }else{
  363. this.isShowClose = false
  364. this.isFocus = true
  365. }
  366. },
  367. isInterceptHtmlFn(text){
  368. let name = this.$reg.interceptHtmlFn(text)
  369. return name
  370. },
  371. navToDetailPage(id) {
  372. this.isModallayer = true;
  373. this.$api.navigateTo(`/pages/goods/product?id=${id}`);
  374. this.isModallayer = false;
  375. },
  376. setScrollHeight() {
  377. const {windowHeight, pixelRatio} = wx.getSystemInfoSync();
  378. this.windowHeight = windowHeight - 1;
  379. this.scrollHeight = windowHeight - 1;
  380. },
  381. toLoginPage() {
  382. let searchLoginType = 'search'
  383. uni.navigateTo({
  384. url:`/pages/login/login?type=${searchLoginType}`
  385. })
  386. },
  387. selectTabs(index){//选择搜索项
  388. this.show = false
  389. this.searchKeyType = index
  390. switch(index){
  391. case 1:
  392. this.tabValue='产品'
  393. break;
  394. case 2:
  395. this.tabValue='供应商'
  396. break;
  397. case 3:
  398. this.tabValue='项目仪器'
  399. break;
  400. }
  401. },
  402. topBubble() {//显隐搜索项
  403. this.show = !this.show;
  404. },
  405. },
  406. onShow() {
  407. this.setScrollHeight();
  408. }
  409. }
  410. </script>
  411. <style lang="scss">
  412. @import "@/uni.scss";
  413. page{
  414. background-color: #F7F7F7 !important;
  415. }
  416. .search-main{
  417. width: 100%;
  418. height: 88rpx;
  419. position: fixed;
  420. top: 0;
  421. left: 0;
  422. background: #FFFFFF;
  423. z-index: 1001;
  424. box-sizing: border-box;
  425. padding: 9rpx 0;
  426. .search-tab{
  427. width: 160rpx;
  428. height: 70rpx;
  429. line-height: 70rpx;
  430. color: #666666;
  431. font-size: $font-size-24;
  432. text-align: center;
  433. float: left;
  434. position: relative;
  435. .icon-xiangxiajiantou{
  436. margin-left: 10rpx;
  437. font-size: $font-size-30;
  438. }
  439. }
  440. .gosearch-btn{
  441. width: 470rpx;
  442. height: 100%;
  443. float: left;
  444. border-radius: 40rpx;
  445. background: #F0F0F0;
  446. margin: 0 auto;
  447. padding:0 20rpx;
  448. font-size: 28rpx;
  449. line-height: 70rpx;
  450. padding-left: 70rpx;
  451. color: #8A8A8A;
  452. background: #F7F7F7;
  453. position: relative;
  454. box-sizing: border-box;
  455. .icon-sousuo{
  456. width: 70rpx;
  457. height: 70rpx;
  458. line-height: 70rpx;
  459. text-align: center;
  460. display: block;
  461. position: absolute;
  462. left: 0;
  463. top: 0;
  464. font-size: 34rpx;
  465. color: #8A8A8A;
  466. z-index: 10;
  467. }
  468. .icon-shanchu1{
  469. font-size: 36rpx;
  470. color: #8A8A8A;
  471. position: absolute;
  472. right: 10rpx;
  473. top: 0;
  474. padding: 0 10rpx;
  475. z-index: 100;
  476. }
  477. .input{
  478. width: 400rpx;
  479. height: 100%;
  480. float: left;
  481. font-size: $font-size-24;
  482. box-sizing: border-box;
  483. padding-right: 66rpx;
  484. }
  485. }
  486. .search-btn{
  487. width: 120rpx;
  488. height: 70rpx;
  489. line-height: 70rpx;
  490. float: right;
  491. text-align: center;
  492. color: #666666;
  493. font-size: $font-size-24;
  494. }
  495. }
  496. .search-container{
  497. padding-top: 96rpx;
  498. }
  499. .s-block{
  500. background: #FFFFFF;
  501. .header{
  502. font-size: 32rpx;
  503. padding:40rpx 24rpx 22rpx 24rpx;
  504. line-height: 42rpx;
  505. font-size: 30rpx;
  506. font-weight: bold;
  507. position: relative;
  508. .icon-shanchu{
  509. font-size: 36rpx;
  510. color: #333333;
  511. float: right;
  512. padding: 0 10rpx;
  513. z-index: 10;
  514. font-weight: normal;
  515. }
  516. }
  517. .list{
  518. display: flex;
  519. flex-wrap: wrap;
  520. padding-bottom: 40rpx;
  521. view{
  522. color: #8A8A8A;
  523. font-size: 24rpx;
  524. box-sizing: border-box;
  525. text-align: center;
  526. height: 48rpx;
  527. line-height: 48rpx;
  528. border-radius: 24rpx;
  529. margin:12rpx;
  530. padding:.0 30rpx;
  531. overflow: hidden;
  532. white-space: nowrap;
  533. text-overflow: ellipsis;
  534. background-color: #F3F3F3;
  535. }
  536. }
  537. }
  538. .s-circle{
  539. margin-top: 30rpx;
  540. .header{
  541. font-size: 32rpx;
  542. padding: 30rpx;
  543. border-bottom: 2rpx solid #F9F9F9;
  544. position: relative;
  545. image{
  546. width: 36rpx;
  547. height: 36rpx;
  548. padding: 10rpx;
  549. position: absolute;
  550. right: 40rpx;
  551. top: 24rpx;
  552. }
  553. }
  554. .list{
  555. display: flex;
  556. flex-wrap: wrap;
  557. padding: 0 30rpx 20rpx;
  558. view{
  559. padding: 8rpx 30rpx;
  560. margin: 20rpx 30rpx 0 0;
  561. font-size: 28rpx;
  562. color: #8A8A8A;
  563. background-color: #F7F7F7;
  564. box-sizing: border-box;
  565. text-align: center;
  566. border-radius: 20rpx;
  567. }
  568. }
  569. }
  570. .wanted-block{
  571. margin-top: 30rpx;
  572. .header{
  573. font-size: 32rpx;
  574. padding: 30rpx;
  575. }
  576. .list{
  577. display: flex;
  578. flex-wrap: wrap;
  579. view{
  580. width: 50%;
  581. color: #8A8A8A;
  582. font-size: 28rpx;
  583. box-sizing: border-box;
  584. text-align: center;
  585. padding: 20rpx 0;
  586. border-top: 2rpx solid #FFF;
  587. border-left: 2rpx solid #FFF;
  588. background-color: #F7F7F7;
  589. overflow: hidden;
  590. white-space: nowrap;
  591. text-overflow: ellipsis;
  592. }
  593. }
  594. }
  595. .wanted-circle{
  596. margin-top: 30rpx;
  597. .header{
  598. font-size: 32rpx;
  599. padding: 30rpx;
  600. }
  601. .list{
  602. display: flex;
  603. flex-wrap: wrap;
  604. padding: 0 30rpx 20rpx;
  605. view{
  606. padding: 8rpx 30rpx;
  607. margin: 20rpx 30rpx 0 0;
  608. font-size: 28rpx;
  609. color: #8A8A8A;
  610. background-color: #F7F7F7;
  611. box-sizing: border-box;
  612. text-align: center;
  613. border-radius: 20rpx;
  614. }
  615. }
  616. }
  617. .commodity-list-wrapper {
  618. scroll-view {
  619. height: 100%;
  620. overflow: scroll;
  621. }
  622. .empty-container-image {
  623. margin-top: -300rpx;
  624. }
  625. .toIndexPage {
  626. bottom: 390rpx;
  627. }
  628. .show-more-btn {
  629. width: 276rpx;
  630. height: 52rpx;
  631. line-height: 52rpx;
  632. border: 2rpx solid #D8D8D8;
  633. background: #F7F7F7;
  634. font-size: 26rpx;
  635. margin: 26rpx 0;
  636. position: absolute;
  637. left: 50%;
  638. margin-left: -138rpx;
  639. }
  640. }
  641. .all-type-list-content {
  642. height: 216rpx;
  643. padding: 24rpx;
  644. background: #fff;
  645. margin-bottom: 2rpx;
  646. display: flex;
  647. flex-direction: row;
  648. box-sizing: content-box;
  649. .list-img {
  650. width: 210rpx;
  651. height: 218rpx !important;
  652. margin-right: 26rpx;
  653. border-radius: 10rpx;
  654. border: 2rpx solid #f3f3f3;
  655. }
  656. }
  657. .list-details-info {
  658. width: 466rpx;
  659. display: flex;
  660. flex-direction: column;
  661. font-size: 26rpx;
  662. position: relative;
  663. .list-details-title {
  664. line-height: 38rpx;
  665. text-overflow: ellipsis;
  666. overflow: hidden;
  667. display: -webkit-box;
  668. -webkit-line-clamp: 2;
  669. line-clamp: 2;
  670. -webkit-box-orient: vertical;
  671. }
  672. .list-details-specs {
  673. margin-top: 8rpx;
  674. color: #666666;
  675. }
  676. .list-details-miniQuantity {
  677. margin-top: 7rpx;
  678. }
  679. }
  680. .list-details-price {
  681. width: 100%;
  682. height: 54rpx;
  683. line-height: 54rpx;
  684. position: absolute;
  685. bottom: -10rpx;
  686. right: 0;
  687. .floor-item-act{
  688. height: 54rpx;
  689. text-align: center;
  690. box-sizing: border-box;
  691. float: right;
  692. .floor-tags{
  693. height: 28rpx;
  694. border-radius: 6rpx;
  695. background-color: #FFFFFF;
  696. line-height: 28rpx;
  697. color: $color-system;
  698. text-align: center;
  699. display: inline-block;
  700. padding:0 16rpx;
  701. font-size: $font-size-20;
  702. margin-left: 15rpx;
  703. margin-top:15px;
  704. border: 1px solid #E15616;
  705. float: right;
  706. }
  707. }
  708. .price-icon {
  709. width: 22rpx;
  710. height: 28rpx;
  711. vertical-align: middle;
  712. margin-right: 10rpx;
  713. }
  714. .price-icon + text {
  715. font-size: 25rpx;
  716. vertical-align: middle;
  717. }
  718. .list-login-now {
  719. color: #F8C499;
  720. float: left;
  721. line-height: 54rpx;
  722. .p-no{
  723. float: left;
  724. font-size: $font-size-24;
  725. color: $text-color;
  726. }
  727. }
  728. .login-now {
  729. padding: 10rpx 10rpx 10rpx 0;
  730. }
  731. .list-price {
  732. color: #FF2A2A;
  733. height: 44rpx;
  734. float: left;
  735. .price-larger {
  736. width: 100%;
  737. font-size: 32rpx;
  738. &.none{
  739. text-decoration: line-through;
  740. color: #999999;
  741. }
  742. &.small{
  743. font-size: $font-size-24;
  744. }
  745. .txt{
  746. font-size: $font-size-24;
  747. display: inline-block;
  748. line-height: 44rpx;
  749. text-align: left;
  750. float: left;
  751. }
  752. }
  753. }
  754. }
  755. </style>