diff --git a/package2/group/groupBuyList.vue b/package2/group/groupBuyList.vue index 1e22ca2..8f4c355 100644 --- a/package2/group/groupBuyList.vue +++ b/package2/group/groupBuyList.vue @@ -12,7 +12,7 @@ - + {{word}} @@ -125,7 +125,7 @@ - {{getDormStatus(index)}} + {{item._dormStatus}} {{item.mingchu ? '明厨亮灶' : '速速加入'}} @@ -134,9 +134,9 @@ - {{getLiveAvatar(index)}} - {{getLiveAvatar(index + 1)}} - {{getLiveAvatar(index + 2)}} + {{item._liveAvatars[0]}} + {{item._liveAvatars[1]}} + {{item._liveAvatars[2]}} 附近同学正在拼 @@ -151,7 +151,7 @@ {{item.subtitle}} - {{getGroupTip(index)}} + {{item._groupTip}} {{item.saleCount != null ? item.saleCount : 0}}人跟拼 @@ -159,9 +159,9 @@ - - + + @@ -185,7 +185,7 @@ - 宿舍群正在等一个饭搭子 @@ -420,15 +420,6 @@ icon: 'none' }); }, - getDormStatus(index) { - return this.groupTags[index % this.groupTags.length] - }, - getGroupTip(index) { - return ['还差1人就成团', '刚下课,大家都在拼', '这口热乎的很适合夜宵', '附近同学想一起点'][index % 4] - }, - getLiveAvatar(index) { - return this.groupAvatars[index % this.groupAvatars.length] - }, toggleCategory() { this.categoryExpanded = !this.categoryExpanded }, @@ -511,15 +502,15 @@ that.tui.request("/app/shop/getByCondition", "GET", this.searchForm, false, true).then((res) => { that.loadStatus = 'nomore'; if (res.code == 200) { + const content = that.prepareShopList(res.result.content || [], that.shopList.length) if (that.searchForm.pageNumber == 1) { - that.shopList = res.result.content + that.shopList = content } else { - that.shopList = [...that.shopList, ...res.result.content] + that.shopList = [...that.shopList, ...content] } that.totalPages = res.result.totalPages that.judgeBusinessStatus() that.isArea = false - that.$forceUpdate() } else { that.tui.toast(res.message); return @@ -527,6 +518,21 @@ uni.hideLoading() }).catch((res) => {}) }, + prepareShopList(list, offset) { + return (list || []).map((item, i) => { + const index = (offset || 0) + i + const products = Array.isArray(item.products) ? item.products : [] + item._dormStatus = this.groupTags[index % this.groupTags.length] + item._groupTip = ['还差1人就成团', '刚下课,大家都在拼', '这口热乎的很适合夜宵', '附近同学想一起点'][index % 4] + item._liveAvatars = [ + this.groupAvatars[index % this.groupAvatars.length], + this.groupAvatars[(index + 1) % this.groupAvatars.length], + this.groupAvatars[(index + 2) % this.groupAvatars.length] + ] + item._visibleProducts = products.filter(product => product.isPush == 1 && product.delFlag == 1) + return item + }) + }, judgeBusinessStatus() { for (let i = 0; i < this.shopList.length; i++) { if (this.shopList[i].shopTakeaway != '' && this.shopList[i].shopTakeaway != null) { @@ -648,7 +654,6 @@ height: 420rpx; border-radius: 50%; background: rgba(167, 255, 194, 0.42); - filter: blur(8rpx); } .title-sreach { @@ -695,7 +700,6 @@ padding: 0 14rpx 0 18rpx; box-sizing: border-box; box-shadow: 0 14rpx 34rpx rgba(20, 115, 88, 0.12); - backdrop-filter: blur(16rpx); border: 1rpx solid rgba(255, 255, 255, 0.86); } @@ -823,7 +827,6 @@ overflow: hidden; box-shadow: 0 22rpx 42rpx rgba(66, 121, 81, 0.22); transform: rotate(3deg); - animation: breathe 3.4s ease-in-out infinite; img { width: 100%; @@ -891,7 +894,6 @@ border-radius: 50%; border-left: 5rpx solid rgba(255, 255, 255, 0.72); opacity: 0; - animation: steamUp 2.8s ease-in-out infinite; } .steam-one { @@ -957,7 +959,6 @@ background: rgba(255, 255, 255, 0.56); border: 1rpx solid rgba(255, 255, 255, 0.8); box-shadow: 0 12rpx 28rpx rgba(34, 128, 94, 0.1); - animation: bubbleFloat 3.8s ease-in-out infinite; } .live-bubble:nth-child(2n) { @@ -997,7 +998,6 @@ background: rgba(255, 255, 255, 0.46); border: 1rpx solid rgba(255, 255, 255, 0.72); box-shadow: 0 18rpx 42rpx rgba(42, 134, 93, 0.1); - backdrop-filter: blur(16rpx); position: relative; z-index: 2; } @@ -1057,7 +1057,6 @@ border-radius: 32rpx; background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(217, 255, 172, 0.66)); box-shadow: 0 14rpx 28rpx rgba(23, 117, 83, 0.12), inset 0 8rpx 14rpx rgba(255, 255, 255, 0.85); - animation: iconFloat 4s ease-in-out infinite; } .menu-list:nth-child(2n) .menu-icon-wrap { @@ -1070,7 +1069,6 @@ display: block; margin: 0 auto; padding-top: 12rpx; - filter: drop-shadow(0 8rpx 10rpx rgba(0, 70, 42, 0.14)); } .menu-sticker { @@ -1162,7 +1160,6 @@ overflow: hidden; box-shadow: 0 18rpx 44rpx rgba(19, 91, 70, 0.12); border: 1rpx solid rgba(255, 255, 255, 0.86); - animation: cardBreath 4.2s ease-in-out infinite; } .shop-card-bg { @@ -1232,7 +1229,6 @@ border-left: 4rpx solid rgba(255, 255, 255, 0.82); border-radius: 50%; opacity: 0; - animation: steamUp 2.6s ease-in-out infinite; } .shop-steam-one { @@ -1430,7 +1426,6 @@ height: 160%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.26), transparent); transform: rotate(18deg); - animation: glossMove 3.8s ease-in-out infinite; } .menu-content { diff --git a/package2/login/login.vue b/package2/login/login.vue index 399e523..3636043 100644 --- a/package2/login/login.vue +++ b/package2/login/login.vue @@ -84,10 +84,14 @@ phoneLoading: false, needPhoneAuth: false, customId: '', - saleId: '' + saleId: '', + redirectKey: '' } }, onLoad(option) { + if (option.redirect) { + this.redirectKey = option.redirect + } if (option.saleId) { this.saleId = option.saleId } @@ -215,6 +219,14 @@ enterHome() { this.tui.toast('登录成功', 2000, true) setTimeout(() => { + const pendingPath = this.redirectKey ? uni.getStorageSync(this.redirectKey) : '' + if (pendingPath) { + uni.removeStorageSync(this.redirectKey) + uni.redirectTo({ + url: pendingPath + }) + return + } uni.reLaunch({ url: '/pages/index/index' })