search.vue 23 KB

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