Browse Source

fix: 🧩 修改艺术点位

pull/2/head
deepblues 3 years ago
parent
commit
f853688ce0
  1. 39
      public/index.html
  2. 4
      public/static/android/android.js
  3. 4
      src/components/PublicComponent/PublicComponent.vue
  4. 2
      src/components/TypeBtnList/TypeBtnList.vue
  5. 1
      src/composables/useHandleScreen.ts
  6. 11
      src/types/window.d.ts
  7. 1
      src/views/Art/Art.vue

39
public/index.html

@ -1,19 +1,26 @@
<!DOCTYPE html>
<html lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title><%= htmlWebpackPlugin.options.title %></title>
<script src="./static/qm/three.js"></script>
<script src="./static/qm/MainMap_QM.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<title>
<%= htmlWebpackPlugin.options.title %>
</title>
<script src="./static/qm/three.js"></script>
<script src="./static/qm/MainMap_QM.js"></script>
<script src="./static/android/android.js"></script>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>

4
public/static/android/android.js

@ -0,0 +1,4 @@
window.leaveScreenSave= ()=>{
// 离开屏保需要调用
}

4
src/components/PublicComponent/PublicComponent.vue

@ -53,6 +53,10 @@ function handleDetail() {
onMounted(() => {
!window.Map_QM && useInitMap()
window.addEventListener('touchend', checkHandleScreen)
window.leaveScreenSave = () => {
checkHandleScreen(new TouchEvent('touchstart'))
}
})
onBeforeUnmount(() => {
window.removeEventListener('touchend', checkHandleScreen)

2
src/components/TypeBtnList/TypeBtnList.vue

@ -10,7 +10,7 @@
<h4>
{{ switchLanguage(item, 'title') }}
</h4>
<div class="saw"></div>
<div v-if="list.length > 1" class="saw"></div>
</div>
</div>
</template>

1
src/composables/useHandleScreen.ts

@ -68,6 +68,7 @@ export const useHandleScreen = (callback: () => void) => {
callback()
}
await sleepToWallpaper()
window?.android?.goScreenSave() //进入屏保
callback()
}, DELAY_CHECK_TIME)
}

11
src/types/window.d.ts

@ -0,0 +1,11 @@
/**
* android.goScreenSave ()
leaveScreenSave()
*/
type Android = {
goScreenSave: () => void
}
declare interface Window {
android: Android
leaveScreenSave: () => void
}

1
src/views/Art/Art.vue

@ -471,6 +471,7 @@ function clickGo(item: any) {
top: 85px;
left: 510px;
li {
margin-bottom: -108px;
img {
height: 205px;
}

Loading…
Cancel
Save