add:1.0.2二期代码全部提交
This commit is contained in:
parent
b9f2cdda0a
commit
3260b2d01f
|
|
@ -1,13 +1,13 @@
|
|||
NODE_ENV = development
|
||||
# VITE_APP_API_BASE_URL = 'https://test-pet-admin.ifish7.com'
|
||||
VITE_APP_API_BASE_URL = 'https://pet-admin.ifish7.com'
|
||||
VITE_APP_API_BASE_URL = 'https://test-pet-admin.ifish7.com'
|
||||
# VITE_APP_API_BASE_URL = 'https://pet-admin.ifish7.com'
|
||||
# https://pet-house.ifish7.com
|
||||
# https://test-pet-house.ifish7.com/pet-house
|
||||
# https://test-pet-admin.ifish7.com
|
||||
# 是否在打包时生成 sourcemap
|
||||
VITE_BUILD_SOURCEMAP = 'false'
|
||||
# 是否在打包时删除 console 代码
|
||||
VITE_BUILD_DROP_CONSOLE = 'true'
|
||||
VITE_BUILD_DROP_CONSOLE = 'false'
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
31
src/App.vue
31
src/App.vue
|
|
@ -5,6 +5,37 @@ onLaunch(() => {
|
|||
// 挂载eventbus
|
||||
wx.eventBus = eventBus
|
||||
console.log('App Launch')
|
||||
if (typeof wx !== 'undefined' && wx.getUpdateManager) {
|
||||
const updateManager = wx.getUpdateManager();
|
||||
|
||||
updateManager.onCheckForUpdate((res) => {
|
||||
if (res.hasUpdate) {
|
||||
console.log('检测到新版本');
|
||||
}
|
||||
});
|
||||
|
||||
updateManager.onUpdateReady(function() {
|
||||
wx.showModal({
|
||||
title: '更新提示',
|
||||
content: '新版本已经准备好,是否重启应用?',
|
||||
success: function(res) {
|
||||
if (res.confirm) {
|
||||
// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
||||
updateManager.applyUpdate()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
updateManager.onUpdateFailed(function() {
|
||||
// 新版本下载失败
|
||||
wx.showModal({
|
||||
title: '已经有新版本了哟~',
|
||||
content: '新版本已经上线啦~,请您删除当前小程序,重新搜索打开哟~'
|
||||
});
|
||||
})
|
||||
|
||||
}
|
||||
})
|
||||
onShow(() => {
|
||||
console.log('App Show')
|
||||
|
|
|
|||
|
|
@ -46,3 +46,14 @@ export function carSaveCarUser(data) {
|
|||
}
|
||||
|
||||
|
||||
//一键下架
|
||||
export function carBatchDownTimes(data) {
|
||||
return request({
|
||||
url: `/api/franchisee2/car/add/downTime`,
|
||||
method: 'post',
|
||||
data
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import requestNew from '@/utils/requestNew.js';
|
|||
//获取洗护宠物详情
|
||||
export function cleaningPetInfo(id) {
|
||||
return requestNew({
|
||||
url: `/api/miniProgram/pet/petInfo?id=${id}`,
|
||||
url: `/api/pet/detail?id=${id}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ export function cleaningPetInfo(id) {
|
|||
//获取洗护宠物列表
|
||||
export function cleaningPetList(uid) {
|
||||
return requestNew({
|
||||
url: `/api/miniProgram/users/pet/petList?uid=${uid}`,
|
||||
url: `/api/pet/petList?uid=${uid}`,
|
||||
method: 'get',
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import App from "./App.vue";
|
|||
import store from './store';
|
||||
|
||||
export function createApp() {
|
||||
console.log('createApp')
|
||||
console.log('===================createApp')
|
||||
const app = createSSRApp(App);
|
||||
app.use(store);
|
||||
console.log('挂在pinia')
|
||||
|
|
|
|||
|
|
@ -25,7 +25,11 @@
|
|||
<nut-input v-model="data.info.mobile" max-length="11" input-class="nut-input-text" placeholder="请输入手机号"
|
||||
type="number" @blur="customBlurValidate('mobile')" />
|
||||
</div>
|
||||
|
||||
</nut-form-item>
|
||||
<view style="width: 700rpx; height: 20px; font-size: 13px; margin: auto; color: #cbcbcb; margin-top: 25rpx;">
|
||||
· 获得手机号方便联系用户处理售后问题
|
||||
</view>
|
||||
<!-- <nut-form-item prop="area">
|
||||
<template v-slot:label>
|
||||
<div class="nut_form_label_self">
|
||||
|
|
|
|||
|
|
@ -15,12 +15,14 @@
|
|||
{{ dateVal[0] }} >
|
||||
</div>
|
||||
</view>
|
||||
|
||||
<!-- 车辆列表-->
|
||||
<scroll-view :scroll-top="scrollTop" scroll-y="true" class="scroll-Y" @scrolltoupper="upper"
|
||||
@scrolltolower="lower" @scroll="scroll" :style="{ height: scroll_list_height + 'px' }">
|
||||
<view class="card-list" v-if="carOrderList && carOrderList.length > 0">
|
||||
<div v-for="(car, index) in carOrderList" :key="index" v-if="carOrderList && carOrderList.length > 0">
|
||||
<div class="card-item" :style="car?.occupy === '已占用' ? yellostatue : greenstatue">
|
||||
<div class="card-item"
|
||||
:style="car?.occupy === '已占用' ? yellostatue : (car?.occupy === '已下架' ? grayStatue : greenstatue)">
|
||||
<div class="icon_text_stop" v-if="car?.occupy == '未占用' && car?.dispatch == '未派单'"
|
||||
@click="handleDateItem(car)">下架</div>
|
||||
<div class="icon_text_stop" style="color:#ffcc33 ;" v-if="car?.occupy == '已下架'"
|
||||
|
|
@ -47,14 +49,20 @@
|
|||
</div>
|
||||
</div>
|
||||
<nut-popup v-model:visible="dateShow" position="bottom">
|
||||
<!-- <nut-date-picker v-model="dateVal" :min-date="min" :max-date="max" :three-dimensional="false"
|
||||
@confirm="confirm"></nut-date-picker> -->
|
||||
<nut-picker v-model="dateVal" :columns="dateOptions" :field-names="fieldNames" title="日期选择"
|
||||
@cancel="dateShow = false" @confirm="confirm"></nut-picker>
|
||||
</nut-popup>
|
||||
|
||||
|
||||
</scroll-view>
|
||||
|
||||
<view class="floating-down-button" v-if="showBatchAction" :style="floatingButtonStyle"
|
||||
@touchstart="handleTouchStart" @touchmove="handleTouchMove" @touchend="handleTouchEnd"
|
||||
@click="handleBatchDown">
|
||||
<view class="button-content">
|
||||
<img src="../../static/images/down-button.png" alt="" class="button-icon">
|
||||
<text class="button-text">一键下架</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<div class="petlist_bottom_box"></div>
|
||||
<nut-safe-area position="bottom"></nut-safe-area>
|
||||
</div>
|
||||
|
|
@ -67,44 +75,43 @@ const {
|
|||
import Selecter from '../../components/selecter'
|
||||
|
||||
import {
|
||||
ref
|
||||
ref,
|
||||
reactive,
|
||||
computed,
|
||||
watch
|
||||
} from 'vue';
|
||||
import {
|
||||
carList, carAddDownTime, carDeleteDownTime
|
||||
carList, carAddDownTime, carDeleteDownTime, carBatchDownTimes
|
||||
} from '../../api/cars';
|
||||
import {
|
||||
useSystemInfo,
|
||||
useUserInfo
|
||||
} from '@/store'
|
||||
import {
|
||||
onShow
|
||||
onShow,
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app';
|
||||
|
||||
import {
|
||||
completeTime,
|
||||
addHours
|
||||
} from '../../utils/date.js'
|
||||
const systemInfo = useSystemInfo()
|
||||
const userInfo = useUserInfo()
|
||||
|
||||
const carListVal = ref('')
|
||||
|
||||
const carListOptions = ref([])
|
||||
const dateOptions = ref([])
|
||||
const carListAll = ref([])
|
||||
|
||||
const dateShow = ref(false)
|
||||
const min = new Date(2020, 0, 1)
|
||||
const max = new Date(2025, 10, 1)
|
||||
const dateVal = ref([])
|
||||
|
||||
const carOrderList = ref([]);
|
||||
|
||||
const yellostatue = ref({
|
||||
backgroundColor: '#FFD243'
|
||||
})
|
||||
const greenstatue = ref({
|
||||
backgroundColor: '#00D237'
|
||||
})
|
||||
const grayStatue = ref({
|
||||
backgroundColor: '#CCCCCC'
|
||||
})
|
||||
|
||||
const postData = reactive({
|
||||
age: null,
|
||||
|
|
@ -116,6 +123,31 @@ const postData = reactive({
|
|||
uid: userInfo.getUid
|
||||
})
|
||||
|
||||
// 添加浮动按钮的状态
|
||||
const floatingButtonPosition = reactive({
|
||||
x: 40, // 初始右侧位置(单位rpx)
|
||||
y: 280, // 初始底部位置(单位rpx)
|
||||
isDragging: false,
|
||||
startX: 0,
|
||||
startY: 0,
|
||||
startLeft: 0,
|
||||
startTop: 0
|
||||
})
|
||||
|
||||
// 计算是否显示一键下架按钮
|
||||
const showBatchAction = computed(() => {
|
||||
if (!carOrderList.value || carOrderList.value.length === 0) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 检查所有时间段是否符合条件
|
||||
return carOrderList.value.every(item => {
|
||||
// occupy值为"未占用"或"已下架",且dispatch值为"未派单"
|
||||
return (item.occupy === '未占用' || item.occupy === '已下架') &&
|
||||
item.dispatch === '未派单';
|
||||
});
|
||||
});
|
||||
|
||||
//页面数据初始化
|
||||
onLoad(() => {
|
||||
// init()
|
||||
|
|
@ -137,6 +169,7 @@ onShow(() => {
|
|||
})
|
||||
}
|
||||
|
||||
loadButtonPosition(); // 加载保存的位置
|
||||
})
|
||||
|
||||
function init() {
|
||||
|
|
@ -163,13 +196,112 @@ function init() {
|
|||
carListVal.value = carListOptions.value[0].value
|
||||
}
|
||||
carOrderList.value = findCarDispatchList(carListAll.value, dateVal.value[0], carListVal.value)
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg || '订单排单出现异常,请联系管理员',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
//冻结
|
||||
function handleDateItem(car) {
|
||||
// 一键下架功能
|
||||
function handleBatchDown() {
|
||||
|
||||
// 如果是拖动操作,则不触发点击事件
|
||||
if (floatingButtonPosition.isDragging) {
|
||||
floatingButtonPosition.isDragging = false;
|
||||
return;
|
||||
}
|
||||
if (!showBatchAction.value) {
|
||||
uni.showToast({
|
||||
title: '不符合一键下架条件',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
// 获取所有符合条件的时段
|
||||
const eligibleTimes = carOrderList.value
|
||||
.filter(item => item.occupy === '未占用' && item.dispatch === '未派单')
|
||||
.map(item => {
|
||||
const hour = parseInt(item.time.split(':')[0], 10);
|
||||
return {
|
||||
time: item.time,
|
||||
hour: hour
|
||||
};
|
||||
});
|
||||
|
||||
if (eligibleTimes.length === 0) {
|
||||
uni.showToast({
|
||||
title: '没有可下架的时段',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
uni.showModal({
|
||||
title: '确认一键下架',
|
||||
// content: `确定要下架选中的${eligibleTimes.length}个时段吗?`,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
batchDownTimes(eligibleTimes);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// 批量下架API调用
|
||||
async function batchDownTimes(times) {
|
||||
try {
|
||||
// // 可以一次性请求或循环请求
|
||||
uni.showLoading({
|
||||
title: '正在下架...'
|
||||
});
|
||||
const params = {
|
||||
"allDay": true,
|
||||
"carId": parseInt(carListVal.value),
|
||||
"downDate": dateVal.value[0],
|
||||
"downHour": 0,
|
||||
"pageNum": 0,
|
||||
"pageSize": 0
|
||||
}
|
||||
carBatchDownTimes(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
title: `成功下架`,
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
});
|
||||
// 重新加载数据
|
||||
init();
|
||||
} else {
|
||||
uni.showToast({
|
||||
title: '部分时段下架失败',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
|
||||
|
||||
} catch (error) {
|
||||
console.error('批量下架失败:', error);
|
||||
uni.hideLoading();
|
||||
uni.showToast({
|
||||
title: '下架失败,请稍后重试',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
//单个冻结
|
||||
function handleDateItem(car) {
|
||||
let params = {
|
||||
carId: parseInt(carListVal.value),
|
||||
pageNum: 0,
|
||||
|
|
@ -177,7 +309,6 @@ function handleDateItem(car) {
|
|||
downDate: dateVal.value[0],
|
||||
downHour: parseInt(car.time.split(':')[0], 10)
|
||||
}
|
||||
console.log(params, '>>>>>111>')
|
||||
carAddDownTime(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
|
@ -189,7 +320,7 @@ function handleDateItem(car) {
|
|||
} else {
|
||||
uni.showToast({
|
||||
title: '下架失败,请稍后重试',
|
||||
icon: 'success',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
|
|
@ -204,7 +335,6 @@ function handleDeleteDateItem(car) {
|
|||
downDate: dateVal.value[0],
|
||||
downHour: parseInt(car.time.split(':')[0], 10)
|
||||
}
|
||||
console.log(params, '>>>>>111>')
|
||||
carDeleteDownTime(params).then(res => {
|
||||
if (res.code == 200) {
|
||||
uni.showToast({
|
||||
|
|
@ -216,26 +346,20 @@ function handleDeleteDateItem(car) {
|
|||
} else {
|
||||
uni.showToast({
|
||||
title: '解冻失败,请稍后重试',
|
||||
icon: 'success',
|
||||
icon: 'error',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function search(res) {
|
||||
console.log('search', text)
|
||||
}
|
||||
|
||||
//车辆选择
|
||||
function carChoose(val) {
|
||||
console.log('=========', val)
|
||||
carListVal.value = val
|
||||
carOrderList.value = findCarDispatchList(carListAll.value, dateVal.value[0], carListVal.value)
|
||||
}
|
||||
|
||||
|
||||
const scroll_list_height = systemInfo.getscreenheight - systemInfo.getnavbarheight - 46
|
||||
const scroll_list_height = systemInfo.getscreenheight - systemInfo.getnavbarheight - 46 - (showBatchAction.value ? 50 : 0)
|
||||
const scrollTop = ref(0)
|
||||
|
||||
function upper(e) {
|
||||
|
|
@ -252,46 +376,132 @@ function scroll(e) {
|
|||
}
|
||||
|
||||
//日期选择
|
||||
|
||||
function confirm({
|
||||
selectedValue,
|
||||
selectedOptions
|
||||
}) {
|
||||
console.log(selectedValue[0], selectedOptions[0])
|
||||
dateShow.value = false
|
||||
dateVal.value = [selectedValue[0]]
|
||||
const dateItem = carListAll.value.find(item => item.serviceDate === selectedValue[0]);
|
||||
|
||||
carListOptions.value = dateItem.carDispatchList.map(item => {
|
||||
console.log(item, '=====item')
|
||||
return {
|
||||
text: item.carNo,
|
||||
value: item.carId,
|
||||
|
||||
};
|
||||
});
|
||||
carListVal.value = carListOptions.value[0].value
|
||||
carOrderList.value = findCarDispatchList(carListAll.value, selectedValue[0], carListVal.value)
|
||||
}
|
||||
|
||||
|
||||
//派单数据处理
|
||||
function findCarDispatchList(data, targetDate, targetCarNo) {
|
||||
// 1. 先按 serviceDate 查找日期项
|
||||
const dateItem = data.find(item => item.serviceDate === targetDate);
|
||||
if (!dateItem) return null; // 如果日期不存在,返回 null
|
||||
// 2. 在 carDispatchList 中按 carNo 查找车辆
|
||||
if (!dateItem) return null;
|
||||
const carItem = dateItem.carDispatchList.find(car => car.carId === targetCarNo);
|
||||
console.log('1=========', carItem)
|
||||
return carItem.dispatchResults || null; // 返回找到的车辆数据(或 null)
|
||||
return carItem.dispatchResults || null;
|
||||
}
|
||||
|
||||
// 监听车辆和日期变化,重新计算scroll高度
|
||||
watch([carListVal, dateVal, showBatchAction], () => {
|
||||
scroll_list_height.value = systemInfo.getscreenheight - systemInfo.getnavbarheight - 46 - (showBatchAction.value ? 50 : 0);
|
||||
});
|
||||
|
||||
|
||||
// 计算浮动按钮的样式
|
||||
const floatingButtonStyle = computed(() => {
|
||||
return {
|
||||
left: `${floatingButtonPosition.x}rpx`,
|
||||
bottom: `${floatingButtonPosition.y}rpx`,
|
||||
transition: floatingButtonPosition.isDragging ? 'none' : 'all 0.2s ease'
|
||||
}
|
||||
})
|
||||
|
||||
// 触摸开始事件
|
||||
function handleTouchStart(e) {
|
||||
const touch = e.touches[0];
|
||||
floatingButtonPosition.isDragging = true;
|
||||
floatingButtonPosition.startX = touch.clientX;
|
||||
floatingButtonPosition.startY = touch.clientY;
|
||||
floatingButtonPosition.startLeft = floatingButtonPosition.x;
|
||||
floatingButtonPosition.startTop = floatingButtonPosition.y;
|
||||
}
|
||||
|
||||
// 触摸移动事件
|
||||
function handleTouchMove(e) {
|
||||
if (!floatingButtonPosition.isDragging) return;
|
||||
|
||||
const touch = e.touches[0];
|
||||
const deltaX = touch.clientX - floatingButtonPosition.startX;
|
||||
const deltaY = touch.clientY - floatingButtonPosition.startY;
|
||||
|
||||
// 转换为rpx(假设设计稿750rpx对应屏幕宽度)
|
||||
const screenWidth = uni.getSystemInfoSync().screenWidth;
|
||||
const rpxRatio = 750 / screenWidth;
|
||||
|
||||
const newX = floatingButtonPosition.startLeft + deltaX * rpxRatio;
|
||||
const newY = floatingButtonPosition.startTop - deltaY * rpxRatio; // 注意Y轴方向相反
|
||||
|
||||
// 限制在屏幕范围内
|
||||
const buttonWidth = 120; // 按钮宽度120rpx
|
||||
|
||||
floatingButtonPosition.x = Math.max(0, Math.min(newX, 750 - buttonWidth));
|
||||
floatingButtonPosition.y = Math.max(150, Math.min(newY, 1200)); // 限制在适当范围内
|
||||
}
|
||||
|
||||
// 触摸结束事件
|
||||
function handleTouchEnd() {
|
||||
if (!floatingButtonPosition.isDragging) return;
|
||||
|
||||
floatingButtonPosition.isDragging = false;
|
||||
|
||||
// 添加吸附到边缘的效果
|
||||
const screenWidth = 750; // rpx单位
|
||||
const buttonWidth = 120;
|
||||
|
||||
// 如果距离左右边缘较近,则吸附到边缘
|
||||
if (floatingButtonPosition.x < screenWidth / 2) {
|
||||
floatingButtonPosition.x = 20; // 吸附到左边缘
|
||||
} else {
|
||||
floatingButtonPosition.x = screenWidth - buttonWidth - 20; // 吸附到右边缘
|
||||
}
|
||||
|
||||
// 保存位置到本地存储(可选)
|
||||
// saveButtonPosition();
|
||||
}
|
||||
|
||||
// 保存按钮位置到本地存储(可选功能)
|
||||
function saveButtonPosition() {
|
||||
try {
|
||||
uni.setStorageSync('floatingButtonPosition', {
|
||||
x: floatingButtonPosition.x,
|
||||
y: floatingButtonPosition.y
|
||||
});
|
||||
} catch (e) {
|
||||
console.error('保存按钮位置失败:', e);
|
||||
}
|
||||
}
|
||||
|
||||
// 加载保存的按钮位置(在onLoad或onShow中调用)
|
||||
function loadButtonPosition() {
|
||||
try {
|
||||
const savedPosition = uni.getStorageSync('floatingButtonPosition');
|
||||
if (savedPosition) {
|
||||
floatingButtonPosition.x = savedPosition.x;
|
||||
floatingButtonPosition.y = savedPosition.y;
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载按钮位置失败:', e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.hometitle {
|
||||
color: $uni-text-color;
|
||||
font-size: 20px;
|
||||
/* font-family: 'Douyin Sans-Bold'; */
|
||||
}
|
||||
|
||||
.container {
|
||||
|
|
@ -348,6 +558,61 @@ function findCarDispatchList(data, targetDate, targetCarNo) {
|
|||
}
|
||||
}
|
||||
|
||||
/* 悬浮在右下角的按钮 - 图片文字上下布局 */
|
||||
.floating-down-button {
|
||||
position: fixed;
|
||||
right: 40rpx;
|
||||
bottom: 280rpx;
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: linear-gradient(135deg, #698EFF 0%, #573FFF 100%);
|
||||
border-radius: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 6rpx 20rpx rgba(105, 142, 255, 0.4);
|
||||
z-index: 1000;
|
||||
cursor: pointer;
|
||||
|
||||
/* 移除默认按钮样式 */
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.button-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
.button-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-bottom: 8rpx;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
line-height: 1.2;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
/* 点击效果 */
|
||||
&:active {
|
||||
opacity: 0.9;
|
||||
transform: translateY(2rpx) scale(0.98);
|
||||
box-shadow: 0 4rpx 12rpx rgba(105, 142, 255, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.arrow {
|
||||
display: inline-block;
|
||||
width: 0;
|
||||
|
|
@ -388,7 +653,6 @@ function findCarDispatchList(data, targetDate, targetCarNo) {
|
|||
height: 55rpx;
|
||||
align-content: center;
|
||||
align-items: center;
|
||||
// justify-content: center;
|
||||
padding-left: 80rpx;
|
||||
}
|
||||
}
|
||||
|
|
@ -471,4 +735,70 @@ function findCarDispatchList(data, targetDate, targetCarNo) {
|
|||
height: 128rpx;
|
||||
background-color: #F3F3F3;
|
||||
}
|
||||
|
||||
/* 修改浮动按钮样式,添加拖动相关样式 */
|
||||
.floating-down-button {
|
||||
position: fixed;
|
||||
/* 移除原来的right和bottom定位,改为通过style动态设置 */
|
||||
width: 120rpx;
|
||||
height: 120rpx;
|
||||
background: linear-gradient(135deg, #698EFF 0%, #573FFF 100%);
|
||||
border-radius: 60rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-shadow: 0 6rpx 20rpx rgba(105, 142, 255, 0.4);
|
||||
z-index: 1000;
|
||||
cursor: pointer;
|
||||
touch-action: none;
|
||||
/* 防止页面滚动 */
|
||||
user-select: none;
|
||||
/* 防止文本选择 */
|
||||
|
||||
/* 添加拖动时的样式 */
|
||||
&.dragging {
|
||||
opacity: 0.9;
|
||||
box-shadow: 0 10rpx 30rpx rgba(105, 142, 255, 0.6);
|
||||
}
|
||||
|
||||
&::after {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.button-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
pointer-events: none;
|
||||
/* 防止内容层干扰拖动 */
|
||||
|
||||
.button-icon {
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
margin-bottom: 8rpx;
|
||||
display: block;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.button-text {
|
||||
color: #FFFFFF;
|
||||
font-size: 22rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
line-height: 1.2;
|
||||
display: block;
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* 点击效果 */
|
||||
&:active {
|
||||
opacity: 0.9;
|
||||
transform: translateY(2rpx) scale(0.98);
|
||||
box-shadow: 0 4rpx 12rpx rgba(105, 142, 255, 0.4);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -183,11 +183,11 @@ function init(isadd) {
|
|||
refreshKey.value++
|
||||
}
|
||||
})
|
||||
systemConfigInfo({}).then(res => {
|
||||
if (res.code === 200) {
|
||||
phoneNumber.value = res.data.systemInfos.find(x => x.name === '客服电话')
|
||||
}
|
||||
})
|
||||
// systemConfigInfo({}).then(res => {
|
||||
// if (res.code === 200) {
|
||||
// phoneNumber.value = res.data.systemInfos.find(x => x.name === '客服电话')
|
||||
// }
|
||||
// })
|
||||
} catch (error) {
|
||||
console.error('加载订单失败:', error)
|
||||
showOrderList.value = []
|
||||
|
|
|
|||
|
|
@ -212,6 +212,12 @@
|
|||
orderServiceTimeList.info.push(result)
|
||||
}
|
||||
console.log(orderServiceTimeList, 'res.data.times')
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg || '订单排单出现异常,请联系管理员',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -190,6 +190,12 @@ function getorderServiceTime() {
|
|||
orderServiceTimeList.info.push(result)
|
||||
}
|
||||
console.log(orderServiceTimeList, 'res.data.times')
|
||||
}else{
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: res.msg || '订单排单出现异常,请联系管理员',
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
Loading…
Reference in New Issue