Browse Source

和小程序端统一结构

yanglei 2 months ago
parent
commit
bfcd7ff99f

+ 1 - 0
build.gradle

@@ -27,6 +27,7 @@ allprojects {
 
         maven { url "https://jitpack.io" }
 
+
     }
 }
 

+ 196 - 0
sqjw/src/main/java/com/xwkj/sqjw/app/utils/ShareInfo.java

@@ -0,0 +1,196 @@
+package com.xwkj.sqjw.app.utils;
+
+import java.util.List;
+
+public class ShareInfo {
+    //app凭证
+    private String appCredential;
+    //用户凭证
+    private String userCredential;
+    //资源ID
+    private String dataObjId;
+    private List<Resource> resourceList;
+    //用户信息
+    private String depCode;
+    private String depName;
+    private String mobile;
+    private String personCode;
+    private String personId;
+    private String personIdentifier;
+    private String personName;
+    private String personType;
+    private String police;
+    private String sex;
+    //  Fields 固定写死  data
+    private String Fields;
+    //NetworkCode 固定写死
+    private String NetworkCode;
+
+    public String getAppCredential() {
+        return appCredential;
+    }
+
+    public void setAppCredential(String appCredential) {
+        this.appCredential = appCredential;
+    }
+
+    public String getUserCredential() {
+        return userCredential;
+    }
+
+    public void setUserCredential(String userCredential) {
+        this.userCredential = userCredential;
+    }
+
+    public String getDataObjId() {
+        return dataObjId;
+    }
+
+    public void setDataObjId(String dataObjId) {
+        this.dataObjId = dataObjId;
+    }
+
+    public List<Resource> getResourceList() {
+        return resourceList;
+    }
+
+    public void setResourceList(List<Resource> resourceList) {
+        this.resourceList = resourceList;
+    }
+
+    public String getDepCode() {
+        return depCode;
+    }
+
+    public void setDepCode(String depCode) {
+        this.depCode = depCode;
+    }
+
+    public String getDepName() {
+        return depName;
+    }
+
+    public void setDepName(String depName) {
+        this.depName = depName;
+    }
+
+    public String getMobile() {
+        return mobile;
+    }
+
+    public void setMobile(String mobile) {
+        this.mobile = mobile;
+    }
+
+    public String getPersonCode() {
+        return personCode;
+    }
+
+    public void setPersonCode(String personCode) {
+        this.personCode = personCode;
+    }
+
+    public String getPersonId() {
+        return personId;
+    }
+
+    public void setPersonId(String personId) {
+        this.personId = personId;
+    }
+
+    public String getPersonIdentifier() {
+        return personIdentifier;
+    }
+
+    public void setPersonIdentifier(String personIdentifier) {
+        this.personIdentifier = personIdentifier;
+    }
+
+    public String getPersonName() {
+        return personName;
+    }
+
+    public void setPersonName(String personName) {
+        this.personName = personName;
+    }
+
+    public String getPersonType() {
+        return personType;
+    }
+
+    public void setPersonType(String personType) {
+        this.personType = personType;
+    }
+
+    public String getPolice() {
+        return police;
+    }
+
+    public void setPolice(String police) {
+        this.police = police;
+    }
+
+    public String getSex() {
+        return sex;
+    }
+
+    public void setSex(String sex) {
+        this.sex = sex;
+    }
+
+    public String getFields() {
+        return Fields;
+    }
+
+    public void setFields(String fields) {
+        Fields = fields;
+    }
+
+    public String getNetworkCode() {
+        return NetworkCode;
+    }
+
+    public void setNetworkCode(String networkCode) {
+        NetworkCode = networkCode;
+    }
+
+    //请求地址信息
+    public class Resource {
+        private String resourceRegionalismCode;
+        private String resourceAddress;
+        private String resourceId;
+        private String resourceServiceType;
+
+        public String getResourceRegionalismCode() {
+            return resourceRegionalismCode;
+        }
+
+        public void setResourceRegionalismCode(String resourceRegionalismCode) {
+            this.resourceRegionalismCode = resourceRegionalismCode;
+        }
+
+        public String getResourceAddress() {
+            return resourceAddress;
+        }
+
+        public void setResourceAddress(String resourceAddress) {
+            this.resourceAddress = resourceAddress;
+        }
+
+        public String getResourceId() {
+            return resourceId;
+        }
+
+        public void setResourceId(String resourceId) {
+            this.resourceId = resourceId;
+        }
+
+        public String getResourceServiceType() {
+            return resourceServiceType;
+        }
+
+        public void setResourceServiceType(String resourceServiceType) {
+            this.resourceServiceType = resourceServiceType;
+        }
+    }
+}

