优化loading

This commit is contained in:
gyq 2025-04-09 17:57:51 +08:00
parent e443b5b51e
commit f466bdc9f4
10 changed files with 23 additions and 23 deletions

View File

@ -5,10 +5,10 @@ ENV = development
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
# 正式ws
# VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
# 本地ws
VITE_API_WSS = 'ws://192.168.1.31:2348'
# VITE_API_WSS = 'ws://192.168.1.31:2348'
# 正式 php
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
@ -20,10 +20,10 @@ VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# 本地调试连接
VITE_API_URL = 'http://192.168.1.31/'
# VITE_API_URL = 'http://192.168.1.31/'
# 线上测试
# VITE_API_URL = 'https://tapi.cashier.sxczgkj.cn'
# 线上正式
# VITE_API_URL = 'https://cashier.sxczgkj.com'
VITE_API_URL = 'https://cashier.sxczgkj.com'

View File

@ -2,13 +2,13 @@
ENV = test
# 测试ws
# VITE_API_WSS = 'ws://192.168.1.31:2348'
VITE_API_WSS = 'ws://192.168.1.31:2348'
# 测试ws
# VITE_API_WSS = 'wss://sockets.sxczgkj.com/wss'
# 正式ws
VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
# VITE_API_WSS = 'wss://czgeatws.sxczgkj.com/wss'
# 正式 php
VITE_API_PHP_URL = 'https://newblockwlx.sxczgkj.cn/index.php/api'
@ -23,7 +23,7 @@ VITE_API_KP_URL = 'https://invoice.sxczgkj.cn/api'
# VITE_API_URL = 'https://fv901fw8033.vicp.fun/'
# 正式Java
VITE_API_URL = 'https://cashier.sxczgkj.com/'
# VITE_API_URL = 'https://cashier.sxczgkj.com/'
# 本地调试连接
# VITE_API_URL = 'http://192.168.1.31/'
VITE_API_URL = 'http://192.168.1.31/'

View File

@ -235,13 +235,13 @@ async function submitHandle() {
}
Loading.value = true;
await printerAdd(form.value, form.value.id ? "put" : "post");
Loading.value = false;
ElMessage.success(form.value.id ? "编辑成功" : "添加成功");
printStore.init();
router.back();
} catch (error) {
console.log(error);
}
Loading.value = false;
}
//

View File

@ -155,7 +155,6 @@ async function tbPrintMachineDeleteAjax() {
try {
delLoading.value = true;
await printerAdd({ id: deleteId.value }, 'delete');
delLoading.value = false;
dialogVisible.value = false;
ElMessage.success("删除成功");
tbPrintMachineGetAjax();
@ -163,6 +162,7 @@ async function tbPrintMachineDeleteAjax() {
} catch (error) {
console.log(error);
}
delLoading.value = false;
}
//

View File

@ -65,8 +65,8 @@ function refundConfirm() {
emits('succcess')
} catch (error) {
console.log(error);
refundLoading.value = false
}
refundLoading.value = false
}
})
}

View File

@ -200,9 +200,9 @@ async function groupOrdergroupScanHandle() {
ElMessage.success('核销成功')
emits('succcess')
} catch (error) {
groupDetailLoading.value = false
console.log('groupOrdergroupScanHandle.error', error);
}
groupDetailLoading.value = false
}
const douyin_table = ref(null)
@ -259,12 +259,12 @@ async function submitHandle() {
break;
}
} catch (error) {
loading.value = false
console.log('submitHandle.error', error);
if (error.code == 4399) {
BindShopRef.value.show()
}
}
loading.value = false
}
//

View File

@ -88,7 +88,7 @@
</template>
<template v-else>
<el-text tag="del" class="del" size="small">{{ item.skuList[0].salePrice
}}</el-text>
}}</el-text>
<el-text>{{ +item.skuList[0].memberPrice || item.skuList[0].salePrice }}</el-text>
</template>
</div>
@ -682,7 +682,6 @@ async function closeSellHandle() {
id: goodEditorItem.value.id,
isSoldOut: 0
})
closeSellLoading.value = false
showCloseSell.value = false
ElMessage({
type: 'success',
@ -693,6 +692,7 @@ async function closeSellHandle() {
} catch (error) {
console.log(error);
}
closeSellLoading.value = false
}
//
@ -718,7 +718,6 @@ async function putawayHandle(item) {
id: goodEditorItem.value.id,
isSale: 1
})
showPutawayLoading.value = false
showPutaway.value = false
ElMessage({
type: 'success',
@ -729,6 +728,7 @@ async function putawayHandle(item) {
} catch (error) {
console.log(error);
}
showPutawayLoading.value = false
}
//
@ -751,7 +751,6 @@ async function goodEditorConfirm() {
})
}
goodEditorLoading.value = false
showGoodEditor.value = false
ElMessage({
type: 'success',
@ -762,6 +761,7 @@ async function goodEditorConfirm() {
} catch (error) {
console.log(error);
}
goodEditorLoading.value = false
}
//
@ -801,7 +801,6 @@ async function goodsEditorStockConfirm() {
productId: goodsEditorStockItem.value.id,
stock: goodsEditorStockNumber.value
})
goodsEditorStockLoading.value = false
showGoodsEditorStock.value = false
ElMessage({
type: 'success',
@ -812,6 +811,7 @@ async function goodsEditorStockConfirm() {
} catch (error) {
console.log(error);
}
goodsEditorStockLoading.value = false
}
defineExpose({

View File

@ -160,9 +160,9 @@ async function showStaffDiscountHandle() {
// global.updateData(false)
}
} catch (error) {
discountLoading.value = false
console.log(error);
}
discountLoading.value = false
}
//
@ -211,12 +211,12 @@ async function printOrderLable(isBefore = false) {
type: isBefore ? 1 : 0,
id: orderId,
});
printLoading.value = false;
ElMessage.success(`云打印${isBefore ? '预' : ''}结算单成功`);
}
} catch (error) {
console.log(error);
}
printLoading.value = false;
}
//

View File

@ -323,9 +323,9 @@ async function delCartHandle(params) {
cartLoading.value = false;
cartListActive.value = 0;
} catch (error) {
cartLoading.value = false;
console.log(error);
}
cartLoading.value = false;
}
//

View File

@ -240,9 +240,9 @@ function refundHandle() {
}
}
} catch (error) {
loading.value = false
console.log(error);
}
loading.value = false
})
}
@ -284,9 +284,9 @@ async function passwordSuccess(e = '') {
emits('refund')
memberqueryMemberAccountAjax()
} catch (error) {
loading.value = false
console.log(error);
}
loading.value = false
}
function show(row) {