修复bug

This commit is contained in:
weipengfei 2024-03-30 14:13:53 +08:00
parent a5290e30e2
commit 69f8e68c73
3 changed files with 15 additions and 14 deletions

View File

@ -44,7 +44,7 @@
} }
.wholeSale-con { .wholeSale-con {
margin: 0 30rpx; margin: 0 20rpx;
.wholeSale-nav { .wholeSale-nav {
display: flex; display: flex;
@ -202,9 +202,9 @@
.goods_list { .goods_list {
.goods { .goods {
width: 690rpx; width: 710rpx;
height: 200rpx; height: 200rpx;
margin: 30rpx auto; margin: 20rpx auto;
margin-top: 0; margin-top: 0;
background-color: #fff; background-color: #fff;
border-radius: 24rpx; border-radius: 24rpx;

View File

@ -178,8 +178,8 @@
onLoad(options) { onLoad(options) {
this.searchValue = options.searchVal || '' this.searchValue = options.searchVal || ''
this.back = options.back; this.back = options.back;
this.isShop = options.shop || false;
if(options.shop=='true'){ if(options.shop=='true'){
this.isShop = options.shop;
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: '搜索店铺' title: '搜索店铺'
}) })

View File

@ -209,9 +209,9 @@
} }
.goods_list { .goods_list {
.goods { .goods {
width: 690rpx; // width: 690rpx;
height: 200rpx; height: 200rpx;
margin: 30rpx auto; margin: 20rpx auto;
margin-top: 0; margin-top: 0;
background-color: #fff; background-color: #fff;
border-radius: 24rpx; border-radius: 24rpx;
@ -286,11 +286,11 @@
<view class="wholeSale-nav"> <view class="wholeSale-nav">
<!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> --> <!-- <u-icon class="icon" name="arrow-left" size="20" @click="navBack"></u-icon> -->
<!-- 搜索 --> <!-- 搜索 -->
<view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}`)" <view @click="navTo(`/pages/columnGoods/goods_search/index?back=true&searchVal=${where.keyword}&shop=${subCurr!=0 || (subCurr==0 && tabsCurr!=2) ? false : true}`)"
hover-class="none" class="search_content flex_a_c_j_sb"> hover-class="none" class="search_content flex_a_c_j_sb">
<view class="flex_a_c search_content_wrap"> <view class="flex_a_c search_content_wrap">
<view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view> <view class="iconfont icon-sousuo" style="font-size: 39rpx;"></view>
<input type="text" placeholder="搜索您需要批发进货的产品名称" :value="where.keyword" <input type="text" :placeholder="subCurr!=0 || (subCurr==0 && tabsCurr!=2) ? '搜索您需要批发进货的产品名称': '搜索店铺名称'" :value="where.keyword"
placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;"> placeholder-style="font-size: 30rpx;color:#999;" disabled style="pointer-events: none;">
</view> </view>
<!-- <button class="search_btn">搜索</button> --> <!-- <button class="search_btn">搜索</button> -->
@ -391,7 +391,7 @@
<!-- 列表 --> <!-- 列表 -->
<view class="goods_list"> <view class="goods_list" v-else>
<view class="goods" v-for="(item, index) in shopList" :key="index" @click="goStore(item.mer_id)"> <view class="goods" v-for="(item, index) in shopList" :key="index" @click="goStore(item.mer_id)">
<view class="avatar"> <view class="avatar">
<!-- <image style="width: 100%;height: 100%;" :src="item.mer_avatar" mode="aspectFill" lazy-load> <!-- <image style="width: 100%;height: 100%;" :src="item.mer_avatar" mode="aspectFill" lazy-load>
@ -493,7 +493,7 @@
name: '名优特产批发', name: '名优特产批发',
val: 3 val: 3
}], }],
tabsCurr: 2, tabsCurr: 1,
orderCurr: 3, // orderCurr: 3, //
subList: ['批发商户', '批发市场'], subList: ['批发商户', '批发市场'],
subCurr: 0, subCurr: 0,
@ -551,15 +551,16 @@
this.getProductslist(true); this.getProductslist(true);
}, },
changeSub(e){ changeSub(e){
this.subCurr = e;
this.where = { this.where = {
page: 1, page: 1,
limit: this.where.limit, limit: this.where.limit,
sale_type: this.where.sale_type, sale_type: this.where.sale_type,
keyword: this.where.keyword, keyword: this.where.keyword,
} }
if(this.subCurr!=0) this.where.mer_type = 2;
this.cate_change = 0; this.cate_change = 0;
this.cate_change_children = 0; this.cate_change_children = 0;
this.subCurr = e;
this.initData(true); this.initData(true);
}, },
toOrder(type, index = -1) { toOrder(type, index = -1) {
@ -577,6 +578,7 @@
uni.$once('searchValue', (e) => { uni.$once('searchValue', (e) => {
this.$nextTick(() => { this.$nextTick(() => {
this.where.keyword = e; this.where.keyword = e;
if(this.tabsCurr==2&&this.subCurr==0) this.storeMerchantList(true);
this.getProductslist(true); this.getProductslist(true);
}) })
}) })
@ -604,9 +606,8 @@
} }
this.cate_change = 0; this.cate_change = 0;
this.cate_change_children = 0; this.cate_change_children = 0;
this.where.mer_type = e; if(this.tabsCurr!=2||(this.tabsCurr==2&&this.subCurr!=0)) this.where.mer_type = e;
this.getStoreCategory(); this.initData(true);
this.getProductslist(true);
}, },
changeCate(e) { changeCate(e) {
this.cate_change = e; this.cate_change = e;