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
d4332e98
Commit
d4332e98
authored
Aug 31, 2021
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
页面修改
parent
a647ee09
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
323 additions
and
28 deletions
+323
-28
RB_Miniprogram_Template_Extend.cs
.../Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
+222
-24
RB_Custom_Form_Extend.cs
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
+46
-0
CustomFormModule.cs
Mall.Module.TradePavilion/CustomFormModule.cs
+55
-4
No files found.
Mall.Model/Extend/MarketingCenter/RB_Miniprogram_Template_Extend.cs
View file @
d4332e98
This diff is collapsed.
Click to expand it.
Mall.Model/Extend/TradePavilion/RB_Custom_Form_Extend.cs
View file @
d4332e98
...
...
@@ -59,6 +59,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
/// <summary>
/// 文本值
/// </summary>
public
string
TextValue
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -85,6 +95,32 @@ namespace Mall.Model.Extend.TradePavilion
/// 是否必填
/// </summary>
public
bool
IsRequire
{
get
;
set
;
}
/// <summary>
/// 选项列表
/// </summary>
public
List
<
SelectOption
>
OptionList
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
/// <summary>
/// 选项列表
/// </summary>
public
class
SelectOption
{
/// <summary>
/// 编号
/// </summary>
public
string
Id
{
get
;
set
;
}
/// <summary>
/// 名称
/// </summary>
public
string
Name
{
get
;
set
;
}
}
/// <summary>
...
...
@@ -106,6 +142,16 @@ namespace Mall.Model.Extend.TradePavilion
/// 上传文件大小M
/// </summary>
public
int
FileSizeLimit
{
get
;
set
;
}
/// <summary>
/// 上传文件列表
/// </summary>
public
List
<
string
>
FileList
{
get
;
set
;
}
/// <summary>
/// 备注
/// </summary>
public
string
Remark
{
get
;
set
;
}
}
}
Mall.Module.TradePavilion/CustomFormModule.cs
View file @
d4332e98
...
...
@@ -104,7 +104,7 @@ namespace Mall.Module.TradePavilion
var
extModel
=
custom_FormRepository
.
GetEntity
<
RB_Custom_Form_Extend
>(
Id
);
if
(
extModel
!=
null
)
{
extModel
.
FormDataList
=
AnalyzeFormComponent
(
extModel
.
FormData
);
extModel
.
FormDataList
=
AnalyzeFormComponent
(
extModel
.
FormData
,
isGetAnswer
:
true
);
}
return
extModel
;
}
...
...
@@ -113,13 +113,13 @@ namespace Mall.Module.TradePavilion
/// 解析表单组件
/// </summary>
/// <param name="formData"></param>
/// <param name="isGetAnswer"></param>
/// <returns></returns>
public
List
<
FormDataItem
>
AnalyzeFormComponent
(
string
formData
)
public
List
<
FormDataItem
>
AnalyzeFormComponent
(
string
formData
,
bool
isGetAnswer
=
false
)
{
List
<
FormDataItem
>
dataList
=
new
List
<
FormDataItem
>();
if
(!
string
.
IsNullOrEmpty
(
formData
))
{
JArray
jArray
=
JArray
.
Parse
(
formData
);
if
(
jArray
!=
null
&&
jArray
.
Count
>
0
)
{
...
...
@@ -144,6 +144,8 @@ namespace Mall.Module.TradePavilion
Name
=
singleObj
.
GetStringValue
(
"Name"
),
WordsLength
=
singleObj
.
GetInt
(
"WordsLength"
),
IsRequire
=
singleObj
.
GetBoolValue
(
"IsRequire"
),
Remark
=
singleObj
.
GetStringValue
(
"Remark"
),
TextValue
=
isGetAnswer
?
singleObj
.
GetStringValue
(
"TextValue"
)
:
""
,
};
dataItem
.
CompData
=
txtItem
;
break
;
...
...
@@ -155,6 +157,8 @@ namespace Mall.Module.TradePavilion
Name
=
multiObj
.
GetStringValue
(
"Name"
),
WordsLength
=
multiObj
.
GetInt
(
"WordsLength"
),
IsRequire
=
multiObj
.
GetBoolValue
(
"IsRequire"
),
Remark
=
multiObj
.
GetStringValue
(
"Remark"
),
TextValue
=
isGetAnswer
?
multiObj
.
GetStringValue
(
"TextValue"
)
:
""
,
};
dataItem
.
CompData
=
multiItem
;
break
;
...
...
@@ -166,8 +170,24 @@ namespace Mall.Module.TradePavilion
Name
=
dropdownObj
.
GetStringValue
(
"Name"
),
IsMultiple
=
dropdownObj
.
GetBoolValue
(
"IsMultiple"
),
IsRequire
=
dropdownObj
.
GetBoolValue
(
"IsRequire"
),
OptionValue
=
""
,
OptionValue
=
isGetAnswer
?
dropdownObj
.
GetStringValue
(
"OptionValue"
)
:
""
,
OptionList
=
new
List
<
SelectOption
>(),
Remark
=
dropdownObj
.
GetStringValue
(
"Remark"
),
};
var
optionList
=
JArray
.
Parse
(
dropdownObj
.
GetStringValue
(
"OptionList"
));
if
(
optionList
!=
null
&&
optionList
.
Count
>
0
)
{
foreach
(
var
oItem
in
optionList
)
{
JObject
optionObj
=
JObject
.
Parse
(
oItem
.
ToString
());
SelectOption
option
=
new
SelectOption
()
{
Id
=
optionObj
.
GetStringValue
(
"Id"
),
Name
=
optionObj
.
GetStringValue
(
"Name"
),
};
selectItem
.
OptionList
.
Add
(
option
);
}
}
dataItem
.
CompData
=
selectItem
;
break
;
//图片上传组件
...
...
@@ -178,7 +198,24 @@ namespace Mall.Module.TradePavilion
Name
=
imgObj
.
GetStringValue
(
"Name"
),
FileCount
=
imgObj
.
GetInt
(
"FileCount"
),
FileSizeLimit
=
imgObj
.
GetInt
(
"FileSizeLimit"
),
Remark
=
imgObj
.
GetStringValue
(
"Remark"
),
FileList
=
new
List
<
string
>(),
};
if
(!
string
.
IsNullOrEmpty
(
imgObj
.
GetStringValue
(
"FileList"
)))
{
try
{
imgItem
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
imgObj
.
GetStringValue
(
"FileList"
));
}
catch
{
}
}
if
(!
isGetAnswer
)
{
imgItem
.
FileList
=
new
List
<
string
>();
}
dataItem
.
CompData
=
imgItem
;
break
;
//视频上传组件
...
...
@@ -189,7 +226,21 @@ namespace Mall.Module.TradePavilion
Name
=
videoObj
.
GetStringValue
(
"Name"
),
FileCount
=
videoObj
.
GetInt
(
"FileCount"
),
FileSizeLimit
=
videoObj
.
GetInt
(
"FileSizeLimit"
),
Remark
=
videoObj
.
GetStringValue
(
"Remark"
),
FileList
=
new
List
<
string
>(),
};
try
{
videoItem
.
FileList
=
Common
.
Plugin
.
JsonHelper
.
DeserializeObject
<
List
<
string
>>(
videoObj
.
GetStringValue
(
"FileList"
));
}
catch
{
}
if
(!
isGetAnswer
)
{
videoItem
.
FileList
=
new
List
<
string
>();
}
dataItem
.
CompData
=
videoItem
;
break
;
}
...
...
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