فهرست منبع

纠错帖子,技术支持帖子

canghailong 7 ماه پیش
والد
کامیت
867d0c2b78
1فایلهای تغییر یافته به همراه17 افزوده شده و 17 حذف شده
  1. 17 17
      src/views/forum/addForum.vue

+ 17 - 17
src/views/forum/addForum.vue

@@ -51,7 +51,7 @@
 			</a-row>
 		</a-form>
 		<div>
-			<a-button style="margin-right: 8px" @click="onClose">关闭</a-button>
+			<!-- <a-button style="margin-right: 8px" @click="onClose">关闭</a-button> -->
 			<a-button type="primary" :loading="submitLoading" @click="onSubmit">保存</a-button>
 		</div>
 	</a-card>
@@ -119,8 +119,6 @@
 	// 关闭抽屉
 	const onClose = () => {
 		formRef.value.resetFields()
-		// const obj = { path: "/system/dict" };
-		// proxy.$tab.closeSelectedTag(obj);
 	}
 
 	// 默认要校验的
@@ -130,8 +128,6 @@
 		postContent: [required('请输入内容')]
 	}
 
-	const categoryOptions = tool.dictList('MENU_TYPE')
-	const visibleOptions = tool.dictList('MENU_VISIBLE')
 	// 验证并提交数据
 	const onSubmit = () => {
 		formRef.value
@@ -145,16 +141,18 @@
 				if (route.query.postType == 1) {
 					params = {
 						...formData.value,
-						...browserObj.value
+						...browserObj.value,
+						postType:route.query.postType
 					}
 				}
 				if (route.query.postType == 2) {
 					params = {
 						...formData.value,
-						...errorVal.value
+						...errorVal.value,
+						postType:route.query.postType
 					}
 				}
-				forumApi.submitForm(params, formData.value.postId).then(() => {
+				forumApi.submitForm(params).then(() => {
 					onClose()
 					emit('successful')
 				})
@@ -169,21 +167,23 @@
 		const browser = Bowser.getParser(window.navigator.userAgent)
 		let obj = browser.parsedResult
 		browserObj.value = {
-			forumSupportEnvParam: '',
-			browserType: obj.browser.name,
-			browserVersion: obj.browser.version,
-			osType: obj.os.name,
-			osVersion: obj.os.version,
-			deviceType: 0
+			forumSupportEnvParam: {
+				browserType: obj.browser.name,
+				browserVersion: obj.browser.version,
+				osType: obj.os.name,
+				osVersion: obj.os.version,
+				deviceType: 0
+			}
 		}
 	}
 	//纠错
 	const errorVal = ref({})
 	function errorCorrection() {
 		errorVal.value = {
-			contentCorrectionParam: '',
-			resourceType: route.query.resourceType,
-			resourceId: route.query.resourceId
+			contentCorrectionParam: {
+				resourceType: route.query.type,
+				resourceId: route.query.id
+			}
 		}
 	}
 </script>