search.vue 25 KB

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