search.vue 20 KB

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