Commit 50bea0ef authored by Sixiang_Zzb's avatar Sixiang_Zzb

服务商编辑页提交bug处理

parent 86b3b28f
...@@ -70,17 +70,15 @@ const Edit = (props: any) => { ...@@ -70,17 +70,15 @@ const Edit = (props: any) => {
setCList(SaveChooseData.serviceCommunityList); setCList(SaveChooseData.serviceCommunityList);
if (SaveChooseData.serviceScopeList.length <= 1) { if (SaveChooseData.serviceScopeList.length <= 1) {
// 处理服务范围数据 // 处理服务范围数据
optionsList.forEach((v) => { optionsList.forEach((v, index) => {
if (v.serviceName === SaveChooseData.serviceScope) { if (v.serviceName === SaveChooseData.serviceScope) {
SaveChooseData.serviceScopeList = v.serviceCode; SaveChooseData.serviceScopeList[index] = v.serviceCode;
} }
}); });
} else { } else {
// 处理服务范围数据 // 处理服务范围数据
optionsList.forEach((v1) => { optionsList.forEach((v1) => {
SaveChooseData.serviceScopeList.forEach((v2: string, index: number) => { SaveChooseData.serviceScopeList.forEach((v2: string, index: number) => {
console.log(v1.serviceName);
console.log(v1.serviceName === v2);
if (v1.serviceName === v2) { if (v1.serviceName === v2) {
SaveChooseData.serviceScopeList[index] = v1.serviceCode; SaveChooseData.serviceScopeList[index] = v1.serviceCode;
} }
...@@ -106,7 +104,8 @@ const Edit = (props: any) => { ...@@ -106,7 +104,8 @@ const Edit = (props: any) => {
if (SaveChooseData) { if (SaveChooseData) {
val.id = SaveChooseData.id; val.id = SaveChooseData.id;
} }
// console.log(val); console.log(val);
setload(true); setload(true);
TosTosServiceProviderSave(val); TosTosServiceProviderSave(val);
}; };
...@@ -247,7 +246,6 @@ function mapStateToProps(state: any) { ...@@ -247,7 +246,6 @@ function mapStateToProps(state: any) {
const { CurData, SaveChooseData } = state.ServiceProvider; const { CurData, SaveChooseData } = state.ServiceProvider;
const { DataServices } = state.User; const { DataServices } = state.User;
const { CommunityList } = state.Init; const { CommunityList } = state.Init;
console.log(CurData);
return { return {
CurData, CurData,
SaveChooseData, SaveChooseData,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment