| | |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | * |
| | | * @param title |
| | | */ |
| | | private static void isCopyTitle(final String title, final Activity context) { |
| | | private static void isCopyTitle(final String title, final Integer sourceType, final Activity context) { |
| | | CopyTitleDialog.Builder builder = new CopyTitleDialog.Builder(context); |
| | | builder.setMessage(title); |
| | | builder.setPositiveButton("", new DialogInterface.OnClickListener() { |
| | |
| | | Intent intent = new Intent(context, SearchResultActivity.class); |
| | | intent.putExtra("content", title); |
| | | intent.putExtra("type", "normal"); |
| | | intent.putExtra("page", (which - 1)); |
| | | intent.putExtra("page", sourceType == null ? 0 : (sourceType - 1)); |
| | | intent.putExtra("from", "recommendSearch"); |
| | | context.startActivity(intent); |
| | | dialog.dismiss(); |
| | |
| | | } |
| | | dialog = ToolUtil.isNotTBAlliance(new RecommendGoodsInfo(taoBaoGoodsBrief, leftJump, rightJump), type, context); |
| | | } else if (type.equalsIgnoreCase("2")) {// 智能搜索弹窗 |
| | | isCopyTitle(data.optJSONObject("data").optString("title"), context); |
| | | isCopyTitle(data.optJSONObject("data").optString("title"), data.optJSONObject("data").optInt("sourceType", Constant.GOODS_TYPE_TB), context); |
| | | } else if (type.equalsIgnoreCase("10") || |
| | | type.equalsIgnoreCase("11") || |
| | | type.equalsIgnoreCase("13")) {// 类型:10 // 类型:10-免单券 11-奖励券 13-红包 |