优化版本更新
This commit is contained in:
parent
34f0b306c9
commit
e17b12687f
|
|
@ -11,4 +11,7 @@ VITE_API_PHP_URL = 'https://czgdoumei.sxczgkj.com/index.php/api'
|
|||
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
|
||||
|
||||
# 线上环境接口地址
|
||||
VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client/'
|
||||
# VITE_API_URL = 'https://cashierclient.sxczgkj.cn/cashier-client/'
|
||||
|
||||
# 预发布接口
|
||||
VITE_API_URL = 'https://pre-cashierclient.sxczgkj.cn/cashier-client/'
|
||||
15849
dist-electron/main.js
15849
dist-electron/main.js
File diff suppressed because one or more lines are too long
|
|
@ -69,7 +69,7 @@ app.whenReady().then(() => {
|
|||
setTimeout(() => {
|
||||
win = null;
|
||||
app.exit();
|
||||
}, 1000);
|
||||
}, 1500);
|
||||
|
||||
const installResult = await installExe(tempFilePath);
|
||||
console.log(`安装结果:${installResult}`);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<template #footer>
|
||||
<div class="footer" style="padding: 0 20px 20px;">
|
||||
<el-button v-if="!updataInfo.isUp && !isUpload" @click="showDialog = false">下次更新</el-button>
|
||||
<el-button v-if="!updataInfo.isUp && !isUpload" @click="closeHandle">下次更新</el-button>
|
||||
<el-button type="primary" :loading="isUpload" @click="uplaodHandle">
|
||||
<template v-if="!uploadSucess">
|
||||
<template v-if="!isUpload">
|
||||
|
|
@ -33,6 +33,7 @@ import { onMounted, ref } from 'vue'
|
|||
import { findVersion } from '@/api/user.js'
|
||||
import packageData from "../../package.json";
|
||||
import { ipcRenderer } from 'electron'
|
||||
import useStorage from '@/utils/useStorage.js'
|
||||
|
||||
import { useUser } from "@/store/user.js";
|
||||
|
||||
|
|
@ -46,12 +47,19 @@ const uploadSucess = ref(false)
|
|||
const uploadResponse = ref({})
|
||||
const tempFilePath = ref('')
|
||||
|
||||
// 关闭更新弹窗,下次登录在提示
|
||||
function closeHandle() {
|
||||
showDialog.value = false
|
||||
useStorage.set('updateFlag', true)
|
||||
}
|
||||
|
||||
// 检查版本更新
|
||||
async function findVersionAjax() {
|
||||
try {
|
||||
let updateFlag = useStorage.get('updateFlag')
|
||||
const res = await findVersion()
|
||||
let reg = /\./g;
|
||||
if (res.version.replace(reg, '') > packageData.version.replace(reg, '') && res.url) {
|
||||
if (res.version.replace(reg, '') > packageData.version.replace(reg, '') && res.url && !updateFlag) {
|
||||
showDialog.value = true
|
||||
updataInfo.value = res
|
||||
}
|
||||
|
|
|
|||
|
|
@ -98,10 +98,10 @@
|
|||
<div class="btm">
|
||||
<el-button icon="Edit" @click="remarkRef.show()"></el-button>
|
||||
<div class="button">
|
||||
<div class="btn" v-if="global.tableInfo.id">
|
||||
<!-- <div class="btn" v-if="global.tableInfo.id">
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!cartList.length"
|
||||
@click="createOrderHandle(0)">仅下单</el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="btn">
|
||||
<el-button type="primary" style="width: 100%;" :disabled="!cartList.length" v-loading="createOrderLoading"
|
||||
@click="createOrderHandle(1)">
|
||||
|
|
|
|||
|
|
@ -187,6 +187,7 @@ const exit = async () => {
|
|||
useStorage.del('token')
|
||||
useStorage.del('douyin')
|
||||
useStorage.del('categorysActive')
|
||||
useStorage.del('updateFlag')
|
||||
|
||||
ElMessage.success("交班成功");
|
||||
setTimeout(() => {
|
||||
|
|
@ -217,6 +218,7 @@ const exit = async () => {
|
|||
useStorage.del('token')
|
||||
useStorage.del('douyin')
|
||||
useStorage.del('categorysActive')
|
||||
useStorage.del('updateFlag')
|
||||
ElMessage.success("交班成功");
|
||||
setTimeout(() => {
|
||||
router.replace({
|
||||
|
|
|
|||
Loading…
Reference in New Issue