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