Explorar el Código

fix(home-new): 移除消息推送组件中的默认文本

移除消息推送组件中三个计算属性的默认文本,当没有数据时只返回前缀
huoyi hace 5 días
padre
commit
0b138f8974
Se han modificado 1 ficheros con 4 adiciones y 3 borrados
  1. 4 3
      src/pages/home-new/components/messagePush.vue

+ 4 - 3
src/pages/home-new/components/messagePush.vue

@@ -24,7 +24,7 @@ export default {
24 24
     computed: {
25 25
         prohibitedItemText() {
26 26
             if (!this.prohibitedItemsTop3 || this.prohibitedItemsTop3.length === 0) {
27
-                return '移交公安TOP1:火种/打火机';
27
+                return '移交公安TOP1:';
28 28
             }
29 29
             const item = this.prohibitedItemsTop3[0];
30 30
             const nameOne = item.categoryNameOne || '';
@@ -33,7 +33,7 @@ export default {
33 33
         },
34 34
         concealmentPositionText() {
35 35
             if (!this.concealmentPositionsTop3 || this.concealmentPositionsTop3.length === 0) {
36
-                return '藏匿部位TOP1:随身行礼物品';
36
+                return '藏匿部位TOP1:';
37 37
             }
38 38
             const item = this.concealmentPositionsTop3[0];
39 39
             const nameOne = item.positionNameOne || '';
@@ -42,7 +42,7 @@ export default {
42 42
         },
43 43
         highRiskChannelText() {
44 44
             if (!this.highRiskChannelsTop3 || this.highRiskChannelsTop3.length === 0) {
45
-                return '高发通道TOP1:T1航站楼/a区域/a01';
45
+                return '高发通道TOP1:';
46 46
             }
47 47
             const item = this.highRiskChannelsTop3[0];
48 48
             const terminalName = item.terminalName || '';
@@ -64,6 +64,7 @@ export default {
64 64
             try {
65 65
                 const response = await getPushMessage();
66 66
                 console.log('推送消息响应:', response);
67
+                
67 68
                 if (response && response.data) {
68 69
                     const { concealmentPositionsTop3, highRiskChannelsTop3, prohibitedItemsTop3 } = response.data;
69 70
                     this.concealmentPositionsTop3 = concealmentPositionsTop3 || [];