bai 3 gadi atpakaļ
vecāks
revīzija
22bd2b22af

+ 1 - 1
demo/src/main/java/com/framework/app/Constants.kt

@@ -9,7 +9,7 @@ const val test2IP = "http://192.168.0.11:8876/"
 
 const val tencentIP = "http://82.157.28.170:8876/"
 
-const val IP = testIP
+const val IP = tencentIP
 
 const val devFileServiceUrl = "http://develop.persagy.com/image-service/"
 

+ 2 - 2
demo/src/main/java/com/framework/mvvm/mv/AdmViewModel.kt

@@ -89,9 +89,9 @@ class AdmViewModel(private val repository: AdmRepository) : ViewModel() {
             for (building in buildings) {
                 repository.requestBuilding(
                     AdmRequest(
-                        userId = "bdtp",
+                        userId = "admjd", // just for jd
                         projectId = building.projectId!!,
-                        groupCode = "XG",
+                        groupCode = building.groupCode,
                         buildingId = if (isOnlyRelation) "" else building.id,
                         clientId = sp.getString(CLIENT_ID, "") ?: "",
                         bdtpDownloadTs = sp.getLong("${building.buildingId}.$BDTP_TS", 0L),

+ 6 - 15
demo/src/main/java/com/sybotan/android/demo/activities/PocActivity.kt

@@ -56,6 +56,9 @@ class PocActivity : BaseActivity(), DIAware {
 
     private lateinit var version: TextView
 
+    // 测试用,后期动态设置
+    private val jdRequest = AdmRequest(userId = admjd, projectId = "Pj9909990002", groupCode = "JD")
+
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
         setContentView(R.layout.activity_poc)
@@ -104,11 +107,7 @@ class PocActivity : BaseActivity(), DIAware {
 
         dictBtn.setOnClickListener {
             mVm.requestDict(
-                AdmRequest(
-                    userId = "bdtp",
-                    projectId = "Pj5001120003",
-                    groupCode = "XG"
-                )
+                jdRequest
             ) {
                 val builder = AlertDialog.Builder(this)
                 val dialog = builder.setMessage("数据字典下载成功")
@@ -121,11 +120,7 @@ class PocActivity : BaseActivity(), DIAware {
 
         configBtn.setOnClickListener {
             mVm.requestConfig(
-                AdmRequest(
-                    userId = "bdtp",
-                    projectId = "Pj5001120003",
-                    groupCode = "XG"
-                )
+                jdRequest
             ) {
                 val builder = AlertDialog.Builder(this)
                 val dialog = builder.setMessage("配置信息下载成功")
@@ -138,11 +133,7 @@ class PocActivity : BaseActivity(), DIAware {
 
         frameBtn.setOnClickListener {
             mVm.requestFrame(
-                AdmRequest(
-                    userId = "bdtp",
-                    projectId = "Pj5001120003",
-                    groupCode = "XG"
-                )
+                jdRequest
             ) {
                 val builder = AlertDialog.Builder(this)
                 val dialog = builder.setMessage("框架数据下载成功")