修复bug,添加我的积分页面

This commit is contained in:
zhouyanli
2026-08-05 10:55:30 +08:00
parent 466f710b33
commit 81e0ccf574
10 changed files with 1063 additions and 29 deletions

View File

@@ -72,8 +72,8 @@ const photoList = ref([])
// 状态映射
const statusMap = {
'0': { text: '待处理', class: 'pending' },
'1': { text: '处理中', class: 'processing' },
'2': { text: '已完成', class: 'completed' }
// '1': { text: '处理中', class: 'processing' },
'1': { text: '已完成', class: 'completed' }
}
const statusText = computed(() => {

View File

@@ -1,9 +1,11 @@
<template>
<view class="contentStyle">
<!-- 顶部分段控制器 -->
<view style="width: 60vw;">
<uni-segmented-control :current="currentTab" :values="tabs" @clickItem="onTabClick" style-type="text"
active-color="#007AFF" inactive-color="#999" class="seg-control"></uni-segmented-control>
<view class="tab-wrap">
<view class="tab-item" :class="{ active: currentTab === index }" v-for="(tab, index) in tabs"
:key="index" @click="onTabClick({ currentIndex: index })">
<text class="tab-text">{{ tab }}</text>
</view>
</view>
<!-- 列表区域 -->
@@ -19,8 +21,8 @@
<view class="card-header">
<text class="card-title">{{ item.title }}</text>
<text class="card-tag"
:class="item.status === 'pending' ? 'pending' : item.status === 'processing' ? 'processing' : 'completed'">
{{ item.status === 'pending' ? '待处理' : item.status === 'processing' ? '处理中' : '已完成' }}
:class="item.status === 'pending' ? 'pending' : 'completed'">
{{ item.status === 'pending' ? '待处理' : '已完成' }}
</text>
</view>
@@ -55,7 +57,7 @@ import {onLoad} from '@dcloudio/uni-app'
import {getComplainList} from '../api/apiSub.js'
// 分段器
const tabs = ref(["待处理", "处理中", "已完成"])
const tabs = ref(["待处理", "已完成"])
const currentTab = ref(0)
const dataList = ref([])
@@ -67,8 +69,8 @@ const completedList = ref([])
// 状态映射
const statusMap = {
"0":'pending',
'1':'processing',
'2':'completed'
// '1':'processing',
'1':'completed'
}
// 接口数据映射为模板所需格式
const mapItem = (item) => {
@@ -177,8 +179,43 @@ const addComplaintsSuggestions = () => {
margin-bottom: 10rpx;
}
.seg-control {
margin-bottom: 20rpx;
.tab-wrap {
display: flex;
justify-content: flex-start;
align-items: center;
padding: 10rpx 40rpx 20rpx;
}
.tab-item {
position: relative;
padding: 10rpx 0;
margin-right: 80rpx;
}
.tab-item:last-child {
margin-right: 0;
}
.tab-text {
font-size: 30rpx;
color: #999;
}
.tab-item.active .tab-text {
color: #007AFF;
font-weight: 600;
}
.tab-item.active::after {
content: '';
position: absolute;
bottom: 0;
left: 50%;
transform: translateX(-50%);
width: 96rpx;
height: 4rpx;
background: #2F77FD;
border-radius: 32rpx;
}
.card-wrapper {

View File

@@ -48,7 +48,8 @@
</template>
<script setup>
import { ref, computed, onMounted } from 'vue'
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import {getQuestionnaireList} from '../api/apiSub.js'
// 状态栏高度
@@ -130,8 +131,8 @@
})
}
// 生命周期:页面挂载完成
onMounted(() => {
// 生命周期:每次显示时刷新数据
onShow(() => {
getDataList()
})
</script>