no message

This commit is contained in:
kuaifan 2025-04-20 22:30:46 +08:00
parent 80507cab27
commit 182f061354
5 changed files with 28 additions and 13 deletions

View File

@ -3,8 +3,6 @@
namespace App\Http\Controllers\Api;
use App\Models\UserDevice;
use App\Models\WebSocketDialog;
use App\Models\WebSocketDialogMsg;
use Request;
use Session;
use Response;

View File

@ -577,6 +577,7 @@ export default {
this.autoTheme()
$A.updateTimezone()
$A.IDBTest()
this.$store.dispatch("safeAreaInsets")
const nowYmd = $A.daytz().format('YYYY-MM-DD')
if (this.lastCheckUpgradeYmd != nowYmd) {
this.lastCheckUpgradeYmd = nowYmd

View File

@ -340,16 +340,7 @@ const $preload = async () => {
}
const pageInfo = $A.eeuiAppGetPageInfo() || {};
store.state.isFirstPage = pageInfo.pageName === 'firstPage'
if (store.state.isFirstPage) {
$A.eeuiAppGetSafeAreaInsets().then(data => {
const proportion = data.height / window.outerHeight
store.state.safeAreaSize = {
top: Math.round(data.top / proportion * 100) / 100,
bottom: Math.round(data.bottom / proportion * 100) / 100,
data
}
}).catch(console.warn)
}
await store.dispatch("safeAreaInsets")
}
await store.dispatch("preload");

View File

@ -156,6 +156,31 @@ export default {
})
},
/**
* 获取安全区域
* @param state
* @returns {Promise<unknown>}
*/
safeAreaInsets({state}) {
return new Promise(resolve => {
if (!state.isFirstPage) {
return resolve(null)
}
$A.eeuiAppGetSafeAreaInsets().then(data => {
const proportion = data.height / window.outerHeight
state.safeAreaSize = {
top: Math.round(data.top / proportion * 100) / 100,
bottom: Math.round(data.bottom / proportion * 100) / 100,
data
}
resolve(state.safeAreaSize)
}).catch(e => {
console.warn(e)
resolve(null)
})
})
},
/**
* 访问接口
* @param state

@ -1 +1 @@
Subproject commit 6f75cd3e8687996031a8497cd6af1f210363827e
Subproject commit 51b61159deaff528c4def5bbdc5d0153f7f508a4