Pārlūkot izejas kodu

v1.0.18 vivo剪切板功能复制淘口令给出弹框提示

kaijia 4 mēneši atpakaļ
vecāks
revīzija
1ec6460971

+ 2 - 2
app/build.gradle

@@ -11,8 +11,8 @@ android {
11 11
         }
12 12
     }
13 13
 
14
-    compileSdkVersion 28
15
-    buildToolsVersion "28.0.3"
14
+    compileSdkVersion 30
15
+    buildToolsVersion "30.0.3"
16 16
     defaultConfig {
17 17
         applicationId "com.kx.liedouYX"
18 18
         minSdkVersion 19

+ 0 - 1
app/src/main/AndroidManifest.xml

@@ -31,7 +31,6 @@
31 31
     <uses-permission
32 32
         android:name="android.permission.QUERY_ALL_PACKAGES"
33 33
         tools:ignore="QueryAllPackagesPermission" />
34
-
35 34
     <application
36 35
         android:name=".MyApp"
37 36
         android:allowBackup="true"

+ 4 - 4
app/src/main/java/com/kx/liedouYX/net/interceptor/CustomLogInterceptor.java

@@ -59,7 +59,7 @@ public class CustomLogInterceptor implements Interceptor {
59 59
                     .concat("请求结果-->:")
60 60
                     .concat(getResponseText(response));
61 61
             String result = DecodeUttils.decodeUnicode(logInfo);
62
-            LogUtil.e(result);
62
+            LogUtil.i(result);
63 63
             printJson(getResponseText(response), "json格式化数据");
64 64
         }
65 65
     }
@@ -140,16 +140,16 @@ public class CustomLogInterceptor implements Interceptor {
140 140
         String[] lines = message.split(LINE_SEPARATOR);
141 141
         for (String line : lines) {
142 142
             String result = DecodeUttils.decodeUnicode(line);
143
-            LogUtil.e("║ " + result.replace("\\", ""));
143
+            LogUtil.i("║ " + result.replace("\\", ""));
144 144
         }
145 145
         printLine(false);
146 146
     }
147 147
 
148 148
     private void printLine(boolean isTop) {
149 149
         if (isTop) {
150
-            LogUtil.e("╔═══════════════════════════════════════════════════════════════════════════════════════");
150
+            LogUtil.i("╔═══════════════════════════════════════════════════════════════════════════════════════");
151 151
         } else {
152
-            LogUtil.e("╚═══════════════════════════════════════════════════════════════════════════════════════");
152
+            LogUtil.i("╚═══════════════════════════════════════════════════════════════════════════════════════");
153 153
         }
154 154
     }
155 155
 }

+ 1 - 1
app/src/main/java/com/kx/liedouYX/net/retrofit/RetrofitUtils.java

@@ -136,7 +136,7 @@ public class RetrofitUtils {
136 136
                             callBack.fail("无效状态异常");
137 137
                             e.printStackTrace();
138 138
                         } else {
139
-                            callBack.fail("数据异常!");
139
+//                            callBack.fail("数据异常!");
140 140
                             e.printStackTrace();
141 141
                         }
142 142
                     }

+ 3 - 0
app/src/main/java/com/kx/liedouYX/ui/activity/main/MainActivity.java

@@ -1,5 +1,6 @@
1 1
 package com.kx.liedouYX.ui.activity.main;
2 2
 
3
+import android.Manifest;
3 4
 import android.annotation.SuppressLint;
4 5
 import android.content.ClipData;
5 6
 import android.content.ClipboardManager;
@@ -21,6 +22,8 @@ import android.widget.TextView;
21 22
 
22 23
 import androidx.annotation.NonNull;
23 24
 import androidx.annotation.Nullable;
25
+import androidx.core.app.ActivityCompat;
26
+import androidx.core.content.ContextCompat;
24 27
 import androidx.fragment.app.Fragment;
25 28
 import androidx.fragment.app.FragmentManager;
26 29
 import androidx.fragment.app.FragmentTransaction;

+ 0 - 3
app/src/main/java/com/kx/liedouYX/ui/activity/mine/BalanceActivity.java

