English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

ASP.NET MVC5+EF6+EasyUI 백엔드 관리 시스템, 微信 공众 계정 개발 중 메시지 관리

서론 

지난 장을 돌아보면, 우리는 메시지 요청과 응답에 대해 잘 알게 되었습니다. 이 장에서는 데이터베이스 테이블을 만들어 보겠습니다. 테이블 설계는 매우 복잡합니다 

당신의 분석 상황 구조에 따라 테이블을 만들 수도 있습니다 

이 테이블을 사용하려면 테이블 결과를 매우 잘 알아야 하며, 이 테이블의 상황은 매우 많습니다 

사고도도 

저는 모델을 분석하고 표현하는 데 사고도도를 많이 사용합니다:

 

테이블 구조 

사고도도를 기반으로, 우리가 만들 수 있는 테이블은 다음과 같습니다:3Z 테이블: 메시지 테이블, 규칙 테이블, 타입 테이블
메시지 테이블: 실제 메시지
규칙 테이블: 텍스트, 그래픽 텍스트, 오디오 등
타입 테이블: 텍스트, 그래픽 텍스트, 오디오(기본 응답, 구독 응답)
也可以是两张表:规制表,消息表(+一个类型字段) 

我这里只设计一张表:消息表(+一个规则字段+一个类型字段) 

设计表结构与个人的平时习惯有关系,我还是喜欢简单的东西,别为了设计而去专门设计,这样只会增加系统的复杂度 

