Compare commits
7 Commits
5e981b6de3
...
91b2f4094c
| Author | SHA1 | Date | |
|---|---|---|---|
| 91b2f4094c | |||
| bb7b6d5c35 | |||
| 4d12c76589 | |||
| fbaa732388 | |||
| a3aabc2752 | |||
|
|
5e0ce0b3a4 | ||
|
|
19432719ae |
@@ -33,7 +33,8 @@ body,
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mb12 {
|
@font-face {
|
||||||
margin-bottom: 12px;
|
font-family: znicons;
|
||||||
|
src: url("https://oss.nianxx.cn/mp/static/fonts/znicons.ttf");
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -35,11 +35,27 @@
|
|||||||
>
|
>
|
||||||
<view class="font-500 line-height-22 mb-12">需求信息描述</view>
|
<view class="font-500 line-height-22 mb-12">需求信息描述</view>
|
||||||
<textarea
|
<textarea
|
||||||
|
class="h-80"
|
||||||
placeholder="请输入需求信息描述"
|
placeholder="请输入需求信息描述"
|
||||||
|
placeholder-class="font-size-14 font-400"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
v-model="contactText"
|
v-model="contactText"
|
||||||
/>
|
/>
|
||||||
</view>
|
</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">
|
||||||
|
{{ zniconsMap["zn-camera"] }}
|
||||||
|
</uni-icons>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-else class="border-box card-content flex flex-items-center p-12">
|
<view v-else class="border-box card-content flex flex-items-center p-12">
|
||||||
@@ -76,6 +92,8 @@
|
|||||||
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 { createWorkOrder } from "@/request/api/OrderApi";
|
||||||
|
import { updateImageFile } from "@/request/api/UpdateFile";
|
||||||
|
import { zniconsMap } from "@/static/fonts/znicons.js";
|
||||||
|
|
||||||
const workOrderTypeId = ref("");
|
const workOrderTypeId = ref("");
|
||||||
const roomId = ref("");
|
const roomId = ref("");
|
||||||
@@ -85,6 +103,35 @@ const contentImgUrl = ref("");
|
|||||||
const isCallSuccess = ref(false); // 呼叫成功状态
|
const isCallSuccess = ref(false); // 呼叫成功状态
|
||||||
const workOrderId = ref(0); // 工单ID
|
const workOrderId = ref(0); // 工单ID
|
||||||
|
|
||||||
|
// 处理图片上传
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
updateImageFile(file).then((res) => {
|
||||||
|
contentImgUrl.value = res.data?.url || "";
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const handleCall = async () => {
|
const handleCall = async () => {
|
||||||
if (isCallSuccess.value) {
|
if (isCallSuccess.value) {
|
||||||
// 查看工单
|
// 查看工单
|
||||||
|
|||||||
@@ -27,7 +27,9 @@
|
|||||||
>
|
>
|
||||||
<view class="font-500 line-height-22 mb-12">意见内容</view>
|
<view class="font-500 line-height-22 mb-12">意见内容</view>
|
||||||
<textarea
|
<textarea
|
||||||
|
class="h-80"
|
||||||
placeholder="请输入反馈意见"
|
placeholder="请输入反馈意见"
|
||||||
|
placeholder-class="font-size-14 font-400"
|
||||||
maxlength="100"
|
maxlength="100"
|
||||||
v-model="contactText"
|
v-model="contactText"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,8 +1,3 @@
|
|||||||
@font-face {
|
|
||||||
font-family: znicons;
|
|
||||||
src: url("@/static/fonts/znicons.ttf");
|
|
||||||
}
|
|
||||||
|
|
||||||
// 使用须知样式
|
// 使用须知样式
|
||||||
.use-notice {
|
.use-notice {
|
||||||
margin: 16px 0;
|
margin: 16px 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="module-header mb12">
|
<view class="module-header mb-4">
|
||||||
<text class="module-title">{{ title }}</text>
|
<text class="module-title">{{ title }}</text>
|
||||||
<image class="underline" src="./images/wave_icon.png" mode="aspectFill" />
|
<image class="underline" src="./images/wave_icon.png" mode="aspectFill" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -19,7 +19,3 @@
|
|||||||
height: 10px;
|
height: 10px;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mb12 {
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="goods-info mb12">
|
<view class="goods-info mb-12">
|
||||||
<view class="hotel-header">
|
<view class="hotel-header">
|
||||||
<image class="hotel-icon" :src="orderTypeIcon"></image>
|
<image class="hotel-icon" :src="orderTypeIcon"></image>
|
||||||
<text class="hotel-name">{{ orderData.storeName }}</text>
|
<text class="hotel-name">{{ orderData.storeName }}</text>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="notice-info mb12">
|
<view class="notice-info mb-12">
|
||||||
<view class="notice-title"> 购买须知 </view>
|
<view class="notice-title"> 购买须知 </view>
|
||||||
<GoodDetail :goodsData="orderData" :showTitle="false" />
|
<GoodDetail :goodsData="orderData" :showTitle="false" />
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="user-info mb12" v-if="hasConsumerData">
|
<view class="user-info mb-12" v-if="hasConsumerData">
|
||||||
<view class="user-info-title">{{ infoTitle }}</view>
|
<view class="user-info-title">{{ infoTitle }}</view>
|
||||||
<view
|
<view
|
||||||
v-for="(item, index) in consumerList"
|
v-for="(item, index) in consumerList"
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
@@ -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" />
|
||||||
|
|||||||
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);
|
||||||
|
},
|
||||||
|
});
|
||||||
|
});
|
||||||
|
};
|
||||||
@@ -19,4 +19,20 @@ export const zniconsMap = {
|
|||||||
"zn-warning-check-in": "\ue692",
|
"zn-warning-check-in": "\ue692",
|
||||||
"zn-refund": "\ue693",
|
"zn-refund": "\ue693",
|
||||||
"zn-warning-circle": "\ue694",
|
"zn-warning-circle": "\ue694",
|
||||||
|
"zn-dinsh": "\ue6a3",
|
||||||
|
"zn-clock": "\ue6a6",
|
||||||
|
"zn-edit": "\ue6a5",
|
||||||
|
"zn-forkchopsticks": "\ue6a4",
|
||||||
|
"zn-camera": "\ue6a2",
|
||||||
|
"zn-nav-room": "\ue6a1",
|
||||||
|
"zn-nav-ticket": "\ue6a0",
|
||||||
|
"zn-ticket": "\ue69b",
|
||||||
|
"zn-package": "\ue69d",
|
||||||
|
"zn-nav-meal": "\ue69c",
|
||||||
|
"zn-room": "\ue699",
|
||||||
|
"zn-coffee": "\ue698",
|
||||||
|
"zn-refresh": "\ue69f",
|
||||||
|
"zn-keyborad": "\ue697",
|
||||||
|
"zn-hotspring": "\ue696",
|
||||||
|
"zn-bell": "\ue695",
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
.h-screen {
|
.h-screen {
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h-80 {
|
||||||
|
height: 80px;
|
||||||
|
}
|
||||||
|
|||||||
@@ -82,3 +82,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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user