@@ -25,7 +25,6 @@ import com.kx.liedouYX.entity.MonthEarningsBean;
25 25
 import com.kx.liedouYX.entity.MyCertifiCationBean;
26 26
 import com.kx.liedouYX.entity.MyEarningsBean;
27 27
 import com.kx.liedouYX.entity.PublicBean2;
28
-import com.kx.liedouYX.event.bean.LoginStatusBean;
29 28
 import com.kx.liedouYX.ui.activity.alipay.BindAlipayActivity;
30 29
 import com.kx.liedouYX.ui.activity.mine.money.IMoneyView;
31 30
 import com.kx.liedouYX.ui.activity.mine.money.MoneyPresenter;
@@ -34,8 +33,6 @@ import com.kx.liedouYX.ui.activity.real_name.RealNameAuthenActivity;
34 33
 import com.kx.liedouYX.ui.activity.real_name.RealNamePresenter;
35 34
 import com.kx.liedouYX.ui.adapter.BalanceAdapter;
36 35
 import com.kx.liedouYX.utils.IntentUtils;
37
-import com.kx.liedouYX.utils.SPUtils;
38
-import com.kx.liedouYX.view.dialog.FwSDialog;
39 36
 import com.kx.liedouYX.view.dialog.TipsDialog;
40 37
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
41 38
 import com.scwang.smartrefresh.layout.api.RefreshLayout;

+ 1 - 1
app/src/main/java/com/kx/liedouYX/ui/activity/welcome/WelcomeActivity.java

@@ -96,7 +96,7 @@ public class WelcomeActivity extends AppCompatActivity implements IHomePageSubVi
96 96
         LogUtil.e("程序启动 " + activitySize);
97 97
         MyCrashHandler.getInstance().init(this);
98 98
         //是不是华为的设备
99
-        Constants.isHuaWeiPhone = true;
99
+        Constants.isHuaWeiPhone = false;
100 100
 
101 101
         boolean initSDK = SPUtils.getInstance().getBoolean("initSDK", false);
