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..255e03c 100644 --- a/components/distribution-goods-share/poster-panel.vue +++ b/components/distribution-goods-share/poster-panel.vue @@ -1,6 +1,6 @@ - 点击海报预览后可保存到相册 + 点击海报预览后可保存到相册 海报生成中... @@ -226,8 +226,10 @@ async function generatePosters() { } // #ifndef MP-WEIXIN - loadError.value = '请在微信小程序中生成海报' - return + { + loadError.value = '请在微信小程序中生成海报' + return + } // #endif loading.value = true @@ -463,23 +465,38 @@ function saveCurrentPoster() { } .loading-wrap { - padding: 120rpx 0; - text-align: center; + display: flex; + flex-direction: column; + align-items: center; + padding: 80rpx 48rpx; + box-sizing: border-box; } .loading-text { + display: block; + width: 100%; color: #999; font-size: 28rpx; + line-height: 1.6; + text-align: center; +} + +.retry-btn { + margin-top: 32rpx; } .retry-btn, .save-btn { - display: inline-block; - padding: 12rpx 40rpx; - border-radius: 30rpx; + display: inline-flex; + align-items: center; + justify-content: center; + height: 64rpx; + padding: 0 40rpx; + border-radius: 32rpx; background: linear-gradient(90deg, #ff9f3f, #ff6b35); color: #fff; font-size: 26rpx; + white-space: nowrap; } .poster-swiper { 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..6090a69 100644 --- a/pages/mine/address/address.vue +++ b/pages/mine/address/address.vue @@ -1,138 +1,135 @@ - - - - - - - - {{ item.name }} - {{ item.mobile }} - 默认 - - - {{item.consigneeAddressPath[0]}} - {{item.consigneeAddressPath[1]}} - {{item.consigneeAddressPath[2]}} - {{item.consigneeAddressPath[3]}} - {{ item.detail }} - - - - - - - - {{ item.isDefault ? "默认地址" : "设为默认" }} - - - - 编辑 - - 删除 - - - - - - - - 添加新收货人 - - - - - - - - + + + + + + + + {{ item.name }} + {{ item.mobile }} + 默认 + + + {{item.consigneeAddressPath[0]}} + {{item.consigneeAddressPath[1]}} + {{item.consigneeAddressPath[2]}} + {{item.consigneeAddressPath[3]}} + {{ item.detail }} + + + + + + + + {{ item.isDefault ? "默认地址" : "设为默认" }} + + + + 编辑 + + 删除 + + + + + + + + 添加新收货人 + + + + + + + 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..7c0ad54 100644 --- a/pages/mine/myTracks.vue +++ b/pages/mine/myTracks.vue @@ -1,330 +1,325 @@ - - - - - {{ !isEdit ? '编辑' : '完成'}} - - - - - 右划删除浏览记录 - - - - - {{ getStoreName(item) }} - - - - - - - - - - - - {{ item.goodsName }} - - - ¥{{ unitPrice(item.price) }} - - - - - - - - - 删除所选 - - - - - - - - - + + + + + {{ !isEdit ? '编辑' : '完成'}} + + + + + + + + + + + + + + + {{ item.goodsName }} + {{ getStoreName(item) }} + ¥{{ unitPrice(item.price) }} + + + + + 删除所选 + + + + + + + + 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 @@ - - + + - + - - {{item.goodsName}} + + {{ item.goodsName }} + {{ statusWay[item.status] }} - - 还剩{{unitPrice(item.surplusPrice)}}元 - - - - 继续免费领 - - - - - {{statusWay[item.status]}} + + + 还剩{{ unitPrice(item.surplusPrice) }}元 + + + 继续免费领 + @@ -76,67 +73,90 @@ function navigateToBargainDetail(val: any) { - + + + + + + + + 空空如也 + 随便逛逛 + + + + + + + + + onStoreCheckChange(item, checked)"> + + {{ item.storeName }} + + + + 领劵 + + + + + + + + + 满减 + {{item.promotionNotice}} + + + + + + + onSkuCheckChange(skuItem, checked)"> + 失效 + + + + + + + {{ skuItem.goodsSku.goodsName }} + + + {{skuItem.goodsSku.simpleSpecs}} + 批发商品 + + + + ¥{{ goodsFormatPrice(skuItem.goodsSku.price)[0] }} + .{{ goodsFormatPrice(skuItem.goodsSku.price)[1] }} + + + + + + + + + + 距秒杀结束: + + + + + {{ skuItem.errorMessage }} + + + + + + + + + + + + + + + + + 总计: + + ¥ + {{ goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[0] }} + .{{ goodsFormatPrice(cartDetail.priceDetailDTO.flowPrice)[1] }} + + ¥0.00 + + + 优惠减:¥{{ cartDetail.priceDetailDTO.goodsPrice - unitPrice(cartDetail.priceDetailDTO.flowPrice) }} + 优惠明细 + + + + + + + 优惠明细 + + + 商品总额 + ¥{{unitPrice(cartDetail.priceDetailDTO.goodsPrice)}} + + + + 优惠券 + -¥{{unitPrice(cartDetail.priceDetailDTO.couponPrice)}} + + + 其他优惠 + -¥{{unitPrice(cartDetail.priceDetailDTO.discountPrice)}} + + + + + + + 删除 + + + + 去结算 + + + + + + + + + diff --git a/patches/uview-plus+3.8.42.patch b/patches/uview-plus+3.8.42.patch index 2ec07a1..43e173d 100644 --- a/patches/uview-plus+3.8.42.patch +++ b/patches/uview-plus+3.8.42.patch @@ -1,5 +1,5 @@ diff --git a/node_modules/uview-plus/components/u-image/u-image.vue b/node_modules/uview-plus/components/u-image/u-image.vue -index 24e3b10..b59b657 100644 +index 24e3b10..1360704 100644 --- a/node_modules/uview-plus/components/u-image/u-image.vue +++ b/node_modules/uview-plus/components/u-image/u-image.vue @@ -26,7 +26,7 @@ @@ -20,20 +20,7 @@ index 24e3b10..b59b657 100644 class="u-image__error" :style="{ borderRadius: shape == 'circle' ? '50%' : addUnit(radius), -@@ -108,7 +108,12 @@ - // 图片加载完成时,去掉背景颜色,因为如果是png图片,就会显示灰色的背景 - backgroundStyle: {}, - // 用于fade模式的控制组件显示与否 -+ // #ifdef MP-WEIXIN -+ show: true -+ // #endif -+ // #ifndef MP-WEIXIN - show: false -+ // #endif - }; - }, - watch: { -@@ -126,6 +131,12 @@ +@@ -126,6 +126,12 @@ } }, computed: { @@ -46,6 +33,39 @@ index 24e3b10..b59b657 100644 transStyle() { let style = {}; // 通过调用addUnit()方法,如果有单位,如百分比,px单位等,直接返回,如果是纯粹的数值,则加上rpx单位 +diff --git a/node_modules/uview-plus/components/u-modal/props.js b/node_modules/uview-plus/components/u-modal/props.js +index 0f0177b..1aacecf 100644 +--- a/node_modules/uview-plus/components/u-modal/props.js ++++ b/node_modules/uview-plus/components/u-modal/props.js +@@ -105,7 +105,7 @@ export const props = defineMixin({ + // 内容样式 + contentStyle: { + type: Object, +- default: () => defProps.modal.contentStyle ++ default: () => ({ ...(defProps.modal.contentStyle || {}) }) + } + } + }) +diff --git a/node_modules/uview-plus/components/u-modal/u-modal.vue b/node_modules/uview-plus/components/u-modal/u-modal.vue +index eab8f72..bfd3da0 100644 +--- a/node_modules/uview-plus/components/u-modal/u-modal.vue ++++ b/node_modules/uview-plus/components/u-modal/u-modal.vue +@@ -142,9 +142,12 @@ + emits: ["confirm", "cancel", "close", "update:show", 'cancelOnAsync'], + computed: { + contentStyleCpu() { +- let style = this.contentStyle; +- style.paddingTop = `${this.title ? 12 : 25}px` +- return style; ++ // 不要改 props 上的 contentStyle。那个对象是默认配置里的共享引用, ++ // 渲染时写入会反向触发父组件更新,购物车页会因此无限循环。 ++ return { ++ ...(this.contentStyle || {}), ++ paddingTop: `${this.title ? 12 : 25}px` ++ } + } + }, + methods: { diff --git a/node_modules/uview-plus/components/u-navbar/theme-vars.scss b/node_modules/uview-plus/components/u-navbar/theme-vars.scss index d057ee6..791a092 100644 --- a/node_modules/uview-plus/components/u-navbar/theme-vars.scss diff --git a/utils/theme.js b/utils/theme.js index d342928..eba6395 100644 --- a/utils/theme.js +++ b/utils/theme.js @@ -35,14 +35,35 @@ export function loadCachedTheme() { } } -export function applyTabBarStyle(mainColor) { - if (!mainColor) return; - try { - uni.setTabBarStyle({ - selectedColor: mainColor, - }); - } catch (e) { - // 非 tabBar 页面可能报错,忽略 +const TAB_BAR_ROUTES = [ + "pages/tabbar/home/index", + "pages/tabbar/category/category", + "pages/tabbar/cart/cartList", + "pages/tabbar/user/my", +]; + +function normalizeRoute(route = "") { + return String(route).replace(/^\//, "").split("?")[0]; +} + +function currentRoute() { + const pages = typeof getCurrentPages === "function" ? getCurrentPages() : []; + const page = pages[pages.length - 1]; + return (page && page.route) || ""; +} + +export function isTabBarRoute(route) { + return TAB_BAR_ROUTES.includes(normalizeRoute(route || currentRoute())); +} + +export function applyTabBarStyle(mainColor, route) { + if (!mainColor || !isTabBarRoute(route)) return; + const task = uni.setTabBarStyle({ + selectedColor: mainColor, + fail() {}, + }); + if (task && typeof task.catch === "function") { + task.catch(() => {}); } }
+ {{ skuItem.goodsSku.goodsName }} +
{{skuItem.goodsSku.simpleSpecs}}
批发商品