hookehuyr

fix: 修复订单状态筛选和学校选择验证问题

修复订单页面中退款状态筛选逻辑,改为同时查询退款成功和失败状态
移除注册页面中学校选择的必填验证
优化个人资料保存时的API响应处理
注释首页认证车源功能的弹窗代码
......@@ -482,7 +482,8 @@ const handleSave = async () => {
try {
// 保存用户信息API请求
await updateProfileAPI(formData)
const { code, msg } = await updateProfileAPI(formData)
if (code) {
Taro.showToast({
title: '保存成功',
icon: 'success',
......@@ -490,6 +491,7 @@ const handleSave = async () => {
goBack()
}
})
}
// setTimeout(() => {
// toastVisible.value = false
// }, 1500)
......
<!--
* @Date: 2025-06-28 10:33:00
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-04 13:28:57
* @LastEditTime: 2025-08-05 11:11:06
* @FilePath: /jgdl/src/pages/index/index.vue
* @Description: 捡个电驴首页
-->
......@@ -103,6 +103,12 @@ const onCertifiedClick = () => {
Taro.navigateTo({
url: '/pages/authCar/index'
})
// 敬请期待弹框提示
// Taro.showModal({
// title: '敬请期待',
// content: '认证车源功能暂未开放',
// showCancel: false
// })
}
/**
......
<!--
* @Date: 2022-09-19 14:11:06
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-08-04 17:55:42
* @LastEditTime: 2025-08-04 18:04:34
* @FilePath: /jgdl/src/pages/myOrders/index.vue
* @Description: 订单管理页面
-->
......@@ -44,7 +44,7 @@
已取消
</view>
<view v-if="viewMode === 'verification'" class="tab-item" :class="{ active: activeTab === 15 }" @click="setActiveTab(15)">
退款
退款
</view>
</view>
</nut-sticky>
......@@ -545,24 +545,10 @@ const pageLimit = ref(10)
const countdownIntervals = ref(new Map()) // 存储每个订单的倒计时定时器
/**
* 根据当前视图模式和筛选条件获取过滤后的订单列表
* 根据当前视图模式获取订单列表(不再进行前端过滤,直接返回API查询结果)
*/
const filteredOrders = computed(() => {
const orders = viewMode.value === 'buy' ? boughtOrders.value : viewMode.value === 'verification' ? verificationOrders.value : soldOrders.value
if (activeTab.value === '') {
return orders
}
return orders.filter(order => {
if (activeTab.value === 3) return order.status === 3
if (activeTab.value === 5) return order.status === 5
if (activeTab.value === 9) return order.status === 9
if (activeTab.value === 11) return order.status === 11
if (activeTab.value === 7) return order.status === 7
if (activeTab.value === 15) return order.status === 15
return true
})
return viewMode.value === 'buy' ? boughtOrders.value : viewMode.value === 'verification' ? verificationOrders.value : soldOrders.value
})
/**
......@@ -581,8 +567,9 @@ const setViewMode = (mode) => {
*/
const setActiveTab = (tab) => {
activeTab.value = tab
// 重置列表加载状态并重新加载数据
currentPage.value = 0
// 重置列表状态和数据
resetListState(true)
// 重新加载对应状态的数据
loadOrderData(false)
}
......@@ -597,7 +584,8 @@ const loadOrderData = async (isLoadMore = false) => {
loading.value = true
const type = viewMode.value === 'buy' ? 'buy' : viewMode.value === 'verification' ? 'verification' : 'sell'
const status = activeTab.value || undefined
// 处理退款状态:当activeTab为15时,查询状态15(已退款)和17(退款失败)
const status = activeTab.value === 15 ? [15, 17] : (activeTab.value || undefined)
const page = isLoadMore ? currentPage.value + 1 : 0
// TAG: 添加mock数据用于测试
......
......@@ -82,7 +82,7 @@
</nut-form-item> -->
<!-- 所在学校 -->
<nut-form-item label="所在学校" prop="school" required :rules="[{ required: true, message: '请选择学校' }]" label-position="top">
<nut-form-item label="所在学校" prop="school" label-position="top">
<view class="school-item" @click="showSchoolPicker">
<text class="school-value">{{ formData.school || '请选择学校' }}</text>
<Right class="arrow-icon" />
......@@ -428,10 +428,10 @@ const validateForm = () => {
return false
}
if (!formData.school_id) {
showToast('请选择学校', 'error')
return false
}
// if (!formData.school_id) {
// showToast('请选择学校', 'error')
// return false
// }
if (!formData.wechat_id) {
showToast('请输入微信号', 'error')
......