Bläddra i källkod

公安网测试

lichao 2 månader sedan
förälder
incheckning
2e413b7461

+ 2 - 2
sqjw/src/main/java/com/xwkj/sqjw/mvp/model/api/Api.java

@@ -10,6 +10,6 @@ package com.xwkj.sqjw.mvp.model.api;
  * ================================================
  */
 public interface Api {
-    String APP_DOMAIN = "http://192.168.0.12:1234"; // 300586
-//    String APP_DOMAIN = "http://192.168.20.228:7022/yysd/";
+//    String APP_DOMAIN = "http://192.168.0.12:1234"; // 300586
+    String APP_DOMAIN = "http://192.168.20.228:7022/yysd/";
 }

+ 1 - 0
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/MainActivity.java

@@ -29,6 +29,7 @@ import com.xwkj.sqjw.mvp.ui.fragment.HomeFragment;
 import com.xwkj.sqjw.mvp.ui.fragment.MyFragment;
 import com.zkjc.common.base.ZkjcBaseActivity;
 import com.zkjc.common.utils.ApkUtils;
+import com.zkjc.common.utils.ShareInfo;
 
 import java.util.ArrayList;
 import java.util.List;

+ 2 - 2
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/SqjwLoginActivity.java

@@ -59,12 +59,12 @@ public class SqjwLoginActivity extends BaseActivity<SqjwLoginPresenter> implemen
 
     @Override
     public void initData(@Nullable Bundle savedInstanceState) {
-        if (ApkUtils.isSqjw(this)){
+        if (/*ApkUtils.isSqjw(this)*/false){
             //社区警务APP
             onTime(0L);
         }else {
             //警地融合 可以跳转或者当前页
-            ArmsUtils.startActivity(new Intent(SqjwLoginActivity.this, JdrhLoginActivity.class));
+            ArmsUtils.startActivity(new Intent(SqjwLoginActivity.this, MainActivity.class));
             finish();
         }
     }

+ 2 - 1
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/adapter/HomeAppAdapter.java

@@ -23,7 +23,8 @@ public class HomeAppAdapter extends BaseRecycleAdapter<AppEntity.App> {
         }
         setItemText(holder.getView(R.id.item_tv_app_name), app.getName());
         if (!TextUtils.isEmpty(app.getIcon())) {
-            Picasso.with(holder.getView(R.id.item_iv_icon).getContext()).load(app.getIcon()).into((ImageView) holder.getView(R.id.item_iv_icon));
+            // http://10.106.38.18:9000/jdrh/upload/20241101/010213d16757b415a1476189637cceb37332f0IMG_20241101_102735.jpg
+            Picasso.with(holder.getView(R.id.item_iv_icon).getContext()).load(app.getIcon().replace("10.106.38.18:9000", "192.168.20.228:7022/downloadApk/")).into((ImageView) holder.getView(R.id.item_iv_icon));
         }
     }
 

+ 1 - 1
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/HomeFragment.java

@@ -302,7 +302,7 @@ public class HomeFragment extends BaseFragment<HomePresenter> implements HomeCon
                             }
                             intent.putExtra("appId", app.getId());
                             // sqjw
-                            intent.putExtra("username", "sqmj1");
+                            intent.putExtra("username", getActivity().getIntent().getStringExtra("jh"));
                             intent.putExtra("json", new Gson().toJson(getShareInfo()));
 
                             // jdrh

+ 10 - 2
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/fragment/MyFragment.java

@@ -2,7 +2,9 @@ package com.xwkj.sqjw.mvp.ui.fragment;
 
 import android.Manifest;
 import android.content.ComponentName;
+import android.content.Context;
 import android.content.Intent;
+import android.content.SharedPreferences;
 import android.content.pm.PackageInfo;
 import android.content.pm.PackageManager;
 import android.os.Build;
@@ -33,6 +35,7 @@ import com.xwkj.sqjw.mvp.contract.MyContract;
 import com.xwkj.sqjw.mvp.presenter.MyPresenter;
 
 import com.xwkj.sqjw.R;
+import com.zkjc.common.utils.ShareInfo;
 
 import org.json.JSONObject;
 
@@ -130,11 +133,16 @@ public class MyFragment extends BaseFragment<MyPresenter> implements MyContract.
         btLogout.setOnClickListener(view -> {
 //            getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE).edit().putBoolean("isFirst", true).commit();
 //            getActivity().finish();
-            ComponentName componetName = new ComponentName("com.xwkj.xfjc", "com.xwkj.xfjc.mvp.ui.activity.LoginActivity");
+            ComponentName componetName = new ComponentName("com.xwkj.rwxffk", "com.xwkj.rwxffk.mvp.ui.activity.LoginActivity");
             try {
                 Intent intent = new Intent();
                 intent.setComponent(componetName);
-                intent.putExtra("username", "207919");
+                SharedPreferences sys = getActivity().getSharedPreferences("sys", Context.MODE_PRIVATE);
+                String userName = sys.getString("zh", "");
+                String password = sys.getString("mm", "");
+                intent.putExtra("appId", "1851531592469798914");
+                intent.putExtra("xwkjUserName", "sqmj2");
+                intent.putExtra("xwkjPassword", password);
                 startActivity(intent);
             } catch (Exception e) {
                 e.printStackTrace();

+ 3 - 0
sqjw/src/main/res/layout/fragment_my.xml

@@ -3,11 +3,13 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:visibility="gone"
     android:orientation="vertical">
 
     <Button
         android:layout_width="match_parent"
         android:text="小程序"
+        android:visibility="gone"
         android:layout_marginTop="26dp"
         android:id="@+id/bt_open"
         android:layout_height="40dp"/>
@@ -15,6 +17,7 @@
     <Button
         android:layout_width="match_parent"
         android:text="退出登录"
+        android:visibility="gone"
         android:layout_marginTop="26dp"
         android:id="@+id/bt_logout"
         android:layout_height="40dp"/>