xklr/wly 4 bulan lalu
induk
melakukan
e660640df9

+ 1 - 1
src/main/main.js

@@ -54,7 +54,7 @@ async function createWindow() {
       // partition: String(+new Date()),
       nodeIntegration: true,
       enableRemoteModule: true,
-      devTools: true,
+      devTools: isdev,
       contextIsolation: false,
       webviewTag: true,
       //   preload: path.join(__dirname, '../preload/index.js'),

+ 2 - 2
src/main/windows/updater.js

@@ -9,7 +9,7 @@ const loadURL = isdev
 const iconSrc = __static + "/images/icon.ico";
 // 服务器地址
 const server = 'http://testadmin.xklr.net:8601'
-const url = isdev ? __dirname : `${server}/appUpdateSign/`
+const url = isdev ? __dirname : `${server}/appUpdate/sign/`
 console.log(15, url)
 let updateWin = null;
 // 自动检测更新
@@ -61,7 +61,7 @@ export default function checkUpdate() {
             if (!option.url) {
                 updateWin.webContents.send('state1', 5)
             } else {
-                autoUpdater.setFeedURL(option.url + '/appUpdateSign/')
+                autoUpdater.setFeedURL(option.url + '/appUpdate/sign/')
                 autoUpdater.checkForUpdates()
             }
         })

+ 3 - 3
src/renderer/pages/index/index.vue

@@ -108,7 +108,7 @@ export default {
       if (!hasid) {
         return false
       }
-      console.log(process.env)
+      // console.log(process.env)
       if (1 || process.env.NODE_ENV == "development") {
         this.dialogVisible = true
       } else {
@@ -137,7 +137,7 @@ export default {
             t.cb(data.idCard, 0)
           },
           error: (error) => {
-            logfn( { type: 'error', row: 'index-143', msg: error })
+            logfn({ type: 'error', row: 'index-143', msg: error })
             t.setloadingState(false)
           },
           t: this,
@@ -175,7 +175,7 @@ export default {
           if (res.code == 0) {
             t.setloadingState(false)
             t.cb(res.data.idNo, 1)
-          }else{
+          } else {
             t.setloadingState(false)
           }
         }, () => {

+ 11 - 10
src/renderer/pages/update/index.vue

@@ -1,9 +1,9 @@
 <template>
-  <div class="fs-30 px-2 centerd">
-    <div class="mb-2">
+  <div class="fs-12 p-2">
+    <div>
       {{ stateData[state1].msg }}
     </div>
-    <div class="mt-2 text-view1 pl-2" v-if="state1 == 3">
+    <div class="mt-1 text-view1 pl-2" v-if="state1 == 3">
       <el-progress :percentage="percent" class="w-100" color="#67c23a"></el-progress>
     </div>
   </div>
@@ -17,12 +17,13 @@ export default {
   data() {
     return {
       webURL: '',
-      stateData: [{ code: 0, msg: '正在查更新...' },
+      stateData: [{ code: 0, msg: '正在查更新...' },
       { code: 1, msg: '更新出错,请重启软件' },
       { code: 2, msg: '无更新可用' },
       { code: 3, msg: '发现有新版本,正在下载' },
       { code: 4, msg: '下载完成,重启更新' },
-      { code: 5, msg: '未设置更新地址' }],
+      { code: 5, msg: '未设置更新地址' }
+      ],
       state1: 0,
       percent: 0,
     }
@@ -33,28 +34,28 @@ export default {
     this.webURL = locationpath.webURL || '';
     this.get1()
     this.get2()
-    this.sendurl()
+    this.sendurl(this.webURL)
     // console.log(this.$router)
   },
   methods: {
     ...mapActions({
       getlocationpath: 'user/getlocationpath',
     }),
-    sendurl(){
-      // console.log(111,this.webURL)
-      ipcRenderer.send('sendurl',{url:this.webURL})
+    sendurl(url){
+      ipcRenderer.send('sendurl',{url})
     },
     get1() {
       let t = this
       ipcRenderer.on('state1', (event, data) => {
         t.state1 = data
+        // console.log(59, data, t.state1)
       })
     },
     get2() {
       let t = this
       ipcRenderer.on('downloadProgress', (event, data) => {
         t.percent = (data.percent).toFixed(1);
-        // console.log(t.percent)
+        console.log(t.percent)
         if (data.percent >= 100) {
           t.state1 = 4;
         }