index.html 9.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  1. {include file="public/header" /}
  2. <body>
  3. <div class="layui-fluid">
  4. <div class="layui-row layui-col-space15">
  5. <div class="layui-col-md12">
  6. <div class="layui-card">
  7. <div class="layui-card-header">邮件服务</div>
  8. <div class="layui-card-body">
  9. <div class="layui-form layui-form-pane">
  10. <div class="layui-form-item">
  11. <label class="layui-form-label">SMTP服务器</label>
  12. <div class="layui-input-inline">
  13. <input type="text" value="{:config('smtp.server')}" class="layui-input layui-disabled" disabled>
  14. </div>
  15. <div class="layui-form-mid layui-word-aux">如:smtp.163.com</div>
  16. </div>
  17. <div class="layui-form-item">
  18. <label class="layui-form-label">SMTP端口号</label>
  19. <div class="layui-input-inline">
  20. <input type="text" value="{:config('smtp.serverport')}" class="layui-input layui-disabled" disabled>
  21. </div>
  22. <div class="layui-form-mid layui-word-aux">一般为 25 或 465</div>
  23. </div>
  24. <div class="layui-form-item">
  25. <label class="layui-form-label">发件人邮箱</label>
  26. <div class="layui-input-inline">
  27. <input type="text" value="{:config('smtp.usermail')}" class="layui-input layui-disabled" disabled>
  28. </div>
  29. </div>
  30. <div class="layui-form-item">
  31. <label class="layui-form-label">邮箱登入密码</label>
  32. <div class="layui-input-inline">
  33. <input type="password" value="{:config('smtp.pass')}" class="layui-input layui-disabled" disabled>
  34. </div>
  35. </div>
  36. <div class="layui-form-item">
  37. <label class="layui-form-label">收件人邮箱</label>
  38. <div class="layui-input-block">
  39. <input type="text" lay-verify="required" name="mailTo" class="layui-input" placeholder="多个邮箱请用逗号(英文)连接">
  40. </div>
  41. </div>
  42. <div class="layui-form-item">
  43. <label class="layui-form-label">邮件主题</label>
  44. <div class="layui-input-block">
  45. <input type="text" lay-verify="required" name="subject" class="layui-input" placeholder="文本">
  46. </div>
  47. </div>
  48. <div class="layui-form-item layui-form-text">
  49. <label class="layui-form-label">邮件内容</label>
  50. <div class="layui-input-block">
  51. <textarea name="body" lay-verify="required" class="layui-textarea" placeholder="文本/HTML"></textarea>
  52. </div>
  53. </div>
  54. <div class="layui-form-item">
  55. <div class="layui-input-block">
  56. <button class="layui-btn" lay-submit lay-filter="send_system_email">发送</button>
  57. </div>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. <div class="layui-col-md12">
  64. <div class="layui-card">
  65. <div class="layui-card-header">云之讯短信</div>
  66. <div class="layui-card-body">
  67. <div class="layui-form layui-form-pane">
  68. <div class="layui-form-item">
  69. <label class="layui-form-label">验证码</label>
  70. <div class="layui-input-inline">
  71. <input type="text" name="code" value="{:GetRandCode()}" class="layui-input layui-disabled" disabled>
  72. </div>
  73. </div>
  74. <div class="layui-form-item">
  75. <label class="layui-form-label">手机号</label>
  76. <div class="layui-input-block">
  77. <input type="text" name="phone" lay-verify="phone" class="layui-input" placeholder="中国大陆手机号" >
  78. </div>
  79. </div>
  80. <div class="layui-form-item">
  81. <div class="layui-input-block">
  82. <button class="layui-btn" lay-submit lay-filter="send_yzx_code">发送</button>
  83. </div>
  84. </div>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="layui-col-md12">
  90. <div class="layui-card">
  91. <div class="layui-card-header">阿里短信</div>
  92. <div class="layui-card-body">
  93. <div class="layui-form layui-form-pane">
  94. <div class="layui-form-item">
  95. <label class="layui-form-label">验证码</label>
  96. <div class="layui-input-inline">
  97. <input type="text" name="code" value="{:GetRandCode()}" class="layui-input layui-disabled" disabled>
  98. </div>
  99. </div>
  100. <div class="layui-form-item">
  101. <label class="layui-form-label">手机号</label>
  102. <div class="layui-input-block">
  103. <input type="text" name="phone" lay-verify="phone" class="layui-input" placeholder="中国大陆手机号" >
  104. </div>
  105. </div>
  106. <div class="layui-form-item">
  107. <div class="layui-input-block">
  108. <button class="layui-btn" lay-submit lay-filter="send_ali_code">发送</button>
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. </div>
  114. </div>
  115. </div>
  116. </div>
  117. {include file="public/footer" /}
  118. <script>
  119. layui.use(['form'],function () {
  120. var form = layui.form
  121. form.on('submit(send_system_email)', function (data) {
  122. $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
  123. var loading = layer.load(3);
  124. $.ajax({
  125. url:"{:url('sendEmail')}",
  126. type:'post',
  127. dataType:'json',
  128. data:data.field,
  129. success:function(res){
  130. if (res.code == 200) {
  131. layer.close(loading);
  132. wk.success(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  133. } else {
  134. layer.close(loading);
  135. wk.error(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  136. }
  137. }
  138. })
  139. })
  140. form.on('submit(send_yzx_code)', function (data) {
  141. $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
  142. var loading = layer.load(3);
  143. $.ajax({
  144. url:"{:url('sendYzxCode')}",
  145. type:'post',
  146. dataType:'json',
  147. data:data.field,
  148. success:function(res){
  149. if (res.code == 200) {
  150. layer.close(loading);
  151. wk.success(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  152. } else {
  153. layer.close(loading);
  154. wk.error(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  155. }
  156. }
  157. })
  158. })
  159. form.on('submit(send_ali_code)', function (data) {
  160. $('.layui-btn').addClass('layui-disabled').attr('disabled','disabled');
  161. var loading = layer.load(3);
  162. $.ajax({
  163. url:"{:url('sendAliCode')}",
  164. type:'post',
  165. dataType:'json',
  166. data:data.field,
  167. success:function(res){
  168. if (res.code == 200) {
  169. layer.close(loading);
  170. wk.success(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  171. } else {
  172. layer.close(loading);
  173. wk.error(res.msg,'$(".layui-btn").removeClass(\'layui-disabled\').removeAttr(\'disabled\')');
  174. }
  175. }
  176. })
  177. })
  178. })
  179. </script>
  180. </body>
  181. </html>