Jelajahi Sumber

bugfix: 列表名变化

jihuaqiang 1 Minggu lalu
induk
melakukan
55a7bc281d

+ 0 - 1
src/views/publishContent/weGZH/components/publishPlanModal/index.tsx

@@ -79,7 +79,6 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({
 					formData.scene = 0;
 				}
 				formData.videoList = selectedVideos;
-				formData.type = +formData.type;
 				onOk(formData);
 			})
 			.catch((info) => {

+ 11 - 2
src/views/publishContent/weGZH/index.tsx

@@ -107,7 +107,15 @@ const WeGZHContent: React.FC = () => {
 			),
 		},
 	];
-	const cloumns2: TableProps<GzhPlanDataType>['columns'] = columns.filter(item => item.title !== '发布场景');
+	const cloumns2: TableProps<GzhPlanDataType>['columns'] = columns.filter(item => item.title !== '发布场景').map(item => { 
+		if (item.title === '公众号名称') { 
+			return {
+				...item,
+				title: '服务号名称',
+			}
+		}
+		return item;
+	});
 
 	const deletePlan = async (record: GzhPlanDataType) => {
 		setIsLoading(true);
@@ -153,7 +161,8 @@ const WeGZHContent: React.FC = () => {
 		if (params.type !== planType) { 
 			setPlanType(params.type as GzhPlanType);
 		}
-		const res = await http.post<GzhPlanDataType>(saveGzhPlanApi, params)
+		
+		const res = await http.post<GzhPlanDataType>(saveGzhPlanApi, {...params, type: +params.type})
 			.catch(err => {
 				message.error(err.msg);
 			})