search.vue 23 KB

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