Commit 5bd86904 authored by dt-1640819025-xxmxd's avatar dt-1640819025-xxmxd

问题反馈

parent 46f6c1bc
...@@ -9,3 +9,7 @@ export const getTreeListApi = params => instance.post("/dict/dictProvinceCityDis ...@@ -9,3 +9,7 @@ export const getTreeListApi = params => instance.post("/dict/dictProvinceCityDis
export const dictJobTypeApi = params => instance.post("/dict/dictJobType/getTree", params); export const dictJobTypeApi = params => instance.post("/dict/dictJobType/getTree", params);
// 获取岗位列表类型(1职位,2政策,3动态) // 获取岗位列表类型(1职位,2政策,3动态)
export const getBannerListApi = type => instance.post(`/banner/list/${type}`); export const getBannerListApi = type => instance.post(`/banner/list/${type}`);
// 添加反馈信息
export const getFeedbackAdd = params => instance.post("/feedback/add", params);
// 我的反馈列表
export const getFeedbackList = params => instance.post("/feedback/list", params);
\ No newline at end of file
...@@ -147,6 +147,24 @@ ...@@ -147,6 +147,24 @@
"style": { "style": {
"navigationStyle": "custom" "navigationStyle": "custom"
} }
},
{
"path": "pages/user/feedBack/feedBackRecord/feedBackRecord",
"style": {
"navigationBarTitleText": "问题反馈"
}
},
{
"path": "pages/user/feedBack/feedBackWait/feedBackWiat",
"style": {
"navigationBarTitleText": "提交反馈"
}
},
{
"path": "pages/user/feedBack/feedBackReplied/feedBackReplied",
"style": {
"navigationBarTitleText": "问题回复"
}
} }
], ],
"tabBar": { "tabBar": {
......
<template>
<div class="record">
<div class="list-container">
<template v-for="item in feedbackListData" :key="item.id">
<div class="div-content">
<div class="company-name">
{{ item.id }}
</div>
<div class="div-state-await" @click="tofeedBackRecord(item.id)">
{{ item.status }}
</div>
<div class="div-time">
{{ item.createTime }}
</div>
</div>
</template>
</div>
<div class="content-line"></div>
<div class="button-feedback" @click="tofeedBackWait">投诉建议</div>
</div>
</template>
<script setup>
import { getFeedbackList } from "@/api/common";
import { onReady } from "@dcloudio/uni-app";
import axios from "axios";
import { dayjs } from "dayjs";
import { ref } from "vue";
const pageNo = ref("1"); //初始页码
const pageSize = ref("10"); //每页数量
let feedbackListData = ref([]);
const postListData = () => {
// feedbackListData = res.feedbackListData;
getFeedbackList()
.then(res => {
feedbackListData.value = res.data;
emit("");
})
.catch(res => {});
};
onReady(() => {
postListData();
});
console.log("feedbackListData:", feedbackListData);
const tofeedBackRecord = id => {
console.log("", id);
uni.navigateTo({
url: "/pages/user/feedBack/feedBackReplied/feedBackReplied?id=" + id
});
};
const tofeedBackWait = url => {
uni.navigateTo({
url: "/pages/user/feedBack/feedBackWait/feedBackWiat"
});
};
</script>
<style lang="scss" scoped>
page {
background-color: #ffffff;
height: 100%;
}
.record {
width: 750rpx;
height: 90%;
overflow: scroll;
}
.list-container {
width: 750rpx;
height: 100%;
}
.div-content {
width: 750rpx;
height: 116rpx;
margin-top: 16rpx;
border-bottom: solid 16rpx #f3f4f8;
}
.company-name {
margin-left: 32rpx;
margin-top: 32rpx;
font-size: 32rpx;
font-weight: 600;
line-height: 36rpx;
color: #1b2026;
}
.div-time {
margin-left: 32rpx;
font-size: 24rpx;
color: #77818f;
font-weight: normal;
margin-top: -20rpx;
}
.div-state-finish {
width: 136rpx;
height: 60rpx;
margin-left: 582rpx;
margin-top: -20rpx;
background: rgba(49, 203, 174, 0.1);
font-size: 24rpx;
text-align: center;
line-height: 60rpx;
color: #31cbaee6;
font-weight: 600;
}
.div-state-await {
width: 136rpx;
height: 60rpx;
margin-left: 582rpx;
margin-top: -20rpx;
background: #1f86ff10;
font-size: 24rpx;
text-align: center;
line-height: 60rpx;
color: #1f86ff;
font-weight: 600;
}
.button-feedback {
position: fixed;
top: 92%;
left: 65rpx;
width: 622rpx;
height: 80rpx;
border-radius: 12rpx;
font-size: 30rpx;
font-weight: 600;
color: #ffffff;
text-align: center;
line-height: 80rpx;
background: #1f86ff;
}
.content-line {
position: fixed;
top: 90%;
left: 0rpx;
width: 750rpx;
height: 1rpx;
background: rgba(31, 35, 41, 0.15);
}
</style>
\ No newline at end of file
<template>
<div class="replied">
<div class="problem-description">投诉建议</div>
<div class="text-box">
<textarea class="content" disabled="trun" v-model="questionDesc"> </textarea>
<text class="current-word">{{ inputLength }}/{{ wordMax }}</text>
</div>
<div class="picture-position">
<block v-for="imgs in imagesPath" :key="imgs.index">
<image class="img-size-box" :src="evn.APP_IMAGE_BASE_API + imgs" mode="aspectFit" />
</block>
</div>
<div class="feedback-replied-line"></div>
<div class="problem-description">平台回复</div>
<div class="replied-content">{{ feedbackInfo.replyMessage }}</div>
</div>
</template>
<script setup>
import evn from "@/utils/config";
import { getFeedbackList } from "@/api/common";
import { onLoad } from "@dcloudio/uni-app";
const wordMax = 300;
const replyMessage = ref(null);
let questionDesc = ref("");
let id = ref("");
let feedbackInfo = ref([]);
let imagesPath = ref([]);
let feedbackListData = ref([]);
const inputLength = computed(() => {
return questionDesc.value.length;
});
const getFeedbackArr = () => {
// feedbackListData = res.feedbackListData;
getFeedbackList()
.then(res => {
feedbackListData = res.data;
// feedbackListData = feedbackListData;
console.log("feedbackListData:", feedbackListData);
feedbackInfo.value = feedbackListData.find(function (person) {
// console.log("person.id=", person.id);
// console.log("id=", id);
return person.id === id;
});
console.log("feedbackInfo=", feedbackInfo);
questionDesc.value = feedbackInfo.value.questionDesc;
console.log("questionDesc=", questionDesc);
imagesPath.value = feedbackInfo.value.imagesPath.split(",");
console.log("imagesPath=", imagesPath);
replyMessage.value = feedbackInfo.value.replyMessage;
console.log(replyMessage);
// feedbackListData.push(...res.data);
})
.catch(res => {});
};
onLoad(options => {
id = options.id;
console.log("id=", id);
});
onReady(() => {
getFeedbackArr();
});
</script>
<style lang="scss" scoped>
page {
background-color: #fff;
}
.replied {
width: 750rpx;
}
.replied .problem-description {
font-size: 36rpx;
font-weight: 600;
color: #1b2026;
margin-top: 32rpx;
margin-left: 32rpx;
}
.replied .text-box {
width: 686rpx;
height: 272rpx;
margin-top: 32rpx;
margin-left: 32rpx;
border-radius: 8rpx;
background: #f2f5fb;
}
.replied .text-box .content {
width: 640rpx;
height: 190rpx;
font-size: 24rpx;
font-weight: 500;
color: #77818f;
margin-left: 32rpx;
top: 32rpx;
background: #f2f5fb;
}
.replied .text-box .current-word {
font-size: 28rpx;
color: gray;
position: absolute;
right: 72rpx;
margin-top: 32rpx;
}
.replied .picture-position {
width: 610rpx;
height: 160rpx;
display: flex;
margin-top: 32rpx;
margin-left: 32rpx;
}
.replied .picture-position .img-size-box {
width: 158rpx;
height: 160rpx;
border-radius: 4rpx;
margin-right: 16rpx;
}
.replied .feedback-replied-line {
margin-top: 32rpx;
width: 750rpx;
height: 16rpx;
background: #f3f4f8;
}
.replied .replied-content {
width: 686rpx;
height: 288rpx;
margin-top: 16rpx;
margin-left: 32rpx;
font-size: 24rpx;
line-height: 36rpx;
}
</style>
\ No newline at end of file
<template>
<div class="feedback-wait">
<div class="problem-description">投诉建议</div>
<div class="text-box">
<textarea class="content" placeholder="请输入你的问题" maxlength="300" v-model="textInputs"> </textarea>
<text class="current-word">{{ inputLength }}/{{ wordMax }}</text>
</div>
<div class="picture-position">
<div v-for="(img, index) in imgList" :key="index">
<img class="img-size-box" :src="img" data-index="{{index}}" />
<img @click="deleteimg(index)" class="picture-del" src="/src/static/image/user/feedback_picture_del.png" alt="" />
</div>
<button class="div-picture" @click="chooseSource" v-if="imgList.length < 3">
<img class="div-picture-add" src="/src/static/image/user/feedback_picture_add.png" alt="" />
</button>
</div>
<text class="text-content">上传图片(可上传0-3张图片)</text>
<div class="content-line"></div>
<button @click="submit" id="button-submit">提交</button>
</div>
</template>
<script setup>
import { uploadFiles } from "@/utils/fileUpload";
import { getFeedbackAdd } from "@/api/common";
import { ref, computed } from "vue";
import { ISuccessRes } from "rexma-cli";
import { useRouter } from "vue-router";
const router = useRouter();
const wordMax = ref(300);
let imgList = ref([]);
let item = ref([]);
const textInputs = ref("");
let questionDesc = ref("");
let imagesPath = ref("");
let imagesPaths = ref([]);
let upArr = ref([]);
let imgs = ref([]);
const inputLength = computed(() => {
// console.log(imagesPaths.length);
return textInputs.value.length;
});
const chooseSource = () => {
uni.chooseImage({
count: 3,
sizeType: ["original", "compressed"], //可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], //从相册选择,拍照上传
success: async function (res) {
// imgList = res.tempFiles.map(File => ({
// path: File.path
// }));
imgList.value = [...imgList.value, ...res.tempFilePaths];
console.log("imgList.value", imgList.value);
console.log("res.tempFilePaths", res.tempFilePaths);
console.log("res", res);
// console.log("imgList", imgList);
// imgs.concat(res.tempFiles);
// console.log("imgs", imgs);
let tempFiles = res.tempFiles;
console.log(tempFiles);
upArr = await uploadFiles(tempFiles);
console.log("upArr", upArr);
const imgs = (imagesPaths = upArr.map(({ key }) => [key]));
// imagesPaths = upArr;
console.log(imagesPaths);
imagesPath = imagesPaths.join(",");
}
});
};
const deleteimg = index => {
imgList.value.splice(index, 1);
imagesPaths.splice(index, 1);
console.log(imgList);
console.log(imagesPaths);
};
const submit = res => {
if (imagesPaths.length === undefined) {
uni.showToast({
title: "请至少上传一张图片",
duration: 3000
});
return;
}
if (textInputs.value.length < 10) {
uni.showToast({
title: "请至少输入十个字及以上",
duration: 3000
});
return;
}
// console.log(textInputs.value);
questionDesc = textInputs.value;
console.log(imgList);
console.log("questionDesc:", questionDesc);
console.log("imagesPath:", imagesPath);
// getFeedbackAdd({
// questionDesc,
// imagesPath
// });
// router.go(-1);
};
</script>
<style lang="scss" scoped>
page {
background-color: #fff;
}
.feedback-wait {
width: 750rpx;
padding-left: 32rpx;
}
.feedback-wait .problem-description {
font-size: 36rpx;
font-weight: 600;
color: #1b2026;
margin-top: 16rpx;
}
.feedback-wait .text-box {
width: 686rpx;
height: 272rpx;
margin-top: 32rpx;
border-radius: 8rpx;
background: #f2f5fb;
}
.feedback-wait .text-box .current-word {
font-size: 28rpx;
color: gray;
position: absolute;
right: 72rpx;
margin-top: 32rpx;
}
.feedback-wait .text-box .content {
width: 640rpx;
height: 190rpx;
font-size: 24rpx;
font-weight: 500;
color: #77818f;
top: 32rpx;
margin-left: 32rpx;
}
.feedback-wait .picture-position {
width: 610rpx;
height: 160rpx;
display: flex;
margin-top: 32rpx;
}
.feedback-wait .picture-position .img-size-box {
width: 158rpx;
height: 160rpx;
border-radius: 4rpx;
margin-right: 16rpx;
display: flex;
}
.feedback-wait .picture-position .picture-del {
position: absolute;
width: 22rpx;
height: 22rpx;
margin-top: -160rpx;
margin-left: 136rpx;
}
.feedback-wait .picture-position .div-picture {
display: flex;
justify-content: center;
width: 158rpx;
margin-left: 0rpx;
border-radius: 4rpx;
background: #f2f5fb;
}
.feedback-wait .picture-position .div-picture .div-picture-add {
width: 60rpx;
height: 60rpx;
margin-top: 50rpx;
}
.feedback-wait .text-content {
font-size: 24rpx;
font-weight: 500;
margin-top: 16rpx;
color: #1b2026;
}
.feedback-wait .content-line {
position: absolute;
top: 90%;
left: 0rpx;
width: 750rpx;
height: 1rpx;
background: rgba(31, 35, 41, 0.15);
}
.feedback-wait #button-submit {
position: absolute;
width: 622rpx;
color: #fff;
top: 92%;
left: 65rpx;
border-radius: 12rpx;
font-size: 30rpx;
font-weight: 600;
background: #1f86ff;
}
</style>
\ No newline at end of file
...@@ -69,7 +69,7 @@ const navList = [ ...@@ -69,7 +69,7 @@ const navList = [
}, },
{ {
icon: new URL("@/static/image/user/question.png", import.meta.url).href, icon: new URL("@/static/image/user/question.png", import.meta.url).href,
url: "", url: "/pages/user/feedBack/feedBackRecord/feedBackRecord",
text: "问题反馈" text: "问题反馈"
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment