search.vue 24 KB

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