张延森 3 years ago
parent
commit
f489b7dc72
2 changed files with 6 additions and 2 deletions
  1. 1
    1
      config/prod.js
  2. 5
    1
      src/layout/useScreen.js

+ 1
- 1
config/prod.js View File

@@ -10,7 +10,7 @@ module.exports = {
10 10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11 11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
12 12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
13
-    Version: '"V0.0.31-20210809"'
13
+    Version: '"V0.0.32-20210809"'
14 14
   },
15 15
   mini: {},
16 16
   h5: {

+ 5
- 1
src/layout/useScreen.js View File

@@ -19,7 +19,11 @@ export default function useScreen(cityId, person) {
19 19
   useEffect(() => {
20 20
     if (cityId && person?.personId) {
21 21
       queryExtContents({cityId}).then((res) => {
22
-        const screen = (res || []).filter(x => x.showType === 'screen' && x.showPosition === 'index')[0] || {}
22
+        const screen = (res || []).filter(x => x.showType === 'screen' && x.showPosition === 'index')[0]
23
+        if (!screen) {
24
+          return;
25
+        }
26
+
23 27
         setFirstScreen(screen)
24 28
   
25 29
         if (screen) {