瀏覽代碼

Merge branch 'feature_arison' of https://gitlab.com/Arisono/SkWeiChat-Baidu into feature

# Conflicts:
#	WeiChat/version.properties
#	app_modular/appworks/src/main/java/com/uas/appworks/CRM/erp/activity/DeviceDataFormAddActivity.java
Arison 8 年之前
父節點
當前提交
d3c5678a60

+ 1 - 9
WeiChat/src/main/AndroidManifest.xml

@@ -134,15 +134,7 @@
                 <action android:name="cat.ereza.customactivityoncrash.RESTART" />
             </intent-filter>
 
-            <intent-filter>
-                <action android:name="android.intent.action.VIEW"></action>
-                <category android:name="android.intent.category.DEFAULT"></category>
-                <category android:name="android.intent.category.BROWSABLE"></category>
-                
-                <data android:scheme="app"
-                    android:host="usoftchina.com">
-                </data>
-            </intent-filter>
+       
         </activity>
         <!-- 异常跳转页面 -->
         <activity

+ 3 - 3
WeiChat/version.properties

@@ -1,5 +1,5 @@
-#Tue Jan 09 15:34:36 CST 2018
-debugName=20
+#Tue Jan 09 17:20:53 CST 2018
+debugName=26
 versionName=611
-debugCode=20
+debugCode=26
 versionCode=150

+ 1 - 0
app_modular/apputils/build.gradle

@@ -25,4 +25,5 @@ dependencies {
     compile project(':common')
     compile project(':network')
     compile project(':imageload')
+    compile 'com.android.support.constraint:constraint-layout:+'
 }

+ 15 - 2
app_modular/apputils/src/main/AndroidManifest.xml

@@ -26,21 +26,34 @@
             android:configChanges="orientation|keyboardHidden|navigation|screenSize"
             android:exported="false"
             android:screenOrientation="behind"
-            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
+            android:windowSoftInputMode="adjustResize|stateHidden" />
         <activity
             android:name="com.alipay.sdk.app.H5AuthActivity"
             android:configChanges="orientation|keyboardHidden|navigation"
             android:exported="false"
             android:screenOrientation="behind"
-            android:windowSoftInputMode="adjustResize|stateHidden"></activity>
+            android:windowSoftInputMode="adjustResize|stateHidden" />
 
         <!-- alipay sdk end -->
         <activity android:name=".activity.SimpleWebActivity">
             <intent-filter>
                 <action android:name="com.modular.apputils.activity.SimpleWebActivity" />
+
                 <category android:name="android.intent.category.DEFAULT" />
             </intent-filter>
         </activity>
+        
+        
+        <activity android:name=".IntentUrlActivity">
+            <intent-filter>
+                <action android:name="android.intent.action.VIEW"></action>
+                <category android:name="android.intent.category.DEFAULT"></category>
+                <category android:name="android.intent.category.BROWSABLE"></category>
+                <data android:scheme="app"
+                    android:host="usoftchina.com">
+                </data>
+            </intent-filter>
+        </activity>
     </application>
 
 </manifest>

+ 55 - 0
app_modular/apputils/src/main/java/com/modular/apputils/IntentUrlActivity.java

@@ -0,0 +1,55 @@
+package com.modular.apputils;
+
+import android.app.Activity;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Bundle;
+
+import com.common.LogUtil;
+import com.modular.apputils.activity.SimpleWebActivity;
+
+/**
+  * @desc:负责分发外部URL链接的中转界面
+  * @author:Arison on 2018/1/9
+  */
+public class IntentUrlActivity extends Activity {
+private static final String TAG = "IntentUrlActivity";
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_intent_url);
+        Intent i_getvalue = getIntent();
+        String action = i_getvalue.getAction();
+        if(Intent.ACTION_VIEW.equals(action)){
+            Uri uri = i_getvalue.getData();
+            if(uri != null){
+                String pagekind = uri.getQueryParameter("pagekind");
+                String id= uri.getQueryParameter("id");
+                LogUtil.d(TAG,"pagekind:"+pagekind+" id:"+id);
+                if ("A".equals(pagekind)){
+                    Intent intent=new Intent(this, SimpleWebActivity.class);
+                    intent.putExtra("id",id);
+                    intent.putExtra("url","https://www.baidu.com");
+                    intent.putExtra("p","询价单");
+                    startActivity(intent);
+                }
+                if ("B".equals(pagekind)){
+                    Intent intent=new Intent(this, SimpleWebActivity.class);
+                    intent.putExtra("id",id);
+                    intent.putExtra("url","https://github.com");
+                    intent.putExtra("p","公共询价单");
+                    startActivity(intent);
+                  
+                }
+                if ("C".equals(pagekind)){
+                    Intent intent=new Intent(this, SimpleWebActivity.class);
+                    intent.putExtra("id",id);
+                    intent.putExtra("url","https://www.jianshu.com/u/7cfc7246c714");
+                    intent.putExtra("p","采购单");
+                    startActivity(intent);
+                }
+                finish();
+            }
+        }
+    }
+}

+ 7 - 1
app_modular/apputils/src/main/java/com/modular/apputils/activity/SimpleWebActivity.java

@@ -127,5 +127,11 @@ private static final String TAG = "SimpleWebActivity";
             CookieManager.getInstance().setAcceptCookie(true);
         }
     }
-    
+
+
+    @Override
+    public void onBackPressed() {
+        startActivity( new Intent("com.modular.main.MainActivity"));
+        overridePendingTransition(com.core.app.R.anim.anim_activity_out, com.core.app.R.anim.anim_activity_in);
+    }
 }

+ 9 - 0
app_modular/apputils/src/main/res/layout/activity_intent_url.xml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    tools:context="com.modular.apputils.IntentUrlActivity">
+
+</android.support.constraint.ConstraintLayout>