页面修改及其提交

This commit is contained in:
qiuyuan 2025-04-25 18:25:17 +08:00
parent 6089acad52
commit 250ab1671a
3 changed files with 498 additions and 7 deletions

View File

@ -26,7 +26,11 @@
<!-- 功能按钮区域 --> <!-- 功能按钮区域 -->
<view class="function-buttons"> <view class="function-buttons">
<view class="button-row" v-for="(row,rowIndex) in groupedButtons" :key="rowIndex"> <view class="button-row" v-for="(row,rowIndex) in groupedButtons" :key="rowIndex">
<view class="button-item" v-for="(item, index) in row" :key="index"> <view class="button-item"
v-for="(item, index) in row"
:key="index"
@click="goPage(item.pageUrl)"
>
<image class="icon" :src='item.url' mode="aspectFit"></image> <image class="icon" :src='item.url' mode="aspectFit"></image>
<view class="label">{{item.name}}</view> <view class="label">{{item.name}}</view>
</view> </view>
@ -88,32 +92,37 @@
choseList: [{ choseList: [{
key: 1, key: 1,
url: "/static/imgs/service/service_list.png", url: "/static/imgs/service/service_list.png",
name: '全部工单' name: '全部工单',
pageUrl:'myTickets'
}, },
{ {
key: 2, key: 2,
url: "/static/imgs/service/service_help.png", url: "/static/imgs/service/service_help.png",
name: '我的求助' name: '我的求助',
pageUrl:'mySeekHelp'
}, },
{ {
key: 3, key: 3,
url: "/static/imgs/service/service_service.png", url: "/static/imgs/service/service_service.png",
name: '周边服务' name: '周边服务',
pageUrl:'neighbor'
}, },
{ {
key: 4, key: 4,
url: "/static/imgs/service/service_friend.png", url: "/static/imgs/service/service_friend.png",
name: '邻里圈' name: '邻里圈',
pageUrl:'neighbor'
}, },
{ {
key: 5, key: 5,
url: "/static/imgs/service/service_notice.png", url: "/static/imgs/service/service_notice.png",
name: '社区公告' name: '社区公告',
pageUrl:'serviceNoticeList'
}, },
{ {
key: 6, key: 6,
url: "/static/imgs/service/service_phone.png", url: "/static/imgs/service/service_phone.png",
name: '联系社区' name: '联系社区',
}, },
], ],
@ -171,6 +180,26 @@
// //
handleCancel() { handleCancel() {
this.showEditModal = false; // this.showEditModal = false; //
},
//
goPage(page){
console.log('page',page)
if(page){
uni.navigateTo({
url: `/pages/${page}/index`,
// url: '/pages/helpInfo/index',
success: () => {
console.log('切换到tabBar页面成功');
},
fail: (err) => {
console.error('切换到tabBar页面失败:', err);
}
});
}else{
console.error('切换到tabBar页面失败:', err);
}
}, },
}, },
} }

231
pages/mySeekHelp/index.vue Normal file
View File

