优化boot版 bug

This commit is contained in:
java110 2022-08-17 17:54:02 +08:00
parent 4674823c36
commit eeac6fcc12
3 changed files with 104 additions and 38 deletions

37
App.vue
View File

@ -1,6 +1,13 @@
<script> <script>
import Vue from 'vue' import Vue from 'vue'
import {hasSession} from './lib/java110/api/Java110SessionApi.js' import {
hasSession
} from './lib/java110/api/Java110SessionApi.js';
import {
requestNoAuth
} from './lib/java110/request.js';
import url from './constant/url.js'
export default { export default {
onLaunch: function() { onLaunch: function() {
uni.getSystemInfo({ uni.getSystemInfo({
@ -13,20 +20,33 @@
Vue.prototype.CustomBar = e.statusBarHeight + 45; Vue.prototype.CustomBar = e.statusBarHeight + 45;
}; };
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.StatusBar = e.statusBarHeight;
let custom = wx.getMenuButtonBoundingClientRect(); let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom; Vue.prototype.Custom = custom;
Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight; Vue.prototype.CustomBar = custom.bottom + custom.top - e.statusBarHeight;
// #endif // #endif
// #ifdef MP-ALIPAY // #ifdef MP-ALIPAY
Vue.prototype.StatusBar = e.statusBarHeight; Vue.prototype.StatusBar = e.statusBarHeight;
Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight; Vue.prototype.CustomBar = e.statusBarHeight + e.titleBarHeight;
// #endif // #endif
} }
}) });
requestNoAuth({
url: url.listSystemInfo,
method: "GET",
data: _data,
success: function(res) {
reslove(res);
},
fail: function(e) {}
});
}, },
onShow: function() { onShow: function() {
// //
@ -42,10 +62,11 @@
/*每个页面公共css */ /*每个页面公共css */
@import "lib/colorui/main.css"; @import "lib/colorui/main.css";
@import "lib/colorui/icon.css"; @import "lib/colorui/icon.css";
/* #ifdef H5 */ /* #ifdef H5 */
uni-page-head { uni-page-head {
display: none; display: none;
} }
/* #endif */ /* #endif */
</style> </style>

View File

@ -62,7 +62,7 @@ export default {
listOweFees: baseUrl + 'app/feeApi/listOweFees', listOweFees: baseUrl + 'app/feeApi/listOweFees',
toQrOweFeePay: baseUrl + 'app/payment/toQrOweFeePay', toQrOweFeePay: baseUrl + 'app/payment/toQrOweFeePay',
// 报修抢单 // 报修抢单
robRepairOrder: baseUrl + 'callComponent/ownerRepair.grabbingRepair', robRepairOrder: baseUrl + 'app/ownerRepair.grabbingRepair',
// 获取空置房申请列表 // 获取空置房申请列表
listApplyRoom: baseUrl + 'app/applyRoomDiscount/queryApplyRoomDiscount', listApplyRoom: baseUrl + 'app/applyRoomDiscount/queryApplyRoomDiscount',
queryFeeDiscount: baseUrl + "app/feeDiscount/queryFeeDiscount", queryFeeDiscount: baseUrl + "app/feeDiscount/queryFeeDiscount",
@ -80,54 +80,54 @@ export default {
// 查询字典表 // 查询字典表
queryDictInfo: baseUrl + "callComponent/core/list", queryDictInfo: baseUrl + "callComponent/core/list",
// 报修相关信息(维修类型/状态/商品类型... // 报修相关信息(维修类型/状态/商品类型...
queryRepairInfo: baseUrl + "callComponent/resourceStoreTypeManage/list", queryRepairInfo: baseUrl + "app/resourceStoreType.listResourceStoreTypes",
// queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName", // queryResourceStoreResName: baseUrl + "app/resourceStore/queryResourceStoreResName",
queryResourceStoreResName: baseUrl + "callComponent/resourceStore.listUserStorehouses", queryResourceStoreResName: baseUrl + "app/resourceStore.listUserStorehouses",
// 查询费用项(水电部分) // 查询费用项(水电部分)
queryFeeTypesItems: baseUrl + "callComponent/roomCreateFeeAdd/list", queryFeeTypesItems: baseUrl + "app/feeConfig.listFeeConfigs",
queryPreMeterWater: baseUrl + "app/meterWater/queryPreMeterWater", queryPreMeterWater: baseUrl + "app/meterWater/queryPreMeterWater",
saveMeterWater: baseUrl + "callComponent/meterWater.saveMeterWater", saveMeterWater: baseUrl + "app/meterWater.saveMeterWater",
// 采购/出库申请部分 // 采购/出库申请部分
queryPurchaseApplyList: baseUrl + "callComponent/purchaseApplyManage/list", queryPurchaseApplyList: baseUrl + "app/purchaseApply.listPurchaseApplys",
queryResourceStoreList: baseUrl + "callComponent/chooseResourceStore/list", queryResourceStoreList: baseUrl + "app/resourceStore.listResourceStores",
queryResourceSupplier: baseUrl + "callComponent/resourceSupplier.listResourceSuppliers", queryResourceSupplier: baseUrl + "app/resourceSupplier.listResourceSuppliers",
queryFirstStaff: baseUrl + "app/workflow/getFirstStaff", queryFirstStaff: baseUrl + "app/workflow/getFirstStaff",
savePurchaseApply: baseUrl + "app/purchase/purchaseApply", savePurchaseApply: baseUrl + "app/purchase/purchaseApply",
saveItemOutApply: baseUrl + "app/collection/goodsCollection", saveItemOutApply: baseUrl + "app/collection/goodsCollection",
listMyAuditOrders: baseUrl + "callComponent/myAuditOrders/list", listMyAuditOrders: baseUrl + "app/auditUser.listAuditOrders",
listMyItemOutOrders: baseUrl + "app/collection/getCollectionAuditOrder", listMyItemOutOrders: baseUrl + "app/collection/getCollectionAuditOrder",
listMyAllocationStoreAuditOrders: baseUrl + "callComponent/resourceStore.listAllocationStoreAuditOrders", listMyAllocationStoreAuditOrders: baseUrl + "app/resourceStore.listAllocationStoreAuditOrders",
saveResourceOut: baseUrl + "app/collection/resourceOut", saveResourceOut: baseUrl + "app/collection/resourceOut",
saveResourceEnter: baseUrl + "app/purchase/resourceEnter", saveResourceEnter: baseUrl + "app/purchase/resourceEnter",
listAuditHistoryOrders: baseUrl + "callComponent/auditUser.listAuditHistoryOrders", listAuditHistoryOrders: baseUrl + "app/auditUser.listAuditHistoryOrders",
listItemOutAuditHistoryOrders: baseUrl + "callComponent/auditUser.listItemOutAuditHistoryOrders", listItemOutAuditHistoryOrders: baseUrl + "app/auditUser.listItemOutAuditHistoryOrders",
listAllocationStoreHisAuditOrders: baseUrl + "callComponent/resourceStore.listAllocationStoreHisAuditOrders", listAllocationStoreHisAuditOrders: baseUrl + "app/resourceStore.listAllocationStoreHisAuditOrders",
// listWorkflowAuditInfo2: baseUrl + "callComponent/workflow.listWorkflowAuditInfo", // listWorkflowAuditInfo2: baseUrl + "callComponent/workflow.listWorkflowAuditInfo",
// 调拨部分 // 调拨部分
listAllocationStorehouseApplys: baseUrl + "callComponent/resourceStore.listAllocationStorehouseApplys", listAllocationStorehouseApplys: baseUrl + "app/resourceStore.listAllocationStorehouseApplys",
listStoreHouses: baseUrl + "callComponent/resourceStore.listStorehouses", listStoreHouses: baseUrl + "app/resourceStore.listStorehouses",
saveAllocationStorehouse: baseUrl + "callComponent/resourceStore.saveAllocationStorehouse", saveAllocationStorehouse: baseUrl + "app/resourceStore.saveAllocationStorehouse",
listAllocationStorehouses: baseUrl + "callComponent/resourceStore.listAllocationStorehouses", listAllocationStorehouses: baseUrl + "app/resourceStore.listAllocationStorehouses",
saveAuditAllocationStoreOrder: baseUrl + "callComponent/resourceStore.auditAllocationStoreOrder", saveAuditAllocationStoreOrder: baseUrl + "app/resourceStore.auditAllocationStoreOrder",
listWorkflowStepStaffs: baseUrl + "callComponent/workflow.listWorkflowStepStaffs", listWorkflowStepStaffs: baseUrl + "app/workflow.listWorkflowStepStaffs",
saveMyAuditOrders: baseUrl + "callComponent/myAuditOrders/audit", saveMyAuditOrders: baseUrl + "app/myAuditOrders/audit",
// 公司/员工信息 // 公司/员工信息
queryOrgInfo: baseUrl + "callComponent/orgManage/list", queryOrgInfo: baseUrl + "app/org.listOrgs",
queryStaffListInfo: baseUrl + "callComponent/searchStaff/listStaff", queryStaffListInfo: baseUrl + "app/query.staff.infos",
// 巡检流转 // 巡检流转
UpdateInspectionTask: baseUrl + "callComponent/inspectionTask.updateInspectionTask", UpdateInspectionTask: baseUrl + "app/inspectionTask.updateInspectionTask",
// 物品转赠 // 物品转赠
saveResourceStoreTransfer: baseUrl + "callComponent/addAllocationUserStorehouse/save", saveResourceStoreTransfer: baseUrl + "app/resourceStore.saveAllocationUserStorehouse",
// 紧急采购 // 紧急采购
saveUrgentPurchaseApply: baseUrl + "app/purchase/urgentPurchaseApply", saveUrgentPurchaseApply: baseUrl + "app/purchase/urgentPurchaseApply",
//取消调拨 //取消调拨
deleteAllocationStorehouse: baseUrl + "callComponent/resourceStore.deleteAllocationStorehouse", deleteAllocationStorehouse: baseUrl + "app/resourceStore.deleteAllocationStorehouse",
// 取消申请 // 取消申请
deletePurchaseApply: baseUrl + "callComponent/deletePurchaseApply/delete", deletePurchaseApply: baseUrl + "app/purchaseApply.deletePurchaseApply",
//查询水电抄表记录 //查询水电抄表记录
listMeterWaters: baseUrl+"app/meterWater.listMeterWaters", listMeterWaters: baseUrl+"app/meterWater.listMeterWaters",
listRepairSettings: baseUrl + 'app/repair.listRepairSettings', listRepairSettings: baseUrl + 'app/repair.listRepairSettings',
saveHelpOwnerRepair: baseUrl + "callComponent/addOwnerRepair/save", saveHelpOwnerRepair: baseUrl + "app/ownerRepair.saveOwnerRepair",
updateRoomRenovationState: baseUrl + "app/roomRenovation/updateRoomRenovationState", updateRoomRenovationState: baseUrl + "app/roomRenovation/updateRoomRenovationState",
queryOaWorkflow: baseUrl + "app/oaWorkflow/queryOaWorkflow", queryOaWorkflow: baseUrl + "app/oaWorkflow/queryOaWorkflow",
queryOaWorkflowForm: baseUrl + "app/oaWorkflow/queryOaWorkflowForm", queryOaWorkflowForm: baseUrl + "app/oaWorkflow/queryOaWorkflowForm",
@ -152,10 +152,11 @@ export default {
// 删除装修跟踪记录 // 删除装修跟踪记录
deleteRoomRenovationRecord: baseUrl + "app/roomRenovation/deleteRoomRenovationRecord", deleteRoomRenovationRecord: baseUrl + "app/roomRenovation/deleteRoomRenovationRecord",
// 查询缴费历史 // 查询缴费历史
listFeeDetail: baseUrl + "callComponent/propertyFee/listFeeDetail", listFeeDetail: baseUrl + "app/fee.queryFeeDetail",
repairStop: baseUrl + "callComponent/ownerRepair.repairStop", repairStop: baseUrl + "app/ownerRepair.repairStop",
repairStart: baseUrl + "callComponent/ownerRepair.repairStart", repairStart: baseUrl + "app/ownerRepair.repairStart",
listInspectionItemTitle: baseUrl + "app/inspectionItemTitle.listInspectionItemTitle", listInspectionItemTitle: baseUrl + "app/inspectionItemTitle.listInspectionItemTitle",
listResourceStoreTypes: baseUrl + "app/resourceStoreType.listResourceStoreTypes", listResourceStoreTypes: baseUrl + "app/resourceStoreType.listResourceStoreTypes",
listSystemInfo:baseUrl+"app/system.listSystemInfo"
} }

View File

@ -1,6 +1,12 @@
import {hasSession} from './api/Java110SessionApi.js' import {hasSession} from './api/Java110SessionApi.js'
import java110Config from './Java110Config.js'
import {wxuuid} from './utils/SeqUtil.js'
import {getDateYYYYMMDDHHMISS} from './utils/DateUtil.js'
export default{ export default{
/** /**
* 请求 * 请求
@ -17,4 +23,42 @@ export default{
}) })
} }
}
/**
* 获取 header
*/
export function getHeaders(){
return {
'app-id': java110Config.AppId,
'transaction-id': wxuuid(),
'req-time': getDateYYYYMMDDHHMISS(),
'sign': '1234567',
'user-id': '-1',
cookie: '_java110_token_=' + uni.getStorageSync('token')
};
};
export function requestNoAuth(_reqObj) {
//这里判断只有在 post 方式时 放加载框
if (_reqObj.hasOwnProperty("method") && "POST" == _reqObj.method) {
uni.showLoading({
title: '加载中',
mask: true
});
_reqObj.complete = function() {
uni.hideLoading();
}
}
let _headers = getHeaders();
if (_reqObj.hasOwnProperty('header')) {
let _header = _reqObj.header;
for (let key in _headers) {
_header.key = _headers[key];
}
} else {
_reqObj.header = _headers;
}
_reqObj.header.cookie = '_java110_token_=' + wx.getStorageSync('token');
uni.request(_reqObj);
} }