From 17e2e8ed1460f1e5079e4d90233fc62558716d90 Mon Sep 17 00:00:00 2001 From: 1154079537 <1154079537@qq.com> Date: Thu, 16 May 2024 17:33:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E9=93=BA=E5=85=A5=E9=A9=BB=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/recommend/index.vue | 38 +++++++++++--- pages/cloud_warehouse/home/home.vue | 2 +- pages/cloud_warehouse/market/market.vue | 2 +- pages/cloud_warehouse/specialty/specialty.vue | 2 +- pages/helpPeople/helpPeople.vue | 2 +- pages/index/index.vue | 51 ++++++++++--------- pages/store/applicationRecord/index.vue | 3 ++ pages/store/settled/index.vue | 7 ++- pages/user/index.vue | 12 +++-- pages/users/order_list/index.vue | 4 +- pages/whole_sale/index.vue | 3 +- 11 files changed, 83 insertions(+), 43 deletions(-) diff --git a/components/recommend/index.vue b/components/recommend/index.vue index ded0312..26a81fc 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -74,9 +74,14 @@ + + + {{ hotTitle }} + - + 暂无商品,看点别的吧 @@ -139,6 +144,10 @@ type: Boolean, default: false }, + hotTitle: { + type: String, + default: '加载更多' + } }, data() { return { @@ -161,12 +170,14 @@ val: 4 }], currTabs: 1, - list: [] + list: [], + tabsTop: '' }; }, mounted() { this.getArticleList(); }, + methods: { changeTab(e) { this.currTabs = e; @@ -186,6 +197,18 @@ limit: 10 }).then(res => { this.list = res.data.list; + + setTimeout(() => { + this.$util.getDom(this, '.tabs', res => { + // #ifdef APP + this.tabsTop = res.top + 10; + // #endif + + // #ifdef H5 + this.tabsTop = res.top; + // #endif + }) + }, 300) }) }, goDetail(item) { @@ -288,7 +311,7 @@ display: flex; justify-content: space-between; align-items: center; - margin: 0 -20rpx 30rpx; + margin: 0 -20rpx 10rpx; padding-top: 20rpx; .tabs-item { @@ -340,10 +363,6 @@ } .information { - // display: flex; - // justify-content: space-between; - // margin-bottom: 20rpx; - .nav-item { width: 227rpx; overflow: hidden; @@ -389,6 +408,11 @@ } } + .loading-flex { + width: auto !important; + margin-right: 10rpx; + } + .pictrue { display: flex; flex-direction: column; diff --git a/pages/cloud_warehouse/home/home.vue b/pages/cloud_warehouse/home/home.vue index 8a87421..7cef2b8 100644 --- a/pages/cloud_warehouse/home/home.vue +++ b/pages/cloud_warehouse/home/home.vue @@ -312,7 +312,7 @@ - + diff --git a/pages/cloud_warehouse/market/market.vue b/pages/cloud_warehouse/market/market.vue index b733ff4..3bc4c7a 100644 --- a/pages/cloud_warehouse/market/market.vue +++ b/pages/cloud_warehouse/market/market.vue @@ -114,7 +114,7 @@ - + diff --git a/pages/cloud_warehouse/specialty/specialty.vue b/pages/cloud_warehouse/specialty/specialty.vue index 144dda0..33beabb 100644 --- a/pages/cloud_warehouse/specialty/specialty.vue +++ b/pages/cloud_warehouse/specialty/specialty.vue @@ -70,7 +70,7 @@ - + diff --git a/pages/helpPeople/helpPeople.vue b/pages/helpPeople/helpPeople.vue index 2422d16..f194073 100644 --- a/pages/helpPeople/helpPeople.vue +++ b/pages/helpPeople/helpPeople.vue @@ -19,7 +19,7 @@ - 我是商户 diff --git a/pages/index/index.vue b/pages/index/index.vue index e423478..76b93eb 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -45,7 +45,7 @@ + :loading="hotLoading[hostIndex]" :hotTitle="hotTitle"> @@ -110,7 +110,7 @@ + :loading="hotLoading[hostIndex]" :hotTitle="hotTitle"> @@ -548,7 +548,7 @@ isSupport: true, isIndexClick: true, scrollTop: 0, - // newStore: + tabScroll: 0 }; }, @@ -626,8 +626,6 @@ this.activeRouter = '/' + curRoute }, onLoad(options) { - - let that = this this._options = options; this.diyId = options.diyId || 0; @@ -797,7 +795,7 @@ }, bindHeighta(data) { // #ifdef APP-PLUS - this.sortMpTop = data.top + data.height; + // this.sortMpTop = data.top + data.height; // #endif }, // 重新链接 @@ -1080,6 +1078,7 @@ // #endif }); }, + // 记录会员访问 setVisit() { setVisit({ @@ -1113,6 +1112,7 @@ self.sortMarTop = 10; } }, + //分类产品 get_product_list: function() { let that = this; @@ -1133,10 +1133,10 @@ that.loadTitle = '加载更多'; }); }, - /** - * 点击组件选项卡 - */ + + //点击组件选项卡 changeRecommedTab(e) { + let that = this; this.hotPage = 1; this.hotScroll = true; this.hostIndex = e - 1; @@ -1144,11 +1144,14 @@ hostList[e - 1] = []; this.$set(this, 'hostProduct', hostList); this.loadGoods(e); + + uni.pageScrollTo({ + scrollTop: that.$refs.recommendRef.tabsTop, + duration: 200 + }) }, + loadGoods(e = 1) { - - console.log(e); - this.$nextTick(() => { if (e == 1) return this.get_host_product(0); if (e == 2) return this.get_host_home({ @@ -1162,12 +1165,12 @@ }, 3); }) }, - /** - * 获取我的推荐 - */ + + // 获取我的推荐 get_host_product: function(e = 0) { let that = this; let num = that.hotLimit; + if (!that.hotScroll) return; if (that.hotLoading[e]) return; @@ -1177,24 +1180,25 @@ uni.stopPullDownRefresh(); res.data.list = this.shuffleArray(res.data.list); let list = res.data.list; + let productList = that.hostProduct; if (!productList[e]) productList[e] = []; productList[e] = [...productList[e], ...res.data.list]; + let hotScroll = list.length <= res.data.limit && list.length != 0; that.hotScroll = hotScroll; that.hotLoading[e] = false; that.hotTitle = !hotScroll ? '已全部加载' : '加载更多'; that.$set(that, 'hostProduct', productList); - if (this.hostIndex == e) this.$forceUpdate(); - that.$set(that, 'hotPage', res.data.page + 1); that.$set(that, 'hotLimit', res.data.limit); + + this.$forceUpdate(); }); }, - /** - * 获取里海云仓, 云市场, 名优特产 - */ + + // 获取里海云仓, 云市场, 名优特产 get_host_home: function(query = {}, e = 1) { let that = this; let num = that.hotLimit; @@ -1243,11 +1247,13 @@ this.$set(this, 'navTop', res.data); }); }, + reloadData() { setTimeout(() => { this.showSkeleton = false }, 500) }, + // 首发新品详情 goDetail(item) { if (item.activity && item.activity.type === '2' && !this.isLogin) { @@ -1291,6 +1297,7 @@ }); } }, + //#ifdef H5 ShareInfo(datas) { let data = this.storeInfo; @@ -1326,6 +1333,7 @@ this.domHeight = res[0].height; }) }, + // 滚动到底部 onReachBottom() { if (this.recommend_switch == 1 && this.navIndex == 0) { @@ -1337,9 +1345,6 @@ this.get_product_list(); } } - }, - onReady() { - } }; diff --git a/pages/store/applicationRecord/index.vue b/pages/store/applicationRecord/index.vue index 028f5f5..cb2120d 100644 --- a/pages/store/applicationRecord/index.vue +++ b/pages/store/applicationRecord/index.vue @@ -141,6 +141,9 @@ } uni.hideLoading(); this.loading = false + }).catch(() => { + uni.hideLoading(); + this.loading = false }) }, navgo() { diff --git a/pages/store/settled/index.vue b/pages/store/settled/index.vue index 3182d8f..c3f2446 100644 --- a/pages/store/settled/index.vue +++ b/pages/store/settled/index.vue @@ -219,10 +219,10 @@ - 店铺等待审核 + {{formData.status==0?'店铺等待审核':'店铺审核完成'}} - 店铺已提交入驻申请 + {{formData.status==0?'店铺已提交入驻申请':formData.status == 1?'恭喜您的店铺审核成功':'审核失败'}} @@ -618,6 +618,9 @@ if (option.type == 1) { this.step = 1 } + if (option.step) { + this.step = 3 + } if (this.formData.status == 1) { getUnimpInfo().then(res => { this.uniMpInfo = res.data diff --git a/pages/user/index.vue b/pages/user/index.vue index 63de690..1c4d8d1 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -178,7 +178,7 @@ - + {{item.name}} @@ -541,10 +541,16 @@ }, 500) }, methods: { - authTo(url) { + authTo(url, name) { if (this.isLogin) { + let txt = ""; + if (this.userInfo && this.userInfo.service && name == "商家入驻") { + txt = url + '?step=3' + } else { + txt = url; + } uni.navigateTo({ - url: url + url: txt }) } else { this.openAuto() diff --git a/pages/users/order_list/index.vue b/pages/users/order_list/index.vue index 6f7af55..39ae974 100644 --- a/pages/users/order_list/index.vue +++ b/pages/users/order_list/index.vue @@ -891,7 +891,8 @@ this.loadend = false; this.loading = false; - this.$set(this, 'orderList', []); + this.orderList = []; + this.sale_type = type; if (this.orderStatus == 4) { this.refundParam.identity = type; @@ -904,7 +905,6 @@ this.getUserInfo(); this.getpreSellOrderList(); } - this.sale_type = type; }, // 获取退款列表 diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index dfae325..1462006 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -195,8 +195,7 @@ - +