first commit
This commit is contained in:
@@ -0,0 +1,254 @@
|
||||
<template>
|
||||
<!-- <UpApp :show="upShow" :url="url" /> -->
|
||||
<view class="borybac" v-if="upShow">
|
||||
<view class="up_box">
|
||||
|
||||
<view class="mt50">
|
||||
<view class="" style="margin: 0 60rpx;" >
|
||||
1.优化布局细节,优化购物体验,优化产品体验
|
||||
</view>
|
||||
<view class="" style="margin: 0 60rpx;" >
|
||||
2.修复已知问题,修复一些BUG
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<view class="jdBox">
|
||||
<view class="jd">
|
||||
<view class="jdbfb">
|
||||
{{sum}}%
|
||||
</view>
|
||||
<view class="jdt">
|
||||
<view class="jdn" :style="'width:'+sum+'%'">
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view v-if="buttonContro" class="jddx">
|
||||
{{datacl(beg)}}/{{datacl(downlog)}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" v-if="force==0"
|
||||
style="width: 100%; padding: 0 20rpx; height: 60rpx; margin: 40rpx auto; display: flex; justify-content: space-between;">
|
||||
<view class="" style="width: 70rpx;">
|
||||
|
||||
</view>
|
||||
<view class="" :class="{ 'cancleBut': buttonContro,'showBut': !buttonContro}"
|
||||
style="width: 240rpx; height: 60rpx; line-height: 60rpx; border-radius: 30rpx; text-align: center; font-size: 24rpx; "
|
||||
@click="delUpApp">
|
||||
{{ isFinish?'下载完成':(! buttonContro?'开始更新':'下载中') }}
|
||||
</view>
|
||||
<view class="" style="font-size: 22rpx; line-height: 80rpx; color: #999;" @click="goindex">
|
||||
暂不更新
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { ref } from 'vue';
|
||||
|
||||
let buttonContro = ref(false)
|
||||
|
||||
let url = ref('')
|
||||
let force = ref('0')
|
||||
|
||||
// 控制热更新
|
||||
let upShow = ref(true)
|
||||
let sum = ref(0)
|
||||
let downlog = ref(0)
|
||||
let beg = ref(0)
|
||||
let remark = ref('')
|
||||
let type = ref('')
|
||||
|
||||
let isFinish=ref(false)
|
||||
|
||||
//模拟请求
|
||||
onLoad((data : any) => {
|
||||
// getdata()
|
||||
url.value = data.url
|
||||
});
|
||||
|
||||
const goindex = function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
|
||||
const getdata = function () {
|
||||
// RegisterService.GetNewVersion().then((res:any)=>{
|
||||
// url.value = res.data.path
|
||||
// downlog.value = res.data.size
|
||||
// force.value = res.data.force
|
||||
// remark.value = res.data.remark
|
||||
// type.value = res.data.type
|
||||
// if(res.data.force=='1'){
|
||||
// delUpApp()
|
||||
// }
|
||||
// })
|
||||
}
|
||||
|
||||
|
||||
|
||||
const datacl = function (e : any) {
|
||||
if (e > 1024) {
|
||||
let sl = ((e / 1024) / 1024).toFixed(1)
|
||||
return sl + 'MB'
|
||||
} else {
|
||||
return (e / 1024).toFixed(1) + 'KB'
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
const delUpApp = function () {
|
||||
|
||||
if (buttonContro.value) {
|
||||
return
|
||||
}
|
||||
buttonContro.value = true
|
||||
// 1.开始请求下载
|
||||
const downloadTask = uni.downloadFile({
|
||||
url: url.value,
|
||||
success: (downloadResult) => {
|
||||
if (downloadResult.statusCode === 200) {
|
||||
plus.runtime.install(downloadResult.tempFilePath, {
|
||||
force: false
|
||||
}, function () {
|
||||
uni.hideLoading()
|
||||
uni.showToast({
|
||||
title: "下载成功",
|
||||
complete() {
|
||||
isFinish.value=true
|
||||
if (type.value == 'Bulking') {
|
||||
setTimeout(function () {
|
||||
plus.runtime.restart();
|
||||
}, 2000)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
console.log('install success...');
|
||||
}, function (e) {
|
||||
uni.hideLoading()
|
||||
console.log(e, '失败')
|
||||
// uni.$u.toast('下载失败!')
|
||||
// console.error('install fail...');
|
||||
});
|
||||
}
|
||||
},
|
||||
fail(downloadResult) {
|
||||
console.log(downloadResult, '失败')
|
||||
// console.log('下载失败');
|
||||
// uni.$u.toast('下载失败')
|
||||
}
|
||||
});
|
||||
downloadTask.onProgressUpdate((res) => {
|
||||
downlog.value = res.totalBytesExpectedToWrite
|
||||
beg.value = res.totalBytesWritten
|
||||
sum.value = res.progress
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" setup>
|
||||
.borybac {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: #f6f6f6;
|
||||
display: flex;
|
||||
overflow: hidden;
|
||||
|
||||
.up_box {
|
||||
width: 650rpx;
|
||||
height: 1000rpx;
|
||||
margin: 200rpx auto;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-image: url(@/static/index/system/updata.png);
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
|
||||
.mt50 {
|
||||
display: block;
|
||||
margin-top: 570rpx;
|
||||
}
|
||||
|
||||
.jdBox {
|
||||
overflow: hidden;
|
||||
margin-top: 70rpx;
|
||||
display: block;
|
||||
width: 100%;
|
||||
padding: 0 20rpx;
|
||||
|
||||
.jd {
|
||||
display: block;
|
||||
width: 90%;
|
||||
height: 100%;
|
||||
margin: 0 auto;
|
||||
|
||||
.jdbfb {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 30rpx;
|
||||
color: #FFD700;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.jdt {
|
||||
margin-top: 10rpx;
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 23rpx;
|
||||
border-radius: 15rpx;
|
||||
background-color: #E5E5E5;
|
||||
|
||||
.jdn {
|
||||
display: block;
|
||||
height: 23rpx;
|
||||
border-radius: 15rpx;
|
||||
background: radial-gradient(#8370F8 0%, #455FF8 100%);
|
||||
}
|
||||
}
|
||||
|
||||
.jddx {
|
||||
width: 100%;
|
||||
font-size: 24rpx;
|
||||
margin-top: 20rpx;
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.text {
|
||||
display: block;
|
||||
text-align: center;
|
||||
margin-top: 30rpx;
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.cancleBut{
|
||||
background-color: #efefef;
|
||||
color: #a3a3a3;
|
||||
}
|
||||
.showBut{
|
||||
background-color: var(--nav-mian);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -0,0 +1,277 @@
|
||||
<template>
|
||||
|
||||
<view v-if="loading" class="pure-css-skeleton">
|
||||
<view style=" margin: 20rpx 0; padding: 20rpx; background-color: #fff; border-radius: 10rpx;">
|
||||
<!-- 头像区域骨架 -->
|
||||
<view class="avatar-skeleton-wrapper"
|
||||
style="display: flex; flex-direction: column; justify-content: center; align-items: center;">
|
||||
<view class="skeleton-circle animate-pulse"></view>
|
||||
<view class="skeleton-text animate-pulse" style="margin-top: 15rpx;"></view>
|
||||
</view>
|
||||
|
||||
<!-- 表单区域骨架 -->
|
||||
<view class="form-skeleton-wrapper" style="margin-top: 30rpx;">
|
||||
<!-- 昵称 -->
|
||||
<view class="form-item-skeleton">
|
||||
<view class="form-label-skeleton animate-pulse"></view>
|
||||
<view class="form-input-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
<!-- 性别 -->
|
||||
<view class="form-item-skeleton">
|
||||
<view class="form-label-skeleton animate-pulse"></view>
|
||||
<view class="form-radio-skeleton">
|
||||
<view class="radio-item-skeleton animate-pulse"></view>
|
||||
<view class="radio-item-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 生日 -->
|
||||
<view class="form-item-skeleton">
|
||||
<view class="form-label-skeleton animate-pulse"></view>
|
||||
<view class="form-input-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
<!-- 手机号 -->
|
||||
<view class="form-item-skeleton">
|
||||
<view class="form-label-skeleton animate-pulse"></view>
|
||||
<view class="form-input-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
<!-- 邮箱 -->
|
||||
<view class="form-item-skeleton">
|
||||
<view class="form-label-skeleton animate-pulse"></view>
|
||||
<view class="form-input-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 底部空间占位 -->
|
||||
<view style="width: 100%; height: 200rpx;"></view>
|
||||
</view>
|
||||
|
||||
<!-- 底部保存按钮骨架 -->
|
||||
<view class="bottom-button-skeleton animate-pulse"></view>
|
||||
</view>
|
||||
|
||||
<view v-else style=" margin: 20rpx; padding: 20rpx;">
|
||||
<view @click="uploadFImg()" class=""
|
||||
style=" display: flex; flex-direction: column; justify-content: center; align-items: center; ">
|
||||
<img v-if="userInfo.headImg!=''" :src="Service.GetMateUrlByImg(userInfo.headImg)"
|
||||
style="width: 140rpx; height: 140rpx; border-radius: 50%; " alt="" />
|
||||
<view v-else class=""
|
||||
style="background-color: #EBEBEB; width: 140rpx; height: 140rpx; border-radius: 50%; display: flex; align-items: center; justify-content: center; ">
|
||||
<image :src="Service.GetIconImg('/static/index/my/edit/photo.png')"
|
||||
style="width: 50rpx; height: 50rpx; " alt=""> </image>
|
||||
</view>
|
||||
<view class="" style="margin-top: 15rpx; font-size: 26rpx; color: #999999; ">
|
||||
点击更换头像
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style=" margin-top: 30rpx; ">
|
||||
<up-form labelWidth='90' labelPosition="left" :borderBottom="true" :model="userInfo" ref="form1">
|
||||
<up-form-item label="昵称" prop="userInfo.name" ref="item1" :borderBottom="true">
|
||||
<up-input inputAlign='right' v-model="userInfo.nick" border="none"></up-input>
|
||||
</up-form-item>
|
||||
|
||||
<up-form-item label="性别" :borderBottom="true" style="position: relative;" prop="userInfo.sex">
|
||||
<view class="" style=" position: absolute; top: 10rpx; right: 0; ">
|
||||
<up-radio-group v-model="userInfo.sex" placement="row">
|
||||
<up-radio v-for="(item, index) in radiolist1" activeColor='#FF6A00' :key="index"
|
||||
iconPlacement="right" :label="item.name" :name="item.name">
|
||||
</up-radio>
|
||||
</up-radio-group>
|
||||
</view>
|
||||
</up-form-item>
|
||||
<up-form-item label="生日" :borderBottom="true" prop="userInfo.sex" style="position: relative;">
|
||||
<view @click="showDate=true" class=""
|
||||
style=" position: absolute; top: 25rpx; right: 0; display: flex; align-items: center; ">
|
||||
{{Service.formatDate(userInfo.date,2)}}
|
||||
<u-icon name="arrow-right" size="24rpx" color="#000"></u-icon>
|
||||
</view>
|
||||
</up-form-item>
|
||||
<up-form-item label="手机号" :borderBottom="true" prop="userInfo.sex">
|
||||
<up-input inputAlign='right' v-model="userInfo.phone" border="none"></up-input>
|
||||
</up-form-item>
|
||||
<up-form-item label="紧急联系人" :borderBottom="true" prop="userInfo.sex">
|
||||
<up-input inputAlign='right' v-model="userInfo.age" border="none"></up-input>
|
||||
</up-form-item>
|
||||
</up-form>
|
||||
</view>
|
||||
|
||||
<up-datetime-picker :maxDate="nowDate" :minDate="631123200000" :show="showDate" @cancel="showDate=!showDate"
|
||||
@confirm="dateConfirm" v-model="userInfo.date" mode="date"></up-datetime-picker>
|
||||
<view class="" style="width: 100%; height: 200rpx;">
|
||||
|
||||
</view>
|
||||
<view class="" style=" width: 100% ; background-color: #fff; position: fixed; bottom: 15rpx; left: 0; ">
|
||||
<view class=""
|
||||
style=" margin: 0 20rpx; padding: 26rpx 0; color: #fff; display: flex; align-items: center; justify-content: center; border-radius: 60rpx; background-color: var(--nav-mian);">
|
||||
保存信息
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Service } from '@/Service/Service';
|
||||
import { ref } from "vue";
|
||||
|
||||
|
||||
let loading = ref(true)
|
||||
|
||||
let showDate = ref(false)
|
||||
const userInfo = ref({
|
||||
headImg: '',
|
||||
age: '1',
|
||||
sex: '',
|
||||
phone: '1',
|
||||
date: Date.now(),
|
||||
nick: '大大怪将军'
|
||||
})
|
||||
|
||||
let nowDate = ref()
|
||||
|
||||
const radiolist1 = ref([
|
||||
{
|
||||
name: '男',
|
||||
disabled: false,
|
||||
},
|
||||
{
|
||||
name: '女',
|
||||
disabled: false,
|
||||
}
|
||||
]);
|
||||
|
||||
|
||||
onLoad(() => {
|
||||
setTimeout(() => {
|
||||
loading.value = false;
|
||||
}, 1500);
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
nowDate.value = new Date()
|
||||
});
|
||||
|
||||
const dateConfirm = (e) => {
|
||||
showDate.value = !showDate.value
|
||||
userInfo.value.date = e.value
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
const uploadFImg = () => {
|
||||
uni.chooseImage({
|
||||
count: 1, // 最多选择3张图片
|
||||
sizeType: ['original', 'compressed'], // 支持原图和压缩图
|
||||
sourceType: ['album', 'camera'], // 可从相册选择或使用相机拍照
|
||||
success: function (res) {
|
||||
let path = res.tempFiles[0].path
|
||||
userInfo.value.headImg = path
|
||||
// Service.uploadH5(path, 'Avatar', data => {
|
||||
// userInfo.value.headImg = data.split(',')[2].split(':')[1].split('"')[1]
|
||||
// })
|
||||
|
||||
},
|
||||
fail: function (err) {
|
||||
console.error('选择失败:', err.errMsg);
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.pure-css-skeleton {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
|
||||
/* 骨架屏基础样式 */
|
||||
.skeleton-circle {
|
||||
width: 140rpx;
|
||||
height: 140rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.skeleton-text {
|
||||
width: 120rpx;
|
||||
height: 26rpx;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.form-item-skeleton {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 20rpx 0;
|
||||
border-bottom: 1px solid #f5f5f5;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.form-item-skeleton:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.form-label-skeleton {
|
||||
width: 90rpx;
|
||||
height: 30rpx;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.form-input-skeleton {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
width: 50%;
|
||||
height: 30rpx;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.form-radio-skeleton {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
display: flex;
|
||||
gap: 20rpx;
|
||||
}
|
||||
|
||||
.radio-item-skeleton {
|
||||
width: 100rpx;
|
||||
height: 30rpx;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.bottom-button-skeleton {
|
||||
position: fixed;
|
||||
bottom: 15rpx;
|
||||
left: 20rpx;
|
||||
right: 20rpx;
|
||||
height: 90rpx;
|
||||
background-color: #e0e0e0;
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
|
||||
/* 动画效果 - 不使用组件,纯CSS实现 */
|
||||
@keyframes pulse {
|
||||
0% {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
50% {
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
100% {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.animate-pulse {
|
||||
animation: pulse 1.5s ease-in-out infinite;
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,89 @@
|
||||
import { Service } from '@/Service/Service';
|
||||
/*****首页接口*****/
|
||||
class CNRiderDataService {
|
||||
private static GetPubRiderInfoPath : string = '/Rider/GetRiderInfo';
|
||||
/*****个人信息*****/
|
||||
static GetRiderInfo() {
|
||||
var result = Service.Request(this.GetPubRiderInfoPath, "GET", {});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetRiderHomeInfoPath : string = '/Rider/GetRiderHomeInfo';
|
||||
/*****获取首页信息*****/
|
||||
static GetRiderHomeInfo() {
|
||||
var result = Service.Request(this.GetRiderHomeInfoPath, "GET", {});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static CompleteRiderPath : string = '/Rider/CompleteRider';
|
||||
/*****完善信息接口*****/
|
||||
static CompleteRider(nick:string,headImg:string,idenNumber:string,sex:string,age:number,identityA:string,identityB:string,province:string,city:string,region:string,lat:number,lon:number) {
|
||||
var result = Service.Request(this.CompleteRiderPath, "POST", {nick,headImg,idenNumber,sex,age,identityA,identityB,province,city,region,lat,lon});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static GetAddressInfoPath : string = '/User/GetAddressInfo';
|
||||
/*****根据经纬度获取地址信息*****/
|
||||
static GetAddressInfo(lat:number,lon:number) {
|
||||
var result = Service.Request(this.GetAddressInfoPath, "GET", {lat,lon});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static GetRiderAccInfoPath : string = '/Rider/GetRiderAccInfo';
|
||||
/*****获取账户信息*****/
|
||||
static GetRiderAccInfo() {
|
||||
var result = Service.Request(this.GetRiderAccInfoPath, "GET", {});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static UpdateRiderUnitPath : string = '/Rider/UpdateRiderUnit';
|
||||
/*****修改基础信息*****/
|
||||
static UpdateRiderUnit(headImg:string,sex:string,age:number) {
|
||||
var result = Service.Request(this.UpdateRiderUnitPath, "POST", {headImg,sex,age});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static UpdateRiderIdentityPath : string = '/Rider/UpdateRiderIdentity';
|
||||
/*****修改实名认证*****/
|
||||
static UpdateRiderIdentity(nick:string,idenNumber:string,identityA:string,identityB:string) {
|
||||
var result = Service.Request(this.UpdateRiderIdentityPath, "POST", {nick,idenNumber,identityA,identityB});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static UpdateRiderOnlinePath : string = '/Rider/UpdateRiderOnline';
|
||||
/*****修改上下线*****/
|
||||
static UpdateRiderOnline() {
|
||||
var result = Service.Request(this.UpdateRiderOnlinePath, "GET", {});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
private static GetRiderExigencyPath : string = '/Rider/GetRiderExigency';
|
||||
/*****紧急联系人详情*****/
|
||||
static GetRiderExigency() {
|
||||
var result = Service.Request(this.GetRiderExigencyPath, "GET", {});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static AddRiderExigencyPath : string = '/Rider/AddRiderExigency';
|
||||
/*****添加联系人*****/
|
||||
static AddRiderExigency(name:string,phone:string) {
|
||||
var result = Service.Request(this.AddRiderExigencyPath, "POST", {name,phone});
|
||||
return result;
|
||||
}
|
||||
|
||||
private static GetRiderEvaluatePath : string = '/Rider/GetRiderEvaluate';
|
||||
/*****骑手评价列表*****/
|
||||
static GetRiderEvaluate(type:number,page:number) {
|
||||
var result = Service.Request(this.GetRiderEvaluatePath, "GET", {type,page});
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
export {
|
||||
Service,
|
||||
CNRiderDataService
|
||||
}
|
||||
@@ -0,0 +1,330 @@
|
||||
<template>
|
||||
<view v-if="loading" style="margin: 20rpx; padding-top: 80rpx; ">
|
||||
<!-- 用户信息骨架屏 -->
|
||||
<view class="skeleton-user-card">
|
||||
<view class="skeleton-avatar"></view>
|
||||
<view class="skeleton-user-info">
|
||||
<view class="skeleton-line skeleton-name"></view>
|
||||
<view class="skeleton-line skeleton-id"></view>
|
||||
<view class="skeleton-line skeleton-status"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!-- 服务列表骨架屏 -->
|
||||
<view class="skeleton-section-title"></view>
|
||||
<view class="skeleton-service-list">
|
||||
<view class="skeleton-service-item" v-for="i in 4" :key="i">
|
||||
<view class="skeleton-icon"></view>
|
||||
<view class="skeleton-line skeleton-service-name"></view>
|
||||
<view class="skeleton-arrow"></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 退出登录按钮骨架屏 -->
|
||||
<view class="skeleton-logout-btn"></view>
|
||||
</view>
|
||||
<view v-else style="margin: 20rpx ; padding-top: 60rpx; ">
|
||||
<view class=""
|
||||
style="background: linear-gradient(to bottom,#E6F7FF,#FFFFFF) ; border-radius: 20rpx; display: flex; align-items: center; padding: 40rpx 20rpx; ">
|
||||
<image :src="Service.GetMateUrlByImg(riderInfo.headImg)"
|
||||
style="width: 110rpx; height: 110rpx; border-radius: 50%; border: 1rpx solid var(--nav-mian); " mode="">
|
||||
</image>
|
||||
<view class="" style="flex: 1; margin-left: 30rpx;">
|
||||
<view class="" style="display: flex; align-items: center; gap: 20rpx;">
|
||||
<view class="" style="font-size: 34rpx; font-weight: 600; color: var(--nav-mian); ">
|
||||
{{riderInfo.nick}}
|
||||
</view>
|
||||
<!-- <view class=""
|
||||
style="background-color: var(--nav-vice); color: #fff; padding: 4rpx 10rpx; border-radius: 4rpx; font-size: 24rpx; display: flex; align-items: baseline; justify-content: center; ">
|
||||
4.9
|
||||
</view> -->
|
||||
</view>
|
||||
<view class="" style="margin: 10rpx 0; font-size: 28rpx; ">
|
||||
riderNo: {{ riderInfo.riderNo }}
|
||||
</view>
|
||||
<view class="" style="color: var(--nav-vice); font-weight: bold; ">
|
||||
{{ riderInfo.isOnline==0?'已下线':'已上线' }}
|
||||
</view>
|
||||
</view>
|
||||
<view @click="Service.GoPage('/pages/my/edit')" class="">
|
||||
<u-icon name="setting" size="20"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="" style="margin: 20rpx 0;">
|
||||
<text style="font-size: 34rpx; font-weight: 600; ">我的服务</text>
|
||||
</view>
|
||||
<view class="" style=" background-color: #fff; border-radius: 20rpx; ">
|
||||
<view class="" @click="gopage(funcItem,funcIndex)" v-for="(funcItem,funcIndex) in funcList" :key="funcIndex"
|
||||
style=" border-bottom: 1rpx solid #e2e2e2; display: flex; align-items: center; padding: 24rpx 30rpx; ">
|
||||
<image :src="Service.GetIconImg(funcItem.icon)" style="width: 50rpx; height: 50rpx; " mode=""></image>
|
||||
<view class="" style="flex: 1; font-size: 28rpx; margin-left: 20rpx; ">
|
||||
{{funcItem.name}}
|
||||
</view>
|
||||
<view class="">
|
||||
<up-icon name="arrow-right"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button @click=" reLogin() " class="confirm-button">退出登录</button>
|
||||
<view class="" style="width: 100%; height: 100rpx; ">
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onShow, onLoad } from "@dcloudio/uni-app";
|
||||
import { Service } from "@/Service/Service";
|
||||
import { ref } from 'vue'
|
||||
import { CNRiderDataService } from "@/Service/CN/CNRiderDataService"
|
||||
|
||||
|
||||
let loading = ref(true)
|
||||
|
||||
let funcList = ref([
|
||||
{
|
||||
name: '联系客服',
|
||||
icon: '/static/index/user/phone.png',
|
||||
path: '/pages/my/myKF'
|
||||
},
|
||||
{
|
||||
name: '异常订单',
|
||||
icon: '/static/index/user/warming.png',
|
||||
path: '/pages/my/AbnormalList'
|
||||
},
|
||||
// {
|
||||
// name: '签到与奖励',
|
||||
// icon: '/static/index/user/check.png',
|
||||
// path: '/pages/my/check'
|
||||
// },
|
||||
{
|
||||
name: '提现列表',
|
||||
icon: '/static/index/user/security.png',
|
||||
path: '/pages/my/withDrowList'
|
||||
},
|
||||
{
|
||||
name: '账号与安全',
|
||||
icon: '/static/index/user/security.png',
|
||||
path: '/pages/my/security'
|
||||
},
|
||||
{
|
||||
name: '评价中心',
|
||||
icon: '/static/index/user/security.png',
|
||||
path: '/pages/my/evaluate'
|
||||
}
|
||||
])
|
||||
|
||||
let riderInfo=ref<any>({})
|
||||
|
||||
onLoad(() => {
|
||||
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
getData()
|
||||
});
|
||||
|
||||
|
||||
const getData = () => {
|
||||
CNRiderDataService.GetRiderInfo().then(res => {
|
||||
loading.value = false
|
||||
if(res.data){
|
||||
riderInfo.value=res.data.riderInfo
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const gopage = (item : any, index : number) => {
|
||||
Service.GoPage(item.path)
|
||||
}
|
||||
|
||||
|
||||
const reLogin =()=>{
|
||||
Service.OffUserToken()
|
||||
Service.GoPage('/pages/my/login')
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.confirm-button {
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #1677ff;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 600;
|
||||
border-radius: 45rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
|
||||
.confirm-button:active {
|
||||
background-color: #0958d9;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 骨架屏基础样式和动画
|
||||
.skeleton-loading {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
@keyframes skeleton-loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 骨架屏公共样式
|
||||
.skeleton-line {
|
||||
height: 32rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
// 用户信息卡片骨架
|
||||
.skeleton-user-card {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 40rpx 20rpx;
|
||||
background: linear-gradient(to bottom, #f0f0f0, #fafafa);
|
||||
border-radius: 20rpx;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-avatar {
|
||||
width: 110rpx;
|
||||
height: 110rpx;
|
||||
border-radius: 50%;
|
||||
background-color: #f0f0f0;
|
||||
|
||||
}
|
||||
|
||||
.skeleton-user-info {
|
||||
flex: 1;
|
||||
margin-left: 30rpx;
|
||||
}
|
||||
|
||||
.skeleton-name {
|
||||
width: 40%;
|
||||
height: 36rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-id {
|
||||
width: 60%;
|
||||
height: 30rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-status {
|
||||
width: 50%;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
// 数据统计卡片骨架
|
||||
.skeleton-stats-card {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
width: 30%;
|
||||
}
|
||||
|
||||
.skeleton-stat-value {
|
||||
width: 80%;
|
||||
height: 40rpx;
|
||||
margin-bottom: 12rpx;
|
||||
}
|
||||
|
||||
.skeleton-stat-label {
|
||||
width: 60%;
|
||||
height: 28rpx;
|
||||
}
|
||||
|
||||
// 服务列表骨架
|
||||
.skeleton-section-title {
|
||||
height: 40rpx;
|
||||
background-color: #fff;
|
||||
width: 30%;
|
||||
margin: 20rpx 0;
|
||||
|
||||
.skeleton-loading {}
|
||||
}
|
||||
|
||||
.skeleton-service-list {
|
||||
background-color: #fff;
|
||||
border-radius: 20rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-service-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 24rpx 30rpx;
|
||||
border-bottom: 1rpx solid #f5f5f5;
|
||||
}
|
||||
|
||||
.skeleton-service-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.skeleton-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 8rpx;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.skeleton-service-name {
|
||||
flex: 1;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.skeleton-arrow {
|
||||
width: 20rpx;
|
||||
height: 20rpx;
|
||||
background-color: #f0f0f0;
|
||||
border-radius: 4rpx;
|
||||
|
||||
}
|
||||
|
||||
// 退出登录按钮骨架
|
||||
.skeleton-logout-btn {
|
||||
height: 90rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 45rpx;
|
||||
margin-bottom: 20rpx;
|
||||
|
||||
}
|
||||
|
||||
// 底部占位
|
||||
.skeleton-bottom-space {
|
||||
height: 100rpx;
|
||||
}
|
||||
</style>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 672 B |
@@ -0,0 +1,343 @@
|
||||
<template>
|
||||
|
||||
<view v-if="loading" class="skeleton-container">
|
||||
<!-- 安全等级卡片骨架 -->
|
||||
<view class="security-level-card skeleton-card">
|
||||
<view class="security-level-header">
|
||||
<view class="skeleton-line skeleton-line-sm"></view>
|
||||
</view>
|
||||
<view class="progress-bar skeleton-progress"></view>
|
||||
<view class="skeleton-line skeleton-line-xs"></view>
|
||||
</view>
|
||||
|
||||
<!-- 安全设置列表骨架 -->
|
||||
<view class="security-settings skeleton-settings">
|
||||
<view class="security-item skeleton-item" v-for="i in 3" :key="i">
|
||||
<view class="item-left">
|
||||
<view class="item-icon skeleton-icon"></view>
|
||||
<view class="skeleton-line skeleton-line-md"></view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<view class="skeleton-line skeleton-line-sm"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 安全提示卡片骨架 -->
|
||||
<view class="security-tip-card skeleton-tip-card">
|
||||
<view class="tip-content">
|
||||
<view class="skeleton-circle"></view>
|
||||
<view class="skeleton-line skeleton-line-full"></view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view v-else class="account-security-page" style="overflow: hidden;" >
|
||||
<!-- 安全等级卡片 -->
|
||||
<view class="security-level-card">
|
||||
<view class="security-level-header">
|
||||
<text class="security-level-label">账号安全等级:</text>
|
||||
<text class="security-level-value">高</text>
|
||||
</view>
|
||||
<view class="progress-bar">
|
||||
<view class="progress-fill"></view>
|
||||
</view>
|
||||
<view class="security-desc">您已完成所有安全设置</view>
|
||||
</view>
|
||||
|
||||
<!-- 安全设置列表 -->
|
||||
<view class="security-settings">
|
||||
<!-- 实名认证 -->
|
||||
<view class="security-item" @click="Service.GoPage(item.path)" v-for="(item,index) in funcList" :key="index">
|
||||
<view class="item-left">
|
||||
<view class="item-icon">
|
||||
<image :src="Service.GetIconImg(item.icon)" style="width: 100%; height: 100%; " mode=""></image>
|
||||
</view>
|
||||
<text class="item-label">{{item.name}}</text>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
<text class="item-status">{{ item.des }}</text>
|
||||
<up-icon name="arrow-right" size="19" color="#999"></up-icon>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<!-- 安全提示卡片 -->
|
||||
<view class="security-tip-card">
|
||||
<view class="tip-content">
|
||||
<up-icon name="info-circle-fill" size="24" color="#999"></up-icon>
|
||||
<text class="tip-text">为保障您的账号安全,请勿泄露验证码,定期更新密码。</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onLoad, onShow } from '@dcloudio/uni-app'
|
||||
import { Service } from "@/Service/Service"
|
||||
import { ref } from 'vue'
|
||||
import { CNRiderDataService } from "@/Service/CN/CNRiderDataService"
|
||||
|
||||
let loading = ref(true)
|
||||
|
||||
let riderInfo=ref<any>({})
|
||||
|
||||
|
||||
const funcList = ref([
|
||||
{
|
||||
name: '实名认证',
|
||||
icon: '/static/index/my/security/security.png',
|
||||
des: "已认证",
|
||||
path:'/pages/my/authentication'
|
||||
},
|
||||
{
|
||||
name: '手机号绑定',
|
||||
icon: '/static/index/my/security/phone.png',
|
||||
des: "已绑定138****4441",
|
||||
path:'/pages/my/setConnect?type=1'
|
||||
},
|
||||
{
|
||||
name: '紧急联系人',
|
||||
icon: '/static/index/my/security/user.png',
|
||||
des: "张女士 138****4112",
|
||||
path:'/pages/my/setConnect?type=0'
|
||||
}
|
||||
])
|
||||
|
||||
// 页面加载时的逻辑
|
||||
onLoad(() => {
|
||||
|
||||
})
|
||||
|
||||
onShow(()=>{
|
||||
getData()
|
||||
})
|
||||
|
||||
|
||||
const getData = () => {
|
||||
CNRiderDataService.GetRiderInfo().then(res => {
|
||||
loading.value = false
|
||||
if(res.data){
|
||||
riderInfo.value=res.data.riderInfo
|
||||
funcList.value[0].des=riderInfo.value.status===-1?'未认证':(riderInfo.value.status===0?'审核中':'已认证')
|
||||
funcList.value[1].des='已绑定'+riderInfo.value.phone.slice(0,3)+'****'+riderInfo.value.phone.slice(-4)
|
||||
funcList.value[2].des='未绑定'
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
page {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
|
||||
// 安全等级卡片样式
|
||||
.security-level-card {
|
||||
background-color: #E6F7FF;
|
||||
margin: 30rpx 30rpx 30rpx;
|
||||
padding: 30rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.security-level-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.security-level-label {
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.security-level-value {
|
||||
font-size: 32rpx;
|
||||
font-weight: 600;
|
||||
color: #007AFF;
|
||||
}
|
||||
|
||||
.progress-bar {
|
||||
width: 100%;
|
||||
height: 8rpx;
|
||||
background-color: #B3D8FF;
|
||||
border-radius: 4rpx;
|
||||
overflow: hidden;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #007AFF;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.security-desc {
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
// 安全设置列表样式
|
||||
.security-settings {
|
||||
background-color: #fff;
|
||||
margin: 0 30rpx 30rpx;
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.security-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 30rpx;
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.security-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.item-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-icon {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 20rpx;
|
||||
}
|
||||
|
||||
.item-label {
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.item-right {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.item-status {
|
||||
font-size: 28rpx;
|
||||
color: #4CD964;
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
// 安全提示卡片样式
|
||||
.security-tip-card {
|
||||
background-color: #FFF8E8;
|
||||
margin: 0 30rpx;
|
||||
padding: 24rpx;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.tip-content {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.tip-text {
|
||||
flex: 1;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
line-height: 36rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
// 骨架屏基础样式
|
||||
.skeleton-line {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.skeleton-icon {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
border-radius: 8rpx;
|
||||
}
|
||||
|
||||
.skeleton-circle {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
border-radius: 50%;
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-right: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-progress {
|
||||
background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
|
||||
background-size: 200% 100%;
|
||||
animation: skeleton-loading 1.5s infinite;
|
||||
}
|
||||
|
||||
// 骨架屏线条尺寸
|
||||
.skeleton-line-xs {
|
||||
height: 28rpx;
|
||||
width: 200rpx;
|
||||
margin-top: 16rpx;
|
||||
}
|
||||
|
||||
.skeleton-line-sm {
|
||||
height: 32rpx;
|
||||
width: 300rpx;
|
||||
}
|
||||
|
||||
.skeleton-line-md {
|
||||
height: 36rpx;
|
||||
width: 240rpx;
|
||||
}
|
||||
|
||||
.skeleton-line-full {
|
||||
height: 36rpx;
|
||||
width: calc(100% - 60rpx);
|
||||
}
|
||||
|
||||
// 骨架屏动画
|
||||
@keyframes skeleton-loading {
|
||||
0% {
|
||||
background-position: 200% 0;
|
||||
}
|
||||
|
||||
100% {
|
||||
background-position: -200% 0;
|
||||
}
|
||||
}
|
||||
|
||||
// 骨架屏容器样式
|
||||
.skeleton-container {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
// 骨架屏卡片样式
|
||||
.skeleton-card {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.skeleton-settings {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.skeleton-item {
|
||||
border-bottom: 1rpx solid #f0f0f0;
|
||||
}
|
||||
|
||||
.skeleton-item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.skeleton-tip-card {
|
||||
background-color: #fff;
|
||||
}
|
||||
</style>
|
||||
@@ -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";
|
||||
}
|
||||
Reference in New Issue
Block a user