Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mall.oytour.com
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄奎
mall.oytour.com
Commits
c1738f78
Commit
c1738f78
authored
Aug 30, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
01d1685a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
60 deletions
+63
-60
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+62
-59
CustomFormController.cs
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
+1
-1
No files found.
Mall.Module.TradePavilion/CustomFormModule.cs
View file @
c1738f78
...
...
@@ -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
);
}
}
}
...
...
Mall.WebApi/Controllers/MallBase/CustomFormController.cs
View file @
c1738f78
...
...
@@ -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>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment