Browse Source

feat: 意见反馈修改

TIANYONG 4 months ago
parent
commit
604f764157

+ 2 - 2
src/page-instrument/api.ts

@@ -90,7 +90,7 @@ export const api_musicPracticeRecordVideoUpload = (data: any) => {
 
 /** 提交意见反馈 */
 export const sysSuggestionAdd = (data: any) => {
-  return request.post("/suggestion/add", { data });
+  return request.post("/sysSuggestion/save", { data, requestType: "json" });
 };
 
 /** 获取评测报告 */
@@ -136,7 +136,7 @@ export const getSubjectList = (data: any) => {
  * 获取意见类型
  */
 export const getSuggestionList = (params: any) => {
-  return request.post("/sysSuggestionType/queryAll", {
+  return request.post("/sysSuggestionType/page", {
     data: params,
     requestType: "json",
   });

+ 4 - 4
src/page-instrument/custom-plugins/helper-model/recommendation/index.tsx

@@ -20,11 +20,11 @@ export default defineComponent({
 		// 获取建议类别
 		const getTypeList = async () => {
 			try {
-				const res = await getSuggestionList({ rows: 9999, page: 1 });
-				const data = res.data || [];
+				const res = await getSuggestionList({ rows: 9999, page: 1, useClient: "SMART_PRACTICE" });
+				const data = res.data.rows || [];
 				suggestionTypeList.value = data.map((item:any) => {
 					return {
-						text: item.type,
+						text: item.name,
 						value: item.id
 					}
 				})
@@ -50,7 +50,7 @@ export default defineComponent({
 				},[])
 				await sysSuggestionAdd({
 					content: recommenData.message,
-					type: 'APP',
+					type: 'SMART_PRACTICE',
 					suggestionType: recommenData.suggestId,
 					mobileNo: storeData.user?.phone,
 					url: attachmentUrlsArr.join(",")