|
@@ -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);
|