Commit c1738f78 authored by 黄奎's avatar 黄奎

页面修改

parent 01d1685a
......@@ -63,7 +63,7 @@ namespace Mall.Module.TradePavilion
{ nameof(RB_Custom_Form_Extend.UpdateBy),model.UpdateBy},
{ nameof(RB_Custom_Form_Extend.UpdateDate),model.UpdateDate},
};
custom_FormRepository.Update(fileds, new WhereHelper(nameof(RB_Custom_Form_Extend.Id), model.Id));
flag= custom_FormRepository.Update(fileds, new WhereHelper(nameof(RB_Custom_Form_Extend.Id), model.Id));
}
else
{
......@@ -111,66 +111,69 @@ namespace Mall.Module.TradePavilion
CompKey = jObj.GetStringValue("CompKey"),
CompData = new object()
};
switch (dataItem.CompKey)
if (!string.IsNullOrEmpty(dataItem.CompKey))
{
//单行文本
case "SingleLineText":
JObject singleObj = JObject.Parse(jObj.GetStringValue("CompData"));
TextItem txtItem = new TextItem()
{
Name = singleObj.GetStringValue("Name"),
WordsLength = singleObj.GetInt("WordsLength"),
IsRequire = singleObj.GetBoolValue("IsRequire"),
};
dataItem.CompData = txtItem;
break;
//多行文本
case "MultiLineText":
JObject multiObj = JObject.Parse(jObj.GetStringValue("CompData"));
TextItem multiItem = new TextItem()
{
Name = multiObj.GetStringValue("Name"),
WordsLength = multiObj.GetInt("WordsLength"),
IsRequire = multiObj.GetBoolValue("IsRequire"),
};
dataItem.CompData = multiItem;
break;
//下拉框
case "DorpDownList":
JObject dropdownObj = JObject.Parse(jObj.GetStringValue("CompData"));
SelectItem selectItem = new SelectItem()
{
Name = dropdownObj.GetStringValue("Name"),
IsMultiple = dropdownObj.GetBoolValue("IsMultiple"),
IsRequire = dropdownObj.GetBoolValue("IsRequire"),
OptionValue = "",
};
dataItem.CompData = selectItem;
break;
//图片上传组件
case "ImageUploadComp":
JObject imgObj = JObject.Parse(jObj.GetStringValue("CompData"));
UploadItem imgItem = new UploadItem()
{
Name = imgObj.GetStringValue("Name"),
FileCount = imgObj.GetInt("FileCount"),
FileSizeLimit = imgObj.GetInt("FileSizeLimit"),
};
dataItem.CompData = imgItem;
break;
//视频上传组件
case "VideoUploadComp":
JObject videoObj = JObject.Parse(jObj.GetStringValue("CompData"));
UploadItem videoItem = new UploadItem()
{
Name = videoObj.GetStringValue("Name"),
FileCount = videoObj.GetInt("FileCount"),
FileSizeLimit = videoObj.GetInt("FileSizeLimit"),
};
dataItem.CompData = videoItem;
break;
switch (dataItem.CompKey)
{
//单行文本
case "SingleLineText":
JObject singleObj = JObject.Parse(jObj.GetStringValue("CompData"));
TextItem txtItem = new TextItem()
{
Name = singleObj.GetStringValue("Name"),
WordsLength = singleObj.GetInt("WordsLength"),
IsRequire = singleObj.GetBoolValue("IsRequire"),
};
dataItem.CompData = txtItem;
break;
//多行文本
case "MultiLineText":
JObject multiObj = JObject.Parse(jObj.GetStringValue("CompData"));
TextItem multiItem = new TextItem()
{
Name = multiObj.GetStringValue("Name"),
WordsLength = multiObj.GetInt("WordsLength"),
IsRequire = multiObj.GetBoolValue("IsRequire"),
};
dataItem.CompData = multiItem;
break;
//下拉框
case "DorpDownList":
JObject dropdownObj = JObject.Parse(jObj.GetStringValue("CompData"));
SelectItem selectItem = new SelectItem()
{
Name = dropdownObj.GetStringValue("Name"),
IsMultiple = dropdownObj.GetBoolValue("IsMultiple"),
IsRequire = dropdownObj.GetBoolValue("IsRequire"),
OptionValue = "",
};
dataItem.CompData = selectItem;
break;
//图片上传组件
case "ImageUploadComp":
JObject imgObj = JObject.Parse(jObj.GetStringValue("CompData"));
UploadItem imgItem = new UploadItem()
{
Name = imgObj.GetStringValue("Name"),
FileCount = imgObj.GetInt("FileCount"),
FileSizeLimit = imgObj.GetInt("FileSizeLimit"),
};
dataItem.CompData = imgItem;
break;
//视频上传组件
case "VideoUploadComp":
JObject videoObj = JObject.Parse(jObj.GetStringValue("CompData"));
UploadItem videoItem = new UploadItem()
{
Name = videoObj.GetStringValue("Name"),
FileCount = videoObj.GetInt("FileCount"),
FileSizeLimit = videoObj.GetInt("FileSizeLimit"),
};
dataItem.CompData = videoItem;
break;
}
dataList.Add(dataItem);
}
dataList.Add(dataItem);
}
}
}
......
......@@ -106,7 +106,7 @@ namespace Mall.WebApi.Controllers.MallBase
model.UpdateDate = DateTime.Now;
model.Status = Common.Enum.DateStateEnum.Normal;
var flag = customFormModule.SetCustomFormModule(model);
return flag ? ApiResult.Success() : ApiResult.Failed();
return flag ? ApiResult.Success(data:model) : ApiResult.Failed();
}
/// <summary>
......
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