feat: 问题反馈调整
This commit is contained in:
@@ -64,7 +64,6 @@ const workOrderTypeId = ref("");
|
|||||||
const contactPhone = ref("");
|
const contactPhone = ref("");
|
||||||
const contactText = ref("");
|
const contactText = ref("");
|
||||||
const isCallSuccess = ref(false); // 呼叫成功状态
|
const isCallSuccess = ref(false); // 呼叫成功状态
|
||||||
const workOrderId = ref(0); // 工单ID
|
|
||||||
const appName = computed(() => getCurrentConfig().name);
|
const appName = computed(() => getCurrentConfig().name);
|
||||||
|
|
||||||
const handleCall = async () => {
|
const handleCall = async () => {
|
||||||
@@ -99,26 +98,23 @@ const sendCreateWorkOrder = async () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
// 保存工单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",
|
||||||
@@ -127,15 +123,6 @@ const sendCreateWorkOrder = async () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// 查看工单
|
|
||||||
const viewWorkOrder = () => {
|
|
||||||
console.log("查看工单:", workOrderId.value);
|
|
||||||
// 这里可以跳转到工单详情页面
|
|
||||||
uni.navigateTo({
|
|
||||||
url: `/pages-order/order/list?id=${workOrderId.value}`,
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
Reference in New Issue
Block a user