fix:修改功能

This commit is contained in:
5g0Wp7Zy 2026-03-03 17:10:57 +08:00
parent d1942ac19e
commit ac592f674f
11 changed files with 195 additions and 13 deletions

2
env/.env vendored
View File

@ -41,4 +41,4 @@ VITE_AMAP_KEY = '1f8f159583f28dfba6eb06deb55e3b56'
VITE_HOME_URL = '/pages/index/index'
# 图片上传展示路径
VITE_APP_IMAGE_URL = 'https://www.cdzhuojing.cn/file/static-objects/img-file/'
VITE_APP_IMAGE_URL = 'https://www.cx.cdzhuojing.cn/file/static-objects/img-file/'

View File

@ -39,7 +39,7 @@ export function http<T>(options: CustomRequestOptions) {
CacheManager.remove('dictData')
uni.navigateTo({
url: '/pages/login/login',
url: '/pages-fg/login/login',
})
return reject(responseData)

View File

@ -8,7 +8,7 @@ const { VITE_APP_TITLE } = import.meta.env
definePage({
// 使 type: "home" page
type: 'home',
// type: 'home',
style: {
navigationStyle: 'custom',
},

View File

@ -83,7 +83,7 @@ export const menu_list = [
},
{
key: 'orderManagement',
name: '工单管理',
name: '点单改价',
type: 'page',
path: '/pages-sub/order-manage/index',
customsrc: 'APPICON_ZHANDIANGUANLI_IMAGE',

View File

@ -62,9 +62,11 @@ function regionchange(e: any) {
//
function handleMapTap(e: any) {
const { latitude, longitude } = e.detail
// console.log(latitude, longitude)
if (isPointInRegion({ latitude, longitude })) {
drawPoint({
type: 'other',
point: {
id: Math.floor(100000 + Math.random() * 900000),
longitude,

View File

@ -81,7 +81,7 @@ function handleSelect(item: any) {
>
<view class="header">
<view class="title">
常用应用
{{ item.name }}
</view>
</view>
<view class="app_grid">

View File

@ -249,9 +249,9 @@ export function getIconByOrderStatus(vehicle) {
return getBatteryIconBySoc(vehicle.soc)
}
// 4. 巡检
// 4. 巡检TUDO没有对应的图标
if (hasInspection) {
return getImageFullPath('MAP_ICON_REPAIRE_CAR_IMAGE')
return getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
}
// 5. 都没有订单

View File

@ -0,0 +1,119 @@
<script lang="ts" setup>
definePage({
type: 'home',
style: {
navigationStyle: 'custom',
},
})
</script>
<template>
<view class="container">
<view class="loading-box">
<view class="animations">
<view class="box">
<view class="loader">
<view class="loader__ball" />
<view class="loader__ball" />
<view class="loader__ball" />
</view>
</view>
</view>
<view class="text">
加载中...
</view>
</view>
</view>
</template>
<style lang="scss" scoped>
.container {
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
background-color: #f5f5f5;
font-size: 28rpx;
color: #333;
.loading-box {
display: flex;
flex-direction: column;
align-items: center;
.text {
margin-top: 20rpx;
}
}
}
$dotColor: linear-gradient(135deg, #1fa2ff, #12d8fa, #29ffc6);
$dotSize: 30rpx;
$duration: 2s;
.animations {
width: 160rpx;
height: 160rpx;
position: relative;
}
.box {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.loader {
animation: rotate $duration linear infinite normal;
position: relative;
transform-origin: 50% 50%;
&__ball {
height: $dotSize;
width: $dotSize;
left: -$dotSize * 0.5;
position: absolute;
top: -$dotSize * 0.5;
transform-origin: 50% 50%;
&:nth-of-type(2) {
transform: rotate(120deg);
}
&:nth-of-type(3) {
transform: rotate(240deg);
}
&::after {
animation: move $duration * 0.5 ease-in-out infinite alternate;
background: $dotColor;
border-radius: 50%;
content: '';
display: inline-block;
height: 100%;
width: 100%;
transform-origin: 50% 50%;
}
}
}
@keyframes rotate {
from {
transform: rotate(0);
}
to {
transform: rotate(360deg);
}
}
@keyframes move {
0%,
15% {
transform: translateY(0);
}
100% {
transform: translateY(-150%);
}
}
</style>

View File

@ -1,4 +1,5 @@
<script lang="ts" setup>
import { queryMyWorkOrders } from '@/api/work'
import { useAppStore } from '@/store'
import { getImageFullPath, maskPhone } from '@/utils'
@ -18,6 +19,9 @@ const order_list = ref<any>([
query: {
handelSate: '1',
},
bot: {
num: 0,
},
icon: 'WODEGONGDAN_WEIWANC_IMAGE',
},
{
@ -90,6 +94,28 @@ onMounted(() => {
//
userInfo.value = appStore.getUserInfo()
})
onShow(async () => {
try {
const res: any = await queryMyWorkOrders({
pageNum: 1,
pageSize: 1000000,
bikeCode: '',
orderType: null,
handelSate: 1,
})
const { records } = res
if (records && records.length > 0) {
order_list.value[0].bot.num = records.length
}
else {
order_list.value[0].bot.num = 0
}
}
catch (e) {
console.error(e)
}
})
</script>
<template>
@ -131,6 +157,9 @@ onMounted(() => {
@click="handleOrderClick(item)"
>
<view class="icon_bar">
<view v-if="item.bot && item.bot.num > 0" class="bot">
<text class="num">{{ item.bot.num }}</text>
</view>
<uv-image :src="getImageFullPath(item.icon)" mode="widthFix" width="100%" />
</view>
<view class="label">
@ -249,9 +278,33 @@ onMounted(() => {
align-items: center;
.icon_bar {
position: relative;
width: 92rpx;
height: 92rpx;
overflow: hidden;
.bot {
position: absolute;
right: 0;
top: 0;
width: 30rpx;
height: 30rpx;
padding: 5rpx;
border-radius: 50%;
background: rgb(253 5 5);
z-index: 2;
display: flex;
justify-content: center;
align-items: center;
.num {
font-family: PingFangSC-Medium;
font-size: 22rpx;
color: #ffffff;
letter-spacing: 0;
font-weight: 500;
}
}
}
.label {

View File

@ -38,10 +38,18 @@ export const useAppStore = defineStore(
*
*/
const autoLogin = (path: string) => {
console.log(path)
const token = CacheManager.get('token')
if (token && path === 'pages/login/login') {
loginJump()
return
if (path === 'pages/loadingPage/loadingPage') {
if (token) {
uni.switchTab({ url: VITE_HOME_URL })
}
else {
uni.reLaunch({
url: '/pages-fg/login/login',
})
}
}
}
@ -79,7 +87,7 @@ export const useAppStore = defineStore(
}
finally {
uni.reLaunch({
url: '/pages/login/login',
url: '/pages-fg/login/login',
})
}
}

View File

@ -320,7 +320,7 @@ export function drawPoint({
success,
fail,
}: {
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain'
type?: 'none' | 'charge' | 'dispatch' | 'polling' | 'maintain' | 'other'
// 工具的类型
point: {
id?: number
@ -478,7 +478,7 @@ export function inspectionPoint(point: any, option: any) {
let iconPath = getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
if (!bikeInfo.isUserReporting) { // 每月任务
iconPath = getImageFullPath('MAP_ICON_LIXIAN_IMAGE')
iconPath = getImageFullPath('CUSTOM_CAR_ICON_IMAGE')
}
else if (bikeInfo.isUserReporting) {
iconPath = getImageFullPath('MAP_XUNJIAN_YONGHUSHANGBAO_IMAGE')