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

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

View File

@@ -0,0 +1,332 @@
<template>
<view class="review-management-page">
<!-- 全新方案:纯 CSS 手动构建的骨架屏 -->
<view v-if="loading" class="skeleton-wrapper">
<view class="skeleton-card" style="height: 150rpx;"></view>
<view class="skeleton-tabs">
<view class="skeleton-item skeleton-text" style="width: 100%; height: 44rpx;"></view>
</view>
<view v-for="i in 3" :key="i" class="skeleton-card">
<view class="skeleton-item skeleton-text" style="width: 100%; height: 300rpx;"></view>
</view>
</view>
<!-- 页面实际内容 -->
<view v-else class="page-content" :class="{'height-pre':showReview}">
<!-- 1. 数据看板 -->
<view class="summary-card">
<view class="data-item">
<view class="value"><text class="score">{{ satisfaction }}</text><up-icon name="star-fill"
color="#ff9900" size="20"></up-icon></view>
<text class="label">满意度</text>
</view>
<view class="data-item">
<text class="value">{{total}}</text>
<text class="label">总评价数</text>
</view>
</view>
<!-- 2. Tabs 切换 -->
<view class="sticky-tabs-wrapper">
<up-tabs :list="reviewTabs" :current="currentTab" @change="onTabChange" lineColor="#fa6400"
:activeStyle="{ color: '#fa6400', fontWeight: 'bold' }" :inactiveStyle="{ color: '#666' }">
</up-tabs>
</view>
<view class="review-list">
<view class="review-card" v-for="review in reviewList" :key="review">
<view class="reviewer-info">
<text class="name" style="font-weight: bold;" >{{ review.nick }}</text>
<up-rate v-model="review.source" readonly activeColor="#ff9900" size="16"></up-rate>
<text class="time">{{ Service.formatDate(review.addTime,1) }}</text>
</view>
<text class="review-text">{{ review.sign }}</text>
</view>
<up-loadmore status="nomore" nomoreText="没有更多评价了"></up-loadmore>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { ref, reactive } from 'vue';
import { onLoad, onShow } from '@dcloudio/uni-app';
import { Service } from "@/Service/Service";
import { CNRiderDataService } from '@/Service/CN/CNRiderDataService'
const loading = ref<boolean>(true);
const currentTab = ref<number>(0);
let satisfaction = ref(0)
let status = ref('nomore')
let page = ref(1)
let showReview = ref(false)
let review = ref('')
let storeInfo = ref<any>()
let total = ref(0)
const reviewTabs = ref([
{ name: '全部' }, { name: '好评' }, { name: '差评' }
]);
const reviewList = ref<Array<any>>([]);
let currentId = ref('')
onLoad(() => {
getData()
});
onShow(() => { });
// 获取数据
const getData = () => {
status.value = 'loadmore'
page.value = 1
reviewList.value = []
getList()
}
const getList = () => {
if (status.value == 'loading' || status.value == 'nomore') {
return
}
status.value = 'loading'
CNRiderDataService.GetRiderEvaluate(currentTab.value, page.value).then(res => {
loading.value = false
if (res.data) {
satisfaction.value = res.data.satisfaction
total.value=res.data.total.value
reviewList.value = [...reviewList.value, ...res.data.evaluateList]
page.value++
status.value = res.data.evaluateList == 10 ? 'loadmore' : 'nomore'
}
})
}
const onTabChange = (e : { index : number }) => {
currentTab.value = e.index;
getData()
};
const replyTo = () => {
if (review.value == '') {
return
}
};
</script>
<style lang="scss" scoped>
.height-pre {
height: 100vh;
overflow: hidden;
}
@keyframes skeleton-blink {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
.skeleton-item {
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
background-size: 200% 100%;
animation: skeleton-blink 1.5s infinite linear;
}
.skeleton-rect {
border-radius: 12rpx;
}
.skeleton-text {
border-radius: 4rpx;
}
.skeleton-wrapper {
padding: 24rpx;
background-color: #f7f7f7;
.skeleton-tabs {
padding: 20rpx 0;
background-color: #fff;
}
.skeleton-card {
background-color: #fff;
padding: 30rpx;
border-radius: 16rpx;
margin-bottom: 24rpx;
}
}
.review-management-page {
background-color: #f7f7f7;
min-height: 100vh;
}
.summary-card {
display: flex;
justify-content: space-around;
text-align: center;
background-color: #fff8f5;
border-radius: 16rpx;
padding: 30rpx;
margin: 24rpx;
.data-item {
.value {
font-size: 40rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: center;
gap: 4rpx;
}
.label {
font-size: 24rpx;
color: #999;
margin-top: 8rpx;
display: block;
}
.text-red {
color: #fa5151;
}
}
}
.sticky-tabs-wrapper {
position: sticky;
top: 0;
z-index: 10;
background-color: #fff;
:deep(.up-tabs__wrapper__nav__item) {
flex: 1;
}
:deep(.up-tabs__wrapper__nav) {
position: relative;
.unread-badge {
position: absolute;
top: 16rpx;
right: 20rpx;
background-color: #fa5151;
color: #fff;
font-size: 20rpx;
min-width: 32rpx;
height: 32rpx;
line-height: 32rpx;
border-radius: 16rpx;
text-align: center;
padding: 0 8rpx;
}
}
}
.review-list {
padding: 24rpx;
.review-card {
background-color: #fff;
border-radius: 16rpx;
padding: 30rpx;
margin-bottom: 24rpx;
&.bad-review {
border: 1rpx solid #fef0f0;
}
.reviewer-info {
display: flex;
align-items: center;
gap: 16rpx;
.name {
font-size: 30rpx;
font-weight: 500;
}
.time {
font-size: 24rpx;
color: #999;
margin-left: auto;
}
}
.review-text {
font-size: 28rpx;
color: #333;
margin: 20rpx 0;
display: block;
line-height: 1.6;
}
.review-images {
display: flex;
gap: 16rpx;
.image-placeholder {
width: 160rpx;
height: 160rpx;
overflow: hidden;
border-radius: 8rpx;
}
}
.merchant-reply {
display: flex;
align-items: center;
gap: 12rpx;
background-color: #f5f5f5;
border-radius: 12rpx;
padding: 20rpx;
margin-top: 20rpx;
font-size: 26rpx;
.reply-label {
color: #fa6400;
font-weight: 500;
}
.reply-text {
color: #666;
}
}
.reply-action {
text-align: right;
margin-top: 20rpx;
text {
display: inline-block;
border: 1rpx solid #fa6400;
color: #fa6400;
font-size: 26rpx;
padding: 8rpx 24rpx;
border-radius: 30rpx;
}
}
}
}
</style>

View File

@@ -0,0 +1,423 @@
<template>
<!-- 骨架屏 -->
<view v-if="loading" class="order-detail skeleton-loading">
<!-- 订单基本信息骨架屏 -->
<view class="order-basic-info skeleton-section">
<view class="" style="display: flex; justify-content: space-between;align-items: center; " >
<view class="skeleton-block skeleton-short"></view>
<view class="skeleton-block skeleton-short"></view>
</view>
<view class="skeleton-block skeleton-long"></view>
<view class="" style="display: flex; align-items: center; justify-content: space-between;" >
<view class="skeleton-block skeleton-medium"></view>
<view class="skeleton-block skeleton-medium"></view>
</view>
<view class="skeleton-block skeleton-medium"></view>
<view class="skeleton-block skeleton-long"></view>
</view>
<!-- 物品清单骨架屏 -->
<view class="order-basic-info skeleton-section">
<view v-for="item in 4" class="skeleton-block" style="width: 100%; height: 40rpx; " ></view>
<view class="" style="display: flex; justify-content: center;" >
<view class="skeleton-block skeleton-short"></view>
</view>
</view>
<!-- 地图区域骨架屏 -->
<view class="map-section skeleton-section">
<view class="map-placeholder skeleton-map"></view>
</view>
<!-- 地址区域骨架屏 -->
<view class="address-section skeleton-section">
<view class="skeleton-block skeleton-medium"></view>
<view class="skeleton-block skeleton-long"></view>
<view class="skeleton-block skeleton-long"></view>
<view class="skeleton-block skeleton-medium"></view>
<view class="skeleton-block skeleton-long"></view>
<view class="skeleton-block skeleton-long"></view>
<view class="skeleton-block skeleton-long"></view>
</view>
<view class="bottom-padding"></view>
<!-- 底部按钮骨架屏 -->
<view class="bottom-action">
<view class="skeleton-button"></view>
</view>
</view>
<!-- 实际内容 -->
<view v-else class="order-detail">
<!-- 订单基本信息 -->
<view class="order-basic-info">
<view class="" style="display: flex; align-items: baseline; justify-content: space-between;">
<view class="info-item">
<view class="label" style="font-weight: 700; font-size: 30rpx;">30分钟内送达</view>
</view>
<view class="info-item">
<text class="label" style="font-weight: 700;">配送费</text>
<text class="value price">¥5.50</text>
</view>
</view>
<view class="info-item">
<text class="label">订单编号 : </text>
<text class="value">20251021123456</text>
</view>
<view class="info-item" style=" justify-content: space-between;">
<view class="">
<text class="label">物品明细 : </text>
<text class="value">食物</text>
</view>
<view class="label">共3件商品</view>
</view>
<view class="info-item">
<text class="label">物品重量 : </text>
<text class="value">0.5kg</text>
</view>
<view class="info-item">
<view class="label" style="display: flex; align-items: baseline;">
<u-icon name="clock" size="24rpx" class="clock-icon"></u-icon>
2025-10-17 18:30下单
</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; ">
5件
</view>
<view class="" style="width: 120rpx; text-align: right; font-size: 30rpx; ">
¥16
</view>
</view>
<!-- 商品列表 -->
<view class="" :style="{'height':isShow?'190rpx':'fit-content' }" style="overflow: hidden;">
<view class="" v-for="(goodsItem,goodsIndex) in 5 " :key="goodsIndex"
style="display: flex; align-items: center; margin-top: 15rpx; ">
<view class="" style="flex: 1; ">
康师傅 大食桶红烧牛肉143g/桶 经典红烧酱香免洗桶装速食泡面
</view>
<view class="" style="width: 100rpx; text-align: right; ">
×4
</view>
<view class="" style="width: 120rpx; text-align: right; ">
¥16
</view>
</view>
</view>
<view class="" @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="map-section">
<view class="map-placeholder">
<text @click="Service.GoPage('/pages/order/navigation')" class="map-hint">点击查看完整导航</text>
</view>
</view>
<!-- 取餐地址 -->
<view class="address-section">
<view class="" style=" border-bottom: 4rpx solid #e2e2e2; ">
<text class="section-title">取餐地址 : </text>
<view class="address-content">
<text class="store-name">张亮麻辣烫(五道口店)</text>
<text class="address">北京市海淀区成府路28号</text>
</view>
</view>
<view style="margin-top: 20rpx; font-size: 30rpx;font-weight: 800;color: #333;">送餐地址 : </view>
<view class="address-content">
<text class="user-name">张*</text>
<text class="address">XX小区3栋502室</text>
<view class="remark">
<text class="remark-label">备注:</text>
<text class="remark-content">请放门口,勿按门铃</text>
</view>
</view>
</view>
<view class="" style="width: 100vw; height: 140rpx; ">
</view>
<!-- 底部按钮 -->
<view class="bottom-action">
<up-button color="var(--nav-mian)" 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';
// 加载状态
const loading = ref(true);
let orderStatus = ref(0)
let isShow = ref(true)
onLoad(() => {
setTimeout(() => {
loading.value = false
}, 1000)
})
</script>
<style scoped>
.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-bottom: 15rpx;
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;
}
/* 骨架屏样式 */
.skeleton-loading .skeleton-section {
margin: 20rpx 20rpx;
padding: 30rpx;
border-radius: 20rpx;
background-color: #fff;
}
.skeleton-block {
background-color: #f0f0f0;
margin-bottom: 20rpx;
border-radius: 4rpx;
position: relative;
overflow: hidden;
}
.skeleton-short {
height: 40rpx;
width: 30%;
}
.skeleton-medium {
height: 30rpx;
width: 30%;
}
.skeleton-long {
height: 30rpx;
width: 90%;
}
.skeleton-map {
height: 400rpx;
background-color: #f0f0f0;
border-radius: 20rpx;
margin: 0;
}
.skeleton-button {
height: 90rpx;
background-color: #f0f0f0;
border-radius: 45rpx;
}
.bottom-padding {
height: 140rpx;
}
/* 骨架屏动画 */
.skeleton-block::after,
.skeleton-map::after,
.skeleton-button::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
</style>

