张延森 3 年前
父节点
当前提交
f489b7dc72
共有 2 个文件被更改,包括 6 次插入2 次删除
  1. 1
    1
      config/prod.js
  2. 5
    1
      src/layout/useScreen.js

+ 1
- 1
config/prod.js 查看文件

@@ -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 查看文件

@@ -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) {