|
@@ -23,6 +23,7 @@ export const useGlobalStore = defineStore(() => {
|
|
|
const androidPermissions = localData.getRef('androidPermissions')
|
|
const androidPermissions = localData.getRef('androidPermissions')
|
|
|
|
|
|
|
|
const state = reactive({
|
|
const state = reactive({
|
|
|
|
|
+ dateDiff: 0, // 服务器和本地的时间差(毫秒数)
|
|
|
showGoodsListing: false, // 是否显示订单交易挂牌
|
|
showGoodsListing: false, // 是否显示订单交易挂牌
|
|
|
showTransferListing: false, // 是否显示定金转让挂牌
|
|
showTransferListing: false, // 是否显示定金转让挂牌
|
|
|
clientWidth: 0, // 客户端宽度
|
|
clientWidth: 0, // 客户端宽度
|
|
@@ -41,6 +42,12 @@ export const useGlobalStore = defineStore(() => {
|
|
|
}
|
|
}
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
|
|
+ // 获取时间戳
|
|
|
|
|
+ const getTimestamp = () => {
|
|
|
|
|
+ const ts = new Date().getTime()
|
|
|
|
|
+ return ts - state.dateDiff
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 获取系统配置项
|
|
// 获取系统配置项
|
|
|
const getSystemConfig = async () => {
|
|
const getSystemConfig = async () => {
|
|
|
const filePath = './config/appconfig.json'
|
|
const filePath = './config/appconfig.json'
|
|
@@ -180,6 +187,7 @@ export const useGlobalStore = defineStore(() => {
|
|
|
return {
|
|
return {
|
|
|
...toRefs(state),
|
|
...toRefs(state),
|
|
|
appTheme,
|
|
appTheme,
|
|
|
|
|
+ getTimestamp,
|
|
|
getSystemConfig,
|
|
getSystemConfig,
|
|
|
getSystemInfo,
|
|
getSystemInfo,
|
|
|
hasSystemModule,
|
|
hasSystemModule,
|