first commit
This commit is contained in:
@@ -0,0 +1,703 @@
|
||||
<template>
|
||||
<!-- 导航栏 -->
|
||||
<view class=""
|
||||
style=" z-index: 100; 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>
|
||||
<view class="" @click="Service.GoPage('/pages/my/myKF')" style="color: var(--nav-banbacor);">
|
||||
<image :src="Service.GetIconImg('/static/index/order/message.png')" style="width: 32rpx; height: 32rpx; "
|
||||
mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="" style="width: 100%; height: 88rpx; ">
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 骨架屏 -->
|
||||
<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('取餐成功!')
|
||||
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>
|
||||
@@ -0,0 +1,506 @@
|
||||
<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-agreement"></view>
|
||||
|
||||
<!-- 提交按钮骨架 -->
|
||||
<view class="skeleton-submit"></view>
|
||||
</view>
|
||||
|
||||
|
||||
<view v-else class="real-name-auth-container">
|
||||
<!-- 顶部提示栏 -->
|
||||
<view class="top-tip">
|
||||
<text class="tip-text">修改实名认证将重新审核,大约1~2工作日</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.nick" 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.idenNumber" 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 @click="uploadFImg(1)" class="upload-area bordered-area">
|
||||
<view v-if="!formData.identityA" class="upload-content">
|
||||
<view class="upload-icon">+</view>
|
||||
<view class="upload-text">上传身份证正面</view>
|
||||
</view>
|
||||
<!-- 显示上传后的占位图 -->
|
||||
<view v-else class="uploaded-placeholder">
|
||||
<image :src="Service.GetMateUrlByImg(formData.identityA)" style="width: 100%; height: 100%;" mode=""></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 上传身份证反面 -->
|
||||
<view class="upload-item">
|
||||
<view @click="uploadFImg(2)" class="upload-area bordered-area">
|
||||
<view v-if="!formData.identityB" class="upload-content">
|
||||
<view class="upload-icon">+</view>
|
||||
<view class="upload-text">上传身份证反面</view>
|
||||
</view>
|
||||
<!-- 显示上传后的占位图 -->
|
||||
<view v-else class="uploaded-placeholder">
|
||||
<image :src="Service.GetMateUrlByImg(formData.identityB)" style="width: 100%; height: 100%;" mode=""></image>
|
||||
</view>
|
||||
</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 @click="save()" 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';
|
||||
import { CNRiderDataService , Service } from "@/Service/CN/CNRiderDataService"
|
||||
|
||||
let isLoading = ref(true)
|
||||
|
||||
// 表单数据
|
||||
const formData = ref<any>({});
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
getData()
|
||||
})
|
||||
|
||||
const getData = () => {
|
||||
CNRiderDataService.GetRiderInfo().then(res => {
|
||||
isLoading.value = false
|
||||
if(res.data){
|
||||
formData.value=res.data.riderInfo
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const uploadFImg = (index:number) => {
|
||||
uni.chooseImage({
|
||||
count: 1, // 最多选择3张图片
|
||||
sizeType: ['original', 'compressed'], // 支持原图和压缩图
|
||||
sourceType: ['album', 'camera'], // 可从相册选择或使用相机拍照
|
||||
success: function (res) {
|
||||
let path = res.tempFiles[0].path
|
||||
Service.uploadH5(path, 'Avatar', data => {
|
||||
if(index==1){
|
||||
formData.value.identityA=data
|
||||
}else{
|
||||
formData.value.identityB=data
|
||||
}
|
||||
})
|
||||
|
||||
},
|
||||
fail: function (err) {
|
||||
console.error('选择失败:', err.errMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 处理协议点击
|
||||
const handleAgreementClick = () => {
|
||||
// 打开协议详情
|
||||
console.log('打开协议详情');
|
||||
};
|
||||
|
||||
|
||||
const save=()=>{
|
||||
// if(!formData.value.agreed){
|
||||
// Service.Msg('请同意骑手实名认证协议')
|
||||
// return
|
||||
// }
|
||||
if(!formData.value.nick){
|
||||
Service.Msg('请输入姓名')
|
||||
return
|
||||
}
|
||||
if(!formData.value.idenNumber){
|
||||
Service.Msg('请输入身份证号')
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
CNRiderDataService.UpdateRiderIdentity(formData.value.nick,formData.value.idenNumber,formData.value.identityA,formData.value.identityB).then(res=>{
|
||||
if(res.data){
|
||||
Service.Msg('上传成功!')
|
||||
}else{
|
||||
Service.Msg(res.msg)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
</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: 350rpx;
|
||||
border-radius: 8rpx;
|
||||
overflow: hidden;
|
||||
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;
|
||||
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 0rpx;
|
||||
}
|
||||
|
||||
.submit-btn {
|
||||
height: 92rpx;
|
||||
font-size: 32rpx;
|
||||
border-radius: 46rpx;
|
||||
background-color: #1890ff;
|
||||
}
|
||||
|
||||
.submit-btn[disabled] {
|
||||
background-color: #a0cfff;
|
||||
color: #ffffff;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user