search.vue 23 KB

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