102 102
         if (initSDK) {

+ 22 - 10
app/src/main/java/com/kx/liedouYX/ui/fragment/detail/DetailFragment.java

@@ -1,6 +1,8 @@
1 1
 package com.kx.liedouYX.ui.fragment.detail;
2 2
 
3
+import android.app.AlertDialog;
3 4
 import android.content.Context;
5
+import android.content.DialogInterface;
4 6
 import android.content.Intent;
5 7
 import android.graphics.Color;
6 8
 import android.graphics.Paint;
@@ -46,6 +48,7 @@ import com.kx.liedouYX.entity.WphRecommendBean;
46 48
 import com.kx.liedouYX.net.config.ApiConfig;
47 49
 import com.kx.liedouYX.ui.activity.detail.DetailsActivity;
48 50
 import com.kx.liedouYX.ui.activity.login.LoginActivity;
51
+import com.kx.liedouYX.ui.activity.real_name.RealNameAuthenActivity;
49 52
 import com.kx.liedouYX.ui.adapter.ImageVerAdapter;
50 53
 import com.kx.liedouYX.ui.adapter.RecommendTopAdapter;
51 54
 import com.kx.liedouYX.ui.adapter.SortAdapter;
@@ -61,7 +64,9 @@ import com.kx.liedouYX.utils.SPUtils;
61 64
 import com.kx.liedouYX.utils.SpaceItemDecorate;
62 65
 import com.kx.liedouYX.utils.Textutils;
63 66
 import com.kx.liedouYX.utils.ThreeAppUtils;
67
+import com.kx.liedouYX.utils.ToastUtils;
64 68
 import com.kx.liedouYX.view.dialog.GenericDialog;
69
+import com.kx.liedouYX.view.dialog.TipsDialog;
65 70
 import com.previewlibrary.GPreviewBuilder;
66 71
 import com.scwang.smartrefresh.layout.SmartRefreshLayout;
67 72
 import com.scwang.smartrefresh.layout.api.RefreshLayout;
@@ -756,6 +761,7 @@ public class DetailFragment extends LazyFragment {
756 761
             if (tbKouLingBean.getErrno().equals("0") && tbKouLingBean.getErr().equals("成功")) {
757 762
                 TbKouLingBean.RstBean rst = tbKouLingBean.getRst();
758 763
                 if (rst != null) {
764
+                    //判断是否安装的淘宝客户端
759 765
                     String[] split = rst.getData().split(" http");
760 766
                     ClipboardUtils.copyToClipboard(getActivity(), split[0]);
761 767
                     Intent intent = getActivity().getPackageManager().getLaunchIntentForPackage("com.taobao.taobao");
@@ -1186,16 +1192,22 @@ public class DetailFragment extends LazyFragment {
1186 1192
                 switch (shopping_type) {
1187 1193
                     case 0:
1188 1194
                     case 1:
1189
-                        getTbKouLing();
1190
-//                        if (Constants.isAppLogin) {
1191
-//                        } else {
1192
-//                            boolean login_notice = SPUtils.getInstance().getBoolean("login_notice");
1193
-//                            if (!login_notice) {
1194
-//                                showDialog();
1195
-//                            } else {
1196
-//                                getTbKouLing();
1197
-//                            }
1198
-//                        }
1195
+                        TipsDialog dialog = new TipsDialog(getActivity());
1196
+                        dialog.setTipsMsg("即将复制淘口令,跳转到淘宝客户端");
1197
+                        dialog.setConfirmButton("确定", getResources().getColor(R.color.light_blue));
1198
+                        dialog.setButtonClick(new TipsDialog.ButtonClick() {
1199
+                            @Override
1200
+                            public void buttonClick(boolean confirm) {
1201
+                                if (confirm) {
1202
+                                    if (ThreeAppUtils.getInstance().isAvilible(getActivity(), "com.taobao.taobao")) {
1203
+                                        getTbKouLing();
1204
+                                    } else {
1205
+                                        ToastUtils.showToast(getActivity(), "未发现淘宝客户端!");
1206
+                                    }
1207
+                                }
1208
+                            }
1209
+                        });
1210
+                        dialog.show();
1199 1211
                         break;
1200 1212
                     case 4:
1201 1213
                         ThreeAppUtils.getInstance().toJingDong(getActivity(), coupon_url);

+ 1 - 1
app/src/main/java/com/kx/liedouYX/utils/ThreeAppUtils.java

@@ -215,7 +215,7 @@ public class ThreeAppUtils {
215 215
         }
216 216
     }
217 217
 
218
-    private boolean isAvilible(Context context, String packageName) {
218
+    public boolean isAvilible(Context context, String packageName) {
219 219
         final PackageManager packageManager = context.getPackageManager();//获取packagemanager
220 220
         List<PackageInfo> pinfo = packageManager.getInstalledPackages(0);//获取所有已安装程序的包信息
221 221
         List<String> pName = new ArrayList<String>();//用于存储所有已安装程序的包名

+ 2 - 2
magicindicator/magicindicator.iml

@@ -31,10 +31,10 @@
31 31
     <output-test url="file://$MODULE_DIR$/build/intermediates/javac/debugUnitTest/classes" />
32 32
     <exclude-output />
33 33
     <content url="file://$MODULE_DIR$">
34
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
34
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
35 35
       <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debug/out" isTestSource="false" generated="true" />
36 36
       <sourceFolder url="file://$MODULE_DIR$/build/generated/source/buildConfig/debug" isTestSource="false" generated="true" />
37
-      <sourceFolder url="file://$MODULE_DIR$/build/generated/renderscript_source_output_dir/debug/out" isTestSource="false" generated="true" />
37
+      <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debug/out" isTestSource="false" generated="true" />
38 38
       <sourceFolder url="file://$MODULE_DIR$/build/generated/res/rs/debug" type="java-resource" generated="true" />
39 39
       <sourceFolder url="file://$MODULE_DIR$/build/generated/ap_generated_sources/debugAndroidTest/out" isTestSource="true" generated="true" />
40 40
       <sourceFolder url="file://$MODULE_DIR$/build/generated/aidl_source_output_dir/debugAndroidTest/out" isTestSource="true" generated="true" />