Compare commits
13 Commits
a9f103dffa
...
697785f30c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
697785f30c | ||
| f272a57aa3 | |||
| 6eadcb46cd | |||
| df5e9e92a1 | |||
| 2682b933f1 | |||
| bd953e9e10 | |||
| 2f05a40918 | |||
| 91b2f4094c | |||
| bb7b6d5c35 | |||
| 4d12c76589 | |||
| fbaa732388 | |||
| a3aabc2752 | |||
| 5e981b6de3 |
@@ -1,87 +1,89 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="create-service-order">
|
<view class="create-service-order">
|
||||||
<view class="create-service-wrapper">
|
<view
|
||||||
<view class="order-header">
|
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
|
||||||
<text>创建服务工单</text>
|
>
|
||||||
|
<view
|
||||||
|
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-EEF8FF"
|
||||||
|
>
|
||||||
|
<text class="font-size-18 font-500 color-171717 text-left ml-12">
|
||||||
|
{{ isCallSuccess ? "服务已创建" : "呼叫服务" }}
|
||||||
|
</text>
|
||||||
|
<image
|
||||||
|
class="header-icon"
|
||||||
|
src="https://oss.nianxx.cn/mp/static/version_101/home/feedback.png"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-content">
|
|
||||||
<view class="order-item">
|
<view v-if="!isCallSuccess" class="order-content border-box p-12">
|
||||||
<image src="./images/icon_service.png" class="order-icon"></image>
|
<view
|
||||||
<uni-data-select
|
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
|
||||||
v-if="!isCallSuccess && workOrderTypeList.length > 0"
|
>
|
||||||
class="order-select"
|
<text class="font-500 line-height-22 mr-20">房间号</text>
|
||||||
placeholder="请选择服务工单"
|
<input placeholder="请填写房间号" v-model="roomId" />
|
||||||
v-model="workOrderTypeName"
|
|
||||||
:localdata="workOrderTypeListSelectData"
|
|
||||||
@change="changeWorkOrderType"
|
|
||||||
></uni-data-select>
|
|
||||||
<text v-else class="order-description">{{ workOrderTypeName }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="order-line"></view>
|
|
||||||
<view class="order-details">
|
|
||||||
<view class="detail-item">
|
|
||||||
<text class="detail-label">房间号:</text>
|
|
||||||
<input
|
|
||||||
v-if="!isCallSuccess"
|
|
||||||
class="detail-input"
|
|
||||||
placeholder="请填写房间号"
|
|
||||||
v-model="roomId"
|
|
||||||
/>
|
|
||||||
<text v-else class="detail-value">{{ roomId }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="detail-item">
|
|
||||||
<text class="detail-label">服务时间:</text>
|
|
||||||
<text class="detail-value">2025-08-11 14:00</text>
|
|
||||||
</view>
|
|
||||||
<view class="detail-item">
|
|
||||||
<text class="detail-label">联系房客:</text>
|
|
||||||
<!-- 呼叫成功后显示为文本,否则显示输入框 -->
|
|
||||||
<input
|
|
||||||
v-if="!isCallSuccess"
|
|
||||||
class="detail-input"
|
|
||||||
placeholder="请填写联系人"
|
|
||||||
v-model="contactName"
|
|
||||||
/>
|
|
||||||
<text v-else class="detail-value">{{ contactName }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="detail-item">
|
|
||||||
<text class="detail-label">联系电话:</text>
|
|
||||||
<!-- 呼叫成功后显示为文本,否则显示输入框 -->
|
|
||||||
<input
|
|
||||||
v-if="!isCallSuccess"
|
|
||||||
class="detail-input"
|
|
||||||
placeholder="请填写联系电话"
|
|
||||||
v-model="contactPhone"
|
|
||||||
/>
|
|
||||||
<text v-else class="detail-value">{{ contactPhone }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 呼叫前显示立即呼叫按钮 -->
|
<view
|
||||||
<button v-if="!isCallSuccess" class="order-button" @click="handleCall">
|
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
|
||||||
立即呼叫
|
>
|
||||||
</button>
|
<text class="font-500 line-height-22 mr-20">联系电话</text>
|
||||||
|
<input placeholder="请填写联系电话" v-model="contactPhone" />
|
||||||
|
</view>
|
||||||
|
|
||||||
<!-- 呼叫成功后显示两个按钮 -->
|
<view
|
||||||
<view v-else class="order-buttons">
|
class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12"
|
||||||
<button class="order-button-secondary" @click="viewWorkOrder">
|
>
|
||||||
查看工单
|
<view class="font-500 line-height-22 mb-12">需求信息描述</view>
|
||||||
</button>
|
<textarea
|
||||||
<button
|
class="h-80"
|
||||||
v-if="!isMarkCompleted"
|
placeholder="请输入需求信息描述"
|
||||||
class="order-button-primary"
|
placeholder-class="font-size-14 font-400"
|
||||||
@click="markCompleted"
|
maxlength="100"
|
||||||
|
v-model="contactText"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12"
|
||||||
|
>
|
||||||
|
<view class="font-500 line-height-22 mb-12">照片上传</view>
|
||||||
|
<view
|
||||||
|
class="bg-white p-24 rounded-5 inline-block"
|
||||||
|
@click="handleChooseImage"
|
||||||
>
|
>
|
||||||
已完成
|
<uni-icons fontFamily="znicons" size="24" color="#6A717F">
|
||||||
</button>
|
{{ zniconsMap["zn-camera"] }}
|
||||||
|
</uni-icons>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="footer-help">
|
<view v-else class="border-box card-content flex flex-items-center p-12">
|
||||||
<image src="./images/icon_volume.png" class="help-icon"></image>
|
<view class="border-box left flex-full pr-20">
|
||||||
<text class="help-text">没解决问题?给我打电话吧!</text>
|
<view class="font-size-12 color-525866 line-height-20 mb-4"
|
||||||
<text class="help-phone" @click="makePhoneCall">15185111210</text>
|
>房间号:{{ roomId }}</view
|
||||||
|
>
|
||||||
|
<view class="font-size-12 color-525866 line-height-20 mb-4"
|
||||||
|
>联系方式: {{ contactPhone }}</view
|
||||||
|
>
|
||||||
|
<view class="font-size-12 color-525866 line-height-20 ellipsis-2"
|
||||||
|
>需求描述: {{ contactText }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<image
|
||||||
|
class="right rounded-6"
|
||||||
|
src="https://picsum.photos/300/300"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view
|
||||||
|
class="btn rounded-50 color-white bg-button flex flex-items-center flex-justify-center ml-12 mr-12 mb-12"
|
||||||
|
@click="handleCall"
|
||||||
|
>
|
||||||
|
{{ isCallSuccess ? "查看服务" : "立即呼叫" }}
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
@@ -89,49 +91,51 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, nextTick } from "vue";
|
import { ref, onMounted, nextTick } from "vue";
|
||||||
import { SCROLL_TO_BOTTOM } from "@/constant/constant";
|
import { SCROLL_TO_BOTTOM } from "@/constant/constant";
|
||||||
|
import { createWorkOrder } from "@/request/api/OrderApi";
|
||||||
|
import { updateImageFile } from "@/request/api/UpdateFile";
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
|
||||||
import {
|
|
||||||
createWorkOrder,
|
|
||||||
workOrderTypeListForBiz,
|
|
||||||
} from "@/request/api/OrderApi";
|
|
||||||
const workOrderTypeId = ref("");
|
const workOrderTypeId = ref("");
|
||||||
const workOrderTypeName = ref("");
|
|
||||||
const roomId = ref("");
|
const roomId = ref("");
|
||||||
const contactName = ref("");
|
|
||||||
const contactPhone = ref("");
|
const contactPhone = ref("");
|
||||||
|
const contactText = ref("");
|
||||||
|
const contentImgUrl = ref("");
|
||||||
const isCallSuccess = ref(false); // 呼叫成功状态
|
const isCallSuccess = ref(false); // 呼叫成功状态
|
||||||
const workOrderId = ref(0); // 工单ID
|
const workOrderId = ref(0); // 工单ID
|
||||||
const workOrderTypeList = ref([]);
|
|
||||||
const workOrderTypeListSelectData = ref([]);
|
|
||||||
const isMarkCompleted = ref(false);
|
|
||||||
|
|
||||||
const changeWorkOrderType = (index) => {
|
// 处理图片上传
|
||||||
if (index < 0 || index >= workOrderTypeListSelectData.value.length) {
|
const handleChooseImage = () => {
|
||||||
|
console.log("选择图片");
|
||||||
|
uni.chooseImage({
|
||||||
|
count: 1,
|
||||||
|
success: (res) => {
|
||||||
|
const file = res.tempFilePaths[0];
|
||||||
|
updateImagehandle(file);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error("选择图片失败:", err);
|
||||||
|
uni.showToast({
|
||||||
|
title: "选择图片失败",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
const updateImagehandle = (file) => {
|
||||||
|
if (!file) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const item = workOrderTypeList.value[index];
|
updateImageFile(file).then((res) => {
|
||||||
console.log("item:", item);
|
contentImgUrl.value = res.data?.url || "";
|
||||||
workOrderTypeId.value = item.id;
|
});
|
||||||
workOrderTypeName.value = item.workOrderTypeName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleCall = async () => {
|
const handleCall = async () => {
|
||||||
// 验证输入
|
if (isCallSuccess.value) {
|
||||||
if (!roomId.value.trim()) {
|
// 查看工单
|
||||||
uni.showToast({
|
viewWorkOrder();
|
||||||
title: "请填写房间号",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000,
|
|
||||||
});
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!contactName.value.trim()) {
|
|
||||||
uni.showToast({
|
|
||||||
title: "请填写联系人",
|
|
||||||
icon: "none",
|
|
||||||
duration: 2000,
|
|
||||||
});
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -144,6 +148,15 @@ const handleCall = async () => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!contactText.value.trim()) {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请填写需求信息描述内容",
|
||||||
|
icon: "none",
|
||||||
|
duration: 2000,
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sendCreateWorkOrder();
|
sendCreateWorkOrder();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -151,33 +164,34 @@ const handleCall = async () => {
|
|||||||
const sendCreateWorkOrder = async () => {
|
const sendCreateWorkOrder = async () => {
|
||||||
try {
|
try {
|
||||||
const res = await createWorkOrder({
|
const res = await createWorkOrder({
|
||||||
contactName: contactName.value,
|
|
||||||
contactPhone: contactPhone.value,
|
|
||||||
workOrderTypeId: workOrderTypeId.value,
|
workOrderTypeId: workOrderTypeId.value,
|
||||||
roomId: roomId.value,
|
roomId: roomId.value,
|
||||||
|
contactPhone: contactPhone.value,
|
||||||
|
content: contactText.value,
|
||||||
|
contentImgUrl: contentImgUrl.value,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
// 保存工单ID
|
// 保存工单ID
|
||||||
workOrderId.value = res.data?.id || "";
|
workOrderId.value = res.data?.id || "";
|
||||||
|
|
||||||
// 设置呼叫成功状态
|
// 设置成功状态
|
||||||
isCallSuccess.value = true;
|
isCallSuccess.value = true;
|
||||||
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "工单创建成功",
|
title: "呼叫成功",
|
||||||
icon: "success",
|
icon: "success",
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.message || "创建工单失败",
|
title: res.message || "呼叫失败",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("创建工单失败:", error);
|
console.error("呼叫失败:", error);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "网络错误,请重试",
|
title: "网络错误,请重试",
|
||||||
icon: "none",
|
icon: "none",
|
||||||
@@ -186,25 +200,6 @@ const sendCreateWorkOrder = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/// 获取工单类型
|
|
||||||
const getWorkOrderType = async () => {
|
|
||||||
const res = await workOrderTypeListForBiz();
|
|
||||||
if (res.code === 0) {
|
|
||||||
workOrderTypeList.value = res.data;
|
|
||||||
workOrderTypeList.value.forEach((item, index) => {
|
|
||||||
workOrderTypeListSelectData.value.push({
|
|
||||||
value: index,
|
|
||||||
text: item.workOrderTypeName,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
if (workOrderTypeList.value.length > 0) {
|
|
||||||
workOrderTypeId.value = workOrderTypeList.value[0].id;
|
|
||||||
workOrderTypeName.value = workOrderTypeList.value[0].workOrderTypeName;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 查看工单
|
// 查看工单
|
||||||
const viewWorkOrder = () => {
|
const viewWorkOrder = () => {
|
||||||
console.log("查看工单:", workOrderId.value);
|
console.log("查看工单:", workOrderId.value);
|
||||||
@@ -214,35 +209,7 @@ const viewWorkOrder = () => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// 标记已完成
|
|
||||||
const markCompleted = () => {
|
|
||||||
console.log("标记工单已完成:", workOrderId.value);
|
|
||||||
uni.showModal({
|
|
||||||
title: "确认完成",
|
|
||||||
content: "确认标记此工单为已完成吗?",
|
|
||||||
success: (res) => {
|
|
||||||
if (res.confirm) {
|
|
||||||
isMarkCompleted.value = true;
|
|
||||||
// 这里可以调用API标记工单完成
|
|
||||||
uni.showToast({
|
|
||||||
title: "工单已完成",
|
|
||||||
icon: "success",
|
|
||||||
duration: 2000,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const makePhoneCall = () => {
|
|
||||||
// 使用 uniapp 的 API 拨打电话
|
|
||||||
uni.makePhoneCall({
|
|
||||||
phoneNumber: "15185111210",
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getWorkOrderType();
|
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.$emit(SCROLL_TO_BOTTOM, true);
|
uni.$emit(SCROLL_TO_BOTTOM, true);
|
||||||
|
|||||||
@@ -1,179 +1,25 @@
|
|||||||
.create-service-wrapper {
|
|
||||||
padding: 12px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-header {
|
.order-header {
|
||||||
font-size: $uni-font-size-base;
|
height: 48px;
|
||||||
font-weight: 500;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
color: $uni-text-color;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-icon {
|
||||||
|
width: 98px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
.order-content {
|
.order-content {
|
||||||
width: 100%;
|
width: 335px;
|
||||||
box-sizing: border-box;
|
|
||||||
background-color: #fff;
|
|
||||||
padding: 12px;
|
|
||||||
border-radius: 8px;
|
|
||||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-icon {
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
margin-right: 8px;
|
|
||||||
border-radius: $uni-border-radius-circle;
|
|
||||||
background-color: #ffa500;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-description {
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
font-weight: 500;
|
|
||||||
color: $uni-text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-line {
|
|
||||||
position: relative;
|
|
||||||
border: 1px dashed #eeeeee;
|
|
||||||
margin-left: -12px;
|
|
||||||
margin-right: -12px;
|
|
||||||
|
|
||||||
&::before,
|
|
||||||
&::after {
|
|
||||||
content: "";
|
|
||||||
position: absolute;
|
|
||||||
top: -8px;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
border-radius: $uni-border-radius-50px;
|
|
||||||
background-color: #eff6fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
left: -8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
&::after {
|
|
||||||
right: -8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-details {
|
|
||||||
margin-top: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: $uni-text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-label {
|
|
||||||
width: 70px;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-value {
|
|
||||||
color: $uni-text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.detail-input {
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
width: calc(100% - 80px);
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: $uni-text-color;
|
|
||||||
border-bottom: 1px solid #ddd;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-select {
|
|
||||||
border: none;
|
|
||||||
outline: none;
|
|
||||||
width: 100%;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: $uni-text-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.order-button {
|
|
||||||
width: 300px;
|
|
||||||
height: 42px;
|
|
||||||
background: linear-gradient(90deg, #ff7e00, #ffba00);
|
|
||||||
color: #fff;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 20px;
|
|
||||||
margin-top: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 呼叫成功后的按钮容器
|
|
||||||
.order-buttons {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
margin-top: 20px;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 查看工单按钮(次要按钮)
|
|
||||||
.order-button-secondary {
|
|
||||||
flex: 1;
|
|
||||||
height: 42px;
|
|
||||||
background: linear-gradient(90deg, #0256ff, #00a6ff);
|
|
||||||
color: #fff;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
font-weight: 600;
|
|
||||||
border: none;
|
|
||||||
border-radius: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 已完成按钮(主要按钮)
|
|
||||||
.order-button-primary {
|
|
||||||
flex: 1;
|
|
||||||
height: 42px;
|
|
||||||
background: linear-gradient(90deg, #ff7e00, #ffba00);
|
|
||||||
color: #fff;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
font-weight: 600;
|
|
||||||
border-radius: 20px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.footer-help {
|
|
||||||
margin-bottom: 12px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: #ed6a0c;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-icon {
|
.help-icon {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 14px;
|
height: 16px;
|
||||||
margin-right: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-text {
|
.btn {
|
||||||
margin-right: 5px;
|
height: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.help-phone {
|
.right {
|
||||||
cursor: pointer;
|
height: 88px;
|
||||||
|
width: 88px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,38 +3,39 @@
|
|||||||
<view
|
<view
|
||||||
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
|
class="w-full bg-white border-box border-ff overflow-hidden rounded-20"
|
||||||
>
|
>
|
||||||
<image
|
<view
|
||||||
class="order-header w-full"
|
class="border-box order-header w-vw flex flex-items-center flex-justify-between bg-EEF8FF"
|
||||||
src="https://oss.nianxx.cn/mp/static/version_101/home/feedback_1.png"
|
>
|
||||||
mode="aspectFill"
|
<text class="font-size-18 font-500 color-171717 text-left ml-12">
|
||||||
/>
|
{{ isCallSuccess ? "反馈已创建" : "反馈意见" }}
|
||||||
<view class="order-content border-box p-12">
|
</text>
|
||||||
|
<image
|
||||||
|
class="header-icon"
|
||||||
|
src="https://oss.nianxx.cn/mp/static/version_101/home/feedback.png"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view v-if="!isCallSuccess" class="order-content border-box p-12">
|
||||||
<view
|
<view
|
||||||
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
|
class="bg-F5F7FA border-box flex flex-items-center p-12 rounded-10 font-size-14 color-171717 mb-12"
|
||||||
>
|
>
|
||||||
<text class="font-500 line-height-22 mr-20">联系电话</text>
|
<text class="font-500 line-height-22 mr-20">联系电话</text>
|
||||||
<input
|
<input placeholder="请填写联系电话" v-model="contactPhone" />
|
||||||
v-if="!isCallSuccess"
|
|
||||||
placeholder="请填写联系电话"
|
|
||||||
v-model="contactPhone"
|
|
||||||
/>
|
|
||||||
<text v-else class="detail-value">{{ contactPhone }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
<view
|
<view
|
||||||
class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12"
|
class="bg-F5F7FA border-box p-12 rounded-10 font-size-14 font-500 color-171717 mb-12"
|
||||||
>
|
>
|
||||||
<view class="font-500 line-height-22 mb-12">意见内容</view>
|
<view class="font-500 line-height-22 mb-12">意见内容</view>
|
||||||
<textarea
|
<textarea
|
||||||
v-if="!isCallSuccess"
|
class="h-80"
|
||||||
placeholder="请输入反馈意见"
|
placeholder="请输入反馈意见"
|
||||||
|
placeholder-class="font-size-14 font-400"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
v-model="contactText"
|
v-model="contactText"
|
||||||
/>
|
/>
|
||||||
<text v-else class="detail-value">{{ contactText }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view
|
||||||
v-if="!isCallSuccess"
|
|
||||||
class="btn rounded-50 color-white bg-button flex flex-items-center flex-justify-center"
|
class="btn rounded-50 color-white bg-button flex flex-items-center flex-justify-center"
|
||||||
@click="handleCall"
|
@click="handleCall"
|
||||||
>
|
>
|
||||||
@@ -42,9 +43,16 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view
|
<view v-else class="border-box left flex-full p-12">
|
||||||
class="footer-help flex flex-items-center flex-justify-center mb-12"
|
<view class="font-size-12 color-525866 line-height-20 mb-4"
|
||||||
>
|
>联系方式: {{ contactPhone }}</view
|
||||||
|
>
|
||||||
|
<view class="font-size-12 color-525866 line-height-20 ellipsis-2"
|
||||||
|
>意见内容: {{ contactText }}</view
|
||||||
|
>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<view class="footer-help flex flex-items-center pl-12 mb-12">
|
||||||
<image class="help-icon mr-4" src="./images/icon_volume.png" />
|
<image class="help-icon mr-4" src="./images/icon_volume.png" />
|
||||||
<text class="font-size-12 font-500 color-FA7319">
|
<text class="font-size-12 font-500 color-FA7319">
|
||||||
{{ appName }}收到您的意见将第一时间为您处理!
|
{{ appName }}收到您的意见将第一时间为您处理!
|
||||||
|
|||||||
@@ -2,6 +2,11 @@
|
|||||||
height: 48px;
|
height: 48px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-icon {
|
||||||
|
width: 98px;
|
||||||
|
height: 48px;
|
||||||
|
}
|
||||||
|
|
||||||
.order-content {
|
.order-content {
|
||||||
width: 335px;
|
width: 335px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="mt-16">
|
||||||
<view v-if="goodsData.commodityPurchaseInstruction" class="use-notice">
|
<view v-if="goodsData.commodityPurchaseInstruction">
|
||||||
<ModuleTitle
|
<ModuleTitle
|
||||||
v-if="showTitle"
|
v-if="showTitle"
|
||||||
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
:title="goodsData.commodityPurchaseInstruction.templateTitle"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
class="use-notice-content"
|
|
||||||
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
v-for="(moduleItem, index) in goodsData.commodityPurchaseInstruction
|
||||||
.commodityPurchaseInstructionModuleEntityList"
|
.commodityPurchaseInstructionModuleEntityList"
|
||||||
:key="index"
|
:key="index"
|
||||||
>
|
>
|
||||||
<view
|
<view
|
||||||
class="module-item"
|
class="flex flex-items-start flex-col pt-12 pb-12"
|
||||||
:class="{
|
:class="{
|
||||||
'border-bottom':
|
'border-bottom':
|
||||||
index <
|
index <
|
||||||
@@ -21,13 +20,18 @@
|
|||||||
1,
|
1,
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<view class="module-icon">
|
<view class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
||||||
<uni-icons fontFamily="znicons" size="20" color="#333">{{
|
<uni-icons fontFamily="znicons" size="20" color="#333">{{
|
||||||
zniconsMap[moduleItem.moduleIcon]
|
zniconsMap[moduleItem.moduleIcon]
|
||||||
}}</uni-icons>
|
}}</uni-icons>
|
||||||
<text class="module-title">{{ moduleItem.moduleTitle }}</text>
|
<text class="font-size-14 color-171717 line-height-20">{{
|
||||||
|
moduleItem.moduleTitle
|
||||||
|
}}</text>
|
||||||
</view>
|
</view>
|
||||||
<text class="module-desc">{{ moduleItem.moduleContent }}</text>
|
<text
|
||||||
|
class="flex-full font-size-12 color-525866 line-height-20 mt-4"
|
||||||
|
>{{ moduleItem.moduleContent }}</text
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -58,5 +62,8 @@ const props = defineProps({
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@import "./styles/index.scss";
|
@font-face {
|
||||||
|
font-family: znicons;
|
||||||
|
src: url("@/static/fonts/znicons.ttf");
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1,40 +0,0 @@
|
|||||||
// 使用须知样式
|
|
||||||
.use-notice {
|
|
||||||
margin: 16px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.use-notice-content {
|
|
||||||
.module-item {
|
|
||||||
display: flex;
|
|
||||||
align-items: flex-start;
|
|
||||||
flex-direction: column;
|
|
||||||
padding: 12px 0;
|
|
||||||
|
|
||||||
.module-icon {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: 8px;
|
|
||||||
flex-shrink: 0;
|
|
||||||
|
|
||||||
.module-title {
|
|
||||||
font-size: $uni-font-size-base;
|
|
||||||
color: $uni-text-color;
|
|
||||||
text-align: center;
|
|
||||||
word-wrap: break-word;
|
|
||||||
margin-left: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-desc {
|
|
||||||
flex: 1;
|
|
||||||
font-size: $uni-font-size-sm;
|
|
||||||
color: #666;
|
|
||||||
line-height: 1.5;
|
|
||||||
margin-top: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.border-bottom {
|
|
||||||
border-bottom: 1px solid #f0f0f0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -22,10 +22,6 @@
|
|||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
|
|
||||||
<view class="custom-indicator">
|
|
||||||
图片{{ active + 1 }}/{{ thumbnails.length }}
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 缩略图部分 -->
|
<!-- 缩略图部分 -->
|
||||||
<view
|
<view
|
||||||
v-if="showThumbnails"
|
v-if="showThumbnails"
|
||||||
@@ -52,16 +48,26 @@
|
|||||||
:src="thumb.photoUrl"
|
:src="thumb.photoUrl"
|
||||||
mode="aspectFill"
|
mode="aspectFill"
|
||||||
></image>
|
></image>
|
||||||
<text>{{ thumb.photoName }}</text>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
|
<view class="custom-indicator">
|
||||||
|
<uni-icons fontFamily="znicons" size="10" color="#fff">{{
|
||||||
|
zniconsMap["zn-camera"]
|
||||||
|
}}</uni-icons>
|
||||||
|
<text class="custom-indicator-text">{{ thumbnails.length }}</text>
|
||||||
|
<uni-icons fontFamily="znicons" size="10" color="#fff">{{
|
||||||
|
zniconsMap["zn-nav-arrow-right"]
|
||||||
|
}}</uni-icons>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed, nextTick } from "vue";
|
import { ref, computed, nextTick } from "vue";
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
|
||||||
// Props定义
|
// Props定义
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
|
|||||||
@@ -1,3 +1,8 @@
|
|||||||
|
@font-face {
|
||||||
|
font-family: znicons;
|
||||||
|
src: url("@/static/fonts/znicons.ttf");
|
||||||
|
}
|
||||||
|
|
||||||
.image-swiper {
|
.image-swiper {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -13,27 +18,32 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.custom-indicator {
|
|
||||||
position: absolute;
|
|
||||||
top: 8px;
|
|
||||||
right: 8px;
|
|
||||||
z-index: 10;
|
|
||||||
background: rgba(0, 0, 0, 0.5);
|
|
||||||
border-radius: $uni-border-radius-50px;
|
|
||||||
padding: 3px 8px;
|
|
||||||
font-size: 8px;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.thumbnail-box {
|
.thumbnail-box {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 12px;
|
left: 12px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
height: 60px;
|
display: flex;
|
||||||
|
align-items: flex-end;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-indicator {
|
||||||
|
margin-left: 12px;
|
||||||
|
background: rgba(0, 0, 0, 0.5);
|
||||||
|
border-radius: $uni-border-radius-50px;
|
||||||
|
padding: 0 6px 4px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.custom-indicator-text {
|
||||||
|
margin: 0 4px;
|
||||||
|
font-size: 10px;
|
||||||
|
text-align: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-scroll {
|
.thumbnail-scroll {
|
||||||
width: 100%;
|
flex: 1;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
@@ -42,7 +52,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
padding: 0 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-item {
|
.thumbnail-item {
|
||||||
@@ -52,29 +61,17 @@
|
|||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
.thumbnail-image {
|
.thumbnail-image {
|
||||||
border: 1px solid #fff;
|
border: 2px solid #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-item .thumbnail-image {
|
.thumbnail-item .thumbnail-image {
|
||||||
width: 48px;
|
width: 36px;
|
||||||
height: 38px;
|
height: 36px;
|
||||||
border-radius: 4px;
|
border-radius: 8px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid transparent;
|
border: 2px solid transparent;
|
||||||
transition: all 0.3s ease;
|
transition: all 0.3s ease;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thumbnail-item text {
|
|
||||||
color: #fff;
|
|
||||||
font-size: 8px;
|
|
||||||
display: block;
|
|
||||||
margin-top: 4px;
|
|
||||||
transition: all 0.3s ease;
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
max-width: 48px;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
.module-title {
|
.module-title {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #000;
|
color: #171717;
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export const CompName = {
|
|||||||
// 快速预定卡片
|
// 快速预定卡片
|
||||||
quickBookingCard: "quickBookingCard",
|
quickBookingCard: "quickBookingCard",
|
||||||
// 服务工单卡片
|
// 服务工单卡片
|
||||||
createWorkOrderCard: "createWorkOrderCard",
|
callServiceCard: "callServiceCard",
|
||||||
// 意见反馈卡片
|
// 意见反馈卡片
|
||||||
feedbackCard: "feedbackCard",
|
feedbackCard: "feedbackCard",
|
||||||
// 探索发现卡片
|
// 探索发现卡片
|
||||||
@@ -37,7 +37,7 @@ export const Command = {
|
|||||||
// 探索发现
|
// 探索发现
|
||||||
discovery: "Command.discovery",
|
discovery: "Command.discovery",
|
||||||
// 呼叫服务
|
// 呼叫服务
|
||||||
createWorkOrderCard: "Command.createWorkOrderCard",
|
callServiceCard: "Command.callServiceCard",
|
||||||
// 更多
|
// 更多
|
||||||
more: "Command.more",
|
more: "Command.more",
|
||||||
// 我的订单
|
// 我的订单
|
||||||
|
|||||||
47
src/pages/goods/components/GoodFacility/index.vue
Normal file
47
src/pages/goods/components/GoodFacility/index.vue
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
<template>
|
||||||
|
<view class="mt-16">
|
||||||
|
<view
|
||||||
|
v-for="(moduleItem, index) in goodsData.commodityEquipment"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
class="flex flex-items-start flex-col pt-12 pb-12"
|
||||||
|
:class="{
|
||||||
|
'border-bottom': index < goodsData.commodityEquipment.length - 1,
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view class="flex flex-items-center flex-row flex-shrink-0 mr-8">
|
||||||
|
<uni-icons fontFamily="znicons" size="20" color="#171717">{{
|
||||||
|
zniconsMap[moduleItem.icon]
|
||||||
|
}}</uni-icons>
|
||||||
|
<text class="font-size-12 color-171717 line-height-20">{{
|
||||||
|
moduleItem.title
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
<text class="flex-full font-size-12 color-525866 line-height-20 mt-4">{{
|
||||||
|
moduleItem.desc
|
||||||
|
}}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
import { defineProps } from "vue";
|
||||||
|
|
||||||
|
// Props定义
|
||||||
|
const props = defineProps({
|
||||||
|
goodsData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => ({}),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
@font-face {
|
||||||
|
font-family: znicons;
|
||||||
|
src: url("@/static/fonts/znicons.ttf");
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,14 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="goods-container">
|
<view class="goods-container bg-gray">
|
||||||
<TopNavBar title="商品详情" />
|
<TopNavBar
|
||||||
|
title="商品详情"
|
||||||
|
:backgroundColor="`rgba(217, 238, 255, ${navOpacity})`"
|
||||||
|
:titleColor="navOpacity < 0.5 ? '#ffffff' : '#000000'"
|
||||||
|
:backIconColor="navOpacity < 0.5 ? '#ffffff' : '#000000'"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 滚动区域 -->
|
<!-- 滚动区域 -->
|
||||||
<scroll-view class="content-wrapper" scroll-y>
|
<scroll-view class="content-wrapper" scroll-y @scroll="handleScroll">
|
||||||
<ImageSwiper
|
<ImageSwiper
|
||||||
:border-radius="0"
|
:border-radius="0"
|
||||||
:height="300"
|
:height="300"
|
||||||
:images="goodsData.commodityPhotoList"
|
:images="goodsData.commodityPhotoList"
|
||||||
thumbnailBottom="36px"
|
thumbnailBottom="42px"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<view class="goods-content">
|
<view class="goods-content">
|
||||||
@@ -29,6 +34,9 @@
|
|||||||
:nights="selectedDate.totalDays"
|
:nights="selectedDate.totalDays"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- 商品设施组件 -->
|
||||||
|
<GoodFacility :goodsData="goodsData" />
|
||||||
|
|
||||||
<!-- 商品详情组件 -->
|
<!-- 商品详情组件 -->
|
||||||
<GoodDetail :goodsData="goodsData" />
|
<GoodDetail :goodsData="goodsData" />
|
||||||
</view>
|
</view>
|
||||||
@@ -73,17 +81,30 @@ import {
|
|||||||
import { ThrottleUtils } from "@/utils";
|
import { ThrottleUtils } from "@/utils";
|
||||||
import TopNavBar from "@/components/TopNavBar/index.vue";
|
import TopNavBar from "@/components/TopNavBar/index.vue";
|
||||||
import ImageSwiper from "@/components/ImageSwiper/index.vue";
|
import ImageSwiper from "@/components/ImageSwiper/index.vue";
|
||||||
|
|
||||||
|
// 导航栏透明度 - 默认透明,随滚动变为不透明
|
||||||
|
const navOpacity = ref(0);
|
||||||
import GoodInfo from "./components/GoodInfo/index.vue";
|
import GoodInfo from "./components/GoodInfo/index.vue";
|
||||||
import GoodConfirm from "./components/GoodConfirm/index.vue";
|
import GoodConfirm from "./components/GoodConfirm/index.vue";
|
||||||
import Calender from "@/components/Calender/index.vue";
|
import Calender from "@/components/Calender/index.vue";
|
||||||
import LocationCard from "@/components/LocationCard/index.vue";
|
import LocationCard from "@/components/LocationCard/index.vue";
|
||||||
import DateSelector from "./components/DateSelector/index.vue";
|
import DateSelector from "./components/DateSelector/index.vue";
|
||||||
import GoodDetail from "@/components/GoodDetail/index.vue";
|
import GoodDetail from "@/components/GoodDetail/index.vue";
|
||||||
|
import GoodFacility from "./components/GoodFacility/index.vue";
|
||||||
|
|
||||||
const calendarVisible = ref(false);
|
const calendarVisible = ref(false);
|
||||||
const goodsData = ref({});
|
const goodsData = ref({});
|
||||||
const goodConfirmRef = ref(null);
|
const goodConfirmRef = ref(null);
|
||||||
|
|
||||||
|
// 处理滚动事件
|
||||||
|
const handleScroll = (e) => {
|
||||||
|
const scrollTop = e.detail.scrollTop;
|
||||||
|
// 设置一个阈值,当滚动超过200px时,导航栏完全不透明
|
||||||
|
const threshold = 200;
|
||||||
|
// 计算透明度,范围从0到1
|
||||||
|
navOpacity.value = Math.min(scrollTop / threshold, 1);
|
||||||
|
};
|
||||||
|
|
||||||
// 格式化日期为 yyyy-mm-dd 格式
|
// 格式化日期为 yyyy-mm-dd 格式
|
||||||
const formatDate = (date) => {
|
const formatDate = (date) => {
|
||||||
const year = date.getFullYear();
|
const year = date.getFullYear();
|
||||||
|
|||||||
@@ -8,10 +8,13 @@ $button-color: #00a6ff;
|
|||||||
|
|
||||||
// 顶部导航栏固定样式
|
// 顶部导航栏固定样式
|
||||||
:deep(.top-nav-bar) {
|
:deep(.top-nav-bar) {
|
||||||
position: sticky;
|
position: fixed;
|
||||||
top: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 使用须知样式
|
// 使用须知样式
|
||||||
@@ -63,7 +66,7 @@ $button-color: #00a6ff;
|
|||||||
}
|
}
|
||||||
|
|
||||||
.goods-content {
|
.goods-content {
|
||||||
border-radius: 12px 12px 0 0;
|
border-radius: 28px 28px 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
/>
|
/>
|
||||||
<CreateServiceOrder
|
<CreateServiceOrder
|
||||||
v-else-if="
|
v-else-if="
|
||||||
item.toolCall.componentName === CompName.createWorkOrderCard
|
item.toolCall.componentName === CompName.callServiceCard
|
||||||
"
|
"
|
||||||
/>
|
/>
|
||||||
<Feedback
|
<Feedback
|
||||||
|
|||||||
@@ -18,27 +18,18 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { SEND_MESSAGE_CONTENT_TEXT } from "@/constant/constant";
|
||||||
import { defineProps } from "vue";
|
import { defineProps } from "vue";
|
||||||
|
|
||||||
const emits = defineEmits(["replySent"]);
|
|
||||||
|
|
||||||
defineProps({
|
defineProps({
|
||||||
guideWords: {
|
guideWords: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: [
|
default: [],
|
||||||
"定温泉票",
|
|
||||||
"定酒店",
|
|
||||||
"优惠套餐",
|
|
||||||
"亲子玩法",
|
|
||||||
"了解交通",
|
|
||||||
"看看酒店",
|
|
||||||
"看看美食",
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const sendReply = (text) => {
|
const sendReply = (item) => {
|
||||||
emits("replySent", text);
|
uni.$emit(SEND_MESSAGE_CONTENT_TEXT, item);
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const itemList = ref([
|
|||||||
{
|
{
|
||||||
icon: "",
|
icon: "",
|
||||||
title: "呼叫服务",
|
title: "呼叫服务",
|
||||||
type: Command.createWorkOrderCard,
|
type: Command.callServiceCard,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: "https://oss.nianxx.cn/mp/static/version_101/home/more.png",
|
icon: "https://oss.nianxx.cn/mp/static/version_101/home/more.png",
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
>
|
>
|
||||||
<image
|
<image
|
||||||
class="ip relative"
|
class="ip relative"
|
||||||
:src="initPageImages.logoImageUrl"
|
:src="initPageImages?.logoImageUrl"
|
||||||
mode="aspectFit"
|
mode="aspectFit"
|
||||||
/>
|
/>
|
||||||
<view
|
<view
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<ChatMoreTips :guideWords="guideWords" @replySent="handleReply" />
|
<ChatMoreTips :guideWords="guideWords" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,7 +2,8 @@
|
|||||||
<uni-popup ref="popup" type="bottom" :safe-area="false">
|
<uni-popup ref="popup" type="bottom" :safe-area="false">
|
||||||
<view class="popup-content border-box pt-12 pl-12 pr-12">
|
<view class="popup-content border-box pt-12 pl-12 pr-12">
|
||||||
<view class="header flex flex-items-center pb-12">
|
<view class="header flex flex-items-center pb-12">
|
||||||
<view class="title flex-full font-size-17 color-000 font-500"
|
<view
|
||||||
|
class="title flex-full text-center font-size-17 color-000 font-500 ml-24"
|
||||||
>更多服务</view
|
>更多服务</view
|
||||||
>
|
>
|
||||||
<uni-icons type="close" size="24" color="#CACFD8" @click="close" />
|
<uni-icons type="close" size="24" color="#CACFD8" @click="close" />
|
||||||
@@ -13,7 +14,6 @@
|
|||||||
class="item border-box border-bottom pt-20 pb-20"
|
class="item border-box border-bottom pt-20 pb-20"
|
||||||
v-for="(item, index) in list"
|
v-for="(item, index) in list"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="handleClick(item)"
|
|
||||||
>
|
>
|
||||||
<view class="flex flex-items-center flex-justify-center">
|
<view class="flex flex-items-center flex-justify-center">
|
||||||
<image v-if="item.icon" class="left" :src="item.icon" />
|
<image v-if="item.icon" class="left" :src="item.icon" />
|
||||||
|
|||||||
32
src/request/api/UpdateFile.js
Normal file
32
src/request/api/UpdateFile.js
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import { BASE_URL } from "@/request/base/baseUrl";
|
||||||
|
import { getCurrentConfig } from "@/constant/base";
|
||||||
|
|
||||||
|
export const updateImageFile = (file) => {
|
||||||
|
const url = BASE_URL + "/common/upload";
|
||||||
|
const token = uni.getStorageSync("token");
|
||||||
|
const clientId = getCurrentConfig().clientId;
|
||||||
|
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
uni.uploadFile({
|
||||||
|
url,
|
||||||
|
filePath: file,
|
||||||
|
name: "file",
|
||||||
|
header: {
|
||||||
|
"Content-Type": "multipart/form-data",
|
||||||
|
Authorization: `Bearer ${token}`,
|
||||||
|
clientId: clientId,
|
||||||
|
},
|
||||||
|
formData: {
|
||||||
|
file: "file",
|
||||||
|
},
|
||||||
|
success: (uploadFileRes) => {
|
||||||
|
console.log(uploadFileRes.data);
|
||||||
|
resolve(uploadFileRes.data);
|
||||||
|
},
|
||||||
|
fail: (err) => {
|
||||||
|
console.error("上传图片失败:", err);
|
||||||
|
reject(err);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
Binary file not shown.
@@ -19,6 +19,10 @@
|
|||||||
background-color: #f5f7fa;
|
background-color: #f5f7fa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bg-EEF8FF {
|
||||||
|
background-color: #eef8ff;
|
||||||
|
}
|
||||||
|
|
||||||
.bg-liner {
|
.bg-liner {
|
||||||
background: linear-gradient(205deg, #8ae3fc 0%, rgba(138, 227, 252, 0) 20%),
|
background: linear-gradient(205deg, #8ae3fc 0%, rgba(138, 227, 252, 0) 20%),
|
||||||
linear-gradient(155deg, #fef7e1 0%, rgba(254, 247, 225, 0) 20%),
|
linear-gradient(155deg, #fef7e1 0%, rgba(254, 247, 225, 0) 20%),
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
.h-screen {
|
.h-screen {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-80 {
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,10 +7,18 @@
|
|||||||
margin: 4px;
|
margin: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ml-4 {
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mr-4 {
|
.mr-4 {
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-4 {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
.mb-4 {
|
.mb-4 {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
@@ -55,6 +63,10 @@
|
|||||||
margin: 12px;
|
margin: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mt-12 {
|
||||||
|
margin-top: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
.mb-12 {
|
.mb-12 {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
@@ -63,10 +75,26 @@
|
|||||||
margin-left: 12px;
|
margin-left: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mr-12 {
|
||||||
|
margin-right: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mt-16 {
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-16 {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-16 {
|
.ml-16 {
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mr-16 {
|
||||||
|
margin-right: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
.ml-20 {
|
.ml-20 {
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
}
|
}
|
||||||
@@ -74,3 +102,7 @@
|
|||||||
.mr-20 {
|
.mr-20 {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ml-24 {
|
||||||
|
margin-left: 24px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -99,6 +99,10 @@
|
|||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.p-24 {
|
||||||
|
padding: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
.pb-safe-area {
|
.pb-safe-area {
|
||||||
padding-bottom: Max(env(safe-area-inset-bottom), 12px);
|
padding-bottom: Max(env(safe-area-inset-bottom), 12px);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rounded-5 {
|
||||||
|
border-radius: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
.rounded-6 {
|
.rounded-6 {
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,10 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.w-vw {
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
.w-50 {
|
.w-50 {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user