feat: feedbank api
This commit is contained in:
@@ -84,19 +84,19 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, computed } from "vue";
|
import { ref, computed } from "vue";
|
||||||
import { getBavBarHeight } from "@/utils/system";
|
import { getBavBarHeight, getDeviceInfo } from "@/utils/system";
|
||||||
import { sendFeedback } from "@/api/mine.js";
|
import { sendFeedback } from "@/api/mine.js";
|
||||||
import { uploadImage } from "@/utils/common.js";
|
import { uploadImage } from "@/utils/common.js";
|
||||||
|
|
||||||
const feedbackTypes = [
|
const feedbackTypes = [
|
||||||
{ label: "其他", value: 0 },
|
|
||||||
{ label: "功能建议", value: 1 },
|
{ label: "功能建议", value: 1 },
|
||||||
{ label: "问题反馈", value: 2 },
|
{ label: "问题反馈", value: 2 },
|
||||||
{ label: "投诉", value: 3 },
|
{ label: "投诉", value: 3 },
|
||||||
|
{ label: "其他", value: 4 },
|
||||||
];
|
];
|
||||||
|
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
type: 0,
|
type: 1,
|
||||||
content: "",
|
content: "",
|
||||||
images: [],
|
images: [],
|
||||||
});
|
});
|
||||||
@@ -145,9 +145,13 @@ const submitFeedback = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Submit with real URLs
|
// Submit with real URLs
|
||||||
await sendFeedback({
|
const deviceInfo = getDeviceInfo();
|
||||||
...formData.value,
|
|
||||||
|
sendFeedback({
|
||||||
|
type: formData.value.type,
|
||||||
|
content: formData.value.content,
|
||||||
images: uploadedImages,
|
images: uploadedImages,
|
||||||
|
deviceInfo: deviceInfo,
|
||||||
});
|
});
|
||||||
|
|
||||||
uni.hideLoading();
|
uni.hideLoading();
|
||||||
|
|||||||
@@ -59,5 +59,6 @@ export function getDeviceInfo() {
|
|||||||
language: info.language,
|
language: info.language,
|
||||||
version: info.version,
|
version: info.version,
|
||||||
SDKVersion: info.SDKVersion,
|
SDKVersion: info.SDKVersion,
|
||||||
|
appId: "69665538a49b8ae3be50fe5d",
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user