search.vue 24 KB

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