search.vue 22 KB

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