瀏覽代碼

新增组件及页面

liuqiwen 4 年之前
父節點
當前提交
3009a530f9
共有 1 個文件被更改,包括 22 次插入17 次删除
  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;
+
 }