更新里海云仓和云市场
This commit is contained in:
parent
192786c6e3
commit
525446f782
2
main.js
2
main.js
@ -17,8 +17,10 @@ import {
|
||||
} from '@/config/app';
|
||||
import skeleton from './components/skeleton/index.vue'
|
||||
import BaseMoney from './components/BaseMoney.vue';
|
||||
import loadmore from './components/loadmore';
|
||||
Vue.component('skeleton', skeleton)
|
||||
Vue.component('BaseMoney', BaseMoney)
|
||||
Vue.component('loadmore', loadmore)
|
||||
Vue.prototype.$util = util;
|
||||
Vue.prototype.$Cache = Cache;
|
||||
Vue.prototype.$eventHub = new Vue();
|
||||
|
@ -43,7 +43,7 @@
|
||||
}
|
||||
|
||||
.wholeSale-con {
|
||||
margin: 0 30rpx;
|
||||
margin: 0 20rpx;
|
||||
|
||||
.wholeSale-nav{
|
||||
display: flex;
|
||||
@ -96,38 +96,47 @@
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.category-wrap {
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 38rpx;
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
|
||||
.category-item-active {
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: -6rpx;
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background-color: #40AE36;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
}
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 38rpx;
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.category-item-text {
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.category-item-active {
|
||||
position: relative;
|
||||
|
||||
.category-item-img {
|
||||
border: 2px solid #40AE36;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
text {
|
||||
background-color: #40AE36;
|
||||
color: #fff;
|
||||
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -190,10 +199,10 @@
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="wholeSale">
|
||||
<view class="wholeSale">
|
||||
|
||||
<!-- 顶部 -->
|
||||
<view class="wholeSale-header">
|
||||
<view class="wholeSale-header" style="position: fixed;top: 0;left: 0;width: 100%;z-index: 999;">
|
||||
<!-- 适配不同机 -->
|
||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
||||
<view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
||||
@ -202,7 +211,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 内容 -->
|
||||
<view class="wholeSale-con">
|
||||
<view class="wholeSale-con" style="padding-top: calc(var(--status-bar-height) + 100rpx);">
|
||||
<view class="wholeSale-nav">
|
||||
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
|
||||
<!-- 搜索 -->
|
||||
@ -223,12 +232,12 @@
|
||||
<view class="category-wrap">
|
||||
<block v-for="(item,index) in store_category" :key="index">
|
||||
<view class="category-item" :class="{'category-item-active': index==cate_change}" @click="changeCate(index)">
|
||||
<u-image width="108rpx" :src="item.pic" height="108rpx" shape="circle" :lazy-load="true">
|
||||
<u-image class="category-item-img" width="108rpx" :src="item.pic" height="108rpx" shape="circle" :lazy-load="true">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#999" size="15" />
|
||||
</template>
|
||||
</u-image>
|
||||
<text>{{item.cate_name}}</text>
|
||||
<text class="category-item-text">{{item.cate_name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
@ -236,7 +245,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 商品小分类 -->
|
||||
<view class="cate">
|
||||
<view class="cate" v-if="store_category_children.length>1">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="cate-wrap">
|
||||
<block v-for="(item,index) in store_category_children" :key="index">
|
||||
@ -249,7 +258,7 @@
|
||||
</view>
|
||||
|
||||
<!-- 综合查询 -->
|
||||
<view class="comprehensive">
|
||||
<!-- <view class="comprehensive">
|
||||
<view class="comprehensive-price">
|
||||
<text>价格</text>
|
||||
<image src="@/static/new_define/priceChange.png"></image>
|
||||
@ -261,10 +270,11 @@
|
||||
<text>抵扣</text>
|
||||
<image class="loudou" src="@/static/new_define/loudou.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- 流水瀑布 -->
|
||||
<WaterfallsFlow :wfList='hostProduct' @itemTap="goDetail" :type="0" />
|
||||
<loadmore :type="isLoading"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@ -275,7 +285,8 @@
|
||||
} from '@/libs/order.js'
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
||||
import {
|
||||
getStoreCategory
|
||||
getStoreCategory,
|
||||
getProductslist
|
||||
} from "@/api/store.js"
|
||||
export default {
|
||||
components: {
|
||||
@ -288,15 +299,23 @@
|
||||
store_category_children: [], //商品小分类
|
||||
cate_change: 0,
|
||||
cate_change_children: 0,
|
||||
isLoading: 0,
|
||||
where:{
|
||||
page: 1,
|
||||
limit: 20,
|
||||
|
||||
mer_id: 259,
|
||||
mer_cate_id: '',
|
||||
keyword: '',
|
||||
deduction_rate: '', //抵扣比例
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.getStoreCategory();
|
||||
this.getProductslist(true);
|
||||
},
|
||||
onReachBottom() {
|
||||
this.getProductslist();
|
||||
},
|
||||
methods: {
|
||||
navBack(){
|
||||
@ -307,19 +326,50 @@
|
||||
},
|
||||
changeCate(e){
|
||||
this.cate_change = e;
|
||||
this.store_category_children = [];
|
||||
if(this.store_category[e].children) this.store_category_children = [...this.store_category[e].children];
|
||||
this.store_category_children.unshift({
|
||||
cate_name: '全部',
|
||||
store_category_id: ''
|
||||
})
|
||||
this.cate_change_children = 0;
|
||||
this.where.mer_cate_id = this.store_category[e].store_category_id;
|
||||
this.getProductslist(true);
|
||||
},
|
||||
changeChildrenCate(e){
|
||||
this.cate_change_children = e;
|
||||
this.where.mer_cate_id = this.store_category_children[e].store_category_id;
|
||||
if(e==0) this.where.mer_cate_id = this.store_category[this.cate_change].store_category_id; // 如若选中全部, 则取父级id
|
||||
this.getProductslist(true);
|
||||
},
|
||||
getStoreCategory(){
|
||||
getStoreCategory(259).then(res=>{
|
||||
this.store_category = res.data;
|
||||
this.store_category = [{
|
||||
cate_name: '全部',
|
||||
pic: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png',
|
||||
store_category_id: ''
|
||||
}, ...res.data];
|
||||
this.store_category_children = this.store_category[0].children || [];
|
||||
this.store_category_children.unshift({
|
||||
cate_name: '全部'
|
||||
cate_name: '全部',
|
||||
store_category_id: ''
|
||||
})
|
||||
})
|
||||
},
|
||||
getProductslist(reLoad=false){
|
||||
if(reLoad){
|
||||
this.where.page = 1;
|
||||
this.hostProduct = [];
|
||||
this.isLoading = 0;
|
||||
}
|
||||
if(this.isLoading==-1)return;
|
||||
this.isLoading = 1;
|
||||
getProductslist(this.where).then(res=>{
|
||||
this.hostProduct = [...this.hostProduct, ...res.data.list];
|
||||
this.where.page++;
|
||||
this.isLoading = 0;
|
||||
if(res.data.list.length<this.where.limit) this.isLoading = -1;
|
||||
})
|
||||
},
|
||||
goDetail(item) {
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
|
@ -1,306 +1,507 @@
|
||||
<style lang="scss" scoped>
|
||||
page {
|
||||
background-color: #f8fafb !important;
|
||||
}
|
||||
|
||||
.wholeSale {
|
||||
page {
|
||||
background-color: #f8fafb !important;
|
||||
.wholeSale-header {
|
||||
margin-bottom: 20rpx;
|
||||
// background-color: #40AE36;
|
||||
}
|
||||
|
||||
.scrollview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 98rpx;
|
||||
padding-left: 32rpx;
|
||||
.wholeSale {
|
||||
background-color: #f8fafb !important;
|
||||
|
||||
.scrollview-item {
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
.wholeSale-header {
|
||||
margin-bottom: 20rpx;
|
||||
// background-color: #40AE36;
|
||||
|
||||
.scrollview-active {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: -6rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wholeSale-con {
|
||||
margin: 0 30rpx;
|
||||
|
||||
.wholeSale-nav{
|
||||
.scrollview {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
.icon{
|
||||
height: 98rpx;
|
||||
padding-left: 32rpx;
|
||||
|
||||
.scrollview-item {
|
||||
margin-right: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
|
||||
.scrollview-active {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
color: #FFFFFF;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
bottom: -6rpx;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 100%;
|
||||
height: 6rpx;
|
||||
background-color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wholeSale-con {
|
||||
margin: 0 30rpx;
|
||||
|
||||
.wholeSale-nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 40rpx;
|
||||
|
||||
.icon {
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.search_content {
|
||||
// margin-bottom: 40rpx;
|
||||
|
||||
.search_content {
|
||||
// margin-bottom: 40rpx;
|
||||
flex: 1;
|
||||
height: 70rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 80rpx;
|
||||
background: #EDEFF2;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
height: 70rpx;
|
||||
padding: 2px 2px 2px 21.05rpx;
|
||||
border-radius: 80rpx;
|
||||
background: #EDEFF2;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
|
||||
.search_content_wrap {
|
||||
width: 100%;
|
||||
.search_content_wrap {
|
||||
width: 100%;
|
||||
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
.icon-sousuo {
|
||||
font-size: 26.32rpx;
|
||||
font-weight: bold;
|
||||
color: #c8c7c6;
|
||||
margin-right: 17.54rpx;
|
||||
}
|
||||
|
||||
input {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
input {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
|
||||
.search_btn {
|
||||
width: 106rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
background: #40AE36;
|
||||
border-radius: 100px;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
.search_btn {
|
||||
width: 106rpx;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
background: #40AE36;
|
||||
border-radius: 100px;
|
||||
font-size: 28rpx;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
.category {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin-bottom: 20rpx;
|
||||
.category {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
.category-wrap {
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
.category-wrap {
|
||||
display: flex;
|
||||
padding-bottom: 20rpx;
|
||||
|
||||
.category-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 38rpx;
|
||||
.category-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-right: 38rpx;
|
||||
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
}
|
||||
text {
|
||||
margin-top: 16rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.category-item-active {
|
||||
position: relative;
|
||||
.category-item-img{
|
||||
.category-item-text {
|
||||
width: 120rpx;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.category-item-active {
|
||||
position: relative;
|
||||
|
||||
.category-item-img {
|
||||
border: 2px solid #40AE36;
|
||||
border-radius: 50%;
|
||||
}
|
||||
text{
|
||||
|
||||
text {
|
||||
background-color: #40AE36;
|
||||
color: #fff;
|
||||
padding: 2rpx 10rpx 6rpx 10rpx;
|
||||
border-radius: 50rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cate {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin-bottom: 30rpx;
|
||||
.cate {
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
margin-bottom: 30rpx;
|
||||
|
||||
.cate-wrap {
|
||||
display: flex;
|
||||
padding-bottom: 8rpx;
|
||||
.cate-wrap {
|
||||
display: flex;
|
||||
padding-bottom: 8rpx;
|
||||
|
||||
.cate-item {
|
||||
.cate-item {
|
||||
|
||||
text {
|
||||
padding: 4rpx 16rpx;
|
||||
white-space: nowrap;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
text {
|
||||
padding: 4rpx 16rpx;
|
||||
white-space: nowrap;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
.cate-item-active {
|
||||
text {
|
||||
color: #40AE36;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.cate-item-active {
|
||||
text {
|
||||
color: #40AE36;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.comprehensive {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 50rpx;
|
||||
.comprehensive {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 0 50rpx;
|
||||
|
||||
[class^=comprehensive-] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
[class^=comprehensive-] {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
text {
|
||||
margin-right: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
text {
|
||||
margin-right: 12rpx;
|
||||
font-size: 26rpx;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
image {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
image {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
.loudou {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.loudou {
|
||||
width: 24rpx;
|
||||
height: 24rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.goods_list {
|
||||
.goods {
|
||||
width: 690rpx;
|
||||
height: 200rpx;
|
||||
margin: 30rpx auto;
|
||||
margin-top: 0;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
display: flex;
|
||||
|
||||
.avatar {
|
||||
height: 160rpx;
|
||||
width: 160rpx;
|
||||
margin: 20rpx;
|
||||
border-radius: 12rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 20rpx 0;
|
||||
width: 470rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.content-head {
|
||||
width: 470rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: flex-end;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
|
||||
.title {
|
||||
width: 360rpx;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.content-two {
|
||||
display: flex;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.score {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-weight: 500;
|
||||
font-size: 24rpx;
|
||||
line-height: 1;
|
||||
color: #000;
|
||||
|
||||
.score-title {
|
||||
margin-right: 15rpx;
|
||||
|
||||
}
|
||||
|
||||
.score_text {
|
||||
color: #fd5d2e;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<view class="wholeSale">
|
||||
<view class="wholeSale">
|
||||
|
||||
<!-- 顶部 -->
|
||||
<view class="wholeSale-header">
|
||||
<!-- 适配不同机 -->
|
||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
||||
<!-- 顶部 -->
|
||||
<view class="wholeSale-header">
|
||||
<!-- 适配不同机 -->
|
||||
<view style="height: var(--status-bar-height);background-color: #40af37;"></view>
|
||||
<view style="display: flex;padding: 20rpx 28rpx;background-color: #40af37;color: #fff;">
|
||||
<view style="display: flex;font-weight: bold;"><u-icon style="margin-right: 20rpx;" name="arrow-left" size="20" color="#fff" @click="navBack"></u-icon>供销综合云市场</view>
|
||||
<view style="display: flex;font-weight: bold;"><u-icon style="margin-right: 20rpx;" name="arrow-left" size="20"
|
||||
color="#fff" @click="navBack"></u-icon>供销综合云市场</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 内容 -->
|
||||
<view class="wholeSale-con">
|
||||
<!-- 内容 -->
|
||||
<view class="wholeSale-con">
|
||||
<view class="wholeSale-nav">
|
||||
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
|
||||
<!-- 搜索 -->
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none"
|
||||
class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c search_content_wrap">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" placeholder="搜索您需要批发进货的产品名称" placeholder-style="font-size: 30rpx;color:#999;"
|
||||
disabled style="pointer-events: none;">
|
||||
</view>
|
||||
<!-- <button class="search_btn">搜索</button> -->
|
||||
<navigator url="/pages/columnGoods/goods_search/index" hover-class="none" class="search_content flex_a_c_j_sb">
|
||||
<view class="flex_a_c search_content_wrap">
|
||||
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
|
||||
<input type="text" placeholder="搜索您需要批发进货的产品名称" placeholder-style="font-size: 30rpx;color:#999;" disabled
|
||||
style="pointer-events: none;">
|
||||
</view>
|
||||
<!-- <button class="search_btn">搜索</button> -->
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<!-- 商品大分类 -->
|
||||
<view class="category">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="category-wrap">
|
||||
<block v-for="(item,index) in store_category" :key="index">
|
||||
<view class="category-item" :class="{'category-item-active': index==cate_change}" @click="changeCate(index)">
|
||||
<u-image class="category-item-img" width="108rpx" :src="item.background" height="108rpx" shape="circle" :lazy-load="true">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#999" size="15" />
|
||||
</template>
|
||||
</u-image>
|
||||
<text>{{item.category_name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 商品大分类 -->
|
||||
<view class="category">
|
||||
<scroll-view scroll-x="true">
|
||||
<view class="category-wrap">
|
||||
<block v-for="(item,index) in store_category" :key="index">
|
||||
<view class="category-item" :class="{'category-item-active': index==cate_change}"
|
||||
@click="changeCate(index)">
|
||||
<u-image class="category-item-img" width="108rpx" :src="item.background" height="108rpx" shape="circle"
|
||||
:lazy-load="true">
|
||||
<template v-slot:loading>
|
||||
<u-loading-icon color="#999" size="15" />
|
||||
</template>
|
||||
</u-image>
|
||||
<text class="category-item-text">{{item.category_name}}</text>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 列表 -->
|
||||
<view class="goods_list">
|
||||
<view class="goods" v-for="(item, index) in goodsList" :key="index" @click="goStore(item.mer_id)">
|
||||
<view class="avatar">
|
||||
<image style="width: 100%;height: 100%;" :src="item.mer_avatar" lazy-load></image>
|
||||
</view>
|
||||
<view class="content">
|
||||
<view class="content-head">
|
||||
<view class="title">{{item.mer_name}}</view>
|
||||
<text style="font-size: 21.03rpx;color: #aaa;">月销{{item.sales}}</text>
|
||||
</view>
|
||||
<view class="content-two">
|
||||
<view class="score">
|
||||
<view class="star">
|
||||
<view
|
||||
:style="{width: `${(item.service_score / 5 * 100).toFixed(0)}%`, backgroundImage: `url(${domain}/static/diy/score1${keyColor}.png)`}">
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<text style="margin-left: 20rpx;color: #FF6D20;font-size: 22.78rpx; ">{{item.service_score}}</text>
|
||||
<text v-if="item.distance"
|
||||
style="margin-left: 20rpx;font-size: 21.03rpx;color: #aaa;">{{item.distance}}</text>
|
||||
</view>
|
||||
<view class="content-two">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DH.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text> {{item.service_phone}}</text>
|
||||
<u--image style="margin-left: 28rpx;" v-if="item.mer_take_time" :showLoading="true" src="/static/images/GXSC/SJ.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text v-if="item.mer_take_time">{{item.mer_take_time[0]}}-{{item.mer_take_time[1]}}</text>
|
||||
</view>
|
||||
<view class="content-two">
|
||||
<u--image :showLoading="true" src="/static/images/GXSC/DW.png" width="33.85rpx"
|
||||
height="33.85rpx"></u--image>
|
||||
<text class="address">{{item.mer_address}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<loadmore :type="isLoading"></loadmore>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
||||
import {
|
||||
merClassifly
|
||||
goShopDetail
|
||||
} from '@/libs/order.js'
|
||||
import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue'
|
||||
import {
|
||||
merClassifly,
|
||||
storeMerchantList
|
||||
} from "@/api/store.js"
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
import {
|
||||
configMap
|
||||
} from '@/utils';
|
||||
import {
|
||||
mapGetters
|
||||
} from "vuex";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
} from '@/config/app';
|
||||
export default {
|
||||
components: {
|
||||
WaterfallsFlow
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
domain: HTTP_REQUEST_URL,
|
||||
hostProduct: [],
|
||||
store_category: [], //商品大分类
|
||||
store_category_children: [], //商品小分类
|
||||
cate_change: 0,
|
||||
cate_change_children: 0,
|
||||
where:{
|
||||
goodsList: [],
|
||||
isLoading: 0,
|
||||
where: {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
|
||||
keyword: '',
|
||||
order: 'location',
|
||||
type_id: '10,17,21',
|
||||
merchant_category_id: '',
|
||||
location: '28.909126,105.428016'
|
||||
}
|
||||
}
|
||||
},
|
||||
onLoad(option){
|
||||
this.merClassifly();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
navBack(){
|
||||
computed: {
|
||||
...configMap({
|
||||
margin_ico_switch: 0,
|
||||
margin_ico: '',
|
||||
mer_location: 0,
|
||||
store_street_theme: 1,
|
||||
hide_mer_status: '',
|
||||
}, mapGetters(['viewColor', 'keyColor'])),
|
||||
},
|
||||
onLoad(option) {
|
||||
this.merClassifly();
|
||||
this.storeMerchantList();
|
||||
},
|
||||
onReachBottom() {
|
||||
this.storeMerchantList();
|
||||
},
|
||||
methods: {
|
||||
navBack() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
tabsChange(e) {
|
||||
this.tabsCurr = e;
|
||||
},
|
||||
changeCate(e){
|
||||
this.cate_change = e;
|
||||
tabsChange(e) {
|
||||
this.tabsCurr = e;
|
||||
},
|
||||
merClassifly(){
|
||||
merClassifly(259).then(res=>{
|
||||
this.store_category = res.data;
|
||||
changeCate(e) {
|
||||
this.cate_change = e;
|
||||
this.where.merchant_category_id = this.store_category[e].merchant_category_id;
|
||||
this.storeMerchantList(true);
|
||||
},
|
||||
// 进店
|
||||
goStore(id) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/store/home/index?id=${id}`
|
||||
})
|
||||
},
|
||||
merClassifly() {
|
||||
merClassifly(259).then(res => {
|
||||
this.store_category = [{
|
||||
category_name: '全部',
|
||||
merchant_category_id: '',
|
||||
background: 'https://lihai001.oss-cn-chengdu.aliyuncs.com/def/de2be202312151001024597.png'
|
||||
}, ...res.data];
|
||||
})
|
||||
},
|
||||
goDetail(item) {
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
if (this.isLogin) {
|
||||
initiateAssistApi(item.activity_id).then(res => {
|
||||
let id = res.data.product_assist_set_id;
|
||||
uni.hideLoading();
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/assist_detail/index?id=' + id
|
||||
});
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
} else {
|
||||
toLogin();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
storeMerchantList(reLoad = false) {
|
||||
if(reLoad){
|
||||
this.where.page = 1;
|
||||
this.goodsList = [];
|
||||
this.isLoading = 0;
|
||||
}
|
||||
if(this.isLoading==-1)return;
|
||||
this.isLoading = 1;
|
||||
storeMerchantList(this.where).then(res => {
|
||||
this.goodsList = [...this.goodsList, ...res.data.list];
|
||||
this.isLoading = 0;
|
||||
if(res.data.list.length<this.where.limit) this.isLoading = -1;
|
||||
})
|
||||
},
|
||||
goDetail(item) {
|
||||
goShopDetail(item, this.uid).then(res => {
|
||||
if (this.isLogin) {
|
||||
initiateAssistApi(item.activity_id).then(res => {
|
||||
let id = res.data.product_assist_set_id;
|
||||
uni.hideLoading();
|
||||
uni.navigateTo({
|
||||
url: '/pages/activity/assist_detail/index?id=' + id
|
||||
});
|
||||
}).catch((err) => {
|
||||
uni.showToast({
|
||||
title: err,
|
||||
icon: 'none'
|
||||
})
|
||||
});
|
||||
} else {
|
||||
toLogin();
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
x
Reference in New Issue
Block a user