From a3193c3b6813959ae56323a8daf7cfbca96173b7 Mon Sep 17 00:00:00 2001 From: "pikachu1995@126.com" Date: Tue, 29 Sep 2026 10:22:57 +0800 Subject: [PATCH 1/2] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E8=B4=AD?= =?UTF-8?q?=E7=89=A9=E8=BD=A6=E4=B8=8E=E8=AE=A2=E5=8D=95=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新购物车页面,增强商品展示与交互体验。 - 调整订单页面的状态反馈与用户操作逻辑,确保信息清晰。 - 改进组件样式与布局,提升整体用户体验。 - 修复多个页面中的样式与功能问题,确保一致性与流畅性。 --- App.vue | 408 ++-- .../distribution-goods-share/poster-panel.vue | 6 +- index.html | 6 + pages/cart/gift-card/myGiftCards.vue | 1 - pages/mine/address/address.scss | 22 +- pages/mine/address/address.vue | 35 +- pages/mine/address/addressManage.vue | 45 +- pages/mine/address/storeAddress.vue | 10 +- pages/mine/myTracks.vue | 177 +- pages/mine/set/personMsg.vue | 66 +- pages/order/afterSales/afterSalesDetail.vue | 8 +- .../afterSales/afterSalesDetailExpress.vue | 12 +- pages/order/myOrder.vue | 6 +- pages/order/orderDetail.vue | 19 +- pages/passport/entry/seller/index.vue | 116 +- pages/promotion/bargain/log.vue | 146 +- pages/tabbar/cart/cartList.vue | 1941 +++++++++-------- patches/uview-plus+3.8.42.patch | 50 +- utils/theme.js | 37 +- 19 files changed, 1631 insertions(+), 1480 deletions(-) diff --git a/App.vue b/App.vue index ac86430..c7659f8 100644 --- a/App.vue +++ b/App.vue @@ -1,202 +1,206 @@ - - - + + + diff --git a/components/distribution-goods-share/poster-panel.vue b/components/distribution-goods-share/poster-panel.vue index 47e93dd..1290368 100644 --- a/components/distribution-goods-share/poster-panel.vue +++ b/components/distribution-goods-share/poster-panel.vue @@ -226,8 +226,10 @@ async function generatePosters() { } // #ifndef MP-WEIXIN - loadError.value = '请在微信小程序中生成海报' - return + { + loadError.value = '请在微信小程序中生成海报' + return + } // #endif loading.value = true diff --git a/index.html b/index.html index 2269a69..e704dd9 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,12 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" /> + + diff --git a/pages/cart/gift-card/myGiftCards.vue b/pages/cart/gift-card/myGiftCards.vue index 9612fa1..047dadd 100644 --- a/pages/cart/gift-card/myGiftCards.vue +++ b/pages/cart/gift-card/myGiftCards.vue @@ -18,7 +18,6 @@ v-model="bindForm.cardSecret" border="none" maxlength="128" - password placeholder="请输入兑换码(卡密)" clearable /> diff --git a/pages/mine/address/address.scss b/pages/mine/address/address.scss index a2a920c..944e4dc 100644 --- a/pages/mine/address/address.scss +++ b/pages/mine/address/address.scss @@ -20,6 +20,9 @@ padding: 2rpx 20rpx; } .list { + padding-bottom: calc(140rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); + .item:hover { background: #ededed; } @@ -115,21 +118,28 @@ } } + .btn-bar { + position: fixed; + left: 0; + right: 0; + bottom: 0; + z-index: 99; + padding: 20rpx 30rpx calc(20rpx + constant(safe-area-inset-bottom)); + padding: 20rpx 30rpx calc(20rpx + env(safe-area-inset-bottom)); + background: $page-color-base; + box-sizing: border-box; + } + .btn { background: $light-color; - position: fixed; - width: 690rpx; - bottom: calc(60rpx + constant(safe-area-inset-bottom)); - bottom: calc(60rpx + env(safe-area-inset-bottom)); + width: 100%; height: 80rpx; - left: 30rpx; font-size: 30rpx; color: #fff; border-radius: 40rpx; display: flex; align-items: center; justify-content: center; - z-index: 99; overflow: hidden; .btn-text { diff --git a/pages/mine/address/address.vue b/pages/mine/address/address.vue index 4f59d18..57eca96 100644 --- a/pages/mine/address/address.vue +++ b/pages/mine/address/address.vue @@ -27,8 +27,8 @@ 编辑 - - 删除 + + 删除 @@ -38,7 +38,6 @@ 添加新收货人 - @@ -52,10 +51,6 @@ import * as API_Address from '@/api/address.js' const store = useStore() const addressList = ref([]) -const showAction = ref(false) -const removeList = [{ text: '确定' }] -const tips = { text: '确定要删除该收货人信息吗?' } -const removeId = ref('') const routerVal = ref>({}) const params = { pageNumber: 1, pageSize: 1000 } @@ -94,18 +89,20 @@ function getAddressList() { } function removeAddress(id: string) { - removeId.value = id - showAction.value = true -} - -function deleteAddressMessage() { - API_Address.deleteAddress(removeId.value).then((res) => { - if (res.statusCode == 200) { - uni.showToast({ icon: 'none', title: '删除成功' }) - getAddressList() - } else { - uni.showToast({ icon: 'none', title: res.data.message, duration: 2000 }) - } + uni.showModal({ + title: '提示', + content: '确定要删除该收货人信息吗?', + success: (res) => { + if (!res.confirm) return + API_Address.deleteAddress(id).then((result) => { + if (result.statusCode == 200) { + uni.showToast({ icon: 'none', title: '删除成功' }) + getAddressList() + } else { + uni.showToast({ icon: 'none', title: result.data.message, duration: 2000 }) + } + }) + }, }) } diff --git a/pages/mine/address/addressManage.vue b/pages/mine/address/addressManage.vue index 40a7e3b..9b1739d 100644 --- a/pages/mine/address/addressManage.vue +++ b/pages/mine/address/addressManage.vue @@ -26,20 +26,19 @@ 编辑 - - 删除 + + 删除 - - - - 添加新收货人 + + + + 添加新收货人 + - - @@ -53,10 +52,6 @@ import * as API_Address from '@/api/address.js' const store = useStore() const addressList = ref([]) -const showAction = ref(false) -const removeList = [{ text: '确定' }] -const tips = { text: '确定要删除该收货人信息吗?' } -const removeId = ref('') const routerVal = ref>({}) const params = { pageNumber: 1, pageSize: 1000 } @@ -96,18 +91,20 @@ function getAddressList() { } function removeAddress(id: string) { - removeId.value = id - showAction.value = true -} - -function deleteAddressMessage() { - API_Address.deleteAddress(removeId.value).then((res) => { - if (res.statusCode == 200) { - uni.showToast({ icon: 'none', title: '删除成功' }) - getAddressList() - } else { - uni.showToast({ icon: 'none', title: res.data.message, duration: 2000 }) - } + uni.showModal({ + title: '提示', + content: '确定要删除该收货人信息吗?', + success: (res) => { + if (!res.confirm) return + API_Address.deleteAddress(id).then((result) => { + if (result.statusCode == 200) { + uni.showToast({ icon: 'none', title: '删除成功' }) + getAddressList() + } else { + uni.showToast({ icon: 'none', title: result.data.message, duration: 2000 }) + } + }) + }, }) } diff --git a/pages/mine/address/storeAddress.vue b/pages/mine/address/storeAddress.vue index 1a6c404..d1e3ee0 100644 --- a/pages/mine/address/storeAddress.vue +++ b/pages/mine/address/storeAddress.vue @@ -16,7 +16,13 @@ - + @@ -31,7 +37,7 @@ const store = useStore() const storeAddressList = ref([]) const showAction = ref(false) -const removeList = [{ text: '确定' }] +const removeList = [{ name: '确定' }] const tips = { text: '确定要删除该收货人信息吗?' } const removeId = ref('') const routerVal = ref>({}) diff --git a/pages/mine/myTracks.vue b/pages/mine/myTracks.vue index 119e2e4..7eeded2 100644 --- a/pages/mine/myTracks.vue +++ b/pages/mine/myTracks.vue @@ -10,55 +10,46 @@ {{ !isEdit ? '编辑' : '完成'}} - - - 右划删除浏览记录 - - - - {{ getStoreName(item) }} - - - - - - - - - - - - {{ item.goodsName }} - - - ¥{{ unitPrice(item.price) }} - - + + + + + + + + + - - - - - - 删除所选 - + + {{ item.goodsName }} + {{ getStoreName(item) }} + ¥{{ unitPrice(item.price) }} + + + + + 删除所选 @@ -226,28 +217,30 @@ function deleteTracks(e: any, ids?: any) { .myTracks { width: 100%; + min-height: 100vh; + background: #f5f5f5; padding-top: 2rpx; - } - - .tracks-tip { - display: flex; - align-items: center; - padding: 18rpx 24rpx; - background: #fdf6ec; - } - - .tracks-tip-text { - margin-left: 10rpx; - font-size: 28rpx; - color: #f9ae3d; - line-height: 1.4; + box-sizing: border-box; } .tracks-list { - width: 100%; + padding: 20rpx 24rpx 40rpx; + box-sizing: border-box; + + &.is-editing { + padding-bottom: calc(140rpx + constant(safe-area-inset-bottom)); + padding-bottom: calc(140rpx + env(safe-area-inset-bottom)); + } + } + + .myTracks-swipe { + display: block; + margin-bottom: 20rpx; + border-radius: 16rpx; + overflow: hidden; + background: #fff; } - .myTracks-swipe, :deep(.u-swipe-action), :deep(.u-swipe-action-item), :deep(.u-swipe-action-item__content) { @@ -256,25 +249,12 @@ function deleteTracks(e: any, ids?: any) { :deep(.u-swipe-action-item__content) { overflow: hidden; - } - - .myTracks-title { - width: 100%; - height: 110rpx; - padding: 0 20rpx; - font-size: 28rpx; - color: #666; - font-weight: bold; - background-color: #fff; - display: flex; - align-items: center; - box-sizing: border-box; + background: #fff; } .myTracks-item { width: 100%; - min-height: 226rpx; - padding: 30rpx 20rpx; + padding: 24rpx; background-color: #fff; box-sizing: border-box; display: flex; @@ -287,13 +267,17 @@ function deleteTracks(e: any, ids?: any) { } .myTracks-item-img { + width: 160rpx; + height: 160rpx; margin-right: 20rpx; flex-shrink: 0; + border-radius: 12rpx; + background: #f3f4f6; + overflow: hidden; - .track-thumb { - width: 130rpx; - height: 130rpx; - border-radius: 8rpx; + .track-thumb-img { + width: 100%; + height: 100%; display: block; } } @@ -301,27 +285,38 @@ function deleteTracks(e: any, ids?: any) { .myTracks-item-content { flex: 1; min-width: 0; + min-height: 160rpx; display: flex; flex-direction: column; - justify-content: center; + justify-content: space-between; } .myTracks-item-title { font-size: 28rpx; color: #333; line-height: 1.4; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; + overflow: hidden; + } + + .myTracks-item-store { + margin-top: 8rpx; + font-size: 24rpx; + color: #999; + line-height: 1.4; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; } .myTracks-item-price { - font-size: 28rpx; + margin-top: 12rpx; + font-size: 32rpx; + font-weight: 600; color: $light-color; - padding-top: 10rpx; - } - - .myTracks-divider { - width: 100%; - height: 20rpx; - background: #f5f5f5; + line-height: 1.2; } .edit { diff --git a/pages/mine/set/personMsg.vue b/pages/mine/set/personMsg.vue index 3042c3d..0dfa321 100644 --- a/pages/mine/set/personMsg.vue +++ b/pages/mine/set/personMsg.vue @@ -56,7 +56,6 @@ 保存 - 退出登录 { }) - + diff --git a/pages/order/afterSales/afterSalesDetail.vue b/pages/order/afterSales/afterSalesDetail.vue index 557753e..7050abc 100644 --- a/pages/order/afterSales/afterSalesDetail.vue +++ b/pages/order/afterSales/afterSalesDetail.vue @@ -159,7 +159,7 @@ title="申请原因" @confirm="reasonSelectConfirm" > - + @@ -186,7 +186,7 @@ const sku = ref({}) const reasonSelectShow = ref(false) const reasonList = ref([]) const applyInfo = ref({}) -const uToast = ref(null) +const toastRef = ref(null) const isAppointmentAfterSale = ref(false) const form = reactive({ @@ -335,8 +335,8 @@ function onUploadAfterRead(event: any) { function showToast(message: string, type = 'error') { const text = message || (type === 'success' ? '操作成功' : '操作失败') - if (uToast.value) { - uToast.value.show({ message: text, type }) + if (toastRef.value) { + toastRef.value.show({ message: text, type }) return } uni.showToast({ diff --git a/pages/order/afterSales/afterSalesDetailExpress.vue b/pages/order/afterSales/afterSalesDetailExpress.vue index f1f51a6..9f02683 100644 --- a/pages/order/afterSales/afterSalesDetailExpress.vue +++ b/pages/order/afterSales/afterSalesDetailExpress.vue @@ -69,7 +69,7 @@ @confirm="onTimeConfirm" @close="timeshow = false" /> - + @@ -96,7 +96,7 @@ const form = reactive({ }) const serviceDetail = reactive<{ sn: string }>({ sn: '' }) const sku = ref({}) -const uToast = ref(null) +const toastRef = ref(null) onLoad((options) => { sku.value = storage.getAfterSaleData() @@ -136,15 +136,15 @@ function onSubmit() { delete submitForm.courierCompany if (form.logisticsId == '') { - uToast.value?.show({ title: '请选择快递公司', type: 'error' }) + toastRef.value?.show({ title: '请选择快递公司', type: 'error' }) return } if (form.logisticsNo == '') { - uToast.value?.show({ title: '请填写快递单号', type: 'error' }) + toastRef.value?.show({ title: '请填写快递单号', type: 'error' }) return } if (form.mDeliverTime == '') { - uToast.value?.show({ title: '请选择发货时间', type: 'error' }) + toastRef.value?.show({ title: '请选择发货时间', type: 'error' }) return } @@ -152,7 +152,7 @@ function onSubmit() { fillShipInfo(serviceDetail.sn, submitForm).then((res) => { hideLoadingIfNeeded() if (res.statusCode === 200) { - uToast.value?.show({ + toastRef.value?.show({ title: '提交成功', type: 'success', back: true, diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue index c529e98..9c2d0ef 100644 --- a/pages/order/myOrder.vue +++ b/pages/order/myOrder.vue @@ -417,7 +417,11 @@ function openOrder(order: any) { } function changeTab(e: any) { - tabCurrentIndex.value = e.target.current + // H5 的 swiper change 把下标放在 detail.current。 + // 读 target.current 会得到 undefined,选中态被清掉,列表就停在「全部」。 + const current = Number(e?.detail?.current ?? e?.target?.current) + if (!Number.isInteger(current) || current < 0 || current >= navList.length) return + tabCurrentIndex.value = current } function tabClick(index: number) { diff --git a/pages/order/orderDetail.vue b/pages/order/orderDetail.vue index a91003d..2890236 100644 --- a/pages/order/orderDetail.vue +++ b/pages/order/orderDetail.vue @@ -34,7 +34,7 @@ - + 查看卡密 @@ -1055,17 +1055,14 @@ page, .card-key-entry { width: 100%; - text-align: center; -} -.card-key-entry__btn { - display: inline-block; - padding: 20rpx 80rpx; - border: 2rpx solid $main-color; - border-radius: 12rpx; - color: $main-color; - font-size: 28rpx; - font-weight: 600; + .btn { + width: 100%; + height: 80rpx; + line-height: 80rpx; + border-radius: 40rpx; + font-size: 30rpx; + } } .card-key-entry__tip { diff --git a/pages/passport/entry/seller/index.vue b/pages/passport/entry/seller/index.vue index 3ececcc..7b9e654 100644 --- a/pages/passport/entry/seller/index.vue +++ b/pages/passport/entry/seller/index.vue @@ -11,15 +11,21 @@
- {{ item.title }} +
{{ index + 1 }}
+
{{ item.title }}
-
开始填写
-
查看店铺入驻协议
+
+ {{ statusTip.title }} +
+
+
开始填写
+
查看店铺入驻协议
+
@@ -36,8 +42,15 @@ const store = useStore() const themeStyle = computed(() => getThemeStyle(store.state.theme)) -const current = ref(999) +const current = ref(-1) const companyData = ref('') +const showFillButton = computed(() => companyData.value?.storeDisable !== 'OPEN') +const flowSteps = computed(() => + entrySteps.value.filter((item) => item.value === 'APPLY' || item.value === 'APPLYING') +) +const statusTip = computed(() => + entrySteps.value.find((item) => item.value !== 'APPLY' && item.value !== 'APPLYING') +) const entrySteps = ref([ { @@ -137,54 +150,103 @@ page { } .entry-content { - padding: 32rpx 80rpx calc(40rpx + env(safe-area-inset-bottom)); + padding: 48rpx 48rpx calc(40rpx + env(safe-area-inset-bottom)); box-sizing: border-box; } .title { line-height: 1.2; - font-weight: 500; - font-size: 56rpx; - color: #333; + font-weight: 600; + font-size: 48rpx; + color: #222; } .step-list { - margin: 80rpx 0; + margin-top: 64rpx; } .step-item { - padding: 30rpx 20rpx; - font-size: 40rpx; - font-weight: bold; - color: #666; + display: flex; + align-items: center; + padding: 18rpx 0; + color: #999; } -.step-item.active { +.step-mark { + width: 48rpx; + height: 48rpx; + margin-right: 20rpx; + border-radius: 50%; + background: #f2f2f2; + color: #999; + font-size: 26rpx; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.step-title { + font-size: 32rpx; + font-weight: 500; + line-height: 1.4; +} + +.step-item.done .step-mark, +.step-item.active .step-mark { + background: var(--theme-light, #ff6b35); + color: #fff; +} + +.step-item.done .step-title { + color: #333; +} + +.step-item.active .step-title { + color: var(--theme-light, #ff6b35); +} + +.status-tip { + margin-top: 24rpx; + padding: 24rpx 28rpx; + border-radius: 16rpx; + font-size: 28rpx; + line-height: 1.5; color: var(--theme-light, #ff6b35); background: var(--theme-light-10, rgba(255, 107, 53, 0.1)); - border-radius: 20rpx; +} + +.status-tip.REFUSED { + color: var(--theme-primary, #ff3c2a); + background: #fff1f0; +} + +.status-tip.CLOSED { + color: #666; + background: #f5f5f5; +} + +.actions { + margin-top: 72rpx; } .submit, .notice { - font-weight: bold; - font-size: 28rpx; - height: 92rpx; + height: 88rpx; + line-height: 88rpx; text-align: center; - letter-spacing: 4rpx; - line-height: 92rpx; - border-radius: 20rpx; + font-size: 30rpx; + border-radius: 44rpx; } .submit { color: #fff; - margin-top: 120rpx; background: var(--theme-light, #ff6b35); + margin-bottom: 24rpx; } .notice { - margin-top: 40rpx; color: #333; - background: $bg-color; + background: #f5f5f5; } diff --git a/pages/promotion/bargain/log.vue b/pages/promotion/bargain/log.vue index e8892a3..cf0b42a 100644 --- a/pages/promotion/bargain/log.vue +++ b/pages/promotion/bargain/log.vue @@ -1,25 +1,22 @@