1658 lines
33 KiB
Vue
1658 lines
33 KiB
Vue
<template>
|
|
<view style="background-color: #f5f5f5;">
|
|
<!-- <view style="height: var(--status-bar-height);"></view> -->
|
|
<view class='productList' :style="viewColor">
|
|
<!-- 顶部 -->
|
|
<view class="top">
|
|
<view class="head_tit">
|
|
<view style="display: flex;align-items: center;width: 100%;">
|
|
<view style="display: flex;align-items: center;width: 100%;">
|
|
<i class="iconfont icon-xiangzuo"
|
|
style="font-size: 31.54rpx;text-align: left;color: #fff;margin-right: 12rpx;"
|
|
@click='backjJump'></i>
|
|
<view style="position: relative;width: 494rpx;margin: 0 auto;flex: 1;">
|
|
<u-search bgColor="white" :showAction="false" placeholder="搜索商品" clearabled
|
|
v-model="storeParam.keyword" @search="searchSubmit"></u-search>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="flags"></view>
|
|
</view>
|
|
|
|
<view class="container">
|
|
<scroll-view scroll-y class="left-panel" @scrolltolower="loadMoreLeft" :style="{'height':leftDomHeight
|
|
,overflow:'auto'}">
|
|
<!-- 左侧内容 -->
|
|
<block v-for="(item,indx) in sideMenuType.children" :key="indx">
|
|
<view class="left-panel_item" @click="changeMerchantTow(item)">
|
|
<u--image :src="item.pic" class="image" :showLoading="true" width="100rpx" height="100rpx"
|
|
shape="circle" :lazyLoad="true" />
|
|
<text
|
|
:class="{'left-panel_item_active':storeParam.mer_cate_id == item.store_category_id}">{{item.cate_name}}</text>
|
|
</view>
|
|
</block>
|
|
</scroll-view>
|
|
|
|
<view class="right-panel">
|
|
<!-- 补贴比例标签 -->
|
|
<view class="con-right-proportion">
|
|
<image src="../../../static/cloud_warehouse/dkbl.png" />
|
|
<block v-for="(item,indx) in propotionData" :key="indx">
|
|
<view class="con-right-proportion-item"
|
|
:class="{'active':storeParam.deduction_rate == item.product_label_id}"
|
|
@click="handleChooseProp(item.product_label_id)">
|
|
{{item.label_name}}
|
|
</view>
|
|
</block>
|
|
</view>
|
|
|
|
<scroll-view scroll-y class="right-panel-view" @scrolltolower="loadMoreRight"
|
|
:style="{height:goodsListHeight,overflow:'auto'}">
|
|
<!-- 右侧内容 -->
|
|
<view class='no-shop' v-if="goodsList.length==0 && !showLoading" v-cloak>
|
|
<view class='pictrue' style="margin: 0 auto;">
|
|
<image src='@/static/images/no_short.png'></image>
|
|
<text>暂无商品, 试试其他分类/位置</text>
|
|
</view>
|
|
</view>
|
|
|
|
<block>
|
|
<view v-if="item.product" v-for="(item, index) in goodsList" class="short_item"
|
|
@click="clickProduct(item)">
|
|
<u-image style="margin-right: 20rpx;flex-shrink: 0" width="145rpx" height="145rpx"
|
|
:src="item.product.image" :lazy-load="true" :radius="10">
|
|
<template v-slot:loading>
|
|
<u-loading-icon color="#999"></u-loading-icon>
|
|
</template>
|
|
</u-image>
|
|
<view class="short_item_right">1
|
|
<view class="r_name">{{item.product.store_name}}</view>
|
|
<view class="r_type">
|
|
<view v-if="item.product.store_info">{{item.product.store_info}}</view>
|
|
<view v-else-if="getSkuName(item)">{{getSkuName(item)}}</view>
|
|
<view v-else-if="item.unit_name">{{item.unit_name}}</view>
|
|
</view>
|
|
<view class="r_btn" v-if="item.product && item.product.price">
|
|
<view>¥<text
|
|
style="font-size: 33rpx;">{{ item.product.price.split('.')[0] }}.</text>{{item.product.price.split('.')[1]}}
|
|
</view>
|
|
<image src="@/static/images/icon/plus.png"
|
|
style="width: 40rpx;height: 40rpx;border-radius: 40rpx;"></image>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
<u-loadmore v-if="showLoading" status="loading"></u-loadmore>
|
|
<view style="height: 200rpx;"></view>
|
|
</scroll-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="cart" @click="navgo('/pages/order_addcart/order_addcart')">
|
|
<u--image :showLoading="true"
|
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/def/b52c6202402291350366422.webp" width="110rpx"
|
|
height="110rpx" :lazyLoad="true"></u--image>
|
|
<view class="badge" v-show="goodsNum">
|
|
{{goodsNum}}
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 购物车 -->
|
|
<view class="card" @click="navgo('/pages/order_addcart/order_addcart')">
|
|
<view class="left">
|
|
<view class="tot_price">
|
|
<view class="footer-left">
|
|
<text class="price">¥{{totalMoney}}</text>
|
|
<text class="desc">支持配送 售后无忧</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="right">
|
|
去结算
|
|
</view>
|
|
</view>
|
|
|
|
<view class="">
|
|
<u-picker :defaultIndex="defaInd" :show="showPicker" ref="uPicker" :columns="columnData" @confirm="confirm"
|
|
@cancel="showPicker = false" @change="changeHandler" keyName="name"></u-picker>
|
|
</view>
|
|
|
|
<shortPopup ref="shortPopupRef" @addCart="loadCart"></shortPopup>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getStoreList,
|
|
getGeocoder,
|
|
} from '@/api/store.js';
|
|
import {
|
|
wgsToGcj
|
|
} from "@/utils/wgs.js";
|
|
import {
|
|
supMenuApi
|
|
} from '@/api/requesta.js';
|
|
import recommend from '../../nongKe/supply_chain/component/recommend';
|
|
import rightSlider from '../../nongKe/supply_chain/component/rightSlider';
|
|
import {
|
|
merClassifly,
|
|
getStoreTypeApi
|
|
} from '@/api/store.js';
|
|
import {
|
|
mapGetters
|
|
} from "vuex";
|
|
import {
|
|
goShopDetail
|
|
} from '@/libs/order.js'
|
|
import {
|
|
configMap
|
|
} from '@/utils';
|
|
import easyLoadimage from '@/components/easy-loadimage/easy-loadimage.vue';
|
|
import {
|
|
getArea,
|
|
getStreet
|
|
} from '@/api/article.js';
|
|
import {
|
|
getIndexData,
|
|
getDiy
|
|
} from '@/api/api.js'
|
|
|
|
import {
|
|
HTTP_REQUEST_URL,
|
|
ENV
|
|
} from '@/config/app';
|
|
import {
|
|
townCloud,
|
|
getCityCloundShop,
|
|
getCategoryListLevel
|
|
} from '@/api/requesta.js'
|
|
import {
|
|
getCartCounts,
|
|
getCartList,
|
|
} from '@/api/requesta.js';
|
|
|
|
import Cache from '@/utils/cache';
|
|
import shortPopup from "@/components/shortPopup.vue"
|
|
import {
|
|
Toast
|
|
} from '../../../libs/uniApi';
|
|
import {
|
|
getProportion,
|
|
getStorageList
|
|
} from "@/api/cloud_warehouse.js";
|
|
const app = getApp();
|
|
export default {
|
|
components: {
|
|
recommend,
|
|
rightSlider,
|
|
easyLoadimage,
|
|
shortPopup
|
|
},
|
|
data() {
|
|
return {
|
|
domain: HTTP_REQUEST_URL,
|
|
defaInd: [0, 0],
|
|
columnData: [],
|
|
showSerch: false,
|
|
headTop: 0,
|
|
street_id: "",
|
|
showSelect: false,
|
|
price: 0,
|
|
stock: 0,
|
|
nows: false,
|
|
loading: false,
|
|
loadingIcon: true,
|
|
loadTitle: '加载更多',
|
|
title: '',
|
|
hotPage: 1,
|
|
hotLimit: 10,
|
|
hotScroll: false,
|
|
// 筛选框
|
|
rightBox: false,
|
|
//品牌列表
|
|
brandList: [],
|
|
downKey: 0,
|
|
downStatus: false,
|
|
cloudList: [],
|
|
street: "",
|
|
showPicker: false,
|
|
status: "loadmore",
|
|
price_order: 'price_asc', //价格排序方式(升降), price_asc, price_desc
|
|
// 下拉菜单
|
|
downMenu: [{
|
|
title: '默认',
|
|
key: 0,
|
|
order: ""
|
|
}, {
|
|
title: '销量',
|
|
key: 1,
|
|
order: 'sales'
|
|
}, {
|
|
title: '好评',
|
|
key: 2,
|
|
order: 'rate'
|
|
}, {
|
|
title: '距离',
|
|
key: 3,
|
|
order: 'location'
|
|
}],
|
|
// 商铺列表
|
|
storeList: [],
|
|
storeParam: {
|
|
keyword: '',
|
|
page: 1,
|
|
limit: 10,
|
|
order: '',
|
|
category_id: '',
|
|
type_id: '',
|
|
street_id: '',
|
|
is_recommend: false, // 是否为推荐的参数
|
|
deduction_rate: '',
|
|
mer_cate_id: ''
|
|
},
|
|
storeKey: 0,
|
|
storeScroll: true,
|
|
merchant: '', // 当前选中一级分类
|
|
merchantTow: '', //当前选中二级分类
|
|
mer_id: '',
|
|
sortId: '',
|
|
price_on: '',
|
|
price_off: '',
|
|
detaile_address: "",
|
|
recommend_address: "",
|
|
location_address: "",
|
|
latitude: "",
|
|
longitude: "",
|
|
count: 0,
|
|
storeTypeArr: [], //店铺类型
|
|
merList: [], //商户分类
|
|
product_type: 0,
|
|
show: false,
|
|
image: '', //图片,
|
|
credit_buy: '', //支持先货后款
|
|
trnList: [],
|
|
goodsNum: 0,
|
|
totalMoney: 0,
|
|
goodsList: [], //商品列表
|
|
showLoading: false, //是否显示加载
|
|
allShow: false, //是否显示全部类型弹窗
|
|
sideMenuType: {}, //左侧
|
|
leftDomHeight: 0, //左侧分类高度
|
|
goodsListHeight: 0, //商品列表
|
|
propotionData: [], //比例
|
|
};
|
|
},
|
|
async onLoad(options) {
|
|
this.product_type = options.product_type ?? 0
|
|
if (this.$store.state.storage?.location?.lat) {
|
|
this.latitude = this.$store.state.storage.location.lat;
|
|
this.longitude = this.$store.state.storage.location.long;
|
|
}
|
|
|
|
this.credit_buy = options.credit_buy
|
|
this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || ''
|
|
this.storeList = [];
|
|
this.showLoading = true;
|
|
|
|
// 左侧 // 初始化查询第一个
|
|
const sideMenuType = uni.getStorageSync("market_type_parent");
|
|
this.sideMenuType = sideMenuType;
|
|
if (sideMenuType && sideMenuType.children && sideMenuType.children.length > 0)
|
|
this.storeParam.mer_cate_id = this.sideMenuType.children[0].store_category_id;
|
|
// 初始化
|
|
this.getStoreList();
|
|
|
|
//初始化左侧类型高度
|
|
this.initHeight();
|
|
|
|
// 商品列表
|
|
this.initGoodsListHeight();
|
|
|
|
// 补贴比例
|
|
this.getProportionData();
|
|
},
|
|
computed: {
|
|
downMenus: function() {
|
|
return this.downMenu.filter((item) => {
|
|
if (this.mer_location) {
|
|
return item
|
|
} else {
|
|
return item.key < 3
|
|
}
|
|
})
|
|
},
|
|
...configMap({
|
|
margin_ico_switch: 0,
|
|
margin_ico: '',
|
|
mer_location: 0,
|
|
store_street_theme: 1,
|
|
hide_mer_status: '',
|
|
}, mapGetters(['viewColor', 'keyColor'])),
|
|
},
|
|
methods: {
|
|
confirm(e) {
|
|
this.showPicker = false
|
|
this.$emit('selectPlce', e)
|
|
this.$emit('change', e)
|
|
this.street = e.value[1].name
|
|
this.$nextTick(() => {
|
|
this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code);
|
|
|
|
})
|
|
this.storeParam.street_id = e.value[1].code
|
|
this.street_id = e.value[1].code
|
|
this.getStoreList()
|
|
},
|
|
|
|
changeHandler(e) {
|
|
const {
|
|
columnIndex,
|
|
value,
|
|
values,
|
|
index,
|
|
picker = this.$refs.uPicker
|
|
} = e;
|
|
if (columnIndex === 0) {
|
|
getStreet({
|
|
area_code: value[0]['code']
|
|
}).then(res => {
|
|
picker.setColumnValues(1, res.data);
|
|
});
|
|
}
|
|
},
|
|
|
|
// 对象转数组
|
|
objToArr(data) {
|
|
let obj = Object.keys(data).sort();
|
|
let m = obj.map(key => data[key]);
|
|
return m;
|
|
},
|
|
|
|
navGoto(url) {
|
|
uni.redirectTo({
|
|
url
|
|
})
|
|
},
|
|
|
|
navgo(url) {
|
|
uni.navigateTo({
|
|
url
|
|
})
|
|
},
|
|
|
|
// 进店
|
|
goStore(id) {
|
|
if (this.storeParam.type_id == 12) {
|
|
uni.navigateTo({
|
|
url: `/pages/nongKe/supply_chain/merchant?id=${id}`
|
|
})
|
|
} else {
|
|
if (this.hide_mer_status != 1) {
|
|
uni.navigateTo({
|
|
url: `/pages/store/home/index?id=${id}&type=7`
|
|
})
|
|
}
|
|
}
|
|
},
|
|
|
|
// 搜索
|
|
searchSubmit: function() {
|
|
this.$set(this.storeParam, 'keyword', this.storeParam.keyword);
|
|
this.set_where('')
|
|
this.showSerch = false
|
|
},
|
|
|
|
//点击事件处理
|
|
set_where: function(e) {
|
|
if (this.loading) return
|
|
this.storeList = []
|
|
this.storeParam.page = 1
|
|
this.storeParam.order = e //选择排序方式
|
|
this.getStoreList();
|
|
if (e == 'price_asc') return this.price_order = 'price_desc';
|
|
if (e == 'price_desc') return this.price_order = 'price_asc';
|
|
},
|
|
|
|
backjJump() {
|
|
uni.navigateBack({
|
|
delta: 1
|
|
})
|
|
},
|
|
|
|
// 点击商品二级分类
|
|
changeMerchantTow(item) {
|
|
this.merchantTow = item;
|
|
this.storeParam.mer_cate_id = this.merchantTow.store_category_id;
|
|
this.storeParam.page = 1;
|
|
this.getStoreList('')
|
|
},
|
|
|
|
// 商品列表
|
|
getStoreList(load = false) {
|
|
this.showLoading = true
|
|
this.status = "loading"
|
|
if (!load) {
|
|
this.storeParam.page = 1;
|
|
this.goodsList = [];
|
|
}
|
|
let query = {
|
|
mer_id: ENV == 'prod' ? 259 : 244,
|
|
order: this.storeParam.order,
|
|
keyword: this.storeParam.keyword,
|
|
page: this.storeParam.page,
|
|
deduction_rate: this.storeParam.deduction_rate,
|
|
mer_cate_id: this.storeParam.mer_cate_id
|
|
}
|
|
|
|
getStorageList(query).then(res => {
|
|
this.goodsList = [...this.goodsList, ...res.data.list]
|
|
this.showLoading = false
|
|
this.goodsList.forEach(item => {
|
|
this.trnList.push({
|
|
left: 0,
|
|
bottom: 0
|
|
})
|
|
})
|
|
}).catch(e => {
|
|
Toast(e.msg || e.message || e)
|
|
this.showLoading = false;
|
|
})
|
|
},
|
|
|
|
loadMoreLeft() {
|
|
// 加载更多左侧内容的逻辑
|
|
},
|
|
|
|
loadMoreRight() {
|
|
// 加载更多右侧内容的逻辑
|
|
this.storeParam.page++;
|
|
this.getStoreList(true);
|
|
},
|
|
|
|
// 购物车信息
|
|
cartFn() {
|
|
getCartList().then(res => {
|
|
this.totalMoney = 0
|
|
this.cartList = res.data.list
|
|
this.cartList.forEach(e => {
|
|
e.list.forEach(item => {
|
|
this.totalMoney += item.cart_num * item.productAttr.price
|
|
})
|
|
})
|
|
this.totalMoney = this.totalMoney.toFixed(2)
|
|
})
|
|
getCartCounts().then(res => {
|
|
this.goodsNum = res.data[0].count
|
|
})
|
|
},
|
|
|
|
// 点击商品
|
|
clickProduct(data) {
|
|
this.$refs.shortPopupRef.setDatas(data, this.goodsNum);
|
|
this.$refs.shortPopupRef.open();
|
|
},
|
|
|
|
// 点击全部
|
|
showAllRef() {
|
|
this.$refs.allRef.open();
|
|
},
|
|
|
|
changeAllRef(e) {
|
|
this.allShow = e.show;
|
|
},
|
|
|
|
// 刷新购物车
|
|
loadCart() {
|
|
this.cartFn();
|
|
},
|
|
|
|
// 获取规格名称
|
|
getSkuName(item) {
|
|
if (item.sku)
|
|
return Object.keys(item.sku).join('/') || null;
|
|
},
|
|
|
|
// 比例
|
|
handleChooseProp(e) {
|
|
this.storeParam.deduction_rate = e;
|
|
this.storeParam.page = 1;
|
|
this.getStoreList()
|
|
},
|
|
|
|
// 获取比例
|
|
getProportionData() {
|
|
getProportion({
|
|
mer_id: ENV == 'prod' ? '259' : '244'
|
|
}).then(res => {
|
|
this.propotionData = res.data;
|
|
})
|
|
},
|
|
|
|
// 具体商品列表高度
|
|
initGoodsListHeight() {
|
|
this.$nextTick(async () => {
|
|
let cardDom = await this.getDomInfo(".card");
|
|
let rightPanelViewDom = await this.getDomInfo(".right-panel-view");
|
|
this.goodsListHeight = cardDom.top - rightPanelViewDom.top + "px";
|
|
})
|
|
},
|
|
|
|
// 农产品类型高度
|
|
initHeight() {
|
|
this.$nextTick(async () => {
|
|
let leftDom = await this.getDomInfo(".left-panel");
|
|
let flowDom = await this.getDomInfo(".cart");
|
|
this.leftDomHeight = flowDom.top - leftDom.top - 7 + "px";
|
|
})
|
|
},
|
|
|
|
// 获取dom布局信息
|
|
getDomInfo(selector) {
|
|
return new Promise((resolve, reject) => {
|
|
uni.createSelectorQuery().in(this).select(selector).boundingClientRect((data) => {
|
|
resolve(data);
|
|
}).exec();
|
|
})
|
|
}
|
|
},
|
|
//刷新
|
|
onPullDownRefresh() {
|
|
uni.stopPullDownRefresh()
|
|
},
|
|
onShow() {
|
|
this.showSelect = false;
|
|
this.cartFn();
|
|
},
|
|
// 页面返回
|
|
onBackPress() {
|
|
if (this.$refs.shortPopupRef.isShow) {
|
|
this.$refs.shortPopupRef.close();
|
|
return true;
|
|
} else if (this.allShow) {
|
|
this.$refs.allRef.close();
|
|
return true;
|
|
} else return false;
|
|
}
|
|
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
page {
|
|
background-color: #F7F7F7;
|
|
}
|
|
|
|
.all_ref {
|
|
height: 100vh;
|
|
width: 510rpx;
|
|
background-color: #fff;
|
|
padding: 30rpx;
|
|
|
|
.header {
|
|
height: 100rpx;
|
|
font-size: 33rpx;
|
|
font-weight: bold;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.all_list {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-start;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.menu_li {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
width: 150rpx;
|
|
height: 150rpx;
|
|
overflow: hidden;
|
|
|
|
// width: 120rpx;
|
|
// display: inline-block;
|
|
.image {
|
|
border-radius: 50%;
|
|
border: 5rpx solid #fff;
|
|
}
|
|
|
|
.li_text {
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-align: center;
|
|
padding: 4rpx 10rpx;
|
|
}
|
|
}
|
|
|
|
.menu_li_on {
|
|
.image {
|
|
border: 5rpx solid #ff6d20;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.li_text {
|
|
background-color: #ff6d20;
|
|
border-radius: 2em;
|
|
color: #fff;
|
|
padding: 4rpx 10rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.com_name {
|
|
font-size: 33.29rpx;
|
|
// background-color: red;
|
|
// max-width: 45vw;
|
|
max-width: 40vw;
|
|
white-space: nowrap;
|
|
/* 防止文字换行 */
|
|
overflow: hidden;
|
|
/* 超出部分隐藏 */
|
|
text-overflow: ellipsis;
|
|
/* 使用省略号表示溢出的内容 */
|
|
// width: 200px;
|
|
/* 可根据实际情况调整容器宽度 */
|
|
}
|
|
|
|
.head_tit {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
box-sizing: border-box;
|
|
padding: 0 20rpx;
|
|
}
|
|
|
|
.productList {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
height: 760rpx;
|
|
background-image: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/def/80b54202402290906142644.webp");
|
|
background-size: cover;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
padding-top: var(--status-bar-height);
|
|
|
|
.top {
|
|
padding-top: 20rpx;
|
|
margin-bottom: 40rpx;
|
|
width: 100%;
|
|
}
|
|
|
|
.content {
|
|
flex: 1;
|
|
padding: 0 20rpx 10rpx 20rpx;
|
|
}
|
|
|
|
.menu_cls {
|
|
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
|
padding: 10rpx 70rpx 0 0;
|
|
font-size: 26.29rpx;
|
|
height: 155rpx;
|
|
overflow: hidden;
|
|
position: relative;
|
|
|
|
.all {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
padding: 0 15rpx;
|
|
height: 100%;
|
|
display: flex;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
background-color: #f5f5f5;
|
|
|
|
image {
|
|
width: 30rpx;
|
|
height: 30rpx;
|
|
}
|
|
}
|
|
|
|
.menu_li {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
min-width: 140rpx;
|
|
height: auto;
|
|
|
|
.image {
|
|
border-radius: 50%;
|
|
border: 5rpx solid #fff;
|
|
}
|
|
|
|
.li_text {
|
|
width: 100%;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
text-align: center;
|
|
padding: 1rpx 10rpx 4rpx 10rpx;
|
|
}
|
|
}
|
|
|
|
.menu_li_on {
|
|
.image {
|
|
border: 5rpx solid #ff6d20;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.li_text {
|
|
background-color: #ff6d20;
|
|
border-radius: 2em;
|
|
color: #fff;
|
|
padding: 1rpx 10rpx 4rpx 10rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.container {
|
|
display: flex;
|
|
height: calc(100vh - 320rpx - var(--status-bar-height));
|
|
|
|
.left-panel {
|
|
width: 180rpx;
|
|
height: 100%;
|
|
font-size: 29.79rpx;
|
|
flex-shrink: 0;
|
|
|
|
.left-panel_item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
align-items: center;
|
|
margin-bottom: 30rpx;
|
|
|
|
text {
|
|
display: inline-block;
|
|
margin-top: 20rpx;
|
|
font-size: 26rpx;
|
|
color: #262626;
|
|
padding: 0 16rpx;
|
|
text-align: center;
|
|
}
|
|
|
|
.left-panel_item_active {
|
|
position: relative;
|
|
z-index: 1;
|
|
|
|
&::after {
|
|
content: "";
|
|
display: inline-block;
|
|
position: absolute;
|
|
z-index: -1;
|
|
bottom: -6rpx;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
width: 80%;
|
|
height: 18rpx;
|
|
background: linear-gradient(90deg, #FF8158 0%, rgba(255, 255, 255, 0) 90%);
|
|
border-radius: 10rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.right-panel {
|
|
width: calc(100vw - 180rpx);
|
|
height: 100%;
|
|
font-size: 26.29rpx;
|
|
|
|
.con-right-proportion {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 38rpx;
|
|
margin-bottom: 25rpx;
|
|
|
|
image {
|
|
width: 154rpx;
|
|
height: 28rpx;
|
|
margin-right: 50rpx;
|
|
}
|
|
|
|
.con-right-proportion-item {
|
|
margin-right: 22rpx;
|
|
font-size: 26rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.active {
|
|
padding: 7rpx 22rpx;
|
|
background: #FEE109;
|
|
border-radius: 17rpx;
|
|
font-size: 26rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 500;
|
|
color: #616161;
|
|
}
|
|
}
|
|
|
|
.right-panel-head {
|
|
height: 70rpx;
|
|
box-sizing: border-box;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding-right: 30rpx;
|
|
color: #737373;
|
|
|
|
view {
|
|
display: flex;
|
|
align-items: center;
|
|
margin-left: 40rpx;
|
|
}
|
|
|
|
.active {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.icon {
|
|
height: 22rpx;
|
|
width: 18rpx;
|
|
}
|
|
}
|
|
|
|
.right-panel-view {
|
|
// height: calc(100vh - 400rpx - var(--status-bar-height) - 100rpx);
|
|
|
|
.short_item {
|
|
padding: 20rpx;
|
|
display: flex;
|
|
background: #fff;
|
|
border-radius: 20rpx;
|
|
margin: 0 20rpx 20rpx 0;
|
|
|
|
.image {
|
|
height: 145.23rpx;
|
|
width: 145.23rpx;
|
|
border-radius: 21.03rpx 21.03rpx 21.03rpx 21.03rpx;
|
|
margin-right: 20rpx;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.short_item_right {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
|
|
.r_name {
|
|
width: 100%;
|
|
height: 64rpx;
|
|
line-height: 32rpx;
|
|
text-overflow: ellipsis;
|
|
display: -webkit-box;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
-webkit-line-clamp: 2;
|
|
}
|
|
|
|
.r_type {
|
|
font-size: 22.78rpx;
|
|
color: #737373;
|
|
width: 300rpx;
|
|
|
|
view {
|
|
height: 39rpx;
|
|
line-height: 39rpx;
|
|
background: #FEF5F3;
|
|
display: inline-block;
|
|
padding: 0 16rpx;
|
|
border-radius: 39rpx;
|
|
max-width: 100%;
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
}
|
|
}
|
|
|
|
.r_btn {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 22.78rpx;
|
|
color: #F84221;
|
|
align-items: center;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.common-hd {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
height: 60rpx;
|
|
margin-top: 30rpx;
|
|
|
|
.title {
|
|
padding: 0 80rpx;
|
|
font-size: 34rpx;
|
|
color: $theme-color;
|
|
font-weight: bold;
|
|
background-image: url("~@/static/images/index-title.png");
|
|
background-repeat: no-repeat;
|
|
background-size: 100% auto;
|
|
background-position: left center;
|
|
}
|
|
}
|
|
|
|
.goods_list {
|
|
margin-top: 20rpx;
|
|
|
|
.goods_card {
|
|
margin-top: 20rpx;
|
|
height: auto;
|
|
background-color: white;
|
|
padding: 20rpx;
|
|
display: flex;
|
|
|
|
.left {
|
|
margin-right: 20rpx;
|
|
width: 158rpx;
|
|
height: 158rpx;
|
|
border-radius: 20rpx;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.right {
|
|
flex: 1;
|
|
color: #737373;
|
|
|
|
.head {
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.li {
|
|
width: 100%;
|
|
display: flex;
|
|
font-size: 28.04rpx;
|
|
margin-bottom: 10rpx;
|
|
align-items: center;
|
|
|
|
text {
|
|
margin: 0 20rpx 0 5rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.address {
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
width: 200px;
|
|
}
|
|
}
|
|
|
|
.selects {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.search-right.styleType2 .right-text,
|
|
.search-right.styleType3 .right-text {
|
|
color: #282828;
|
|
}
|
|
|
|
.search-right.styleType2 .icon-xiangyou,
|
|
.search-right.styleType3 .icon-xiangyou {
|
|
color: #999999;
|
|
}
|
|
|
|
.search-right.styleType2 .icon-dingwei,
|
|
.search-right.styleType3 .icon-dingwei {
|
|
color: #8A8A8A;
|
|
}
|
|
|
|
.productList .search .back {
|
|
display: flex;
|
|
align-items: center;
|
|
width: 40rpx;
|
|
height: 60rpx;
|
|
|
|
.iconfont {
|
|
color: #fff;
|
|
font-size: 36rpx;
|
|
}
|
|
}
|
|
|
|
.town_name {
|
|
overflow: hidden;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
max-width: 4.2em;
|
|
font-size: 28rpx;
|
|
color: #fff;
|
|
margin-right: 4rpx;
|
|
}
|
|
|
|
.productList .search .input {
|
|
flex: 1;
|
|
height: 60rpx;
|
|
background-color: #fff;
|
|
border-radius: 50rpx;
|
|
padding: 0 20rpx;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.productList .search.styleType2 .input,
|
|
.productList .search.styleType3 .input {
|
|
background: #EDEDED;
|
|
}
|
|
|
|
.productList .search .input input {
|
|
flex: 1;
|
|
height: 100%;
|
|
font-size: 26rpx;
|
|
margin-left: 10rpx;
|
|
}
|
|
|
|
.productList .search .input .placeholder {
|
|
color: #999;
|
|
}
|
|
|
|
.productList .search .input .iconfont {
|
|
font-size: 35rpx;
|
|
color: #555;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.productList .search .icon-pailie,
|
|
.productList .search .icon-tupianpailie {
|
|
color: #fff;
|
|
width: 62rpx;
|
|
font-size: 40rpx;
|
|
height: 86rpx;
|
|
line-height: 86rpx;
|
|
}
|
|
|
|
.productList .nav-wrapper {
|
|
z-index: 9;
|
|
position: fixed;
|
|
left: 0;
|
|
top: 25px;
|
|
width: 100%;
|
|
margin-top: 86rpx;
|
|
background-color: #fff;
|
|
|
|
&.styleType1 {
|
|
background-color: var(--view-theme);
|
|
}
|
|
|
|
.tab-bar {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.tab-item {
|
|
position: relative;
|
|
flex: 1;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
padding: 8rpx 0 20rpx;
|
|
color: #fff;
|
|
font-size: 28rpx;
|
|
font-weight: bold;
|
|
|
|
&::after {
|
|
content: ' ';
|
|
position: absolute;
|
|
left: 50%;
|
|
bottom: 18rpx;
|
|
width: 30rpx;
|
|
height: 3rpx;
|
|
background: transparent;
|
|
transform: translateX(-50%);
|
|
}
|
|
|
|
&.on {
|
|
&::after {
|
|
background: #fff;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.border-picture {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: center/cover no-repeat;
|
|
}
|
|
|
|
.productList .nav {
|
|
height: 86rpx;
|
|
color: #454545;
|
|
font-size: 28rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 0 28rpx;
|
|
}
|
|
|
|
.productList .nav .item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
flex-direction: column;
|
|
color: #FFFFFF;
|
|
flex: 1;
|
|
}
|
|
|
|
.productList .nav.styleType2 .item,
|
|
.productList .nav.styleType3 .item {
|
|
color: #282828;
|
|
}
|
|
|
|
.productList .nav .item.font-colors {
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
}
|
|
|
|
.productList .nav.styleType2 .item.font-colors,
|
|
.productList .nav.styleType3 .item.font-colors {
|
|
color: var(--view-theme);
|
|
}
|
|
|
|
.productList .nav .item .font-line {
|
|
height: 4rpx;
|
|
background-color: #fff;
|
|
margin-top: 3rpx;
|
|
width: 28rpx;
|
|
animation: line 0.3s;
|
|
-moz-animation: line 0.3s;
|
|
-webkit-animation: line 0.3s;
|
|
-o-animation: line 0.3s;
|
|
}
|
|
|
|
.productList .nav.styleType2 .item .font-line,
|
|
.productList .nav.styleType3 .item .font-line {
|
|
background-color: var(--view-theme);
|
|
}
|
|
|
|
@keyframes line {
|
|
from {
|
|
width: 0rpx;
|
|
}
|
|
|
|
to {
|
|
width: 28rpx;
|
|
}
|
|
}
|
|
|
|
.productList .nav .item image {
|
|
width: 15rpx;
|
|
height: 19rpx;
|
|
margin-left: 10rpx;
|
|
}
|
|
|
|
.selected-list {
|
|
padding: 24rpx 14rpx;
|
|
border-radius: 10.51rpx 10.51rpx 10.51rpx 10.51rpx;
|
|
background-color: #fff;
|
|
position: absolute;
|
|
left: 100rpx;
|
|
font-size: 29.79rpx;
|
|
opacity: 0;
|
|
transition: 0.5s;
|
|
height: 0;
|
|
|
|
.triangle-up {
|
|
width: 0;
|
|
height: 0;
|
|
border-left: 10rpx solid transparent;
|
|
border-right: 10rpx solid transparent;
|
|
border-bottom: 10rpx solid white;
|
|
position: absolute;
|
|
top: -10rpx;
|
|
}
|
|
|
|
.selected-li {
|
|
margin-bottom: 35rpx;
|
|
color: #F84221;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
.actSel {
|
|
opacity: 1;
|
|
height: auto;
|
|
}
|
|
|
|
.store-wrapper {
|
|
margin-top: 235rpx;
|
|
border-top: 1px solid #F6F6F6;
|
|
|
|
.store-item {
|
|
margin: 20rpx auto;
|
|
|
|
.head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
color: #fff;
|
|
|
|
.zhezhao {
|
|
position: absolute;
|
|
width: 95%;
|
|
height: 150px;
|
|
border-radius: 20rpx;
|
|
z-index: 0;
|
|
opacity: 0.5;
|
|
background-color: #999;
|
|
}
|
|
|
|
.bgc_img {
|
|
position: absolute;
|
|
width: 95%;
|
|
height: 150px;
|
|
background-size: cover;
|
|
border-radius: 20rpx;
|
|
z-index: 0;
|
|
}
|
|
|
|
.zhezhao1 {
|
|
width: 100%;
|
|
height: 150px;
|
|
border-radius: 20rpx;
|
|
z-index: 1;
|
|
|
|
.title {
|
|
display: flex;
|
|
height: 50px;
|
|
align-items: center;
|
|
margin-left: 20px;
|
|
z-index: 1;
|
|
|
|
span {
|
|
background-color: #F84221;
|
|
color: white;
|
|
font-size: 12px;
|
|
padding: 3px;
|
|
border-radius: 5px;
|
|
margin-left: 5px;
|
|
}
|
|
}
|
|
|
|
.coent {
|
|
display: flex;
|
|
margin-left: 20px;
|
|
|
|
.avater {
|
|
width: 60px;
|
|
height: 80px;
|
|
|
|
image {
|
|
width: 60px;
|
|
height: 80px;
|
|
}
|
|
}
|
|
|
|
.text {
|
|
.text_one {
|
|
display: flex;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
padding-left: 10px;
|
|
|
|
image {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.text_one_r {
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
|
|
.text_two {
|
|
width: 270px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
padding-left: 10px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
|
|
image {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
|
|
.text_three {
|
|
width: 270px;
|
|
height: 30px;
|
|
line-height: 30px;
|
|
padding-left: 10px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
|
|
image {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
.pro-box {
|
|
white-space: nowrap;
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 20rpx 20rpx 30rpx;
|
|
|
|
.pro-item {
|
|
display: inline-block;
|
|
width: 218rpx;
|
|
margin-right: 14rpx;
|
|
|
|
.picture,
|
|
/deep/image,
|
|
uni-image {
|
|
width: 100%;
|
|
height: 214rpx;
|
|
border-radius: 8rpx;
|
|
position: relative;
|
|
}
|
|
|
|
.price {
|
|
margin-top: 5rpx;
|
|
font-size: 28rpx;
|
|
color: var(--view-priceColor);
|
|
font-weight: bold;
|
|
|
|
text {
|
|
font-size: 28rpx;
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
|
|
&.styleType3 {
|
|
padding: 20rpx;
|
|
|
|
.pro-item {
|
|
display: inline-block;
|
|
background-color: #fff;
|
|
border-radius: 16rpx;
|
|
text-align: center;
|
|
padding: 10rpx 0 20rpx;
|
|
|
|
.picture,
|
|
/deep/image,
|
|
uni-image {
|
|
width: 194rpx;
|
|
height: 194rpx;
|
|
text-align: center;
|
|
border-radius: 8rpx;
|
|
position: relative;
|
|
margin: 0 auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.mer-item2 {
|
|
padding: 20rpx;
|
|
background: #fff;
|
|
margin-bottom: 20rpx;
|
|
border-radius: 16rpx;
|
|
|
|
.mer-shop-count {
|
|
display: flex;
|
|
|
|
.mer-avatar {
|
|
width: 100rpx;
|
|
height: 100rpx;
|
|
}
|
|
|
|
.mer-top {
|
|
color: #282828;
|
|
}
|
|
|
|
.mer-shop-right {
|
|
margin-left: 20rpx;
|
|
|
|
.mer-btn {
|
|
color: #666666;
|
|
}
|
|
}
|
|
|
|
.pro-box {
|
|
white-space: nowrap;
|
|
display: flex;
|
|
align-items: center;
|
|
margin-top: 20rpx;
|
|
|
|
.pro-item {
|
|
display: inline-block;
|
|
width: 170rpx;
|
|
margin-right: 20rpx;
|
|
|
|
.picture,
|
|
/deep/image,
|
|
uni-image,
|
|
/deep/.easy-loadimage {
|
|
width: 100%;
|
|
height: 170rpx;
|
|
border-radius: 8rpx;
|
|
position: relative;
|
|
}
|
|
|
|
.price {
|
|
margin-top: 5rpx;
|
|
font-size: 28rpx;
|
|
color: var(--view-priceColor);
|
|
font-weight: bold;
|
|
|
|
text {
|
|
font-size: 28rpx;
|
|
}
|
|
}
|
|
|
|
&:last-child {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.no-shop {
|
|
.pictrue {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
color: $uni-nothing-text;
|
|
|
|
image {
|
|
width: 500rpx;
|
|
height: 180rpx;
|
|
}
|
|
}
|
|
}
|
|
|
|
.guanbi {
|
|
width: 20px;
|
|
height: 20px;
|
|
margin: 30px auto;
|
|
}
|
|
|
|
.img_cls {
|
|
position: absolute;
|
|
top: 50%;
|
|
right: 7rpx;
|
|
transform: translateY(-50%);
|
|
}
|
|
|
|
.pop {
|
|
z-index: 1;
|
|
}
|
|
|
|
.sswz {
|
|
margin-top: 10rpx;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
padding: 0 20rpx;
|
|
}
|
|
|
|
.score {
|
|
display: flex;
|
|
align-items: center;
|
|
font-weight: 500;
|
|
font-size: 24rpx;
|
|
line-height: 1;
|
|
color: #000;
|
|
|
|
.star {
|
|
position: relative;
|
|
width: 111rpx;
|
|
height: 19rpx;
|
|
margin-right: 10rpx;
|
|
background: url(../../columnGoods/images/star.png) left top/100% 100% no-repeat;
|
|
overflow: hidden;
|
|
|
|
view {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: url(../../columnGoods/images/star_active.png) left top/111rpx 19rpx no-repeat;
|
|
|
|
&.star_purple {
|
|
background: url(../../columnGoods/images/star_active_purple.png) left top/111rpx 19rpx no-repeat;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.card {
|
|
width: 100%;
|
|
height: 166rpx;
|
|
z-index: 99;
|
|
position: fixed;
|
|
bottom: 0;
|
|
background-color: #fff;
|
|
overflow: hidden;
|
|
color: white;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
box-sizing: border-box;
|
|
|
|
.left {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 10rpx 35rpx;
|
|
|
|
.badge {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
background-color: #F84221;
|
|
transform: translate(50%, -50%);
|
|
// padding: 10rpx 10rpx;
|
|
border-radius: 35rpx;
|
|
text-align: center;
|
|
width: 35rpx;
|
|
line-height: 35rpx;
|
|
height: 35rpx;
|
|
}
|
|
|
|
.tot_price {
|
|
.footer-left {
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin-top: 14rpx;
|
|
|
|
.price {
|
|
width: 131rpx;
|
|
height: 28rpx;
|
|
font-size: 30rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 400;
|
|
color: #1A1A1A;
|
|
margin-bottom: 18rpx;
|
|
}
|
|
|
|
.desc {
|
|
font-size: 26rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 400;
|
|
color: #616161;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.right {
|
|
width: 200rpx;
|
|
height: 78rpx;
|
|
line-height: 78rpx;
|
|
text-align: center;
|
|
background: linear-gradient(-20deg, #FF8154 0%, #FF8154 100%);
|
|
border-radius: 39rpx;
|
|
font-size: 30rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 500;
|
|
color: #FFFFFF;
|
|
margin: 20rpx 20rpx 0 0;
|
|
}
|
|
}
|
|
|
|
.cart {
|
|
position: fixed;
|
|
bottom: 180rpx;
|
|
left: 35rpx;
|
|
|
|
.badge {
|
|
position: absolute;
|
|
top: -3rpx;
|
|
right: -2rpx;
|
|
width: 40rpx;
|
|
height: 40rpx;
|
|
line-height: 40rpx;
|
|
background: #FFCE51;
|
|
border-radius: 50%;
|
|
font-size: 24rpx;
|
|
font-family: PingFang SC;
|
|
font-weight: 500;
|
|
color: #616161;
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style> |