1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159 |
- <template>
- <view
- class="container commodity-list-wrapper"
- :style="{ overflow: showSkeleton ? 'hidden' : 'auto', height: showSkeleton ? windowHeight + 'px' : 'auto' }"
- >
- <list-skeleton :listType="0" v-if="showSkeleton" />
- <template v-else>
- <view class="good-search clearfix" v-if="searchStatus">
- <view class="nav-tab-bar u-f-ajc">
- <block v-for="(tab, index) in tabBars" :key="tab.id" :class="{ current: tabIndex === index }">
- <view class="tabstyle u-f-ajc" :class="{ addstyle: tabIndex == index }" @tap="changeTab(index)">
- {{ tab.name }}<i v-if="tabIndex == index" class="nav-tab-line iconfont icon-gou"></i>
- </view>
- </block>
- </view>
- <view class="search-from name">
- <text class="iconfont icon-iconfonticonfontsousuo1"></text>
- <input
- class="input"
- type="text"
- confirm-type="search"
- v-model="searchInputVal"
- placeholder="请输入商品关键词"
- @input="onShowClose"
- @confirm="searchOpertor(tabIndex)"
- maxlength="20"
- />
- <text class="iconfont icon-shanchu1" v-if="isShowClose" @click="delInputText(tabIndex)"></text>
- </view>
- </view>
- <view class="empty-container" v-if="isShowEmpty">
- <image
- class="empty-container-image"
- src="https://img.caimei365.com/group1/M00/03/71/Cmis2F3wna6AY2ZjAABpmnBICH4247.png"
- ></image>
- <text class="error-text">{{ isShowEmptyText }}</text>
- </view>
- <!-- 单一商品 -->
- <view class="product-container" v-else>
- <view :class="tabIndex" v-if="tabIndex === 0" :style="{ paddingTop: searchStatus ? '128rpx' : '' }">
- <scroll-view
- :style="{ height: scrollHeight + 'px' }"
- @scrolltolower="scrolltolower(tabIndex)"
- scroll-y
- v-if="listData.length > 0"
- >
- <view
- v-for="(pros, index) in listData"
- :key="index"
- :id="pros.productId"
- class="all-type-list-content commodity-list"
- @click.stop="navToDetailPage(pros.productId)"
- >
- <view class="list-details-image">
- <image mode="widthFix" :src="pros.image" class="list-img" alt="list-img"></image>
- <view class="list-details-type" v-if="pros.productType == 2">医疗器械</view>
- </view>
- <view class="list-details-info">
- <text class="list-details-title">{{ isInterceptHtmlFn(pros.name) }}</text>
- <text class="list-details-specs">规格:{{ pros.unit ? pros.unit : '' }}</text>
- <text class="list-details-miniQuantity list-details-specs"
- >起订量:{{ pros.minBuyNumber }}</text
- >
- <view class="list-details-specs" v-if="pros.code != '' && pros.code != null">
- <view>商品编码:{{ pros.code }}</view>
- </view>
- <view class="list-details-price">
- <template v-if="priceLoading">
- <view class="list-price-loding">正在获取价格...</view>
- </template>
- <template v-else>
- <view class="list-shop">
- <view class="list-price">
- <text
- class="price-larger"
- :class="
- PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
- ? 'none'
- : ''
- "
- >
- ¥{{
- (PromotionsFormat(pros.promotions) || pros.svipProductFlag == 1
- ? pros.originalPrice
- : pros.price) | NumFormat
- }}
- </text>
- </view>
- </view>
- <button class="add-cart-btn" @click.stop="operationHanld(pros)">数量</button>
- </template>
- </view>
- <view class="list-details-price">
- <view class="floor-item-act">
- <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
- <template v-if="pros.actStatus == 1">
- <view class="floor-tags" v-if="PromotionsFormat(pros.promotions)">
- {{ pros.promotions.name }}<text>:¥{{ pros.price | NumFormat }}</text>
- </view>
- <view class="floor-tags" v-else>{{ pros.promotions.name }}</view>
- </template>
- <template v-if="pros.svipProductFlag == 1">
- <view class="svip-tags">
- <view class="tags">SVIP</view>
- <view class="price">{{ pros.svipPriceTag }}</view>
- </view>
- </template>
- </view>
- </view>
- </view>
- </view>
- <view v-if="showLoading && listData.length > 4 && !showRegularBtn">
- <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>
- <!-- 组合商品 -->
- <view :class="tabIndex" v-if="tabIndex === 1">
- <scroll-view
- :style="{ height: scrollHeight + 'px', paddingTop: searchStatus ? '112rpx' : '' }"
- @scrolltolower="scrolltolower(tabIndex)"
- scroll-y
- >
- <view class="all-zuhe-list" v-for="(item, index) in combinationProduct" :key="index" :id="item.id">
- <view class="zuhe_title" :class="index % 2 == 0 ? 'active' : ''">{{ item.name }}</view>
- <view
- v-for="(pros, proIndex) in item.combinationProductList"
- :class="index % 2 == 0 ? 'stylecontent' : ''"
- :key="proIndex"
- :id="pros.productId"
- class="zuhe-list-content commodity-list"
- >
- <view class="list-details-info">
- <text class="list-details-title zuhe_list_text">商品编码:{{ pros.code }}</text>
- <text
- class="list-details-specs zuhe_list_text"
- @click.stop="navToDetailPage(pros.productId)"
- >{{ pros.name }}</text
- >
- <view class="list-details-price zuhe_list_price">
- <view class="list-shop com">
- <view class="list-price zuhe_list_price">
- <view class="zuhe_price-larger zuhe_list_text">
- <text class="price-larger">规格:{{ pros.unit }}</text>
- <text
- class="price-btn"
- @click.stop="handleShowUnitPopup(pros, proIndex)"
- >重选</text
- >
- </view>
- <view class="zuhe_price-larger zuhe_list_text">
- <view class="list-price-none" v-if="pros.repurchaseFlag == 1">
- <text class="price-none">价格:¥{{ pros.originalPrice }}</text>
- <text
- class="iconfont icon-wenhao"
- @click.stop="repurchModel"
- ></text>
- </view>
- <view class="price-larger">价格:¥{{ pros.price | NumFormat }}</view>
- </view>
- <view class="zuhe_price-larger zuhe_list_text">
- <view class="floor-item-act">
- <view class="coupon-tags" v-if="pros.couponsLogo">优惠券</view>
- <template v-if="pros.actStatus == 1">
- <view
- class="floor-tags"
- v-if="PromotionsFormat(pros.promotions)"
- >
- {{ pros.promotions.name
- }}<text>:¥{{ pros.price | NumFormat }}</text>
- </view>
- <view class="floor-tags" v-else>{{
- pros.promotions.name
- }}</view>
- </template>
- <template v-if="pros.svipProductFlag == 1">
- <view class="svip-tags">
- <view class="tags">SVIP</view>
- <view class="price">{{ pros.svipPriceTag }}</view>
- </view>
- </template>
- </view>
- <view class="count">
- <view class="number-box">
- <view
- class="iconfont icon-jianhao"
- @click.stop="changeCountSub(item, pros)"
- ></view>
- <input
- class="btn-input"
- type="number"
- maxlength="6"
- v-model="pros.initProductNum"
- @blur="changeNnmber($event, item, pros)"
- />
- <view
- class="iconfont icon-jiahao"
- @click.stop="changeCountAdd(item, pros)"
- ></view>
- </view>
- </view>
- </view>
- <view class="list-price-all" :style="{ overflow: 'hidden' }">
- <view class="price-two zuhe_list_text"
- >总价:<text class="zuhe_list_zj"
- >¥ {{ pros.totalPrice | NumFormat }}</text
- ></view
- >
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="foot_conten">
- <view class="zuhe_foot-box">
- <view class="">
- <text>种类:{{ item.productKind }}</text>
- <text>总数:{{ item.productTotalNum }}</text>
- </view>
- <text
- >总额:<text class="foot_text">{{
- item.productTotalAmount | NumFormat
- }}</text></text
- >
- </view>
- <button type="default" class="buycart" @click.stop="operationHanld(item)">
- 加入购物车
- </button>
- </view>
- </view>
- <view v-if="showLoading && combinationProduct.length > 4 && !showRegularBtn">
- <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>
- </view>
- </template>
- <!-- 组合商品规格弹窗 -->
- <cmUnitSupporPopup
- v-if="popupShow"
- :popupShow="popupShow"
- :skuProduct="handleProsData"
- @handleUnitConfirm="hanldeSupporUnitConfirm"
- @skuClick="handleSkuClick"
- />
- <!-- 可拖动悬浮按钮 -->
- <cm-drag
- v-if="!showSkeleton"
- :cartNum="cartQuantity"
- :isDock="true"
- :existTabBar="true"
- @btnClick="btnClick"
- @btnTouchstart="btnTouchstart"
- @btnTouchend="btnTouchend"
- />
- <!-- 透明模态层 -->
- <modal-layer v-if="isModallayer" />
- </view>
- </template>
- <script>
- import listSkeleton from '@/components/cm-module/listTemplate/listSkeleton'
- import modalLayer from '@/components/modal-layer'
- import uniStars from '@/components/uni-stars/uni-stars.vue'
- import cmDrag from '@/components/cm-custom/cm-drag.vue'
- import cmUnitSupporPopup from './cm-unit-suppor-popup'
- import { mapState, mapMutations } from 'vuex'
- export default {
- name: 'productList',
- components: {
- listSkeleton,
- modalLayer,
- uniStars,
- cmUnitSupporPopup,
- cmDrag
- },
- props: {
- searchStatus: {
- type: Boolean,
- default: false
- }
- },
- data() {
- return {
- popupShow: false,
- handleProsData: {},
- isShowClose: false,
- searchInputVal: '',
- isModallayer: false,
- windowHeight: '',
- showSkeleton: true,
- priceLoading: true,
- isShowEmpty: false,
- isShowEmptyText: '搜索相关商品',
- userId: 0,
- clubUserId: '',
- identity: 0,
- isFocus: false,
- scrollHeight: '',
- listData: [],
- combinationProduct: [],
- zuheProductList: [], //组合商品列表
- showLoading: false,
- loadingNow: true,
- loadingText: '上拉加载更多',
- pageSize: 20,
- zuhepageSize: 5,
- pageNum: 1,
- totalPage: 1,
- hasNextPage: false,
- pullFlag: true,
- fromRegularPurchasePage: false,
- cartQuantity: 0,
- showRegularBtn: false,
- isPrecedence: false,
- ladderPriceList: [], //是否 阶梯,
- tabIndex: 0,
- goodsList: [],
- tabBars: [{ name: '单一', id: 'danyi' }, { name: '组合', id: 'zuhe' }],
- isShow: false
- }
- },
- created() {
- this.setScrollHeight()
- this.initGetStotage()
- // this.isFocus = true
- },
- filters: {
- NumFormat: function(text) {
- //处理金额
- return Number(text).toFixed(2)
- }
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo'])
- },
- methods: {
- async initGetStotage() {
- // 初始化
- const userInfo = await this.$api.getStorage()
- const clubInfo = await this.$api.getComStorage('orderUserInfo')
- this.userId = userInfo.userId ? userInfo.userId : 0
- this.identity = userInfo.userIdentity ? userInfo.userIdentity : 0
- this.clubUserId = clubInfo.userId ? clubInfo.userId : 0
- this.getProductAgainInfo()
- },
- scrolltolower(tabIndex) {
- if (tabIndex == 0) {
- if (this.totalPage > this.listData.length && this.pullFlag) {
- this.getProductAgainInfo(true)
- }
- } else if (tabIndex == 1) {
- if (this.hasNextPage && this.pullFlag) {
- this.getcombinationProduct(true)
- }
- }
- },
- setScrollHeight() {
- const { windowHeight, pixelRatio } = wx.getSystemInfoSync()
- this.windowHeight = windowHeight - 1
- this.scrollHeight = windowHeight - 1
- },
- getProductAgainInfo(loadMore) {
- this.showLoading = true
- this.priceLoading = true
- this.loadingNow = true
- this.loadingText = '加载中'
- this.isShowEmpty = false
- if (loadMore) {
- this.pageNum += 1
- }
- this.ProductService.GetProductSearchList({
- identity: this.identity,
- keyword: this.searchInputVal,
- pageNum: this.pageNum,
- pageSize: this.pageSize,
- sortField: '',
- sortType: ''
- })
- .then(response => {
- this.isShowWrapper = true
- const resData = JSON.parse(response.data)
- if(resData){
- const resList = resData.items
- this.totalPage = 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{
- this.isShowEmpty = true
- this.isShowEmptyText = '暂无相关商品'
- }
- this.showSkeleton = false
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- getProductPrice() {
- //获取商品或者活动价格
- let productIdArr = []
- let productIds = ''
- this.listData.map(item => {
- // 0公开价格 1不公开价格 2仅对资质机构公开
- productIdArr.push(item.productId)
- })
- productIds = productIdArr.join(',')
- this.ProductService.querySearchProductPrice({
- flag: this.identity, //查询促销标记 1协销 2机构 3供应商
- userId: this.userId,
- productIds: productIds,
- source: 2
- })
- .then(response => {
- this.listData = this.ReturnNewProducts(this.listData, response.data)
- this.priceLoading = false
- setTimeout(() => {
- this.showSkeleton = false
- }, 500)
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- ReturnNewProducts(Array, list) {
- //合并字段
- 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
- },
- searchOpertor(tabIndex) {
- //搜索商品
- if (tabIndex == 0) {
- if (this.searchInputVal == '') {
- this.$util.msg('请输入商品关键词', 2000)
- } else {
- this.pageNum = 1
- this.showSkeleton = true
- this.getProductAgainInfo()
- this.isFocus = false
- }
- } else {
- this.pageNum = 1
- this.showSkeleton = true
- this.getcombinationProduct()
- this.isFocus = false
- }
- },
- getcombinationProduct(loadMore) {
- //组合搜索商品
- this.showLoading = true
- this.loadingNow = true
- this.loadingText = '加载中'
- this.isShowEmpty = false
- if (loadMore) {
- this.pageNum += 1
- }
- this.ProductService.GetSearchCombinationProduct({
- clubUserId: this.clubUserId,
- pageNum: this.pageNum,
- pageSize: this.zuhepageSize,
- searchWord: this.searchInputVal
- })
- .then(response => {
- this.isShowWrapper = true
- const responseData = response.data
- console.log(responseData)
- if (responseData.results && responseData.results.length > 0) {
- this.hasNextPage = responseData.hasNextPage
- this.isShowEmpty = false
- if (loadMore) {
- this.combinationProduct = [...this.combinationProduct, ...responseData.results]
- } else {
- this.combinationProduct = [...responseData.results]
- this.showSkeleton = false
- }
- // 防上拉暴滑
- this.pullFlag = false
- setTimeout(() => {
- this.pullFlag = true
- }, 500)
- // 底部提示文案
- if (this.hasNextPage) {
- this.loadingText = '上拉加载更多'
- } else {
- this.showLoading = true
- this.loadingNow = false
- }
- } else {
- this.isShowEmpty = true
- this.showSkeleton = false
- this.isShowEmptyText = '暂无相关商品'
- }
- })
- .catch(error => {
- this.$util.msg(error.msg, 2000)
- })
- },
- changeCountAdd(item, pros) {
- //商品数量加加
- if (pros.initProductNum == 0) {
- pros.initProductNum = pros.minBuyNumber
- this.processActivityPrice(pros)
- } else if (pros.initProductNum >= pros.minBuyNumber) {
- pros.initProductNum++
- this.processActivityPrice(pros)
- }
- this.totalPeice(item)
- this.totalCount(item)
- this.totalKind(item)
- },
- changeCountSub(item, pros) {
- //商品数量减减
- if (pros.initProductNum == 0) {
- this.$util.msg('采购数量不能小于0', 2000)
- return
- } else if (pros.initProductNum == pros.minBuyNumber) {
- pros.initProductNum = 0
- this.processActivityPrice(pros)
- } else {
- pros.initProductNum--
- this.processActivityPrice(pros)
- }
- this.totalPeice(item)
- this.totalCount(item)
- this.totalKind(item)
- },
- changeNnmber(e, item, pros) {
- //输入商品数量更新
- let _value = e.detail.value
- if (!this.$api.isNumber(_value)) {
- pros.initProductNum = pros.minBuyNumber
- } else if (_value < pros.minBuyNumber) {
- this.$util.msg(`该商品最小起订量为${pros.minBuyNumber}`, 2000)
- pros.initProductNum = pros.minBuyNumber
- } else {
- pros.initProductNum = parseInt(e.detail.value)
- this.processActivityPrice(pros)
- }
- this.totalPeice(item)
- this.totalCount(item)
- this.totalKind(item)
- },
- totalPeice(item) {
- //计算总价格,每次调用此方法,将初始值为0,遍历价格并累加
- let prosPrice = 0
- let productsList = []
- productsList = item.combinationProductList
- productsList.forEach(pros => {
- prosPrice += pros.price * pros.initProductNum
- item.productTotalAmount = prosPrice
- })
- // console.log(prosPrice)
- },
- totalCount(item) {
- //计算总数量
- let prosAllCount = 0
- let productsList = []
- productsList = item.combinationProductList
- productsList.forEach(pros => {
- prosAllCount += parseInt(pros.initProductNum)
- item.productTotalNum = prosAllCount
- })
- // console.log(prosAllCount)
- },
- totalKind(item) {
- //计算商品种类
- let productsList = []
- let checkList = []
- productsList = item.combinationProductList
- productsList.forEach(pros => {
- if (pros.initProductNum > 0) {
- checkList.push(pros)
- item.productKind = checkList.length
- } else {
- item.productKind = checkList.length
- }
- })
- },
- processActivityPrice(pros) {
- //单独处理活动价格和阶梯价格
- pros.totalPrice = pros.initProductNum * pros.price
- },
- operationHanld(prop) {
- this.$emit('operationConfim', prop)
- },
- alertjieti(pros) {
- this.$emit('alertjietiConfim', pros)
- },
- changeTab(index) {
- this.tabIndex = index
- if (index == 0) {
- this.pageNum = 1
- this.getProductAgainInfo()
- } else {
- this.getcombinationProduct()
- }
- // this.$emit('changetab',index);
- },
- navToDetailPage(id) {
- this.isModallayer = true
- this.$api.navigateTo(`/pages/goods/product?id=${id}`)
- this.isModallayer = false
- },
- repurchModel() {
- this.$util.modal('', '此商品的价格有变化,原来的购买价已不适用', '知道了', '', false, () => {})
- },
- onShowClose() {
- //输入框失去焦点时触发
- if (this.searchInputVal !== '') {
- this.isShowClose = true
- } else {
- this.isShowClose = false
- }
- },
- delInputText(tabIndex) {
- //清除输入框内容
- if (tabIndex == 0) {
- this.searchInputVal = ''
- this.listData = []
- this.isFocus = true
- this.isShowClose = false
- this.loadingNow = false
- this.isShowEmpty = true
- this.isShowEmptyText = '暂无相关商品'
- this.getProductAgainInfo()
- } else {
- this.searchInputVal = ''
- this.isShowClose = false
- this.isFocus = true
- this.getcombinationProduct()
- }
- },
- isInterceptHtmlFn(text) {
- let name = this.$reg.interceptHtmlFn(text)
- return name
- },
- PromotionsFormat(promo) {
- //促销活动类型数据处理
- if (promo != null) {
- if (promo.type == 1 && promo.mode == 1) {
- return true
- } else {
- return false
- }
- }
- return false
- },
- handleShowUnitPopup(pros, index) {
- // 组合商品规格弹窗
- this.handleProsData = pros
- this.popupShow = true
- },
- hanldeSupporUnitConfirm(data) {
- console.log('data', data)
- this.handleProsData.skuId = data.skuId
- this.handleProsData.unit = data.unit
- this.handleProsData.initProductNum = data.minBuyNumber
- },
- handleSkuClick(sku){//选择Sku
- this.handleProsData.unit = sku.unit
- this.handleProsData.price = sku.price
- this.handleProsData.originalPrice = sku.originalPrice
- this.handleProsData.initProductNum = sku.minBuyNumber
- },
- btnClick() {
- this.$emit('goCartPage')
- },
- btnTouchstart() {
- // console.log('btnTouchstart');
- },
- btnTouchend() {
- // console.log('btnTouchend');
- }
- }
- }
- </script>
- <style lang="scss">
- .all-zuhe-list {
- background: #ffffff;
- }
- .foot_conten {
- width: 655rpx;
- background: #fff;
- font-size: 28rpx;
- height: 80rpx;
- // line-height: 80rpx;
- display: inherit;
- padding: 10px;
- overflow: hidden;
- margin: 20rpx auto;
- }
- .zuhe_foot-box {
- float: left;
- overflow: hidden;
- white-space: nowrap;
- // text-overflow: ellipsis;
- width: 490rpx;
- }
- .zuhe_foot-box text {
- margin-right: 36rpx;
- }
- .foot_text {
- color: #ff2a2a;
- }
- .foot_conten .buycart {
- width: 162rpx;
- height: 64rpx;
- background: #efaf00 !important;
- color: #fff;
- font-size: 26rpx;
- border-radius: 36rpx;
- text-align: center;
- line-height: 64rpx;
- float: right;
- }
- .price-none {
- font-size: 24rpx;
- color: #666666;
- }
- .zuhe_title {
- background: #ffffff;
- height: 68rpx;
- font-size: 28rpx;
- color: #1675e1;
- border-bottom: 4rpx solid #1675e1;
- line-height: 68rpx;
- padding-left: 30rpx;
- &.active {
- color: #FF5B00;
- border-bottom: 4rpx solid #FF5B00;
- }
- }
- .tabstyle {
- width: 128rpx;
- height: 68rpx;
- font-size: 26rpx;
- display: inline-block;
- border-radius: 10rpx;
- text-align: center;
- line-height: 68rpx;
- border: 2rpx solid #eeeeee;
- position: relative;
- margin-right: 12rpx;
- &.addstyle {
- background: $btn-confirm;
- color: #ffffff;
- &::before {
- content: '';
- width: 0;
- height: 0;
- border-top: 20rpx solid transparent;
- border-right: 20rpx solid #ffffff;
- border-left: 20rpx solid transparent;
- border-bottom: 20rpx solid #ffffff;
- position: absolute;
- right: 0;
- bottom: 0;
- }
- }
- .icon-gou {
- width: 36rpx;
- height: 36rpx;
- line-height: 36rpx;
- text-align: center;
- color: #FF5B00;
- position: absolute;
- bottom: -5rpx;
- right: -5rpx;
- font-weight: bold;
- font-size: $font-size-28;
- }
- }
- .commodity-list-wrapper {
- scroll-view {
- height: 100%;
- }
- .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;
- }
- }
- .good-search {
- height: 68rpx;
- width: 100%;
- padding: 24rpx;
- background: #ffffff;
- display: flex;
- align-items: center;
- margin-bottom: 20rpx;
- position: fixed;
- top: 0;
- left: 0;
- z-index: 19;
- .search-from {
- width: 420rpx;
- height: 68rpx;
- background: #f7f7f7;
- border-radius: 8rpx;
- float: left;
- position: relative;
- .input {
- width: 340rpx;
- height: 68rpx;
- float: left;
- line-height: 68rpx;
- color: $text-color;
- font-size: $font-size-24;
- }
- .icon-iconfonticonfontsousuo1 {
- width: 64rpx;
- height: 68rpx;
- line-height: 68rpx;
- text-align: center;
- display: block;
- font-size: $font-size-38;
- float: left;
- color: #999999;
- }
- .icon-shanchu1 {
- font-size: $font-size-32;
- color: #999999;
- position: absolute;
- width: 120rpx;
- height: 68rpx;
- line-height: 68rpx;
- top: 0;
- right: 0;
- text-align: center;
- z-index: 10;
- }
- }
- .search-btn {
- // width: 120rpx;
- line-height: 64rpx;
- text-align: center;
- font-size: $font-size-28;
- color: $color-system;
- float: left;
- background: #ffffff;
- margin-left: 10rpx;
- }
- }
- .all-type-list-content {
- // height: 240rpx;
- padding: 24rpx;
- background: #fff;
- margin-bottom: 2rpx;
- display: flex;
- flex-direction: row;
- box-sizing: content-box;
- .list-details-image {
- width: 218rpx;
- height: 218rpx !important;
- margin-right: 26rpx;
- border-radius: 10rpx;
- border: 2rpx solid #f3f3f3;
- position: relative;
- .list-img {
- width: 218rpx;
- height: 218rpx !important;
- }
- .list-details-type {
- width: 64rpx;
- height: 64rpx;
- text-align: justify;
- box-sizing: border-box;
- padding: 10rpx;
- border-radius: 0 0 8rpx 8rpx;
- background-color: #33ccbf;
- font-size: $font-size-22;
- color: #ffffff;
- line-height: 25rpx;
- position: absolute;
- top: 0;
- right: 10rpx;
- }
- }
- }
- .zuhe-list-content {
- width: 655rpx;
- // height: 214rpx;
- background: #fff;
- border: 2rpx solid #def4ff;
- display: flex;
- flex-direction: row;
- box-sizing: content-box;
- margin-top: 10rpx;
- border-radius: 14rpx;
- margin: 10rpx auto;
- padding: 20rpx;
- &.stylecontent {
- border: 2rpx solid #fff0de;
- }
- }
- .list-details-info {
- width: 100%;
- flex-direction: column;
- font-size: 26rpx;
- position: relative;
- .list-details-title {
- line-height: 38rpx;
- text-overflow: ellipsis;
- overflow: hidden;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .list-details-specs {
- width: 100%;
- display: inline-block;
- margin: 5rpx 0;
- color: #666666;
- }
- .list-details-miniQuantity {
- width: 100%;
- display: inline-block;
- margin-top: 7rpx;
- }
- }
- .list-details-price {
- width: 100%;
- .floor-item-act {
- height: 54rpx;
- text-align: center;
- box-sizing: border-box;
- float: left;
- padding: 11rpx 0;
- }
- .price-icon {
- width: 22rpx;
- height: 28rpx;
- vertical-align: middle;
- margin-right: 10rpx;
- }
- .price-icon + text {
- font-size: 25rpx;
- vertical-align: middle;
- }
- .list-login-now {
- width: 375rpx;
- color: #f8c499;
- .p-no {
- float: left;
- font-size: $font-size-24;
- color: $color-system;
- margin-right: 10rpx;
- }
- }
- .login-now {
- padding: 10rpx 10rpx 10rpx 0;
- }
- .list-none {
- margin-top: 15rpx;
- .price-small {
- font-size: $font-size-24;
- line-height: 40rpx;
- color: #ff2a2a;
- }
- }
- .list-price-loding {
- font-size: $font-size-24;
- line-height: 54rpx;
- color: #ff2a2a;
- }
- .list-shop {
- float: left;
- overflow: hidden;
- &.com {
- width: 100%;
- }
- .list-price {
- color: #ff2a2a;
- float: left;
- line-height: 54rpx;
- align-items: center;
- justify-content: center;
- .price-larger {
- font-size: $font-size-26;
- display: inline-block;
- &.none {
- text-decoration: line-through;
- color: #999999;
- }
- }
- .list-price-all {
- width: 100%;
- float: left;
- }
- .zuhe_price-larger {
- width: 100%;
- float: left;
- height: 54rpx;
- color: #666666;
- .price-larger {
- float: left;
- margin-right: 20rpx;
- }
- .price-btn {
- display: inline-block;
- padding: 0 16rpx;
- line-height: 32rpx;
- border-radius: 16rpx;
- text-align: center;
- box-sizing: border-box;
- border: 1px solid #FF5B00;
- font-size: 24rpx;
- color: #FF5B00;
- margin-left: 30rpx;
- }
- }
- .price-two {
- color: #666666;
- float: left;
- }
- .zuhe_list_zj {
- color: #ff2a2a;
- }
- .price-view {
- display: inline-block;
- width: 40rpx;
- border-radius: 10rpx;
- font-size: $font-size-22;
- text-align: center;
- color: #ffffff;
- height: 36rpx;
- line-height: 36rpx;
- margin-right: 8rpx;
- &.ladder {
- background: linear-gradient(135deg, rgba(255, 0, 0, 1) 0%, rgba(242, 143, 49, 1) 100%);
- }
- &.activity {
- background: linear-gradient(135deg, rgba(128, 0, 255, 1) 0%, rgba(242, 49, 153, 1) 100%);
- }
- }
- }
- .zuhe_list_price .price-view {
- margin-left: 20rpx;
- float: left;
- margin-top: 5rpx;
- }
- .zuhe_list_price {
- width: 100%;
- overflow: hidden;
- margin-top: 10rpx;
- }
- .count {
- float: right;
- border: 1px solid #eeeeee;
- border-radius: 10rpx;
- .number-box {
- display: flex;
- justify-content: center;
- align-items: center;
- .iconfont {
- font-size: $font-size-24;
- padding: 0 16rpx;
- color: $text-color;
- text-align: center;
- line-height: 48rpx;
- font-weight: bold;
- }
- .btn-input {
- width: 100rpx;
- height: 48rpx;
- line-height: 48rpx;
- background: #f8f8f8;
- border-radius: 4rpx;
- text-align: center;
- font-size: $font-size-24;
- border-right: 1px solid #eeeeee;
- border-left: 1px solid #eeeeee;
- }
- }
- }
- .list-price-none {
- width: 100%;
- .price-none {
- text-decoration: line-through;
- color: #999999;
- display: inline-block;
- }
- .icon-wenhao {
- font-size: $font-size-32;
- color: #0091ff;
- margin-left: 6rpx;
- }
- }
- }
- .add-cart-btn {
- flex: 4;
- width: 140rpx;
- height: 54rpx;
- line-height: 54rpx;
- border-radius: 27rpx;
- color: #fff;
- font-size: 24rpx;
- margin-right: 0;
- background: #ffffff;
- border: 1px solid #c9c9c9;
- color: $text-color;
- }
- .zuhe_btn {
- float: right;
- }
- }
- .zuhe_list_price {
- display: block !important;
- }
- .zuhe_list_text {
- margin-top: 0;
- }
- </style>
|