瀏覽代碼

feat: 公众号账号选择

jihuaqiang 2 周之前
父節點
當前提交
8476b652f7

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

@@ -75,10 +75,11 @@ const AddPunlishPlanModal: React.FC<AddPunlishPlanModalProps> = ({
 					return;
 					return;
 				}
 				}
 				const formData = { ...values };
 				const formData = { ...values };
-				if (planType === GzhPlanType.自动回复) { 
+				if (formData.type === GzhPlanType.自动回复) { 
 					formData.scene = 0;
 					formData.scene = 0;
 					formData.videoList = selectedVideos;
 					formData.videoList = selectedVideos;
 				}
 				}
+				formData.type = +formData.type;
 				onOk(formData);
 				onOk(formData);
 			})
 			})
 			.catch((info) => {
 			.catch((info) => {

+ 2 - 1
src/views/publishContent/weGZH/hooks/useAccountOptions.ts

@@ -1,6 +1,7 @@
 import { useState } from 'react';
 import { useState } from 'react';
 import { getGzhAccountOptionsApi } from '@src/http/api';
 import { getGzhAccountOptionsApi } from '@src/http/api';
 import request from '@src/http/index';
 import request from '@src/http/index';
+import { GzhPlanType } from './useGzhPlanList';
 
 
 interface Account {
 interface Account {
   id: string;
   id: string;
@@ -19,7 +20,7 @@ export const useAccountOptions = () => {
       setError(null);
       setError(null);
 			const data = await request.get(getGzhAccountOptionsApi, {
 			const data = await request.get(getGzhAccountOptionsApi, {
 				params: {
 				params: {
-					accountType
+					accountType: accountType === GzhPlanType.自动回复 ? undefined : GzhPlanType.服务号推送
 				}
 				}
 			});
 			});
       setAccountOptions(data.data as Account[]);
       setAccountOptions(data.data as Account[]);