瀏覽代碼

增加APP备案号

Pq 1 年之前
父節點
當前提交
b25381a157

+ 2 - 0
BaseLibrary/src/main/java/com/cooleshow/base/common/WebConstants.java

@@ -169,4 +169,6 @@ public abstract class WebConstants {
     public static final String TRAIN_TOOLS = getBaseUrlH5() + "/#/train-tool";
 
     public static final String MY_WORKS = getBaseUrlH5() + "/#/creation?id=%s";////我的作品
+
+    public static final String ICP_QUERY = "https://beian.miit.gov.cn";////工信部网站
 }

+ 10 - 0
BaseLibrary/src/main/java/com/cooleshow/base/utils/helper/WebStartHelper.java

@@ -249,4 +249,14 @@ public class WebStartHelper {
                 .withString(WebConstants.WEB_URL, String.format(WebConstants.MY_WORKS, worksId))
                 .navigation();
     }
+
+    /**
+     * 工信部网站
+     */
+    public static void startICP() {
+        ARouter.getInstance()
+                .build(RouterPath.WebCenter.ACTIVITY_HTML)
+                .withString(WebConstants.WEB_URL, WebConstants.ICP_QUERY)
+                .navigation();
+    }
 }

+ 8 - 0
student/src/main/java/com/cooleshow/student/ui/mine/AboutActivity.java

@@ -9,6 +9,7 @@ import com.cooleshow.base.router.RouterPath;
 import com.cooleshow.base.ui.activity.BaseMVPActivity;
 import com.cooleshow.base.utils.AppUtils;
 import com.cooleshow.base.utils.helper.QMUIStatusBarHelper;
+import com.cooleshow.base.utils.helper.WebStartHelper;
 import com.cooleshow.student.contract.AboutContract;
 import com.cooleshow.student.databinding.ActivityAboutBinding;
 import com.cooleshow.student.presenter.mine.AboutPresenter;
@@ -39,6 +40,13 @@ public class AboutActivity extends BaseMVPActivity<ActivityAboutBinding, AboutPr
     protected void initView() {
         initMidTitleToolBar(viewBinding.toolbarInclude.toolbar, "关于我们");
         viewBinding.tvVersion.setText("版本号:"+ AppUtils.getAppVersionName());
+
+        viewBinding.tvIcp.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                WebStartHelper.startICP();
+            }
+        });
     }
 
     @Override

+ 15 - 0
student/src/main/res/layout/activity_about.xml

@@ -101,6 +101,21 @@
 
     </androidx.constraintlayout.widget.ConstraintLayout>
 
+
+    <TextView
+        android:id="@+id/tv_icp"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:layout_marginTop="33dp"
+        android:gravity="center"
+        android:includeFontPadding="false"
+        android:drawablePadding="4dp"
+        android:drawableRight="@drawable/icon_arrow_right"
+        android:text="ICP备案号:鄂ICP备2021020787号-4A"
+        android:layout_gravity="center_horizontal"
+        android:textColor="@color/color_999999"
+        android:textSize="@dimen/sp_13"/>
+
     <TextView
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"