feedback.html 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>有思浏览器反馈</title>
  6. <link rel="stylesheet" href="./public/css/browser.css">
  7. </head>
  8. <body>
  9. <section style="-webkit-app-region: drag" class="bowerHeader">
  10. <section style="-webkit-app-region: no-drag;height: 55px" class="browerHeaderControl clearfix">
  11. <button type="button" class="icon-times close" style="font-size:16px"></button>
  12. </section>
  13. <div class="FeedBackMain">
  14. <div class="FeedBackHead">
  15. <img draggable="false" src="public/img/tray/logo.png">
  16. <p>问题反馈</p>
  17. </div>
  18. <div class="FeedBackContainer">
  19. <input type="text" placeholder="请输入标题">
  20. <textarea maxlength="300" placeholder="请输入内容"></textarea>
  21. <span></span>
  22. <button>提交</button>
  23. </div>
  24. </div>
  25. </section>
  26. <script src="./public/js/uform.js"></script>
  27. <script>
  28. var ipc=require('electron').ipcRenderer;
  29. $(".close")[0].onclick=function(){
  30. ipc.send('BrowserFeedback-close');
  31. };
  32. var FeedBackFrom=$(".FeedBackContainer *");
  33. FeedBackFrom[3].onclick=function(){
  34. if(FeedBackFrom[0].value===""){
  35. FeedBackFrom[2].innerHTML='请输入标题';
  36. var a=setTimeout(function () {
  37. FeedBackFrom[2].innerHTML='';
  38. clearTimeout(a);
  39. },3000);
  40. return false;
  41. }
  42. if(FeedBackFrom[1].value===""){
  43. FeedBackFrom[2].innerHTML='请输入内容';
  44. var a=setTimeout(function () {
  45. FeedBackFrom[2].innerHTML='';
  46. clearTimeout(a);
  47. },3000);
  48. return false;
  49. }
  50. if(FeedBackFrom[0].value!=="" && FeedBackFrom[1].value!==""){
  51. U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_FeedBack", "InsertUserFeedback","3cd76163-ee3e-4eb4-a586-aabec937fa2c",FeedBackFrom[0].value,FeedBackFrom[1].value],function (r){//插入信息到数据库
  52. if(r.value){
  53. alert('提交成功');
  54. ipc.send('BrowserFeedback-close');
  55. }else{
  56. alert('提交失败')
  57. }
  58. })
  59. }
  60. }
  61. </script>
  62. </body>
  63. </html>