refactor: 优化购物车与订单页面逻辑

- 更新购物车页面,增强商品展示与交互体验。
- 调整订单页面的状态反馈与用户操作逻辑,确保信息清晰。
- 改进组件样式与布局,提升整体用户体验。
- 修复多个页面中的样式与功能问题,确保一致性与流畅性。
This commit is contained in:
pikachu1995@126.com
2026-09-29 10:22:57 +08:00
parent 0bffe81c6b
commit a3193c3b68
19 changed files with 1631 additions and 1480 deletions

View File

@@ -159,7 +159,7 @@
title="申请原因"
@confirm="reasonSelectConfirm"
></u-picker>
<u-toast ref="uToast" />
<u-toast ref="toastRef" />
</view>
</template>
@@ -186,7 +186,7 @@ const sku = ref<any>({})
const reasonSelectShow = ref(false)
const reasonList = ref<any[]>([])
const applyInfo = ref<any>({})
const uToast = ref<any>(null)
const toastRef = ref<any>(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({

View File

@@ -69,7 +69,7 @@
@confirm="onTimeConfirm"
@close="timeshow = false"
/>
<u-toast ref="uToast"/>
<u-toast ref="toastRef"/>
</view>
</template>
@@ -96,7 +96,7 @@ const form = reactive({
})
const serviceDetail = reactive<{ sn: string }>({ sn: '' })
const sku = ref<any>({})
const uToast = ref<any>(null)
const toastRef = ref<any>(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,