search.vue 24 KB

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