CREATE TABLE [dbo].[WC_MessageResponse](
 [Id] [varchar](50) NOT NULL,  --주키 
 [OfficalAccountId] [varchar](50) NULL, --所属公众号
 [MessageRule] [int] NULL,   --消息规则(枚举)
 [Category] [int] NULL,   --类型(枚举)
 [MatchKey] [varchar](1000) NULL,  --关键字
 [TextContent] [varchar](max) NULL, --文本内容
 [ImgTextContext] [varchar](max) NULL, --图文文本内容
 [ImgTextUrl] [varchar](1000) NULL, --图文图片URL
 [ImgTextLink] [varchar](1000) NULL, --图文图片超链接
 [MeidaUrl] [varchar](1000) NULL,  --语音URL
 [MeidaLink] [varchar](1000) NULL,  --语音超链接
 [Enable] [bit] NOT NULL,   --사용 여부
 [IsDefault] [bit] NOT NULL,  --是否默认
 [Remark] [varchar](2000) NULL,  --설명
 [Sort] [int] NOT NULL,   --排序
 [CreateTime] [datetime] NOT NULL,  --생성 시간
 [CreateBy] [varchar](50) NOT NULL, --생성자
 [ModifyTime] [datetime] NOT NULL,  --수정 시간
 [ModifyBy] [varchar](50) NULL,  --수정자
 CONSTRAINT [PK_WC_MessageResponse] PRIMARY KEY CLUSTERED 
(
 [Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[WC_MessageResponse] WITH CHECK ADD CONSTRAINT [FK_WC_MessageResponse_WC_OfficalAcconts] FOREIGN KEY([OfficalAccountId])
REFERENCES [dbo].[WC_OfficalAccounts] ([Id])
ON DELETE CASCADE
GO
ALTER TABLE [dbo].[WC_MessageResponse] CHECK CONSTRAINT [FK_WC_MessageResponse_WC_OfficalAcconts]
GO

该表对应了两个枚举和关联主表公众号管理的主表 

CREATE TABLE [dbo].[WC_OfficalAccounts](
 [Id] [varchar](50) NOT NULL,  --주키
 [OfficalId] [varchar](200) NULL, --공식 계정의 유일한 ID
 [OfficalName] [varchar](200) NOT NULL, --공식 계정 이름
 [OfficalCode] [varchar](200) NOT NULL, --공식 계정 계정
 [OfficalPhoto] [varchar](1000) NULL, --프로필 사진
 [OfficalKey] [varchar](500) NULL, --EncodingAESKey
 [ApiUrl] [varchar](1000) NULL,  --우리의 자원 서버
 [Token] [varchar](200) NULL,  --Token
 [AppId] [varchar](200) NULL,  --AppId
 [AppSecret] [varchar](200) NULL, --Appsecret
 [AccessToken] [varchar](200) NULL, --접근 토큰
 [Remark] [varchar](2000) NULL,  --설명
 [Enable] [bit] NOT NULL,  --사용 여부
 [IsDefault] [bit] NOT NULL,  --현재 기본 작업 번호 여부
 [Category] [int] NOT NULL,  --카테고리(미디어 번호, 기업 번호, 개인 번호, 개발 테스트 번호)
 [CreateTime] [datetime] NOT NULL, --생성 시간
 [CreateBy] [varchar](50) NOT NULL, --생성자
 [ModifyTime] [datetime] NOT NULL, --수정 시간
 [ModifyBy] [varchar](50) NULL,  --수정자
 CONSTRAINT [PK_WC_OfficalAcconts] PRIMARY KEY CLUSTERED 
(
 [Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

대응하는 열거형 

 public enum WeChatReplyCategory
 {
 //문자
 Text =1,
 //문자 그림
 Image =2,
 //음성}}
 Voice =3,
 //equal, used for reply keywords
 Equal=4,
 //include, used for reply keywords
 Contain = 5
 }
 public enum WeChatRequestRuleEnum
 {
 /// <summary>
 /// 기본적인 답변, 처리되지 않은 경우
 /// </summary>
 Default =0,
 /// <summary>
 /// subscriber reply
 /// </summary>
 Subscriber =1,
 /// <summary>
 /// 텍스트 답변
 /// </summary>
 Text =2,
 /// <summary>
 /// 이미지 답변
 /// </summary>
 Image =3,
 /// <summary>
 /// 오디오 답변
 /// </summary>
 Voice =4,
 /// <summary>
 /// 비디오 답변
 /// </summary>
 Video =5,
 /// <summary>
 /// hyperlink reply
 /// </summary>
 Link =6,
 /// <summary>
 /// LBS 위치 답변
 /// </summary>
 Location =7,
 }

엔ум은 실제로는 제거한 나머지 두 테이블을 대표합니다.
 이제, 테이블 설계가 매우 명확하다고 생각합니다. 

백엔드 코드 

추가, 수정, 삭제, 검색은 매우 일반적이며, 주요 관심사는 프론트엔드에 있습니다. 프론트엔드에서 제출하는 메시지는 규칙, 타입을 포함하여 메시지의 최종 표현을 지정해야 합니다.

Controller

[HttpPost]
 [SupportFilter(ActionName = "Edit")]
 public JsonResult PostData(WC_MessageResponseModel model)
 {
  WC_OfficalAccountsModel accountModel = account_BLL.GetCurrentAccount();
  if (string.IsNullOrEmpty(model.Id))
  {
  model.Id = ResultHelper.NewId;
  }
  model.CreateBy = GetUserId();
  model.CreateTime = ResultHelper.NowTime;
  model.ModifyBy = GetUserId();
  model.ModifyTime = ResultHelper.NowTime;
  model.OfficalAccountId = accountModel.Id;
  model.Enable = true;
  model.IsDefault = true;
  if (m_BLL.PostData(ref errors, model))
  {
  LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",OfficalAccountId" + model.OfficalAccountId, "성공", "저장", "WC_MessageResponse");
  return Json(JsonHandler.CreateMessage(1, Resource.SaveSucceed));
  }
  else
  {
  string ErrorCol = errors.Error;
  LogHandler.WriteServiceLog(GetUserId(), "Id" + model.Id + ",OfficalAccountId" + model.OfficalAccountId + ," + ErrorCol, "실패", "저장", "WC_MessageResponse");
  return Json(JsonHandler.CreateMessage(0, Resource.SaveFail + ErrorCol));
  }
 }

BLL

public bool PostData(ref ValidationErrors errors, WC_MessageResponseModel model)
 {
  try
  {
  WC_MessageResponse entity = new WC_MessageResponse();
  if (IsExists(model.Id))
  {
   entity = m_Rep.GetById(model.Id);
  }
  entity.Id = model.Id;
  entity.OfficalAccountId = model.OfficalAccountId;
  entity.MessageRule = model.MessageRule;
  entity.Category = model.Category;
  entity.MatchKey = model.MatchKey;
  entity.TextContent = model.TextContent;
  entity.ImgTextContext = model.ImgTextContext;
  entity.ImgTextUrl = model.ImgTextUrl;
  entity.ImgTextLink = model.ImgTextLink;
  entity.MeidaUrl = model.MeidaUrl;
  entity.Enable = model.Enable;
  entity.IsDefault = model.IsDefault;
  entity.Remark = model.Remark;
  entity.CreateTime = model.CreateTime;
  entity.CreateBy = model.CreateBy;
  entity.Sort = model.Sort;
  entity.ModifyTime = model.ModifyTime;
  entity.ModifyBy = model.ModifyBy;
  if (m_Rep.PostData(entity))
  {
   return true;
  }
  else
  {
   errors.Add(Resource.NoDataChange);
   return false;
  }
  }
  catch (Exception ex)
  {
  errors.Add(ex.Message);
  ExceptionHander.WriteException(ex);
  return false;
  }
 }

DAL

public bool PostData(WC_MessageResponse model)
 {
  //모든 스위치가 꺼져 있다면, 답변이 비활성화되었다는 것을 의미합니다
  if (model.Category == null)
  {
  return true;
  }
  //모두 기본이 아닌 설정으로 설정합니다
  ExecuteSqlCommand(string.Format("update [dbo].[WC_MessageResponse] set IsDefault=0 where OfficalAccountId ='{0}' and MessageRule={1}, model.OfficalAccountId, model.MessageRule));
  //기본 답변과 구독 답변은 그 외에도 별도로 처리되지 않습니다. 그 이유는 그들에게3여러 모드가 있지만 기본적으로 하나만 설정됩니다
  if (model.Category != (int)WeChatReplyCategory.Image && (model.MessageRule == (int)WeChatRequestRuleEnum.Default || model.MessageRule == (int)WeChatRequestRuleEnum.Subscriber))
  {
  //데이터베이스에 데이터가 있는지 확인합니다
  var entity = Context.WC_MessageResponse.Where(p => p.OfficalAccountId == model.OfficalAccountId && p.MessageRule == model.MessageRule && p.Category == model.Category).FirstOrDefault();
  if (entity != null)
  {
   //원래의
   Context.WC_MessageResponse.Remove(entity);
  }
  }
  //모두 기본 설정
  ExecuteSqlCommand(string.Format("update [dbo].[WC_MessageResponse] set IsDefault=",1 where OfficalAccountId ='{0}' and MessageRule={1} and Category={2}", model.OfficalAccountId, model.MessageRule,model.Category));
  //수정
  if(IsExist(model.Id))
  {
  Context.Entry<WC_MessageResponse>(model).State = EntityState.Modified;
  return Edit(model);
  }
  else { 
  return Create(model);
  }
 }

DAL 층에 대해 설명이 필요합니다 

기본 답변과 관심 답변은 다음과 같습니다:3타입: 텍스트, 문자 그림, 오디오(하지만 하나만 있어야 하므로 IsDefault 필드가 있는데, 어떤 답변을 수행할지를 나타냅니다)따라서 이 두 규칙은 별도로 처리되어야 하며, DAL 코드에서 실행되는 SQL 문을 보면 이해할 수 있습니다. 

그래서 우리는 프론트엔드를 무제한으로 설계해 보겠습니다!

 

프론트엔드는 어떻게 설계할까요? 

그래서 우리는 시각도표를 보겠습니다: 

  

프론트엔드 전체 코드 

<스타일>
 .formtable td {
 수직-정렬: 상단;
 내용填充: 10px;
 }
 .formtable th {
 텍스트-정렬: 왼쪽;
 내용填充: 10px;
 px; line 30px;
 }
 .formtablenormal {
 width: 500px;
 }
 .formtablenormal th {
  경계선: 0px;
  텍스트-정렬: 오른쪽;
 }
 .formtablenormal td {
  경계선: 0px;
  수직-정렬: 중앙;
 }
</스타일>
<스크립트>
 //1문자2문자 그림3음성}}
 var Category = {
 텍스트: 1,
 이미지: 2,
 오디오: 3,
 같음: 4,
 포함: 5
 };
 //
 var RequestRule = {
 기본값: 0,
 구독자: 1,
 텍스트: 2,
 이미지: 3,
 오디오: 4,
 비디오: 5,
 Link: 6,
 Location: 7
 };
 function initDefault() {
 $('#swText0').switchbutton({
  onChange: function(checked) {
  if (checked) {
   $('#swImage0').switchbutton("uncheck");
   $('#swVoice0').switchbutton("uncheck");
   $("#div01").show();
   $("#div02,#div03").hide();
   $("#Category").val(Category.Text);
  }
  }
 });
 $('#swImage0').switchbutton({
  onChange: function(checked) {
  if (checked) {
   $('#swVoice0').switchbutton("uncheck");
   $('#swText0').switchbutton("uncheck");
   $("#div02").show();
   $("#div01,#div03").hide();
   $("#Category").val(Category.Image);
   $("#List0").datagrid("resize");
  }
  }
 });
 $('#swVoice0').switchbutton({
  onChange: function(checked) {
  if (checked) {
   $('#swImage0').switchbutton("uncheck");
   $('#swText0').switchbutton("uncheck");
   $("#div03").show();
   $("#div01,#div02").hide();
   $("#Category").val(Category.Voice);
  }
  }
 });
 //문자
 $.post('@Url.Action("GetList")', {
  page: 1,
  rows: 1,
  category: Category.Text,
  messageRule: RequestRule.Default
 },
 function(data) {
  var rows = data.rows;
  for (var i = 0; i < rows.length; i++
  if (rows[i].Category == Category.Text) {
   $("#Text0").val(rows[i].TextContent);
   if (rows[i].IsDefault) {
   $('#swText0').switchbutton("check");
   $('#swImage0').switchbutton("uncheck");
   $('#swVoice0').switchbutton("uncheck");
   }
  }
  }
 });
 //음성}}
 $.post('@Url.Action("GetList")', {
  page: 1,
  rows: 1,
  category: Category.Voice,
  messageRule: RequestRule.Default
 },
 function (data) {
  var rows = data.rows;
  for (var i = 0; i < rows.length; i++
  if (rows[i].Category == Category.Voice) {
   $("#VoiceTitle0").val(rows[i].TextContent);
   $("#VoiceContent0").val(rows[i].Remark);
   $("#VoiceUrl0").val(rows[i].MeidaUrl);
   if (rows[i].IsDefault) {
   $('#swVoice0').switchbutton("check");
   $('#swText0').switchbutton("uncheck");
   $('#swImage0').switchbutton("uncheck");
   }
  }
  }
 });
 $('#List0').datagrid({
  url: '@Url.Action("GetList")?messageRule=' + RequestRule.Default + "&category=", + Category.Image,
  width: SetGridWidthSub(40),
  methord: 'post',
  height: SetGridHeightSub(175),
  fitColumns
  sortName: 'Sort',
  sortOrder: 'asc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  onLoadSuccess: function (data) {
  if (data.rows.length > 0)
  {
   if (data.rows[0].IsDefault) {
   $('#swImage0').switchbutton("check");
   $('#swText0').switchbutton("uncheck");
   $('#swVoice0').switchbutton("uncheck");
   $("#Category").val(Category.Image);
   }
  }
  },
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'TextContent',
  title: '标题',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextUrl',
  title: '이미지',
  width: 50,
  sortable: true,
  align: 'center', formatter: function (value) { return "<img width='80' height='80' src='" + value + ""/">" }
  },
  {
  field: 'ImgTextLink',
  title: '超链接',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextContext',
  title: '回复内容',
  width: 180,
  sortable: true
  },
  ]]
 });
 $("#btnCreate02").unbind().click(function () {
  $("#modalwindow0").window({
  title: '@Resource.Create',
  width: 700,
  px; line 500,
  iconCls: 'fa fa-plus
  }).window('open');
 });
 $("#btnSava01").unbind().click(function() {
  //기본 답변
  $("#MessageRule").val(RequestRule.Default);
  if ($.trim($("#Text0").val())=="")
  {
  $.messager.alert('@Resource.Tip', '内容必须填写!', 'warning');
  return;
  }
  
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
   data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 $("#btnSava02").unbind().click(function () {
  
  $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
  return;
  }
  
  $.messager.alert('@Resource.Tip', '이미지를 업로드해야 합니다!', 'warning');
  return;
  }
  if ($.trim($((
  $.messager.alert('@Resource.Tip', '排序必须填写!', 'warning');
  return;
  }
  //图文回复
  $("#MessageRule").val(RequestRule.Default);
  ((
  ((
  $("#ImgTextContext").val($("#ImageContent0").val());
  $("#ImgTextLink").val($("#ImageLink0").val());
  $("#Sort").val($("#Sort0").val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   if (data.type == 1
   $("#Id").val("
   $("#List0").datagrid('reload');
   $("#modalwindow0").window('close');
   $("#ImageTitle0").val("");
   $("#form02 img").attr("src", "/Content/Images/NotPic.jpg");
   $("#ImageContent0").val("");
   $("#ImageLink0").val("");
   $("#Sort0").val(0);
   $('#FileUpload02").val('');
   }
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 $("#btnSava03").unbind().click(function() {
  //기본 답변
  $("#MessageRule").val(RequestRule.Default);
  if ($.trim($("#Text0").val())=="")
  {
  if ($.trim($("#VoiceTitle0").val()) == "") {
   $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
   return;
  }
  if ($.trim($("#VoiceUrl0").val()) == "") {
   $.messager.alert('@Resource.Tip', '必须上传语音!', 'warning');
   return;
  }
  $("#TextContent").val($("#VoiceTitle0").val());
  $("#MeidaUrl").val($("#VoiceUrl0").val());
  $("#Remark").val($("#VoiceContent0").val());
  }
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 }
 function initSubscriber() {
  $('#swText1').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $('#swImage1').switchbutton("uncheck");
   $('#swVoice1').switchbutton("uncheck");
   $("#div11").show();
   $("#div12,#div13").hide();
   $("#Category").val(Category.Text);
  }
  }
 });
 $('#swImage1').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $('#swVoice1').switchbutton("uncheck");
   $('#swText1').switchbutton("uncheck");
   $("#div12").show();
   $("#div11,#div13").hide();
   $("#Category").val(Category.Image);
   $("#List1").datagrid("resize");
  }
  }
 });
 $('#swVoice1').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $('#swImage1').switchbutton("uncheck");
   $('#swText1').switchbutton("uncheck");
   $("#div13").show();
   $("#div11,#div12").hide();
   $("#Category").val(Category.Voice);
  }
  }
 });
 //문자
 $.post('@Url.Action("GetList")', {
  page: 1,
  rows: 1,
  category: Category.Text,
  messageRule: RequestRule.Subscriber
 },
 function(data) {
  var rows = data.rows;
  for (var i = 0; i < rows.length; i++
  if (rows[i].Category == Category.Text) {
   $("#Text1").val(rows[i].TextContent);
   if (rows[i].IsDefault) {
   $('#swText1').switchbutton("check");
   $('#swImage1').switchbutton("uncheck");
   $('#swVoice1').switchbutton("uncheck");
   }
  }
  }
 });
 //음성}}
 $.post('@Url.Action("GetList")', {
  page: 1,
  rows: 1,
  category: Category.Voice,
  messageRule: RequestRule.Subscriber
 },
 function (data) {
  var rows = data.rows;
  for (var i = 0; i < rows.length; i++
  if (rows[i].Category == Category.Voice) {
   $("#VoiceTitle1").val(rows[i].TextContent);
   $("#VoiceContent1").val(rows[i].Remark);
   if (rows[i].IsDefault) {
   $('#swVoice1').switchbutton("check");
   $('#swText1').switchbutton("uncheck");
   $('#swImage1').switchbutton("uncheck");
   }
  }
  }
 });
 $('#List1').datagrid({
  url: '@Url.Action("GetList")?messageRule=' + RequestRule.Subscriber + "&category=", + Category.Image,
  width: SetGridWidthSub(40),
  methord: 'post',
  height: SetGridHeightSub(175),
  fitColumns
  sortName: 'Sort',
  sortOrder: 'asc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  onLoadSuccess: function (data) {
  if (data.rows.length > 0)
  {
   if (data.rows[0].IsDefault) {
   $('#swImage1').switchbutton("check");
   $('#swText1').switchbutton("uncheck");
   $('#swVoice1').switchbutton("uncheck");
   }
  }
  },
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'TextContent',
  title: '标题',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextUrl',
  title: '이미지',
  width: 50,
  sortable: true,
  align: 'center', formatter: function (value) { return "<img width='80' height='80' src='" + value + ""/">" }
  },
  {
  field: 'ImgTextLink',
  title: '超链接',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextContext',
  title: '回复内容',
  width: 180,
  sortable: true
  },
  ]]
 });
 $("#btnCreate");12").unbind().click(function () {
  $("#modalwindow1").window({
  title: '@Resource.Create',
  width: 700,
  px; line 500,
  iconCls: 'fa fa-plus
  }).window('open');
 });
 $("#btnSava");11").unbind().click(function() {
  //기본 답변
  $("#MessageRule").val(RequestRule.Subscriber);
  if ($.trim($("#Text1").val())==\""\"
  {
  $.messager.alert('@Resource.Tip', '内容必须填写!', 'warning');
  return;
  }
  $("#TextContent").val($.trim($("#Text1).val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
   data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 $("#btnSava");12").unbind().click(function () {
  if ($.trim($("#ImageTitle1").val()) == "" {
  $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
  return;
  }
  if ($.trim($("#ImageUrl1").val()) == "" {
  $.messager.alert('@Resource.Tip', '이미지를 업로드해야 합니다!', 'warning');
  return;
  }
  if ($.trim($("#Sort1").val()) == "" {
  $.messager.alert('@Resource.Tip', '排序必须填写!', 'warning');
  return;
  }
  //图文回复
  $("#MessageRule").val(RequestRule.Subscriber);
  $("#TextContent").val($("#ImageTitle1").val());
  $("#ImgTextUrl").val($("#ImageUrl1").val());
  $("#ImgTextContext").val($("#ImageContent1").val());
  $("#ImgTextLink").val($("#ImageLink1").val());
  $("#Sort").val($("#Sort1").val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   if (data.type == 1
   $("#Id").val("
   $("#List1").datagrid('reload');
   $("#modalwindow1").window('close');
   "$ImageTitle1").val("
   $("#form12 img").attr("src", "/Content/Images/NotPic.jpg");
   $('#ImageContent'1").val("
   $('#ImageLink',1").val("
   $('#Sort',1").val(0);
   $('#FileUpload',12").val('');
   }
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 $("#btnSava");13").unbind().click(function() {
  //기본 답변
  $("#MessageRule").val(RequestRule.Subscriber);
  if ($.trim($("#Text1").val())==\""\"
  {
  if ($.trim($("#VoiceTitle");1").val()) == "" {
   $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
   return;
  }
  if ($.trim($("#VoiceUrl");1").val()) == "" {
   $.messager.alert('@Resource.Tip', '必须上传语音!', 'warning');
   return;
  }
  $("#TextContent").val($("#VoiceTitle");1").val());
  $("#MeidaUrl").val($("#VoiceUrl");1").val());
  $("#Remark").val($("#VoiceContent");1").val());
  }
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 }
 function initText() {
 $("#Category").val(Category.Equal);
 $('#List2').datagrid({
  url: '@Url.Action("GetList")?messageRule=' + RequestRule.Text,
  width: SetGridWidthSub(40),
  methord: 'post',
  height: SetGridHeightSub(100),
  fitColumns
  sortName: 'CreateTime',
  sortOrder: 'desc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'Category',
  title: 'Category',
  width: 80,
  sortable: true,
  hidden: true
  },
  {
  field: 'MatchKey',
  title: '关键字',
  width: 80,
  sortable: true,
  formatter: function (value,row,index){
   if (row.Category == Category.Equal) {
   return "(完全匹配)" + value
   } else {
   return "(模糊匹配)" + value
   }
  }
  },
  {
  field: 'TextContent',
  title: '回复内容',
  width: 80,
  sortable: true
  },
  ]]
 });
 $('#swMessageRule',2').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $("#Category").val(Category.Equal);
  } else {
   $("#Category").val(Category.Contain);
  }
  }
 });
 $("#btnCreate");2").unbind().click(function () {
  $("#modalwindow2").window({
  title: '@Resource.Create',
  width: 700,
  px; line 400,
  iconCls: 'fa fa-plus
  }).window('open');
 });
 $("#btnSava");2").unbind().click(function () {
  if ($.trim($("#TextMatchKey");2").val()) == "" {
  $.messager.alert('@Resource.Tip', '关键字必须填写!', 'warning');
  return;
  }
  if ($.trim($("#Text2").val()) == "" {
  $.messager.alert('@Resource.Tip', '内容必须填写!', 'warning');
  return;
  }
  //텍스트 답변
  $("#MessageRule").val(RequestRule.Text);
  $("#MatchKey").val($.trim($("#TextMatchKey2).val());
  $("#TextContent").val($("#Text2").val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   if (data.type == 1
   $("#Id").val("
   $("#List2").datagrid('reload');
   $("#modalwindow2").window('close');
   $("#TextMatchKey2").val("
   $("#Text2").val("
   }
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 }
 function initImage() {
 $("#Category").val(Category.Equal);
 $('#List31').datagrid({
  url: '@Url.Action("GetListProperty")?messageRule=' + RequestRule.Image,
  width: 300,
  methord: 'post',
  height: SetGridHeightSub(100),
  fitColumns
  sortName: 'CreateTime',
  sortOrder: 'desc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  onClickRow: function (index,data) {
  var row = $('#List31}).datagrid('getSelected');
  if (row != null)
  {
   $('#List3}).datagrid({url:'@Url.Action("GetList")?messageRule='+RequestRule.Image+"&category=",+row.Category+"&matchKey=",+row.MatchKey});
  }
  },
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'Category',
  title: 'Category',
  width: 80,
  sortable: true,
  hidden: true
  },
  {
  field: 'MatchKey',
  title: '关键字',
  width: 130,
  sortable: true,
  formatter: function (value, row, index) {
   if (row.Category == Category.Equal) {
   return "(完全匹配)" + value
   } else {
   return "(模糊匹配)" + value
   }
  }
  },
  {
  field: 'CreateTime',
  title: '생성 시간',
  width: 80,
  sortable: true
  },
  ]]
 }).datagrid('getPager').pagination({ showPageList: true, showRefresh: false, displayMsg: '' });
 $('#List3').datagrid({
  url:'@Url.Action("GetList")?messageRule='+RequestRule.Image+"&category=x&matchKey=x",
  width: SetGridWidthSub(340),
  methord: 'post',
  height: SetGridHeightSub(100),
  fitColumns
  sortName: 'Sort',
  sortOrder: 'asc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'Category',
  title: 'Category',
  width: 80,
  sortable: true,
  hidden: true
  },
  {
  field: 'TextContent',
  title: '标题',
  width: 80,
  sortable: true
  },
  {
  field: 'MatchKey',
  title: '关键字',
  width: 80,
  sortable: true,
  formatter: function (value,row,index){
   if (row.Category == Category.Equal) {
   return "(完全匹配)" + value
   } else {
   return "(模糊匹配)" + value
   }
  }
  },
  {
  field: 'ImgTextUrl',
  title: '이미지',
  width: 50,
  sortable: true,
  align: 'center', formatter: function (value) { return "<img width='80' height='80' src='" + value + ""/">" }
  },
  {
  field: 'ImgTextLink',
  title: '超链接',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextContext',
  title: '回复内容',
  width: 180,
  sortable: true
  },
  {
  field: 'Sort',
  title: '정렬',
  width: 50,
  sortable: true
  },
  ]]
 });
 $('#swMessageRule',3').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $("#Category").val(Category.Equal);
  } else {
   $("#Category").val(Category.Contain);
  }
  }
 });
 $("#btnCreate");3").unbind().click(function () {
  $("#modalwindow3").window({
  title: '@Resource.Create',
  width: 700,
  px; line 550,
  iconCls: 'fa fa-plus
  }).window('open');
 });
 $("#btnSava");3").unbind().click(function () {
  if ($.trim($("#ImageTitle3").val()) == "" {
  $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
  return;
  }
  if ($.trim($("#TextMatchKey");3").val()) == "" {
  $.messager.alert('@Resource.Tip', '关键字必须填写!', 'warning');
  return;
  }
  if ($.trim($("#ImageUrl3").val()) == "" {
  $.messager.alert('@Resource.Tip', '이미지를 업로드해야 합니다!', 'warning');
  return;
  }
  //图文回复
  $("#MessageRule").val(RequestRule.Image);
  $("#MatchKey").val($.trim($("#TextMatchKey3).val());
  $("#TextContent").val($("#ImageTitle3").val());
  $("#ImgTextUrl").val($("#ImageUrl3").val());
  $("#ImgTextContext").val($("#ImageContent3").val());
  $("#ImgTextLink").val($("#ImageLink3").val());
  $("#Sort").val($("#Sort3").val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   if (data.type == 1
   $("#Id").val("
   $("#List3").datagrid('reload');
   $("#List31").datagrid('reload');
   $("#modalwindow3").window('close');
   "$ImageTitle3").val("
   $("#form3 img").attr("src", "/Content/Images/NotPic.jpg");
   $('#ImageContent'3").val("
   $('#ImageLink',3").val("
   $('#Sort',3").val(0);
   $('#FileUpload',3").val('');
   $("#TextMatchKey3").val('');
   }
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 }
 function initVoice() {
 $("#Category").val(Category.Equal);
 $('#List4').datagrid({
  url: '@Url.Action("GetList")?messageRule=' + RequestRule.Voice,
  width: SetGridWidthSub(40),
  methord: 'post',
  height: SetGridHeightSub(100),
  fitColumns
  sortName: 'CreateTime',
  sortOrder: 'desc',
  idField: 'Id',
  pageSize: 15,
  pageList: [15, 20, 30, 40, 50],
  pagination
  striped: true,
  //stripedRows
  singleSelect: true,
  //singleSelectMode
  //rownumbers: true,//rownumber
  columns: [[{
  field: 'Id',
  title: 'Id',
  width: 80,
  hidden: true
  },
  {
  field: 'Category',
  title: 'Category',
  width: 80,
  sortable: true,
  hidden: true
  },
  {
  field: 'TextContent',
  title: '标题',
  width: 80,
  sortable: true
  },
  {
  field: 'MatchKey',
  title: '关键字',
  width: 80,
  sortable: true,
  formatter: function (value,row,index){
   if (row.Category == Category.Equal) {
   return "(完全匹配)" + value
   } else {
   return "(模糊匹配)" + value
   }
  }
  },
  {
  field: 'MeidaUrl',
  title: '语音',
  width: 80,
  sortable: true,
  align: 'center', formatter: function (value) { return "<img width='80' height='80' src='" + value + ""/">" }
  },
  {
  field: 'ImgTextLink',
  title: '超链接',
  width: 80,
  sortable: true
  },
  {
  field: 'ImgTextContext',
  title: '回复内容',
  width: 80,
  sortable: true
  },
  ]]
 });
 $('#swMessageRule',4').switchbutton({}}
  onChange: function(checked) {
  if (checked) {
   $("#Category").val(Category.Equal);
  } else {
   $("#Category").val(Category.Contain);
  }
  }
 });
 $("#btnCreate");4").unbind().click(function() {
  $("#modalwindow4").window({
  title: '@Resource.Create',
  width: 700,
  px; line 500,
  iconCls: 'fa fa-plus
  }).window('open');
 });
 $("#btnSava");4").unbind().click(function () {
  if ($.trim($("#VoiceTitle");4").val()) == "" {
  $.messager.alert('@Resource.Tip', '标题必须填写!', 'warning');
  return;
  }
  if ($.trim($("#TextMatchKey");4").val()) == "" {
  $.messager.alert('@Resource.Tip', '关键字必须填写!', 'warning');
  return;
  }
  if ($.trim($("#VoiceUrl");4").val()) == "" {
  $.messager.alert('@Resource.Tip', '必须上传语音!', 'warning');
  return;
  }
  //图文回复
  $("#MessageRule").val(RequestRule.Voice);
  $("#MatchKey").val($("#TextMatchKey");4").val());
  $("#TextContent").val($("#VoiceTitle");4").val());
  $("#MeidaUrl").val($("#VoiceUrl");4").val());
  $("#Remark").val($("#VoiceContent");4").val());
  if ($("#form").valid()) {
  $.ajax({
   url: "@Url.Action("PostData")",
   type: "Post",
  data: $("#form").serialize(),
  dataType: "json",
  success: function(data) {
   if (data.type == 1
   $("#Id").val("
   $("#List4").datagrid('reload');
   $("#modalwindow4").window('close');
   $("#TextMatchKey4").val("
   $("#VoiceTitle4").val("
   $("#VoiceUrl4").val("
   $("#VoiceContent4").val("
   4").val("
   $("#form3 img").attr("src", "/Content/Images/NotPic.jpg");
   }
   $.messageBox5s('@Resource.Tip', data.message);
  }
  });
 }
 });
 }
 $(function() {
 $('#tt').tabs({
  justified: true,
  width: '100%,
  height: $(window).height() - 20
 });
 $('#tt').tabs({
  onSelect: function(title, index) {
  switch (index) {
   case RequestRule.Default:
   initDefault();
   break;
   case RequestRule.Subscriber:
   initSubscriber();
   break;
   case RequestRule.Text:
   initText();
   break;
   case RequestRule.Image:
   initImage();
   break;
   case RequestRule.Voice:
   initVoice();
   break;
  }
  }
 });
 //첫 번째 탭 초기화
 initDefault();
 //자동 너비 높이
 $(window).resize(function() {
  $('#tt').tabs({
  height: $(window).height() - 20
  });
  //$('#List2').datagrid('resize', {
  // width: SetGridWidthSub(40),
  // height: SetGridHeightSub(100)
  //});
 });
 });
 $(function () {
 $('input.textbox').validatebox().bind('blur', function () {
  $(this).validatebox('enableValidation').validatebox('validate');
 });
 )
</script>
<form id="form" method="post">
 <input type="hidden" id="Id" name="Id" />
 <input type="hidden" id="MessageRule" name="MessageRule" />
 <input type="hidden" id="Category" name="Category" />
 <input type="hidden" id="MatchKey" name="MatchKey" />
 <input type="hidden" id="TextContent" name="TextContent" />
 <input type="hidden" id="ImgTextContext" name="ImgTextContext" />
 <input type="hidden" id="ImgTextUrl" name="ImgTextUrl" />
 <input type="hidden" id="ImgTextLink" name="ImgTextLink" />
 <input type="hidden" id="MeidaUrl" name="MeidaUrl" />
 <input type="hidden" id="MeidaLink" name="MeidaLink" />
 <input type="hidden" id="Remark" name="Remark" />
 <input type="hidden" id="Sort" name="Sort" value="0" />
 <input type="hidden" id="CreateTime" name="CreateTime" />
 <input type="hidden" id="CreateBy" name="CreateBy" />
 <input type="hidden" id="ModifyTime" name="ModifyTime" />
 <input type="hidden" id="ModifyBy" name="ModifyBy" />
</form>
options="required:true"10<div style="padding:
 <div id="tt" class="easyui-tabs">
  <div title="[#1#]"> 
  #]" >45<table class="formtable" style="height:-px; line45height:10px; width:-0%; border1bottom:7px solid #e
   <tr>
   <td><10<table class="formtablenormal" style="margin:
    文本: @Html.SwitchButtonByEdit("swText0", false)
   </td>
   <td><10<table class="formtablenormal" style="margin:
    图文: @Html.SwitchButtonByEdit("swImage0", false)
   </td>
   <td><10<table class="formtablenormal" style="margin:
    语音: @Html.SwitchButtonByEdit("swVoice0", false)
   </td>
   ", false)/td>
   <td><3<td style="width:
    00px;">-<div class="color/green">현재 작업 공공 계정:<span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</div>
   </td>
   </tr>
  </table>
  <div id="div0"1<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava0"1", "fa fa-" class="displaynone">
   </div>
   <textarea id="Text0" style="width: 3span>< 3300px;height:20px;"></textarea>
   </div>
  <div id="div0"2<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnCreate0"2", "fa fa-search", "답글 추가", ref perm, "Edit", false)
   </div>
   <div id="modalwindow0" class="easyui"-window" style="width:600px; height:550px;" data-options="modal:true,closed: true,minimizable:false,shadow:false">
   <div class="mvctool bgb">
    @Html.ToolButton("btnSava0"2", "fa fa-search", "저장提交", ref perm, "Edit", false)
   </div>
   <table class="formtablenormal">
    <tr><th>제목: </th><td><input type="text" id="ImageTitle0" class="textbox" data-" class="textbox" data /></td></tr>
    <tr>
    <th>이미지: </th>
    <td>
     <form id="form0"2" method="post">
     <input type="hidden" name="ImageUrl0" id="ImageUrl0" />
     <img class="expic" src="/Content/Images/NotPic.jpg" />
     <br />
     <a href="javascript:$('#FileUpload0"2').trigger('click');" class="files">@Resource.Browse</a>
     <input type="file" id="FileUpload0"2" class="displaynone" name="FileUpload0"2" onchange="Upload('SingleFile', 'ImageUrl0', 'FileUpload0"2', '1', '1', '#form0"2');" />
     <span class="uploading">@Resource.Uploading</span>
     </form>
    </tr>
    <tr><th>내용: </th><td><textarea id="ImageContent0" style="width: 300px; height: 100px;"></textarea></td></tr>
    <tr><th>링크: </th><td><input type="text" id="ImageLink0" /></td></tr>
    <tr><th>정렬: </th><td><input type="number" id="Sort0" value="0" /></td></tr>
   </table>
   </div>
   options="required:true"10<div style="padding:
   <table id="List0"></table>
   </div> 
  </div>
  <div id="div0"3<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava0"3", "fa fa-" class="displaynone">
   </div>
    plus", "저장", ref perm, "편집", false)2<table class="formtablenormal" style="margin:
     <tr><th>제목: </th><td><input type="text" id="VoiceTitle0" /></td></tr>
     <tr><th>语音: </th><td>
        <form id="form0"3" method="post">
        <input type="text" name="VoiceUrl0" class="left" id="VoiceUrl0" />
        <a href="javascript:$('#FileUpload0"3').trigger('click');" class="files">@Resource.Browse</a>
        " class="left" id="VoiceUrl0"/mpeg" id="FileUpload0"3" class="displaynone" name="FileUpload0"3" onchange="Upload('SingleFile', 'VoiceUrl0', 'FileUpload0"3', '', '', '#form03');" />
        <span class="uploading">@Resource.Uploading</span>
        </form>
     </td></tr>
     <tr><th>설명: </', '', '', '#form0}}335px; height:300px;"></textarea></td></tr>
    </table>
   </div> 
  </div>
  <div title="[#2th><td><textarea id="VoiceContent0" style="width:
  #]" >45<table class="formtable" style="height:-px; line45height:10px; width:-0%; border1bottom:7px solid #e
   <tr>
   <td><10<table class="formtablenormal" style="margin:
    eaec">1오디오: @Html.SwitchButtonByEdit("swVoice
   </td>
   <td><10<table class="formtablenormal" style="margin:
    텍스트: @Html.SwitchButtonByEdit("swText1오디오: @Html.SwitchButtonByEdit("swVoice
   </td>
   <td><10<table class="formtablenormal" style="margin:
    이미지: @Html.SwitchButtonByEdit("swImage1오디오: @Html.SwitchButtonByEdit("swVoice
   </td>
   ", false)/td>
   <td><3<td style="width:
    00px;">-<div class="color/green">현재 작업 공공 계정:<span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</div>
   </td>
   </tr>
  </table>
  px;">11<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava11", "fa fa-" class="displaynone">
   </div>
   <textarea id="Text1" 스타일="폭: 3span>< 3300px;height:20px;"></textarea>
  </div>
  px;">12<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnCreate12", "fa fa-search", "답글 추가", ref perm, "Edit", false)
   @Html.ToolButton("btnEdit12", "fa fa-search", "수정", ref perm, "Edit", true)
   @Html.ToolButton("btnDelete12", "fa fa-search", "삭제", ref perm, "Delete", false)
   </div>
   <div id="modalwindow1" class="easyui-window" style="width:600px; height:550px;" data-options="modal:true,closed: true,minimizable:false,shadow:false">
   <div class="mvctool bgb">
    @Html.ToolButton("btnSava12", "fa fa-search", "저장提交", ref perm, "Edit", false)
   </div>
   <table class="formtablenormal">
    <tr><th>제목: </th><td><input type="text" id="ImageTitle10px; margin:-" class="textbox" data /></td></tr>
    <tr>
    <th>이미지: </th>
    <td>
     <form id="form12" method="post">
     <input type="hidden" name="ImageUrl1" id="ImageUrl1" />
     <img class="expic" src="/Content/Images/NotPic.jpg" />
     <br />
     <a href="javascript:$('#FileUpload12').trigger('click');" class="files">@Resource.Browse</a>
     <input type="file" id="FileUpload12" class="displaynone" name="FileUpload12" onchange="Upload('SingleFile', 'ImageUrl1', 'FileUpload12', '1', '1', '#form12');" />
     <span class="uploading">@Resource.Uploading</span>
     </form>
    </tr>
    <tr><th>내용: </th><td><textarea id="ImageContent1" 스타일="폭: 300px; height: 100px;"></textarea></td></tr>
    <tr><th>링크: </th><td><input type="text" id="ImageLink1" /></td></tr>
    <tr><th>정렬: </th><td><input type="number" id="Sort1" value="0" /></td></tr>
   </table>
   </div>
   options="required:true"10<div style="padding:
   <table id="List1></table>
   </div>
  </div>
  px;">13<div id="div
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava13", "fa fa-" class="displaynone">
   </div>
   plus", "저장", ref perm, "편집", false)2<table class="formtablenormal" style="margin:
   <tr><th>제목: </th><td><input type="text" id="VoiceTitle1" /></td></tr>
   <tr>
    <th>음성: </th>
    <td>
    <form id="form13" method="post">
     0px;">1<input type="text" name="VoiceUrl />
     <a href="javascript:$('#FileUpload13').trigger('click');" class="files">@Resource.Browse</a>
     " class="left" id="VoiceUrl0"/<input type="file" accept="audio13" class="displaynone" name="FileUpload13" onchange="Upload('SingleFile', 'VoiceUrl1', 'FileUpload13', '', '', '#form13');" />
     <span class="uploading">@Resource.Uploading</span>
    </form>
    </td>
   </tr>
   <tr><th>설명: </th><td><textarea id="VoiceContent1" 스타일="폭:335px; height:300px;"></textarea></td></tr>
   </table>
  </div> 
  </div>
  <div title="[#3#]" style="padding:10px">
  <div class="mvctool ">
   @Html.ToolButton("btnCreate2", "fa fa-search", "추가 답변", ref perm, "편집", true)
   @Html.ToolButton("btnEdit2", "fa fa-search", "수정", ref perm, "Edit", true)
   @Html.ToolButton("btnDelete2", "fa fa-search", "삭제", ref perm, "Delete", false)
   <div class="rightdiv color-green">
   현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
  </div>
  <div id="modalwindow2"
   class="easyui-window
   style="width:600px; height:500px;" data-options="modal:true,closed: true,minimizable:false,shadow:false">
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava2", "fa fa-search", "저장提交", ref perm, "Edit", false)
   <div class="rightdiv color-green">
    현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
   </div>
   <table class="formtablenormal">
   <tr>
    <th>키워드: </th>
    <td>
    <input type="text" id="TextMatchKey2" />
    </td>
   </tr>
   <tr>
    <th>규칙: </th>
    <td>
    @Html.SwitchButtonByEdit("swMessageRule2", true, "혼잡 매칭(키워드가 내용을 포함함), "완전 매칭(내용과 키워드가 완전히 일치함), "280")
    </td>
   </tr>
   <tr>
    <th>내용: </th>
    <td>
    <textarea id="Text2" 스타일="폭: 280px;height:200px"></textarea>
    </td>
   </tr>
   </table>
  </div>
  <table id="List2></table>
  </div>
  <div title="[#4#]" style="padding:10px">
  <div class="mvctool">
   @Html.ToolButton("btnCreate3", "fa fa-search", "추가 답변", ref perm, "편집", true)
   @Html.ToolButton("btnEdit3", "fa fa-search", "수정", ref perm, "Edit", true)
   @Html.ToolButton("btnDelete3", "fa fa-search", "삭제", ref perm, "Delete", false)
   <div class="rightdiv color-green">
   현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
  </div>
  <div id="modalwindow3" class="easyui-window" style="width:600px; height:550px;" data-options="modal:true,closed: true,minimizable:false,shadow:false">
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava3", "fa fa-search", "저장提交", ref perm, "Edit", false)
   <div class="rightdiv color-green">
    현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
   </div>
   <table class="formtablenormal">
   <tr><th>제목: </th><td><input type="text" id="ImageTitle3" /></td></tr>
   <tr>
    <th>키워드: </th>
    <td>
    <input type="text" id="TextMatchKey3" />
    </td>
   </tr>
   <tr>
    <th>규칙: </th>
    <td>
    @Html.SwitchButtonByEdit("swMessageRule3", true, "혼잡 매칭(키워드가 내용을 포함함), "완전 매칭(내용과 키워드가 완전히 일치함), "280")
    </td>
   </tr>
   <tr>
    <th>이미지: </th>
    <td>
    <form id="form3" method="post">
     <input type="hidden" name="ImageUrl3" id="ImageUrl3" />
     <img class="expic" src="/Content/Images/NotPic.jpg" />
     <br />
     <a href="javascript:$('#FileUpload3').trigger('click');" class="files">@Resource.Browse</a>
     <input type="file" id="FileUpload3" class="displaynone" name="FileUpload3" onchange="Upload('SingleFile', 'ImageUrl3', 'FileUpload3', '1', '1', '#form3');" />
     <span class="uploading">@Resource.Uploading</span>
    </form>
    </td>
   </tr>
   <tr><th>내용: </th><td><textarea id="ImageContent3" 스타일="폭: 300px; height: 80px;"></textarea></td></tr>
   <tr><th>링크: </th><td><input type="text" id="ImageLink3" /></td></tr>
   <tr><th>정렬: </th><td><input type="number" id="Sort3" value="0" /></td></tr>
   </table>
  </div>
  <table><tr><td><table id="List31></table></td><td> </td><td><table id="List3></table></td></tr></table>
  </div>
  <div title="[#5#]" style="padding:10px">
  <div class="mvctool ">
   @Html.ToolButton("btnCreate4", "fa fa-search", "답글 추가", ref perm, "Edit", false)
   @Html.ToolButton("btnEdit4", "fa fa-search", "수정", ref perm, "Edit", true)
   @Html.ToolButton("btnDelete4", "fa fa-search", "삭제", ref perm, "Delete", false)
   <div class="rightdiv color-green">
   현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
  </div>
  <div id="modalwindow4"
   class="easyui-window
   style="width:600px; height:500px;" data-options="modal:true,closed: true,minimizable:false,shadow:false">
   <div class="mvctool bgb">
   @Html.ToolButton("btnSava4", "fa fa-search", "저장提交", ref perm, "Edit", false)
   <div class="rightdiv color-green">
    현재 작업 공식 계정: <span id="CurrentOfficalAccount">@ViewBag.CurrentOfficalAcount</span>
   </div>
   </div>
   <table class="formtablenormal">
   <tr><th>제목: </th><td><input type="text" id="VoiceTitle4" /></td></tr>
   <tr>
    <th>키워드: </th>
    <td>
    <input type="text" id="TextMatchKey4" />
    </td>
   </tr>
   <tr>
    <th>규칙: </th>
    <td>
    @Html.SwitchButtonByEdit("swMessageRule4", true, "혼잡 매칭(키워드가 내용을 포함함), "완전 매칭(내용과 키워드가 완전히 일치함), "280")
    </td>
   </tr>
   <tr>
    <th>음성: </th>
    <td>
    <form id="form4" method="post">
     <input type="text" class="left" name="VoiceUrl4" id="VoiceUrl4" />
     <a href="javascript:$('#FileUpload4').trigger('click');" class="files">@Resource.Browse</a>
     <input type="file" id="FileUpload4" accept="audio/mpeg" class="displaynone" name="FileUpload4" onchange="Upload('SingleFile', 'VoiceUrl4', 'FileUpload4', '', '', '#form4');" />
     <span class="uploading">@Resource.Uploading</span>
    </form>
    </td>
   </tr>
   <tr><th>설명: </th><td><textarea id="VoiceContent4" 스타일="폭: 300px; height: 100px;"></textarea></td></tr>
   </table>
  </div>
  <table id="List4></table>
  </div>
  @*<div title="[#6#]"
   style="padding:10px">
  </div>*@
  @*<div title="[#7#]"
   styIe="padding:10px">
  </div>
  <div title="[#8#]"
   style="padding:10px">
  </div>*@
 </div>
 </div>

프론트엔드의 사고 방식을 사용하여 프론트엔드 코드를 빠르게 이해하고 실제로 적용합니다 

결론 

메시지 관리는 매우 기술적인 일입니다

1. 메시지가 작업 답변이 없는 경우, 기본 답변을 사용해야 합니다. 그렇지 않으면 사용자는 응답을 받지 못하고 경험을 잃습니다 

2. 키워드 설계는 일반적으로 일렬로 연결되어 있으며, 가이드 역할을 합니다
예를 들어:

키워드:(저는) 답변:1참여하여 선물을 받을 수 있습니다.2직접 얻을 수 있습니다50원
키워드:(1) 답변:3일반 청자를 얻을 수 있습니다.4普洱차를 얻을 수 있습니다
키워드:(3또는4) 답변: 귀하의 주소와 전화번호 및 수령인을 답변하십시오
이렇게 하면 시스템과 사용자 간의 전체 대화를 얻게 됩니다. 물론, 사용자의 마지막 정보를 처리해야 합니다.

이 문서는 'ASP.NET 웹 개발 가이드 총정리'에 정리되었습니다. 많은 학습과 읽기를 바랍니다.

관리 시스템에 대한 더 많은 내용은 '관리 시스템 주제'를 클릭하여 학습하십시오.

이것이 이 문서의 전체 내용입니다. 많은 도움이 되었기를 바랍니다. 또한, 많은 지원을 해 주시기 바랍니다.

성명서: 이 문서의 내용은 인터넷에서 가져왔으며, 저작권자는 모두에게 있습니다. 내용은 인터넷 사용자가 자발적으로 기여하고 업로드한 것이며, 이 사이트는 소유권을 가지지 않으며, 인공적인 편집 처리를하지 않으며, 관련 법적 책임도 부담하지 않습니다. 저작권 위반이 의심되는 내용을 발견하면 메일을 notice#w로 보내 주세요.3codebox.com(메일을 보내면 #을 @으로 변경하십시오. 신고하고 관련 증거를 제공하면, 사이트는 즉시 위반된 내용을 삭제합니다.

추천해 드립니다