search.vue 25 KB

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