|
|
|
<template>
|
|
|
|
<view class="bg">
|
|
|
|
<view :class="['search-header',methodPopShow?'methodShow':'']" :style="{'height': height+'px','padding-top':statusBarHeight+'px','z-index':(typePopShow||methodPopShow)?999:10}">
|
|
|
|
<uni-icons type="left" size="20" @click="goBack" style="flex-shrink: 0;"></uni-icons>
|
|
|
|
<view class="input-model" @click="goSearch()">
|
|
|
|
<uni-icons style="height: 1.4rem;line-height: 1.4rem;" type="search" size="15" color="#ABAAAD" ></uni-icons>
|
|
|
|
<input class="input-text" placeholder="搜索"></text>
|
|
|
|
<view class="search-btn" >搜索</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<div v-show="!methodPopShow" :style="{'height':height+'px','flex-shrink':0}"></div>
|
|
|
|
|
|
|
|
<!-- 正常产品 -->
|
|
|
|
<template>
|
|
|
|
<view style="width: 100%;position: relative;" :class="[methodPopShow?'methodShow':'']">
|
|
|
|
<scroll-view class="type-container scroll-view flex-row-scroll-view" scroll-x="true" scroll-with-animation="true" enable-flex
|
|
|
|
:scroll-into-view="scrollIntoView">
|
|
|
|
<view :id="`item-${i}`" :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
|
|
|
|
<view class="img-container" >
|
|
|
|
<image :src="showImg(item.image)"></image>
|
|
|
|
</view>
|
|
|
|
<view class="type-name">{{item.name}}</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view style="height: 1rpx;width: 70rpx;flex-shrink: 0;"></view>
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
<view class="more-btn" @click="showTypes(true)">
|
|
|
|
展开<image style="width: 22rpx;height: 22rpx;" src="https://static.ticket.sz-trip.com/uploads/20250617/42345fdf6426e5dd533fd7461c3642a0.png"></image>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
|
|
<view class="goods-container">
|
|
|
|
<view class="left-box no-scrollbar" v-if="typeChild.length>0">
|
|
|
|
<view :class="['left-type-item',i==typeChildIndex?'active':'']"
|
|
|
|
v-for="(item,i) in typeChild" :key="i" @click="changeChildType(item,i)">
|
|
|
|
<view class="name-item">{{item.name}}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="right-box">
|
|
|
|
<view :class="['search-container',methodPopShow?'methodShow':'']">
|
|
|
|
<view class="common-view" @click="showMethodPopup()">
|
|
|
|
<text :class="[delivery_method.length>0?'active-search-item':'']">配送方式</text>
|
|
|
|
<view :class='[methodPopShow?"delivery-active":"delivery-no"]'>
|
|
|
|
<uni-icons :color="delivery_method.length?'#6A8A2D':'#000'" type="left" size="13"></uni-icons>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="common-view">
|
|
|
|
<text :class="[search_type==0?'active-search-item':'']" @click="changeSearchParm(0)">综合</text>
|
|
|
|
</view>
|
|
|
|
<view class="common-view">
|
|
|
|
<!-- <text :class="[[1,2].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(search_type==1?2:1)">销量</text>
|
|
|
|
<view class="search-item">
|
|
|
|
<view :class="[search_type==1?'active-search-item':'','triangle-up']" @click="changeSearchParm(1)">▼</view>
|
|
|
|
<view :class="[search_type==2?'active-search-item':'']" @click="changeSearchParm(2)">▼</view>
|
|
|
|
</view> -->
|
|
|
|
<text :class="[[1,2].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(2)">销量</text>
|
|
|
|
</view>
|
|
|
|
<view class="common-view">
|
|
|
|
<text :class="[[3,4].includes(search_type)?'active-search-item':'']" @click="changeSearchParm(search_type==3?4:3)">价格</text>
|
|
|
|
<view class="search-item">
|
|
|
|
<view :class="[search_type==3?'active-search-item':'','triangle-up']" @click="changeSearchParm(3)">▼</view>
|
|
|
|
<view :class="[search_type==4?'active-search-item':'']" @click="changeSearchParm(4)">▼</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<scroll-view class="right-container no-scrollbar" :scroll-y="true" @scrolltolower="scrollLow()">
|
|
|
|
<view class="item" v-for="item in list" :key="item.id" @click="viewDetail(item)">
|
|
|
|
<view class="item-img" style="position: relative;">
|
|
|
|
<image class="item-img" :src="showImg(item.headimg)" mode=""></image>
|
|
|
|
<view class="hover-use-type" v-if="item.delivery_method">
|
|
|
|
{{item.delivery_method_str.join('/')}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="content">
|
|
|
|
<view class="title text-overflowRows">{{item.title}}</view>
|
|
|
|
<!-- <view style="font-weight: 500;font-size: 21rpx;color: #999999;">已售{{item.sales_number}}</view> -->
|
|
|
|
<view class="tag-container" v-if="item.display_tags">
|
|
|
|
<view class="tag text-overflow" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">{{tag}}</view>
|
|
|
|
</view>
|
|
|
|
<view class="bottom">
|
|
|
|
<view>
|
|
|
|
<text class="price">{{item.price/100}}</text>
|
|
|
|
<text class="oldPrice">¥{{item.market_price/100}}</text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="buy-cart" @click.stop="showOrderCart(item)">+</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="no-data-zhanwei" v-if="list.length<=0">
|
|
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250618/0c2a469b4216f8cd570822b642d0a0fe.png"></image>
|
|
|
|
<view style="padding:50rpx 0 67rpx">暂无数据</view>
|
|
|
|
</view>
|
|
|
|
<view style="height: 148rpx;width: 1rpx;"></view>
|
|
|
|
</scroll-view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<!-- 搜索 -->
|
|
|
|
<!-- <view v-else style="flex: 1;" class="flex-column">
|
|
|
|
<view class="search-container" style="background: #FFFFFF;">
|
|
|
|
<view >
|
|
|
|
<text :class="[search_type==0?'active-search-item':'']" @click="changeSearchParm(0)">综合</text>
|
|
|
|
</view>
|
|
|
|
<view >
|
|
|
|
<text :class="[[1,2].includes(search_type)?'active-search-item':'']">销量</text>
|
|
|
|
<view class="search-item">
|
|
|
|
<view :class="[search_type==1?'active-search-item':'','triangle-up']" @click="changeSearchParm(1)">▼</view>
|
|
|
|
<view :class="[search_type==2?'active-search-item':'']" @click="changeSearchParm(2)">▼</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view >
|
|
|
|
<text :class="[[3,4].includes(search_type)?'active-search-item':'']">价格</text>
|
|
|
|
<view class="search-item">
|
|
|
|
<view :class="[search_type==3?'active-search-item':'','triangle-up']" @click="changeSearchParm(3)">▼</view>
|
|
|
|
<view :class="[search_type==4?'active-search-item':'']" @click="changeSearchParm(4)">▼</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view v-if="searchList.length<=0" class="flex-center" style="width: 100%;height: 100%;flex-direction: column;">
|
|
|
|
<view style="font-weight: 500;font-size: 28rpx;color: #666666;
|
|
|
|
text-align: center;margin-top: 67rpx;padding-bottom: 300rpx;">暂无搜索结果</view>
|
|
|
|
</view>
|
|
|
|
<scroll-view class="right-container no-scrollbar" :scroll-y="true" @scrolltolower="scrollLow()" v-else>
|
|
|
|
<view class="search-result" >
|
|
|
|
<view v-for="(item,i) in searchList" class="search-item" :key="i" @click="viewDetail(item.goods)">
|
|
|
|
<image :src="showImg(item.headimg)" mode="aspectFill"></image>
|
|
|
|
<view class="search-result-container">
|
|
|
|
<view>
|
|
|
|
<view class="title text-overflowRows">{{item.title}}</view>
|
|
|
|
<view class="tags text-overflow" v-if="item.display_tags">
|
|
|
|
<view class="tag" v-for="(tag,tagI) in item.display_tags.split(',')" :key="tagI">
|
|
|
|
{{tag}}
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="flex-between" style="padding-top: 20rpx;">
|
|
|
|
<view>
|
|
|
|
<text class="price">{{item.price/100}}</text>
|
|
|
|
<text class="oldPrice">{{item.market_price/100}}</text>
|
|
|
|
</view>
|
|
|
|
<view class="buy-cart" style="border-radius: 8rpx;" @click.stop="showOrderCart(item)">+</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</scroll-view >
|
|
|
|
</view> -->
|
|
|
|
|
|
|
|
<!-- 购物车 -->
|
|
|
|
<view class="btn-bottom" >
|
|
|
|
<cartDataVue ref="cartDataVueRef" :paramData="paramData" @changeParamData="changeParamData" style="width: 100%;height: 100%;">
|
|
|
|
<template slot="content">
|
|
|
|
<view class="btn-list">
|
|
|
|
<view class="left-box">
|
|
|
|
<uni-badge class="uni-badge-left-margin" :text="paramData.num" absolute="rightTop" :offset="[5, 5]" size="small"
|
|
|
|
:custom-style="{background:'#D90F01',color:'#ffffff',border:'1px solid #ffffff'}">
|
|
|
|
<view class="img-box" @click.stop="showCartClick">
|
|
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250616/d716b89802b12b14c9c186e68a3ea754.png" mode="aspectFill"></image>
|
|
|
|
</view>
|
|
|
|
</uni-badge>
|
|
|
|
<view class="bottom-price">
|
|
|
|
<text style="color: #000000;">总计:</text>
|
|
|
|
¥
|
|
|
|
<view class="bottom-price-yuan">{{paramData.iNum}}</view>
|
|
|
|
<view>.{{paramData.fNum}}</view>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
<view class="btn-buy" @click="goCartOrder">
|
|
|
|
去下单
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
</cartDataVue>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<uni-popup ref="popup" type="bottom" :safe-area="true">
|
|
|
|
<view class="popup-content" v-if="sku.length>0">
|
|
|
|
<view @click="closePopup" style="padding: 31rpx 0 0 639rpx;width: 50rpx;height: 80rpx;">
|
|
|
|
<uni-icons type="closeempty" size="24"></uni-icons>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="bottom-productImg">
|
|
|
|
<image :src="showImg(sku[productIndex].headimg)" alt=""></image>
|
|
|
|
<view class="right-content">
|
|
|
|
<view class="bottom-productPrice com-price">{{(sku[productIndex].price||0)/100}}</view>
|
|
|
|
<view class="bottom-content">已选择:{{sku[productIndex].sku_name}}</view>
|
|
|
|
|
|
|
|
<view class="buy-num com-flex-tao">
|
|
|
|
<view class="number-btn">
|
|
|
|
<view>
|
|
|
|
<text @click="delNumber">-</text>
|
|
|
|
</view>
|
|
|
|
<view style="flex: 1;">{{ buyNum }}</view>
|
|
|
|
<view>
|
|
|
|
<text @click="addNumber">+</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view style="max-height: 600rpx;overflow-y: auto;">
|
|
|
|
<view class="sp">规格</view>
|
|
|
|
<view class="sp-container">
|
|
|
|
<view style="position:relative;max-width: 100%;" v-for="(botItem,botIndex) in sku" :key="botIndex">
|
|
|
|
<view :class="['botProduct','text-overflow',{'noStore':botItem.store==0},{'botProducts':productIndex==botIndex}]"
|
|
|
|
@click="changeProduct(botItem,botIndex)">
|
|
|
|
<image :src="showImg(botItem.headimg)"></image>
|
|
|
|
<view class="sku-name">{{botItem.sku_name}}</view>
|
|
|
|
</view>
|
|
|
|
<view class="noStore-text" v-if="botItem.store==0">
|
|
|
|
不可购买
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="flex-between" style="padding-top: 20rpx;" v-if="sku[productIndex]">
|
|
|
|
配送方式
|
|
|
|
<view class="flex-center" >
|
|
|
|
<view class="flex-center" v-if="sku[productIndex].use_type!=1" @click="changeSelectSkuPost(1)">
|
|
|
|
<view class="select-cycle" v-show="sku[productIndex].user_type!==1"></view>
|
|
|
|
<view class="select-cycle selected" v-show="sku[productIndex].user_type===1">
|
|
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png">
|
|
|
|
</view>
|
|
|
|
<view style="padding:0 30rpx 0 10rpx;">邮寄</view>
|
|
|
|
</view>
|
|
|
|
<view class="flex-center" v-if="sku[productIndex].use_type!=0" @click="changeSelectSkuPost(2)">
|
|
|
|
<view class="select-cycle" v-show="sku[productIndex].user_type!==2"></view>
|
|
|
|
<view class="select-cycle selected" v-show="sku[productIndex].user_type===2">
|
|
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png">
|
|
|
|
</view>
|
|
|
|
<view style="padding:0 30rpx 0 10rpx;">自提</view>
|
|
|
|
</view>
|
|
|
|
<view class="flex-center" v-if="sku[productIndex].is_delivery" @click="changeSelectSkuPost(3)">
|
|
|
|
<view class="select-cycle" v-show="sku[productIndex].user_type!==3"></view>
|
|
|
|
<view class="select-cycle selected" v-show="sku[productIndex].user_type===3">
|
|
|
|
<image src="https://static.ticket.sz-trip.com/uploads/20250617/c87afc2e461a01af35c71fb46ef0859d.png">
|
|
|
|
</view>
|
|
|
|
<view style="padding:0 10rpx;">配送</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="placeholder-content">
|
|
|
|
<view style="height: 100rpx;"></view>
|
|
|
|
<view class="btn-cover">
|
|
|
|
<view class="btn" @click.stop="addToCart">加入购物车</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</uni-popup>
|
|
|
|
|
|
|
|
<!-- 全部分类 -->
|
|
|
|
<uni-popup ref="typePopup" type="top" @change="changeTypePop">
|
|
|
|
<view class="typePopup-container">
|
|
|
|
<view class="place-area" :style="{'height': height+'px'}"></view>
|
|
|
|
<view class="type-container typedata-container">
|
|
|
|
<view :class="['type-item',typeIndex==i?'active':'']" v-for="(item,i) in typeParam" :key="i" @click="changeType(item,i)">
|
|
|
|
<view class="img-container" >
|
|
|
|
<image :src="showImg(item.image)"></image>
|
|
|
|
</view>
|
|
|
|
<view class="type-name">{{item.name}}</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
<view class="bottom-close" @click="showTypes(false)">收起 <text class="triangle-up">▼</text></view>
|
|
|
|
</view>
|
|
|
|
</uni-popup>
|
|
|
|
|
|
|
|
<uni-popup ref="methodPopup" type="top" @change="changeMethodPopup" :animation="false">
|
|
|
|
<view class="typePopup-container">
|
|
|
|
<view class="place-area" :style="{'height': (height+128)+'px'}"></view>
|
|
|
|
<view class="method-container">
|
|
|
|
<view class="method-item flex-between" v-for="(item,i) in deliverData" :key="i"
|
|
|
|
@click="selectMethod(item)">
|
|
|
|
<view>{{item.title}}</view>
|
|
|
|
<uni-icons v-if="delivery_method.includes(item.value)" type="checkmarkempty" size="14" color="#6A8A2D"></uni-icons>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</view>
|
|
|
|
</uni-popup>
|
|
|
|
|
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import cartDataVue from 'components/cartData.vue'
|
|
|
|
export default {
|
|
|
|
components: {cartDataVue},
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
// 导航栏参数
|
|
|
|
height: 0,
|
|
|
|
statusBarHeight: 0,
|
|
|
|
headImg: "https://cgc.js-dyyj.com/uploads/20250513/f8b255f965efcd71b6843e4b72c3f1f3.png",
|
|
|
|
|
|
|
|
type_pid: 20,
|
|
|
|
// 第一层分类
|
|
|
|
typeParam: [],
|
|
|
|
typeIndex: 0,
|
|
|
|
// 第二层分类
|
|
|
|
typeChild: [],
|
|
|
|
typeChildIndex: 0,
|
|
|
|
|
|
|
|
list:[],
|
|
|
|
finished: false,
|
|
|
|
|
|
|
|
paramData: {allPrice: 0,iNum:0, fNum:'00', showCart: false, num: 0},
|
|
|
|
|
|
|
|
currentGoods: {},
|
|
|
|
sku: [],
|
|
|
|
productIndex: 0,
|
|
|
|
buyNum: 1,
|
|
|
|
cartDataVueShow: false,
|
|
|
|
|
|
|
|
searchText: '',
|
|
|
|
searchList: [],
|
|
|
|
searchFinish: false,
|
|
|
|
|
|
|
|
search_type: 0,
|
|
|
|
delivery_method: [],
|
|
|
|
deliverData: [
|
|
|
|
{title: '邮寄', value: 1},
|
|
|
|
{title: '自提', value: 2},
|
|
|
|
{title: '配送', value: 3}
|
|
|
|
],
|
|
|
|
typePopShow: false,
|
|
|
|
methodPopShow: false,
|
|
|
|
scrollIntoView: '',
|
|
|
|
|
|
|
|
}
|
|
|
|
},
|
|
|
|
onLoad(options) {
|
|
|
|
// this.getHeadImg("techan").then(res => {this.headImg = res})
|
|
|
|
if (options.idIndex) {
|
|
|
|
try {
|
|
|
|
this.typeIndex = Number(options.idIndex)
|
|
|
|
} catch(e) {
|
|
|
|
this.typeIndex = 0
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
onReady() {
|
|
|
|
this.initRectInfo()
|
|
|
|
// this.getList()
|
|
|
|
this.getTypeTags()
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
initRectInfo () {
|
|
|
|
const sysInfo = uni.getSystemInfoSync()
|
|
|
|
this.statusBarHeight = sysInfo.statusBarHeight
|
|
|
|
// 默认高度
|
|
|
|
this.height = sysInfo.statusBarHeight + 40
|
|
|
|
},
|
|
|
|
changeSelectPosition (index) {
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
index=index-2;
|
|
|
|
if (index<0) {index=0}
|
|
|
|
// 小程序:使用scroll-into-view
|
|
|
|
this.scrollIntoView = `item-${index}`;
|
|
|
|
// 强制刷新(解决偶发不滚动问题)
|
|
|
|
setTimeout(() => {
|
|
|
|
this.scrollIntoView = `item-${index}`;
|
|
|
|
}, 100);
|
|
|
|
})
|
|
|
|
},
|
|
|
|
changeTypePop (e) {
|
|
|
|
this.typePopShow = e.show
|
|
|
|
},
|
|
|
|
changeMethodPopup (e) {
|
|
|
|
this.methodPopShow = e.show
|
|
|
|
// if (e.show) {
|
|
|
|
// } else {
|
|
|
|
// setTimeout(()=>{this.methodPopShow = e.show},500)
|
|
|
|
// }
|
|
|
|
},
|
|
|
|
showMethodPopup () {
|
|
|
|
if (this.methodPopShow) {
|
|
|
|
this.$refs.methodPopup.close()
|
|
|
|
} else {
|
|
|
|
this.$refs.methodPopup.open()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
selectMethod (item) {
|
|
|
|
let index = this.delivery_method.findIndex(v=>v==item.value)
|
|
|
|
if (index>=0) {
|
|
|
|
this.delivery_method.splice(index,1)
|
|
|
|
} else {
|
|
|
|
this.delivery_method.push(item.value)
|
|
|
|
}
|
|
|
|
this.finished = false
|
|
|
|
this.list = []
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取第一层分类
|
|
|
|
getTypeTags () {
|
|
|
|
this.Post({
|
|
|
|
pid: this.type_pid
|
|
|
|
},'/api/product/tag_list').then(res => {
|
|
|
|
this.typeParam = res.data || []
|
|
|
|
this.getChildType()
|
|
|
|
// this.getList()
|
|
|
|
// 初始化选中位置
|
|
|
|
this.changeSelectPosition(this.typeIndex)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
changeType (item, i) {
|
|
|
|
if (this.typeIndex!== i) {
|
|
|
|
this.typeIndex=i
|
|
|
|
this.finished = false
|
|
|
|
this.list = []
|
|
|
|
this.getChildType()
|
|
|
|
// this.getList()
|
|
|
|
this.showTypes(false)
|
|
|
|
}
|
|
|
|
this.changeSelectPosition(i)
|
|
|
|
|
|
|
|
},
|
|
|
|
// 第二层分类
|
|
|
|
getChildType (pid) {
|
|
|
|
let id = this.typeParam[this.typeIndex].id
|
|
|
|
if (pid) { id = pid }
|
|
|
|
this.Post({pid: id},'/api/product/tag_list').then(res => {
|
|
|
|
this.typeChild = res.data || []
|
|
|
|
this.typeChildIndex = 0
|
|
|
|
this.getList()
|
|
|
|
})
|
|
|
|
},
|
|
|
|
changeChildType (item,i) {
|
|
|
|
if (this.typeChildIndex!== i) {
|
|
|
|
this.typeChildIndex=i
|
|
|
|
this.finished = false
|
|
|
|
this.list = []
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
changeSearchParm(value) {
|
|
|
|
this.search_type = value
|
|
|
|
this.finished = false
|
|
|
|
this.list = []
|
|
|
|
this.getList()
|
|
|
|
},
|
|
|
|
|
|
|
|
// 根据产品分类获取产品列表
|
|
|
|
getList(){
|
|
|
|
let tag_id = this.typeParam[this.typeIndex].id;
|
|
|
|
if (this.typeChild[this.typeChildIndex]&&this.typeChild[this.typeChildIndex].id) {
|
|
|
|
tag_id = this.typeChild[this.typeChildIndex].id
|
|
|
|
}
|
|
|
|
|
|
|
|
let param = {}
|
|
|
|
if (this.search_type == 1) { param = {order: 'asc',sort:'sales_number'} }
|
|
|
|
if (this.search_type == 2) { param = {order: 'desc',sort:'sales_number'} }
|
|
|
|
if (this.search_type == 3) { param = {order: 'asc',sort:'price'} }
|
|
|
|
if (this.search_type == 4) { param = {order: 'desc',sort:'price'} }
|
|
|
|
param.delivery_method = this.delivery_method.join(',')
|
|
|
|
this.Post({
|
|
|
|
tag_id: tag_id,
|
|
|
|
offset: this.list.length,
|
|
|
|
limit: 10,
|
|
|
|
...param
|
|
|
|
},'/api/product/get_product_by_tag').then(res => {
|
|
|
|
let resData = res.data.list
|
|
|
|
resData.forEach(v=>{
|
|
|
|
if (v.delivery_method) {
|
|
|
|
v.delivery_method_str = this.getDeliveryMethodStr(v.delivery_method)
|
|
|
|
}
|
|
|
|
})
|
|
|
|
this.list = [...this.list, ...resData];
|
|
|
|
if (resData.length < 10) {
|
|
|
|
this.finished = true
|
|
|
|
}
|
|
|
|
console.log(this.list)
|
|
|
|
})
|
|
|
|
},
|
|
|
|
scrollLow () {
|
|
|
|
if (!this.finished) {
|
|
|
|
this.getList()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
viewDetail(item) {
|
|
|
|
// this.goOtherDetail(item)
|
|
|
|
|
|
|
|
uni.navigateTo({
|
|
|
|
url: '/subPackages/techan/detail?id=' + item.id
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
showCartClick () {
|
|
|
|
if (this.paramData.showCart) {
|
|
|
|
this.$refs.cartDataVueRef.closePopup()
|
|
|
|
} else {
|
|
|
|
this.$refs.cartDataVueRef.openPop()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
changeParamData (data) {
|
|
|
|
for(let key in this.paramData) {
|
|
|
|
this.paramData[key] = data[key]
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
// 购物车相关
|
|
|
|
showOrderCart (item) {
|
|
|
|
console.log(item)
|
|
|
|
this.sku = []
|
|
|
|
this.productIndex = 0
|
|
|
|
this.buyNum = 1
|
|
|
|
this.currentGoods = JSON.parse(JSON.stringify(item))
|
|
|
|
this.getSpecificationsByGoodsId(item.id)
|
|
|
|
},
|
|
|
|
changeProduct(item,index) {
|
|
|
|
if (item.store==0) {
|
|
|
|
uni.showToast({
|
|
|
|
title:"库存不足!",
|
|
|
|
icon:'none'
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
this.productIndex = index
|
|
|
|
},
|
|
|
|
changeSelectSkuPost (val) {
|
|
|
|
let sInfo = this.sku[this.productIndex]
|
|
|
|
if (sInfo) {
|
|
|
|
this.$set(sInfo, "user_type",val)
|
|
|
|
}
|
|
|
|
},
|
|
|
|
|
|
|
|
getSpecificationsByGoodsId(goods_id) {
|
|
|
|
this.Post({id: goods_id},'/api/product/get_product_detail'
|
|
|
|
).then(res => {
|
|
|
|
if (res) {
|
|
|
|
this.sku = res.data.sku || [];
|
|
|
|
if (!this.sku||this.sku.length<=0) {
|
|
|
|
uni.showToast({
|
|
|
|
title:'暂无可选规格',
|
|
|
|
icon:'none'
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
this.openPop()
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
//数量加减
|
|
|
|
addNumber() {
|
|
|
|
this.buyNum += 1;
|
|
|
|
},
|
|
|
|
delNumber() {
|
|
|
|
if (this.buyNum <= 1) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
this.buyNum -= 1;
|
|
|
|
},
|
|
|
|
closePopup() {
|
|
|
|
this.$refs.popup.close()
|
|
|
|
},
|
|
|
|
openPop(){
|
|
|
|
this.$refs.popup.open()
|
|
|
|
},
|
|
|
|
addToCart() {
|
|
|
|
let goods = this.sku[this.productIndex]
|
|
|
|
if (![1,2,3].includes(goods.user_type)) {
|
|
|
|
uni.showToast({
|
|
|
|
title: "请选择配送方式",
|
|
|
|
icon:"none"
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
|
|
|
|
goods.buyNum = this.buyNum
|
|
|
|
this.Post({sku_id: goods.id,num: this.buyNum,delivery_method: goods.user_type},'/api/cart/add_sku').then(res => {
|
|
|
|
if (res.code == 1) {
|
|
|
|
uni.showToast({title: res.msg,icon: 'none'});
|
|
|
|
uni.$emit("updateDataByConnect", {msgType:'updateCartDataInfo',data:null})
|
|
|
|
this.closePopup()
|
|
|
|
// this.$refs.cartDataVueRef.openPop()
|
|
|
|
}
|
|
|
|
});
|
|
|
|
},
|
|
|
|
goCartOrder () {
|
|
|
|
this.$refs.cartDataVueRef.goCartOrder()
|
|
|
|
},
|
|
|
|
|
|
|
|
goSearch () {
|
|
|
|
uni.navigateTo({
|
|
|
|
url:'/subPackages/search/index?type=techan'
|
|
|
|
})
|
|
|
|
},
|
|
|
|
//搜索
|
|
|
|
search (isMore) {
|
|
|
|
if (this.searchText.trim().length<=0) {
|
|
|
|
uni.showToast({
|
|
|
|
title:'请输入搜索关键字',
|
|
|
|
icon:'none'
|
|
|
|
})
|
|
|
|
return
|
|
|
|
}
|
|
|
|
if (!isMore) {
|
|
|
|
this.searchList = []
|
|
|
|
this.searchFinish = false
|
|
|
|
}
|
|
|
|
this.Post({
|
|
|
|
title: this.searchText.trim(),
|
|
|
|
offset: this.searchList.length,
|
|
|
|
// type: 'pgoods',
|
|
|
|
tag_id: this.type_pid,
|
|
|
|
limit: 20,
|
|
|
|
}, '/api/product/get_product_by_tag').then(res => {
|
|
|
|
this.searchList = [...this.searchList, ...res.data.list];
|
|
|
|
console.log(this.searchList, res)
|
|
|
|
this.searchFinish = false
|
|
|
|
if (res.data.length<10) {
|
|
|
|
this.searchFinish = true
|
|
|
|
}
|
|
|
|
})
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
|
|
showTypes(flag) {
|
|
|
|
if (flag) {
|
|
|
|
this.$refs.typePopup.open()
|
|
|
|
} else {
|
|
|
|
this.$refs.typePopup.close()
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
onReachBottom() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
view {
|
|
|
|
box-sizing: border-box;
|
|
|
|
}
|
|
|
|
.search-header{
|
|
|
|
width: 100%;
|
|
|
|
position: fixed;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
right: 0;
|
|
|
|
background: white;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
padding-left: 10rpx;
|
|
|
|
padding-right: 120px;
|
|
|
|
background: #EDF5DC;
|
|
|
|
// #ifdef H5
|
|
|
|
padding-right: 20rpx;
|
|
|
|
// #endif
|
|
|
|
|
|
|
|
.input-model{
|
|
|
|
flex: 1;
|
|
|
|
width: 1rpx;
|
|
|
|
height: 64rpx;
|
|
|
|
background: white;
|
|
|
|
border-radius: 55rpx;
|
|
|
|
margin-left: 12rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #ABAAAD;
|
|
|
|
padding-left: 24rpx;
|
|
|
|
}
|
|
|
|
.input-text{
|
|
|
|
height:19px;
|
|
|
|
padding-left: 14rpx;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #030000;
|
|
|
|
// #ifdef H5
|
|
|
|
width: 500rpx;
|
|
|
|
// #endif
|
|
|
|
}
|
|
|
|
.search-btn{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 29rpx;
|
|
|
|
color: #6A8A2D;
|
|
|
|
border-left: 1px solid #CCCCCC;
|
|
|
|
padding-left: 25rpx;
|
|
|
|
width: 85rpx;
|
|
|
|
height: 50%;
|
|
|
|
line-height: 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.bg {
|
|
|
|
height: 100vh;
|
|
|
|
padding-bottom: 26rpx;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
background: #F8FAFB;
|
|
|
|
}
|
|
|
|
|
|
|
|
.type-container{
|
|
|
|
display: flex;
|
|
|
|
height: 133rpx;
|
|
|
|
background: #EDF5DC;
|
|
|
|
width: 100%;
|
|
|
|
padding: 8rpx 0;
|
|
|
|
.type-item{
|
|
|
|
height: 120rpx;
|
|
|
|
width: 150rpx;
|
|
|
|
flex-shrink: 0;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 23rpx;
|
|
|
|
color: #111111;
|
|
|
|
text-align: center;
|
|
|
|
.img-container{
|
|
|
|
width: 80rpx;
|
|
|
|
height: 80rpx;
|
|
|
|
padding: 2rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
image{
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.type-name{
|
|
|
|
max-width: 100%;
|
|
|
|
padding: 0 10rpx;
|
|
|
|
height: 30rpx;
|
|
|
|
line-height: 30rpx;
|
|
|
|
word-break: keep-all;
|
|
|
|
}
|
|
|
|
&.active{
|
|
|
|
.img-container{
|
|
|
|
border: 2rpx solid #6A8A2D;
|
|
|
|
}
|
|
|
|
.type-name{
|
|
|
|
background: #6A8A2D;
|
|
|
|
border-radius: 7rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
.more-btn{
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
bottom: 0;
|
|
|
|
height: 100%;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #111111;
|
|
|
|
width: 67rpx;
|
|
|
|
background: #EDF5DC;
|
|
|
|
padding: 24rpx 20rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 1.2;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tag-container{
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-wrap: nowrap;
|
|
|
|
overflow: hidden;
|
|
|
|
.tag{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 20rpx;
|
|
|
|
color: #6A8A2D;
|
|
|
|
border-radius: 7rpx;
|
|
|
|
border: 1px solid #6A8A2D;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
padding: 3rpx 6rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.goods-container{
|
|
|
|
height: 1rpx;
|
|
|
|
flex: 1;
|
|
|
|
display: flex;
|
|
|
|
background: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-container{
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 27rpx;
|
|
|
|
color: #000000;
|
|
|
|
height: 100rpx;
|
|
|
|
flex-shrink: 0;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
&>.common-view{
|
|
|
|
display: flex;
|
|
|
|
min-width: 70rpx;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
.search-item{
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
line-height: 16rpx;
|
|
|
|
font-size: 14rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.right-container{
|
|
|
|
flex: 1;
|
|
|
|
width: 100%;
|
|
|
|
height: 1rpx;
|
|
|
|
background: white;
|
|
|
|
.item {
|
|
|
|
width: 100%;
|
|
|
|
padding:0 20rpx 32rpx 20rpx;
|
|
|
|
display: flex;
|
|
|
|
.item-img {
|
|
|
|
width: 161rpx;
|
|
|
|
height: 161rpx;
|
|
|
|
border-radius: 15rpx;
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
.content {
|
|
|
|
height: 161rpx;
|
|
|
|
padding-left: 24rpx;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex: 1;
|
|
|
|
width: 100rpx;
|
|
|
|
}
|
|
|
|
.title {
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #000000;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
.bottom {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
.price {
|
|
|
|
font-size: 33.33rpx;
|
|
|
|
color: #DC2525;
|
|
|
|
font-weight: 400;
|
|
|
|
}
|
|
|
|
.price::before {
|
|
|
|
content: '¥';
|
|
|
|
font-size: 24rpx;
|
|
|
|
}
|
|
|
|
.oldPrice{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 21rpx;
|
|
|
|
color: #999999;
|
|
|
|
text-decoration-line: line-through;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.buy-cart{
|
|
|
|
width: 44rpx;
|
|
|
|
height: 44rpx;
|
|
|
|
color: #FFFFFF;
|
|
|
|
background: #6A8A2D;
|
|
|
|
line-height: 44rpx;
|
|
|
|
font-size: 30rpx;
|
|
|
|
text-align: center;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-list {
|
|
|
|
z-index: 99;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
width: 750rpx;
|
|
|
|
height: 148rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
align-items: center;
|
|
|
|
padding: 0 26rpx;
|
|
|
|
|
|
|
|
.left-box {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
.bottom-price{
|
|
|
|
display: flex;
|
|
|
|
align-items: baseline;
|
|
|
|
font-family: PingFang SC;
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 27rpx;
|
|
|
|
color: #DC2525;
|
|
|
|
padding: 0 12rpx;
|
|
|
|
.bottom-price-yuan{
|
|
|
|
font-size: 40rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottom-detail-icon{
|
|
|
|
font-size: 24rpx;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
color: #0B898E;
|
|
|
|
}
|
|
|
|
|
|
|
|
.img-box {
|
|
|
|
image {
|
|
|
|
width: 78rpx;
|
|
|
|
height: 78rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.btn-buy {
|
|
|
|
width: 240rpx;
|
|
|
|
height: 78rpx;
|
|
|
|
background: #6A8A2D;
|
|
|
|
border-radius: 11rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 78rpx;
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-family: PingFangSC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.popup-content {
|
|
|
|
background-color: white;
|
|
|
|
padding: 0rpx 39rpx 20rpx 39rpx;
|
|
|
|
height: auto;
|
|
|
|
border-radius: 20rpx 20rpx 0 0;
|
|
|
|
.bottom-productImg {
|
|
|
|
display: flex;
|
|
|
|
margin-bottom: 23rpx;
|
|
|
|
image {
|
|
|
|
width: 173.33rpx;
|
|
|
|
height: 173.33rpx;
|
|
|
|
background: #666666;
|
|
|
|
border-radius: 13rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.right-content {
|
|
|
|
padding-left: 14rpx;
|
|
|
|
flex: 1;
|
|
|
|
width: 1rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.bottom-productPrice {
|
|
|
|
font-size: 40rpx;
|
|
|
|
color: #FC524B;
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
content: "¥";
|
|
|
|
font-size: 26rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.bottom-content {
|
|
|
|
width: 100%;
|
|
|
|
font-size: 27rpx;
|
|
|
|
font-family: PingFang SC;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #666666;
|
|
|
|
}
|
|
|
|
|
|
|
|
.botProduct {
|
|
|
|
position: relative;
|
|
|
|
min-height: 67rpx;
|
|
|
|
border-radius: 13rpx;
|
|
|
|
margin-bottom: 34rpx;
|
|
|
|
max-width: 100%;
|
|
|
|
padding-right:15rpx;
|
|
|
|
min-width: 320rpx;
|
|
|
|
background: #EFEFEF;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
|
|
|
color: #333;
|
|
|
|
width: fit-content;
|
|
|
|
&>image{
|
|
|
|
width: 67rpx;
|
|
|
|
height: 67rpx;
|
|
|
|
border-radius: 13rpx;
|
|
|
|
flex-shrink: 0;
|
|
|
|
}
|
|
|
|
.sku-name{
|
|
|
|
flex: 1;
|
|
|
|
padding-left: 15rpx;
|
|
|
|
white-space: normal;
|
|
|
|
font-size: 27rpx;
|
|
|
|
word-break: break-all;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.noStore{
|
|
|
|
background-color: rgba(239, 239, 239, 1);
|
|
|
|
color: rgba(153, 153, 153, 1);
|
|
|
|
}
|
|
|
|
.noStore-text{
|
|
|
|
width: 113rpx;
|
|
|
|
height: 43rpx;
|
|
|
|
background: #C0C0C0;
|
|
|
|
border-radius: 7rpx 0rpx 7rpx 0rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 43rpx;
|
|
|
|
position: absolute;
|
|
|
|
right: -14rpx;
|
|
|
|
top: -20rpx;
|
|
|
|
font-size: 23rpx;
|
|
|
|
font-family: PingFangSC;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.botProducts {
|
|
|
|
color: #6A8A27;
|
|
|
|
border: 1px solid #6A8A27;
|
|
|
|
}
|
|
|
|
|
|
|
|
.buy-num {
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 31rpx;
|
|
|
|
color: #000000;
|
|
|
|
color: #333333;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: space-between;
|
|
|
|
width: 233rpx;
|
|
|
|
height: 53rpx;
|
|
|
|
background: #EFEFEF;
|
|
|
|
border-radius: 13rpx;
|
|
|
|
margin-top: 25rpx;
|
|
|
|
.number-btn {
|
|
|
|
display: flex;
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
view {
|
|
|
|
display: flex;
|
|
|
|
justify-content: center;
|
|
|
|
align-items: center;
|
|
|
|
width: 69rpx;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.buy-btn {
|
|
|
|
width: 670rpx;
|
|
|
|
height: 78rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 78rpx;
|
|
|
|
background: linear-gradient(90deg, #F84A56, #FF9834);
|
|
|
|
border-radius: 40rpx;
|
|
|
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
font-family: PingFangSC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-box {
|
|
|
|
width: 750rpx;
|
|
|
|
height: 151rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6, 0, 1, 0.1);
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
}
|
|
|
|
.sp {
|
|
|
|
width: 100%;
|
|
|
|
height: 30rpx;
|
|
|
|
font-size: 32rpx;
|
|
|
|
font-family: PingFangSC;
|
|
|
|
font-weight: 400;
|
|
|
|
color: #060001;
|
|
|
|
line-height: 30rpx;
|
|
|
|
border-top: solid 2rpx #ccc;
|
|
|
|
margin: 60rpx 0;
|
|
|
|
padding-top: 30rpx;
|
|
|
|
}
|
|
|
|
.sp-container{
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex-wrap: wrap;
|
|
|
|
min-height: 400rpx;
|
|
|
|
max-height: 600rpx;
|
|
|
|
overflow-y: auto;
|
|
|
|
overflow-x: hidden;
|
|
|
|
align-content: flex-start
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.placeholder-content{
|
|
|
|
background: white;
|
|
|
|
position: relative;
|
|
|
|
.btn-cover{
|
|
|
|
z-index: 200;
|
|
|
|
position: fixed;
|
|
|
|
bottom: 0;
|
|
|
|
width: 750rpx;
|
|
|
|
height: 148rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
box-shadow: 0rpx 0rpx 16rpx 0rpx rgba(6,0,1,0.1);
|
|
|
|
.btn{
|
|
|
|
width: 670rpx;
|
|
|
|
height: 78rpx;
|
|
|
|
text-align: center;
|
|
|
|
line-height: 78rpx;
|
|
|
|
background: #6A8A2D;
|
|
|
|
border-radius: 11rpx;
|
|
|
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
font-family: PingFangSC;
|
|
|
|
font-weight: 500;
|
|
|
|
color: #FFFFFF;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-result{
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
width: 100%;
|
|
|
|
flex: 1;
|
|
|
|
flex-shrink: 0;
|
|
|
|
padding:0 26rpx;
|
|
|
|
.search-item{
|
|
|
|
width: 100%;
|
|
|
|
height: 200rpx;
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
display: flex;
|
|
|
|
image{
|
|
|
|
width: 200rpx;
|
|
|
|
height: 200rpx;
|
|
|
|
border-radius: 13rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.search-result-container{
|
|
|
|
padding:0 20rpx;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
flex: 1;
|
|
|
|
width: 1rpx;
|
|
|
|
.title{
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 31rpx;
|
|
|
|
color: #000000;
|
|
|
|
}
|
|
|
|
.price{
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 33rpx;
|
|
|
|
color: #C3282E;
|
|
|
|
}
|
|
|
|
.price:before{
|
|
|
|
content: "¥";
|
|
|
|
font-size: 23rpx;
|
|
|
|
}
|
|
|
|
.oldPrice{
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 21rpx;
|
|
|
|
color: #999999;
|
|
|
|
text-decoration-line: line-through;
|
|
|
|
padding-left: 12rpx;
|
|
|
|
}
|
|
|
|
|
|
|
|
.tags{
|
|
|
|
display: flex;
|
|
|
|
padding-top: 20rpx;
|
|
|
|
.tag{
|
|
|
|
height: 35rpx;
|
|
|
|
line-height: 35rpx;
|
|
|
|
border-radius: 17rpx;
|
|
|
|
border: 1px solid #000000;
|
|
|
|
font-weight: 400;
|
|
|
|
font-size: 24rpx;
|
|
|
|
color: #000000;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
margin-right: 20rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.typePopup-container{
|
|
|
|
.place-area{
|
|
|
|
width: 100%;
|
|
|
|
opacity: 1;
|
|
|
|
background: white;
|
|
|
|
}
|
|
|
|
.type-container.typedata-container{
|
|
|
|
flex-wrap: wrap;background: #EDF5DC;padding: 30rpx 20rpx 0;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
height: auto;
|
|
|
|
padding-bottom: 30rpx;
|
|
|
|
.type-item {
|
|
|
|
margin-bottom: 30rpx;
|
|
|
|
width: 25%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.bottom-close{
|
|
|
|
width: 100%;
|
|
|
|
height: 80rpx;
|
|
|
|
background: #FFFFFF;
|
|
|
|
font-weight: 500;
|
|
|
|
font-size: 28rpx;
|
|
|
|
color: #111111;
|
|
|
|
line-height: 80rpx;
|
|
|
|
text-align: center;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.triangle-up {
|
|
|
|
transform: rotate(180deg);
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
.active-search-item{
|
|
|
|
color: #6A8A2D;
|
|
|
|
}
|
|
|
|
|
|
|
|
.select-cycle{
|
|
|
|
width: 40rpx;
|
|
|
|
height: 40rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
border: 1px solid #999999;
|
|
|
|
image{
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.select-cycle.selected {
|
|
|
|
border: none;
|
|
|
|
image{
|
|
|
|
width: 40rpx;
|
|
|
|
height: 40rpx;
|
|
|
|
border-radius: 50%;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.delivery-no{
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
}
|
|
|
|
.delivery-active{
|
|
|
|
transform: rotate(90deg);
|
|
|
|
}
|
|
|
|
.method-container{
|
|
|
|
width: 100%;
|
|
|
|
background: #FFFFFF;
|
|
|
|
.method-item{
|
|
|
|
height: 107rpx;
|
|
|
|
border-top: 1px solid #D8D8D8;
|
|
|
|
padding: 0 58rpx;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.methodShow{
|
|
|
|
position: relative;
|
|
|
|
z-index: 9999;
|
|
|
|
}
|
|
|
|
|
|
|
|
.goods-container{
|
|
|
|
.left-box{
|
|
|
|
width: 180rpx;
|
|
|
|
background: #F3F3F3;
|
|
|
|
height: 100%;
|
|
|
|
flex-shrink: 0;
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: auto;
|
|
|
|
.left-type-item{
|
|
|
|
width: 100%;
|
|
|
|
font-weight: bold;
|
|
|
|
font-size: 27rpx;
|
|
|
|
color: #000000;
|
|
|
|
position: relative;
|
|
|
|
padding: 26rpx 0;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
.name-item{
|
|
|
|
width: 100%;
|
|
|
|
min-height: 53rpx;
|
|
|
|
text-align: center;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
justify-content: center;
|
|
|
|
padding: 0 20rpx;
|
|
|
|
}
|
|
|
|
&.active {
|
|
|
|
background: white;
|
|
|
|
.name-item{
|
|
|
|
border-left: 7rpx solid #6A8A2D;;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.right-box{
|
|
|
|
height: 100%;
|
|
|
|
flex: 1;
|
|
|
|
width: 100rpx;
|
|
|
|
background: white;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|