li.shaoyi 2 년 전
부모
커밋
c602515b0c
4개의 변경된 파일16개의 추가작업 그리고 7개의 파일을 삭제
  1. 8 0
      electron.build.js
  2. 2 2
      main.js
  3. 2 2
      package.json
  4. 4 3
      src/packages/qxst/views/account/certification/Index.vue

+ 8 - 0
electron.build.js

@@ -6,6 +6,14 @@ const { build } = require('electron-builder')
 const fileContents = fs.readFileSync('dist/config/appconfig.json', 'utf-8')
 const appConfig = JSON.parse(fileContents)
 
+
+const package = fs.readFileSync('package.json', 'utf-8')
+const pkg = JSON.parse(package)
+pkg.version = appConfig.version
+fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2))
+
+
+
 // 打包之前清空目录
 exec('rd/s/q dist_electron')
 

+ 2 - 2
main.js

@@ -3,7 +3,7 @@ const yaml = require('js-yaml')
 const { app, BrowserWindow, Menu, dialog } = require('electron')
 const { autoUpdater } = require('electron-updater')
 
-const useUpdater = (win) => {
+const updateHandle = (win) => {
     if (app.isPackaged) {
         const fileContents = fs.readFileSync('resources/app-update.yml', 'utf-8')
         const data = yaml.load(fileContents)
@@ -84,7 +84,7 @@ const createWindow = () => {
 
     win.maximize()
     win.loadFile('dist/index.html')
-    win.on('ready-to-show', () => useUpdater(win))
+    win.on('ready-to-show', () => updateHandle(win))
 }
 
 app.whenReady().then(() => {

+ 2 - 2
package.json

@@ -1,6 +1,6 @@
 {
   "name": "muchinfo",
-  "version": "1.0.0",
+  "version": "1.0.1",
   "private": true,
   "main": "main.js",
   "scripts": {
@@ -87,4 +87,4 @@
     "vconsole": "^3.14.6",
     "worker-loader": "^3.0.8"
   }
-}
+}

+ 4 - 3
src/packages/qxst/views/account/certification/Index.vue

@@ -148,9 +148,9 @@ const onCheckCardNum = () => {
         }).then(() => {
             formSubmit().then((res) => {
                 hideLoading()
-                getUserESignRecord()
-                switch (res.data.code) {
+                switch (res.data.code.toString()) {
                     case '0':
+                        getUserESignRecord()
                         dialog('提交请求成功').then(() => {
                             /// 进行下一步
                             openComponent('certification-next')
@@ -182,7 +182,8 @@ const onCheckCardNum = () => {
 }
 
 const onSubmit = () => {
-    if (userESignRecords.value.some((e) => e.templatetype === 1 && e.recordstatus === 1)) {
+    const isInclude = userESignRecords.value.some((e) => e.templatetype === 1 && e.recordstatus === 1)
+    if (!userESignRecords.value.length || isInclude) {
         formRef.value?.submit()
     } else {
         openComponent('certification-next')