@ -0,0 +1,231 @@
<template>
<view class="container">
<!-- 引入头部组件 -->
<Header :title="'我的求助'"></Header>
<view class="content">
<!-- 标签栏 -->
<u-tabs :list="tabList" lineWidth="30" lineColor="#3B8CFF" :activeStyle="{
color: '#303133',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#606266',
transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;width:90px"></u-tabs>
</view>
<view class="content_wapper">
<view class="content_list">
<!-- 工单列表 -->
<view v-for="(order, index) in filteredOrders" :key="index" class="order-item">
<view class="order-title">
<view class="title">
<view class="title-text">{{ order.title }}</view>
<u-tag size="mini" text="求助中" plain></u-tag>
</view>
<view class="date">{{ order.date }}</view>
</view>
<view class="order-description">{{ order.description }}</view>
<!-- <view class="order-status">
<u-tag size="mini" text="待解决" plain></u-tag>
</view> -->
<button @click="handleAction(order)" class="order-action">{{ order.actionText }}</button>
</view>
</view>
</view>
<Footer></Footer>
</view>
</template>
<script>
import Header from '@/components/header_common.vue';
import Footer from '@/components/footer_common.vue';
export default {
components: {
Header,
Footer
},
data() {
return {
tabList: [{
name: '全部'
},
{
name: '求助中'
},
{
name: '已解决'
}
],
orders: [{
title: '楼道垃圾',
description: '公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...',
date: '2025-03-25',
status: '待解决',
actionText: '撤回'
},
{
title: '电梯故障',
description: '公寓2期xx楼电梯无法正常使用...',
date: '2025-02-21',
status: '已解决',
actionText: '无'
},
// ...
],
currentTab: '全部'
};
},
computed: {
filteredOrders() {
if (this.currentTab === '全部') {
return this.orders;
} else {
return this.orders.filter(order => order.status === this.currentTab);
}
}
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1 //
});
},
// tabs
handleTabChange(index) {
this.currentTab = this.tabList[index].name;
},
}
};
</script>
<style lang="scss" scoped>
//
$primary-color: #1890ff;
$light-bg: #f0f8ff;
$text-color: #333;
$sub-text-color: #3D3D3D;
$disabled-text-color: #999;
.container {
width: 100%;
min-height: 100vh;
/* 占满整个视口高度 */
opacity: 1;
background: linear-gradient(0deg, rgba(240, 240, 240, 1) 0%, rgba(255, 250, 250, 0) 100%),
linear-gradient(0deg, rgba(255, 241, 235, 1) 0%, rgba(192, 219, 250, 1) 100%);
position: relative;
.content {
width: 100%;
position: absolute;
margin-top: 300rpx;
background-color: rgba(252, 252, 252, 0.8);
padding-bottom: 16rpx;
}
.content_wapper {
width: 100%;
height: auto;
position: absolute;
margin-top: 420rpx;
background-color: rgba(252, 252, 252, 0.8);
.content_list {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
.order-item {
display: flex;
flex-direction: column;
width: 90%;
margin: 20rpx auto;
border-radius: 10rpx;
margin-bottom: 40rpx;
padding:40rpx 20rpx;
border-radius: 14.17px;
background: linear-gradient(90deg, rgba(199, 222, 255, 0.5) 0%, rgba(255, 255, 255, 0.72) 100%);
box-shadow: 0px 2px 4px rgba(191, 218, 255, 0.58);
position: relative;
.order-title {
font-size: 28rpx;
display: flex;
justify-content: space-between;
.title{
width: 90%;
font-weight: bold;
display: flex;
align-items: center;
gap: 8rpx;
.title-text{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200rpx;
}
}
.date{
width: 40%;
font-weight: normal;
text-align: right;
}
}
.order-description {
font-size: 26rpx;
color: $sub-text-color;
margin-top: 10rpx;
margin-bottom: 30rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
line-height: 50rpx;
}
.order-status {
font-size: 22rpx;
color: $text-color;
margin-top: 10rpx;
width: 100rpx;
}
.order-action {
margin-top: 40rpx;
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
background-color: $primary-color;
color: #fff;
border-radius: 10rpx;
font-size: 24rpx;
margin-top: 20rpx;
position: absolute;
right: 20rpx;
bottom: 20rpx;
}
}
}
}
}
</style>

231
pages/myTickets/index.vue Normal file
View File

