search.vue 20 KB

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