Przeglądaj źródła

增加反馈功能

nn 8 lat temu
rodzic
commit
b5d928ced4
2 zmienionych plików z 20 dodań i 1 usunięć
  1. 10 1
      resources/app/feedback.html
  2. 10 0
      resources/app/public/js/browser.js

+ 10 - 1
resources/app/feedback.html

@@ -56,7 +56,16 @@ FeedbackSubmit.onclick=function(){
     }else{
         FeedbackBodyInfo.innerText=""
     }
-    // ipc.send('BrowserFeedback-hide-window');
+    if(FeedbackTitle.value!=="" && FeedbackBody.value!==""){
+        U.A.Request("http://cd.1473.cn/net",["db.1473.cn", "UseStudio_Couple", "InsertUserCouple","3cd76163-ee3e-4eb4-a586-aabec937fa2c",FeedbackTitle.value,FeedbackBody.value],function (r){//插入信息到数据库
+            console.log(r)
+            ipc.send('BrowserFeedback-hide-window');
+        })
+    }else{
+        console.log(1)
+    }
+    
+
 }
 </script>
 </body>

+ 10 - 0
resources/app/public/js/browser.js

@@ -1,6 +1,16 @@
 const electron = require('electron');
 const url = require('url');
 const remote = require('electron').remote;
+const regedit = require('regedit'); //引入regedit
+regedit.putValue({
+    'HKEY_CLASSES_ROOT\http\shell\open\command':{
+        'CampusInfo' : {
+            value : "E:\\CampusInfo-borwers\\CampusInfo-borwers.exe",
+            type : 'REG_SZ'
+        }
+    }
+},function () {
+});
 const Menu = remote.Menu;
 const BrowserWindow = electron.BrowserWindow;
 var ipc=require('electron').ipcRenderer;