From a4b3ee325c7354579d495bc74a777e494e5ec38c Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 06 Feb 2026 18:18:44 +0800
Subject: [PATCH] 商品可以价格面议 选择走访时显示输入走访企业名 分会添加活动时要总会审核 分类添加人数限制,添加活动选择了填写人数限制的分类时活动名额下显示该分类人数限制为15 同一个企业30天内只能走访一次,在30天内走访同一个企业时提示该企业已被走访xx天后才可以从新走访
---
mobile/pages/shop/shop_list.vue | 87 ++++++++++++++++++++++++++++---------------
1 files changed, 56 insertions(+), 31 deletions(-)
diff --git a/mobile/pages/shop/shop_list.vue b/mobile/pages/shop/shop_list.vue
index 9280ba2..a05497d 100644
--- a/mobile/pages/shop/shop_list.vue
+++ b/mobile/pages/shop/shop_list.vue
@@ -7,8 +7,8 @@
<view class="index-search-box index-search-box_re d-b-c" id="searchBox">
<view class="index-search index-search_re t-c flex-1">
<span class="icon iconfont icon-sousuo"></span>
- <input type="text" v-model="searchtxt" class="flex-1 ml10 f30 gray3" value="" placeholder-class="f24 gray6"
- placeholder="搜索名称" confirm-type="search" @confirm="search()" />
+ <input type="text" v-model="searchtxt" class="flex-1 ml10 f30 gray3" value=""
+ placeholder-class="f24 gray6" placeholder="搜索名称" confirm-type="search" @confirm="search()" />
</view>
</view>
<view class="inner-tab">
@@ -25,9 +25,11 @@
</view>
</view>
<view class="category-box pt20" v-if="category.length>0">
- <scroll-view class="scroll-category" scroll-x="true" :scroll-left="scrollLeft" scroll-with-animation="true">
+ <scroll-view class="scroll-category" scroll-x="true" :scroll-left="scrollLeft"
+ scroll-with-animation="true">
<view class="category-list">
- <view class="category-item" v-for="(item,index) in category" :key="item.category_id" @click="tabChange(index)" :id="'item-' + index" :class="{current: index === currentIndex}">
+ <view class="category-item" v-for="(item,index) in category" :key="item.category_id"
+ @click="tabChange(index)" :id="'item-' + index" :class="{current: index === currentIndex}">
<text class="category-btn p-0-20">{{item.name}}</text>
</view>
</view>
@@ -35,9 +37,9 @@
</view>
</view>
<view class="prodcut-list-wrap" v-if="store_open">
- <scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'" lower-threshold="50"
- :refresher-triggered="triggered" @scrolltolower="scrolltolowerFunc" refresher-enabled="true" @refresherrefresh="onRefresh"
- @refresherrestore="onRestore">
+ <scroll-view scroll-y="true" class="scroll-Y" :style="'height:' + scrollviewHigh + 'px;'"
+ lower-threshold="50" :refresher-triggered="triggered" @scrolltolower="scrolltolowerFunc"
+ refresher-enabled="true" @refresherrefresh="onRefresh" @refresherrestore="onRestore">
<view class="shop_list_body">
<view class="shop_list_body_item" v-for="(item,index) in shopData" :key="index">
<view class="shop_list_body_item_shop" @click="goto_shop(item.shop_supplier_id)">
@@ -46,15 +48,15 @@
</view>
<view class="shop_list_body_item_shop_info">
<view class="h1 title">{{item.name}}</view>
- <view class="h3 brand">主营:{{item.category_name}}</view>
+ <!-- <view class="h3 brand address-row">主营:{{item.category_name}}</view> -->
<view class="h3 address-row">
<text class="address-text">地址:{{item.address}}</text>
</view>
<!-- <view class="h3 sales">销量{{item.product_sales}}件<text class="ml10 mr10">|</text>{{item.fav_count}}人关注</view> -->
</view>
<view class="shop_list_body_item_shop_others">
- <view class="f26 gray3 collect">店铺评分</view>
- <view><text class="redEe f32 fb">{{item.server_score}}</text></view>
+ <!-- <view class="f26 gray3 collect">店铺评分</view>
+ <view><text class="redEe f32 fb">{{item.server_score}}</text></view> -->
<view class="action-buttons">
<view @click.stop="contactShop(item)">
<text class="iconfont icon icon-002dianhua action-btn contact-btn"></text>
@@ -65,17 +67,21 @@
</view>
</view>
</view>
- <view v-if="shopData[index].productList.length>0" :class="shopData[index].productList.length<3?'shop_list_body_item_product2':'shop_list_body_item_product'">
- <view class="shop_list_body_item_product_item" v-for="(item1,index2) in shopData[index].productList" :key="index2"
- @click="goto_product(item1.product_id)">
+ <view v-if="shopData[index].productList.length>0"
+ :class="shopData[index].productList.length<3?'shop_list_body_item_product2':'shop_list_body_item_product'">
+ <view class="shop_list_body_item_product_item"
+ v-for="(item1,index2) in shopData[index].productList" :key="index2"
+ @click="goto_product(item1.product_id)">
<view>
<image :src="item1.image[0].file_path"></image>
</view>
<view class="shop_list_body_item_product_item_price">
- <view class="f22 red">¥
+ <view class="f22 red" v-if="item1.is_price_negotiable">价格面议</view>
+ <view class="f22 red" v-else>¥
<text class="f32">
{{item1.product_price}}
- </text></view>
+ </text>
+ </view>
</view>
</view>
</view>
@@ -136,7 +142,7 @@
screenWidth: 0,
currentIndex: 0,
category_id: '',
- store_open:false
+ store_open: false
};
},
computed: {
@@ -159,11 +165,22 @@
mounted() {
this.init();
this._freshing = false;
+
this.restoreData();
// 获取分类 by lyzflash
this.getCategory();
/*获取订单列表*/
this.getData();
+ },
+ onLoad(option) {
+ let self = this;
+ if( option.category_id){
+ self.category.forEach(function(index,item){
+ if(item.category_id==option.category_id){
+ self.tabChange(index)
+ }
+ })
+ }
},
methods: {
/*初始化*/
@@ -215,21 +232,22 @@
page: page || 1,
list_rows: list_rows,
sortType: self.type_active,
+ supplier_type: 10,
name: self.keyWord,
category_id: self.category_id // 分类id by lyzflash
}, (res) => {
self.loading = false;
- self.store_open = res.data.store_open;
- if(!self.store_open){
+ self.store_open = res.data.store_open;
+ if (!self.store_open) {
uni.setNavigationBarTitle({
- title: '我的订单',
+ title: '我的订单',
});
self.gotoPage('/pages/index/index');
- }else{
+ } else {
uni.setNavigationBarTitle({
- title: '人气好店',
+ title: '人气好店',
});
- }
+ }
self.last_page = res.data.list.last_page;
self.shopData = self.shopData.concat(res.data.list.data);
if (res.data.list.last_page <= 1) {
@@ -242,8 +260,7 @@
/*获取分类*/
getCategory() {
let self = this;
- self._post('supplier.index/category', {
- }, (res) => {
+ self._post('supplier.index/category', {category_type:10}, (res) => {
self.category = res.data.category;
})
},
@@ -283,6 +300,7 @@
//跳转店铺首页
goto_shop(shop_supplier_id) {
+ uni.setStorageSync('shop_supplier_id',shop_supplier_id)
this.gotoPage('/pages/shop/shop?shop_supplier_id=' + shop_supplier_id);
},
//跳转商品页面
@@ -332,7 +350,7 @@
});
}
},
-
+
/**
* 分类导航
* 点击事件
@@ -601,7 +619,7 @@
.shop_list_body_item_shop {
width: 100%;
- height: 150rpx;
+ min-height: 150rpx;
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
@@ -708,10 +726,15 @@
}
.address-row {
- display: flex;
+ /* display: flex;
align-items: center;
justify-content: space-between;
- width: 100%;
+ width: 100%; */
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+ word-wrap: break-word;
}
.address-text {
@@ -726,8 +749,6 @@
}
.action-btn {
- width: 60rpx;
- height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -756,6 +777,7 @@
.collect {
margin-bottom: 26rpx;
}
+
// 分类相关 by lyzflash
.scroll-category {
width: 100%;
@@ -763,10 +785,12 @@
white-space: nowrap;
text-align: start;
}
+
.scroll-category .current .category-btn {
@include border_color("border_color");
@include text_color("font_color");
}
+
.scroll-category .category-item {
height: 50rpx;
text-align: center;
@@ -774,6 +798,7 @@
display: inline-block;
position: relative;
}
+
.category-btn {
display: inline-block;
border-radius: 50rpx;
@@ -781,4 +806,4 @@
font-size: 28rpx;
border: 2rpx solid #ccc;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.2