1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015 |
- <template>
- <view class="search-container">
- <view class="search-main">
- <view class="search-tab">
- <view class="search-tab-btn" @click="topBubble">
- <text>{{ tabValue }}</text> <text class="iconfont icon-xiangxiajiantou"></text>
- </view>
- <tui-bubble-popup
- :show="show"
- :mask="true"
- position="absolute"
- direction="top"
- @close="topBubble"
- width="140rpx"
- left="10rpx"
- bottom="0rpx"
- translateY="100%"
- triangleRight="60rpx"
- triangleTop="-22rpx"
- :maskBgColor="maskBgColor"
- >
- <view class="tui-menu-item" @tap="selectTabs(1)">产品</view>
- <!-- <view class="tui-menu-item" @tap="selectTabs(2)">供应商</view> -->
- <view class="tui-menu-item" @tap="selectTabs(3)">项目仪器</view>
- </tui-bubble-popup>
- </view>
- <view class="gosearch-btn">
- <text class="iconfont icon-sousuo"></text>
- <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"
- />
- <text class="iconfont icon-shanchu1" v-if="isShowClose" @click.stop="delInputText()"></text>
- </view>
- <view class="search-btn" @click="subMitSearch()">搜索</view>
- </view>
- <view class="search-container-history" v-if="!isShowWrapper">
- <view :class="'s-' + themeClass" v-if="serachRecordList.length > 0">
- <view class="header"> 搜索历史<text class="iconfont icon-shanchu" @click="confirmDetele"></text> </view>
- <view class="list">
- <view class="list-main">
- <view
- v-for="(item, index) in serachRecordList"
- :key="index"
- @click="keywordsClick(item.searchWord)"
- >{{ item.searchWord }}</view
- >
- </view>
- </view>
- </view>
- <view class="s-block hot clearfix">
- <view class="header">热门搜索</view>
- <view class="list">
- <view class="list-title">产品</view>
- <view class="list-main">
- <view
- v-for="(item, index) in productHotSearch"
- :key="index"
- @click="keywordsClickPath(item)"
- :class="item.isHot == '1' ? 'list-active' : ''"
- >
- {{ item.name }} <text class="iconfont icon-resou" v-if="item.isHot === '1'"></text>
- </view>
- </view>
- </view>
- <view class="list">
- <view class="list-title">仪器</view>
- <view class="list-main">
- <view
- v-for="(item, index) in instrumentHotSearch"
- :key="index"
- @click="keywordsClickPath(item)"
- :class="item.isHot == '1' ? 'list-active' : ''"
- >
- {{ item.name }} <text class="iconfont icon-resou" v-if="item.isHot === '1'"></text>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view
- v-else
- class="commodity-list-wrapper"
- :style="{ overflow: 'auto', height: listData.length > 4 ? windowHeight + 'px' : 'auto' }"
- >
- <scroll-view
- :style="{ height: listData.length > 4 ? scrollHeight + 'px' : 'auto' }"
- @scrolltolower="scrolltolower"
- scroll-y
- v-if="!showEmpty"
- >
- <view
- v-for="(item, index) in listData"
- :key="index"
- :id="item.id"
- class="all-type-list-content commodity-list"
- @click.stop="navToDetailPage(item.productId)"
- >
- <image mode="widthFix" :src="item.image" class="list-img" alt="list-img"></image>
- <view class="list-details-info">
- <view class="list-details-title">
- <text class="mclap-tag" v-if="item.beautyActFlag == 1">美博会</text>
- <text class="mclap" :class="item.beautyActFlag == 1 ? 'indent' : ''">{{
- isInterceptHtmlFn(item.name)
- }}</text>
- </view>
- <text class="list-details-specs">规格:{{ item.unit }}</text>
- <view class="list-details-specs" v-if="item.code != '' && item.code != null">
- <view>商品编码:{{ item.code }}</view>
- </view>
- <view class="list-details-price">
- <template v-if="userIdentity == 3">
- <view class="floor-item-act" v-if="item.actStatus == 1">
- <template v-if="item.actStatus == 1">
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)"></view>
- <view class="floor-tags" v-else>{{ item.promotions.name }}</view>
- </template>
- </view>
- <view class="floor-item-act" v-if="item.actStatus == 0">
- <view class="floor-tags" v-if="item.actStatus == 0 && item.ladderPriceFlag == 1"
- >阶梯价格</view
- >
- </view>
- </template>
- <template v-else>
- <view class="floor-item-act" v-if="item.actStatus == 1">
- <template v-if="item.actStatus == 1">
- <view class="floor-tags" v-if="PromotionsFormat(item.promotions)">
- {{ item.promotions.name }}
- <text v-if="hasLogin && userIdentity == 2 && item.priceFlag != 1"
- >:¥{{ item.price | NumFormat }}</text
- >
- </view>
- <view class="floor-tags" v-else>{{ item.promotions.name }}</view>
- </template>
- </view>
- <view class="floor-item-act" v-if="item.actStatus == 0">
- <view class="floor-tags" v-if="item.actStatus == 0 && item.ladderPriceFlag == 1"
- >阶梯价格</view
- >
- </view>
- </template>
- <view v-if="hasLogin" class="list-price">
- <template v-if="userIdentity == 1">
- <text v-if="priceLoading" class="price-larger small">正在获取价格...</text>
- <text
- v-else
- class="price-larger"
- :class="PromotionsFormat(item.promotions) ? 'none' : ''"
- >
- ¥{{
- (PromotionsFormat(item.promotions) ? item.originalPrice : item.price)
- | NumFormat
- }}
- </text>
- </template>
- <template v-if="userIdentity == 4">
- <view class="price-larger" v-if="item.priceFlag == 1">
- <text class="txt">¥未公开价格</text>
- </view>
- <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
- <template v-else>
- <view class="price-larger" v-if="item.priceFlag == 2">
- <text class="txt">¥价格仅会员可见</text>
- </view>
- <text
- v-else
- class="price-larger"
- :class="PromotionsFormat(item.promotions) ? 'none' : ''"
- >
- ¥{{
- (PromotionsFormat(item.promotions) ? item.originalPrice : item.price)
- | NumFormat
- }}
- </text>
- </template>
- </template>
- <template v-if="userIdentity == 3">
- <template v-if="item.supplierId == shopId">
- <view class="price-larger" v-if="item.priceFlag == 1">
- <text class="txt">¥未公开价格</text>
- </view>
- <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
- <text
- v-else
- class="price-larger"
- :class="PromotionsFormat(item.promotions) ? 'none' : ''"
- >
- ¥{{
- (PromotionsFormat(item.promotions) ? item.originalPrice : item.price)
- | NumFormat
- }}
- </text>
- </template>
- <template v-else>
- <view class="list-login-now">
- <text class="p-no">¥</text>
- <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
- </view>
- </template>
- </template>
- <template v-if="userIdentity == 2">
- <view class="price-larger" v-if="item.priceFlag == 1">
- <text class="txt">¥未公开价格</text>
- </view>
- <text v-else-if="priceLoading" class="price-larger small">正在获取价格...</text>
- <text
- v-else
- class="price-larger"
- :class="PromotionsFormat(item.promotions) ? 'none' : ''"
- >
- ¥{{
- (PromotionsFormat(item.promotions) ? item.originalPrice : item.price)
- | NumFormat
- }}
- </text>
- </template>
- </view>
- <view v-else class="list-login-now">
- <text class="p-no">¥</text>
- <uni-grader :grade="Number(item.priceGrade)"></uni-grader>
- </view>
- </view>
- </view>
- </view>
- <view v-if="showLoading && listData.length > 4">
- <view class="loading-wrapper loading-wrapper-now" v-if="loadingNow"
- >{{ loadingText }}<text v-if="loadingText === '已至底部'">‧ ‧ ‧</text></view
- >
- <view class="loading-wrapper loading-wrapper-btm" v-else
- >———<text class="btm-text">已至底部</text>———</view
- >
- </view>
- </scroll-view>
- <view class="empty-container" v-if="showEmpty">
- <image
- class="empty-container-image"
- src="https://img.caimei365.com/group1/M00/03/8D/Cmis215XHXWAHCoqAAELHadZ9Xg365.png"
- ></image>
- <text class="error-text">抱歉,没有相关商品!</text>
- </view>
- </view>
- <!-- 透明模态层 -->
- <modal-layer v-if="isModallayer"></modal-layer>
- </view>
- </template>
- <script>
- import { mapState, mapMutations } from 'vuex'
- import modalLayer from '@/components/modal-layer'
- import uniGrader from '@/components/uni-grade/uni-grade.vue'
- import authorize from '@/common/config/authorize.js'
- import wxLogin from '@/common/config/wxLogin.js'
- export default {
- components: {
- modalLayer,
- uniGrader
- },
- data() {
- return {
- shopId: 0,
- userId: 0,
- tabValue: '产品',
- themeClass: 'block',
- show: false,
- userIdentity: '',
- searchKeyType: 1,
- isShowClose: false, //是否显示清空输入框图标
- isSearchHistory: false, //是都显示搜索历史
- serachRecordList: [], //历史搜索记录
- instrumentHotSearch: [],
- productHotSearch: [],
- isShowWrapper: false,
- isModallayer: false,
- isFocus: false,
- priceLoading: true,
- windowHeight: '',
- showEmpty: false,
- scrollHeight: '',
- listData: [],
- productIds: '', //查询价格的商品ID
- showLoading: false,
- loadingNow: true,
- loadingText: '上拉加载更多',
- pullFlag: true,
- listQuery: {
- identity: 0,
- keyword: '',
- sortField: '',
- sortType: '',
- pageNum: 1,
- pageSize: 20
- },
- total: 0
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo', 'isWxAuthorize', 'hasLogin', 'userInfo', 'identity'])
- },
- onLoad(option) {
- console.log(option)
- if (option.type == 'share') {
- wxLogin.wxLoginAuthorize()
- }
- this.$api.getStorage().then(resolve => {
- this.userId = resolve.userId ? resolve.userId : 0
- this.shopId = resolve.shopId ? resolve.shopId : 0
- this.userIdentity = resolve.userIdentity
- this.listQuery.identity = this.identity
- if (option.keyWord) {
- this.listQuery.keyword = option.keyWord
- this.setSearchHistoryAdd()
- this.getListFromServer()
- this.isFocus = false
- } else {
- this.isFocus = true
- this.initGetSerachRecord()
- }
- })
- },
- filters: {
- NumFormat: function(text) {
- //处理金额
- return Number(text).toFixed(2)
- }
- },
- methods: {
- GetHomeHotSearchTerms() {
- //金刚区分类
- this.CommonService.GetHomeHotSearchTerms({})
- .then(response => {
- let data = response.data
- console.log(data)
- this.instrumentHotSearch = data.instrumentHotSearch
- this.productHotSearch = data.productHotSearch
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- initGetSerachRecord() {
- //查询搜索历史记录
- this.ProductService.GetProductSearchHistory({ userId: this.userId }).then(response => {
- if (response.code == 0) {
- this.serachRecordList = response.data
- }
- })
- },
- subMitSearch() {
- //搜索
- if (this.listQuery.keyword == '') {
- this.$util.msg('请输入搜索关键词', 2000)
- } else {
- switch (this.searchKeyType) {
- case 1:
- this.listData = []
- this.setSearchHistoryAdd()
- this.getListFromServer()
- this.isFocus = false
- // 友盟埋点商品搜索点击
- if (process.env.NODE_ENV != 'development') {
- this.$uma.trackEvent('Um_Event_SearchProductSubmit', {
- Um_Key_Keyword: `${this.listQuery.keyword}`,
- Um_Key_PageName: '商品',
- Um_Key_SourcePage: '搜索商品'
- })
- }
- break
- case 2:
- this.setSearchHistoryAdd()
- this.$api.navigateTo(`/pages/search/search-supplier?keyWord=${this.listQuery.keyword}`)
- break
- case 3:
- this.setSearchHistoryAdd()
- this.$api.navigateTo(`/pages/search/search-instrument?keyWord=${this.listQuery.keyword}`)
- break
- }
- }
- },
- scrolltolower() {
- if (this.total > this.listData.length && this.pullFlag) {
- this.getListFromServer(true)
- }
- },
- getListFromServer(loadMore) {
- this.showLoading = true
- this.loadingNow = true
- this.loadingText = '加载中'
- this.showEmpty = false
- if (loadMore) {
- this.listQuery.pageNum += 1
- }
- this.ProductService.GetProductSearchList(this.listQuery)
- .then(response => {
- this.isShowWrapper = true
- const resData = JSON.parse(response.data)
- const resList = resData.items
- console.log(resList)
- if (resList && resList.length > 0) {
- this.total = resData.total
- this.showEmpty = false
- if (loadMore) {
- this.listData = [...this.listData, ...resList]
- this.getProductPrice()
- } else {
- this.listData = [...resList]
- this.getProductPrice()
- }
- // 防上拉暴滑
- this.pullFlag = false
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- // 底部提示文案
- if (this.totalPage > this.listData.length) {
- this.loadingText = '上拉加载更多'
- } else {
- this.showLoading = true
- this.loadingNow = false
- }
- } else {
- if (!loadMore) {
- this.showEmpty = true
- }
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- setSearchHistoryAdd() {
- //添加搜索记录
- if (!this.hasLogin) {
- return false
- }
- this.ProductService.GetAddProductSearchHistory({ userId: this.userId, keyword: this.listQuery.keyword })
- .then(response => {
- //此为每次搜索同时添加用户的搜索记录
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- getProductPrice() {
- //获取价格
- let productIdArr = []
- this.listData.map(item => {
- // 0公开价格 1不公开价格 2仅对资质机构公开
- productIdArr.push(item.productId)
- })
- this.productIds = productIdArr.join(',')
- this.ProductService.querySearchProductPrice({
- userId: this.userId,
- productIds: this.productIds,
- source: 2 // 来源 1 WWW 2 小程序
- })
- .then(response => {
- if (response.data) {
- this.listData = this.ReturnNewProducts(this.listData, response.data)
- }
- this.priceLoading = false
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- ReturnNewProducts(Array, list) {
- //处理对应商品ID的商品价格
- let NewArray = []
- Array.map(item => {
- for (let i = 0; i < list.length; i++) {
- if (item.productId == list[i].productId) {
- NewArray.push(Object.assign(item, list[i]))
- }
- }
- })
- return NewArray
- },
- PromotionsFormat(promo) {
- //促销活动类型数据处理
- if (promo != null) {
- if (promo.type == 1 && promo.mode == 1) {
- return true
- } else {
- return false
- }
- }
- return false
- },
- onShowClose() {
- //输入框输入时触发
- this.inputEmpty(this.listQuery.keyword)
- },
- onFocus() {
- //输入框获取焦点时触发
- this.inputEmpty(this.listQuery.keyword)
- this.initGetSerachRecord()
- },
- delInputText() {
- //清除输入框内容
- this.listQuery.keyword = ''
- this.isShowClose = false
- this.isShowWrapper = false
- this.inputEmpty(this.listQuery.keyword)
- this.initGetSerachRecord()
- },
- keywordsClick(item) {
- //关键词搜索与历史搜索
- this.listQuery.keyword = item
- this.isShowClose = true
- this.isFocus = false
- this.subMitSearch()
- },
- keywordsClickPath(item) {
- this.$api.FlooryNavigateTo(item)
- },
- confirmDetele() {
- //清空历史记录
- this.$util.modal('提示', '确定删除历史记录?', '确定', '取消', true, () => {
- this.ProductService.GetDeleteProductSearchHistory({ userId: this.userId })
- .then(response => {
- this.$util.msg('删除成功', 2000, true, 'success')
- this.serachRecordList = []
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- })
- },
- inputEmpty(val) {
- this.isShowWrapper = false
- if (val != '') {
- this.isShowClose = true
- this.isFocus = true
- } else {
- this.isShowClose = false
- this.isFocus = true
- }
- },
- isInterceptHtmlFn(text) {
- let name = this.$reg.interceptHtmlFn(text)
- return name
- },
- navToDetailPage(id) {
- this.isModallayer = true
- this.$api.navigateTo(`/pages/goods/product?id=${id}`)
- this.isModallayer = false
- },
- setScrollHeight() {
- const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
- this.windowHeight = windowHeight - 1
- this.scrollHeight = windowHeight - 1
- },
- toLoginPage() {
- let searchLoginType = 'search'
- uni.navigateTo({
- url: `/pages/login/login?type=${searchLoginType}`
- })
- },
- selectTabs(index) {
- //选择搜索项
- this.show = false
- this.searchKeyType = index
- switch (index) {
- case 1:
- this.tabValue = '产品'
- break
- case 2:
- this.tabValue = '供应商'
- break
- case 3:
- this.tabValue = '项目仪器'
- break
- }
- },
- topBubble() {
- //显隐搜索项
- this.show = !this.show
- }
- },
- onShareAppMessage(res) {
- //分享转发
- if (res.from === 'button') {
- // 来自页面内转发按钮
- }
- return {
- title: `点击查看“${this.listQuery.keyword}”相关的商品`,
- path: `pages/search/search?type=share&keyWord=${this.listQuery.keyword}`
- }
- },
- onShow() {
- this.setScrollHeight()
- this.GetHomeHotSearchTerms()
- }
- }
- </script>
- <style lang="scss">
- @import '@/uni.scss';
- page {
- background-color: #f7f7f7 !important;
- }
- .search-main {
- width: 100%;
- height: 88rpx;
- position: fixed;
- top: 0;
- left: 0;
- background: #ffffff;
- z-index: 1001;
- box-sizing: border-box;
- padding: 9rpx 0;
- .search-tab {
- width: 160rpx;
- height: 70rpx;
- line-height: 70rpx;
- color: #666666;
- font-size: $font-size-24;
- text-align: center;
- float: left;
- position: relative;
- .icon-xiangxiajiantou {
- margin-left: 10rpx;
- font-size: $font-size-30;
- }
- }
- .gosearch-btn {
- width: 470rpx;
- height: 100%;
- float: left;
- border-radius: 40rpx;
- background: #f0f0f0;
- margin: 0 auto;
- padding: 0 20rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- padding-left: 70rpx;
- color: #8a8a8a;
- background: #f7f7f7;
- position: relative;
- box-sizing: border-box;
- .icon-sousuo {
- width: 70rpx;
- height: 70rpx;
- line-height: 70rpx;
- text-align: center;
- display: block;
- position: absolute;
- left: 0;
- top: 0;
- font-size: 34rpx;
- color: #8a8a8a;
- z-index: 10;
- }
- .icon-shanchu1 {
- font-size: 36rpx;
- color: #8a8a8a;
- position: absolute;
- right: 10rpx;
- top: 0;
- padding: 0 10rpx;
- z-index: 100;
- }
- .input {
- width: 400rpx;
- height: 100%;
- float: left;
- font-size: $font-size-24;
- box-sizing: border-box;
- padding-right: 66rpx;
- }
- }
- .search-btn {
- width: 120rpx;
- height: 70rpx;
- line-height: 70rpx;
- float: right;
- text-align: center;
- color: #666666;
- font-size: $font-size-24;
- }
- }
- .search-container {
- padding-top: 96rpx;
- }
- .s-block {
- background: #ffffff;
- &.hot {
- border-top: 20rpx solid #f7f7f7;
- }
- .header {
- font-size: 32rpx;
- padding: 40rpx 24rpx 22rpx 24rpx;
- line-height: 42rpx;
- font-size: 30rpx;
- font-weight: bold;
- position: relative;
- width: 100%;
- float: left;
- box-sizing: border-box;
- .icon-shanchu {
- font-size: 36rpx;
- color: #333333;
- float: right;
- padding: 0 10rpx;
- z-index: 10;
- font-weight: normal;
- }
- }
- .list {
- width: 100%;
- height: auot;
- float: left;
- padding: 0 24rpx 30rpx 24rpx;
- box-sizing: border-box;
- .list-title {
- width: 100%;
- height: 40rpx;
- font-size: $font-size-26;
- color: #333;
- }
- .list-main {
- width: 100%;
- float: left;
- display: flex;
- flex-wrap: wrap;
- view {
- color: #8a8a8a;
- font-size: 24rpx;
- box-sizing: border-box;
- text-align: center;
- height: 48rpx;
- line-height: 48rpx;
- border-radius: 24rpx;
- margin: 12rpx 12rpx 12rpx 0;
- padding: 0 20rpx;
- white-space: nowrap;
- text-overflow: ellipsis;
- background-color: #f3f3f3;
- .iconfont {
- font-size: $font-size-30;
- color: #e15616;
- margin-left: 12rpx;
- }
- &.list-active {
- background-color: #fef6f3;
- color: #e15616;
- }
- }
- }
- }
- }
- .s-circle {
- margin-top: 30rpx;
- .header {
- font-size: 32rpx;
- padding: 30rpx;
- border-bottom: 2rpx solid #f9f9f9;
- position: relative;
- image {
- width: 36rpx;
- height: 36rpx;
- padding: 10rpx;
- position: absolute;
- right: 40rpx;
- top: 24rpx;
- }
- }
- .list {
- display: flex;
- flex-wrap: wrap;
- padding: 0 30rpx 20rpx;
- view {
- padding: 8rpx 30rpx;
- margin: 20rpx 30rpx 0 0;
- font-size: 28rpx;
- color: #8a8a8a;
- background-color: #f7f7f7;
- box-sizing: border-box;
- text-align: center;
- border-radius: 20rpx;
- }
- }
- }
- .wanted-block {
- margin-top: 30rpx;
- .header {
- font-size: 32rpx;
- padding: 30rpx;
- }
- .list {
- display: flex;
- flex-wrap: wrap;
- view {
- width: 50%;
- color: #8a8a8a;
- font-size: 28rpx;
- box-sizing: border-box;
- text-align: center;
- padding: 20rpx 0;
- border-top: 2rpx solid #fff;
- border-left: 2rpx solid #fff;
- background-color: #f7f7f7;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- }
- }
- .wanted-circle {
- margin-top: 30rpx;
- .header {
- font-size: 32rpx;
- padding: 30rpx;
- }
- .list {
- display: flex;
- flex-wrap: wrap;
- padding: 0 30rpx 20rpx;
- view {
- padding: 8rpx 30rpx;
- margin: 20rpx 30rpx 0 0;
- font-size: 28rpx;
- color: #8a8a8a;
- background-color: #f7f7f7;
- box-sizing: border-box;
- text-align: center;
- border-radius: 20rpx;
- }
- }
- }
- .commodity-list-wrapper {
- scroll-view {
- height: 100%;
- overflow: scroll;
- }
- .empty-container-image {
- margin-top: -300rpx;
- }
- .toIndexPage {
- bottom: 390rpx;
- }
- .show-more-btn {
- width: 276rpx;
- height: 52rpx;
- line-height: 52rpx;
- border: 2rpx solid #d8d8d8;
- background: #f7f7f7;
- font-size: 26rpx;
- margin: 26rpx 0;
- position: absolute;
- left: 50%;
- margin-left: -138rpx;
- }
- }
- .all-type-list-content {
- height: 216rpx;
- padding: 24rpx;
- background: #fff;
- margin-bottom: 2rpx;
- display: flex;
- flex-direction: row;
- box-sizing: content-box;
- .list-img {
- width: 210rpx;
- height: 218rpx !important;
- margin-right: 26rpx;
- border-radius: 10rpx;
- border: 2rpx solid #f3f3f3;
- }
- }
- .list-details-info {
- width: 466rpx;
- display: flex;
- flex-direction: column;
- font-size: 26rpx;
- position: relative;
- .list-details-title {
- position: relative;
- .mclap {
- line-height: 38rpx;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- &.indent {
- text-indent: 95rpx;
- }
- }
- .mclap-tag {
- display: block;
- width: 84rpx;
- height: 32rpx;
- background-image: linear-gradient(270deg, #f9c023 0%, #f83600 100%);
- border-radius: 4rpx 48rpx 4px 4px;
- line-height: 32rpx;
- font-size: $font-size-22;
- color: #ffffff;
- text-align: center;
- position: absolute;
- left: 0;
- top: 0;
- }
- }
- .list-details-specs {
- margin-top: 8rpx;
- color: #666666;
- }
- .list-details-miniQuantity {
- margin-top: 7rpx;
- }
- }
- .list-details-price {
- width: 100%;
- height: 54rpx;
- line-height: 54rpx;
- position: absolute;
- bottom: -10rpx;
- right: 0;
- .floor-item-act {
- height: 54rpx;
- text-align: center;
- box-sizing: border-box;
- float: right;
- padding: 11rpx 0;
- .coupon-tags {
- height: 32rpx;
- box-sizing: border-box;
- border-radius: 8rpx;
- background-color: #fff1eb;
- line-height: 28rpx;
- color: #f94b4b;
- text-align: center;
- display: inline-block;
- padding: 0 10rpx;
- font-size: $font-size-20;
- border: 1px solid #f94b4b;
- float: left;
- margin-right: 12rpx;
- }
- .floor-tags {
- height: 32rpx;
- box-sizing: border-box;
- border-radius: 8rpx;
- background-color: #ffffff;
- line-height: 28rpx;
- color: $color-system;
- text-align: center;
- display: inline-block;
- padding: 0 16rpx;
- font-size: $font-size-20;
- border: 1px solid #e15616;
- float: left;
- }
- }
- .price-icon {
- width: 22rpx;
- height: 28rpx;
- vertical-align: middle;
- margin-right: 10rpx;
- }
- .price-icon + text {
- font-size: 25rpx;
- vertical-align: middle;
- }
- .list-login-now {
- color: #f8c499;
- float: left;
- line-height: 54rpx;
- .p-no {
- float: left;
- font-size: $font-size-24;
- color: $text-color;
- }
- }
- .login-now {
- padding: 10rpx 10rpx 10rpx 0;
- }
- .list-price {
- color: #ff2a2a;
- height: 44rpx;
- float: left;
- .price-larger {
- width: 100%;
- font-size: 32rpx;
- &.none {
- text-decoration: line-through;
- color: #999999;
- }
- &.small {
- font-size: $font-size-24;
- }
- .txt {
- font-size: $font-size-24;
- display: inline-block;
- line-height: 44rpx;
- text-align: left;
- float: left;
- }
- }
- }
- }
- </style>
|