张延森 3 年之前
父節點
當前提交
f489b7dc72
共有 2 個檔案被更改,包括 6 行新增2 行删除
  1. 1
    1
      config/prod.js
  2. 5
    1
      src/layout/useScreen.js

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

10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
10
     OSS_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
11
     OSS_FAST_PATH: '"https://xlk-assets.oss-accelerate.aliyuncs.com/"',
12
     ICON_FONT: '"https://yz-websit.oss-cn-hangzhou.aliyuncs.com/xlk/css/iconfont.ttf"',
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
   mini: {},
15
   mini: {},
16
   h5: {
16
   h5: {

+ 5
- 1
src/layout/useScreen.js 查看文件

19
   useEffect(() => {
19
   useEffect(() => {
20
     if (cityId && person?.personId) {
20
     if (cityId && person?.personId) {
21
       queryExtContents({cityId}).then((res) => {
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
         setFirstScreen(screen)
27
         setFirstScreen(screen)
24
   
28
   
25
         if (screen) {
29
         if (screen) {