search.vue 25 KB

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