View File

@@ -0,0 +1,494 @@
<template>
<!-- 骨架屏 -->
<view v-if="loading" class="task-list-container skeleton-loading">
<!-- 顶部标签栏 -->
<view class="tab-bar">
<view v-for="(tab, index) in tabs" :key="index" class="tab-item">
<view class="skeleton-tab-text"></view>
</view>
</view>
<view class="" style="width: 100vw; height: 120rpx"> </view>
<!-- 骨架屏订单列表 -->
<view class="order-list">
<!-- 骨架屏任务卡片 1 -->
<view v-for="item in 3" class="task-section skeleton-card">
<view class="" style="display: flex; align-items: center; justify-content: space-between;" >
<view class="skeleton-tag"></view>
<view class="skeleton-time-group">
<view class="icon-placeholder"></view>
<view class="skeleton-time-text"></view>
</view>
</view>
<view class="skeleton-merchant-info">
<view class="skeleton-merchant-name"></view>
<view class="skeleton-distance"></view>
</view>
<view class="skeleton-address-info">
<view class="icon-placeholder"></view>
<view class="skeleton-address-text"></view>
</view>
<view class="skeleton-price-time-row">
<view class="skeleton-price"></view>
<view class="skeleton-time-group">
<view class="icon-placeholder"></view>
<view class="skeleton-time-text"></view>
</view>
</view>
<view class="skeleton-button"></view>
</view>
</view>
<view class="" style="width: 100vw; display: flex; justify-content: center; margin-top: 20rpx; " >
<view class="" style="width: 200rpx; height: 40rpx; background-color: #fff; border-radius: 4rpx; " >
</view>
</view>
</view>
<view v-else class="task-list-container">
<!-- 顶部标签栏 -->
<view class="tab-bar">
<view v-for="(tab, index) in tabs" :key="index" class="tab-item" :class="{ active: activeTab === index }"
@click="switchTab(index)">
<text class="tab-text">{{ tab }}</text>
<view v-if="activeTab === index" class="active-line"></view>
</view>
</view>
<view class="" style="width: 100vw; height: 120rpx; ">
</view>
<!-- 订单列表 -->
<view class="order-list">
<view @click="gopage()" v-for="(orderItem,orderIndex) in 3 " :key="orderIndex" class="task-section">
<!-- 高价单标签 -->
<view class="" style="display: flex; align-items: center; justify-content: space-between;">
<view v-if="activeTab==0" class="high-price-tag" style="border-radius: 8rpx;" >
<image :src="Service.GetIconImg('/static/index/task/fire.png')" style="width: 24rpx; height: 24rpx;" mode=""></image>
<text class="high-price-text" style="margin-left: 4rpx;" >高价单</text>
</view>
<view v-else class="high-price-tag" :style="{'border':activeTab==1?'1rpx solid #52C41A':'1rpx solid #FAAD14','color':activeTab==1?'#52C41A':'#FAAD14' }" style="background-color: #fff;" >
<text class="high-price-text">{{activeTab==1?'待取单':'配送中'}}</text>
</view>
<view class="" v-if="activeTab!==0" style="display: flex; align-items: baseline;">
<up-icon name="phone" color="var(--nav-mian)" size="20"></up-icon>
<text style="margin-left: 10rpx; color: var(--nav-mian); ">拨打商家</text>
</view>
</view>
<!-- 商家信息 -->
<view class="merchant-info">
<text class="merchant-name">老北京炸酱面</text>
<text class="distance">500m</text>
</view>
<!-- 地址信息 -->
<view class="address-info">
<up-icon name="map" color="#999" size="24rpx" />
<text class="address-text">北京市朝阳区三里屯SOHO</text>
<text v-if="activeTab!==0" class="address-text">共3件商品</text>
</view>
<!-- 商品次数-->
<view v-if="activeTab==1" class="address-info">
<text class="address-text">共3件商品</text>
</view>
<!-- 价格和取餐时间 -->
<view class="price-time-row">
<view v-if="activeTab==0" class="">
<text class="price">¥5.50</text>
<text style="color: var(--nav-mian); font-weight: 600; margin-left: 10rpx; ">/单</text>
</view>
<view v-if="activeTab==1" class="">
<text style="font-size: 30rpx; font-weight: 600; color: #1890FF; ">取件码: </text>
<text style="color: var(--nav-mian); font-weight: 600; margin-left: 10rpx; ">A121</text>
</view>
<view v-if="activeTab==2" class="">
<text class="address-text">据您1.2km</text>
</view>
<view class="pickup-time">
<up-icon name="clock" color="#FF9500" size="24rpx" />
<text class="time-text" :style="{'color':activeTab==0?'#FAAD14':'#FF0000'}" >{{activeTab==0?'12:30 前取餐':'12:30 前送达'}}</text>
</view>
</view>
<!-- 立即抢单按钮 -->
<up-button type="primary" @click="buttonClick()" :color="activeTab==0?'#1890FF':(activeTab==1?'#52C41A':'#52C41A')" size="large" class="grab-btn">{{ activeTab==0?'立即抢单':(activeTab==1?'我已取餐':'确认送达') }}</up-button>
</view>
<!-- 没有更多任务提示 -->
<up-loadmore :status="status" />
<view class="" style="width: 100vw; height: 60rpx; " ></view>
</view>
</view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app'
import { ref } from 'vue'
import { Service } from '@/Service/Service'
let loading = ref(true)
// 标签数据
const tabs = ['新任务', '待取货', '配送中']
const activeTab = ref(0)
let status = ref('nomore')
onLoad(() => {
setTimeout(() => {
loading.value = false
}, 1000)
})
// 页面跳转
const gopage = () => {
if (activeTab.value == 0) {
Service.GoPage('/pages/order/grabOrder')
} else {
Service.GoPage('/pages/order/orderDetail')
}
}
const buttonClick=()=>{
if(activeTab.value==2){
Service.GoPage('/pages/order/finish')
}
}
// 切换标签
const switchTab = (index : number) => {
activeTab.value = index
}
</script>
<style scoped>
page {
background-color: #F5F5F5;
}
/* 顶部标签栏 */
.tab-bar {
display: flex;
background-color: #FFFFFF;
padding: 20rpx 0 0;
border-bottom: 1rpx solid #E5E5E5;
position: fixed;
top: 0;
left: 0;
width: 100vw;
background-color: #fff;
}
.tab-item {
flex: 1;
display: flex;
flex-direction: column;
align-items: center;
padding: 20rpx 0;
position: relative;
}
.tab-text {
font-size: 28rpx;
color: #666666;
}
.tab-item.active .tab-text {
color: var(--nav-mian);
font-weight: 600;
}
.active-line {
position: absolute;
bottom: 0;
width: 110rpx;
height: 6rpx;
background-color: var(--nav-mian);
border-radius: 3rpx;
}
/* 订单列表 */
.order-list {
padding: 0rpx 30rpx;
}
.task-section {
margin-top: 20rpx;
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx;
}
/* 标签样式 */
.high-price-tag {
width: fit-content;
background-color: #FF7875;
color: #FFFFFF;
padding: 5rpx 20rpx;
border-radius: 20rpx;
font-size: 24rpx;
display: flex;
align-items: center;
}
.status-tag {
position: absolute;
top: 20rpx;
left: 20rpx;
padding: 5rpx 20rpx;
border-radius: 20rpx;
font-size: 24rpx;
z-index: 10;
}
.status-tag.pending {
background-color: #4CD964;
color: #FFFFFF;
}
.status-tag.delivering {
background-color: #FF9500;
color: #FFFFFF;
}
/* 右侧操作按钮 */
.right-action {
position: absolute;
top: 20rpx;
right: 20rpx;
}
.call-btn {
padding: 5rpx 15rpx;
font-size: 24rpx;
line-height: 36rpx;
}
/* 信息展示 */
.merchant-info {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.merchant-name {
font-size: 34rpx;
font-weight: 600;
color: #333333;
}
.distance {
font-size: 28rpx;
color: #666666;
}
.address-info {
display: flex;
align-items: baseline;
margin-top: 15rpx;
}
.address-text {
margin-left: 10rpx;
font-size: 28rpx;
color: #666666;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* 价格和时间 */
.price-time-row {
margin-top: 20rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.price {
font-size: 36rpx;
font-weight: 600;
color: #FF3B30;
}
.pickup-code {
font-size: 28rpx;
color: #333333;
font-weight: 500;
}
.pickup-time {
display: flex;
align-items: center;
}
.time-text {
margin-left: 8rpx;
font-size: 26rpx;
}
/* 按钮样式 */
.grab-btn {
margin-top: 25rpx;
height: 80rpx;
line-height: 80rpx;
border-radius: 40rpx;
}
.grab-btn {
background-color: #007AFF;
}
/* 没有更多任务 */
.no-more-tasks {
margin-top: 40rpx;
text-align: center;
padding: 20rpx 0;
}
.no-more-text {
font-size: 28rpx;
color: #999999;
}
/* 骨架屏样式 */
.skeleton-loading .skeleton-card {
background-color: #fff;
border-radius: 20rpx;
padding: 20rpx;
position: relative;
overflow: hidden;
}
.skeleton-tab-text {
width: 80rpx;
height: 30rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-tag {
width: 100rpx;
height: 30rpx;
background-color: #f0f0f0;
border-radius: 15rpx;
margin-bottom: 20rpx;
}
.skeleton-merchant-info {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 15rpx;
}
.skeleton-merchant-name {
width: 200rpx;
height: 34rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-distance {
width: 60rpx;
height: 28rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-address-info {
display: flex;
align-items: center;
margin-bottom: 20rpx;
}
.icon-placeholder {
width: 24rpx;
height: 24rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
margin-right: 10rpx;
}
.skeleton-address-text {
width: 400rpx;
height: 28rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-price-time-row {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 25rpx;
}
.skeleton-price {
width: 80rpx;
height: 36rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-time-group {
display: flex;
align-items: center;
}
.skeleton-time-text {
width: 150rpx;
height: 26rpx;
background-color: #f0f0f0;
border-radius: 4rpx;
}
.skeleton-button {
width: 100%;
height: 80rpx;
background-color: #f0f0f0;
border-radius: 40rpx;
}
/* 骨架屏动画 */
.skeleton-card .skeleton-tag::after,
.skeleton-card .skeleton-merchant-name::after,
.skeleton-card .skeleton-distance::after,
.skeleton-card .skeleton-address-text::after,
.skeleton-card .icon-placeholder::after,
.skeleton-card .skeleton-price::after,
.skeleton-card .skeleton-time-text::after,
.skeleton-card .skeleton-button::after,
.skeleton-loading .skeleton-tab-text::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
0% {
transform: translateX(-100%);
}
100% {
transform: translateX(100%);
}
}
</style>

View File

@@ -0,0 +1,476 @@
<template>
<view class="skeleton-container" v-if="isLoading">
<!-- 顶部提示栏骨架 -->
<view class="skeleton-top-tip"></view>
<!-- 身份信息区域骨架 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-form-item">
<view class="skeleton-label"></view>
<view class="skeleton-input"></view>
</view>
<view class="skeleton-form-item">
<view class="skeleton-label"></view>
<view class="skeleton-input"></view>
</view>
</view>
<!-- 身份证照片区域骨架 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-upload-item"></view>
<view class="skeleton-upload-item"></view>
</view>
<!-- 人脸识别区域骨架 -->
<view class="skeleton-section">
<view class="skeleton-title"></view>
<view class="skeleton-face-area">
<view class="skeleton-face-icon"></view>
<view class="skeleton-face-text"></view>
</view>
</view>
<!-- 协议勾选骨架 -->
<view class="skeleton-agreement"></view>
<!-- 提交按钮骨架 -->
<view class="skeleton-submit"></view>
</view>
<view v-else class="real-name-auth-container">
<!-- 顶部提示栏 -->
<view class="top-tip">
<text class="tip-text">请完成实名认证,保障您的接单权益</text>
</view>
<!-- 表单内容 -->
<view class="form-content">
<!-- 身份信息区域 -->
<view class="section">
<view class="section-title">身份信息</view>
<!-- 姓名输入 -->
<view class="form-item">
<view class="label">姓名</view>
<u-input v-model="formData.name" placeholder="请输入身份证姓名" placeholder-color="#999" border="none"
class="input" input-align="right" />
</view>
<!-- 身份证号输入 -->
<view class="form-item">
<view class="label">身份证号</view>
<u-input v-model="formData.idCard" placeholder="请输入18位身份证号" placeholder-color="#999" border="none"
class="input" input-align="right" maxlength="18" />
</view>
</view>
<!-- 身份证照片区域 -->
<view class="section">
<view class="section-title">身份证照片</view>
<!-- 上传身份证正面 -->
<view class="upload-item">
<view class="upload-area bordered-area">
<view class="upload-content">
<view class="upload-icon">+</view>
<view class="upload-text">上传身份证正面</view>
</view>
<!-- 显示上传后的占位图 -->
<view v-if="formData.frontImage" class="uploaded-placeholder">
<text>身份证正面</text>
</view>
</view>
</view>
<!-- 上传身份证反面 -->
<view class="upload-item">
<view class="upload-area bordered-area">
<view class="upload-content">
<view class="upload-icon">+</view>
<view class="upload-text">上传身份证反面</view>
</view>
<!-- 显示上传后的占位图 -->
<view v-if="formData.backImage" class="uploaded-placeholder">
<text>身份证反面</text>
</view>
</view>
</view>
</view>
<!-- 人脸识别区域 -->
<view class="section">
<view class="section-title">人脸验证</view>
<view class="face-verify-area" @click="handleFaceVerify">
<view class="face-icon">
<up-icon name="account" size="60" color="#1890ff"></up-icon>
</view>
<view class="face-text">点击进行人脸识别</view>
</view>
</view>
<!-- 协议勾选 -->
<view class="agreement-section">
<u-checkbox v-model="formData.agreed" shape="circle" class="checkbox" />
<text class="agreement-text">我已阅读并同意</text>
<text class="agreement-link" @click="handleAgreementClick">《骑手实名认证协议》</text>
</view>
<!-- 提交按钮 -->
<view class="submit-section">
<u-button type="primary" class="submit-btn" size="large">
提交认证
</u-button>
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { onLoad } from '@dcloudio/uni-app';
import { ref, computed } from 'vue';
let isLoading = ref(true)
// 表单数据
const formData = ref({
name: '',
idCard: '',
frontImage: '',
backImage: '',
agreed: false
});
onLoad(() => {
setTimeout(() => {
isLoading.value = false
}, 1000)
})
// 处理人脸识别
const handleFaceVerify = () => {
// 在实际应用中这里会调用人脸识别相关API
console.log('开始人脸识别');
};
// 处理协议点击
const handleAgreementClick = () => {
// 打开协议详情
console.log('打开协议详情');
};
</script>
<style scoped lang="scss">
page {
background-color: #f5f5f5;
}
/* 骨架屏样式 */
.skeleton-container {
padding: 0 30rpx;
}
.skeleton-top-tip {
height: 70rpx;
width: 100%;
background-color: #e6f7ff;
margin: 20rpx 0;
border-radius: 10rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-section {
margin-bottom: 40rpx;
}
.skeleton-title {
height: 32rpx;
width: 160rpx;
background-color: #e6e6e6;
border-radius: 16rpx;
margin-bottom: 20rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-form-item {
display: flex;
align-items: center;
background-color: #fff;
padding: 30rpx;
border-bottom: 1rpx solid #f0f0f0;
}
.skeleton-form-item:last-child {
border-bottom: none;
}
.skeleton-label {
height: 28rpx;
width: 120rpx;
background-color: #e6e6e6;
border-radius: 14rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-input {
height: 28rpx;
width: calc(100% - 140rpx);
background-color: #e6e6e6;
margin-left: 20rpx;
border-radius: 14rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-upload-item {
height: 200rpx;
width: 100%;
background-color: #fff;
border: 2rpx solid #000;
border-radius: 20rpx;
margin-bottom: 20rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-face-area {
height: 240rpx;
background-color: #fff;
border-radius: 8rpx;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.skeleton-face-icon {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background-color: #e6e6e6;
margin-bottom: 20rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-face-text {
height: 28rpx;
width: 200rpx;
background-color: #e6e6e6;
border-radius: 14rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-agreement {
height: 30rpx;
width: 60%;
background-color: #e6e6e6;
border-radius: 15rpx;
margin-bottom: 40rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
.skeleton-submit {
height: 92rpx;
width: 100%;
background-color: #e6e6e6;
border-radius: 46rpx;
animation: skeleton-loading 1.5s infinite ease-in-out;
}
/* 骨架屏动画 */
@keyframes skeleton-loading {
0% {
opacity: 0.6;
}
50% {
opacity: 1;
}
100% {
opacity: 0.6;
}
}
.top-tip {
background-color: #E6F7FF;
padding: 20rpx 30rpx;
margin: 20rpx;
border-radius: 20rpx;
}
.tip-text {
color: #1890ff;
font-size: 28rpx;
}
.form-content {
padding: 0 30rpx;
}
.section {
margin-bottom: 40rpx;
}
.section-title {
font-size: 32rpx;
font-weight: bold;
color: #333;
margin-bottom: 20rpx;
padding-left: 10rpx;
}
.form-item {
background-color: #fff;
padding: 30rpx;
display: flex;
align-items: center;
border-bottom: 1rpx solid #f0f0f0;
}
.form-item:last-child {
border-bottom: none;
}
.label {
width: 120rpx;
font-size: 28rpx;
color: #333;
}
.input {
flex: 1;
font-size: 28rpx;
}
.upload-item {
margin-bottom: 20rpx;
}
.upload-area {
height: 200rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
position: relative;
}
.bordered-area {
background-color: #fff;
border-radius: 20rpx;
width: 100%;
}
.upload-content {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100%;
z-index: 1;
}
.upload-icon {
font-size: 60rpx;
color: #1890ff;
margin-bottom: 10rpx;
}
.upload-text {
font-size: 28rpx;
color: #1890ff;
}
.uploaded-placeholder {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: #fff;
display: flex;
justify-content: center;
align-items: center;
border: 2rpx solid #000;
color: #333;
font-size: 28rpx;
}
.face-verify-area {
background-color: #fff;
height: 240rpx;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
cursor: pointer;
border-radius: 8rpx;
}
.face-icon {
width: 120rpx;
height: 120rpx;
border-radius: 50%;
background-color: #e6f7ff;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 20rpx;
}
.face-text {
font-size: 28rpx;
color: #1890ff;
font-weight: 500;
}
.agreement-section {
display: flex;
align-items: center;
margin-bottom: 40rpx;
padding: 0 10rpx;
}
.checkbox {
margin-right: 10rpx;
}
.agreement-text {
font-size: 26rpx;
color: #666;
}
.agreement-link {
font-size: 26rpx;
color: #1890ff;
margin-left: 4rpx;
}
.input {
flex: 1;
font-size: 28rpx;
color: #333;
}
.submit-section {
margin-top: 60rpx;
padding: 0 20rpx;
}
.submit-btn {
height: 92rpx;
font-size: 32rpx;
border-radius: 46rpx;
background-color: #1890ff;
}
.submit-btn[disabled] {
background-color: #a0cfff;
color: #ffffff;
}
</style>