@ -0,0 +1,231 @@
<template>
<view class="container">
<!-- 引入头部组件 -->
<Header :title="'我的工单'"></Header>
<view class="content">
<!-- 标签栏 -->
<u-tabs :list="tabList" lineWidth="30" lineColor="#3B8CFF" :activeStyle="{
color: '#303133',
fontWeight: 'bold',
transform: 'scale(1.05)'
}" :inactiveStyle="{
color: '#606266',
transform: 'scale(1)'
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;width:90px"></u-tabs>
</view>
<view class="content_wapper">
<view class="content_list">
<!-- 工单列表 -->
<view v-for="(order, index) in filteredOrders" :key="index" class="order-item">
<view class="order-title">
<view class="title">
<view class="title-text">{{ order.title }}</view>
<u-tag size="mini" text="待解决" plain></u-tag>
</view>
<view class="date">{{ order.date }}</view>
</view>
<view class="order-description">{{ order.description }}</view>
<!-- <view class="order-status">
<u-tag size="mini" text="待解决" plain></u-tag>
</view> -->
<button @click="handleAction(order)" class="order-action">{{ order.actionText }}</button>
</view>
</view>
</view>
<Footer></Footer>
</view>
</template>
<script>
import Header from '@/components/header_common.vue';
import Footer from '@/components/footer_common.vue';
export default {
components: {
Header,
Footer
},
data() {
return {
tabList: [{
name: '全部'
},
{
name: '待解决'
},
{
name: '已解决'
}
],
orders: [{
title: '楼道垃圾',
description: '公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...公寓2期xx楼梯门口有垃圾...',
date: '2025-03-25',
status: '待解决',
actionText: '撤回'
},
{
title: '电梯故障',
description: '公寓2期xx楼电梯无法正常使用...',
date: '2025-02-21',
status: '已解决',
actionText: '无'
},
// ...
],
currentTab: '全部'
};
},
computed: {
filteredOrders() {
if (this.currentTab === '全部') {
return this.orders;
} else {
return this.orders.filter(order => order.status === this.currentTab);
}
}
},
methods: {
handleBack() {
uni.navigateBack({
delta: 1 //
});
},
// tabs
handleTabChange(index) {
this.currentTab = this.tabList[index].name;
},
}
};
</script>
<style lang="scss" scoped>
//
$primary-color: #1890ff;
$light-bg: #f0f8ff;
$text-color: #333;
$sub-text-color: #3D3D3D;
$disabled-text-color: #999;
.container {
width: 100%;
min-height: 100vh;
/* 占满整个视口高度 */
opacity: 1;
background: linear-gradient(0deg, rgba(240, 240, 240, 1) 0%, rgba(255, 250, 250, 0) 100%),
linear-gradient(0deg, rgba(255, 241, 235, 1) 0%, rgba(192, 219, 250, 1) 100%);
position: relative;
.content {
width: 100%;
position: absolute;
margin-top: 300rpx;
background-color: rgba(252, 252, 252, 0.8);
padding-bottom: 16rpx;
}
.content_wapper {
width: 100%;
height: auto;
position: absolute;
margin-top: 420rpx;
background-color: rgba(252, 252, 252, 0.8);
.content_list {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
.order-item {
display: flex;
flex-direction: column;
width: 90%;
margin: 20rpx auto;
border-radius: 10rpx;
margin-bottom: 40rpx;
padding:40rpx 20rpx;
border-radius: 14.17px;
background: linear-gradient(90deg, rgba(199, 222, 255, 0.5) 0%, rgba(255, 255, 255, 0.72) 100%);
box-shadow: 0px 2px 4px rgba(191, 218, 255, 0.58);
position: relative;
.order-title {
font-size: 28rpx;
display: flex;
justify-content: space-between;
.title{
width: 90%;
font-weight: bold;
display: flex;
align-items: center;
gap: 8rpx;
.title-text{
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 200rpx;
}
}
.date{
width: 40%;
font-weight: normal;
text-align: right;
}
}
.order-description {
font-size: 26rpx;
color: $sub-text-color;
margin-top: 10rpx;
margin-bottom: 30rpx;
display: -webkit-box;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
-webkit-line-clamp: 2;
line-height: 50rpx;
}
.order-status {
font-size: 22rpx;
color: $text-color;
margin-top: 10rpx;
width: 100rpx;
}
.order-action {
margin-top: 40rpx;
width: 120rpx;
height: 40rpx;
line-height: 40rpx;
text-align: center;
background-color: $primary-color;
color: #fff;
border-radius: 10rpx;
font-size: 24rpx;
margin-top: 20rpx;
position: absolute;
right: 20rpx;
bottom: 20rpx;
}
}
}
}
}
</style>