hookehuyr

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

修复订单页面中退款状态筛选逻辑,改为同时查询退款成功和失败状态
移除注册页面中学校选择的必填验证
优化个人资料保存时的API响应处理
注释首页认证车源功能的弹窗代码
...@@ -482,7 +482,8 @@ const handleSave = async () => { ...@@ -482,7 +482,8 @@ const handleSave = async () => {
482 482
483 try { 483 try {
484 // 保存用户信息API请求 484 // 保存用户信息API请求
485 - await updateProfileAPI(formData) 485 + const { code, msg } = await updateProfileAPI(formData)
486 + if (code) {
486 Taro.showToast({ 487 Taro.showToast({
487 title: '保存成功', 488 title: '保存成功',
488 icon: 'success', 489 icon: 'success',
...@@ -490,6 +491,7 @@ const handleSave = async () => { ...@@ -490,6 +491,7 @@ const handleSave = async () => {
490 goBack() 491 goBack()
491 } 492 }
492 }) 493 })
494 + }
493 // setTimeout(() => { 495 // setTimeout(() => {
494 // toastVisible.value = false 496 // toastVisible.value = false
495 // }, 1500) 497 // }, 1500)
......
1 <!-- 1 <!--
2 * @Date: 2025-06-28 10:33:00 2 * @Date: 2025-06-28 10:33:00
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-08-04 13:28:57 4 + * @LastEditTime: 2025-08-05 11:11:06
5 * @FilePath: /jgdl/src/pages/index/index.vue 5 * @FilePath: /jgdl/src/pages/index/index.vue
6 * @Description: 捡个电驴首页 6 * @Description: 捡个电驴首页
7 --> 7 -->
...@@ -103,6 +103,12 @@ const onCertifiedClick = () => { ...@@ -103,6 +103,12 @@ const onCertifiedClick = () => {
103 Taro.navigateTo({ 103 Taro.navigateTo({
104 url: '/pages/authCar/index' 104 url: '/pages/authCar/index'
105 }) 105 })
106 + // 敬请期待弹框提示
107 + // Taro.showModal({
108 + // title: '敬请期待',
109 + // content: '认证车源功能暂未开放',
110 + // showCancel: false
111 + // })
106 } 112 }
107 113
108 /** 114 /**
......
1 <!-- 1 <!--
2 * @Date: 2022-09-19 14:11:06 2 * @Date: 2022-09-19 14:11:06
3 * @LastEditors: hookehuyr hookehuyr@gmail.com 3 * @LastEditors: hookehuyr hookehuyr@gmail.com
4 - * @LastEditTime: 2025-08-04 17:55:42 4 + * @LastEditTime: 2025-08-04 18:04:34
5 * @FilePath: /jgdl/src/pages/myOrders/index.vue 5 * @FilePath: /jgdl/src/pages/myOrders/index.vue
6 * @Description: 订单管理页面 6 * @Description: 订单管理页面
7 --> 7 -->
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
44 已取消 44 已取消
45 </view> 45 </view>
46 <view v-if="viewMode === 'verification'" class="tab-item" :class="{ active: activeTab === 15 }" @click="setActiveTab(15)"> 46 <view v-if="viewMode === 'verification'" class="tab-item" :class="{ active: activeTab === 15 }" @click="setActiveTab(15)">
47 - 退款 47 + 退款
48 </view> 48 </view>
49 </view> 49 </view>
50 </nut-sticky> 50 </nut-sticky>
...@@ -545,24 +545,10 @@ const pageLimit = ref(10) ...@@ -545,24 +545,10 @@ const pageLimit = ref(10)
545 const countdownIntervals = ref(new Map()) // 存储每个订单的倒计时定时器 545 const countdownIntervals = ref(new Map()) // 存储每个订单的倒计时定时器
546 546
547 /** 547 /**
548 - * 根据当前视图模式和筛选条件获取过滤后的订单列表 548 + * 根据当前视图模式获取订单列表(不再进行前端过滤,直接返回API查询结果)
549 */ 549 */
550 const filteredOrders = computed(() => { 550 const filteredOrders = computed(() => {
551 - const orders = viewMode.value === 'buy' ? boughtOrders.value : viewMode.value === 'verification' ? verificationOrders.value : soldOrders.value 551 + return viewMode.value === 'buy' ? boughtOrders.value : viewMode.value === 'verification' ? verificationOrders.value : soldOrders.value
552 -
553 - if (activeTab.value === '') {
554 - return orders
555 - }
556 -
557 - return orders.filter(order => {
558 - if (activeTab.value === 3) return order.status === 3
559 - if (activeTab.value === 5) return order.status === 5
560 - if (activeTab.value === 9) return order.status === 9
561 - if (activeTab.value === 11) return order.status === 11
562 - if (activeTab.value === 7) return order.status === 7
563 - if (activeTab.value === 15) return order.status === 15
564 - return true
565 - })
566 }) 552 })
567 553
568 /** 554 /**
...@@ -581,8 +567,9 @@ const setViewMode = (mode) => { ...@@ -581,8 +567,9 @@ const setViewMode = (mode) => {
581 */ 567 */
582 const setActiveTab = (tab) => { 568 const setActiveTab = (tab) => {
583 activeTab.value = tab 569 activeTab.value = tab
584 - // 重置列表加载状态并重新加载数据 570 + // 重置列表状态和数据
585 - currentPage.value = 0 571 + resetListState(true)
572 + // 重新加载对应状态的数据
586 loadOrderData(false) 573 loadOrderData(false)
587 } 574 }
588 575
...@@ -597,7 +584,8 @@ const loadOrderData = async (isLoadMore = false) => { ...@@ -597,7 +584,8 @@ const loadOrderData = async (isLoadMore = false) => {
597 loading.value = true 584 loading.value = true
598 585
599 const type = viewMode.value === 'buy' ? 'buy' : viewMode.value === 'verification' ? 'verification' : 'sell' 586 const type = viewMode.value === 'buy' ? 'buy' : viewMode.value === 'verification' ? 'verification' : 'sell'
600 - const status = activeTab.value || undefined 587 + // 处理退款状态:当activeTab为15时,查询状态15(已退款)和17(退款失败)
588 + const status = activeTab.value === 15 ? [15, 17] : (activeTab.value || undefined)
601 const page = isLoadMore ? currentPage.value + 1 : 0 589 const page = isLoadMore ? currentPage.value + 1 : 0
602 590
603 // TAG: 添加mock数据用于测试 591 // TAG: 添加mock数据用于测试
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
82 </nut-form-item> --> 82 </nut-form-item> -->
83 83
84 <!-- 所在学校 --> 84 <!-- 所在学校 -->
85 - <nut-form-item label="所在学校" prop="school" required :rules="[{ required: true, message: '请选择学校' }]" label-position="top"> 85 + <nut-form-item label="所在学校" prop="school" label-position="top">
86 <view class="school-item" @click="showSchoolPicker"> 86 <view class="school-item" @click="showSchoolPicker">
87 <text class="school-value">{{ formData.school || '请选择学校' }}</text> 87 <text class="school-value">{{ formData.school || '请选择学校' }}</text>
88 <Right class="arrow-icon" /> 88 <Right class="arrow-icon" />
...@@ -428,10 +428,10 @@ const validateForm = () => { ...@@ -428,10 +428,10 @@ const validateForm = () => {
428 return false 428 return false
429 } 429 }
430 430
431 - if (!formData.school_id) { 431 + // if (!formData.school_id) {
432 - showToast('请选择学校', 'error') 432 + // showToast('请选择学校', 'error')
433 - return false 433 + // return false
434 - } 434 + // }
435 435
436 if (!formData.wechat_id) { 436 if (!formData.wechat_id) {
437 showToast('请输入微信号', 'error') 437 showToast('请输入微信号', 'error')
......