first commit

This commit is contained in:
Ls
2026-02-12 12:19:20 +08:00
commit 219fd9be5c
529 changed files with 169918 additions and 0 deletions

View File

@@ -0,0 +1,285 @@
<template>
<view class="online-management-page">
<!-- 接单状态 -->
<view class="status-section">
<view class="status-card">
<text class="section-title">接单状态</text>
<view class="status-button" :class="{ 'online': isOnline, 'offline': !isOnline }" >
<text class="status-text">{{ isOnline ? '接单中 · 点击下线' : '已下线 · 点击上线' }}</text>
</view>
</view>
</view>
<!-- 热门接单区域 -->
<view class="map-section">
<text class="section-title">热门接单区域</text>
<view class="map-container">
<!-- 地图占位,使用黑边白底样式 -->
<view class="map-placeholder">
<view class="map-content">
<!-- 模拟地图上的区域标记 -->
<view class="map-area red-area"></view>
<view class="map-area yellow-area"></view>
<view class="map-area green-area"></view>
<text class="map-label">地图加载中...</text>
</view>
</view>
<text class="map-tip">红色区域订单更多,建议在此范围内接单</text>
</view>
</view>
<!-- 服务范围 -->
<view class="service-range-section">
<text class="section-title">服务范围</text>
<view class="service-card">
<view class="range-setting">
<view class="range-left">
<up-icon name="map" size="20" color="#1890ff" style="margin-right: 16rpx;"></up-icon>
<text class="range-text">手动划定接单范围</text>
</view>
<up-switch v-model="manualRangeEnabled" @change="handleRangeSwitchChange"></up-switch>
</view>
</view>
</view>
<!-- 提示信息 -->
<view class="tips-section">
<view class="tip-card info">
<up-icon name="info-circle" size="20" color="#1890ff" style="margin-right: 16rpx;"></up-icon>
<text class="tip-text">上线后系统将自动推送附近订单,您可在'任务'查看并抢单。</text>
</view>
<view class="tip-card warning">
<up-icon name="warning" size="20" color="#fa8c16" style="margin-right: 16rpx;"></up-icon>
<text class="tip-text">请确保在服务区域内接单,超出范围可能影响配送效率和收入。</text>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue';
// 接单状态
const isOnline = ref(true);
// 是否启用手动划定范围
const manualRangeEnabled = ref(false);
// 切换在线状态
const toggleStatus = () => {
const newStatus = !isOnline.value;
// 显示确认对话框
uni.showModal({
title: newStatus ? '确认上线' : '确认下线',
content: newStatus ? '上线后将接收订单推送,确定要上线吗?' : '下线后将停止接收订单推送,确定要下线吗?',
success: (res) => {
if (res.confirm) {
isOnline.value = newStatus;
uni.showToast({
title: newStatus ? '已成功上线' : '已成功下线',
icon: 'success'
});
}
}
});
};
// 处理范围开关变化
const handleRangeSwitchChange = (value : boolean) => {
manualRangeEnabled.value = value;
};
</script>
<style scoped lang="scss">
/* 页面基础样式 */
.online-management-page {
background-color: #f5f5f5;
margin: 20rpx;
}
/* 标题通用样式 */
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-bottom: 24rpx;
}
/* 状态区域 */
.status-section {
background-color: #fff;
padding: 30rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
}
.status-card {
display: flex;
flex-direction: column;
}
.status-button {
height: 86rpx;
border-radius: 60rpx;
display: flex;
align-items: center;
justify-content: center;
font-size: 32rpx;
font-weight: 600;
transition: all 0.3s ease;
}
.status-button.online {
background-color: #52c41a;
color: #fff;
}
.status-button.offline {
background-color: #d9d9d9;
color: #666;
}
.status-button:active {
opacity: 0.8;
}
/* 地图区域 */
.map-section {
background-color: #fff;
padding: 30rpx;
margin-bottom: 20rpx;
border-radius: 20rpx;
}
.map-container {
display: flex;
flex-direction: column;
}
.map-placeholder {
width: 100%;
height: 500rpx;
border: 2rpx solid #ddd;
background-color: #fff;
border-radius: 12rpx;
margin-bottom: 20rpx;
overflow: hidden;
}
.map-content {
width: 100%;
height: 100%;
position: relative;
background-color: #f5f5f5;
display: flex;
align-items: center;
justify-content: center;
}
/* 地图上的区域标记 */
.map-area {
position: absolute;
border-radius: 50%;
opacity: 0.3;
}
.red-area {
width: 300rpx;
height: 300rpx;
background-color: #ff4d4f;
top: 120rpx;
right: 150rpx;
z-index: 3;
}
.yellow-area {
width: 250rpx;
height: 250rpx;
background-color: #faad14;
top: 80rpx;
left: 120rpx;
z-index: 2;
}
.green-area {
width: 200rpx;
height: 200rpx;
background-color: #52c41a;
bottom: 100rpx;
right: 200rpx;
z-index: 1;
}
.map-label {
font-size: 28rpx;
color: #999;
z-index: 10;
}
.map-tip {
font-size: 26rpx;
color: #666;
line-height: 1.5;
}
/* 服务范围 */
.service-range-section {
background-color: #fff;
padding: 30rpx;
margin-bottom: 20rpx;
}
.service-card {
background-color: #fafafa;
border-radius: 12rpx;
padding: 24rpx;
}
.range-setting {
display: flex;
justify-content: space-between;
align-items: center;
}
.range-left {
display: flex;
align-items: center;
}
.range-text {
font-size: 30rpx;
color: #333;
}
/* 提示信息 */
.tips-section {
padding: 0 30rpx;
}
.tip-card {
display: flex;
align-items: flex-start;
padding: 24rpx;
margin-bottom: 20rpx;
border-radius: 12rpx;
font-size: 26rpx;
line-height: 1.6;
}
.tip-card.info {
background-color: #e6f7ff;
color: #1890ff;
}
.tip-card.warning {
background-color: #fff7e6;
color: #fa8c16;
}
.tip-text {
flex: 1;
}
</style>