| | |
| | | |
| | | public class BuXinConstant { |
| | | |
| | | public static final String HOST = "http://192.168.3.122:8080";//内网测试 |
| | | // public static final String HOST = "http://192.168.3.122:8080";//内网测试 |
| | | // public static final String HOST = "http://192.168.1.253:8080";//内网测试 |
| | | // public static final String HOST = "http://192.168.1.200:8088";//内网测试 |
| | | // public static final String HOST = "http://111.231.250.166:8082";//外网测试 |
| | | // public static final String HOST = "http://api.fanliunion.yeshitv.com";//外网正式 |
| | | public static final String HOST = "http://api.tejia.yeshitv.com";//外网正式 |
| | | |
| | | public static boolean isPushMsg = false; |
| | | |
| | |
| | | params.put("page", page); |
| | | if (subId != null) |
| | | params.put("subId", subId); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "hotsell/getList", params, handler); |
| | | } |
| | | |
| | |
| | | if (!StringUtils.isEmpty(page)) |
| | | params.put("page", page); |
| | | params.put("goodsType", goodsType); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "recommend/getGoodList", params, handler); |
| | | } |
| | | |
| | |
| | | params.put("startprice", startprice); |
| | | params.put("endprice", endprice); |
| | | params.put("totalSales", totalSales); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | commonPostWithFailture(context, BASE_URL2 + "class/getSubGoods", params, handler); |
| | | } |
| | | |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("gcid", key); |
| | | params.put("page", page); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | commonPostWithFailture(context, BASE_URL2 + "class/getClassGoods", params, handler); |
| | | } |
| | | |
| | |
| | | if (type != null && !type.equals("") && !type.equals("null") && !type.equals("0")) { |
| | | params.put("type", type); |
| | | } |
| | | |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "commoncontent/getNavGoodsList", params, handler); |
| | | } |
| | | |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("orderId", orderId); |
| | | params.put("userInfo.id", uid + ""); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL + "lostOrder/findLostOrder", params, handler); |
| | | commonPostWithFailture(context, BASE_URL2 + "lostOrder/findLostOrder", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | params.put("page", page); |
| | | if (type != null) |
| | | params.put("type", type); |
| | | commonPost(context, BASE_URL + "user/msg/getMsgList", params, handler); |
| | | commonPost(context, BASE_URL2 + "user/msg/getMsgList", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | params.put("slideVerify", slideVerify); |
| | | params.put("phone", phone); |
| | | commonPostWithFailture(context, BASE_URL + "sms/sendMSMLogin", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void allowOneKeyLogin(Context context, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | commonPostWithFailture(context, BASE_URL + "sms/allowOneKeyLogin", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page + ""); |
| | | params.put("cid", cid); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "dynamic/getList", params, handler); |
| | | } |
| | | |
| | |
| | | params.put("page", page); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsType", goodsType); |
| | | if (UserUtil.getUid(context) != null) { |
| | | params.put("uid", UserUtil.getUid(context) + ""); |
| | | } |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "shraeStorage/getlist", params, handler); |
| | | } |
| | | |
| | |
| | | @Expose |
| | | TextColorSet goodsTitle; |
| | | |
| | | |
| | | //下单时间 |
| | | @Expose |
| | | private String placeOrderTime; |
| | | |
| | | //订单状态 |
| | | @Expose |
| | | private String payState; |
| | | |
| | | public String getActualCount() { |
| | | return actualCount; |
| | | } |
| | |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public String getPlaceOrderTime() { |
| | | return placeOrderTime; |
| | | } |
| | | |
| | | public void setPlaceOrderTime(String placeOrderTime) { |
| | | this.placeOrderTime = placeOrderTime; |
| | | } |
| | | |
| | | public String getPayState() { |
| | | return payState; |
| | | } |
| | | |
| | | public void setPayState(String payState) { |
| | | this.payState = payState; |
| | | } |
| | | } |
| | |
| | | if (hasAd) { |
| | | final FrameLayout fl_ad = (FrameLayout) mAquery.id(R.id.fl_ad_content).getView(); |
| | | final TextView tv_time = mAquery.id(R.id.tv_time).getTextView(); |
| | | final View skip = mAquery.id(R.id.tv_skip).getView(); |
| | | //填充通知信息 |
| | | mAquery.id(R.id.tv_notify).text(notifyDesc); |
| | | mAquery.id(R.id.ll_notify).clicked(new View.OnClickListener() { |
| | |
| | | @Override |
| | | public void onSuccess(List<ExpressAdContainer> adList) { |
| | | if (adList != null && adList.size() > 0) { |
| | | skip.setVisibility(View.VISIBLE); |
| | | //广告 |
| | | ExpressAdManager.renderAndFillAd(context, adList.get(0), fl_ad, new ExpressAdManager.IAdEventListener() { |
| | | |
| | | @Override |
| | | public void closeAd(ExpressAdContainer ad) { |
| | | } |
| | |
| | | import com.tejia.lijin.app.util.ad.AdUtil; |
| | | import com.tejia.lijin.app.util.ad.ExpressAdContainer; |
| | | import com.tejia.lijin.app.util.ad.ExpressAdManager; |
| | | import com.tejia.lijin.app.util.ui.dialog.DialogUtil; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | } |
| | | }); |
| | | |
| | | mAquery.id(R.id.iv_close).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | DialogUtil.dismiss(dialog); |
| | | } |
| | | }); |
| | | |
| | | |
| | | dialog.addContentView(layout, new FrameLayout.LayoutParams( |
| | | FrameLayout.LayoutParams.MATCH_PARENT, FrameLayout.LayoutParams.WRAP_CONTENT)); |
| | |
| | | @Override |
| | | public void success(ArrayList<Uri> uriList, List<File> fileList) { |
| | | String rootPath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File rootFile = new File(rootPath); |
| | | if (!rootFile.exists()) { |
| | | rootFile.mkdirs(); |
| | |
| | | |
| | | |
| | | private void init() { |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | mCategory = (TrendsCategory) getArguments().getSerializable("category"); |
| | | cId = getArguments().getString("cid", "0"); |
| | | cate = getArguments().getString("cate"); |
| | |
| | | if (list.length() > 0) { |
| | | //保存图片 |
| | | String rootPath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File rootFile = new File(rootPath); |
| | | if (!rootFile.exists()) { |
| | | rootFile.mkdirs(); |
| | |
| | | } |
| | | |
| | | private void init() { |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | ((FrameLayout) mAquery.id(R.id.fl_search).getView()).setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | // mAquery.id(R.id.tv_no_data_hint).text("哎呀,最近没有什么活动哦~"); |
| | | // mAquery.id(R.id.iv_no_data).getImageView().setImageDrawable(null); |
| | | // mAquery.id(R.id.iv_no_data).background(R.drawable.iv_no_doings); |
| | |
| | | import com.huawei.android.hms.agent.HMSAgent; |
| | | import com.huawei.android.hms.agent.push.handler.GetTokenHandler; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | | import com.tejia.lijin.app.ui.dialog.GoodsDetailJumpLoaingDialog; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.ui.trends.SendCircleFragmet; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, |
| | | result); |
| | | findViewById(R.id.v_status_bar).setLayoutParams(params); |
| | | findViewById(R.id.v_status_bar).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | findViewById(R.id.v_status_bar).setBackground(HomeUIUtil.getHomeTopBg(getApplicationContext())); |
| | | } else { |
| | | findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | |
| | | listener(contentView); |
| | | app = new UpdateApp(getActivity(), getResources().getString(R.string.update_key)); |
| | | mPermissionsChecker = new PermissionHelper(getActivity(), this); |
| | | startActivity(new Intent(getContext(),ShareBrowserActivity.class).putExtra("url","http://vip.tejia.yeshitv.com/index.html")); |
| | | } |
| | | |
| | | private void init(View contentView) { |
| | |
| | | ll_top = contentView.findViewById(R.id.ll_top); |
| | | view_mine_end_bg = contentView.findViewById(R.id.view_mine_end_bg); |
| | | |
| | | ll_top.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | view_mine_end_bg.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | ll_top.setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | view_mine_end_bg.setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | |
| | | |
| | | tv_user_numlayout = contentView.findViewById(R.id.tv_user_numlayout); |
| | |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.updateApp.UpdateApp; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.tejia.lijin.app.util.ToolUtil; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.CategoryCustomEvent; |
| | |
| | | contentView.findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | contentView.findViewById(R.id.tv_course).setOnClickListener(this); |
| | | recommend_top_img = contentView.findViewById(R.id.recommend_top_img);//热门功能 |
| | | fl_search_content = contentView.findViewById(R.id.fl_search_content); |
| | | fl_search_content.setOnClickListener(this); |
| | |
| | | }, false);//强制检测更新-否. |
| | | |
| | | //设置背景色 |
| | | contentView.findViewById(R.id.apl_search).setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | magic_indicator.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | contentView.findViewById(R.id.apl_search).setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | magic_indicator.setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | break; |
| | | case R.id.tv_course: |
| | | //教程 |
| | | startActivity(new Intent(getContext(), ShareBrowserActivity.class).putExtra("url", SystemParamsUtil.getNewerCourse(getContext()))); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | |
| | | private TextView tv_left; |
| | | private TextView tv_middle; |
| | | private View bottom; |
| | | private ImageView iv_loading,iv_no_data; |
| | | private TextView tv_loading,tv_no_data_hint; |
| | | private LinearLayout ll_delete, ll_go_scan; |
| | | private ImageView iv_loading; |
| | | private TextView tv_loading; |
| | | private LinearLayout ll_delete, ll_no_data; |
| | | private TextView tv_delete; |
| | | public CheckBox cb_delete_all; |
| | | // private TextView tv_delete_all; |
| | |
| | | tv_delete = findViewById(R.id.tv_delete); |
| | | cb_delete_all = findViewById(R.id.cb_delete_all); |
| | | ll_delete = findViewById(R.id.ll_delete); |
| | | ll_go_scan = findViewById(R.id.ll_go_scan); |
| | | ll_no_data = findViewById(R.id.ll_no_data); |
| | | iv_slid_top = findViewById(R.id.iv_slid_top); |
| | | tv_no_data_hint = findViewById(R.id.tv_no_data_hint); |
| | | iv_no_data = findViewById(R.id.iv_no_data); |
| | | |
| | | |
| | | iv_slid_top.setOnClickListener(this); |
| | |
| | | tv_top_bar_right.setChecked(false); |
| | | tv_delete.setOnClickListener(this); |
| | | // tv_delete_all.setOnClickListener(this); |
| | | findViewById(R.id.tv_go_scan).setOnClickListener(this); |
| | | ll_content = findViewById(R.id.ll_content); |
| | | ll_no_net = findViewById(R.id.ll_no_net); |
| | | ll_go_scan = findViewById(R.id.ll_go_scan); |
| | | ll_request_failture = findViewById(R.id.ll_request_failture); |
| | | findViewById(R.id.tv_net_setting).setOnClickListener(this); |
| | | findViewById(R.id.tv_refresh).setOnClickListener(this); |
| | |
| | | private void requestState(int state) { |
| | | ll_content.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | tv_top_bar_right.setVisibility(state == 0 ? View.VISIBLE : View.INVISIBLE); |
| | | ll_go_scan.setVisibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | ll_no_data.setVisibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | ll_request_failture.setVisibility(state == 2 ? View.VISIBLE : View.GONE); |
| | | ll_no_net.setVisibility(state == 3 ? View.VISIBLE : View.GONE); |
| | | } |
| | |
| | | if (id == 1) {//淘宝 |
| | | uir = R.drawable.ic_order_appeal_buttom; |
| | | iv_order_coursetxt.setText("手机淘宝中复制订单号教程"); |
| | | et_orderId.setHint("请输入或粘贴淘宝订单号"); |
| | | et_orderId.setHint("请输入或粘贴订单号"); |
| | | TYPE = "orderFind";//默认淘宝 |
| | | } else if (id == 2) {//京东 |
| | | uir = R.drawable.ic_order_appeal_buttomjd; |
| | |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.KeFuUtil; |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.ui.dialog.DialogUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.UserCustomEvent; |
| | |
| | | } |
| | | |
| | | private synchronized void openOneKeyLogin(final boolean notify) { |
| | | ShoppingApi.allowOneKeyLogin(this, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | | DialogUtil.show(loadingDialog); |
| | | } |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | } else { |
| | | if (notify) { |
| | | Toast.makeText(LoginSelectActivity.this, jsonObject.optString("msg"), Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //TODO 一键登录权限请求 |
| | | |
| | | // ShoppingApi.allowOneKeyLogin(this, UserUtil.getLoginUid(this), new BasicTextHttpResponseHandler() { |
| | | // |
| | | // @Override |
| | | // public void onStart() { |
| | | // DialogUtil.show(loadingDialog); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | // if (jsonObject.optBoolean("IsPost")) { |
| | | // aliyunSmsOneKeyLoginManager.checkEnv(); |
| | | // } else { |
| | | // if (notify) { |
| | | // Toast.makeText(PhoneLoginActivity.this, jsonObject.optString("Error"), Toast.LENGTH_SHORT).show(); |
| | | // } |
| | | // } |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onFinish() { |
| | | // DialogUtil.dismiss(loadingDialog); |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | DialogUtil.dismiss(loadingDialog); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void initData(Intent intent) { |
| | |
| | | mAquery.id(R.id.tv_login_wx).clicked(this); |
| | | mAquery.id(R.id.tv_login_qq).clicked(this); |
| | | mAquery.id(R.id.tv_agree).clicked(this); |
| | | mAquery.id(R.id.tv_help).clicked(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | startActivity(new Intent(getApplicationContext(), ShareBrowserActivity.class).putExtra("url", SystemParamsUtil.getHelpUrl(getApplicationContext()))); |
| | | } |
| | | }); |
| | | |
| | | |
| | | et_mobile_num.addTextChangedListener(new TextWatcher() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.tejia.lijin.app.util.ui.dialog.DialogUtil; |
| | | import com.tejia.lijin.app.util.user.AccountBindManager; |
| | | import com.tejia.lijin.app.util.user.LoginManager; |
| | |
| | | finish(); |
| | | break; |
| | | case R.id.tv_help: |
| | | KeFuUtil.jumpKeFu(LoginVerifyCodeActivity.this, "验证码输入"); |
| | | startActivity(new Intent(getApplicationContext(), ShareBrowserActivity.class).putExtra("url", SystemParamsUtil.getHelpUrl(getApplicationContext()))); |
| | | break; |
| | | case R.id.tv_not_received_sms://信息没有收到 |
| | | AddZFBInfoDialog.Builder builder = new AddZFBInfoDialog.Builder(LoginVerifyCodeActivity.this); |
| | |
| | | tv_top_bar_right.setChecked(false); |
| | | tv_delete.setOnClickListener(this); |
| | | // tv_delete_all.setOnClickListener(this); |
| | | findViewById(R.id.tv_go_scan).setOnClickListener(this); |
| | | ll_content = findViewById(R.id.ll_content); |
| | | ll_no_net = findViewById(R.id.ll_no_net); |
| | | ll_request_failture = findViewById(R.id.ll_request_failture); |
| | |
| | | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) { |
| | | //如果是7.0的相册 |
| | | //设置裁剪的图片地址Uri |
| | | uriClipUri = Uri.parse("file://" + "/" + Environment.getExternalStorageDirectory().getPath() + "/blks/cache/" + "wxercode_clip_" + System.currentTimeMillis() + ".jpg"); |
| | | uriClipUri = Uri.parse("file://" + "/" + Environment.getExternalStorageDirectory().getPath() + "/tejia/cache/" + "wxercode_clip_" + System.currentTimeMillis() + ".jpg"); |
| | | } else { |
| | | uriClipUri = Uri.parse("file://" + "/" + Environment.getExternalStorageDirectory().getPath() + "/blks/cache/" + "wxercode_clip_" + System.currentTimeMillis() + ".jpg"); |
| | | uriClipUri = Uri.parse("file://" + "/" + Environment.getExternalStorageDirectory().getPath() + "/tejia/cache/" + "wxercode_clip_" + System.currentTimeMillis() + ".jpg"); |
| | | } |
| | | //如果文件存在先删除 |
| | | File f = new File(uriClipUri.getPath()); |
| | |
| | | public class OrderActivity33 extends BaseActivity implements OnClickListener, OrderAdapter33.Bombhelp { |
| | | |
| | | private TextView tv_all_order, tv_haved_received_money_order, tv_no_received_money_order, |
| | | tv_invalid_order, tv_go_scan, tv_order_search; |
| | | tv_invalid_order, tv_order_search; |
| | | private View bottom, v_cover; |
| | | private FrameLayout fl_all_order, fl_haved_received_money_order, fl_no_received_money_order, |
| | | fl_invalid_order, fl_order_filter, fl_rebate_content; |
| | |
| | | private TextView tv_loading; |
| | | |
| | | private ConnectivityChangeHelper mChangeHelper; |
| | | private LinearLayout ll_no_net, ll_go_scan, ll_request_failture, ll_slid_to_top; |
| | | private LinearLayout ll_no_net, ll_no_data,ll_request_failture, ll_slid_to_top; |
| | | |
| | | private TextView tv_start_time, tv_end_time, tv_recent_three_day, tv_recent_a_week, |
| | | tv_recent_half_month, tv_recent_a_month, tv_recent_three_month, tv_recent_half_year, |
| | |
| | | tv_order_search = findViewById(R.id.tv_order_search); |
| | | |
| | | ll_no_net = findViewById(R.id.ll_no_net); |
| | | ll_go_scan = findViewById(R.id.ll_go_scan); |
| | | tv_go_scan = findViewById(R.id.tv_go_scan); |
| | | ll_no_data = findViewById(R.id.ll_no_data); |
| | | ll_request_failture = findViewById(R.id.ll_request_failture); |
| | | |
| | | rv_rebate_order.setLayoutManager(new LinearLayoutManager(OrderActivity33.this)); |
| | |
| | | bottom.setVisibility(View.GONE); |
| | | |
| | | srl_rebate_order.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | | findViewById(R.id.fl_order_category).setVisibility(View.VISIBLE); |
| | | findViewById(R.id.fl_order_category).setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | |
| | | findViewById(R.id.tv_refresh).setOnClickListener(this); |
| | | findViewById(R.id.tv_order_back).setOnClickListener(this); |
| | | tv_order_search.setOnClickListener(this); |
| | | tv_go_scan.setOnClickListener(this); |
| | | fl_all_order.setOnClickListener(this); |
| | | fl_invalid_order.setOnClickListener(this); |
| | | fl_order_filter.setOnClickListener(this); |
| | |
| | | iv_three_red_point.setOnClickListener(this); |
| | | v_cover.setOnClickListener(this); |
| | | |
| | | tv_go_scan.setOnClickListener(this); |
| | | mChangeHelper = new ConnectivityChangeHelper(this, |
| | | new ConnectivityChangeHelper.OnConnectivityChangeListener() { |
| | | |
| | |
| | | private void requestState(int state) { |
| | | // fl_rebate_content.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | rv_rebate_order.setVisibility(state == 0 ? View.VISIBLE : View.GONE); |
| | | ll_go_scan.setVisibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | ll_no_data.setVisibility(state == 1 ? View.VISIBLE : View.GONE); |
| | | ll_request_failture.setVisibility(state == 2 ? View.VISIBLE : View.GONE); |
| | | ll_no_net.setVisibility(state == 3 ? View.VISIBLE : View.GONE); |
| | | } |
| | |
| | | import android.graphics.Paint; |
| | | import android.graphics.Typeface; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | |
| | | import androidx.annotation.NonNull; |
| | | import androidx.recyclerview.widget.GridLayoutManager; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.text.Spannable; |
| | | import android.text.SpannableString; |
| | | import android.text.Spanned; |
| | | import android.text.TextUtils; |
| | | import android.text.style.RelativeSizeSpan; |
| | | import android.view.Gravity; |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.view.WindowManager; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.GridView; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.PopupWindow; |
| | |
| | | info = mList.get(position); |
| | | } |
| | | |
| | | if (StringUtils.isEmpty(info.getHongBaoTypePic())) { |
| | | viewHolder.ll_no_data.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_place_order_time.setVisibility(View.GONE); |
| | | viewHolder.ll_content.setVisibility(View.GONE); |
| | | viewHolder.tv_no_data_hint.setGravity(Gravity.CENTER_HORIZONTAL); |
| | | info.setRewardDetail(null); |
| | | |
| | | } else { |
| | | |
| | | viewHolder.ll_no_data.setVisibility(View.GONE); |
| | | viewHolder.tv_place_order_time.setVisibility(View.VISIBLE); |
| | | viewHolder.ll_content.setVisibility(View.VISIBLE); |
| | |
| | | if (viewHolder.ll_order_img.getChildCount() > 0) |
| | | viewHolder.ll_order_img.removeAllViews(); |
| | | |
| | | if (info.getSignList().size() > 0) { |
| | | for (int i = 0; i < info.getSignList().size(); i++) { |
| | | ImageView iv_order_type = new ImageView(mContext); |
| | | LinearLayout.LayoutParams params1 = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.MATCH_PARENT); |
| | | params1.gravity = Gravity.CENTER; |
| | | params1.rightMargin = 8; |
| | | // params1.setMargins(DimenUtils.dip2px(mContext, 8), 0, 0, 0); |
| | | iv_order_type.setLayoutParams(params1); |
| | | Glide.with(mContext).load(info.getSignList().get(i)).into(iv_order_type); |
| | | viewHolder.ll_order_img.addView(iv_order_type); |
| | | TextView tv_order_type = new TextView(mContext); |
| | | tv_order_type.setTextColor(Color.WHITE); |
| | | tv_order_type.setTextSize(12); |
| | | tv_order_type.setPadding(DimenUtils.dip2px(mContext, 7), 0, DimenUtils.dip2px(mContext, 7), DimenUtils.dip2px(mContext, 1)); |
| | | tv_order_type.setGravity(Gravity.CENTER); |
| | | switch (info.getOrderOrigin()) { |
| | | //返利订单 |
| | | case 1: |
| | | tv_order_type.setBackground(GradientDrawableUtil.getOrderType(mContext, "#55BE00")); |
| | | tv_order_type.setText("返利订单"); |
| | | break; |
| | | //分享订单 |
| | | case 2: |
| | | tv_order_type.setBackground(GradientDrawableUtil.getOrderType(mContext, "#3BAEFF")); |
| | | tv_order_type.setText("分享订单"); |
| | | break; |
| | | //邀请订单 |
| | | case 3: |
| | | tv_order_type.setBackground(GradientDrawableUtil.getOrderType(mContext, "#BC34FB")); |
| | | tv_order_type.setText("邀请订单"); |
| | | break; |
| | | } |
| | | } |
| | | viewHolder.ll_order_img.addView(tv_order_type); |
| | | |
| | | viewHolder.tv_order_state.setText(info.getOrderState().getContent()); |
| | | viewHolder.tv_order_state.setTextColor(Color.parseColor(info.getOrderState().getFontColor())); |
| | | viewHolder.tv_order_state.setVisibility(View.GONE); |
| | | if (viewHolder.ll_goods_info.getChildCount() > 0) |
| | | viewHolder.ll_goods_info.removeAllViews(); |
| | | for (int i = 0; i < info.getListOrderGoods().size(); i++) { |
| | |
| | | TextView tv_goods_title = view.findViewById(R.id.tv_goods_title); |
| | | TextView tv_goods_consume = view.findViewById(R.id.tv_goods_consume); |
| | | TextView tv_goods_num = view.findViewById(R.id.tv_goods_num); |
| | | TextView tv_order_time = view.findViewById(R.id.tv_order_time); |
| | | TextView tv_pay_state = view.findViewById(R.id.tv_pay_state); |
| | | ImageView iv_goods_img_cover = view.findViewById(R.id.iv_goods_img_cover); |
| | | final OrderGoods oInfo = info.getListOrderGoods().get(i); |
| | | tv_goods_consume.setText(oInfo.getActualPay()); |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | tv_order_time.setText("下单时间:" + oInfo.getPlaceOrderTime()); |
| | | tv_pay_state.setText(oInfo.getPayState()); |
| | | |
| | | LinearLayout.LayoutParams params = new LinearLayout.LayoutParams( |
| | | ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT); |
| | | int topMargin = DimenUtils.dip2px(mContext, 5); |
| | |
| | | view.setLayoutParams(params); |
| | | viewHolder.ll_goods_info.addView(view); |
| | | } |
| | | |
| | | String orderNo = info.getOrderNo().replaceAll(" ", ""); |
| | | viewHolder.tv_copy.setVisibility(orderNo.endsWith("*") ? View.GONE : View.VISIBLE); |
| | | viewHolder.tv_order_num.setText("订单号:" + info.getOrderNo()); |
| | | viewHolder.tv_order_time.setText(info.getDownTime()); |
| | | viewHolder.tv_order_time.setVisibility(View.GONE); |
| | | if (StringUtils.isEmpty(info.getReceiveTime())) { |
| | | viewHolder.tv_take_over_time.setVisibility(View.GONE); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | |
| | | viewHolder.tv_estimate_reward.setText(info.getHongBaoInfo().getContent());//奖金 |
| | | viewHolder.tv_estimate_reward.setTextColor(Color.parseColor(info.getHongBaoInfo().getFontColor())); |
| | | viewHolder.tv_reward_state.setText(info.getAccountState().getContent());//到账状态 |
| | | viewHolder.tv_reward_state.setTextColor(Color.parseColor(info.getAccountState().getFontColor())); |
| | | if (!StringUtils.isEmpty(info.getRebateLink())) {//能进入订单详情 |
| | | viewHolder.tv_estimate_in.setVisibility(View.VISIBLE); |
| | | viewHolder.tv_estimate_in.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View view) { |
| | | if (!StringUtils.isEmpty(info.getRebateLink())) |
| | | mContext.startActivity(new Intent(mContext, ShareBrowserActivity.class).putExtra("url", info.getRebateLink())); |
| | | } |
| | | }); |
| | | int startIndex = info.getHongBaoInfo().getContent().indexOf("¥"); |
| | | Spannable span = new SpannableString(info.getHongBaoInfo().getContent()); |
| | | span.setSpan(new RelativeSizeSpan(1.667f), startIndex + 1, info.getHongBaoInfo().getContent().length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | viewHolder.tv_estimate_reward.setText(span);//奖金 |
| | | // viewHolder.tv_estimate_reward.setTextColor(Color.parseColor(info.getHongBaoInfo().getFontColor())); |
| | | |
| | | viewHolder.tv_estimate_reward.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View view) { |
| | | if (!StringUtils.isEmpty(info.getRebateLink())) |
| | | mContext.startActivity(new Intent(mContext, ShareBrowserActivity.class).putExtra("url", info.getRebateLink())); |
| | | } |
| | | }); |
| | | } else {//不能进入订单详情 |
| | | |
| | | viewHolder.tv_reward_state.setText(info.getAccountState().getContent());//到账状态 |
| | | // viewHolder.tv_reward_state.setTextColor(Color.parseColor(info.getAccountState().getFontColor())); |
| | | // if (!StringUtils.isEmpty(info.getRebateLink())) {//能进入订单详情 |
| | | // viewHolder.tv_estimate_in.setVisibility(View.VISIBLE); |
| | | // viewHolder.tv_estimate_in.setOnClickListener(new View.OnClickListener() { |
| | | // @Override |
| | | // public void onClick(View view) { |
| | | // if (!StringUtils.isEmpty(info.getRebateLink())) |
| | | // mContext.startActivity(new Intent(mContext, ShareBrowserActivity.class).putExtra("url", info.getRebateLink())); |
| | | // } |
| | | // }); |
| | | // |
| | | // viewHolder.tv_estimate_reward.setOnClickListener(new View.OnClickListener() { |
| | | // @Override |
| | | // public void onClick(View view) { |
| | | // if (!StringUtils.isEmpty(info.getRebateLink())) |
| | | // mContext.startActivity(new Intent(mContext, ShareBrowserActivity.class).putExtra("url", info.getRebateLink())); |
| | | // } |
| | | // }); |
| | | // } else {//不能进入订单详情 |
| | | // viewHolder.tv_estimate_in.setVisibility(View.GONE); |
| | | // } |
| | | |
| | | viewHolder.tv_estimate_in.setVisibility(View.GONE); |
| | | } |
| | | viewHolder.tv_copy.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | Toast.LENGTH_SHORT).show(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | |
| | | + "/rebateshare_multi_temp"; |
| | | |
| | | private String saveFilePath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | |
| | | private View bgView; |
| | | |
| | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.view.ViewGroup; |
| | | import android.widget.CheckBox; |
| | | import android.widget.FrameLayout; |
| | | import android.widget.HorizontalScrollView; |
| | | import android.widget.ImageView; |
| | | import android.widget.LinearLayout; |
| | | import android.widget.TextView; |
| | |
| | | info = mList.get(position); |
| | | } |
| | | ViewHolder viewHolder = (ViewHolder) holder; |
| | | viewHolder.ll_recommend_gv.setVisibility(View.GONE); |
| | | viewHolder.ll_item1.setVisibility(View.VISIBLE); |
| | | |
| | | if (!isFirst) { |
| | | if ((haveHeaderView() && position % 2 == 1) || |
| | | (!haveHeaderView() && position % 2 == 0)) { |
| | | // Log.e("mResult", "position:" + position); |
| | | viewHolder.v_left.setVisibility(View.VISIBLE); |
| | | } else { |
| | | viewHolder.v_left.setVisibility(View.GONE); |
| | | } |
| | | } else { |
| | | viewHolder.v_left.setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | |
| | | /**********************************更具需求不在是搜索结果页才显示商铺名字*************/ |
| | |
| | | placeholder(R.drawable.ic_goods_default).error(R.drawable.ic_goods_default). |
| | | transform(new GlideRoundTransform(mContext, 5)) |
| | | .diskCacheStrategy(DiskCacheStrategy.ALL) |
| | | .into(viewHolder.iv_pic1); |
| | | .into(viewHolder.iv_pic); |
| | | |
| | | viewHolder.ll_item1.setOnClickListener(new View.OnClickListener() { |
| | | viewHolder.itemView.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | | if (!StringUtils.isEmpty(type)) |
| | |
| | | |
| | | |
| | | class ViewHolder extends RecyclerView.ViewHolder { |
| | | TextView tv_name; |
| | | TextView tv_price; |
| | | TextView tv_coupon_price; |
| | | LinearLayout ll_coupon_bg; |
| | | TextView tv_shop_name; |
| | | LinearLayout ll_coupon; |
| | | LinearLayout ll_shop; |
| | | TextView tv_normal_price; |
| | | LinearLayout ll_recommend_gv; |
| | | TextView tv_favourable;//红包,券后价 |
| | | TextView tv_sale_num; |
| | | View itemView; |
| | | ImageView iv_pic; |
| | | ImageView iv_pic1; |
| | | ImageView iv_close; |
| | | View v_left; |
| | | TextView tv_shop_name1; |
| | | LinearLayout ll_shop1; |
| | | LinearLayout ll_item1; |
| | | |
| | | GoodsRightViewHolder goodsDetail; |
| | | |
| | | public ViewHolder(View convertView) { |
| | | super(convertView); |
| | | /* |
| | | 竖屏 |
| | | */ |
| | | itemView = convertView; |
| | | goodsDetail = new GoodsRightViewHolder(convertView); |
| | | iv_pic = convertView |
| | | .findViewById(R.id.iv_movie_cover); |
| | | iv_pic1 = convertView |
| | | .findViewById(R.id.iv_movie_cover1); |
| | | tv_normal_price = convertView |
| | | .findViewById(R.id.tv_normal_price); |
| | | tv_shop_name = convertView |
| | | .findViewById(R.id.tv_shop_name2); |
| | | tv_name = convertView |
| | | .findViewById(R.id.tv_movie_title); |
| | | tv_price = convertView.findViewById(R.id.tv_price); |
| | | ll_coupon_bg = convertView.findViewById(R.id.ll_coupon_bg); |
| | | tv_coupon_price = convertView.findViewById(R.id.tv_coupon_price); |
| | | ll_coupon = convertView.findViewById(R.id.ll_coupon); |
| | | ll_recommend_gv = convertView.findViewById(R.id.ll_recommend_gv); |
| | | tv_favourable = convertView.findViewById(R.id.tv_favourable); |
| | | tv_sale_num = convertView.findViewById(R.id.tv_sale_num); |
| | | ll_shop = convertView.findViewById(R.id.ll_shop2); |
| | | |
| | | /* |
| | | 横屏 |
| | | */ |
| | | v_left = convertView.findViewById(R.id.v_left); |
| | | ll_item1 = convertView.findViewById(R.id.ll_horizontal_item); |
| | | tv_shop_name1 = convertView |
| | | .findViewById(R.id.tv_shop_name1); |
| | | ll_shop1 = convertView.findViewById(R.id.ll_shop1); |
| | | iv_close = convertView.findViewById(R.id.iv_close); |
| | | .findViewById(R.id.iv_pic); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, final int position) { |
| | | final SpecialOffer2 info = mList.get(position); |
| | | info.setBgColor("#333333"); |
| | | if (StringUtils.isNullOrEmpty(info.getBgColor())) |
| | | info.setBgColor("#FFFFFF"); |
| | | Holder holder = (Holder) viewHolder; |
| | | holder.tv_name.setText(info.getName() + ""); |
| | | Glide.with(mContext).load("https://aecpm.alicdn.com/simba/img/TB1X6uHLVXXXXcCXVXXSutbFXXX.jpg").transform(new GlideRoundTransform(mContext, 18)).into(holder.iv_icon); |
| | | Glide.with(mContext).load(info.getPicture()).transform(new GlideRoundTransform(mContext, 18)).into(holder.iv_icon); |
| | | if (!StringUtils.isEmpty(info.getIcon())) { |
| | | holder.iv_tag.setVisibility(View.VISIBLE); |
| | | Glide.with(mContext).load(info.getIcon()).into(holder.iv_tag); |
| | |
| | | iv_slid_top = contentView.findViewById(R.id.iv_slid_top); |
| | | final View top = LayoutInflater.from(rv_recommend_goods.getContext()) |
| | | .inflate(R.layout.item_recommend_top, null); |
| | | top.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | top.setBackground(HomeUIUtil.getHomeTopBg(getContext())); |
| | | ll_fragment_activity = top.findViewById(R.id.ll_fragment_activity); |
| | | ll_special_offer = top.findViewById(R.id.ll_special_offer); |
| | | ll_limit_time_buy = top.findViewById(R.id.ll_limit_time_buy); |
| | |
| | | ViewHolder viewHolder = (ViewHolder) holder1; |
| | | if (showShadow && "jingxuan".equalsIgnoreCase(mFrom)) { |
| | | viewHolder.fl_shadow.setVisibility(View.VISIBLE); |
| | | viewHolder.view_shadow.setBackground(HomeUIUtil.getHomeTopBg("#FF227B", "#FF2A3E")); |
| | | viewHolder.view_shadow.setBackground(HomeUIUtil.getHomeTopBg(mContext)); |
| | | } else { |
| | | viewHolder.fl_shadow.setVisibility(View.GONE); |
| | | } |
| | |
| | | } |
| | | |
| | | private String saveFilePath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | |
| | | private Handler shareHandler = new Handler() { |
| | | |
| | |
| | | if (list.length() > 0) { |
| | | //保存图片 |
| | | String rootPath = android.os.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File rootFile = new File(rootPath); |
| | | if (!rootFile.exists()) { |
| | | rootFile.mkdirs(); |
| | |
| | | editor.putString("invite_code_apply", obj.optString("value")); |
| | | } else if (obj.optString("key").equalsIgnoreCase("onlining")) {//企业微信客服链接 |
| | | editor.putString("onlining", obj.optString("value")); |
| | | } else if (obj.optString("key").equalsIgnoreCase("home_page_bg_colors")) {//首页背景颜色 |
| | | editor.putString("home_page_bg_colors", obj.optString("value")); |
| | | } |
| | | } |
| | | editor.commit(); |
| | |
| | | return sp.getString(key, ""); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取首页背景颜色 |
| | | * |
| | | * @param context |
| | | * @return |
| | | */ |
| | | public static String getHomePageBgColors(Context context) { |
| | | return getParam(context, "home_page_bg_colors"); |
| | | } |
| | | |
| | | /** |
| | | * 获取帮助中心链接 |
| | | * |
| | | * @param context |
| | | * @return |
| | | */ |
| | | public static String getHelpUrl(Context context) { |
| | | return getParam(context, "help"); |
| | | } |
| | | |
| | | /** |
| | | * 获取新手教程 |
| | | * |
| | | * @param context |
| | | * @return |
| | | */ |
| | | public static String getNewerCourse(Context context) { |
| | | return getParam(context, "web_newer"); |
| | | } |
| | | |
| | | } |
| | |
| | | return drawable; |
| | | } |
| | | |
| | | |
| | | public static GradientDrawable getOrderType(Context context, String color) { |
| | | GradientDrawable drawable = new GradientDrawable(); |
| | | drawable.setCornerRadius(DimenUtils.dip2px(context,3)); |
| | | drawable.setColor(Color.parseColor(color)); |
| | | return drawable; |
| | | } |
| | | |
| | | } |
| | |
| | | import android.graphics.Color; |
| | | import android.graphics.drawable.GradientDrawable; |
| | | |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | |
| | | public class HomeUIUtil { |
| | | |
| | | |
| | | public static GradientDrawable getHomeTopBg(Context context) { |
| | | String color = SystemParamsUtil.getHomePageBgColors(context); |
| | | if (StringUtils.isNullOrEmpty(color)) { |
| | | color = "#FF227B,#FF2A3E"; |
| | | } |
| | | return getHomeTopBg(color.split(",")[0], color.split(",")[1]); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 首页顶部背景 |
| | | * |
| | |
| | | UserCustomEvent.userHelp(context); |
| | | Intent intent1 = new Intent(context, ShareBrowserActivity.class); |
| | | intent1.putExtra("title", "帮助中心"); |
| | | intent1.putExtra("url", SystemParamsUtil.getParam(context, "help")); |
| | | intent1.putExtra("url", SystemParamsUtil.getHelpUrl(context)); |
| | | context.startActivity(intent1); |
| | | } |
| | | |
| | |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | |
| | | } |
| | | |
| | | @JavascriptInterface |
| | | public String getAppName() { |
| | | return mContext.getResources().getString(R.string.app_name); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void toast(String str) { |
| | | Toast.makeText(mContext, str, Toast.LENGTH_LONG).show(); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.BuXinConstant; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.ui.recommend.GoodsDetailBrowerActivity; |
| | | import com.tejia.lijin.app.ui.recommend.SearchActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.SystemParamsUtil; |
| | | import com.tejia.lijin.app.util.WXUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public Object getVersion() { |
| | | public Object getVersion(Object obj) { |
| | | return PackageUtils2.getVersionCode(mContext) + ""; |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public Object getVersionName(Object obj) { |
| | | return PackageUtils2.getVersionName(mContext) + ""; |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public Object getAppName(Object obj) { |
| | | return mContext.getResources().getString(R.string.app_name); |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void toast(Object str) { |
| | |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void login() { |
| | | public void login(Object obj) { |
| | | UserUtil.jumpLogin(mContext); |
| | | } |
| | | |
| | |
| | | * 清空粘贴板 |
| | | */ |
| | | @JavascriptInterface |
| | | public void clearClipboard() { |
| | | public void clearClipboard(Object obj) { |
| | | ClipboardUtil.emptyClipboard(mContext); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取客户端参数 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | @JavascriptInterface |
| | | public String getClientParams(String key) { |
| | | return SystemParamsUtil.getParam(mContext, key); |
| | | } |
| | | } |
| | |
| | | } else {//存储权限已开 |
| | | String md5 = MD5Utils.getMD532(url); |
| | | String path = com.wpc.library.util.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File file = new File(path + "/" + md5 + ".jpg"); |
| | | if (!file.exists()) { |
| | | try { |
| | |
| | | + "/rebateshare"; |
| | | } else if (type == 2) { |
| | | path = com.wpc.library.util.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | } |
| | | final File storageDir = new File(path); |
| | | List<String> filePathList = new ArrayList<>(); |
| | |
| | | import com.tejia.lijin.app.entity.share.ShareImageEntity; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.updateApp.UpdateApp; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.PermissionHelper; |
| | | import com.tejia.lijin.app.util.ToastUtil; |
| | |
| | | } else {//存储权限已开 |
| | | String md5 = MD5Utils.getMD532(url.toString()); |
| | | String path = com.wpc.library.util.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | File file = new File(path + "/" + md5 + ".jpg"); |
| | | if (!file.exists()) { |
| | | try { |
| | |
| | | |
| | | } else { |
| | | Toast.makeText(mContext, "图片已经保存!", Toast.LENGTH_LONG).show(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 异步保存图片 |
| | | * |
| | | * @param args |
| | | * @param handler |
| | | * @throws JSONException |
| | | */ |
| | | public void savePictureAsync(Object args, final CompletionHandler handler) throws JSONException { |
| | | JSONObject jsonObject = new JSONObject(args.toString()); |
| | | String url = jsonObject.optString("url"); |
| | | if (mPermissionsChecker == null) |
| | | mPermissionsChecker = new PermissionHelper(mContext, this); |
| | | if (mPermissionsChecker.lacksPermissions(getPermissions())) { //存储权限未开启 |
| | | mPermissionsChecker.showNormalDialog(); |
| | | } else {//存储权限已开 |
| | | String md5 = MD5Utils.getMD532(url); |
| | | String path = com.wpc.library.util.Environment.getExternalStorageDirectory() |
| | | + "/tejiaapp"; |
| | | File file = new File(path + "/" + md5 + ".jpg"); |
| | | if (!file.exists()) { |
| | | try { |
| | | File resultFile = Tools.saveImageFromPathToSdCard(mContext, url, path, md5 + ".jpg"); |
| | | if (resultFile != null) { |
| | | JSONObject result = new JSONObject(); |
| | | result.put("code", 0); |
| | | result.put("msg", "保存成功"); |
| | | handler.complete(result); |
| | | } |
| | | } catch (Exception e) { |
| | | JSONObject result = new JSONObject(); |
| | | result.put("code", 1); |
| | | result.put("msg", "图片保存失败"); |
| | | handler.complete(result); |
| | | if (file.exists()) |
| | | file.delete(); |
| | | } |
| | | |
| | | } else { |
| | | JSONObject result = new JSONObject(); |
| | | result.put("code", 2); |
| | | result.put("msg", "图片已经保存"); |
| | | handler.complete(result); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | @JavascriptInterface |
| | | public void checkUpdate(Object obj) { |
| | | UpdateApp app = new UpdateApp(mContext,mContext.getResources().getString(R.string.update_key)); |
| | | app.getUpdateInfo(new UpdateApp.UpdateJudgeCallback() { |
| | | |
| | | @Override |
| | | public void onSuccess(boolean show) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void closeUpdate(boolean close) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | |
| | | } |
| | | }, true);//强制检测更新 |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | int type; |
| | | String imgurl; |
| | | Handler handler = new Handler() { |
| | |
| | | + "/rebateshare"; |
| | | } else if (type == 2) { |
| | | path = com.wpc.library.util.Environment.getExternalStorageDirectory() |
| | | + "/blksapp"; |
| | | + "/tejiaapp"; |
| | | } |
| | | final File storageDir = new File(path); |
| | | List<String> filePathList = new ArrayList<>(); |
| | |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="rectangle"> |
| | | |
| | | <stroke android:width="2dp" android:color="#FF2C4A" /> |
| | | |
| | | <solid android:color="#ffffffff" /> |
| | | <stroke |
| | | android:width="1.5dp" |
| | | android:color="#ff2c4a" /> |
| | | |
| | | <corners android:radius="30dp" /> |
| | | |
| | | </shape> |
New file |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <shape xmlns:android="http://schemas.android.com/apk/res/android" |
| | | android:shape="rectangle"> |
| | | |
| | | <solid android:color="#ffffffff" /> |
| | | |
| | | <corners android:radius="30dp" /> |
| | | |
| | | </shape> |
| | |
| | | |
| | | <include layout="@layout/item_no_data" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_go_scan" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:orientation="vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@drawable/ic_collect_null" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:textSize="15sp" |
| | | android:textColor="@color/text_black_1" |
| | | android:text="不会吧,没有你喜欢的商品吗~" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_go_scan" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:background="@drawable/shape_go_search" |
| | | android:gravity="center" |
| | | android:paddingLeft="12dp" |
| | | android:paddingTop="5dp" |
| | | android:paddingRight="12dp" |
| | | android:paddingBottom="5dp" |
| | | android:text="去逛逛" |
| | | android:textColor="@color/white" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | |
| | | </FrameLayout> |
| | | </LinearLayout> |
| | |
| | | |
| | | |
| | | <TextView |
| | | android:padding="8dp" |
| | | android:id="@+id/tv_help" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_height="25dp" |
| | | android:layout_gravity="right|center" |
| | | android:layout_marginRight="20dp" |
| | | android:padding="8dp" |
| | | android:text="帮助" |
| | | android:textColor="#333333" |
| | | android:textSize="15sp" /> |
| | |
| | | android:layout_height="wrap_content" |
| | | android:visibility="visible" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_go_scan" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:layout_gravity="center" |
| | | android:gravity="center" |
| | | android:orientation="vertical" |
| | | android:visibility="gone"> |
| | | |
| | | <ImageView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:src="@drawable/ic_order_form_null" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center" |
| | | android:layout_marginTop="20dp" |
| | | android:gravity="center" |
| | | android:text="糟糕,你还没有订单,感觉\n损失了一个亿" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="15sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_go_scan" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="20dp" |
| | | android:background="@drawable/shape_go_search" |
| | | android:gravity="center" |
| | | android:paddingLeft="12dp" |
| | | android:paddingTop="5dp" |
| | | android:paddingRight="12dp" |
| | | android:paddingBottom="5dp" |
| | | android:text="去逛逛" |
| | | android:textColor="@color/white" |
| | | android:visibility="gone" /> |
| | | </LinearLayout> |
| | | <include layout="@layout/item_no_data" /> |
| | | </LinearLayout> |
| | | </androidx.swiperefreshlayout.widget.SwipeRefreshLayout> |
| | | |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="15dp" |
| | | android:src="@drawable/ic_recommend_search" /> |
| | | android:src="@drawable/icon_search_gray" /> |
| | | </FrameLayout> |
| | | |
| | | </LinearLayout> |
| | |
| | | android:gravity="center" |
| | | android:padding="5dp" |
| | | android:text="搜索" |
| | | android:textColor="@color/black" |
| | | android:textColor="@color/search_btn_text_color" |
| | | android:textSize="18sp" /> |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | |
| | | <com.wpc.library.widget.RatioLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | app:ratio="0.5457"> |
| | | app:ratio="0.58"> |
| | | |
| | | <FrameLayout |
| | | android:id="@+id/fl_ad" |
| | |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="center_horizontal" |
| | | android:orientation="vertical"> |
| | | |
| | | <LinearLayout |
| | |
| | | android:textColor="#fff73547" |
| | | android:textSize="16sp" /> |
| | | |
| | | <TextView |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="16dp" |
| | | android:text="1.确认购买后创建2.看广告增加创建次数" |
| | | android:textColor="#ff666666" |
| | | android:textSize="12sp" /> |
| | | |
| | | |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | |
| | | android:id="@+id/tv_create" |
| | | android:layout_width="0dp" |
| | | android:layout_height="36dp" |
| | | android:layout_marginRight="8dp" |
| | | android:layout_weight="1" |
| | | android:gravity="center" |
| | | android:text="仍要创建" |
| | | android:layout_marginRight="8dp" |
| | | android:textColor="#fff53245" |
| | | android:textSize="15sp" /> |
| | | |
| | |
| | | |
| | | </LinearLayout> |
| | | |
| | | <ImageView |
| | | android:id="@+id/iv_close" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="30dp" |
| | | android:src="@drawable/icon_dialog_vip_upgraded_close"></ImageView> |
| | | |
| | | |
| | | </LinearLayout> |
| | |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_marginLeft="10dp" |
| | | android:layout_marginRight="10dp" |
| | | android:background="@drawable/selector_search_bg"> |
| | | android:background="@drawable/shape_search_main"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_search_content" |
| | |
| | | android:layout_height="38dp" |
| | | android:layout_gravity="center_vertical" |
| | | android:layout_weight="1" |
| | | android:background="@drawable/selector_search_bg"> |
| | | android:background="@drawable/shape_search_main"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_search_content" |
| | |
| | | </FrameLayout> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_course" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="16dp" |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="13dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginTop="8dp" |
| | | android:layout_marginRight="13dp" |
| | | android:orientation="horizontal"> |
| | | |
| | |
| | | android:layout_height="wrap_content" |
| | | android:layout_weight="1" |
| | | android:gravity="right|center_vertical" |
| | | android:textColor="@color/gray3" |
| | | android:textColor="@color/text_black_1" |
| | | android:textSize="15sp" /> |
| | | </LinearLayout> |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="13dp" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginTop="9dp" |
| | | android:layout_marginRight="13dp" |
| | | android:background="@color/register_gray2" |
| | | android:orientation="vertical"> |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginLeft="13dp" |
| | | android:layout_marginTop="20dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="13dp" |
| | | android:orientation="horizontal"> |
| | | |
| | |
| | | android:layout_width="match_parent" |
| | | android:layout_height="1px" |
| | | android:layout_marginLeft="13dp" |
| | | android:layout_marginTop="15dp" |
| | | android:layout_marginTop="10dp" |
| | | android:layout_marginRight="13dp" |
| | | android:background="@color/trends_goods_bg" /> |
| | | |
| | |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_state" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="left" |
| | | android:textColor="#FF2C4A" |
| | | android:textSize="16sp" /> |
| | | |
| | | <View |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="1px" |
| | | android:layout_weight="1" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_estimate_reward" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="17sp" /> |
| | | android:textColor="#FF2C4A" |
| | | android:textSize="12sp" /> |
| | | |
| | | |
| | | <ImageView |
| | |
| | | android:background="@drawable/ic_order_in" |
| | | android:padding="1dp" /> |
| | | |
| | | <View |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="1px" |
| | | android:layout_weight="1" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_reward_state" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:gravity="right" |
| | | android:textColor="@color/main_text_color" |
| | | android:textSize="17sp" |
| | | android:textStyle="bold" /> |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_goods_consume" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_goods_num" |
| | | <LinearLayout |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="5dp" |
| | | android:gravity="center_vertical" |
| | | android:orientation="horizontal" |
| | | android:paddingRight="7dp"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_goods_consume" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_goods_num" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | <LinearLayout |
| | | android:paddingRight="7dp" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="wrap_content" |
| | | android:layout_marginTop="8dp" |
| | | android:orientation="horizontal"> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_order_time" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | <View |
| | | android:layout_width="0dp" |
| | | android:layout_height="1dp" |
| | | android:layout_weight="1"></View> |
| | | |
| | | <TextView |
| | | android:id="@+id/tv_pay_state" |
| | | android:layout_width="wrap_content" |
| | | android:layout_height="wrap_content" |
| | | android:textColor="@color/gray5" |
| | | android:textSize="12sp" /> |
| | | |
| | | </LinearLayout> |
| | | |
| | | |
| | | </LinearLayout> |
| | | </LinearLayout> |
| | |
| | | android:background="@drawable/shape_mine_msg_bg" |
| | | android:gravity="center" |
| | | android:minWidth="16dp" |
| | | android:text="99+" |
| | | android:textColor="#ffff2a59" |
| | | android:textSize="10sp" |
| | | android:visibility="visible" /> |
| | | android:visibility="gone" /> |
| | | |
| | | |
| | | </LinearLayout> |