Browse Source

1.添加查看理疗方案详情UI

王鹏鹏 2 years ago
parent
commit
de8a19dbca

+ 1 - 0
baselib/src/main/java/com/yingyangfly/baselib/utils/CommonParam.kt

@@ -12,4 +12,5 @@ object CommonParam {
     val TASKDIALOG = "taskDialog"
     val VOICETOKEN = "voice_token"
     val FIRSTLOGIN = "firstLogin"
+    val SNCODE = "sncode"
 }

+ 15 - 0
baselib/src/main/java/com/yingyangfly/baselib/utils/User.kt

@@ -199,4 +199,19 @@ object User {
             Preferences.getString(CommonParam.FIRSTLOGIN)!!
         }
     }
+
+    /**
+     * 保存sncode
+     */
+    fun saveSnCode(snCode: String) {
+        Preferences.put(CommonParam.SNCODE, snCode)
+    }
+
+    fun getSnCode(): String {
+        return if (Preferences.getString(CommonParam.SNCODE).isNullOrEmpty()) {
+            ""
+        } else {
+            Preferences.getString(CommonParam.SNCODE)!!
+        }
+    }
 }