From 06be1c7ccc7533612e4cc7b0e730080d0dd3d2a1 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Fri, 16 Jan 2026 11:43:36 +0800
Subject: [PATCH] 商品可以赠送优惠券 商品属性增加团购 入驻商家增加实物和团购选项 团购和实物商户分类分开 增加团购商家页面 后台添加页面增加团购组件
---
mobile/pages/shop/shop_list.vue | 73 +++++++++++++++++++++---------------
1 files changed, 43 insertions(+), 30 deletions(-)
diff --git a/mobile/pages/shop/shop_list.vue b/mobile/pages/shop/shop_list.vue
index 9280ba2..d43467e 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,9 +67,11 @@
</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>
@@ -75,7 +79,8 @@
<view class="f22 red">¥
<text class="f32">
{{item1.product_price}}
- </text></view>
+ </text>
+ </view>
</view>
</view>
</view>
@@ -136,7 +141,7 @@
screenWidth: 0,
currentIndex: 0,
category_id: '',
- store_open:false
+ store_open: false
};
},
computed: {
@@ -215,21 +220,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 +248,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 +288,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 +338,7 @@
});
}
},
-
+
/**
* 分类导航
* 点击事件
@@ -601,7 +607,7 @@
.shop_list_body_item_shop {
width: 100%;
- height: 150rpx;
+ min-height: 150rpx;
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
@@ -708,10 +714,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 +737,6 @@
}
.action-btn {
- width: 60rpx;
- height: 60rpx;
display: flex;
align-items: center;
justify-content: center;
@@ -756,6 +765,7 @@
.collect {
margin-bottom: 26rpx;
}
+
// 分类相关 by lyzflash
.scroll-category {
width: 100%;
@@ -763,10 +773,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 +786,7 @@
display: inline-block;
position: relative;
}
+
.category-btn {
display: inline-block;
border-radius: 50rpx;
@@ -781,4 +794,4 @@
font-size: 28rpx;
border: 2rpx solid #ccc;
}
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.2