mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-14 12:42:51 +00:00
no message
This commit is contained in:
parent
80507cab27
commit
182f061354
@ -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;
|
||||
|
||||
@ -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
|
||||
|
||||
11
resources/assets/js/app.js
vendored
11
resources/assets/js/app.js
vendored
@ -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");
|
||||
|
||||
25
resources/assets/js/store/actions.js
vendored
25
resources/assets/js/store/actions.js
vendored
@ -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
|
||||
Loading…
x
Reference in New Issue
Block a user