+ 8 - 7
sqjw/src/main/java/com/xwkj/sqjw/mvp/ui/activity/MainActivity.java

@@ -75,13 +75,13 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
     public void initData(@Nullable Bundle savedInstanceState) {
         checkPermission();
         btOpen.setOnClickListener(view -> {
-            try {
+            /*try {
                 IUniMP uniMP = DCUniMPSDK.getInstance().openUniMP(MainActivity.this,"__UNI__F743940");
                 mUniMPCaches.put(uniMP.getAppid(), uniMP);
             } catch (Exception e) {
                 e.printStackTrace();
-            }
-           // updateWgt();
+            }*/
+         updateWgt();
         });
     }
 
@@ -90,8 +90,9 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
      */
     private void updateWgt() {
         //
-        final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
-        final String wgtName = "__UNI__7AEA00D.wgt";
+       // final String wgtUrl = "https://native-res.dcloud.net.cn/unimp-sdk/__UNI__7AEA00D.wgt";
+        final String wgtUrl = "http://111.26.204.4:9000/jdrh/upload/20241017/__UNI__0308C60.wgt";
+        final String wgtName = "__UNI__0308C60.wgt";
 
         String downFilePath = getExternalCacheDir().getPath();
 
@@ -111,7 +112,7 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
                 uiHandler.post(new Runnable() {
                     @Override
                     public void run() {
-                        DCUniMPSDK.getInstance().releaseWgtToRunPath("__UNI__7AEA00D", uniMPReleaseConfiguration, new IUniMPReleaseCallBack() {
+                        DCUniMPSDK.getInstance().releaseWgtToRunPath("__UNI__0308C60", uniMPReleaseConfiguration, new IUniMPReleaseCallBack() {
                             @Override
                             public void onCallBack(int code, Object pArgs) {
                                 if (code == 1) {
@@ -120,7 +121,7 @@ public class MainActivity extends BaseActivity<MainPresenter> implements MainCon
                                     try {
                                         UniMPOpenConfiguration uniMPOpenConfiguration = new UniMPOpenConfiguration();
                                         uniMPOpenConfiguration.extraData.put("darkmode", "auto");
-                                        DCUniMPSDK.getInstance().openUniMP(MainActivity.this, "__UNI__7AEA00D", uniMPOpenConfiguration);
+                                        DCUniMPSDK.getInstance().openUniMP(MainActivity.this, "__UNI__0308C60", uniMPOpenConfiguration);
                                     } catch (Exception e) {
                                         e.printStackTrace();
                                     }

+ 5 - 1
sqjw/src/main/res/values/dimens.xml

@@ -1,3 +1,7 @@
 <resources>
-
+    <dimen name="def_height">50dp</dimen>
+    <dimen name="dp_10">10dp</dimen>
+    <dimen name="dp_4">4dp</dimen>
+    <dimen name="dp_40">40dp</dimen>
+    <dimen name="sp_14">14sp</dimen>
 </resources>

+ 1 - 0
sqjw/src/main/res/values/styles.xml

@@ -1,4 +1,5 @@
 <resources>
+
     <!-- Base application theme. -->
     <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
         <!-- Customize your theme here. -->