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,355 @@
import { HttpRequest, StoreAssist, UploadAssist, ResultData } from '@/common/Common';
import { BaseConfig } from './BaseConfig';
export class Service extends BaseConfig {
// 获取是否后台
static getIsHede () {
let isHede = this.GetStorageCache('isHede')
if (isHede == null || isHede == '') {
return false;
} else {
return isHede;
}
}
//获取API地址
static ApiUrl(path : string) {
return `${this.servesUrl}${path}`;
}
//获取图片地址
static GetpayImg(path : string) {
if (path.startsWith('http') || path.startsWith('https')) {
return path;
} else {
return `${this.payuploadUrl}${path}`;
}
}
//获取图标地址
static GetIconImg(path : string) {
return path
if (path.startsWith('http') || path.startsWith('https')) {
return path;
} else {
return `${this.imgUrl}${path}`;
}
}
//获取图片地址
static GetMateUrlByImg(path : string) {
return path
if (path.startsWith('http') || path.startsWith('https')) {
return path;
} else {
return `${this.imgUrl}${path}`;
}
}
//获取音视频地址
static GetMateUrlByMedia(path : string) {
if (path.startsWith('http') || path.startsWith('https')) {
return path;
} else {
return `${this.mediaUrl}${path}`;
}
}
//获取登录账号token
static GetUserToken() {
return Service.GetStorageCache('token');
}
// 获取登录状态
static GetUserIsLogin() {
var token = this.GetUserToken();
if (token == null || token == '') {
return false;
} else {
return true;
}
}
//设置登录账户Token
static SetUserToken(token : string) {
this.SetStorageCache('token', token);
}
//清理登录账户Token
static OffUserToken() {
Service.DelStorageCache('token');
uni.$emit('ImComOff', 'user');
this.ClearUserStateData();
}
//获取登录账号状态信息
static GetUserStateData() {
return Service.GetStorageCache('StateDomain');
}
//设置当前登录账号状态信息
static SetUserStateData() {
return Service.GetStorageCache('StateDomain');
}
//清理当前登录账号状态信息
static ClearUserStateData() {
Service.DelStorageCache('StateDomain');
}
//获取当前客户端ID
static GetUserClientId() {
return this.GetStorageCache('ClientId');
}
//保存当前客户端ID
static SetUserClientId(clientId: string) {
this.SetStorageCache('ClientId', clientId);
}
//获取缓存
static GetStorageCache(key : string) {
return StoreAssist.Get(key);
}
//删除缓存
static DelStorageCache(key : string) {
StoreAssist.Delete(key);
}
//设置缓存
static SetStorageCache(key : string, data : any) {
StoreAssist.Set(key, data);
}
/*****以下是基础方法调用与拦截器*****/
static Request(url : string, method : 'GET' | 'POST' | 'PUT' | undefined, data : object | any) {
const token = Service.GetUserToken();
const _url = Service.ApiUrl(url);
var result = HttpRequest.RequestWithToken(_url, method, token, data).then((retResult : any) => {
if (retResult.statusCode == '200') {
var obj = retResult.data;
if (obj.code == 401) {
//过期
this.OffUserToken();
// this.Msg('登录过期,请重新登录')
this.GoPage('/pages/my/login')
return Promise.reject();
} else if (obj.code == 40101) {
//失效
this.OffUserToken();
this.GoPageDelse('/pages/mine/login/login');
return Promise.reject();
} else if (obj.code == 1004) {
//资源不存在
this.GoPageDelse('/pages/AppSet/404/404');
return Promise.reject();
// return new ResultData(-1, '', '');
} else if (obj.code == 40188) {
//无权限
this.GoPageDelse('/pages/AppSet/40188/40188');
return Promise.reject();
// return new ResultData(-1, '', '');
} else if (obj.code == 1008) {
//业务提示
return new ResultData(obj.code, obj.msg, obj.data);
} else {
return new ResultData(obj.code, obj.msg, obj.data);
}
} else {
return new ResultData(-1, '', '');
}
});
return result;
}
/*****以下是腾讯云oss上传*****/
static UpLoadMedia(code : string, fileName : string, desire : string, path : string) {
var result = this.Request(this.uploadUrl, 'GET', { code, fileName, desire }).then((retResult) => {
if (retResult.code == 0) {
var upOk = UploadAssist.Upload(retResult.data.url, path, retResult.data.cosData).then((upRet : any) => {
if (upRet.statusCode == 200) {
const retData : any = { code: retResult.data.code, file: retResult.data.file, cache: retResult.data.cache };
return new ResultData(0, '上传成功!', retData);
} else {
this.Msg('上传失败!');
return new ResultData(-1, '', '');
}
});
return upOk;
} else {
this.Msg('上传失败!');
return new ResultData(-1, retResult.msg,retResult.data);
}
});
return result;
}
/***********消息操作**************/
static Msg(message : any, icon ?: any) : void {
if (icon != null) {
uni.showToast({
title: message,
icon: icon
});
} else {
uni.showToast({
title: message,
icon: 'none'
});
}
}
static Alert(msg : string, cb ?: any) {
uni.showModal({
title: '提示',
content: msg,
showCancel: false,
cancelText: '取消',
confirmText: '确定',
success: res => {
if (res.confirm) {
cb && cb();
}
}
})
}
static LoadIng(text : any) : void {
uni.showLoading({
title: text,
icon: 'none'
});
}
static LoadClose() : void {
uni.hideLoading();
}
/**********跳转操作*********/
static GoPageTab(path : string) : void {
uni.switchTab({
url: path
});
}
/**********跳转操作*********/
static GoPage(path : string) : void {
uni.navigateTo({
url: path, //跳转的页面
success: function (res) {
// 通过eventChannel向被打开页面传送数据
}
});
}
/**********跳转并删除当前页面操作*********/
static GoPageDelse(path : string) : void {
uni.redirectTo({
url: path //跳转的页面
});
}
/**********返回上一页*********/
static GoPageBack() : void {
uni.navigateBack({ delta: 1 });
}
/*****获取图片base64*****/
static UpLoadMediaBase64(path : string) {
return new Promise(function (resolve, reject) {
uni.uploadFile({
url: 'http://cloud.pccsh.com/DefUp/UploadFileImgBase64', //仅为示例,非真实的接口地址
filePath: path,
name: 'file',
success: (uploadFileRes) => {
resolve(uploadFileRes);
},
fail: (err) => {
reject(err);
}
});
});
}
/*****获取图片位置信息*****/
//获取时间戳
static GetTimeSpan(milliSecond : number) {
return Date.now() + milliSecond;
}
// 时间戳处理
static formatDate(time : any, type : number) : string {
const date = new Date(time);
const year = date.getFullYear();
const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始所以加1并用0填充
const day = String(date.getDate()).padStart(2, '0'); // 用0填充
const hours = String(date.getHours()).padStart(2, '0'); // 用0填充
const minutes = String(date.getMinutes()).padStart(2, '0'); // 用0填充
const seconds = String(date.getSeconds()).padStart(2, '0'); // 用0填充
if (type == 0) {
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
}
else if (type == 1) {
return `${year}-${month}-${day} ${hours}:${minutes}`;
} else if (type == 2) {
return `${year}-${month}-${day}`;
} else if (type == 3) {
return `${hours}:${minutes}`;
} else if (type == 4) {
return `${year}${month}${day}`;
}
else {
return `${hours}:${minutes}`;
}
}
/*****节流*****/
static throttle(fn: () => void, time: number) {
let canRun: boolean = true;
return function () {
if (!canRun) return;
canRun = false;
setTimeout(() => {
fn(); //可以不执行
canRun = true;
}, time);
};
}
/*****防抖*****/
static debounce<T extends (...args: any[]) => void>(fn: T, time: number): (...args: Parameters<T>) => void {
let timerId: NodeJS.Timeout | null = null;
return (...args: Parameters<T>) => {
if (timerId) {
clearTimeout(timerId);
}
timerId = setTimeout(() => {
fn(...args); // 执行传入的函数
timerId = null; // 清除定时器ID
}, time);
};
}
// 普通图片上传
static uploadH5(path, dic, callback) {
console.log(this.payuploadUrl,'xxx')
uni.uploadFile({
url: this.payuploadUrl+'/Upload/Upload',
method: "POST",
header: {
'Authorization': 'Bearer ' + Service.GetUserToken(),
},
formData: {
"path": dic,
},
filePath: path,
name: 'file',
success: (data) => {
let info = data.data
callback(info)
}
})
}
}

