diff --git a/components/WaterfallsFlowItem/WaterfallsFlowItemo.vue b/components/WaterfallsFlowItem/WaterfallsFlowItemo.vue index 23c1c1c..3d278f7 100644 --- a/components/WaterfallsFlowItem/WaterfallsFlowItemo.vue +++ b/components/WaterfallsFlowItem/WaterfallsFlowItemo.vue @@ -18,9 +18,6 @@ 满20包邮 --> - - {{item.price.split('.')[0]}}.{{item.price.split('.')[1]}} - {{item.rate}} @@ -31,9 +28,12 @@ {{item.merchant&&item.merchant.distance}} - - {{item.merchant&&item.merchant.street_name}} - + + {{item.merchant&&item.merchant.street_name}} + + + + {{item.price.split('.')[0]}}.{{item.price.split('.')[1]}} + + + + + + + + + + 里海云仓 + + + + {{street||'定位中'}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{item.cate_name}} + + + + + + + + + + + + + + + + {{item.cate_name}} + + + + + 综合 + + 销量 + + 价格 + + + + + + + + + + + + + 暂无商品,切换其他分类或地区试试 + + + + + + + {{item.product.store_name}} + + {{item.product.store_info}} + {{getSkuName(item)}} + {{item.unit_name}} + + + {{ item.product.price.split('.')[0] }}.{{item.product.price.split('.')[1]}} + + + + + + + + + + + + + + + + + + + + + + {{goodsNum}} + + + + + ¥{{totalMoney}} + + + 支持配送 售后无忧 + + + + + 去结算 + + + + + + + + + + 请选择商品分类 + + + + {{item.cate_name}} + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/nongKe/supply_chain/supplierB.vue b/pages/nongKe/supply_chain/supplierB.vue index dcb0764..83c2a4c 100644 --- a/pages/nongKe/supply_chain/supplierB.vue +++ b/pages/nongKe/supply_chain/supplierB.vue @@ -89,11 +89,11 @@ - - {{item.category_name}} + {{item.cate_name}} @@ -190,7 +190,8 @@ getGeocoder, } from '@/api/store.js'; import { - supMenuApi + supMenuApi, + getCategoryListLevel } from '@/api/requesta.js'; import recommend from './component/recommend'; import rightSlider from './component/rightSlider'; @@ -307,14 +308,15 @@ page: 1, limit: 10, order: 'location', - category_id: '', + store_category_id: '', //商品类型id + category_id: '', //商户类型id type_id: '', street_id: '', is_recommend: false, // 是否为推荐的参数 }, storeKey: 0, storeScroll: true, - merchant_category_id: '', // 当前选中类型的id + store_category_id: '', // 当前选中类型的id mer_id: '', sortId: '', price_on: '', @@ -348,17 +350,17 @@ this.credit_buy = options.credit_buy this.storeParam.type_id = options.type_id this.storeParam.type_id = options.type_id && options.type_id.split(',').toString() || '' - this.storeParam.category_id = options.cate_id && options.cate_id.split(',').toString() || '' + this.storeParam.store_category_id = options.cate_id && options.cate_id.split(',').toString() || '' this.storeList = []; - supMenuApi().then(res => { + getCategoryListLevel().then(res => { this.menuList = res.data; - this.merchant_category_id = this.menuList[0].merchant_category_id; - this.storeParam.category_id = this.merchant_category_id; + this.store_category_id = this.menuList[0].store_category_id; + this.storeParam.store_category_id = this.store_category_id; if (this.mer_location == 1) { this.selfLocation() } // this.storeMerchantList(); - this.getClassfication(); + // this.getClassfication(); this.getStoreType(); this.Area() let that = this @@ -403,13 +405,14 @@ 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.storeMerchantList() + this.storeParam.page = 1; + this.status = 'loadmore'; + this.$nextTick(() => { + this.$bus.$emit('value-updated', e.value[1].name + ',' + e.value[1].code); + this.storeMerchantList(); + }) }, changeHandler(e) { const { @@ -536,8 +539,8 @@ check: false } }) - if (this.storeParam.category_id.length > 0) { - this.storeParam.category_id.forEach((ids, index) => { + if (this.storeParam.store_category_id.length > 0) { + this.storeParam.store_category_id.forEach((ids, index) => { temp.forEach(el => { if (ids == el.merchant_category_id) { el.check = true @@ -707,13 +710,14 @@ // 查找店铺 storeMerchantList() { if (this.loading) return + this.status = "loading" this.loading = true let rqData = { keyword: this.storeParam.keyword, page: this.storeParam.page, limit: 10, order: this.storeParam.order, - category_id: this.storeParam.category_id, + store_category_id: this.storeParam.store_category_id, type_id: this.storeParam.type_id, credit_buy: this.credit_buy, } @@ -725,7 +729,7 @@ storeMerchantList(rqData).then(res => { if (res.data.list.length < rqData.limit) { this.status = "nomore" - } + }else this.status = "loadmore" this.count = res.data.count this.storeList = (res.data.list) this.loading = false @@ -739,13 +743,14 @@ // 推荐店铺 storeMerchantList2() { if (this.loading) return + this.status = "loading" this.loading = true let rqData = { keyword: this.storeParam.keyword, page: this.storeParam.page, limit: 10, order: this.storeParam.order, - // category_id: this.storeParam.category_id, + // store_category_id: this.storeParam.store_category_id, type_id: this.storeParam.type_id, credit_buy: this.credit_buy, } @@ -753,6 +758,9 @@ rqData.location = this.latitude + ',' + this.longitude } storeMerchantList(rqData).then(res => { + if (res.data.list.length < rqData.limit) { + this.status = "nomore" + }else this.status = "loadmore" this.storeParam.is_recommend = true; this.count = res.data.count this.storeList = (res.data.list) @@ -798,12 +806,12 @@ this.storeParam.type_id = arr1.toString(); } if (data.merList.length == 0) { - this.storeParam.category_id = '' + this.storeParam.store_category_id = '' } else { data.merList.forEach(item => { arr2.push(item.merchant_category_id) }) - this.storeParam.category_id = arr2.toString(); + this.storeParam.store_category_id = arr2.toString(); } this.rightBox = data.status this.loadend = false; @@ -847,8 +855,8 @@ }, // 点击商户分类 changeMerchant(id){ - this.merchant_category_id = id; - this.storeParam.category_id = this.merchant_category_id; + this.store_category_id = id; + this.storeParam.store_category_id = this.store_category_id; this.storeParam.page = 1; this.storeMerchantList() }, @@ -873,30 +881,36 @@ }, //上划加载更多 onReachBottom() { - this.storeParam.page += 1 - - let rqData = { - keyword: this.storeParam.keyword, - page: this.storeParam.page, - limit: 10, - order: this.storeParam.order, - category_id: this.storeParam.category_id, - type_id: this.storeParam.type_id, - street_id: this.storeParam.street_id, - credit_buy: this.credit_buy - } - if (this.latitude) { - rqData.location = this.latitude + ',' + this.longitude - } - // console.log(rqData) - storeMerchantList(rqData).then(res => { - console.log(res.data.list.length); - if (res.data.list.length < rqData.limit) { - this.status = "nomore" - } - this.count = res.data.count - this.storeList.push(...res.data.list) - }) + this.$u.throttle(()=>{ + if(this.status == "nomore")return; + this.storeParam.page += 1 + this.status = "loading" + let rqData = { + keyword: this.storeParam.keyword, + page: this.storeParam.page, + limit: 10, + order: this.storeParam.order, + type_id: this.storeParam.type_id, + credit_buy: this.credit_buy + } + if(!this.storeParam.is_recommend){ + rqData.store_category_id = this.storeParam.store_category_id; + rqData.street_id = this.storeParam.street_id; + } + if (this.latitude) { + rqData.location = this.latitude + ',' + this.longitude + } + // console.log(rqData) + storeMerchantList(rqData).then(res => { + if (res.data.list.length < rqData.limit) { + this.status = "nomore" + }else this.status = "loadmore" + this.count = res.data.count + this.storeList.push(...res.data.list) + this.loading = false + this.loadingIcon = false + }) + }, 500) } } diff --git a/pages/order_addcart/order_addcart.vue b/pages/order_addcart/order_addcart.vue index fa2478e..bcdf449 100644 --- a/pages/order_addcart/order_addcart.vue +++ b/pages/order_addcart/order_addcart.vue @@ -676,7 +676,10 @@ }, getCartNum: function() { let that = this; - getCartCounts().then(res => { + let params = {}; + if(this.product_type) params.product_type = this.product_type; + if(this.source) params.source = this.source; + getCartCounts(params).then(res => { that.cartTotalCount = res.data[0].count || 0; }); }, diff --git a/pages/supply_chains/supply_chains.vue b/pages/supply_chains/supply_chains.vue index b551afd..2d09316 100644 --- a/pages/supply_chains/supply_chains.vue +++ b/pages/supply_chains/supply_chains.vue @@ -582,9 +582,12 @@ if (this.isYunCang == 0) { return Toast('当前区域没有云仓库') } - uni.navigateTo({ - url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}` - }) + // uni.navigateTo({ + // url: `/pages/nongKe/cloud_entrepot/index?street=${this.street_id}&town=${this.town}&source=103&location=${this.latitude},${this.longitude}` + // }) + uni.navigateTo({ + url: `/pages/nongKe/cloud_entrepot/indexh?street_id=${this.street_id}&townName=${this.town}&source=103&location=${this.latitude},${this.longitude}` + }) }, navgo(url) { diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue index 8d7ce2b..3dfe967 100644 --- a/pages/users/order_confirm/index.vue +++ b/pages/users/order_confirm/index.vue @@ -1049,14 +1049,14 @@ }) }) that.subCoupon['0'] = [] - if (res.data.platformCoupon.length > 0) { + if (res.data.platformCoupon?.length > 0) { res.data.platformCoupon.forEach(el => { if (el.checked) { that.subCoupon[el.mer_id] = [] that.subCoupon[el.mer_id].push(el.coupon_user_id) } }) - } + }else res.data.platformCoupon = []; that.$set(that.coupon, "coupon", that.plantCoupon ? res.data.platformCoupon : res.data .order[that.couponIndex].coupon); that.$set(that, "store_coupon_number", res.data.order[that.couponIndex].order.useCouponIds diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index f540c1a..dffbc8b 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -269,7 +269,7 @@ 发布种草 --> - 去评价 + 去评价 @@ -343,6 +343,7 @@ import { HTTP_REQUEST_URL } from '@/config/app'; +import { Toast } from '../../../libs/uniApi'; export default { components: { payment, @@ -619,30 +620,32 @@ /** * 点击去评价 */ - goOrderDetails_Evaluation: function(order_id) { + goOrderDetails_Evaluation: function(item) { let self = this - if (!order_id) return that.$util.Tips({ + if (!item.order_id) return that.$util.Tips({ title: '缺少订单号无法查看订单详情和评价' }); // #ifdef MP if (self.orderStatus == 0) { uni.navigateTo({ - url: '/pages/order_details/stay?order_id=' + order_id + url: '/pages/order_details/stay?order_id=' + item.order_id }) } else { + if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品') uni.navigateTo({ - url: '/pages/order_details/index?order_id=' + order_id + url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}` }) } // #endif // #ifndef MP if (self.orderStatus == 0) { uni.navigateTo({ - url: '/pages/order_details/stay?order_id=' + order_id + url: '/pages/order_details/stay?order_id=' + item.order_id }) } else { + if(!item.orderProduct[0]?.order_product_id) return Toast('无法评价该商品') uni.navigateTo({ - url: '/pages/order_details/index?order_id=' + order_id + url: `/pages/users/goods_comment_con/index?uni=${item.orderProduct[0].order_product_id}&order_id=${item.order_id}` }) } // #endif