Index.cshtml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. @{
  2. ViewBag.Title = "参数设置";
  3. Layout = "~/Views/Shared/_Form.cshtml";
  4. }
  5. <script>
  6. $(function () {
  7. resize();
  8. })
  9. function resize() {
  10. $('#pageayout').height($(window).height() - 20);
  11. $(window).resize(function (e) {
  12. window.setTimeout(function () {
  13. $('#pageayout').height($(window).height() - 20);
  14. }, 200);
  15. e.stopPropagation();
  16. });
  17. }
  18. //保存表单
  19. function AcceptClick() {
  20. if (!$('#form1').Validform()) {
  21. return false;
  22. }
  23. var postData = $("#form1").GetWebControls("");
  24. dialogConfirm("注:您确定要修改微信公众号的参数吗?", function (r) {
  25. if (r) {
  26. $.SaveForm({
  27. url: "../../WeChatManage/SetParams/SaveForm",
  28. param: postData,
  29. loading: "正在保存数据...",
  30. success: function () {
  31. reload();
  32. }
  33. })
  34. }
  35. });
  36. }
  37. </script>
  38. <style>
  39. body {
  40. margin: 10px;
  41. margin-bottom: 0px;
  42. }
  43. </style>
  44. <div id="pageayout" class="border" style="background: #fff; overflow: auto;">
  45. <div class="alert alert-danger" style="text-align: left; margin: 20px;">
  46. <i class="fa fa-question-circle" style="position: relative; top: 1px; font-size: 15px; padding-right: 5px;"></i>
  47. 注:AppID和Secret密钥关系微信公众号安全,请不要告诉不信任的人!
  48. </div>
  49. <table class="form" style="margin-top: 20px; width: 600px; margin-left: 25px;">
  50. <tr>
  51. <td class="formTitle" style="width: 100px;">AppID<font face="宋体">*</font></td>
  52. <td class="formValue">
  53. <input id="CorpId" type="text" class="form-control" placeholder="请输入AppID" isvalid="yes" checkexpession="NotNull" value="@ViewBag.AppId" />
  54. </td>
  55. </tr>
  56. <tr>
  57. <td class="formTitle" style="width: 100px;">Secret密钥<font face="宋体">*</font></td>
  58. <td class="formValue">
  59. <input id="CorpSecret" type="text" class="form-control" placeholder="请输入凭证密钥" isvalid="yes" checkexpession="NotNull" value="@ViewBag.Secret"/>
  60. </td>
  61. </tr>
  62. <tr>
  63. <td class="formTitle" style="width: 100px;">Token<font face="宋体">*</font></td>
  64. <td class="formValue">
  65. <input id="Token" type="text" class="form-control" placeholder="请输入Token" isvalid="yes" checkexpession="NotNull" value="@ViewBag.Token"/>
  66. </td>
  67. </tr>
  68. <tr>
  69. <td class="formTitle"></td>
  70. <td class="formValue">
  71. <br />
  72. <a id="btn_RevisePassword" class="btn btn-primary" onclick="AcceptClick()"><i class="fa fa-save"></i>&nbsp;保&nbsp;存</a>
  73. </td>
  74. </tr>
  75. </table>
  76. </div>