Browse Source

新增组件及页面

liuqiwen 4 năm trước cách đây
mục cha
commit
3009a530f9
1 tập tin đã thay đổi với 22 bổ sung17 xóa
  1. 22 17
      dgtis-ui/src/utils/ruoyi.js

+ 22 - 17
dgtis-ui/src/utils/ruoyi.js

@@ -163,22 +163,27 @@ export function tansParams(params) {
 // 客户等级
 export function levelText(val){
   let text = '';
-  switch (val){
-    case 0:
-      text = '无';
-      break;
-    case 1:
-      text = '钻石';
-      break;
-    case 2:
-      text = '白金';
-      break;
-    case 3:
-      text = '黄金';
-      break;
-    case 4:
-      text = '普通';
-      break;
+  if(val){
+    switch (val){
+      case 0:
+        text = '无';
+        break;
+      case 1:
+        text = '钻石';
+        break;
+      case 2:
+        text = '白金';
+        break;
+      case 3:
+        text = '黄金';
+        break;
+      case 4:
+        text = '普通';
+        break;
+    }
+    return text;
+  }else{
+    return text = '无';
   }
-  return text;
+
 }