View File

@@ -0,0 +1,626 @@
<template>
<view v-if="isLoading" class="rider-home-skeleton">
<!-- 用户信息区域骨架 -->
<view class="skeleton-user-info">
<view class="skeleton-user-header">
<view class="skeleton-avatar"></view>
<view class="skeleton-user-details">
<view class="skeleton-user-name"></view>
<view class="skeleton-user-id"></view>
</view>
<view class="skeleton-setting-icon"></view>
</view>
</view>
<!-- 统计数据区域骨架 -->
<view class="skeleton-stats-section">
<view class="skeleton-stat-item">
<view class="skeleton-stat-label"></view>
<view class="skeleton-stat-value income"></view>
</view>
<view class="skeleton-stat-item">
<view class="skeleton-stat-label"></view>
<view class="skeleton-stat-value completed"></view>
</view>
<view class="skeleton-stat-item">
<view class="skeleton-stat-label"></view>
<view class="skeleton-stat-value ongoing"></view>
</view>
</view>
<!-- 接单按钮骨架 -->
<view class="skeleton-action-section">
<view class="skeleton-accept-orders-btn"></view>
</view>
<!-- 附近高价单骨架 -->
<view class="skeleton-high-price-orders">
<view class="skeleton-section-title"></view>
<!-- 循环生成多个订单项骨架 -->
<view class="skeleton-order-item" v-for="index in 3" :key="index">
<view class="skeleton-order-header">
<view class="skeleton-high-price-tag"></view>
<view class="skeleton-order-price"></view>
</view>
<view class="skeleton-order-content">
<view class="skeleton-restaurant-name"></view>
<view class="skeleton-pickup-time">
<view class="skeleton-clock-icon"></view>
<view class="skeleton-pickup-time-text"></view>
</view>
</view>
<view class="skeleton-distance"></view>
<view class="skeleton-address"></view>
<view class="skeleton-grab-order-btn"></view>
</view>
</view>
<!-- 加载更多骨架 -->
<view class="skeleton-loadmore"></view>
</view>
<!-- 实际内容 -->
<view v-else class="rider-home">
<!-- 用户信息区域 -->
<view class="user-info">
<view class="user-header">
<image :src="Service.GetMateUrlByImg('/static/dele/home/test.jpeg')" mode="aspectFit" class="avatar">
</image>
<view class="user-details">
<text class="user-name">大大怪将军</text>
<text class="user-id">ID: LN007 · 已下线</text>
</view>
<up-icon @click="Service.GoPage('/pages/my/edit')" name="setting" size="32rpx" color="#333333"></up-icon>
</view>
</view>
<!-- 统计数据区域 -->
<view class="stats-section">
<view class="stat-item">
<text class="stat-label">今日收入</text>
<text class="stat-value income">¥86.50</text>
</view>
<view class="stat-item">
<text class="stat-label">已完成</text>
<text class="stat-value completed">5单</text>
</view>
<view class="stat-item">
<text class="stat-label">进行中</text>
<text class="stat-value ongoing">6单</text>
</view>
</view>
<!-- 接单按钮 -->
<view class="action-section">
<up-button type="primary" shape="circle" size="default" class="accept-orders-btn"
@click="toggleAcceptOrders">{{ userStatus === '已上线' ? '接单中 · 点击暂停' : '点击开始接单' }}</up-button>
</view>
<!-- 附近高价单 -->
<view class="high-price-orders">
<view class="section-title">附近高价单</view>
<view class="order-item" @click="Service.GoPage('/pages/order/grabOrder')" v-for="(order, index) in 3" :key="index">
<view class="order-header">
<view class="high-price-tag">高价单</view>
<text class="order-price">¥20</text>
</view>
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<text class="restaurant-name">王记炸酱面</text>
<view class="pickup-time">
<up-icon name="clock" size="24rpx" color="#FF9500"></up-icon>
<text class="pickup-time-text">12:30 前取餐</text>
</view>
</view>
<text class="distance">距您 0.8km</text>
<text class="address">朝阳区三里屯路123号</text>
<up-button shape="circle" type="primary" size="mini" class="grab-order-btn"
:style="{backgroundColor: '#1890FF'}">立即抢单</up-button>
</view>
</view>
<up-loadmore :status="status" />
<view class="" style="width: 100%; height: 60rpx; ">
</view>
</view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app';
import { ref, onMounted } from 'vue';
import { Service } from '@/Service/Service';
// 加载状态
const isLoading = ref(true);
let userStatus = ref('已下线')
let status = ref('nomore')
onLoad(() => {
setTimeout(() => {
isLoading.value = false
}, 1500)
})
// 切换接单状态
const toggleAcceptOrders = () => {
userStatus.value = userStatus.value === '已上线' ? '已下线' : '已上线';
};
</script>
<style scoped lang="scss">
.rider-home-skeleton {
background-color: #f5f5f5;
min-height: 100vh;
}
/* 骨架屏通用样式 */
.skeleton-user-info,
.skeleton-stats-section,
.skeleton-action-section,
.skeleton-high-price-orders,
.skeleton-order-item,
.skeleton-order-header,
.skeleton-order-content,
.skeleton-pickup-time {
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 用户信息区域骨架 */
.skeleton-user-info {
background-color: #E6F7FF;
padding: 40rpx 30rpx;
}
.skeleton-user-header {
display: flex;
align-items: center;
}
.skeleton-avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
background-color: #d0d0d0;
border: 1px solid #fff;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-user-details {
margin-left: 20rpx;
flex: 1;
}
.skeleton-user-name {
width: 200rpx;
height: 36rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
margin-bottom: 8rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-user-id {
width: 250rpx;
height: 28rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-setting-icon {
width: 32rpx;
height: 32rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 统计数据区域骨架 */
.skeleton-stats-section {
background-color: #ffffff;
margin: 20rpx;
border-radius: 16rpx;
display: flex;
justify-content: space-around;
padding: 30rpx 0;
}
.skeleton-stat-item {
display: flex;
flex-direction: column;
align-items: center;
}
.skeleton-stat-label {
width: 120rpx;
height: 28rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
margin-bottom: 10rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-stat-value {
width: 150rpx;
height: 36rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 接单按钮骨架 */
.skeleton-action-section {
margin: 0 20rpx;
}
.skeleton-accept-orders-btn {
width: 100%;
height: 90rpx;
background-color: #d0d0d0;
border-radius: 45rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 附近高价单骨架 */
.skeleton-high-price-orders {
margin-top: 20rpx;
padding: 0 20rpx;
}
.skeleton-section-title {
width: 200rpx;
height: 32rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
margin-bottom: 20rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-order-item {
background-color: #ffffff;
border-radius: 16rpx;
padding: 25rpx;
margin-bottom: 20rpx;
position: relative;
}
.skeleton-order-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15rpx;
}
.skeleton-high-price-tag {
width: 100rpx;
height: 32rpx;
background-color: #d0d0d0;
border-radius: 16rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-order-price {
width: 80rpx;
height: 32rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-order-content {
margin-bottom: 12rpx;
display: flex;
align-items: center;
justify-content: space-between;
}
.skeleton-restaurant-name {
width: 200rpx;
height: 30rpx;
background-color: #d0d0d0;
border-radius: 6rpx;
margin-bottom: 12rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-pickup-time {
display: flex;
align-items: center;
margin-bottom: 12rpx;
}
.skeleton-clock-icon {
width: 24rpx;
height: 24rpx;
background-color: #d0d0d0;
border-radius: 4rpx;
margin-right: 8rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-pickup-time-text {
width: 200rpx;
height: 26rpx;
background-color: #d0d0d0;
border-radius: 4rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-distance {
width: 150rpx;
height: 26rpx;
background-color: #d0d0d0;
border-radius: 4rpx;
margin-bottom: 12rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-address {
width: 400rpx;
height: 26rpx;
background-color: #d0d0d0;
border-radius: 4rpx;
margin-bottom: 20rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-grab-order-btn {
width: 160rpx;
height: 60rpx;
background-color: #d0d0d0;
border-radius: 30rpx;
position: absolute;
bottom: 25rpx;
right: 25rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 加载更多骨架 */
.skeleton-loadmore {
margin: 0 250rpx;
height: 40rpx;
background-color: #d0d0d0;
margin-bottom: 20rpx;
opacity: 0.6;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 骨架屏加载动画 */
@keyframes skeleton-loading {
0% {
opacity: 1;
}
50% {
opacity: 0.5;
}
100% {
opacity: 1;
}
}
/* 设置延迟,让骨架屏各部分加载动画错开 */
.skeleton-user-info {
animation-delay: 0s;
}
.skeleton-stats-section {
animation-delay: 0.1s;
}
.skeleton-action-section {
animation-delay: 0.2s;
}
.skeleton-high-price-orders {
animation-delay: 0.3s;
}
.skeleton-order-item:nth-child(2) {
animation-delay: 0.4s;
}
.skeleton-order-item:nth-child(3) {
animation-delay: 0.5s;
}
.skeleton-order-item:nth-child(4) {
animation-delay: 0.6s;
}
// 骨架屏end
.rider-home {
background-color: #f5f5f5;
}
/* 用户信息区域 */
.user-info {
background-color: #E6F7FF;
padding: 30rpx;
}
.user-header {
display: flex;
align-items: center;
}
.avatar {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
border: 1px solid #fff;
}
.user-details {
margin-left: 20rpx;
flex: 1;
}
.user-name {
font-size: 36rpx;
font-weight: 600;
color: #333333;
display: block;
margin-bottom: 8rpx;
}
.user-id {
font-size: 28rpx;
color: #666666;
}
/* 统计数据区域 */
.stats-section {
background-color: #ffffff;
margin: 20rpx;
border-radius: 16rpx;
display: flex;
justify-content: space-around;
padding: 30rpx 0;
}
.stat-item {
display: flex;
flex-direction: column;
align-items: center;
}
.stat-label {
font-size: 28rpx;
color: #666666;
margin-bottom: 10rpx;
}
.stat-value {
font-size: 36rpx;
font-weight: 600;
}
.income {
color: var(--nav-diluted);
}
.completed {
color: var(--nav-vice);
}
.ongoing {
color: #FF9500;
}
/* 接单按钮 */
.action-section {
margin: 0 20rpx;
}
.accept-orders-btn {
width: 100%;
height: 90rpx;
font-size: 32rpx;
background-color: #52C41A;
}
/* 附近高价单 */
.high-price-orders {
margin-top: 20rpx;
padding: 0 20rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #333333;
margin-bottom: 20rpx;
}
.order-item {
background-color: #ffffff;
border-radius: 16rpx;
padding: 25rpx;
margin-bottom: 20rpx;
position: relative;
}
.order-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 15rpx;
}
.high-price-tag {
background-color: #FFF1F0;
color: #FF4D4F;
font-size: 24rpx;
padding: 4rpx 16rpx;
border-radius: 12rpx;
}
.order-price {
font-size: 32rpx;
font-weight: 600;
color: #FF4D4F;
}
.restaurant-name {
font-size: 30rpx;
color: #333333;
display: block;
margin-bottom: 12rpx;
}
.pickup-time {
display: flex;
align-items: center;
margin-bottom: 12rpx;
}
.pickup-time-text {
font-size: 26rpx;
color: #666666;
margin-left: 8rpx;
}
.distance {
font-size: 26rpx;
color: #999999;
display: block;
margin-bottom: 12rpx;
}
.address {
font-size: 26rpx;
color: #666666;
display: block;
margin-bottom: 20rpx;
line-height: 1.4;
}
.grab-order-btn {
width: 160rpx;
height: 60rpx;
font-size: 26rpx;
position: absolute;
bottom: 25rpx;
right: 25rpx;
}
/* uview组件样式覆盖 */
::v-deep .u-button--primary {
background-color: var(--nav-vice);
border-color: var(--nav-vice);
}
::v-deep .u-button--mini {
background-color: var(--nav-mian);
border-color: var(--nav-mian);
}
</style>

View File

@@ -0,0 +1,10 @@
export class ResultData {
public code: number=-1;
public msg: string="";
public data: any;
constructor(code:number,msg:string,data:any) {
this.code=code;
this.msg = msg;
this.data = data;
}
}

View File

@@ -0,0 +1,10 @@
export class BaseConfig {
protected static servesUrl: string = "http://192.168.0.142:5085";//线下
protected static imgUrl: string = "http://192.168.0.142:5085";
// protected static servesUrl: string = "https://cnapi.hnzchl.cn";
// protected static imgUrl: string = "https://cnapi.hnzchl.cn";
protected static mediaUrl: string = "http://byc1.xypays.cn/";
protected static uploadUrl: string = "/TencentCos/GetUpLoadInfo";
// protected static payuploadUrl: string = "http://192.168.0.142:5085";
protected static payuploadUrl: string = "https://cnapi.hnzchl.cn";
}

View File

@@ -0,0 +1,685 @@
<template>
<!-- 骨架屏 -->
<view v-if="loading" class="skeleton-container">
<!-- 骨架屏订单状态 -->
<view class="skeleton-status"></view>
<!-- 骨架屏订单基本信息 -->
<view class="skeleton-basic-info">
<view class="skeleton-row">
<view class="skeleton-info-half"></view>
<view class="skeleton-info-half skeleton-right"></view>
</view>
<view class="skeleton-line"></view>
<view class="skeleton-line"></view>
<view class="skeleton-line"></view>
<view class="skeleton-row">
<view class="skeleton-info-third"></view>
<view class="skeleton-info-btn"></view>
</view>
</view>
<!-- 骨架屏物品清单 -->
<view class="skeleton-basic-info">
<view class="skeleton-row">
<view class="" style="width: 45%;height: 40rpx;border-radius: 4rpx;animation: shimmer 1.5s infinite;">
<view class="" style="background-color: #e6e6e6; width: 60%;height: 40rpx; ">
</view>
</view>
<view class="skeleton-info-half skeleton-right"></view>
<view class="skeleton-info-half skeleton-right"></view>
</view>
<view class="skeleton-row" v-for="(item,index) in 3" :key="index">
<view class="" style="width: 45%;height: 40rpx;border-radius: 4rpx;animation: shimmer 1.5s infinite;">
<view class="" style="background-color: #e6e6e6; width: 90%;height: 40rpx; ">
</view>
</view>
<view class="skeleton-info-half skeleton-right"></view>
<view class="skeleton-info-half skeleton-right"></view>
</view>
<view class="skeleton-list-status"></view>
</view>
<!-- 骨架屏地图区域 -->
<view class="skeleton-map"></view>
<!-- 骨架屏取餐地址 -->
<view class="skeleton-address">
<view class="skeleton-title"></view>
<view class="skeleton-store-name"></view>
<view class="skeleton-address-line"></view>
<view class="skeleton-btn"></view>
<view class="skeleton-code"></view>
</view>
<!-- 骨架屏送餐地址 -->
<view class="skeleton-address">
<view class="skeleton-title"></view>
<view class="skeleton-store-name"></view>
<view class="skeleton-address-line"></view>
<view class="skeleton-btn"></view>
<view class="skeleton-remark"></view>
</view>
<!-- 骨架屏底部按钮 -->
<view class="skeleton-bottom">
<view class="skeleton-bottom-btn"></view>
</view>
</view>
<!-- 实际内容 -->
<view v-else class="order-detail">
<!-- 订单状态 -->
<view class="order-status"
:style="{ 'background-color':orderStatus==0?'#E6F7FF':(orderStatus==1?'#FFFBE6':'#FFF2F0') }">
<text :style="{ 'color':orderStatus==0?'#1890FF':(orderStatus==1?'#FAAD14':'#FF4D4F') }"
style="font-size: 34rpx; font-weight: 600;">待取餐 · 请尽快到店取餐</text>
</view>
<!-- 订单基本信息 -->
<view class="order-basic-info">
<view class="info-item">
<view class="label" style="font-weight: 700; font-size: 30rpx;">
{{ orderInfo.distribution=='预约订单'?'预计'+orderInfo.makeTime.split(' ')[1]+'送达':orderInfo.makeTime }}
</view>
</view>
<view class="info-item">
<text class="label">订单编号 : </text>
<text class="value">{{ orderId }}</text>
</view>
<view class="info-item" style="justify-content: space-between;">
<view class="label" style="display: flex; align-items: baseline;">
<u-icon name="clock" size="16" class="clock-icon"></u-icon>
{{ Service.formatDate(orderInfo.addTime,1) }} 下单
</view>
<view class="">
<button @click="Service.GoPage('/pages/order/abnormal?orderId='+orderInfo.orderId)" class=""
style="padding: 0rpx 30rpx; height: 60rpx; font-size: 24rpx; border-radius: 40rpx; background-color: red; color: #fff; ">提交异常</button>
</view>
</view>
</view>
<!-- 物品清单 -->
<view class="order-basic-info">
<view class="" style="display: flex; align-items: center; ">
<view class="" style="flex: 1; font-size: 34rpx; font-weight: 600; ">
物品清单
</view>
<view class="" style="width: 100rpx; text-align: right; font-size: 30rpx; ">
数量
</view>
<view class="" style="width: 120rpx; text-align: right; font-size: 30rpx; ">
金额
</view>
</view>
<!-- 商品列表 -->
<view class="" :style="{'height':isShow?'110rpx':'fit-content' }" style="overflow: hidden;">
<view class="" v-for="(goodsItem,goodsIndex) in JSON.parse(orderInfo.detail) " :key="goodsIndex"
style="display: flex; align-items: center; margin-top: 15rpx; ">
<view class="" style="flex: 1; ">
{{goodsItem.goodsName}}
</view>
<view class="" style="width: 100rpx; text-align: right; ">
×{{ goodsItem.count }}
</view>
<view class="" style="width: 120rpx; text-align: right; ">
¥{{ goodsItem.count*goodsItem.price }}
</view>
</view>
</view>
<view class=""
style="display: flex; align-items: center;justify-content: space-between; margin-top: 10rpx; ">
<view class="">
</view>
<view class="info-item">
<text class="label" style="font-weight: 700;">配送费</text>
<text class="value price">¥{{ Number(orderInfo.postage).toFixed(2) }}</text>
</view>
</view>
<view class="" v-if="JSON.parse(orderInfo.detail).length>2" @click="isShow=!isShow"
style=" margin-top: 20rpx; display: flex; align-items: center; justify-content: center; color: #666; ">
<up-icon :name="isShow?'arrow-down':'arrow-up'" color="#666" size="18"></up-icon>
{{isShow?'展开':'收入'}}
</view>
</view>
<!-- 取餐地址 -->
<view class="address-section">
<text class="section-title">取餐地址</text>
<view class="address-content">
<view class="store-name">{{ storeInfo.name }}</view>
<text class="address">{{ storeInfo.city }}{{storeInfo.region }}{{ storeInfo.address }}</text>
<view class="" style="margin-bottom: 20rpx;">
<up-button @click="call(storeInfo.phone)" icon="phone" type="primary" shape="circle"
text="拨打商家"></up-button>
</view>
<view class="pickup-code">
<text class="code-label">取餐号:</text>
<text class="code-value">A123</text>
</view>
</view>
</view>
<!-- 送餐地址 -->
<view class="address-section">
<text class="section-title">送餐地址</text>
<view class="address-content">
<text class="user-name">{{ JSON.parse(orderInfo.address).realName }}</text>
<text class="address">{{ JSON.parse(orderInfo.address).address }}</text>
<view class="" style="margin-bottom: 20rpx;">
<up-button @click="call(JSON.parse(orderInfo.address).phone)" icon="phone" type="primary"
shape="circle" text="拨打用户"></up-button>
</view>
<view v-if="orderInfo.remark" class="remark">
<text class="remark-label">备注:</text>
<text class="remark-content">{{ orderInfo.remark }}</text>
</view>
</view>
</view>
<view class="" style="width: 100vw; height: 140rpx; ">
</view>
<!-- 底部按钮 -->
<view class="bottom-action" style="display: flex; justify-content: space-between;'">
<up-button @click="upGoods()" color="var(--nav-vice)" class="confirm-btn">{{type==1?'我已取货':'订单完成'}}</up-button>
<view class="" style="width: 40rpx;">
</view>
<up-button @click="Service.GoPage('/pages/order/orderChat?orderId='+orderId)" color="#6868ee" class="confirm-btn">联系商家</up-button>
</view>
</view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app';
import { ref, onMounted } from 'vue';
import { Service } from '@/Service/Service';
import { CNRiderOrderService } from '@/Service/CN/CNRiderOrderService'
// 加载状态
const loading = ref(true);
let orderStatus = ref(0)
let isShow = ref(true)
let deliveryTime = ref('')
let orderInfo = ref<any>({})
let storeInfo = ref<any>({})
let storeLocation = ref<any>({})
let type = ref(1)
let orderId = ref('')
onLoad((data : any) => {
orderId.value = data.orderId
type.value = data.type
getData()
})
const getData = () => {
CNRiderOrderService.GetUnitOrderInfo(orderId.value).then(res => {
loading.value = false
if (res.data) {
deliveryTime.value = res.data.deliveryTime
orderInfo.value = res.data.orderInfo
storeInfo.value = res.data.storeInfo
storeLocation.value = res.data.storeLocation
}
})
}
const call = (phone : string) => {
uni.makePhoneCall({
phoneNumber: phone,
fail(e) {
console.log( e);
},
success(e) {
console.log('1111', e);
}
})
}
const upGoods = () => {
CNRiderOrderService.UpdateRiderOrderTake(orderId.value, type.value).then(res => {
if (res.data) {
Service.Msg( type.value==1? '取餐成功!':'订单已完成!')
setTimeout(() => {
Service.GoPageBack()
}, 1000)
} else {
Service.Msg(res.msg)
}
})
}
</script>
<style scoped>
/* 骨架屏样式 */
.skeleton-container {
min-height: 100vh;
background-color: #f5f5f5;
padding-bottom: 140rpx;
}
/* 骨架屏导航栏 */
.skeleton-nav {
height: 88rpx;
position: fixed;
top: 0;
left: 0;
width: 100vw;
background-color: #fff;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20rpx;
z-index: 100;
}
.skeleton-nav-item {
width: 32rpx;
height: 32rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-nav-title {
width: 180rpx;
height: 36rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
/* 骨架屏订单状态 */
.skeleton-status {
height: 100rpx;
background-color: #fff;
padding: 30rpx;
display: flex;
align-items: center;
justify-content: center;
}
.skeleton-status::after {
content: '';
width: 350rpx;
height: 45rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
/* 骨架屏订单基本信息 */
.skeleton-basic-info {
background-color: #fff;
margin: 20rpx 20rpx;
padding: 30rpx;
border-radius: 20rpx;
}
.skeleton-row {
display: flex;
justify-content: space-between;
margin-bottom: 20rpx;
}
.skeleton-info-half {
width: 45%;
height: 40rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-right {
width: 10%;
}
.skeleton-line {
width: 60%;
height: 40rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
margin-bottom: 20rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-info-third {
width: 60%;
height: 40rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-info-btn {
width: 20%;
height: 50rpx;
background-color: #e6e6e6;
border-radius: 25rpx;
animation: shimmer 1.5s infinite;
}
/* 列表状态 */
.skeleton-list-status {
height: 60rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.skeleton-list-status::after {
content: '';
width: 200rpx;
height: 45rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
/* 骨架屏地图区域 */
.skeleton-map {
margin: 20rpx;
height: 400rpx;
background-color: #e6e6e6;
border-radius: 20rpx;
animation: shimmer 1.5s infinite;
position: relative;
overflow: hidden;
}
.skeleton-map::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, transparent 25%, rgba(255, 255, 255, 0.2) 25%, rgba(255, 255, 255, 0.2) 50%, transparent 50%, transparent 75%, rgba(255, 255, 255, 0.2) 75%, rgba(255, 255, 255, 0.2));
background-size: 100rpx 100rpx;
animation: shimmer 1.5s infinite linear;
}
/* 骨架屏地址区域 */
.skeleton-address {
background-color: #fff;
margin: 20rpx;
padding: 30rpx;
border-radius: 20rpx;
}
.skeleton-title {
width: 120rpx;
height: 30rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
margin-bottom: 25rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-store-name {
width: 70%;
height: 50rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
margin-bottom: 15rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-address-line {
width: 90%;
height: 26rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
margin-bottom: 15rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-btn {
height: 70rpx;
background-color: #e6e6e6;
border-radius: 35rpx;
margin: 20rpx 0;
animation: shimmer 1.5s infinite;
}
.skeleton-code {
width: 50%;
height: 26rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
.skeleton-remark {
width: 80%;
height: 26rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: shimmer 1.5s infinite;
}
/* 骨架屏底部按钮 */
.skeleton-bottom {
background-color: #fff;
width: 100vw;
position: fixed;
bottom: 0;
left: 0;
padding: 20rpx 30rpx;
}
.skeleton-bottom-btn {
width: 100%;
height: 90rpx;
background-color: #e6e6e6;
border-radius: 45rpx;
animation: shimmer 1.5s infinite;
}
/* 骨架屏动画 */
@keyframes shimmer {
0% {
opacity: 0.6;
}
50% {
opacity: 0.8;
}
100% {
opacity: 0.6;
}
}
/* 骨架屏滑动动画 */
@keyframes shimmer-slide {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
/* end */
.order-detail {
min-height: 100vh;
background-color: #f5f5f5;
}
/* 订单状态样式 */
.order-status {
background-color: #fff;
padding: 30rpx;
text-align: center;
}
/* 订单基本信息样式 */
.order-basic-info {
background-color: #fff;
margin: 20rpx 20rpx;
padding: 30rpx;
border-radius: 20rpx;
}
.info-item {
display: flex;
align-items: center;
margin-bottom: 20rpx;
font-size: 28rpx;
}
.info-item:last-child {
margin-bottom: 0;
}
.label {
color: #666;
margin-right: 10rpx;
}
.value {
color: #333;
}
.value.highlight {
color: var(--nav-diluted);
font-weight: 500;
}
.value.price {
color: var(--nav-diluted);
font-weight: 700;
}
.clock-icon {
color: #666;
margin-right: 8rpx;
}
/* 地图区域样式 */
.map-section {
margin: 20rpx;
border-radius: 20rpx;
overflow: hidden;
}
.map-placeholder {
width: 100%;
height: 400rpx;
background-color: #f0f0f0;
display: flex;
align-items: center;
justify-content: center;
position: relative;
border: 1rpx solid #e8e8e8;
}
.map-placeholder::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, #f5f5f5 25%, #e6e6e6 25%, #e6e6e6 50%, #f5f5f5 50%, #f5f5f5 75%, #e6e6e6 75%, #e6e6e6 100%);
background-size: 20rpx 20rpx;
opacity: 0.3;
}
.map-hint {
font-size: 28rpx;
color: #666;
position: relative;
z-index: 1;
}
/* 地址区域样式 */
.address-section {
background-color: #fff;
margin: 20rpx;
padding: 30rpx;
border-radius: 20rpx;
}
.section-title {
font-size: 30rpx;
font-weight: 800;
color: #333;
margin-bottom: 25rpx;
}
.address-content {
position: relative;
}
.store-name,
.user-name {
font-size: 34rpx;
font-weight: 600;
margin: 10rpx 0;
display: block;
}
.address {
font-size: 26rpx;
color: #666;
line-height: 1.5;
margin-bottom: 25rpx;
display: block;
}
.pickup-code,
.remark {
font-size: 26rpx;
}
.code-label,
.code-value {
color: var(--nav-mian);
font-weight: 600;
}
.remark-label,
.remark-content {
color: #FAAD14;
font-weight: 600;
}
/* 底部按钮样式 */
.bottom-action {
background-color: #fff;
width: 100vw;
position: fixed;
bottom: 0;
left: 0;
padding: 20rpx 30rpx;
}
.confirm-btn {
width: 100%;
height: 90rpx;
font-size: 32rpx;
line-height: 90rpx;
border-radius: 45rpx;
}
</style>

View File

@@ -0,0 +1,562 @@
<template>
<!-- 导航栏 -->
<view class=""
style="padding:50rpx 20rpx 18rpx;box-sizing: border-box; position: fixed;top: 0; left: 0; width: 100vw; background-color: #fff; display: flex; align-items: center; justify-content: space-between; ">
<view class="" @click="Service.GoPageBack()">
<up-icon name="arrow-left" size="32rpx"></up-icon>
</view>
<view class="">
上报异常
</view>
<image @click="Service.GoPage('/pages/my/myKF')" :src="Service.GetIconImg('/static/index/order/message.png')" style="width: 32rpx; height: 32rpx; "
mode=""></image>
</view>
<view class="" style="width: 100%; height: 108rpx; ">
</view>
<!-- 骨架屏 -->
<view v-if="loading" class="skeleton-container">
<!-- 骨架屏提示信息 -->
<view class="skeleton-warning">
<view class="skeleton-warning-text"></view>
</view>
<!-- 骨架屏问题类型 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-radio-group">
<view class="skeleton-radio-item" v-for="i in 6" :key="i">
<view class="skeleton-radio-circle"></view>
<view class="skeleton-radio-text"></view>
</view>
</view>
</view>
<!-- 骨架屏详细描述 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-textarea"></view>
</view>
<!-- 骨架屏图片上传 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-image-group">
<view class="skeleton-image" v-for="i in 3" :key="i">
<view class="skeleton-image-content"></view>
</view>
</view>
</view>
<!-- 骨架屏说明文字 -->
<view class="skeleton-info"></view>
<view class="" style="width: 100vw; height: 120rpx;"></view>
<!-- 骨架屏底部按钮 -->
<view class="skeleton-submit-section">
<view class="skeleton-submit-btn"></view>
</view>
</view>
<view v-else class="exception-report">
<!-- 提示信息 -->
<view class="warning-tip">
<text class="warning-text">上报异常后,系统将自动暂停配送计时</text>
</view>
<!-- 问题类型选择 -->
<view class="problem-section">
<view class="section-title">请选择问题类型</view>
<view class="radio-group">
<view v-for="(item, index) in problemTypes" :key="index" class="radio-item"
:class="{ active: selectedProblem === index }" @click="selectProblem(index)">
<view class="radio-circle">
<view v-if="selectedProblem === index" class="radio-inner"></view>
</view>
<text class="radio-text">{{ item }}</text>
</view>
</view>
</view>
<!-- 详细描述 -->
<view class="description-section">
<view class="section-title">详细描述问题(选填)</view>
<up-textarea v-model="description" placeholder="请说明具体情况,如用户电话无法接通、地址找不到等..."></up-textarea>
</view>
<!-- 凭证图片上传 -->
<view class="image-section">
<view class="section-title">上传凭证图片最多3张</view>
<view class="image-upload">
<!-- 上传按钮 -->
<view v-if="images.length < 3" class="upload-btn" @click="uploaduserImg()" >
<u-icon name="plus" size="40rpx" color="#999"></u-icon>
</view>
<!-- 已上传图片 -->
<view v-for="(image, index) in message.img" :key="index" class="image-item">
<view class="image-placeholder">
<image :src="Service.GetMateUrlByImg(image)"
style="width: 100%; height: 100%; " mode=""></image>
</view>
<view class="delete-btn" @click="removeImage(index)">
<u-icon name="close-circle" size="36rpx" color="#fff"></u-icon>
</view>
</view>
</view>
</view>
<!-- 说明文字 -->
<view class="info-text">
<up-icon name="clock" color="var(--nav-diluted)" size="22"></up-icon>
<view style="margin-left: 20rpx;">上报后,本单配送时间将暂停计算,不影响您的准时率。</view>
</view>
<view class="" style="width: 100vw; height: 120rpx; ">
</view>
<!-- 提交按钮 -->
<view class="submit-section">
<u-button type="primary" class="submit-btn" @click="submitReport">提交异常上报</u-button>
</view>
</view>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { useRouter } from 'vue-router'
import { Service } from "@/Service/Service"
import { onLoad } from '@dcloudio/uni-app'
let loading = ref(true)
// 问题类型选项
const problemTypes = [
'联系不上用户',
'用户地址错误/不详',
'餐品洒漏/包装破损',
'商家出餐慢/未出餐',
'交通堵塞/临时封路',
'其他问题'
]
let message=ref({
type:'',
des:'',
img:[]
})
// 选中的问题类型
const selectedProblem = ref<number | null>(0) // 默认选中第一个
// 详细描述
const description = ref('')
// 图片数组
const images = ref<Array<{ id : string }>>([])
onLoad(() => {
setTimeout(() => {
loading.value = false
}, 1500)
})
// 选择问题类型
const selectProblem = (index : number) => {
selectedProblem.value = index
}
// 上传图片
const uploaduserImg = () => {
uni.chooseImage({
count: 1, // 最多选择1张图片
sizeType: ['original', 'compressed'], // 支持原图和压缩图
sourceType: ['album', 'camera'], // 可从相册选择或使用相机拍照
success: function (res) {
let path = res.tempFiles[0].path
// Service.uploadH5(path, 'Avatar', data => {
// message.value.img.push({
// img: data
// })
// })
},
fail: function (err) {
console.error('选择失败:', err.errMsg);
}
})
}
// 删除图片
const removeImage = (index : number) => {
}
// 提交上报
const submitReport = () => {
Service.GoPage('/pages/order/upAbnormal')
}
</script>
<style scoped>
/* 骨架屏样式 */
.skeleton-container {
min-height: 100vh;
background-color: #fff;
}
/* 骨架屏导航栏 */
.skeleton-nav-icon {
width: 32rpx;
height: 32rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: pulse 1.5s infinite;
}
.skeleton-nav-title {
width: 180rpx;
height: 36rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
animation: pulse 1.5s infinite;
}
/* 骨架屏提示信息 */
.skeleton-warning {
height: 80rpx;
background-color: #FFF2F0;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
animation: pulse 1.5s infinite;
}
.skeleton-warning-text {
width: 70%;
height: 40rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
}
/* 骨架屏通用区块 */
.skeleton-section {
margin-top: 30rpx;
padding: 30rpx;
background-color: #fff;
}
.skeleton-title {
width: 200rpx;
height: 36rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
margin-bottom: 30rpx;
animation: pulse 1.5s infinite;
}
/* 骨架屏单选组 */
.skeleton-radio-group {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.skeleton-radio-item {
display: flex;
align-items: center;
padding: 20rpx;
border: 2rpx solid #e6e6e6;
border-radius: 10rpx;
animation: pulse 1.5s infinite;
}
.skeleton-radio-circle {
width: 36rpx;
height: 36rpx;
border: 2rpx solid #d9d9d9;
border-radius: 50%;
margin-right: 20rpx;
background-color: #f5f5f5;
}
.skeleton-radio-text {
width: 60%;
height: 32rpx;
background-color: #e6e6e6;
border-radius: 4rpx;
}
/* 骨架屏文本域 */
.skeleton-textarea {
height: 180rpx;
background-color: #e6e6e6;
border-radius: 10rpx;
animation: pulse 1.5s infinite;
}
/* 骨架屏图片上传 */
.skeleton-image-group {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.skeleton-image {
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
overflow: hidden;
animation: pulse 1.5s infinite;
}
.skeleton-image-content {
width: 100%;
height: 100%;
background-color: #e6e6e6;
position: relative;
overflow: hidden;
}
.skeleton-image-content::after {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
animation: shimmer 1.5s infinite;
}
/* 骨架屏说明文字 */
.skeleton-info {
height: 100rpx;
background-color: #FFF2F0;
margin: 30rpx;
border-radius: 10rpx;
animation: pulse 1.5s infinite;
}
/* 骨架屏底部按钮 */
.skeleton-submit-section {
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
padding: 30rpx;
width: 100vw;
}
.skeleton-submit-btn {
width: 100%;
height: 90rpx;
background-color: #e6e6e6;
border-radius: 45rpx;
animation: pulse 1.5s infinite;
}
/* 骨架屏动画 */
@keyframes pulse {
0% {
opacity: 0.6;
}
50% {
opacity: 0.8;
}
100% {
opacity: 0.6;
}
}
@keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
/* end */
.exception-report {
min-height: 100vh;
background-color: #fff;
padding-bottom: 40rpx;
}
/* 提示信息样式 */
.warning-tip {
background-color: #FFF2F0;
padding: 20rpx 30rpx;
border-bottom: 2rpx solid #f0f0f0;
text-align: center;
}
.warning-text {
font-size: 30rpx;
font-weight: 700;
color: var(--nav-diluted);
}
/* 通用区域样式 */
.problem-section,
.description-section,
.image-section {
background-color: #fff;
margin-top: 20rpx;
padding: 30rpx;
}
.section-title {
font-size: 32rpx;
font-weight: 600;
color: #333;
margin-bottom: 30rpx;
}
/* 问题类型选择样式 */
.radio-group {
display: flex;
flex-direction: column;
gap: 20rpx;
}
.radio-item {
display: flex;
align-items: center;
padding: 20rpx;
border: 2rpx solid #e6e6e6;
border-radius: 10rpx;
cursor: pointer;
transition: all 0.3s;
}
.radio-item.active {
border-color: #ff4d4f;
}
.radio-circle {
width: 36rpx;
height: 36rpx;
border: 2rpx solid #d9d9d9;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
margin-right: 20rpx;
}
.radio-item.active .radio-circle {
border-color: #ff4d4f;
}
.radio-inner {
width: 20rpx;
height: 20rpx;
background-color: #ff4d4f;
border-radius: 50%;
}
.radio-text {
font-size: 30rpx;
color: #333;
}
/* 详细描述样式 */
.description-input {
border: 2rpx solid #e6e6e6;
border-radius: 10rpx;
padding: 20rpx;
font-size: 28rpx;
color: #333;
background-color: #fff;
min-height: 160rpx;
}
/* 图片上传样式 */
.image-upload {
display: flex;
flex-wrap: wrap;
gap: 20rpx;
}
.upload-btn {
width: 200rpx;
height: 200rpx;
border: 2rpx dashed #e2e2e2;
border-radius: 10rpx;
display: flex;
align-items: center;
justify-content: center;
background-color: #fafafa;
cursor: pointer;
}
.image-item {
position: relative;
width: 200rpx;
height: 200rpx;
border-radius: 10rpx;
overflow: hidden;
}
.image-placeholder {
width: 100%;
height: 100%;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
font-size: 24rpx;
color: #666;
}
.delete-btn {
position: absolute;
top: 12rpx;
right: 12rpx;
border-radius: 50%;
width: 36rpx;
height: 36rpx;
}
/* 说明文字样式 */
.info-text {
display: flex;
margin: 30rpx;
padding: 20rpx;
background-color: #FFF2F0;
border-radius: 10rpx;
font-size: 26rpx;
color: var(--nav-diluted);
line-height: 1.5;
}
/* 提交按钮样式 */
.submit-section {
position: fixed;
bottom: 0;
left: 0;
background-color: #fff;
padding: 30rpx;
width: 100vw;
}
.submit-btn {
width: 100%;
height: 90rpx;
font-size: 32rpx;
border-radius: 45rpx;
background-color: var(--nav-diluted);
border: none;
}
</style>