From 66f67678abf72b347a516030ab13879480f6d0dc Mon Sep 17 00:00:00 2001 From: wangfukang <15630117759@163.com> Date: Sun, 26 Jul 2026 17:29:46 +0800 Subject: [PATCH] 1 --- package1/address/addressList.vue | 17 +- package1/ieBrowser/messages.vue | 21 +- package1/index/deliveryPersonList.vue | 10 +- package1/tabbar/fishRelease.vue | 132 ++- package1/tabbar/release.vue | 1460 +++++++++++++++++++++++-- 5 files changed, 1557 insertions(+), 83 deletions(-) diff --git a/package1/address/addressList.vue b/package1/address/addressList.vue index ad603d9..b794927 100644 --- a/package1/address/addressList.vue +++ b/package1/address/addressList.vue @@ -65,8 +65,8 @@ 设为默认地址 - - 确认 + + {{addressSubmitting ? '提交中...' : '确认'}} @@ -139,7 +139,8 @@ receiverName: '', receiverPhone: '', isDefault: 0 - } + }, + addressSubmitting: false } }, created() { @@ -304,6 +305,7 @@ return nextValue; }, submitAddress() { + if (this.addressSubmitting) return; if(this.areaTitleInput) { let match = this.areaList.find(a => a.title === this.areaTitleInput); if (match) { @@ -330,6 +332,7 @@ let url = this.addressForm.id ? "/app/userAddress/edit" : "/app/userAddress/save"; let that = this; this.addressForm.userId = uni.getStorageSync('id') + this.addressSubmitting = true; that.tui.request(url, "POST", this.addressForm, false, true).then((res) => { if (res.code == 200) { that.tui.toast("保存成功",1000); @@ -338,7 +341,9 @@ } else { that.tui.toast(res.message,1000); } - }).catch(() => {}); + }).catch(() => {}).finally(() => { + that.addressSubmitting = false; + }); }, deleteAddress(id) { let that = this; @@ -460,6 +465,10 @@ z-index: 20; } + .bottom-btn--disabled { + opacity: 0.65; + } + .address-popup-box--page>.bottom-btn { left: 5%; } diff --git a/package1/ieBrowser/messages.vue b/package1/ieBrowser/messages.vue index 21d019d..0e5ca1c 100644 --- a/package1/ieBrowser/messages.vue +++ b/package1/ieBrowser/messages.vue @@ -32,8 +32,15 @@ 再遇见 + + + + + + + 没有未完成的关系,也是一种轻松。 - {{ loading ? '正在加载...' : (hasMore ? '上滑加载更多' : '没有更多消息了') }} + {{ loading ? '正在加载...' : (hasMore ? '上滑加载更多' : '没有更多消息了') }} @@ -71,6 +78,12 @@ hasMore: true, loading: false, loadedOnce: false, + skeletonList: [ + { id: 'skeleton-1' }, + { id: 'skeleton-2' }, + { id: 'skeleton-3' }, + { id: 'skeleton-4' } + ], deleteDialogVisible: false, deleteTarget: null, deleting: false @@ -247,6 +260,11 @@ .pulse, .avatar, .avatar-img { width: 78rpx; height: 78rpx; border-radius: 50%; } .avatar { text-align: center; line-height: 78rpx; background: #a9ffe7; color: #11162a; font-weight: 800; } .unread-badge { position: absolute; right: -8rpx; top: -8rpx; min-width: 30rpx; height: 30rpx; line-height: 30rpx; padding: 0 8rpx; border-radius: 999rpx; text-align: center; color: #fff; background: #ff8fa3; border: 3rpx solid rgba(255,255,255,.96); box-shadow: 0 8rpx 18rpx rgba(255,143,163,.26); font-size: 18rpx; font-weight: 800; box-sizing: border-box; } + .skeleton-card { pointer-events: none; } + .skeleton-avatar { flex-shrink: 0; width: 78rpx; height: 78rpx; margin-right: 20rpx; border-radius: 50%; background: linear-gradient(90deg, rgba(215,225,246,.55), rgba(255,255,255,.86), rgba(215,225,246,.55)); background-size: 220% 100%; animation: skeletonShimmer 1.2s ease-in-out infinite; } + .skeleton-line { height: 26rpx; border-radius: 999rpx; background: linear-gradient(90deg, rgba(215,225,246,.55), rgba(255,255,255,.86), rgba(215,225,246,.55)); background-size: 220% 100%; animation: skeletonShimmer 1.2s ease-in-out infinite; } + .name-line { width: 220rpx; } + .desc-line { width: 420rpx; max-width: 86%; margin-top: 18rpx; } .pulse { animation: breath 2.4s ease-in-out infinite; } .main { flex: 1; } .name { font-size: 29rpx; font-weight: 800; } @@ -269,6 +287,7 @@ .delete-btn.danger { color: #fff; background: linear-gradient(135deg, #ff8ba0, #e85d75); box-shadow: 0 18rpx 38rpx rgba(232,93,117,.22); } .delete-btn.disabled { opacity: .62; } @keyframes breath { 0%, 100% { transform: scale(.9); opacity: .65; } 50% { transform: scale(1.04); opacity: 1; } } + @keyframes skeletonShimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } } @keyframes streakBlink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } } @keyframes dialogUp { from { transform: translateY(36rpx); opacity: 0; } to { transform: translateY(0); opacity: 1; } } diff --git a/package1/index/deliveryPersonList.vue b/package1/index/deliveryPersonList.vue index 83fd68d..32bc8bd 100644 --- a/package1/index/deliveryPersonList.vue +++ b/package1/index/deliveryPersonList.vue @@ -190,8 +190,12 @@ let amount = parseFloat(value); return isNaN(amount) ? 0 : amount; }, + ceilAmount(value) { + let amount = this.toAmount(value); + return Math.ceil((amount - Number.EPSILON) * 100) / 100; + }, formatAmount(value) { - let amount = Math.ceil(this.toAmount(value) * 100) / 100; + let amount = this.ceilAmount(value); return amount.toFixed(2).replace(/\.?0+$/, ''); }, getWorkerCommission(worker) { @@ -200,14 +204,14 @@ if (this.isHighFloorAddress) { commission += this.toAmount(worker.highFloorFee); } - return Math.ceil(commission * 100) / 100; + return this.ceilAmount(commission); }, getCommissionDiff(worker) { if (!this.hasCommissionAmount || !worker) return 0; let currentAmount = this.toAmount(this.commissionAmount); let workerAmount = this.getWorkerCommission(worker); let diff = workerAmount - currentAmount; - return diff > 0 ? Math.ceil(diff * 100) / 100 : 0; + return diff > 0 ? this.ceilAmount(diff) : 0; }, normalizeWorkerCommission(worker) { if (!worker) return worker; diff --git a/package1/tabbar/fishRelease.vue b/package1/tabbar/fishRelease.vue index 764ca44..6c2a526 100644 --- a/package1/tabbar/fishRelease.vue +++ b/package1/tabbar/fishRelease.vue @@ -1,4 +1,5 @@ @@ -138,6 +155,9 @@ submitLocked: false, keyboardOpen: false, auditTitle: '提交中,等待审核', + officialAccountPopupVisible: false, + officialAccountQr: 'https://jewel-shop.oss-cn-beijing.aliyuncs.com/d23a9043a8c24731831ec4db909fe3b4.jpg', + officialAccountResolve: null, editorIns: null, editorToolbarConfig: { keys: ['bold', 'italic', 'underline', 'header', 'listOrdered', 'listBullet', 'align', 'image', 'removeFormat', 'clear'], @@ -506,7 +526,9 @@ if (res) { submitSuccess = true this.auditTitle = this.isEdit ? '保存成功,等待审核' : '提交成功,等待审核' - setTimeout(() => uni.navigateBack(), 800) + this.submitting = false + await this.handlePublishOfficialAccount(res) + setTimeout(() => uni.navigateBack(), 300) } } finally { if (!submitSuccess) { @@ -515,6 +537,36 @@ } } }, + handlePublishOfficialAccount(result) { + const user = result && result.user ? result.user : null + if (user) { + uni.setStorageSync('officialAccountOpenid', user.officialAccountOpenid || '') + } + const officialAccountOpenid = user ? user.officialAccountOpenid : uni.getStorageSync('officialAccountOpenid') + if (officialAccountOpenid) { + return Promise.resolve() + } + return this.openOfficialAccountPopup() + }, + openOfficialAccountPopup() { + return new Promise((resolve) => { + this.officialAccountResolve = resolve + this.officialAccountPopupVisible = true + }) + }, + closeOfficialAccountPopup() { + this.officialAccountPopupVisible = false + if (this.officialAccountResolve) { + this.officialAccountResolve() + this.officialAccountResolve = null + } + }, + previewOfficialAccountQr() { + uni.previewImage({ + current: this.officialAccountQr, + urls: [this.officialAccountQr] + }) + }, fishAuthDialogOptions() { return { badge: '校园二手', @@ -860,6 +912,84 @@ line-height: 34rpx; } + .official-account-mask { + position: fixed; + left: 0; + right: 0; + top: 0; + bottom: 0; + z-index: 1300; + display: flex; + align-items: center; + justify-content: center; + padding: 40rpx; + background: rgba(12, 31, 25, 0.46); + box-sizing: border-box; + } + + .official-account-card { + position: relative; + width: 590rpx; + padding: 46rpx 42rpx 38rpx; + border-radius: 36rpx; + background: #fff; + text-align: center; + box-shadow: 0 26rpx 64rpx rgba(19, 70, 54, 0.22); + box-sizing: border-box; + } + + .official-account-close { + position: absolute; + right: 22rpx; + top: 18rpx; + width: 54rpx; + height: 54rpx; + line-height: 50rpx; + border-radius: 50%; + color: #8b9b96; + font-size: 44rpx; + } + + .official-account-title { + color: #17362f; + font-size: 34rpx; + font-weight: 900; + } + + .official-account-desc { + margin-top: 12rpx; + color: #6f817c; + font-size: 24rpx; + line-height: 36rpx; + } + + .official-account-qr { + width: 330rpx; + height: 330rpx; + margin: 30rpx auto 0; + display: block; + border-radius: 24rpx; + background: #f5f8f6; + } + + .official-account-tip { + margin-top: 18rpx; + color: #1a9a72; + font-size: 24rpx; + font-weight: 800; + } + + .official-account-btn { + height: 78rpx; + margin-top: 30rpx; + border-radius: 42rpx; + background: linear-gradient(135deg, #37c990, #19af7e); + color: #fff; + font-size: 28rpx; + font-weight: 900; + line-height: 78rpx; + } + @keyframes audit-bounce { 0%, 80%, diff --git a/package1/tabbar/release.vue b/package1/tabbar/release.vue index d4f40aa..1d47378 100644 --- a/package1/tabbar/release.vue +++ b/package1/tabbar/release.vue @@ -1,6 +1,12 @@ -