| | |
| | | <activity |
| | | android:name=".ui.gold.view.InviteCodeExchangeActivity" |
| | | android:screenOrientation="portrait" /> |
| | | |
| | | <activity |
| | | android:name=".ui.recommend.GoodsDetailActivity" |
| | | android:screenOrientation="portrait"> |
| | | </activity> |
| | | |
| | | |
| | | <activity |
| | | android:name=".ui.recommend.GoodsDetailActivityTB" |
| | | android:screenOrientation="portrait"> |
| | |
| | | * @param key |
| | | * @param handler |
| | | */ |
| | | public static void getShopList(Context context, String page, String key, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void getShopList(Context context, String page, String key, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("cid", key); |
| | | params.put("page", page); |
| | | if (uid != null) { |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | } |
| | | commonPostWithFailture(context, BASE_URL2 + "brand/getList", params, handler); |
| | | } |
| | |
| | | * @param page 页码: |
| | | * @param sid 店铺id |
| | | */ |
| | | public static void getShopInfo(Context context, String page, String sid, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void getShopInfo(Context context, String page, String sid, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("id", sid); |
| | | if (uid != null) { |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | } |
| | | commonPost(context, BASE_URL2 + "brand/getShopInfoV2", params, handler); |
| | | } |
| | |
| | | * @param type 精选1, 足迹列表2 |
| | | * @param handler |
| | | */ |
| | | public static void getHistory(Context context, String page, String uid, String type, BasicTextHttpResponseHandler handler) { |
| | | public static void getHistory(Context context, String page, Long uid, String type, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | if (uid != null && uid.trim().length() > 0 && !uid.equalsIgnoreCase("null")) {//已登录:用户id |
| | | params.put("uid", uid); |
| | | } |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (type != null && type.trim().length() > 0 && !type.equalsIgnoreCase("null")) {//精选1, 足迹列表2 |
| | | params.put("type", type); |
| | | } |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void deleteHistory(Context context, String ids, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void deleteHistory(Context context, String ids, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("ids", ids); |
| | | if (uid != null && uid.trim().length() > 0 && !uid.equalsIgnoreCase("null")) {//已登录:用户id |
| | | params.put("uid", uid); |
| | | } |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "brand/deleteHistory", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void getRecommendIndex(Context context, String uid, |
| | | public static void getRecommendIndex(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) |
| | | params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "recommend/getRecommendIndex", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context |
| | | * @param uid |
| | | */ |
| | | public static void getHomeConfig(Context context, String uid, |
| | | public static void getHomeConfig(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "config/getHomeConfigNew", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context |
| | | * @param uid |
| | | */ |
| | | public static void uploadParsedOrder(Context context, String uid, String orderData, |
| | | public static void uploadParsedOrder(Context context, Long uid, String orderData, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("orderData", orderData); |
| | | params.put("source", "unionAuth"); |
| | | commonPostWithFailture(context, BASE_URL + "user/order/uploadParsedOrder", params, handler); |
| | | } |
| | | |
| | | public static void uploadParsedOrder(Context context, String uid, String orderData, String source, |
| | | public static void uploadParsedOrder(Context context, Long uid, String orderData, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("orderData", orderData); |
| | | params.put("source", source); |
| | | commonPostWithFailture(context, BASE_URL + "user/order/uploadParsedOrder", params, handler); |
| | |
| | | * @param handler |
| | | */ |
| | | public static void evaluateShare(Context context, Long uid, int type, String id, Long goodsId, Integer goodsType, BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid + ""); |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void getHomeNavbar(Context context, String uid, |
| | | public static void getHomeNavbar(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "navbar/getHomeItems", params, handler); |
| | | } |
| | | |
| | |
| | | * @param type 列表接口返回的type |
| | | * @param handler |
| | | */ |
| | | public static void getreadCommonMsg(Context context, String uid, String type, BasicTextHttpResponseHandler handler) { |
| | | public static void getreadCommonMsg(Context context, Long uid, String type, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("type", type); |
| | | if (uid != null && uid.trim().length() > 0 && !uid.equalsIgnoreCase("null")) {//当uid为空的时候 不传 |
| | | params.put("uid", uid); |
| | | } |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/msg/readCommonMsg", params, handler); |
| | | } |
| | | |
| | |
| | | * @param id |
| | | * @param handler |
| | | */ |
| | | public static void deleteMsg(Context context, String uid, String type, String id, BasicTextHttpResponseHandler handler) { |
| | | public static void deleteMsg(Context context, Long uid, String type, String id, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("type", type); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL + "user/msg/deleteMsg", params, handler); |
| | | } |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getNotReceived(Context context, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void getNotReceived(Context context, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/getNotReceived", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getTaskList(Context context, String uid, String page, BasicTextHttpResponseHandler handler) { |
| | | public static void getTaskList(Context context, Long uid, String page, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/getTaskList", params, handler); |
| | | } |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getReceiveGoldCoin(Context context, String uid, String type, String ids, BasicTextHttpResponseHandler handler) { |
| | | public static void getReceiveGoldCoin(Context context, Long uid, String type, String ids, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", type); |
| | | if (!StringUtils.isEmpty(ids)) { |
| | | params.put("ids", ids); |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getTokenReceive(Context context, String uid, String token, BasicTextHttpResponseHandler handler) { |
| | | public static void getTokenReceive(Context context, Long uid, String token, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("token", token); |
| | | commonPostWithFailture(context, BASE_URL2 + "search/tokenReceive", params, handler); |
| | | } |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getverifyCode(Context context, String uid, String inviteCode, BasicTextHttpResponseHandler handler) { |
| | | public static void getverifyCode(Context context, Long uid, String inviteCode, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("inviteCode", inviteCode); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/verifyCode", params, handler); |
| | | } |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getverifyWX(Context context, String uid, String inviteCode, BasicTextHttpResponseHandler handler) { |
| | | public static void getverifyWX(Context context, Long uid, String inviteCode, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("code", inviteCode); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/verifyWX", params, handler); |
| | | } |
| | |
| | | * @param handler |
| | | * @param type //类型: 1淘宝 2京东 3拼多多 |
| | | */ |
| | | public static void setOrderAppeal(Context context, String orderId, String uid, String type, BasicTextHttpResponseHandler handler) { |
| | | public static void setOrderAppeal(Context context, String orderId, Long uid, String type, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("orderId", orderId); |
| | | params.put("userInfo.id", uid); |
| | | params.put("userInfo.id", uid + ""); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL + "lostOrder/findLostOrder", params, handler); |
| | | } |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void getNewGoodsInfo(Context context, String text, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void getNewGoodsInfo(Context context, String text, Long uid, BasicTextHttpResponseHandler handler) { |
| | | //APP内复制的不推荐 |
| | | if (text != null && ClipboardUtil.latestCopyContent != null && text.equalsIgnoreCase(ClipboardUtil.latestCopyContent.getContent()) && (System.currentTimeMillis() - ClipboardUtil.latestCopyContent.getTime()) < 1000 * 60 * 30L) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("text", text); |
| | | if (uid != null && uid.length() > 0 && !StringUtils.isEmpty(uid)) { |
| | | params.put("uid", uid); |
| | | } |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "search/getRecommendInfo", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void getRewardStatistics(Context context, String uid, String dateType, BasicTextHttpResponseHandler handler) { |
| | | public static void getRewardStatistics(Context context, Long uid, String dateType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("dateType", dateType); |
| | | commonPost(context, BASE_URL2 + "user/order/getBonusCount", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void setModuleState(Context context, String uid, String param, |
| | | public static void setModuleState(Context context, Long uid, String param, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("params", param); |
| | | commonPost(context, BASE_URL + "customer/setModuleState", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getHomeMsgList(Context context, String uid, String page, |
| | | public static void getHomeMsgList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPost(context, BASE_URL + "user/msg/getHomeMsgListNew", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getSystemMsgList(Context context, String uid, String page, |
| | | public static void getSystemMsgList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPost(context, BASE_URL + "user/msg/getSystemMsgList", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void getHongBaoSendRecordList(Context context, String uid, String page, |
| | | public static void getHongBaoSendRecordList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPost(context, BASE_URL2 + "redpack/getGiveList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getMsgList(Context context, String uid, String page, String type, |
| | | public static void getMsgList(Context context, Long uid, String page, String type, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | if (type != null) |
| | | params.put("type", type); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUnReadMsgCount(Context context, String uid, |
| | | public static void getUnReadMsgCount(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL + "user/msg/getUnReadMsgCount", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void setAllMsgRead(Context context, String uid, |
| | | public static void setAllMsgRead(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL + "user/msg/setAllMsgRead", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void setSystemMsgSolved(Context context, String uid, String id, |
| | | public static void setSystemMsgSolved(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPost(context, BASE_URL + "user/msg/setSystemMsgSolved", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getGoodsCouponList(Context context, String uid, int goodsType, String goodsId, |
| | | public static void getGoodsCouponList(Context context, Long uid, int goodsType, String goodsId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsId", goodsId); |
| | | params.put("goodsType", goodsType + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/coupon/getFreeCouponList", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getOrderCouponList(Context context, String uid, String orderNo, |
| | | public static void getOrderCouponList(Context context, Long uid, String orderNo, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("orderNo", orderNo); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/coupon/getOrderCouponList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context uid |
| | | */ |
| | | public static void getShareRecord(Context context, String uid, String page, String source, |
| | | public static void getShareRecord(Context context, Long uid, String page, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | params.put("source", source); |
| | | commonPost(context, BASE_URL + "share/getlistrecord", params, handler); |
| | |
| | | * @param context |
| | | */ |
| | | public static void search(Context context, String kw, String page, String fillter, String goodsType, |
| | | String order, String uid, String notifyType, BasicTextHttpResponseHandler handler) { |
| | | String order, Long uid, String notifyType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("key", kw); |
| | | params.put("page", page); |
| | |
| | | params.put("order", order); |
| | | if (notifyType != null) |
| | | params.put("notifyType", notifyType); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "search/searchGoods", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void getFirstGuide(Context context, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void getFirstGuide(Context context, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "recommend/getGuide", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid |
| | | * @param handler |
| | | */ |
| | | public static void setRecordBind(Context context, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void setRecordBind(Context context, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL2 + "user/recordBind", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getMailList(Context context, String uid, String page, |
| | | public static void getMailList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPost(context, BASE_URL + "customer/findAccountMessageList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void updateComplaint(Context context, String uid, String content, File[] files, |
| | | public static void updateComplaint(Context context, Long uid, String content, File[] files, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("content", content); |
| | | if (files != null && files.length > 0) { |
| | | LinkedHashMap<String, File[]> params1 = new LinkedHashMap<>(); |
| | |
| | | * @param files 图片 |
| | | * @param handler |
| | | */ |
| | | public static void uploadPortrait(Context context, String uid, File[] files, |
| | | public static void uploadPortrait(Context context, Long uid, File[] files, |
| | | BasicTextHttpResponseHandler handler) { |
| | | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (files != null) { |
| | | LinkedHashMap<String, File[]> params1 = new LinkedHashMap<>(); |
| | | params1.put("file", files); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindWeiXin(Context context, String uid, String code, |
| | | public static void bindWeiXin(Context context, Long uid, String code, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("code", code); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindWeiXin", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getLostOrderList(Context context, String uid, String page, |
| | | public static void getLostOrderList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPost(context, BASE_URL + "lostOrder/getLostOrderList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteLostOrder(Context context, String uid, String id, |
| | | public static void deleteLostOrder(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPost(context, BASE_URL + "lostOrder/deleteLostOrder", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteAllLostOrder(Context context, String uid, |
| | | public static void deleteAllLostOrder(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPost(context, BASE_URL + "lostOrder/deleteAllLostOrder", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getTaoBaoCartConfig(Context context, String uid, String position, |
| | | public static void getTaoBaoCartConfig(Context context, Long uid, String position, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("position", position); |
| | | commonPost(context, BASE_URL + "config/getTaoBaoCartConfig", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void saveInfo(Context context, String uid, String nickName, String weiXin, |
| | | public static void saveInfo(Context context, Long uid, String nickName, String weiXin, |
| | | Integer sex, String inviteCode, File wxErCode, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(nickName)) |
| | | params.put("nickName", nickName); |
| | | if (!StringUtils.isEmpty(weiXin)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindOPPOPush(Context context, String uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | public static void bindOPPOPush(Context context, Long uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("registerId", registerId); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/registerOppo", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindVIVOPush(Context context, String uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | public static void bindVIVOPush(Context context, Long uid, String registerId, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("regId", registerId); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/registerVivo", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void loginOut(Context context, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void loginOut(Context context, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/logout", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void sendSms(Context context, String uid, String phone, String type, BasicTextHttpResponseHandler handler) { |
| | | public static void sendSms(Context context, Long uid, String phone, String type, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("phone", phone); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL + "sms/sendSMS", params, handler); |
| | | } |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void bindPhone(Context context, String uid, String vcode, String phone, BasicTextHttpResponseHandler handler) { |
| | | public static void bindPhone(Context context, Long uid, String vcode, String phone, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindPhone", params, handler); |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void addZhifubaoAccount(Context context, String uid, String name, String account, BasicTextHttpResponseHandler handler) { |
| | | public static void addZhifubaoAccount(Context context, Long uid, String name, String account, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("name", name); |
| | | params.put("account", account); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindalipaywithverifynew", params, handler); |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void verifyvcodeforbind(Context context, String uid, String vcode, String phone, BasicTextHttpResponseHandler handler) { |
| | | public static void verifyvcodeforbind(Context context, Long uid, String vcode, String phone, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | commonPostWithFailture(context, BASE_URL + "user/verifyvcodeforbind", params, handler); |
| | |
| | | * @param context vcode短信验证码 phone电话号码 code微信登录的code |
| | | * @param handler loginType 1电话 2微信 |
| | | */ |
| | | public static void bindPhoneNew(Context context, String vcode, String phone, String uid, BasicTextHttpResponseHandler handler) { |
| | | public static void bindPhoneNew(Context context, String vcode, String phone, Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("vcode", vcode); |
| | | params.put("phone", phone); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/bindPhoneNew", params, handler); |
| | | } |
| | | |
| | |
| | | * @param context |
| | | * @param handler |
| | | */ |
| | | public static void unbindPhone(Context context, String uid, String phone, BasicTextHttpResponseHandler handler) { |
| | | public static void unbindPhone(Context context, Long uid, String phone, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("phone", phone); |
| | | commonPostWithFailture(context, BASE_URL + "user/unBindPhone", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getExtractProcess(Context context, String id, String uid, |
| | | public static void getExtractProcess(Context context, String id, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "customer/getextractprocess", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void bindHMPush(Context context, String token, String uid, |
| | | public static void bindHMPush(Context context, String token, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("token", token); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "push/bindHWPush", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getExchangeList(Context context, String uid, String page, |
| | | public static void getExchangeList(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/getExchangeList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void goExchangeGoodsVerify(Context context, String uid, String id, |
| | | public static void goExchangeGoodsVerify(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/verifyExchange", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void goExchangeGoods(Context context, String uid, String id, |
| | | public static void goExchangeGoods(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/exchange", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void inviteCodeExchangeVerify(Context context, String uid, String id, |
| | | public static void inviteCodeExchangeVerify(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/verifyInviteCode", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void inviteCodeExchange(Context context, String uid, String id, |
| | | public static void inviteCodeExchange(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "integral/exchangeInviteCode", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getTBLinkInfo(Context context, String uid, String goodsId, String from, String source, |
| | | public static void getTBLinkInfo(Context context, Long uid, String goodsId, String from, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("auctionId", goodsId); |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getJDLinkInfo(Context context, String uid, String goodsId, String from, String source, String couponLink, |
| | | public static void getJDLinkInfo(Context context, Long uid, String goodsId, String from, String source, String couponLink, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", goodsId); |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | } |
| | | |
| | | |
| | | public static void getVIPLinkInfo(Context context, String uid, String goodsId, String from, String source, |
| | | public static void getVIPLinkInfo(Context context, Long uid, String goodsId, String from, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", goodsId); |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | } |
| | | |
| | | |
| | | public static void getSuningLinkInfo(Context context, String uid, String goodsId, String from, String source, |
| | | public static void getSuningLinkInfo(Context context, Long uid, String goodsId, String from, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", goodsId); |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getPDDLinkInfo(Context context, String uid, String goodsId, String from, String source, |
| | | public static void getPDDLinkInfo(Context context, Long uid, String goodsId, String from, String source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", goodsId); |
| | | params.put("from", from); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getPDDLink", params, handler); |
| | | } |
| | | |
| | | public static void getPDDAuthInfo(Context context, String uid, boolean buy, |
| | | public static void getPDDAuthInfo(Context context, Long uid, boolean buy, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", (buy ? 1 : 2) + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "pdd/getAuthJumpInfo", params, handler); |
| | | } |
| | | |
| | | //拼多多是否已经授权 |
| | | public static void isPDDAuthed(Context context, String uid, boolean buy, |
| | | public static void isPDDAuthed(Context context, Long uid, boolean buy, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", (buy ? 1 : 2) + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "pdd/isAuth", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteRecommendGoods(Context context, String goodsId, String uid, String reason, int source, |
| | | public static void deleteRecommendGoods(Context context, String goodsId, Long uid, String reason, int source, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("goodsId", goodsId); |
| | | params.put("source", source + ""); |
| | | if (!StringUtils.isNullOrEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(reason)) |
| | | params.put("reason", reason); |
| | | commonPostWithFailture(context, BASE_URL + "goods/deleteRecommendGoods", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void createShareLink(Context context, String uid, String goodsId, String goodsType, String source, |
| | | public static void createShareLink(Context context, Long uid, String goodsId, String goodsType, String source, |
| | | String totalNum, Boolean needGoods, BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsId", goodsId); |
| | | params.put("goodsType", goodsType); |
| | | if (!StringUtils.isEmpty(source)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getTaoBaoAuthInfo(Context context, String uid, String goodsId, String source, boolean first, |
| | | public static void getTaoBaoAuthInfo(Context context, Long uid, String goodsId, String source, boolean first, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (goodsId != null) |
| | | params.put("goodsId", goodsId); |
| | | params.put("source", source); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getMoneyStatistic(Context context, String uid, |
| | | public static void getMoneyStatistic(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "usermoney/getMoneyStatistic", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUserMoneyInfo(Context context, String uid, |
| | | public static void getUserMoneyInfo(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "usermoney/getUserMoneyInfo", params, handler); |
| | | } |
| | | |
| | |
| | | * @param page |
| | | * @param handler |
| | | */ |
| | | public static void getExtractRecord(Context context, String uid, int page, |
| | | public static void getExtractRecord(Context context, Long uid, int page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "usermoney/getExtractRecord", params, handler); |
| | | } |
| | |
| | | * @param date |
| | | * @param handler |
| | | */ |
| | | public static void getHistoryDetail(Context context, String uid, int dateType, String date, |
| | | public static void getHistoryDetail(Context context, Long uid, int dateType, String date, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("datetype", dateType + ""); |
| | | if (date != null) |
| | | params.put("date", date); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void viewShareTextTemplate(Context context, String uid, String goodsId, |
| | | public static void viewShareTextTemplate(Context context, Long uid, String goodsId, |
| | | String hasCoupon, String template, String tljId, |
| | | int goodsType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsId", goodsId); |
| | | params.put("hasCoupon", hasCoupon); |
| | | params.put("goodsType", goodsType + ""); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getShareTextTemplate(Context context, String uid, String hasCoupon, |
| | | public static void getShareTextTemplate(Context context, Long uid, String hasCoupon, |
| | | String tljId, int goodsType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("hasCoupon", hasCoupon); |
| | | params.put("goodsType", goodsType + ""); |
| | | if (!StringUtils.isEmpty(tljId)) { |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void saveShareTextTemplate(Context context, String uid, String hasCoupon, |
| | | public static void saveShareTextTemplate(Context context, Long uid, String hasCoupon, |
| | | String template, String tljId, int goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("hasCoupon", hasCoupon); |
| | | params.put("template", template); |
| | | params.put("goodsType", goodsType + ""); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void resetShareTextTemplate(Context context, String uid, String hasCoupon, |
| | | public static void resetShareTextTemplate(Context context, Long uid, String hasCoupon, |
| | | String goodsId, String tljId, int goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("hasCoupon", hasCoupon); |
| | | params.put("goodsId", goodsId); |
| | | params.put("goodsType", goodsType + ""); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getOrderList1(Context context, String page, String uid, Integer state, |
| | | public static void getOrderList1(Context context, String page, Long uid, Integer state, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("state", state + ""); |
| | | |
| | | commonPostWithFailture(context, BASE_URL2 + "user/order/getOrderList", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getOrderList2(Context context, String page, String uid, String orderState, |
| | | public static void getOrderList2(Context context, String page, Long uid, String orderState, |
| | | String type, String startTime, String endTime, Integer slotTime, |
| | | String needCount, Integer dateType, Integer goodsType, String state, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(orderState)) |
| | | params.put("orderState", orderState); |
| | | if (!StringUtils.isEmpty(type)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getOrderList3(Context context, String page, String uid, String orderNo, |
| | | public static void getOrderList3(Context context, String page, Long uid, String orderNo, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("orderNo", orderNo); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/order/getOrderList", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getRankInfo(Context context, String uid, |
| | | public static void getRankInfo(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "customer/getRankInfo", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getOrderStatistics(Context context, String uid, int goodsType, |
| | | public static void getOrderStatistics(Context context, Long uid, int goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", goodsType + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/order/getOrderCount", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getWelfareCenterList(Context context, String page, String uid, |
| | | public static void getWelfareCenterList(Context context, String page, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/coupon/getCouponList", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void sendCoupon(Context context, String uid, String id, |
| | | public static void sendCoupon(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/coupon/giveCoupon", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getSpecialActivity(Context context, String uid, |
| | | public static void getSpecialActivity(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (!StringUtils.isEmpty(uid)) |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/getSpecialActivities", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void useFreeSingleTicket(Context context, String uid, String cid, String goodId, |
| | | public static void useFreeSingleTicket(Context context, Long uid, String cid, String goodId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("cid", cid); |
| | | params.put("goodId", goodId); |
| | | commonPostWithFailture(context, BASE_URL + "user/coupon/useFreeCoupon", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void useRewardTicket(Context context, String uid, String cid, String orderNo, |
| | | public static void useRewardTicket(Context context, Long uid, String cid, String orderNo, |
| | | int goodsType, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("cid", cid); |
| | | params.put("orderNo", orderNo); |
| | | params.put("goodsType", goodsType + ""); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUserInfo2(Context context, String uid, |
| | | public static void getUserInfo2(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "customer/getuserinfoNew", params, handler); |
| | | } |
| | | |
| | |
| | | * @param code 激活码 |
| | | * @param handler |
| | | */ |
| | | public static void getActivationInvite(Context context, String uid, String code, BasicTextHttpResponseHandler handler) { |
| | | public static void getActivationInvite(Context context, Long uid, String code, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("inviteCode", code); |
| | | commonPostWithFailture(context, BASE_URL + "invite/activationInvite", params, handler); |
| | | } |
| | |
| | | * @param code |
| | | * @param handler |
| | | */ |
| | | public static void getActivationInviteWX(Context context, String uid, String code, BasicTextHttpResponseHandler handler) { |
| | | public static void getActivationInviteWX(Context context, Long uid, String code, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("key", code); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/activeInviteWX", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUserMoneyDetailList(Context context, String uid, String index, |
| | | public static void getUserMoneyDetailList(Context context, Long uid, String index, |
| | | String year, String month, int type, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(index)) |
| | | params.put("index", index); |
| | | if (!StringUtils.isEmpty(year)) |
| | |
| | | * @param type |
| | | * @param handler |
| | | */ |
| | | public static void getIncomeDetail(Context context, String uid, int dateType, String date, int type, |
| | | public static void getIncomeDetail(Context context, Long uid, int dateType, String date, int type, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("datetype", dateType + ""); |
| | | params.put("date", date); |
| | | params.put("type", type + ""); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getMoneyDetails(Context context, String uid, String index, |
| | | public static void getMoneyDetails(Context context, Long uid, String index, |
| | | String year, String month, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(index)) |
| | | params.put("index", index); |
| | | if (!StringUtils.isEmpty(year)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getGoldDetails(Context context, String uid, String index, |
| | | public static void getGoldDetails(Context context, Long uid, String index, |
| | | String year, String month, String type, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(index)) |
| | | params.put("index", index); |
| | | if (!StringUtils.isEmpty(year)) |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void extractmoneynew(Context context, String money, String uid, String vcode, String type, |
| | | public static void extractmoneynew(Context context, String money, Long uid, String vcode, String type, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("money", money); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("vcode", vcode); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL + "customer/extractmoneynew", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void shareTrends(Context context, String uid, String activityId, |
| | | public static void shareTrends(Context context, Long uid, String activityId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (!StringUtils.isEmpty(activityId)) { |
| | | params.put("id", activityId); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getRemindTeam(Context context, String uid, String inviteId, |
| | | public static void getRemindTeam(Context context, Long uid, String inviteId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("inviteId", inviteId); |
| | | // commonPostWithFailture(context, BASE_URL + "customer/getMyTeam", params, handler); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/remindTeam", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getCountMyTeam(Context context, String uid, |
| | | public static void getCountMyTeam(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/countMyTeam", params, handler); |
| | | } |
| | | |
| | |
| | | * @param workerId |
| | | * @param handler |
| | | */ |
| | | public static void getFansInfo(Context context, String uid, String workerId, |
| | | public static void getFansInfo(Context context, Long uid, String workerId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("workerId", workerId); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/getFansInfo", params, handler); |
| | | } |
| | |
| | | * @param info -筛选条件 |
| | | * @param handler |
| | | */ |
| | | public static void getMyTeamV2(Context context, String uid, int page, String key, int type, TeamScreenInfo info, |
| | | public static void getMyTeamV2(Context context, Long uid, int page, String key, int type, TeamScreenInfo info, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page + ""); |
| | | params.put("type", type + ""); |
| | | if (!StringUtils.isEmpty(key)) { |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void saveMemoName(Context context, String uid, String inviteId, String memoName, |
| | | public static void saveMemoName(Context context, Long uid, String inviteId, String memoName, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("inviteId", inviteId); |
| | | params.put("memoName", memoName); |
| | | commonPostWithFailture(context, BASE_URL + "customer/setextrainfo", params, handler); |
| | |
| | | * @param tags |
| | | * @param handler |
| | | */ |
| | | public static void saveTags(Context context, String uid, String workerId, String tags, |
| | | public static void saveTags(Context context, Long uid, String workerId, String tags, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("workerId", workerId); |
| | | params.put("tags", tags); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/saveTags", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getInviteImg(Context context, String uid, String activityId, |
| | | public static void getInviteImg(Context context, Long uid, String activityId, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("activityId", activityId); |
| | | commonPostWithFailture(context, BASE_URL + "activity/inviteImg", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getPushRecommendhistory(Context context, String page, String uid, String deviceToken, |
| | | public static void getPushRecommendhistory(Context context, String page, Long uid, String deviceToken, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("deviceToken", deviceToken); |
| | | commonPostWithFailture(context, BASE_URL + "push/gethistory", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void canExtract(Context context, String uid, String money, |
| | | public static void canExtract(Context context, Long uid, String money, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("money", money); |
| | | commonPostWithFailture(context, BASE_URL + "customer/canextract", params, handler); |
| | | } |
| | |
| | | * @param uid 用户id |
| | | * @param handler |
| | | */ |
| | | public static void getcountHongBao(Context context, String uid, |
| | | public static void getcountHongBao(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "redpack/countInfo", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid 用户id |
| | | * @param handler |
| | | */ |
| | | public static void giveTLJ(Context context, String uid, String amount, |
| | | public static void giveTLJ(Context context, Long uid, String amount, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("amount", amount); |
| | | commonPostWithFailture(context, BASE_URL2 + "redpack/giving", params, handler); |
| | | } |
| | |
| | | * @param uid 用户id |
| | | * @param handler |
| | | */ |
| | | public static void exchangeCash(Context context, String uid, String amount, |
| | | public static void exchangeCash(Context context, Long uid, String amount, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("amount", amount); |
| | | commonPostWithFailture(context, BASE_URL2 + "redpack/exchangeCash", params, handler); |
| | | } |
| | |
| | | * @param uid 用户id |
| | | * @param handler |
| | | */ |
| | | public static void getHongbaoDetails(Context context, String uid, |
| | | public static void getHongbaoDetails(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | // params.put("type", type); |
| | | if (uid != null && uid.trim().length() > 0 && !uid.equalsIgnoreCase("null")) {//当uid为空的时候 不传 |
| | | params.put("uid", uid); |
| | | } |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "taolijin/getWinDetail", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid 用户id |
| | | * @param handler |
| | | */ |
| | | public static void getMSGConfig(Context context, String uid, |
| | | public static void getMSGConfig(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "config/getMSGConfig", params, handler); |
| | | } |
| | | |
| | |
| | | * @param page 页码:1 |
| | | * @param handler |
| | | */ |
| | | public static void getv2ShareRecord(Context context, String uid, String page, |
| | | public static void getv2ShareRecord(Context context, Long uid, String page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page); |
| | | commonPostWithFailture(context, BASE_URL2 + "taolijin/getShareRecord", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void openMessage(Context context, String uid, String id, |
| | | public static void openMessage(Context context, Long uid, String id, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("id", id); |
| | | commonPostWithFailture(context, BASE_URL + "customer/openAccountMessage", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUserAccount(Context context, String uid, |
| | | public static void getUserAccount(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "customer/getuseraccount", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getZFBInfo(Context context, String uid, |
| | | public static void getZFBInfo(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "customer/getalipayaccount", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getCollectioList(Context context, String page, String uid, |
| | | public static void getCollectioList(Context context, String page, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "consumer/collectionGoodsList", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteCollect(Context context, String ids, String type, String uid, |
| | | public static void deleteCollect(Context context, String ids, String type, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("ids", ids); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL2 + "consumer/deleteCollectionGoods", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void addSelection(Context context, String uid, String auctionIds, |
| | | public static void addSelection(Context context, Long uid, String auctionIds, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("ids", auctionIds); |
| | | commonPostWithFailture(context, BASE_URL2 + "shraeStorage/addStorage", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getFootmark(Context context, String page, String uid, |
| | | public static void getFootmark(Context context, String page, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "consumer/getScanHistory", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteFootmark(Context context, String ids, String type, String uid, |
| | | public static void deleteFootmark(Context context, String ids, String type, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("ids", ids); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", type); |
| | | commonPostWithFailture(context, BASE_URL2 + "consumer/deleteScanhistory", params, handler); |
| | | } |
| | |
| | | * @param context |
| | | * @param goodsType 平台: 1淘宝 2京东 3拼多多 |
| | | */ |
| | | public static void getSelectioStoreHouseList(Context context, String page, String uid, String goodsType, |
| | | public static void getSelectioStoreHouseList(Context context, String page, Long uid, String goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("page", page); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsType", goodsType); |
| | | commonPostWithFailture(context, BASE_URL2 + "shraeStorage/getlist", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void deleteSelectStoreHouse(Context context, String ids, String uid, |
| | | public static void deleteSelectStoreHouse(Context context, String ids, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("storageIds", ids); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "userstorage/deletestorage", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void shareSelectStoreHouse(Context context, String ids, String uid, int goodsType, |
| | | public static void shareSelectStoreHouse(Context context, String ids, Long uid, int goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("storageIds", ids); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsType", goodsType + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "shraeStorage/createShare", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void collectionGoods(Context context, String id, String uid, String type, String goodsType, |
| | | public static void collectionGoods(Context context, String id, Long uid, String type, String goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("type", type); |
| | | params.put("goodsType", goodsType); |
| | | commonPostWithFailture(context, BASE_URL2 + "consumer/collectionGoods", params, handler); |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void addSelectionStoreHouse(Context context, String id, String uid, String goodsType, |
| | | public static void addSelectionStoreHouse(Context context, String id, Long uid, String goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsType", goodsType); |
| | | commonPostWithFailture(context, BASE_URL2 + "shraeStorage/accordtorage", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void sendGoodsOrder(Context context, String id, String uid, String goodsType, |
| | | public static void sendGoodsOrder(Context context, String id, Long uid, String goodsType, |
| | | BasicTextHttpResponseHandler handler) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, uid, true)) |
| | | return; |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("goodsId", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("goodsType", goodsType); |
| | | commonPostWithFailture(context, BASE_URL2 + "user/cloud/sendGoods", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void getGoodsDetailInfo(Context context, String id, String uid, |
| | | public static void getGoodsDetailInfo(Context context, String id, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL + "user/getnewgoodsdetail", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void getGoodsInfoTB(Context context, String id, String uid, String from, |
| | | public static void getGoodsInfoTB(Context context, String id, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getDetailTB", params, handler); |
| | | } |
| | | |
| | | |
| | | public static void getGoodsInfo(Context context, String goodsId, int goodsType, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("goodsId", goodsId); |
| | | params.put("goodsType", goodsType + ""); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | if (from != null) |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BuXinConstant.HOST + "/fanli/api/lijin/goods/getGoodsDetail", params, handler); |
| | | } |
| | | |
| | | /** |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void getGoodsInfoJD(Context context, String id, String uid, String from, |
| | | public static void getGoodsInfoJD(Context context, String id, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getDetailJD", params, handler); |
| | | } |
| | |
| | | * @param from |
| | | * @param handler |
| | | */ |
| | | public static void getGoodsInfoVIP(Context context, String id, String uid, String from, |
| | | public static void getGoodsInfoVIP(Context context, String id, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getDetailVIP", params, handler); |
| | | } |
| | |
| | | * @param from |
| | | * @param handler |
| | | */ |
| | | public static void getGoodsInfoSuning(Context context, String id, String uid, String from, |
| | | public static void getGoodsInfoSuning(Context context, String id, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getDetailSuning", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void getGoodsInfoPDD(Context context, String id, String uid, String from, |
| | | public static void getGoodsInfoPDD(Context context, String id, Long uid, String from, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("id", id); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("from", from); |
| | | commonPostWithFailture(context, BASE_URL2 + "goods/getDetailPDD", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context id 商品ID |
| | | */ |
| | | public static void reportOrder(Context context, String order, String uid, String url, String money, |
| | | public static void reportOrder(Context context, String order, Long uid, String url, String money, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("order", order); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("money", money); |
| | | params.put("auctionUrl", url); |
| | | commonPostWithFailture(context, BASE_URL + "user/reportorder", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getInviteInfo(Context context, String uid, |
| | | public static void getInviteInfo(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("pageIndex", "1"); |
| | | params.put("activityRules", "activityRules"); |
| | | commonPostWithFailture(context, BASE_URL + "invite/inviteGetMoney", params, handler); |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void inviteFriend(Context context, String uid, int page, |
| | | public static void inviteFriend(Context context, Long uid, int page, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<String, String>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "invite/getInviteImgs", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void getUserItems(Context context, String uid, |
| | | public static void getUserItems(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "navbar/getUserItems", params, handler); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void saveUserItems(Context context, String uid, String barIds, |
| | | public static void saveUserItems(Context context, Long uid, String barIds, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("barIds", barIds); |
| | | commonPostWithFailture(context, BASE_URL2 + "navbar/saveUserItems", params, handler); |
| | | } |
| | |
| | | * |
| | | * @param context |
| | | */ |
| | | public static void resetDefault(Context context, String uid, |
| | | public static void resetDefault(Context context, Long uid, |
| | | BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "navbar/restoreDefault", params, handler); |
| | | } |
| | | |
| | |
| | | * @param uid |
| | | */ |
| | | public static void getSystemParams(Context context, |
| | | String uid, BasicTextHttpResponseHandler handler) { |
| | | Long uid, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | if (uid != null && !uid.equals("") && !uid.equals("null")) { |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | } |
| | | boolean taobao = ToolUtil.uninstallSoftware(context, "com.taobao.taobao"); |
| | | boolean tmall = ToolUtil.uninstallSoftware(context, "com.tmall.wireless"); |
| | |
| | | * @param page |
| | | * @param uid |
| | | */ |
| | | public static void getShareExplosions(Context context, String uid, |
| | | public static void getShareExplosions(Context context, Long uid, |
| | | int page, BasicTextHttpResponseHandler handler) { |
| | | LinkedHashMap<String, String> params = new LinkedHashMap<>(); |
| | | params.put("uid", uid); |
| | | if (uid != null) params.put("uid", uid + ""); |
| | | params.put("page", page + ""); |
| | | commonPostWithFailture(context, BASE_URL2 + "taolijin/getShareGoodsV2", params, handler); |
| | | } |
| | |
| | | import com.alibaba.baichuan.android.trade.callback.AlibcTradeCallback; |
| | | import com.alibaba.baichuan.trade.biz.context.AlibcResultType; |
| | | import com.alibaba.baichuan.trade.biz.context.AlibcTradeResult; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | //支付成功 |
| | | Toast.makeText(ShoppingApplication.application, "支付成功!", Toast.LENGTH_SHORT).show(); |
| | | ShoppingApi.reportOrder(ShoppingApplication.application, tradeResult.payResult.paySuccessOrders + "", |
| | | ShoppingApplication.application.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""), url, money, new BasicTextHttpResponseHandler() { |
| | | UserUtil.getUid(ShoppingApplication.application), url, money, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
New file |
| | |
| | | package com.tejia.lijin.app.entity.goods; |
| | | |
| | | import com.tejia.lijin.app.entity.CouponInfo; |
| | | import com.tejia.lijin.app.entity.CouponUser; |
| | | import com.tejia.lijin.app.entity.Label; |
| | | import com.tejia.lijin.app.entity.RedPacket; |
| | | import com.tejia.lijin.app.entity.ShopInfo; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | public class GoodsDetailVO { |
| | | |
| | | private GoodsDetailVO.GoodsInfoVO goods; |
| | | private GoodsDetailVO.GoodsExtraVO extra; |
| | | |
| | | |
| | | public GoodsDetailVO.GoodsInfoVO getGoods() { |
| | | return goods; |
| | | } |
| | | |
| | | public void setGoods(GoodsDetailVO.GoodsInfoVO goods) { |
| | | this.goods = goods; |
| | | } |
| | | |
| | | public GoodsDetailVO.GoodsExtraVO getExtra() { |
| | | return extra; |
| | | } |
| | | |
| | | public void setExtra(GoodsDetailVO.GoodsExtraVO extra) { |
| | | this.extra = extra; |
| | | } |
| | | |
| | | |
| | | public static class GoodsInfoVO { |
| | | private String goodsId; |
| | | private String title;// 标题 |
| | | private List<String> imgList; |
| | | private int state; // 0-正常 1-商品下架 |
| | | private List<CouponInfo> couponInfoList;// 所有券信息 |
| | | |
| | | private int goodsType;// 商品类型 1-淘宝 2-京东 3-拼多多 |
| | | private int shopType;// 店铺类型: 1-淘宝 2-天猫 3-京东 4-拼多多 |
| | | private List<Label> labels;// 标签 |
| | | private int salesType; |
| | | private String salesCount; |
| | | private String address; |
| | | private ShopInfo shopInfo; |
| | | private List<GoodsDetailVO.GoodsRightsVO> rights; |
| | | private RedPacket moneyInfo; |
| | | private List<GoodsDetailVO.GoodsHongBaoListVO> priceList; |
| | | private String zkPrice; |
| | | private BigDecimal couponPrice; |
| | | |
| | | public String getGoodsId() { |
| | | return goodsId; |
| | | } |
| | | |
| | | public void setGoodsId(String goodsId) { |
| | | this.goodsId = goodsId; |
| | | } |
| | | |
| | | public String getTitle() { |
| | | return title; |
| | | } |
| | | |
| | | public void setTitle(String title) { |
| | | this.title = title; |
| | | } |
| | | |
| | | public List<String> getImgList() { |
| | | return imgList; |
| | | } |
| | | |
| | | public void setImgList(List<String> imgList) { |
| | | this.imgList = imgList; |
| | | } |
| | | |
| | | public int getState() { |
| | | return state; |
| | | } |
| | | |
| | | public void setState(int state) { |
| | | this.state = state; |
| | | } |
| | | |
| | | public List<CouponInfo> getCouponInfoList() { |
| | | return couponInfoList; |
| | | } |
| | | |
| | | public void setCouponInfoList(List<CouponInfo> couponInfoList) { |
| | | this.couponInfoList = couponInfoList; |
| | | } |
| | | |
| | | public int getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(int goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public int getShopType() { |
| | | return shopType; |
| | | } |
| | | |
| | | public void setShopType(int shopType) { |
| | | this.shopType = shopType; |
| | | } |
| | | |
| | | public List<Label> getLabels() { |
| | | return labels; |
| | | } |
| | | |
| | | public void setLabels(List<Label> labels) { |
| | | this.labels = labels; |
| | | } |
| | | |
| | | public int getSalesType() { |
| | | return salesType; |
| | | } |
| | | |
| | | public void setSalesType(int salesType) { |
| | | this.salesType = salesType; |
| | | } |
| | | |
| | | public String getSalesCount() { |
| | | return salesCount; |
| | | } |
| | | |
| | | public void setSalesCount(String salesCount) { |
| | | this.salesCount = salesCount; |
| | | } |
| | | |
| | | public String getAddress() { |
| | | return address; |
| | | } |
| | | |
| | | public void setAddress(String address) { |
| | | this.address = address; |
| | | } |
| | | |
| | | public ShopInfo getShopInfo() { |
| | | return shopInfo; |
| | | } |
| | | |
| | | public void setShopInfo(ShopInfo shopInfo) { |
| | | this.shopInfo = shopInfo; |
| | | } |
| | | |
| | | public List<GoodsDetailVO.GoodsRightsVO> getRights() { |
| | | return rights; |
| | | } |
| | | |
| | | public void setRights(List<GoodsDetailVO.GoodsRightsVO> rights) { |
| | | this.rights = rights; |
| | | } |
| | | |
| | | public RedPacket getMoneyInfo() { |
| | | return moneyInfo; |
| | | } |
| | | |
| | | public void setMoneyInfo(RedPacket moneyInfo) { |
| | | this.moneyInfo = moneyInfo; |
| | | } |
| | | |
| | | public List<GoodsDetailVO.GoodsHongBaoListVO> getPriceList() { |
| | | return priceList; |
| | | } |
| | | |
| | | public void setPriceList(List<GoodsDetailVO.GoodsHongBaoListVO> priceList) { |
| | | this.priceList = priceList; |
| | | } |
| | | |
| | | public String getZkPrice() { |
| | | return zkPrice; |
| | | } |
| | | |
| | | public void setZkPrice(String zkPrice) { |
| | | this.zkPrice = zkPrice; |
| | | } |
| | | |
| | | public BigDecimal getCouponPrice() { |
| | | return couponPrice; |
| | | } |
| | | |
| | | public void setCouponPrice(BigDecimal couponPrice) { |
| | | this.couponPrice = couponPrice; |
| | | } |
| | | } |
| | | |
| | | public static class GoodsExtraVO { |
| | | private boolean fanliValid; |
| | | private boolean buyValid; |
| | | private String detailUrl; |
| | | private List<CouponUser> listCouponUser; |
| | | private boolean collected; |
| | | |
| | | public boolean isCollected() { |
| | | return collected; |
| | | } |
| | | |
| | | public void setCollected(boolean collected) { |
| | | this.collected = collected; |
| | | } |
| | | |
| | | public boolean isFanliValid() { |
| | | return fanliValid; |
| | | } |
| | | |
| | | public void setFanliValid(boolean fanliValid) { |
| | | this.fanliValid = fanliValid; |
| | | } |
| | | |
| | | public boolean isBuyValid() { |
| | | return buyValid; |
| | | } |
| | | |
| | | public void setBuyValid(boolean buyValid) { |
| | | this.buyValid = buyValid; |
| | | } |
| | | |
| | | public String getDetailUrl() { |
| | | return detailUrl; |
| | | } |
| | | |
| | | public void setDetailUrl(String detailUrl) { |
| | | this.detailUrl = detailUrl; |
| | | } |
| | | |
| | | public List<CouponUser> getListCouponUser() { |
| | | return listCouponUser; |
| | | } |
| | | |
| | | public void setListCouponUser(List<CouponUser> listCouponUser) { |
| | | this.listCouponUser = listCouponUser; |
| | | } |
| | | } |
| | | |
| | | |
| | | public static class GoodsRightsVO { |
| | | //1-券 2-红包 3-首单礼金 4-返利 |
| | | private int type; |
| | | private String money; |
| | | private String desc; |
| | | private String descLink; |
| | | |
| | | public GoodsRightsVO(int type, String money, String desc) { |
| | | this.type = type; |
| | | this.money = money; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(String money) { |
| | | this.money = money; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getDescLink() { |
| | | return descLink; |
| | | } |
| | | |
| | | public void setDescLink(String descLink) { |
| | | this.descLink = descLink; |
| | | } |
| | | } |
| | | |
| | | public static class GoodsHongBaoListVO { |
| | | |
| | | // 2-红包 4-返利 |
| | | private int type; |
| | | private String subMoney; |
| | | private String subMoneyDesc; |
| | | private String finalMoney; |
| | | //价格详情 |
| | | private List<GoodsDetailVO.GoodsHongBaoListVO.PriceInfo> priceDetails; |
| | | private GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO userLevel; |
| | | private String desc; |
| | | |
| | | public int getType() { |
| | | return type; |
| | | } |
| | | |
| | | public void setType(int type) { |
| | | this.type = type; |
| | | } |
| | | |
| | | public String getSubMoney() { |
| | | return subMoney; |
| | | } |
| | | |
| | | public void setSubMoney(String subMoney) { |
| | | this.subMoney = subMoney; |
| | | } |
| | | |
| | | public String getSubMoneyDesc() { |
| | | return subMoneyDesc; |
| | | } |
| | | |
| | | public void setSubMoneyDesc(String subMoneyDesc) { |
| | | this.subMoneyDesc = subMoneyDesc; |
| | | } |
| | | |
| | | public String getFinalMoney() { |
| | | return finalMoney; |
| | | } |
| | | |
| | | public void setFinalMoney(String finalMoney) { |
| | | this.finalMoney = finalMoney; |
| | | } |
| | | |
| | | public List<GoodsDetailVO.GoodsHongBaoListVO.PriceInfo> getPriceDetails() { |
| | | return priceDetails; |
| | | } |
| | | |
| | | public void setPriceDetails(List<GoodsDetailVO.GoodsHongBaoListVO.PriceInfo> priceDetails) { |
| | | this.priceDetails = priceDetails; |
| | | } |
| | | |
| | | public GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO getUserLevel() { |
| | | return userLevel; |
| | | } |
| | | |
| | | public void setUserLevel(GoodsDetailVO.GoodsHongBaoListVO.UserLevelVO userLevel) { |
| | | this.userLevel = userLevel; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static class UserLevelVO { |
| | | //VIP等级 0-初级 1-青铜 2-白银 3-铂金 |
| | | private int vipRank; |
| | | private String desc; |
| | | private String link; |
| | | |
| | | public int getVipRank() { |
| | | return vipRank; |
| | | } |
| | | |
| | | public void setVipRank(int vipRank) { |
| | | this.vipRank = vipRank; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getLink() { |
| | | return link; |
| | | } |
| | | |
| | | public void setLink(String link) { |
| | | this.link = link; |
| | | } |
| | | } |
| | | |
| | | public static class PriceInfo { |
| | | private String name; |
| | | private String money; |
| | | |
| | | public PriceInfo(String name, String money) { |
| | | this.name = name; |
| | | this.money = money; |
| | | } |
| | | |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | |
| | | public String getMoney() { |
| | | return money; |
| | | } |
| | | |
| | | public void setMoney(String money) { |
| | | this.money = money; |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | * @param uid |
| | | * @param callBack |
| | | */ |
| | | public void getNotReceived(Context mContext, String uid, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | public void getNotReceived(Context mContext, Long uid, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | ShoppingApi.getNotReceived(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * @param page |
| | | * @param callBack |
| | | */ |
| | | public void getTaskList(Context mContext, String uid, int page, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | public void getTaskList(Context mContext, Long uid, int page, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | ShoppingApi.getTaskList(mContext, uid, String.valueOf(page), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * @param ids |
| | | * @param callBack |
| | | */ |
| | | public void getReceiveGoldCoin(Context mContext, String uid, String type, String ids, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | public void getReceiveGoldCoin(Context mContext, Long uid, String type, String ids, final GoldTaskContract.GoldTaskCallBack callBack) { |
| | | ShoppingApi.getReceiveGoldCoin(mContext, uid, type, ids, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * @param uid |
| | | * @param callBack |
| | | */ |
| | | public void getCountMyTeam(Context mContext, String uid, final InvitepeopleContract.InvitepeopleCallBack callBack) { |
| | | public void getCountMyTeam(Context mContext, Long uid, final InvitepeopleContract.InvitepeopleCallBack callBack) { |
| | | ShoppingApi.getCountMyTeam(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * @param uid |
| | | * @param callBack |
| | | */ |
| | | public void getRemindTeam(Context mContext, String uid, String inviteId, final InvitepeopleContract.InvitepeopleCallBack callBack) { |
| | | public void getRemindTeam(Context mContext, Long uid, String inviteId, final InvitepeopleContract.InvitepeopleCallBack callBack) { |
| | | ShoppingApi.getRemindTeam(mContext, uid, inviteId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /** |
| | | * 未读消息 |
| | | */ |
| | | public void getUnReadMsgCount(Context mContext, String uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | public void getUnReadMsgCount(Context mContext, Long uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | ShoppingApi.getUnReadMsgCount(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /** |
| | | * 清空未读消息 |
| | | */ |
| | | public void setAllMsgRead(Context mContext, String uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | public void setAllMsgRead(Context mContext, Long uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | ShoppingApi.setAllMsgRead(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /** |
| | | * 消息中心红包 |
| | | */ |
| | | public void getMSGConfig(Context mContext, String uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | public void getMSGConfig(Context mContext, Long uid, final MessgeContract.onMessgeCallBack callBack) { |
| | | ShoppingApi.getMSGConfig(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * |
| | | * @param callBack |
| | | */ |
| | | public void getSelectioStoreHouseList(Context mContext, String page, String uid, String goodsType, final SelectionStoreHouse31Contract.onStoreHouseCallBack callBack) { |
| | | public void getSelectioStoreHouseList(Context mContext, String page, Long uid, String goodsType, final SelectionStoreHouse31Contract.onStoreHouseCallBack callBack) { |
| | | ShoppingApi.getSelectioStoreHouseList(mContext, page, uid, goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * |
| | | * @param ids 删除列表ID |
| | | */ |
| | | public void deleteSelectStoreHouse(Context mContext, String ids, String uid, final SelectionStoreHouse31Contract.onStoreHouseCallBack callBack) { |
| | | public void deleteSelectStoreHouse(Context mContext, String ids, Long uid, final SelectionStoreHouse31Contract.onStoreHouseCallBack callBack) { |
| | | ShoppingApi.deleteSelectStoreHouse(mContext, ids, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.contract.GoldTaskContract; |
| | | import com.tejia.lijin.app.model.GoldTaskModel; |
| | |
| | | * @param mContext |
| | | * @param uid |
| | | */ |
| | | public void getNotReceived(Context mContext, String uid) { |
| | | public void getNotReceived(Context mContext, Long uid) { |
| | | taskModel.getNotReceived(mContext, uid, new GoldTaskContract.GoldTaskCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject obj) { |
| | |
| | | * @param uid |
| | | * @param page |
| | | */ |
| | | public void getTaskList(Context mContext, String uid, int page) { |
| | | public void getTaskList(Context mContext, Long uid, int page) { |
| | | taskModel.getTaskList(mContext, uid, page, new GoldTaskContract.GoldTaskCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject obj) { |
| | |
| | | * @param type 全部领取1 部分领取0 |
| | | * @param ids 领取的记录id: [1,2] |
| | | */ |
| | | public void getReceiveGoldCoin(Context mContext, String uid, String type, String ids) { |
| | | public void getReceiveGoldCoin(Context mContext, Long uid, String type, String ids) { |
| | | taskModel.getReceiveGoldCoin(mContext, uid, type, ids, new GoldTaskContract.GoldTaskCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject obj) { |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public String getUid(Context mContext) { |
| | | return mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | public Long getUid(Context mContext) { |
| | | return UserUtil.getUid(ShoppingApplication.application); |
| | | } |
| | | |
| | | /** |
| | |
| | | |
| | | import android.content.Context; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.contract.InvitepeopleContract; |
| | | import com.tejia.lijin.app.model.InvitepeopleModel; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | * @param mContext |
| | | * @param uid |
| | | */ |
| | | public void getCountMyTeam(Context mContext, String uid) { |
| | | public void getCountMyTeam(Context mContext, Long uid) { |
| | | model.getCountMyTeam(mContext, uid, new InvitepeopleContract.InvitepeopleCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject obj) { |
| | |
| | | }); |
| | | } |
| | | |
| | | public void getRemindTeam(Context mContext, String uid, String inviteId) { |
| | | public void getRemindTeam(Context mContext, Long uid, String inviteId) { |
| | | model.getRemindTeam(mContext, uid, inviteId, new InvitepeopleContract.InvitepeopleCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject obj) { |
| | |
| | | * @return |
| | | */ |
| | | public String getUid(Context mContext) { |
| | | return mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | return UserUtil.getUid(ShoppingApplication.application)+""; |
| | | } |
| | | } |
| | |
| | | package com.tejia.lijin.app.presenter; |
| | | |
| | | import android.app.Activity; |
| | | import android.app.Application; |
| | | import android.content.Context; |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.util.cache.DiskLruCache; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | /** |
| | | * 未读消息 |
| | | */ |
| | | public void getUnReadMsgCount(String uid) { |
| | | public void getUnReadMsgCount(Long uid) { |
| | | model.getUnReadMsgCount(mContext, uid, new MessgeContract.onMessgeCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | |
| | | /** |
| | | * 清空未读消息 |
| | | */ |
| | | public void setAllMsgRead(String uid) { |
| | | public void setAllMsgRead(Long uid) { |
| | | model.setAllMsgRead(mContext, uid, new MessgeContract.onMessgeCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | |
| | | /** |
| | | * 消息中心红包 |
| | | */ |
| | | public void getMSGConfig(String uid) { |
| | | public void getMSGConfig(Long uid) { |
| | | model.getMSGConfig(mContext, uid, new MessgeContract.onMessgeCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | |
| | | * @param type |
| | | */ |
| | | private void getReadCommonMsg(String type) { |
| | | ShoppingApi.getreadCommonMsg(mContext, getUID(), type, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getreadCommonMsg(mContext, UserUtil.getUid(ShoppingApplication.application), type, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | } |
| | |
| | | return new Md5FileNameGenerator().generate(method); |
| | | } |
| | | |
| | | /** |
| | | * 获取 用户UID |
| | | */ |
| | | public String getUID() { |
| | | return mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 分享库数据 |
| | | */ |
| | | public void getSelectioStoreHouseList(String page, String uid, String goodsType) { |
| | | public void getSelectioStoreHouseList(String page, Long uid, String goodsType) { |
| | | model.getSelectioStoreHouseList(mContext, page, uid, goodsType, new SelectionStoreHouse31Contract.onStoreHouseCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | |
| | | /** |
| | | * 删除分享库 |
| | | */ |
| | | public void deleteSelectStoreHouse(String ids, String uid) { |
| | | public void deleteSelectStoreHouse(String ids, Long uid) { |
| | | model.deleteSelectStoreHouse(mContext, ids, uid, new SelectionStoreHouse31Contract.onStoreHouseCallBack() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | |
| | | |
| | | import com.huawei.hms.support.api.push.PushReceiver; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | public void onToken(Context context, String s, Bundle bundle) { |
| | | super.onToken(context, s, bundle); |
| | | Log.e("eee", "onToken: " + s); |
| | | SharedPreferences sp = context.getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | |
| | | // String off_no = sp.getString("push_off_no", "false_01"); |
| | | // if (off_no.equals("true_01")) { |
| | | ShoppingApi.bindHMPush(context, s, uid, null); |
| | | ShoppingApi.bindHMPush(context, s, UserUtil.getUid(ShoppingApplication.application), null); |
| | | // } |
| | | mToken = s; |
| | | Intent intent = new Intent(); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | |
| | | private void getHistory() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getHistory(this, page + "", (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), "2", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHistory(this, page + "", UserUtil.getUid(ShoppingApplication.application), "2", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | */ |
| | | private void deleteHistory(String sid) { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.deleteHistory(this, sid, (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.deleteHistory(this, sid, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.viewpagerindicator.LinePageIndicator; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.SystemCommon; |
| | |
| | | private void getShopInfo(String id) { |
| | | refresh1 = false; |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getShopInfo(this, page + "", id, (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getShopInfo(this, page + "", id, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.nostra13.universalimageloader.cache.disc.naming.Md5FileNameGenerator; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.viewpagerindicator.CirclePageIndicator; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | |
| | | //精选 |
| | | SharedPreferences sp = fragment_brand_fragment_sf.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getShopList(fragment_brand_fragment_sf.getContext(), page + "", mBundle.getString("id"), (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getShopList(fragment_brand_fragment_sf.getContext(), page + "", mBundle.getString("id"), UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | refresh2 = false; |
| | | //精选 |
| | | SharedPreferences sp = getActivity().getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getHistory(fragment_brand_fragment_sf.getContext(), "1", (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), "1", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHistory(fragment_brand_fragment_sf.getContext(), "1", UserUtil.getUid(ShoppingApplication.application), "1", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | refresh2 = true; |
| | |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.umeng.analytics.MobclickAgent; |
| | |
| | | |
| | | @JavascriptInterface |
| | | public String getUid() { |
| | | return getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | return UserUtil.getUid(ShoppingApplication.application)+""; |
| | | } |
| | | |
| | | @JavascriptInterface |
| | |
| | | import com.qq.e.ads.splash.SplashADListener; |
| | | import com.qq.e.comm.managers.GDTADManager; |
| | | import com.qq.e.comm.util.AdError; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.MobileUtil; |
| | |
| | | * 系统补充参数请求 |
| | | */ |
| | | private void getSystemParams() { |
| | | String uid = getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getSystemParams(SplashActivity.this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSystemParams(SplashActivity.this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void getHomeNavbar() { |
| | | String uid = getSharedPreferences("user", |
| | | MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getHomeNavbar(this, uid, |
| | | ShoppingApi.getHomeNavbar(this, UserUtil.getUid(ShoppingApplication.application), |
| | | new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | private void setGoodsIndex() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getRecommendIndex(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getRecommendIndex(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.recyclerviewhelper.ItemDragHelperCallback; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | * 获取分类列表 |
| | | */ |
| | | private void getUserItems() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getUserItems(CategoryReviseActivity.this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserItems(CategoryReviseActivity.this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | */ |
| | | private void saveData() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | JSONArray jsonArray = new JSONArray(); |
| | | if (items != null && items.size() > 0) { |
| | | for (int i = 0; i < items.size(); i++) { |
| | |
| | | String changeIds = jsonArray2.toJSONString(); |
| | | if (!ids.equalsIgnoreCase(changeIds)) { |
| | | sp.edit().putString("myCategory", ids).commit(); |
| | | ShoppingApi.saveUserItems(CategoryReviseActivity.this, uid, ids, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.saveUserItems(CategoryReviseActivity.this, UserUtil.getUid(ShoppingApplication.application), ids, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.OnDragVHListener; |
| | | import com.wpc.library.recyclerviewhelper.OnItemMoveListener; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | 还原导航栏数据 |
| | | */ |
| | | private void saveData() { |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.resetDefault(mContext, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.resetDefault(mContext, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import android.widget.FrameLayout; |
| | | import android.widget.TextView; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.widget.MyGridView; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | positiveButtonClickListener.onClick(dialog, |
| | | DialogInterface.BUTTON_POSITIVE); |
| | | |
| | | String uid = mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | String reason = ""; |
| | | for (int i = 0; i < adapter.chooseReasons.size(); i++) { |
| | | reason += adapter.chooseReasons.get(i) + ","; |
| | | } |
| | | ShoppingApi.deleteRecommendGoods(mContext, goodsId, uid, reason, goodsType, null); |
| | | ShoppingApi.deleteRecommendGoods(mContext, goodsId, UserUtil.getUid(ShoppingApplication.application), reason, goodsType, null); |
| | | } |
| | | }); |
| | | } |
| | |
| | | /* |
| | | 金币兑换列表数据获取 |
| | | */ |
| | | public void getGoldExchangeList(Context context, String uid, int page, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | public void getGoldExchangeList(Context context, Long uid, int page, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | ShoppingApi.getExchangeList(context, uid, page + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /* |
| | | 金币兑换验证 |
| | | */ |
| | | public void goExchangeGoodsVerify(Context context, String uid, String id, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | public void goExchangeGoodsVerify(Context context, Long uid, String id, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | ShoppingApi.goExchangeGoodsVerify(context, uid, id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /* |
| | | 金币兑换物品 |
| | | */ |
| | | public void goExchangeGoods(Context context, String uid, String id, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | public void goExchangeGoods(Context context, Long uid, String id, final GoldExchangeContract.goldExchangeListCallback callback) { |
| | | ShoppingApi.goExchangeGoods(context, uid, id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /* |
| | | 金币兑换验证 |
| | | */ |
| | | public void inviteCodeExchangeVerify(Context context, String uid, String id, final InviteCodeExchangeContract.inviteCodeExchangeCallback callback) { |
| | | public void inviteCodeExchangeVerify(Context context, Long uid, String id, final InviteCodeExchangeContract.inviteCodeExchangeCallback callback) { |
| | | ShoppingApi.inviteCodeExchangeVerify(context, uid, id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | /* |
| | | 金币兑换物品 |
| | | */ |
| | | public void inviteCodeExchange(Context context, String uid, String id, |
| | | public void inviteCodeExchange(Context context, Long uid, String id, |
| | | final InviteCodeExchangeContract.inviteCodeExchangeCallback callback) { |
| | | ShoppingApi.inviteCodeExchange(context, uid, id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | |
| | | import android.content.Context; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.gold.base.BasePresenter; |
| | | import com.tejia.lijin.app.ui.gold.contract.GoldExchangeContract; |
| | | import com.tejia.lijin.app.ui.gold.model.GoldExchangeModel; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | 金币兑换列表数据获取 |
| | | */ |
| | | public void getGoldExchangeList(Context context, int page) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.getGoldExchangeList(context, uid, page, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.getGoldExchangeList(context, UserUtil.getUid(ShoppingApplication.application), page, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGainListDataSuccess(jsonObject); |
| | |
| | | 金币兑换物品验证V |
| | | */ |
| | | public void goExchangeGoodsVerify(Context context, String id) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.goExchangeGoodsVerify(context, uid, id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.goExchangeGoodsVerify(context, UserUtil.getUid(ShoppingApplication.application), id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeVerifySuccess(jsonObject); |
| | |
| | | 金币兑换物品 |
| | | */ |
| | | public void goExchangeGoods(Context context, final String id) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.goExchangeGoods(context, uid, id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | |
| | | model.goExchangeGoods(context, UserUtil.getUid(ShoppingApplication.application), id, new GoldExchangeContract.goldExchangeListCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeSuccess(jsonObject, id); |
| | |
| | | |
| | | import android.content.Context; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.gold.base.BasePresenter; |
| | | import com.tejia.lijin.app.ui.gold.contract.InviteCodeExchangeContract; |
| | | import com.tejia.lijin.app.ui.gold.model.InviteCodeExchangeModel; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.json.JSONObject; |
| | | |
| | |
| | | 金币兑换物品验证 |
| | | */ |
| | | public void inviteCodeExchangeVerify(Context context, String id) { |
| | | String uid = context.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.inviteCodeExchangeVerify(context, uid, id, new InviteCodeExchangeContract.inviteCodeExchangeCallback() { |
| | | model.inviteCodeExchangeVerify(context, UserUtil.getUid(ShoppingApplication.application), id, new InviteCodeExchangeContract.inviteCodeExchangeCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeVerifySuccess(jsonObject); |
| | |
| | | 金币兑换物品 |
| | | */ |
| | | public void inviteCodeExchange(final String id) { |
| | | String uid = mContext.getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | model.inviteCodeExchange(mContext, uid, id, new InviteCodeExchangeContract.inviteCodeExchangeCallback() { |
| | | |
| | | model.inviteCodeExchange(mContext, UserUtil.getUid(ShoppingApplication.application), id, new InviteCodeExchangeContract.inviteCodeExchangeCallback() { |
| | | @Override |
| | | public void onSuccess(JSONObject jsonObject) { |
| | | mView.get().onGoExchangeSuccess(jsonObject, id); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.entity.GoodsDetail; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.common.GoodsConvertLinkJumpLink; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.mine.LoginSelectActivity; |
| | | import com.tejia.lijin.app.util.Constant; |
| | |
| | | private Activity mActivity; |
| | | private Context mContext; |
| | | private int type; |
| | | private GoodsDetail goodsDetail; |
| | | private GoodsDetailVO goodsDetail; |
| | | //淘宝是否授权成功 |
| | | private boolean taoBaoAuthSuccess = false; |
| | | private boolean pddAuthSuccess = false; |
| | | |
| | | public GoodsDetailPreEventManager(Activity activity, GoodsDetail goodsDetail) { |
| | | public GoodsDetailPreEventManager(Activity activity, GoodsDetailVO goodsDetail) { |
| | | this.mActivity = activity; |
| | | this.mContext = mActivity.getApplicationContext(); |
| | | this.goodsDetail = goodsDetail; |
| | |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Log.e("detail", "getTaoBaoH5AuthInfo--" + source); |
| | | String uid = UserUtil.getUid(mContext) + ""; |
| | | ShoppingApi.getTaoBaoAuthInfo(mContext, uid, goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(mContext, UserUtil.getUid(ShoppingApplication.application), goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | } |
| | | |
| | | public void isPDDAuthed(final boolean jumpAuth, final IAuthResult authResult) { |
| | | ShoppingApi.isPDDAuthed(mContext, UserUtil.getUid(mContext) + "", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.isPDDAuthed(mContext, UserUtil.getUid(ShoppingApplication.application), true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | |
| | | public void getPDDAuthInfo() { |
| | | ShoppingApi.getPDDAuthInfo(mContext, UserUtil.getUid(mContext) + "", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getPDDAuthInfo(mContext, UserUtil.getUid(ShoppingApplication.application), true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.callBack.PermissionInterface; |
| | | import com.tejia.lijin.app.entity.HomeBanner; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid + "", null, "share", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), UserUtil.getUid(ShoppingApplication.application), null, "share", true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.TrendsCategory; |
| | | import com.tejia.lijin.app.entity.TrendsInfo; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | |
| | | |
| | | @Override |
| | | public void onCopyClick(int position) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), "" + UserUtil.getUid(getContext()), true)) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(ShoppingApplication.application), true)) { |
| | | //复制 |
| | | ShoppingApi.copySpecialComment(getContext(), UserUtil.getUid(getContext()), mList.get(position).getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | 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.recommend.GoodsDetailActivity; |
| | | import com.tejia.lijin.app.ui.trends.SendCircleFragmet; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | |
| | | Window window = getWindow(); |
| | | window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS); |
| | | window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
| | | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE ); |
| | | | View.SYSTEM_UI_FLAG_LAYOUT_STABLE); |
| | | window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS); |
| | | window.setStatusBarColor(Color.TRANSPARENT); |
| | | int result = 0; |
| | |
| | | } else { |
| | | findViewById(R.id.v_status_bar).setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | EventBus.getDefault().register(this); |
| | |
| | | registeredOPPOId();//上传OPPO_RegId |
| | | // onPush_OFF_NO();//检测是否打开推送 |
| | | registeredVIVOId();//上传VIVO_RegId |
| | | |
| | | |
| | | tv_msg_num2.postDelayed(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //测试 |
| | | Bundle bundle = new Bundle(); |
| | | bundle.putString("goodsId", "19711731038"); |
| | | bundle.putString("goodsType", 1+""); |
| | | startActivity(new Intent(getApplicationContext(), GoodsDetailActivity.class).putExtras(bundle)); |
| | | } |
| | | },5000); |
| | | |
| | | |
| | | } |
| | | |
| | | private void choiceTab(Integer tab, Integer subTab) { |
| | |
| | | * 系统补充参数请求 |
| | | */ |
| | | private void getSystemParams() { |
| | | String uid = getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getSystemParams(MainActivity.this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSystemParams(MainActivity.this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | boolean isLogin = sp.getBoolean("isLogin", false); |
| | | v_no_login.setVisibility(isLogin ? View.INVISIBLE : View.VISIBLE); |
| | | getUnReadMsgCount(sp.getString("uid", "0"));//消息 未读数量 |
| | | getUnReadMsgCount(UserUtil.getUid(ShoppingApplication.application));//消息 未读数量 |
| | | |
| | | if (MiPushMessageReceiver.miPushMessage != null) {//打开小米推送 |
| | | MiPushMessage message = MiPushMessageReceiver.miPushMessage; |
| | |
| | | * |
| | | * @param uid |
| | | */ |
| | | private void getUnReadMsgCount(String uid) { |
| | | private void getUnReadMsgCount(Long uid) { |
| | | ShoppingApi.getUnReadMsgCount(this, uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * @param entity |
| | | */ |
| | | public void onEventMainThread(EventMessageEntity entity) { |
| | | getUnReadMsgCount(sp.getString("uid", "0")); |
| | | getUnReadMsgCount(UserUtil.getUid(ShoppingApplication.application)); |
| | | if (messagePush != null) { |
| | | // 这里就会调用我们Fragment中的MessagePush方法 |
| | | messagePush.MessagePush(true);//传入消息推送 |
| | |
| | | * @param homeMsgListListener |
| | | */ |
| | | private void getHomeMsgList(final getHomeMsgListListener homeMsgListListener) { |
| | | String uid = getSharedPreferences("user", |
| | | Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getHomeMsgList(this, uid, mPage + "", new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getHomeMsgList(this, UserUtil.getUid(ShoppingApplication.application), mPage + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | homeMsgListListener.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | if (MobileUtil.getDeviceBrand().equalsIgnoreCase("HUAWEI") |
| | | || MobileUtil.getDeviceBrand().equalsIgnoreCase("HONOR")) { |
| | | String uid = sp.getString("uid", "0"); |
| | | Log.e("eee", "HONOR: "); |
| | | //防止多次请求 |
| | | if (System.currentTimeMillis() - lastBindHWTime > 1000 * 5) {//5s后再请求 |
| | | lastBindHWTime = System.currentTimeMillis(); |
| | | Log.e("eee", "上传token"); |
| | | ShoppingApi.bindHMPush(MainActivity.this, token, uid, null); |
| | | ShoppingApi.bindHMPush(MainActivity.this, token, UserUtil.getUid(ShoppingApplication.application), null); |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | adapter = new MainMessageAdapter(rv_message.getContext(), mList, new IDeleteMessageListener() { |
| | | @Override |
| | | public void delete(final UserMessage msg) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) { |
| | | ShoppingApi.deleteMsg(getContext(), UserUtil.getUid(getContext()) + "", msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) { |
| | | ShoppingApi.deleteMsg(getContext(), UserUtil.getUid(getContext()) , msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | * 获取消息未读数量 |
| | | */ |
| | | private void getUnReadMsgCount() { |
| | | mPresenter.getUnReadMsgCount(mPresenter.getUID()); |
| | | mPresenter.getUnReadMsgCount(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | |
| | | /** |
| | | * 一键清空未读消息 |
| | | */ |
| | | private void setAllMsgRead() { |
| | | mPresenter.setAllMsgRead(mPresenter.getUID()); |
| | | mPresenter.setAllMsgRead(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | |
| | | @Override |
| | |
| | | boolean isLogin = sp.getBoolean("isLogin", false); |
| | | switch (v.getId()) { |
| | | case R.id.fl_order_notice: { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | |
| | | if (!isLogin) {//判断登陆 |
| | |
| | | break; |
| | | } |
| | | case R.id.fl_capital_notice: { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | if (!isLogin) {//判断登陆 |
| | | isChoice = true;//代表点击 |
| | |
| | | break; |
| | | } |
| | | case R.id.fl_account_notice: { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | if (!isLogin) {//判断登陆 |
| | | isChoice = true;//代表点击 |
| | |
| | | break; |
| | | } |
| | | case R.id.fl_invite_notice: { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | if (!isLogin) {//判断登陆 |
| | | isChoice = true;//代表点击 |
| | |
| | | break; |
| | | } |
| | | case R.id.fl_other_msg: { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | if (!isLogin) {//判断登陆 |
| | | isChoice = true;//代表点击 |
| | |
| | | break; |
| | | } |
| | | case R.id.ll_critical_notice://系统消息 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | if (!isLogin) {//判断登陆 |
| | | UserUtil.jumpLogin(fl_order_notice.getContext()); |
| | |
| | | * 消息中心红包 |
| | | */ |
| | | private void getMSGConfig() { |
| | | mPresenter.getMSGConfig(mPresenter.getUID()); |
| | | mPresenter.getMSGConfig(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.CircleBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.message.UserMessageActivity; |
| | | import com.tejia.lijin.app.util.ui.HomeUIUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | |
| | | @Override |
| | | public void onCreateView(View contentView, Bundle savedInstanceState) { |
| | | mineFunctionsManager = new MineFunctionsManager(getContext()); |
| | | String inviteCode = UserUtil.getInviteCode(getContext(), null); |
| | | String inviteCode = UserUtil.getInviteCode(getContext()); |
| | | init(contentView); |
| | | listener(contentView); |
| | | app = new UpdateApp(getActivity(), getResources().getString(R.string.update_key)); |
| | |
| | | public void onResume() { |
| | | super.onResume(); |
| | | getUserConfig(); |
| | | getUnReadMsgCount(UserUtil.getUid(getContext()) + ""); |
| | | getUnReadMsgCount(UserUtil.getUid(getContext())); |
| | | MobclickAgent.onPageStart("我的"); |
| | | SharedPreferences sp = tv_nickName.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | |
| | | tv_user_num.setVisibility(View.VISIBLE); |
| | | ll_nick_name_vip.setVisibility(View.VISIBLE); |
| | | tv_nickName.setVisibility(View.VISIBLE); |
| | | String uid = sp.getString("uid", "0"); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | if (lastTime > 0 && (System.currentTimeMillis() - lastTime > 30 * 1000)) { |
| | | clickState = 0; |
| | | } |
| | | if (!uid.equalsIgnoreCase("0")) { |
| | | if (uid != null) { |
| | | String userInfo = sp.getString("userinfo", ""); |
| | | if (!StringUtils.isEmpty(userInfo)) { |
| | | try { |
| | |
| | | break; |
| | | |
| | | case R.id.fl_msg: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | startActivity(new Intent(getContext(), UserMessageActivity.class)); |
| | | break; |
| | | |
| | | case R.id.tv_nickname: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | if (!isLogin) {//登录淘宝 |
| | | UserUtil.jumpLogin(tv_nickName.getContext()); |
| | |
| | | |
| | | //头像 |
| | | case R.id.iv_portrait: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | UserCustomEvent.userMyInfo(ll_notice.getContext()); |
| | | if (!isLogin) {//登录 |
| | |
| | | break; |
| | | //账户余额 |
| | | case R.id.ll_balance: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | UserCustomEvent.userBalance(tv_user_num.getContext()); |
| | | if (isLogin) { |
| | |
| | | }, 200); |
| | | |
| | | |
| | | ShoppingApi.getUserMoneyInfo(getContext(), getContext().getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserMoneyInfo(getContext(), UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | ll_balance.setEnabled(true); |
| | |
| | | |
| | | |
| | | case R.id.iv_vip: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | //跳转到vip |
| | | if (userInviteLevel != null && !StringUtils.isEmpty(userInviteLevel.getLink())) |
| | |
| | | private UserInviteLevel userInviteLevel;//用户邀请等级 |
| | | |
| | | /****用户信息*/ |
| | | private void getUserInfo(final String uid) { |
| | | private void getUserInfo(final Long uid) { |
| | | ShoppingApi.getUserInfo2(tv_nickName.getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | String inviteCode = data.optString("invitCode"); |
| | | UserUtil.setInviteCode(getContext(), uid, inviteCode); |
| | | UserUtil.setInviteCode(getContext(), inviteCode); |
| | | vipLink = data.optString("vipLink"); |
| | | moduleState = data.optJSONObject("moduleState"); |
| | | if (mineFunctionsManager != null) |
| | |
| | | * |
| | | * @param uid |
| | | */ |
| | | private void user_recordBind(String uid) { |
| | | private void user_recordBind(Long uid) { |
| | | ShoppingApi.setRecordBind(tv_nickName.getContext(), uid, null); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param uid |
| | | */ |
| | | private void getUnReadMsgCount(String uid) { |
| | | private void getUnReadMsgCount(Long uid) { |
| | | ShoppingApi.getUnReadMsgCount(getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.EntityFather; |
| | | import com.tejia.lijin.app.entity.FirstCategory; |
| | | import com.tejia.lijin.app.entity.TrendsType; |
| | |
| | | |
| | | boolean isLogin = sp.getBoolean("isLogin", false); |
| | | if (isLogin) { |
| | | String uid = sp.getString("uid", "0"); |
| | | if (!uid.equalsIgnoreCase("0")) { |
| | | getUserInfo(uid); |
| | | } |
| | | getUserInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | if (accountLogin && floatImgDetail != null) {//弹框需要登陆 |
| | | accountLogin = false; |
| | | final String showTime = floatImgDetail.optString("showTime"); // everyday-每天显示 always-每次进来都显示 |
| | |
| | | |
| | | |
| | | private void getHomeConfig() { |
| | | String uid = getContext().getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | if (!StringUtils.isEmpty(uid) && !uid.equalsIgnoreCase("0")) |
| | | lastRquestHomeConfigUid = Long.parseLong(uid); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | if (uid != null) |
| | | lastRquestHomeConfigUid = uid; |
| | | ShoppingApi.getHomeConfig(ll_recommend_content.getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | } |
| | | if (mList.size() == 0) |
| | | pd.show(); |
| | | String uid = ll_recommend_content.getContext().getSharedPreferences("user", |
| | | MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getHomeNavbar(ll_recommend_content.getContext(), uid, |
| | | |
| | | ShoppingApi.getHomeNavbar(ll_recommend_content.getContext(), UserUtil.getUid(ShoppingApplication.application), |
| | | new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | |
| | | |
| | | String openid; |
| | | |
| | | private void getUserInfo(final String uid) { |
| | | private void getUserInfo(final Long uid) { |
| | | ShoppingApi.getUserInfo2(ll_no_data.getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | }.getType()); |
| | | openid = info.getOpenid(); |
| | | String inviteCode = data.optString("invitCode"); |
| | | UserUtil.setInviteCode(getContext(), uid, inviteCode); |
| | | UserUtil.setInviteCode(getContext(), inviteCode); |
| | | } |
| | | } |
| | | |
| | |
| | | private void getShopList(String id) { |
| | | //精选 |
| | | SharedPreferences sp = getActivity().getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getShopList(ll_recommend_content.getContext(), 1 + "", id, (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getShopList(ll_recommend_content.getContext(), 1 + "", id, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | //精选 |
| | | if (id.equals("0")) { |
| | | SharedPreferences sp = getActivity().getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getHistory(ll_recommend_content.getContext(), "1", (sp.getBoolean("isLogin", false) ? sp.getString("uid", "0") : null), "1", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHistory(ll_recommend_content.getContext(), "1", UserUtil.getUid(ShoppingApplication.application), "1", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | */ |
| | | private void getMessage() { |
| | | SharedPreferences sp = ll_recommend_content.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getHomeMsgList(ll_recommend_content.getContext(), uid, 1 + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHomeMsgList(ll_recommend_content.getContext(), UserUtil.getUid(ShoppingApplication.application), 1 + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | DiskLruCache.Editor editor = cache |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | |
| | | } |
| | | |
| | | private void getMailList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getMailList(AppMailActivity.this, uid, page + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMailList(AppMailActivity.this, UserUtil.getUid(ShoppingApplication.application), page + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import android.view.View; |
| | | import android.widget.TextView; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.common.DateUtils; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | } |
| | | |
| | | private void openMsg(String id) { |
| | | ShoppingApi.openMessage(AppMailDetailActivity.this, getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"), id,null); |
| | | ShoppingApi.openMessage(AppMailDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), id,null); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | * |
| | | */ |
| | | private void getSystemMessage() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getSystemMsgList(this, uid, mPage + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSystemMsgList(this, UserUtil.getUid(ShoppingApplication.application), mPage + "", new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | } |
| | | |
| | | private void setSystemMsgSolved(String id, final TextView tv) { |
| | | String uid = mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.setSystemMsgSolved(mContext, uid, id, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.setSystemMsgSolved(mContext, UserUtil.getUid(ShoppingApplication.application), id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import android.graphics.drawable.AnimationDrawable; |
| | | import android.os.Bundle; |
| | | import android.provider.Settings; |
| | | |
| | | import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; |
| | | import androidx.recyclerview.widget.LinearLayoutManager; |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import android.view.LayoutInflater; |
| | | import android.view.View; |
| | | import android.widget.ImageView; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.downutil.StringUtils; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | |
| | | srl_user_message.setColorSchemeColors(getResources().getColor(R.color.theme)); |
| | | |
| | | String title = getIntent().getStringExtra("title"); |
| | | title= StringUtils.isNullOrEmpty(title)?"消息":title; |
| | | title = StringUtils.isNullOrEmpty(title) ? "消息" : title; |
| | | tv_middle.setText(title); |
| | | |
| | | if (title.equals("邀请消息")) { |
| | |
| | | } else if (title.equals("其它消息") || title.equals("账号消息")) { |
| | | tv_no_data_hint.setText("主人,我这里空空如也~"); |
| | | iv_no_data.setImageDrawable(getResources().getDrawable(R.drawable.ic_msg_other_null)); |
| | | }else{ |
| | | } else { |
| | | tv_no_data_hint.setText("暂无消息"); |
| | | } |
| | | |
| | | MessageCustomEvent.msgItemClick(UserMessageActivity.this, title); |
| | | mList = new ArrayList<>(); |
| | | adapter = new UserMessageAdapter(this, mList,new IDeleteMessageListener() { |
| | | adapter = new UserMessageAdapter(this, mList, new IDeleteMessageListener() { |
| | | @Override |
| | | public void delete(final UserMessage msg) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) { |
| | | ShoppingApi.deleteMsg(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() { |
| | | if (LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()), true)) { |
| | | ShoppingApi.deleteMsg(getApplicationContext(), UserUtil.getUid(getApplicationContext()), msg.getType(), msg.getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | | if (jsonObject.optInt("code") == 0) { |
| | | for (int i = 0; i < mList.size(); i++) { |
| | | if (mList.get(i)!= null && msg.getId().equalsIgnoreCase(mList.get(i).getId()) && msg.getType().equalsIgnoreCase(mList.get(i).getType())) { |
| | | if (mList.get(i) != null && msg.getId().equalsIgnoreCase(mList.get(i).getId()) && msg.getType().equalsIgnoreCase(mList.get(i).getType())) { |
| | | mList.remove(i); |
| | | adapter.notifyDataSetChanged(); |
| | | Toast.makeText(getApplicationContext(), "删除成功", Toast.LENGTH_SHORT).show(); |
| | |
| | | |
| | | @Override |
| | | public void onNetworkUnAvailable() { |
| | | if (mList.size()==0) |
| | | if (mList.size() == 0) |
| | | requestState(3); |
| | | } |
| | | |
| | |
| | | * |
| | | */ |
| | | private void getMsgList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | String type = getIntent().getStringExtra("type"); |
| | | ShoppingApi.getMsgList(this, uid, mPage + "", type, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMsgList(this, UserUtil.getUid(ShoppingApplication.application), mPage + "", type, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | | import com.wpc.library.dialog.dateselect.DateFormatUtils; |
| | |
| | | |
| | | |
| | | private void getAccountDesc(final int type) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getUserMoneyDetailList(this, uid, index, mYear, mMonth, type, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserMoneyDetailList(this, UserUtil.getUid(ShoppingApplication.application), index, mYear, mMonth, type, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.widget.ResizableImageView; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | * 获取账户信息 |
| | | */ |
| | | private void getRankInfo() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getRankInfo(AccountGradeActivity.this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getRankInfo(AccountGradeActivity.this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | private TextView iv_wchatactivation_none;//没有上级激活码 |
| | | |
| | | private boolean islogin = false;//是否登陆 |
| | | private String uid = "0";//用户id |
| | | private Long uid;//用户id |
| | | |
| | | String tag1 = "invite/verifyCode"; |
| | | String tag2 = "invite/verifyWX"; |
| | |
| | | super.onResume(); |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | islogin = sp.getBoolean("isLogin", false);//是否登陆 |
| | | uid = sp.getString("uid", "0");//用户id |
| | | uid = UserUtil.getUid(ShoppingApplication.application); |
| | | |
| | | if (iv_close.getContext() != null && wxonclick && islogin) { //判断是否 点击微信授权激活 |
| | | wxonclick = false; |
| | |
| | | * @param uid 用户id |
| | | * @param editContent 邀请码 |
| | | */ |
| | | private void getActivationInvite(final String uid, String editContent) { |
| | | private void getActivationInvite(final Long uid, String editContent) { |
| | | ShoppingApi.getActivationInvite(this, uid, editContent, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code", 1001) == 0) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | String inviteCode = data.optString("inviteCode"); |
| | | UserUtil.setInviteCode(getApplicationContext(), uid, inviteCode); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode); |
| | | MyDialog("邀请码激活成功"); |
| | | } else { |
| | | MyDialog(jsonObject.optString("msg") + ""); |
| | |
| | | * @param uid 用户id |
| | | * @param Wxcode 微信code |
| | | */ |
| | | private void isWechatActivation(final String uid, String Wxcode) { |
| | | private void isWechatActivation(final Long uid, String Wxcode) { |
| | | ShoppingApi.getActivationInviteWX(this, uid, Wxcode, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code", 1001) == 0) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | String inviteCode = data.optString("inviteCode"); |
| | | UserUtil.setInviteCode(getApplicationContext(), uid, inviteCode); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode); |
| | | MyDialog("邀请码激活成功"); |
| | | } else { |
| | | String title = "微信激活邀请码失败"; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | } |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getSpecialActivity(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSpecialActivity(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.ClearEditText; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | } |
| | | |
| | | private void getZFBInfo() { |
| | | ShoppingApi.getZFBInfo(this, getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getZFBInfo(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void addAccount() { |
| | | ShoppingApi.addZhifubaoAccount(AddZhifuBaoAccountActivity.this, getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"), |
| | | ShoppingApi.addZhifubaoAccount(AddZhifuBaoAccountActivity.this, UserUtil.getUid(ShoppingApplication.application), |
| | | et_real_name.getText().toString(), et_zhifubao_account.getText().toString(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | * 用户资金统计 |
| | | */ |
| | | private void getUserMoneyStatistic() { |
| | | String uid = this.getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getMoneyStatistic(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMoneyStatistic(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | } |
| | | |
| | | private void getUserMoney() { |
| | | String uid = this.getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getUserMoneyInfo(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserMoneyInfo(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | private int count = 999; |
| | | |
| | | private void setData() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.getCollectioList(this, page + "", uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getCollectioList(this, page + "", UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | private void delete() { |
| | | if ((!StringUtils.isEmpty(adapter.getSelectedIds()) && type.equalsIgnoreCase("0")) || type.equalsIgnoreCase("1")) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.deleteCollect(Collect28Activity.this, adapter.getSelectedIds(), type, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.deleteCollect(Collect28Activity.this, adapter.getSelectedIds(), type, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | * 用户创建红包记录 |
| | | */ |
| | | private void setData() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getv2ShareRecord(this, uid, page + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getv2ShareRecord(this, UserUtil.getUid(ShoppingApplication.application), page + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | iv_order_coursetxt.setText("京东中复制订单号教程"); |
| | | et_orderId.setHint("请输入或粘贴京东订单号"); |
| | | TYPE = "orderFindJD"; |
| | | }else if (id == 4) {//唯品会 |
| | | } else if (id == 4) {//唯品会 |
| | | uir = R.drawable.ic_order_appeal_buttomvip; |
| | | iv_order_coursetxt.setText("唯品会中复制订单号教程"); |
| | | et_orderId.setHint("请输入或粘贴唯品会订单号"); |
| | | TYPE = "orderFindVIP"; |
| | | }else if (id == 5) {//苏宁 |
| | | } else if (id == 5) {//苏宁 |
| | | uir = R.drawable.ic_order_appeal_buttomsuning; |
| | | iv_order_coursetxt.setText("苏宁中复制订单号教程"); |
| | | et_orderId.setHint("请输入或粘贴苏宁订单号"); |
| | |
| | | } |
| | | |
| | | private void referAppeal() { |
| | | String uid = getContext().getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | // String uid = "323922"; |
| | | if (StringUtils.isEmpty(uid)) { |
| | | if (uid == null) { |
| | | // SingleToast.showToast(OrderAppealActivity.this, "登录后才能申诉"); |
| | | Toast.makeText(getContext(), "登录后才能找回", Toast.LENGTH_SHORT).show(); |
| | | return; |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | | import com.wpc.library.dialog.dateselect.DateFormatUtils; |
| | |
| | | } |
| | | |
| | | private void getAccountDesc() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getGoldDetails(this, uid, index, mYear, mMonth, type + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoldDetails(this, UserUtil.getUid(ShoppingApplication.application), index, mYear, mMonth, type + "", new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | * |
| | | */ |
| | | private void getHongBaoSendRecordList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getHongBaoSendRecordList(this, uid+"", mPage + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHongBaoSendRecordList(this, UserUtil.getUid(ShoppingApplication.application), mPage + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | //保存邀请码 |
| | | String inviteCode = data.optString("inviteCode"); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode, info.getId()); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode); |
| | | Toast.makeText(getApplicationContext(), "恭喜你,登录成功", Toast.LENGTH_SHORT).show(); |
| | | setResult(100); |
| | | finish(); |
| | |
| | | tv_input_error, tv_top_hint; |
| | | private VerifyCodeViewShowLine et_verify_code_num; |
| | | LinearLayout ll_verify_code_error; |
| | | String uid; |
| | | Long uid; |
| | | String mobileNum; |
| | | |
| | | private int type;//类型 |
| | |
| | | mobileNum = getIntent().getStringExtra("mobile"); |
| | | tv_mobile_num.setText("验证码已发送至+86 " + mobileNum); |
| | | |
| | | uid = getIntent().getStringExtra("uid"); |
| | | uid = getIntent().getLongExtra("uid", 0L); |
| | | String from = getIntent().getStringExtra("from"); |
| | | key = getIntent().getStringExtra("key"); |
| | | type = getIntent().getIntExtra("type", LoginSelectActivity.TYPE_LOGIN); |
| | |
| | | |
| | | //保存邀请码 |
| | | String inviteCode = data.optString("inviteCode"); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode, info.getId()); |
| | | UserUtil.setInviteCode(getApplicationContext(), inviteCode); |
| | | if (StringUtils.isNullOrEmpty(inviteCode)) { |
| | | startActivity(new Intent(LoginVerifyCodeActivity.this, ActivationInviteCodeAcitvity.class)); |
| | | } else { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | |
| | | |
| | | private void setData() { |
| | | ShoppingApi.getFootmark(this, page + "", getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getFootmark(this, page + "", UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | private void delete() { |
| | | if ((!StringUtils.isEmpty(adapter.getSelectedIds()) && type.equalsIgnoreCase("0")) || type.equalsIgnoreCase("1")) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.deleteFootmark(MyFootmarkActivity.this, adapter.getSelectedIds(), type, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.deleteFootmark(MyFootmarkActivity.this, adapter.getSelectedIds(), type, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | case R.id.ll_info_pdd_share: |
| | | if (buy == null) |
| | | buy = false; |
| | | ShoppingApi.getPDDAuthInfo(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", buy, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getPDDAuthInfo(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , buy, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | * 保存用户信息 |
| | | */ |
| | | private void saveInfo(String nickName, String weixin, final Integer sex) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.saveInfo(this, uid, nickName, weixin, sex, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.saveInfo(this, UserUtil.getUid(ShoppingApplication.application), nickName, weixin, sex, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | 绑定淘宝授权 |
| | | */ |
| | | private void getTaoBaoH5AuthInfo() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(MyInfoActivity.this, uid, "", "bind", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(MyInfoActivity.this, UserUtil.getUid(ShoppingApplication.application), "", "bind", true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | VIPActionInfo vipAction = null; |
| | | |
| | | private void getUserInfo(String uid) { |
| | | ShoppingApi.getUserInfo2(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserInfo2(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | final SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | | mUid = sp.getString("uid", "0"); |
| | | ShoppingApi.uploadPortrait(this, mUid, photo, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.uploadPortrait(this, UserUtil.getUid(ShoppingApplication.application), photo, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import android.widget.Toast; |
| | | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | final SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | | String inviteCode = et_invitecode.getText().toString(); |
| | | ShoppingApi.saveInfo(this, sp.getString("uid", "0"), |
| | | ShoppingApi.saveInfo(this, UserUtil.getUid(ShoppingApplication.application), |
| | | null, null, null, inviteCode,null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | |
| | | |
| | | private void getMoneyDetail(final int type) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getIncomeDetail(this, uid, dateType, date, type, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getIncomeDetail(this, UserUtil.getUid(ShoppingApplication.application), dateType, date, type, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | | import com.wpc.library.dialog.dateselect.DateFormatUtils; |
| | |
| | | * 获取列表 |
| | | */ |
| | | private void getHistoryDetail(String date) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | |
| | | ShoppingApi.getHistoryDetail(this, uid, dateType, date, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHistoryDetail(this, UserUtil.getUid(ShoppingApplication.application), dateType, date, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import android.widget.Toast; |
| | | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | private void saveInfo() { |
| | | final SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | | ShoppingApi.saveInfo(this, sp.getString("uid", "0"), mynickanme_memoName.getText().toString(), null, null, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.saveInfo(this, UserUtil.getUid(ShoppingApplication.application), mynickanme_memoName.getText().toString(), null, null, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) {//修改成功 |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | | import com.wpc.library.dialog.dateselect.DateFormatUtils; |
| | |
| | | * 队员-统计数量+上级 |
| | | */ |
| | | private void getcountMyTeam() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getCountMyTeam(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getCountMyTeam(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getMyPlayer() { |
| | | // String uid = "535776"; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getMyTeamV2(this, uid, page, null, Integer.parseInt(type), null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMyTeamV2(this, UserUtil.getUid(ShoppingApplication.application), page, null, Integer.parseInt(type), null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | String inviteTime = ""; |
| | | |
| | | private void getMyPlayer() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getMyTeamV2(this, uid, page, key, Integer.parseInt(type), screenInfo, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMyTeamV2(this, UserUtil.getUid(ShoppingApplication.application), page, key, Integer.parseInt(type), screenInfo, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | return; |
| | | } |
| | | |
| | | ShoppingApi.saveInfo(this, sp.getString("uid", "0"), |
| | | ShoppingApi.saveInfo(this, UserUtil.getUid(ShoppingApplication.application), |
| | | null, binding.etWechatNum.getText().toString(), null, null, erCodeFile, |
| | | new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | |
| | | if (!StringUtils.isEmpty(endTime)) { |
| | | endTime = DateFormatUtils.long2Str2(DateFormatUtils.str2Long2(startTime, "yyyy.MM.dd"), "yyyy-MM-dd"); |
| | | } |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | ShoppingApi.getOrderList1(this, page + "", uid, state, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | |
| | | 商品详情免单券弹框接口 |
| | | */ |
| | | private void getGoodsCouponList(final OrderFilter orderFilter) { |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getOrderCouponList(mContext, uid, orderFilter.getOrderNo(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getOrderCouponList(mContext, UserUtil.getUid(ShoppingApplication.application), orderFilter.getOrderNo(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | |
| | | private void useRewardTicket(FreeSingleTicket info, final OrderFilter orderFilter) { |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useRewardTicket(mContext, uid, info.getId(), orderFilter.getOrderNo(), |
| | | ShoppingApi.useRewardTicket(mContext, UserUtil.getUid(ShoppingApplication.application), info.getId(), orderFilter.getOrderNo(), |
| | | orderFilter.getSourceType(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | */ |
| | | private void getLostOrderList() { |
| | | SharedPreferences sp = getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.getLostOrderList(this, uid, page + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getLostOrderList(this, UserUtil.getUid(ShoppingApplication.application), page + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | */ |
| | | private void deleteAllLostOrder() { |
| | | SharedPreferences sp = getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.deleteAllLostOrder(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.deleteAllLostOrder(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.LostOrder; |
| | | import com.tejia.lijin.app.ui.dialog.OrderAppealHistoryDeleteHintDialog; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | */ |
| | | private void deleteLostOrder(final LostOrder info) { |
| | | SharedPreferences sp = mContext.getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | // String uid = "323922"; |
| | | ShoppingApi.deleteLostOrder(mContext, uid, info.getId(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.deleteLostOrder(mContext, UserUtil.getUid(ShoppingApplication.application), info.getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.UserInfo; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | if (null == dialog) |
| | | dialog = new ShapeLoadingDialog.Builder(OrderSatisticsActivity.this).build(); |
| | | dialog.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getOrderStatistics(this, uid, 0, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getOrderStatistics(this, UserUtil.getUid(ShoppingApplication.application), 0, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | if (null == dialog) |
| | | dialog = new ShapeLoadingDialog.Builder(OrderSatisticsActivity.this).build(); |
| | | dialog.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | |
| | | ShoppingApi.getOrderStatistics(this, uid, goodsType, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getOrderStatistics(this, UserUtil.getUid(ShoppingApplication.application), goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | } |
| | | |
| | | private void getOrderList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getOrderList3(this, page + "", uid, orderNo, |
| | | ShoppingApi.getOrderList3(this, page + "", UserUtil.getUid(ShoppingApplication.application), orderNo, |
| | | new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.BaseFragmentActivity; |
| | | import com.tejia.lijin.app.util.CancelSlideViewPage; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public String getUid(Context mContext) { |
| | | return mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | public Long getUid(Context mContext) { |
| | | return UserUtil.getUid(mContext); |
| | | } |
| | | |
| | | public class MyTeamMarkAdapter extends FragmentPagerAdapter { |
| | |
| | | import com.ali.auth.third.core.util.StringUtil; |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | if (et_memoName.getText() != null && !StringUtils.isEmpty(et_memoName.getText().toString())) { |
| | | memoName = et_memoName.getText().toString(); |
| | | } |
| | | ShoppingApi.saveMemoName(getContext(), uid + "", inviteId, memoName, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.saveMemoName(getContext(), uid , inviteId, memoName, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | public String getUid(Context mContext) { |
| | | return mContext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | public Long getUid(Context mContext) { |
| | | return UserUtil.getUid(ShoppingApplication.application); |
| | | } |
| | | |
| | | @Override |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.dialog.dateselect.CustomDatePicker; |
| | | import com.wpc.library.dialog.dateselect.DateFormatUtils; |
| | |
| | | * 获取红包明细 |
| | | */ |
| | | private void getAccountDesc() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getMoneyDetails(this, uid, index, mYear, mMonth, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getMoneyDetails(this, UserUtil.getUid(ShoppingApplication.application), index, mYear, mMonth, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | return; |
| | | } |
| | | ((Dialog) var1).dismiss(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.exchangeCash(PromotionRedenvelopeActivity.this, uid, var2.toString(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.exchangeCash(PromotionRedenvelopeActivity.this, UserUtil.getUid(ShoppingApplication.application), var2.toString(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | return; |
| | | } |
| | | ((Dialog) var1).dismiss(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.giveTLJ(PromotionRedenvelopeActivity.this, uid, var2.toString(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.giveTLJ(PromotionRedenvelopeActivity.this, UserUtil.getUid(ShoppingApplication.application), var2.toString(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | * 统计红包获得及使用情况 |
| | | */ |
| | | private void getcountHongBao() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getcountHongBao(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getcountHongBao(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.widget.RatioLayout; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | } |
| | | |
| | | private void getHongbaoDetails(String type) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getHongbaoDetails(this, uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getHongbaoDetails(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.google.gson.stream.JsonReader; |
| | | import com.google.gson.stream.JsonWriter; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | |
| | | |
| | | private void getData() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getPushRecommendhistory(this, page + "", uid, "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getPushRecommendhistory(this, page + "", UserUtil.getUid(ShoppingApplication.application), "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | private TextView tv_top_left, tv_top_middle, tv_mobile_num, tv_send, tv_count_down; |
| | | private EditText et_num; |
| | | private LinearLayout ll_code; |
| | | String uid; |
| | | Long uid; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | |
| | | tv_top_left.setOnClickListener(this); |
| | | tv_send.setOnClickListener(this); |
| | | tv_count_down.setOnClickListener(this); |
| | | uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | uid = UserUtil.getUid(ShoppingApplication.application); |
| | | getUserInfo(); |
| | | } |
| | | |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | } |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.sendSms(ReviseAccountActivity.this, uid, phone, 1 + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.sendSms(ReviseAccountActivity.this, UserUtil.getUid(ShoppingApplication.application), phone, 1 + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | private void extractMoneyNew(String code) { |
| | | String money = getIntent().getStringExtra("money"); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.extractmoneynew(ReviseAccountActivity.this, money, uid, code, "1", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.extractmoneynew(ReviseAccountActivity.this, money, UserUtil.getUid(ShoppingApplication.application), code, "1", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.SystemCommon; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | |
| | | /* 商品详情免单券弹框接口 |
| | | */ |
| | | private void getGoodsCouponList(final OrderFilter orderFilter) { |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getOrderCouponList(mContext, uid, orderFilter.getOrderNo(), new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getOrderCouponList(mContext, UserUtil.getUid(ShoppingApplication.application), orderFilter.getOrderNo(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void useRewardTicket(FreeSingleTicket info, final OrderFilter orderFilter) { |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useRewardTicket(mContext, uid, info.getId(), orderFilter.getOrderNo(), orderFilter.getSourceType(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useRewardTicket(mContext, UserUtil.getUid(ShoppingApplication.application), info.getId(), orderFilter.getOrderNo(), orderFilter.getSourceType(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | } |
| | | |
| | | private void getOrderList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | // String uid = "437032"; |
| | | String state = getIntent().getStringExtra("state"); |
| | | ShoppingApi.getOrderList2(this, page + "", uid, orderState + "" |
| | | ShoppingApi.getOrderList2(this, page + "", UserUtil.getUid(ShoppingApplication.application), orderState + "" |
| | | , type, startTime, endTime, slotTime, needCount + "", dateType, |
| | | goodsType, state, new BasicTextHttpResponseHandler() { |
| | | |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.google.gson.Gson; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | |
| | | * 获取分享库数据 |
| | | */ |
| | | public void setData() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | tv_top_bar_right.setEnabled(false); |
| | | if (page > 1) { |
| | | bottom.setVisibility(View.VISIBLE); |
| | | } else { |
| | | bottom.setVisibility(View.GONE); |
| | | } |
| | | mPresenter.getSelectioStoreHouseList(page + "", uid, goodsType + ""); |
| | | mPresenter.getSelectioStoreHouseList(page + "", UserUtil.getUid(ShoppingApplication.application), goodsType + ""); |
| | | } |
| | | |
| | | ShapeLoadingDialog pd = null; |
| | |
| | | if (shareGoodsList.size() > 0) { |
| | | //请求分享 |
| | | String idsString = new Gson().toJson(ids); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.shareSelectStoreHouse(this, idsString, uid, goodsType, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.shareSelectStoreHouse(this, idsString, UserUtil.getUid(ShoppingApplication.application), goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | } |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | String ids = "";//获取要删除的商品ID |
| | | if (goodsType == 1) {//淘宝 |
| | | ids = JSONArray.parseArray(JSON.toJSONString(adapter.selectList)).toJSONString(); |
| | |
| | | ids = JSONArray.parseArray(JSON.toJSONString(adapter.selectListPDD)).toJSONString(); |
| | | } |
| | | //请求删除选择商品 |
| | | mPresenter.deleteSelectStoreHouse(ids, uid); |
| | | mPresenter.deleteSelectStoreHouse(ids, UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.bumptech.glide.Glide; |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.util.DataCleanManager; |
| | | import com.wpc.library.util.GetManifestDataUtil; |
| | | import com.wpc.library.util.SystemCommon; |
| | |
| | | case R.id.ll_exit_account://退出登陆 |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | if (sp.getBoolean("isLogin", false)) { |
| | | ShoppingApi.loginOut(SettingActivity.this, sp.getString("uid", ""), null); |
| | | ShoppingApi.loginOut(SettingActivity.this, UserUtil.getUid(ShoppingApplication.application), null); |
| | | UserUtil.logout(SettingActivity.this); |
| | | loginOut(); |
| | | } |
| | | break; |
| | | case R.id.ll_person_info: |
| | | |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | |
| | | if (getSharedPreferences("user", MODE_PRIVATE).getBoolean("isLogin", false)) { |
| | |
| | | } |
| | | break; |
| | | case R.id.ll_account_grade: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | startActivity(new Intent(SettingActivity.this, AccountGradeActivity.class)); |
| | | break; |
| | |
| | | */ |
| | | private void setModuleState() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | JSONObject params1 = new JSONObject(); |
| | | try { |
| | | params1.put("cancelNotice", (cb_msg.isChecked() ? 1 : 0)); |
| | |
| | | |
| | | } |
| | | |
| | | ShoppingApi.setModuleState(getApplicationContext(), uid, params1.toString(), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.setModuleState(getApplicationContext(), UserUtil.getUid(ShoppingApplication.application), params1.toString(), new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | |
| | | private void addSelection() { |
| | | if (adapter.getSelectedIds().size() > 0) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | String ids = JSONArray.parseArray(JSON.toJSONString(adapter.getSelectedIds())).toJSONString(); |
| | | ShoppingApi.addSelection(ShareGoodsActivity31.this, uid, ids, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.addSelection(ShareGoodsActivity31.this, UserUtil.getUid(ShoppingApplication.application), ids, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | * 获取分享记录 |
| | | */ |
| | | private void getShareRecord() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getShareRecord(this, uid, page + "", from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getShareRecord(this, UserUtil.getUid(ShoppingApplication.application), page + "", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.util.SystemCommon; |
| | |
| | | TbPidInfo tInfo; |
| | | |
| | | private void getTaoBaoCartConfig() { |
| | | String uid = iv_top_bar_right.getContext().getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getTaoBaoCartConfig(iv_top_bar_right.getContext(), uid, "cart" |
| | | ShoppingApi.getTaoBaoCartConfig(iv_top_bar_right.getContext(), UserUtil.getUid(ShoppingApplication.application), "cart" |
| | | , new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | */ |
| | | private void getTBLinkInfo(String goodsId) { |
| | | SharedPreferences sp = iv_top_bar_right.getContext().getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getTBLinkInfo(iv_top_bar_right.getContext(), uid, goodsId, "convertLink", null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTBLinkInfo(iv_top_bar_right.getContext(), UserUtil.getUid(ShoppingApplication.application), goodsId, "convertLink", null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | } |
| | | |
| | | private void unbindPhone(String phone) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | |
| | | ShoppingApi.unbindPhone(this, uid, phone, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.widget.ResizableImageView; |
| | |
| | | } |
| | | if (mList.size() == 0) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getWelfareCenterList(this, page + "", uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getWelfareCenterList(this, page + "", UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | */ |
| | | private void sendCoupon(String id, final int position) { |
| | | SharedPreferences sp = mContext.getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.sendCoupon(mContext, uid, id, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.sendCoupon(mContext, UserUtil.getUid(ShoppingApplication.application), id, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wang.avi.AVLoadingIndicatorView; |
| | | import com.wpc.library.util.DecimalDigitsInputFilter; |
| | | import com.wpc.library.util.MarketUtils; |
| | |
| | | } |
| | | if (StringUtils.isEmpty(phone)) { |
| | | Intent intent = new Intent(WithdrawCashActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("uid", UserUtil.getUid(getApplicationContext()) + ""); |
| | | intent.putExtra("uid", UserUtil.getUid(getApplicationContext()) ); |
| | | intent.putExtra("type", LoginSelectActivity.TYPE_BIND); |
| | | startActivity(intent); |
| | | break; |
| | |
| | | }).create().show(); |
| | | } else { |
| | | Intent intent = new Intent(WithdrawCashActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("uid", UserUtil.getUid(getApplicationContext()) + ""); |
| | | intent.putExtra("uid", UserUtil.getUid(getApplicationContext()) ); |
| | | intent.putExtra("type", LoginSelectActivity.TYPE_BIND); |
| | | startActivity(intent); |
| | | } |
| | |
| | | } |
| | | |
| | | private void canExtract(String money) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.canExtract(WithdrawCashActivity.this, uid, money, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.canExtract(WithdrawCashActivity.this, UserUtil.getUid(ShoppingApplication.application), money, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private JSONObject alipayBindState; |
| | | |
| | | private void getAccount() { |
| | | ShoppingApi.getUserAccount(this, getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getUserAccount(this, UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.okhttp.OkHttpUtils; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | * 获取提现记录列表 |
| | | */ |
| | | private void getWithDrawRecordList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | String type = getIntent().getStringExtra("type"); |
| | | ShoppingApi.getExtractRecord(this, uid, mPage, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getExtractRecord(this, UserUtil.getUid(ShoppingApplication.application), mPage, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | } |
| | | |
| | | private void getExtractProgress() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | ShoppingApi.getExtractProcess(this, getIntent().getStringExtra("id"), sp.getString("uid", ""), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getExtractProcess(this, getIntent().getStringExtra("id"), UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | * 获取模板 |
| | | */ |
| | | private void getShareTextTemplate() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getShareTextTemplate(ActivityContentCompile.this, uid, hasCoupon + "", tljId, goodsType, |
| | | ShoppingApi.getShareTextTemplate(ActivityContentCompile.this, UserUtil.getUid(ShoppingApplication.application), hasCoupon + "", tljId, goodsType, |
| | | new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | * 预览模板 |
| | | */ |
| | | private void viewShareTextTemplate() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.viewShareTextTemplate(ActivityContentCompile.this, uid, |
| | | ShoppingApi.viewShareTextTemplate(ActivityContentCompile.this, UserUtil.getUid(ShoppingApplication.application), |
| | | goodsId, hasCoupon + "", content, tljId, goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | */ |
| | | private void saveShareTextTemplate() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | ShoppingApi.saveShareTextTemplate(ActivityContentCompile.this, uid, |
| | | hasCoupon + "", et_content_compile.getText().toString(), tljId, goodsType, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.viewpagerindicator.ImagePath; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.widget.MyGridView; |
| | |
| | | */ |
| | | private void updateComplain() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | String content = et_content.getText().toString(); |
| | | File[] photo = null; |
| | | if (mList.size() > 0) { |
| | |
| | | package com.tejia.lijin.app.ui.recommend; |
| | | |
| | | import android.content.Context; |
| | | import android.content.DialogInterface; |
| | | import android.content.Intent; |
| | | import android.content.SharedPreferences; |
| | | import android.graphics.Bitmap; |
| | |
| | | import android.provider.Settings; |
| | | import android.text.SpannableString; |
| | | import android.text.Spanned; |
| | | import android.text.SpannedString; |
| | | import android.text.TextUtils; |
| | | import android.text.style.RelativeSizeSpan; |
| | | import android.util.Log; |
| | | import android.view.LayoutInflater; |
| | |
| | | import android.view.animation.Animation; |
| | | import android.view.animation.AnimationUtils; |
| | | import android.view.animation.DecelerateInterpolator; |
| | | import android.webkit.WebChromeClient; |
| | | import android.webkit.WebSettings; |
| | | import android.webkit.WebView; |
| | | import android.webkit.WebViewClient; |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.alibaba.baichuan.android.trade.AlibcTrade; |
| | | import com.alibaba.baichuan.android.trade.AlibcTradeSDK; |
| | | import com.alibaba.baichuan.android.trade.model.AlibcShowParams; |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.baichuan.android.trade.page.AlibcBasePage; |
| | | import com.alibaba.baichuan.android.trade.page.AlibcDetailPage; |
| | | import com.alibaba.baichuan.trade.biz.AlibcConstants; |
| | | import com.alibaba.baichuan.trade.biz.applink.adapter.AlibcFailModeType; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.androidquery.AQuery; |
| | | import com.bumptech.glide.Glide; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.BuXinConstant; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.callBack.MiDuoTradeCallback; |
| | | import com.tejia.lijin.app.entity.CouponInfo; |
| | | import com.tejia.lijin.app.entity.CouponUser; |
| | | import com.tejia.lijin.app.entity.GoodsDetail; |
| | | import com.tejia.lijin.app.entity.PushEventData; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | | import com.tejia.lijin.app.entity.TbPidInfo; |
| | | import com.tejia.lijin.app.entity.UserInfo; |
| | | import com.tejia.lijin.app.entity.common.ImageShowEntity; |
| | | import com.tejia.lijin.app.entity.share.SingleGoodsShareInfo; |
| | | import com.tejia.lijin.app.entity.goods.GoodsDetailVO; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.ui.dialog.JumpTaoBaoDialog; |
| | | import com.tejia.lijin.app.ui.dialog.ReceiveCouponHintDialog; |
| | | import com.tejia.lijin.app.ui.dialog.ShapeLoadingDialog; |
| | | import com.tejia.lijin.app.ui.goods.GoodsDetailPreEventManager; |
| | | import com.tejia.lijin.app.ui.invite.ShareBrowserActivity; |
| | | import com.tejia.lijin.app.ui.mine.Collect28Activity; |
| | | import com.tejia.lijin.app.ui.mine.LoginSelectActivity; |
| | | import com.tejia.lijin.app.ui.mine.MyFootmarkActivity; |
| | | import com.tejia.lijin.app.ui.mine.ShoppingTrolleyActivity; |
| | | import com.tejia.lijin.app.ui.trends.BigImageActivity; |
| | | import com.tejia.lijin.app.util.ApkUtil; |
| | | import com.tejia.lijin.app.util.FlowLayout; |
| | | import com.tejia.lijin.app.util.GlideCircleTransform; |
| | | import com.tejia.lijin.app.util.GlideRoundTransform; |
| | | import com.tejia.lijin.app.util.ImageUtil; |
| | | import com.tejia.lijin.app.util.InitAlibcSdk; |
| | | import com.tejia.lijin.app.util.SetLabels; |
| | | import com.tejia.lijin.app.util.Toast_Dialog; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.baichuan.AlibcTradeUtil; |
| | | import com.tejia.lijin.app.util.clipboard.ClipboardUtil; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.GoodsCustomEvent; |
| | | import com.tejia.lijin.app.util.umengCustomEvent.SearchCustomEvent; |
| | | import com.tejia.lijin.app.util.user.LoginAndInviteStatusUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wang.avi.AVLoadingIndicatorView; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.util.NetUtils; |
| | |
| | | import org.json.JSONObject; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Timer; |
| | | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | |
| | | private ImageView iv_back, iv_top_left; |
| | | private LinearLayout ll_top_title; |
| | | private TextView tv_top_title1, tv_top_title2, tv_top_title3, tv_top_title4; |
| | | private View v_1, v_2, v_3, v_4, v_cover, v_cover1, v_cover2; |
| | | private View v_1, v_2, v_3, v_4, v_cover, v_cover1; |
| | | |
| | | //商品基础信息 |
| | | private ViewPager vp_goods_detail; |
| | |
| | | tv_shop_service_grade = findViewById(R.id.tv_shop_service_grade); |
| | | v_cover = findViewById(R.id.v_cover); |
| | | v_cover1 = findViewById(R.id.v_cover1); |
| | | v_cover2 = findViewById(R.id.v_cover2); |
| | | v_1 = findViewById(R.id.v_1); |
| | | v_2 = findViewById(R.id.v_2); |
| | | v_3 = findViewById(R.id.v_3); |
| | | v_4 = findViewById(R.id.v_4); |
| | | |
| | | |
| | | avLoadingIndicatorView = findViewById(R.id.avi); |
| | | ll_guess_like = findViewById(R.id.ll_guess_like); |
| | | iv_imgtext_status = findViewById(R.id.iv_imgtext_status); |
| | |
| | | //umeng统计 |
| | | GoodsCustomEvent.goodsDetail(this, from); |
| | | inputTime = System.currentTimeMillis(); |
| | | goodsId = getIntent().getExtras().getString("id"); |
| | | final String goodsId = getIntent().getExtras().getString("goodsId"); |
| | | final int goodsType = Integer.parseInt(getIntent().getExtras().getString("goodsType")); |
| | | from = getIntent().getExtras().getString("from"); |
| | | |
| | | tv_loading.setText("宝贝详情页加载中..."); |
| | | AnimationDrawable animationDrawable = (AnimationDrawable) getResources().getDrawable( |
| | |
| | | tv_top_title4.setOnClickListener(this); |
| | | ll_add_collect.setOnClickListener(this); |
| | | fl_back_face.setOnClickListener(this); |
| | | v_cover2.setOnClickListener(this); |
| | | |
| | | if (getSharedPreferences("user", MODE_PRIVATE).getString("is_goods_web_detail", "0").equalsIgnoreCase("1")) { |
| | | Intent intent = new Intent(GoodsDetailActivity.this, GoodsDetailBrowerActivity.class); |
| | |
| | | @Override |
| | | public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) { |
| | | TaoBaoGoodsBrief info = (TaoBaoGoodsBrief) adapterView.getAdapter().getItem(position); |
| | | goodsId = info.getGoodsId(); |
| | | getGoodsDetail(); |
| | | getGoodsDetail(info.getGoodsId(), info.getGoodsType()); |
| | | } |
| | | }); |
| | | |
| | |
| | | public void onNetworkAvailable() { |
| | | requestState(0); |
| | | if (mInfo == null) { |
| | | getGoodsDetail(); |
| | | getGoodsDetail(goodsId, goodsType); |
| | | } |
| | | } |
| | | }); |
| | |
| | | private List<String> mBanners = new ArrayList<>(); |
| | | |
| | | private int picNum = 1; |
| | | String goodsId; |
| | | String goodsTaoBaoId; |
| | | |
| | | private Map<String, String> exParams;//yhhpass参数 |
| | | AlibcShowParams alibcShowParams; |
| | | AlibcTaokeParams alibcTaokeParams; |
| | | |
| | | |
| | | Animation inAnima; |
| | |
| | | @Override |
| | | protected void onCreate(Bundle arg0) { |
| | | super.onCreate(arg0); |
| | | setContentView(R.layout.activity_goods_detail_transition); |
| | | setContentView(R.layout.activity_goods_detail_new); |
| | | TopStatusSettings.setStatusViewAndDeepColor2(this); |
| | | from = getIntent().getStringExtra("from"); |
| | | if (StringUtils.isEmpty(from)) |
| | | from = ""; |
| | | initView(); |
| | | initData(); |
| | | getAppPageNotification(); |
| | | // getAppPageNotification(); |
| | | } |
| | | |
| | | |
| | |
| | | if (null != url && url.startsWith("yestv://webviewHeight#")) { |
| | | int height = Integer.parseInt(url.replace("yestv://webviewHeight#", "")); |
| | | Log.i("mResult", "webView的高度为:" + height + ""); |
| | | //TODO 测试 |
| | | webView.setLayoutParams(new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, height)); |
| | | return true; |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | GoodsDetail mInfo; |
| | | boolean isNative = true; |
| | | TbPidInfo tInfo; |
| | | GoodsDetailVO mInfo; |
| | | List<CouponUser> couponUsers; |
| | | String from; |
| | | String noRebateHelpLink; |
| | | boolean isQuestDetail; |
| | | |
| | | |
| | | private void getGoodsDetail() { |
| | | private void getGoodsDetail(String goodsId, int goodsType) { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfo(this, goodsId, goodsType, UserUtil.getUid(getApplicationContext()), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | lv_goods_pic.setLayoutParams(params); |
| | | |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | mInfo = gson.fromJson(jsonObject.optJSONObject("data").toString(), GoodsDetail.class); |
| | | |
| | | mInfo = gson.fromJson(jsonObject.optJSONObject("data").toString(), GoodsDetailVO.class); |
| | | goodsDetailPreEventManager = new GoodsDetailPreEventManager(GoodsDetailActivity.this, mInfo); |
| | | |
| | | h5Url = mInfo.getExtra().getH5Url();//产品h5 链接 |
| | | couponUsers = mInfo.getExtra().getListCouponUser(); |
| | | noRebateHelpLink = mInfo.getExtra().getShare().getHelpLink(); |
| | | |
| | | if (mInfo.getGoods() != null && mInfo.getGoods().getLabels() != null && mInfo.getGoods().getLabels().size() > 0) { |
| | | SetLabels.addLabel(GoodsDetailActivity.this, ll_labels, mInfo.getGoods().getLabels()); |
| | |
| | | index = 1; |
| | | } |
| | | |
| | | goodsTaoBaoId = mInfo.getGoods().getGoodsId(); |
| | | isCollect = mInfo.getExtra().isCollected(); |
| | | |
| | | if (couponUsers != null && couponUsers.size() > 0) { |
| | |
| | | webView.loadUrl(mInfo.getExtra().getDetailUrl()); |
| | | tv_sales_num.setText("月销 " + mInfo.getGoods().getSalesCount()); |
| | | |
| | | if (mInfo.getGoods().getShopInfo() != null) { |
| | | ll_shop.setVisibility(View.VISIBLE); |
| | | Glide.with(GoodsDetailActivity.this).load(mInfo.getGoods().getShopInfo().getShopIcon()) |
| | | .placeholder(R.drawable.ic_goods_default) |
| | | .error(R.drawable.ic_goods_default) |
| | | .transform(new GlideRoundTransform(GoodsDetailActivity.this, |
| | | 5)).into(iv_shop_img); |
| | | tv_shop_name.setText(mInfo.getGoods().getShopInfo().getShopName()); |
| | | |
| | | Glide.with(GoodsDetailActivity.this).load(mInfo.getGoods().getShopInfo().getShopIcon()) |
| | | .placeholder(R.drawable.ic_goods_default) |
| | | .error(R.drawable.ic_goods_default) |
| | | .transform(new GlideRoundTransform(GoodsDetailActivity.this, |
| | | 5)).into(iv_shop_img); |
| | | tv_shop_name.setText(mInfo.getGoods().getShopInfo().getShopName()); |
| | | iv_shop_type.setImageDrawable(mInfo.getGoods().getShopInfo().getUserType() == 0 ? |
| | | getResources().getDrawable(R.drawable.ic_shop_type_taobao) : |
| | | getResources().getDrawable(R.drawable.ic_shop_type_tmall)); |
| | | tv_shop_des.setText("宝贝描述: " + mInfo.getGoods().getShopInfo().getScoreGoods()); |
| | | tv_shop_service.setText("卖家服务: " + mInfo.getGoods().getShopInfo().getScoreSeller()); |
| | | tv_shop_logistics.setText("物流服务: " + mInfo.getGoods().getShopInfo().getScoreLogistics()); |
| | | tv_shop_des_grade.setText(mInfo.getGoods().getShopInfo().getScoreGoodsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreGoodsD() == 1 ? "高" : "低"); |
| | | tv_shop_service_grade.setText(mInfo.getGoods().getShopInfo().getScoreSellerD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreSellerD() == 1 ? "高" : "低"); |
| | | tv_shop_logistics_grade.setText(mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 1 ? "高" : "低"); |
| | | try { |
| | | |
| | | iv_shop_type.setImageDrawable(mInfo.getGoods().getShopInfo().getUserType() == 0 ? |
| | | getResources().getDrawable(R.drawable.ic_shop_type_taobao) : |
| | | getResources().getDrawable(R.drawable.ic_shop_type_tmall)); |
| | | tv_shop_des.setText("宝贝描述: " + mInfo.getGoods().getShopInfo().getScoreGoods()); |
| | | tv_shop_service.setText("卖家服务: " + mInfo.getGoods().getShopInfo().getScoreSeller()); |
| | | tv_shop_logistics.setText("物流服务: " + mInfo.getGoods().getShopInfo().getScoreLogistics()); |
| | | tv_shop_des_grade.setText(mInfo.getGoods().getShopInfo().getScoreGoodsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreGoodsD() == 1 ? "高" : "低"); |
| | | tv_shop_service_grade.setText(mInfo.getGoods().getShopInfo().getScoreSellerD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreSellerD() == 1 ? "高" : "低"); |
| | | tv_shop_logistics_grade.setText(mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 0 ? "平" : |
| | | mInfo.getGoods().getShopInfo().getScoreLogisticsD() == 1 ? "高" : "低"); |
| | | } catch (Exception e) { |
| | | |
| | | } |
| | | } else { |
| | | ll_shop.setVisibility(View.GONE); |
| | | } |
| | | |
| | | |
| | | if (mInfo.getExtra().isCollected()) { |
| | | setCollectionData(true); |
| | |
| | | } |
| | | |
| | | //发货地设置 |
| | | if (!StringUtils.isBlank(mInfo.getGoods().getProvCity())) { |
| | | if (!StringUtils.isBlank(mInfo.getGoods().getAddress())) { |
| | | ll_address.setVisibility(View.VISIBLE); |
| | | tv_address.setText(mInfo.getGoods().getProvCity()); |
| | | tv_address.setText(mInfo.getGoods().getAddress()); |
| | | } else { |
| | | ll_address.setVisibility(View.GONE); |
| | | } |
| | | |
| | | Log.i("mResult", "isLike的值为" + mInfo.getGoods().getGoodsId()); |
| | |
| | | mBanners.addAll(mInfo.getGoods().getImgList()); |
| | | bannerAdapter.notifyDataSetChanged(); |
| | | vp_goods_detail.setCurrentItem(0); |
| | | isNative = mInfo.getExtra().isNative(); |
| | | initFanliAndBuyBtn(mInfo.getExtra().isShareValid(), mInfo.getExtra().isFanliValid()); |
| | | initFanliAndBuyBtn(mInfo.getExtra().isBuyValid(), mInfo.getExtra().isFanliValid()); |
| | | requestState(0); |
| | | } else if (jsonObject.optString("code").equalsIgnoreCase("2")) { |
| | | ll_content.setVisibility(View.GONE); |
| | |
| | | Timer timer; |
| | | |
| | | JumpTaoBaoDialog dialog; |
| | | boolean isFirst = true; |
| | | |
| | | |
| | | @Override |
| | | protected void onResume() { |
| | | super.onResume(); |
| | | if (mChangeHelper != null) |
| | | mChangeHelper.registerReceiver(); |
| | | if (goodsDetailPreEventManager != null) |
| | | goodsDetailPreEventManager.onResume(); |
| | | isVisible = true; |
| | | mChangeHelper.registerReceiver(); |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | boolean isLogin = sp.getBoolean("isLogin", false); |
| | | |
| | | //VIP不在展示超级会员 |
| | | UserInfo user = UserUtil.getUserInfo(this); |
| | | |
| | | if (isLogin) { |
| | | if (isClick == 1 && !isTBStartBind) { |
| | | if (isFirst) { |
| | | getTaoBaoH5AuthInfo("zigou"); |
| | | } else { |
| | | getTaoBaoH5AuthInfo2("zigou"); |
| | | } |
| | | } else if (isClick == 2 && !isTBStartBind) { |
| | | if (mInfo != null) { |
| | | if (isFirst) { |
| | | getTaoBaoH5AuthInfo("share"); |
| | | } else { |
| | | getTaoBaoH5AuthInfo2("share"); |
| | | isClick = 0; |
| | | } |
| | | } else { |
| | | Toast.makeText(GoodsDetailActivity.this, "暂未获取到分享返利,请稍等", Toast.LENGTH_LONG).show(); |
| | | isClick = 0; |
| | | } |
| | | } else if (isClick == 3) { |
| | | if (isCollect) { |
| | | setCollectionData(true); |
| | | } else { |
| | | collection(); |
| | | } |
| | | isClick = 0; |
| | | } else if (isClick == 4) { |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | isClick = 0; |
| | | startActivity(new Intent(GoodsDetailActivity.this, ShoppingTrolleyActivity.class)); |
| | | } |
| | | } else if (isClick == 5) { |
| | | isClick = 0; |
| | | startActivity(new Intent(GoodsDetailActivity.this, Collect28Activity.class)); |
| | | } else if (isClick == 7) { |
| | | isClick = 0; |
| | | } else if (isClick == 8) {//复制淘口令 |
| | | commandCopy(); |
| | | isClick = 0; |
| | | } else if (isClick == 9) {//跳转奖励券获取 |
| | | jumpDetail(); |
| | | isClick = 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | super.onPause(); |
| | | isVisible = false; |
| | | mChangeHelper.unregisterReceiver(); |
| | | timer(); |
| | | } |
| | | |
| | | |
| | | String clickUrl = ""; |
| | | String couponUrl = ""; |
| | | private String h5Url = "";//产品链接 |
| | | int type = 0; |
| | | |
| | | /** |
| | | * 获取PID 信息 |
| | | */ |
| | | private void getTBLinkInfo(String uid) { |
| | | if (pd == null) |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | ShoppingApi.getTBLinkInfo(this, uid, goodsId, "goodsDetail", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | isNative = jsonObject.optJSONObject("data").optBoolean("native"); |
| | | type = Integer.parseInt(jsonObject.optJSONObject("data").optString("type")); |
| | | if (jsonObject.optJSONObject("data").optJSONObject("tbPidInfo") != null) |
| | | tInfo = gson.fromJson(jsonObject.optJSONObject("data").optJSONObject("tbPidInfo").toString(), TbPidInfo.class); |
| | | JSONObject object = jsonObject.optJSONObject("data").optJSONObject("link"); |
| | | if (object != null) { |
| | | clickUrl = object.optString("clickUrl"); |
| | | couponUrl = object.optString("couponUrl"); |
| | | } |
| | | Log.e("mResult", "getTBLinkInfo():type---" + type + "---isLogin---" + AlibcLogin.getInstance().isLogin()); |
| | | goBuy(); |
| | | pd.dismiss(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) { |
| | | super.onFailure(statusCode, headers, jsonObject, e); |
| | | pd.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private boolean isCollect = false; |
| | | private int isClick = 0; |
| | | private boolean isSpread = false;//图文是否展开 |
| | | |
| | | List<TaoBaoGoodsBrief> gList = new ArrayList<>(); |
| | | RelativeGoodsAdapter gAdapter; |
| | | long lastShareTimeClick = 0; |
| | | long lastBuyTimeClick = 0; |
| | | |
| | | //是否为复制链接按钮 |
| | | boolean copyLink = false; |
| | | |
| | | //开始分享 |
| | | private void startShare(boolean isLogin) { |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | | long cTime = System.currentTimeMillis(); |
| | | if (cTime - lastShareTimeClick < 500) { |
| | | lastShareTimeClick = cTime; |
| | | return; |
| | | } |
| | | lastShareTimeClick = cTime; |
| | | isTBStartBind = false; |
| | | GoodsCustomEvent.goodsDetailShare(GoodsDetailActivity.this); |
| | | if (isLogin) { |
| | | if (mInfo != null) { |
| | | getTaoBaoH5AuthInfo("share"); |
| | | } else { |
| | | Toast.makeText(GoodsDetailActivity.this, "暂未获取到分享返利,请稍等", Toast.LENGTH_LONG).show(); |
| | | } |
| | | } else { |
| | | isClick = 2; |
| | | Toast.makeText(GoodsDetailActivity.this, "请先登录板栗快省账号", Toast.LENGTH_LONG).show(); |
| | | Intent intent = new Intent(GoodsDetailActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | startActivity(intent); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | break; |
| | | |
| | | case R.id.ll_add_collect: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()), true)) |
| | | return; |
| | | ll_add_collect.setEnabled(false); |
| | | if (mInfo == null) { |
| | |
| | | collection(); |
| | | } else { |
| | | ll_add_collect.setEnabled(true); |
| | | isClick = 3; |
| | | Intent intent = new Intent(GoodsDetailActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | startActivity(intent); |
| | | Toast.makeText(GoodsDetailActivity.this, "请先登录板栗快省账号", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | break; |
| | | case R.id.ll_copy_link: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | return; |
| | | copyLink = true; |
| | | startShare(isLogin); |
| | | break; |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | | break; |
| | | //领券 |
| | | case R.id.fl_receive_coupon: |
| | | |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | | long cTime1 = System.currentTimeMillis(); |
| | | if (cTime1 - lastBuyTimeClick < 500) { |
| | | lastBuyTimeClick = cTime1; |
| | | break; |
| | | } |
| | | lastBuyTimeClick = cTime1; |
| | | GoodsCustomEvent.goodsDetailCouponClick(this); |
| | | |
| | | break; |
| | | case R.id.tv_big_btn: |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | | long cTime2 = System.currentTimeMillis(); |
| | | if (cTime2 - lastBuyTimeClick < 500) { |
| | | lastBuyTimeClick = cTime2; |
| | | break; |
| | | } |
| | | lastBuyTimeClick = cTime2; |
| | | GoodsCustomEvent.goodsDetailBuyCommon(this); |
| | | buyOrGainCoupon(isLogin); |
| | | //TODO 去购买 |
| | | break; |
| | | |
| | | case R.id.fl_back_face: |
| | |
| | | return; |
| | | if (isSpread) { |
| | | webView.setVisibility(View.GONE); |
| | | // ll_imgs.removeAllViews(); |
| | | iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_close)); |
| | | } else { |
| | | webView.setVisibility(View.VISIBLE); |
| | | iv_imgtext_status.setImageDrawable(getResources().getDrawable(R.drawable.ic_detail_img_open)); |
| | | // getImgText(); |
| | | } |
| | | isSpread = !isSpread; |
| | | break; |
| | |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | String data = gson.toJson(info); |
| | | break; |
| | | case R.id.fl_command_copy: |
| | | if (isLogin) |
| | | commandCopy(); |
| | | else |
| | | commandCopyHint(); |
| | | break; |
| | | |
| | | |
| | | case R.id.iv_footermark: |
| | | startActivity(new Intent(GoodsDetailActivity.this, MyFootmarkActivity.class)); |
| | | break; |
| | | |
| | | case R.id.ll_same: |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | | Intent intent = new Intent(this, SearchResultActivity.class); |
| | | intent.putExtra("content", mInfo.getGoods().getTitle()); |
| | | startActivity(intent); |
| | | break; |
| | | } |
| | | } |
| | | |
| | | private void jumpDetail() { |
| | | Intent intent; |
| | | if ((!StringUtils.isEmpty(mInfo.getGoods().getOtherInfo().getRewardCoupon().getJumpDetail().getActivity()))) { |
| | | try { |
| | | intent = new Intent(this, Class.forName(mInfo.getGoods().getOtherInfo().getRewardCoupon().getJumpDetail().getActivity())); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return; |
| | | } |
| | | if (mInfo.getGoods().getOtherInfo().getRewardCoupon().getParams() != null) { |
| | | @SuppressWarnings("unchecked") |
| | | Iterator<String> its = mInfo.getGoods().getOtherInfo().getRewardCoupon().getParams().keySet().iterator(); |
| | | while (its.hasNext()) { |
| | | String key = its.next(); |
| | | String value = mInfo.getGoods().getOtherInfo().getRewardCoupon().getParams().getString(key); |
| | | intent.putExtra(key, value); |
| | | } |
| | | } |
| | | startActivity(intent); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | *领券提示 |
| | | */ |
| | | private void receiveCouponHint(final String couponUrl) { |
| | | final SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | boolean receiveCouponHint = sp.getBoolean("receiveCouponHint", true); |
| | | if (!receiveCouponHint) { |
| | | receiveCoupon(couponUrl); |
| | | } else { |
| | | ReceiveCouponHintDialog.Builder builder = new ReceiveCouponHintDialog.Builder(GoodsDetailActivity.this); |
| | | builder.setMessage("未登录无返利,确定免费领券?").setTitle("温馨提示") |
| | | .setPositiveButton("去领券", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface cDialog, int which) { |
| | | cDialog.dismiss(); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putBoolean("receiveCouponHint", false); |
| | | editor.commit(); |
| | | receiveCoupon(couponUrl); |
| | | } |
| | | }) |
| | | .setNegativeButton("去登录", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | Intent intent = new Intent(GoodsDetailActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | startActivity(intent); |
| | | isClick = 1; |
| | | dialog.dismiss(); |
| | | } |
| | | }).create().show(); |
| | | } |
| | | } |
| | | |
| | | private void receiveCoupon(String couponUrl) { |
| | | if (ApkUtil.checkAPP(GoodsDetailActivity.this, "com.taobao.taobao")) { |
| | | alibcShowParams = new AlibcShowParams(); |
| | | alibcShowParams.setOpenType(OpenType.Native); |
| | | } else { |
| | | alibcShowParams = new AlibcShowParams(); |
| | | alibcShowParams.setOpenType(OpenType.Auto); |
| | | } |
| | | alibcTaokeParams = new AlibcTaokeParams("", "", ""); |
| | | alibcTaokeParams.setPid(BuXinConstant.BAICHUAN_PID); |
| | | alibcTaokeParams.setAdzoneid(BuXinConstant.BAICHUAN_ADZONE_ID); |
| | | alibcTaokeParams.pid = BuXinConstant.BAICHUAN_PID; |
| | | alibcTaokeParams.adzoneid = BuXinConstant.BAICHUAN_ADZONE_ID; |
| | | alibcTaokeParams.extraParams = new HashMap<>(); |
| | | alibcTaokeParams.extraParams.put("taokeAppkey", BuXinConstant.TAO_BAO_KE_KEY); |
| | | |
| | | exParams = new HashMap<>(); |
| | | exParams.put(AlibcConstants.ISV_CODE, "appisvcode"); |
| | | exParams.put("alibaba", "阿里巴巴");//自定义参数部分,可任意增删改 |
| | | |
| | | if (!StringUtils.isEmpty(couponUrl)) { |
| | | jumpWeb(couponUrl); |
| | | } else { |
| | | AlibcDetailPage basePage = new AlibcDetailPage(goodsId); |
| | | jumpNative(basePage); |
| | | } |
| | | |
| | | boolean isLogin = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getBoolean("isLogin", false); |
| | | String msg = "购买后有返利,分享后有奖金"; |
| | | if (!isLogin) { |
| | | msg = "未登录,无返利"; |
| | | } |
| | | if (dialog == null) { |
| | | JumpTaoBaoDialog.Builder builder1 = new JumpTaoBaoDialog.Builder(GoodsDetailActivity.this); |
| | | builder1.setMessage(msg); |
| | | builder1.setPlatform(1); |
| | | dialog = builder1.create(); |
| | | } else { |
| | | if (dialog != null && dialog.isShowing()) |
| | | dialog.dismiss(); |
| | | } |
| | | |
| | | dialog.show(); |
| | | isClick = 0; |
| | | timer();//5秒超时关闭 弹窗 |
| | | } |
| | | |
| | | |
| | | private void recieveCoupon(CouponInfo couponInfo) { |
| | | if (couponInfo == null) |
| | | return; |
| | | |
| | | boolean isLogin = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getBoolean("isLogin", false); |
| | | if (!isLogin) { |
| | | receiveCouponHint(couponInfo.getLink()); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | return; |
| | | if (couponInfo.isShopCoupon()) { |
| | | receiveCoupon(couponInfo.getLink()); |
| | | } else |
| | | buyOrGainCoupon(isLogin); |
| | | } |
| | | } |
| | | |
| | | /* |
| | | *领券提示 |
| | | */ |
| | | private void commandCopyHint() { |
| | | final SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | boolean commandHint = sp.getBoolean("receiveCouponHint", true); |
| | | if (!commandHint) { |
| | | commandCopy(); |
| | | } else { |
| | | ReceiveCouponHintDialog.Builder builder = new ReceiveCouponHintDialog.Builder(GoodsDetailActivity.this); |
| | | builder.setMessage("未登录无返利,确定免费领券?").setTitle("温馨提示") |
| | | .setPositiveButton("去领券", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface cDialog, int which) { |
| | | cDialog.dismiss(); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putBoolean("receiveCouponHint", false); |
| | | editor.commit(); |
| | | commandCopy(); |
| | | } |
| | | }) |
| | | .setNegativeButton("去登录", new DialogInterface.OnClickListener() { |
| | | @Override |
| | | public void onClick(DialogInterface dialog, int which) { |
| | | Intent intent = new Intent(GoodsDetailActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | startActivity(intent); |
| | | dialog.dismiss(); |
| | | isClick = 8; |
| | | } |
| | | }).create().show(); |
| | | } |
| | | } |
| | | |
| | | private void commandCopy() { |
| | | ClipboardUtil.copy(getApplicationContext(), mInfo.getGoods().getCouponInfo().getToken()); |
| | | |
| | | Toast.makeText(GoodsDetailActivity.this, "淘口令复制成功", |
| | | Toast.LENGTH_SHORT).show(); |
| | | } |
| | | |
| | | private void setPosition(int position) { |
| | | tv_top_title1.setTextColor(position == 1 ? getResources().getColor(R.color.main_text_color) : getResources().getColor(R.color.black2)); |
| | |
| | | v_4.setVisibility(position == 4 ? View.VISIBLE : View.GONE); |
| | | } |
| | | |
| | | private void buyOrGainCoupon(boolean isLogin) { |
| | | isClick = 1; |
| | | isTBStartBind = false; |
| | | if (!isLogin) { |
| | | Toast.makeText(GoodsDetailActivity.this, "请先登录板栗快省账号", Toast.LENGTH_LONG).show(); |
| | | Intent intent = new Intent(GoodsDetailActivity.this, LoginSelectActivity.class); |
| | | intent.putExtra("from", "淘宝"); |
| | | startActivity(intent); |
| | | return; |
| | | } |
| | | // if (!AlibcLogin.getInstance().isLogin()) { |
| | | // tbLogin(); |
| | | // return; |
| | | // } |
| | | getTaoBaoH5AuthInfo("zigou"); |
| | | // getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 打开指定链接 |
| | | */ |
| | | public void showGoods() { |
| | | // Log.e("mResult", "showGoods():type---" + type); |
| | | if (TextUtils.isEmpty(goodsId)) { |
| | | Toast.makeText(GoodsDetailActivity.this, "暂未获取到商品信息", |
| | | Toast.LENGTH_SHORT).show(); |
| | | return; |
| | | } |
| | | alibcShowParams = new AlibcShowParams(); |
| | | if (!isNative) { |
| | | alibcShowParams.setOpenType(OpenType.Auto); |
| | | } else if (ApkUtil.checkAPP(GoodsDetailActivity.this, "com.taobao.taobao")) { |
| | | alibcShowParams.setOpenType(OpenType.Native); |
| | | } else { |
| | | alibcShowParams.setOpenType(OpenType.Auto); |
| | | } |
| | | alibcShowParams.setBackUrl("alisdk://"); |
| | | alibcTaokeParams = new AlibcTaokeParams("", "", ""); |
| | | if (tInfo != null) { |
| | | alibcTaokeParams = new AlibcTaokeParams("", "", ""); |
| | | alibcTaokeParams.setPid(tInfo.getPid()); |
| | | alibcTaokeParams.setAdzoneid(tInfo.getAdZoneId()); |
| | | alibcTaokeParams.pid = tInfo.getPid(); |
| | | alibcTaokeParams.adzoneid = tInfo.getAdZoneId(); |
| | | alibcTaokeParams.extraParams = new HashMap<>(); |
| | | alibcTaokeParams.extraParams.put("taokeAppkey", tInfo.getAppKey()); |
| | | } |
| | | exParams = new HashMap<>(); |
| | | exParams.put(AlibcConstants.ISV_CODE, "appisvcode"); |
| | | exParams.put("alibaba", "阿里巴巴");//自定义参数部分,可任意增删改 |
| | | |
| | | if (type == 1) { |
| | | // Log.e("mResult", (!StringUtils.isEmpty(couponUrl)) ? couponUrl : clickUrl); |
| | | if (!StringUtils.isEmpty(clickUrl) || !StringUtils.isEmpty(couponUrl)) { |
| | | String url = (!StringUtils.isEmpty(couponUrl)) ? couponUrl : clickUrl; |
| | | jumpWeb(url); |
| | | } |
| | | } else { |
| | | if (!StringUtils.isEmpty(clickUrl) || !StringUtils.isEmpty(couponUrl)) { |
| | | String url = (!StringUtils.isEmpty(couponUrl)) ? couponUrl : clickUrl; |
| | | jumpWeb(url); |
| | | } else { |
| | | Toast.makeText(GoodsDetailActivity.this, "进入详情", Toast.LENGTH_LONG).show(); |
| | | AlibcDetailPage basePage = new AlibcDetailPage(goodsId); |
| | | // AlibcTrade.openByBizCode(GoodsDetailActivity.this, basePage, alibcShowParams, alibcTaokeParams, exParams, new MiDuoTradeCallback("")); |
| | | jumpNative(basePage); |
| | | } |
| | | } |
| | | boolean isLogin = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getBoolean("isLogin", false); |
| | | String msg = "购买后有返利,分享后有奖金"; |
| | | if (!isLogin) { |
| | | msg = "未登录,无返利"; |
| | | } |
| | | if (dialog == null) { |
| | | JumpTaoBaoDialog.Builder builder = new JumpTaoBaoDialog.Builder(GoodsDetailActivity.this); |
| | | builder.setPlatform(1).setMessage(msg); |
| | | dialog = builder.create(); |
| | | } else { |
| | | if (dialog != null && dialog.isShowing()) |
| | | dialog.dismiss(); |
| | | } |
| | | |
| | | dialog.show(); |
| | | isClick = 0; |
| | | timer();//5秒超时关闭 弹窗 |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 主要是用于 弹窗拉起淘宝弹窗卡死延时关闭 5秒超时 |
| | | */ |
| | | private void timer() { |
| | | private void startTimer() { |
| | | new Thread(new Runnable() { |
| | | public void run() { |
| | | try { |
| | |
| | | } |
| | | }; |
| | | |
| | | private void getTaobaoShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | Log.e("mResult", "getTaobaoShareLink()"); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | | JSONObject data = jsonObject.optJSONObject("data"); |
| | | SingleGoodsShareInfo shareInfo = new Gson().fromJson(data.toString(), SingleGoodsShareInfo.class); |
| | | shareInfo.setGoodsInfo(mInfo.getGoods()); |
| | | Intent intent = new Intent(GoodsDetailActivity.this, ShareGoodsImageActivity31.class); |
| | | intent.putExtra("shareInfo", shareInfo); |
| | | if (copyLink) { |
| | | ClipboardUtil.copy(getApplicationContext(), shareInfo.getCommentText()); |
| | | Toast.makeText(GoodsDetailActivity.this, "复制成功", Toast.LENGTH_SHORT).show(); |
| | | } else |
| | | startActivity(intent); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | pb.dismiss(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 添加到收藏 |
| | | */ |
| | | private void collection() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.collectionGoods(GoodsDetailActivity.this, goodsId, uid, isCollect ? "2" : "1", |
| | | ShoppingApi.collectionGoods(GoodsDetailActivity.this, mInfo.getGoods().getGoodsId(), UserUtil.getUid(getApplicationContext()), isCollect ? "2" : "1", |
| | | mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | ll_add_collect.setEnabled(true); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private boolean isFirstLogin = true; |
| | | |
| | | private void tbLogin() { |
| | | final AlibcLogin alibcLogin = AlibcLogin.getInstance(); |
| | | Log.e("detail", "tbLogin--" + alibcLogin.isLogin()); |
| | | isTBStartBind = true; |
| | | alibcLogin.showLogin(new AlibcLoginCallback() { |
| | | |
| | | @Override |
| | | public void onSuccess(int i, String s, String s1) { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putString("TrolleyTransformationLink", ""); |
| | | editor.commit(); |
| | | |
| | | |
| | | if (isClick == 4) { |
| | | startActivity(new Intent(GoodsDetailActivity.this, ShoppingTrolleyActivity.class)); |
| | | isClick = 0; |
| | | } |
| | | |
| | | bindInfo(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int code, String msg) { |
| | | if (isFirstLogin) { |
| | | InitAlibcSdk.init(); |
| | | isFirstLogin = false; |
| | | } |
| | | isTBStartBind = false; |
| | | isClick = 0; |
| | | Toast.makeText(GoodsDetailActivity.this, "登录失败,请稍候再试", |
| | | Toast.LENGTH_LONG).show(); |
| | | MobclickAgent.reportError(GoodsDetailActivity.this, "GoodsDetailActivity---code:" + code + "---msg:" + msg); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | /** |
| | | * 绑定淘宝账号 |
| | | * |
| | | * @param uid |
| | | */ |
| | | boolean isTBStartBind = false; |
| | | |
| | | private void bindInfo() { |
| | | if (isClick == 1 || isClick == 2) { |
| | | Log.e("detail", authLink); |
| | | if (!StringUtils.isEmpty(authLink)) { |
| | | GoodsCustomEvent.goodsDetailTaobaoAuth(GoodsDetailActivity.this, isClick == 1 ? "购买" : "分享"); |
| | | |
| | | AlibcTradeUtil.openAuthLink(GoodsDetailActivity.this, authLink); |
| | | } |
| | | isFirst = false; |
| | | } |
| | | Log.e("detail", "bindInfo--isClick---" + isClick); |
| | | isTBStartBind = false; |
| | | } |
| | | |
| | | private void bindInfo2() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | getTBLinkInfo(uid); |
| | | isTBStartBind = false; |
| | | } |
| | | |
| | | /** |
| | | * 是否需要淘宝授权 |
| | | * |
| | | * @param source |
| | | */ |
| | | String authLink; |
| | | String orderJS; |
| | | String orderUrl; |
| | | ShapeLoadingDialog pd; |
| | | |
| | | private void getTaoBaoH5AuthInfo(final String source) { |
| | | if (pd == null) |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Log.e("detail", "getTaoBaoH5AuthInfo--" + source); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivity.this, uid, goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | | isClick = source.equalsIgnoreCase("share") ? 2 |
| | | : source.equalsIgnoreCase("zigou") ? 1 : 0; |
| | | authLink = jsonObject.optJSONObject("data").getString("authLink"); |
| | | orderJS = jsonObject.optJSONObject("data").getString("orderJS"); |
| | | orderUrl = jsonObject.optJSONObject("data").getString("orderUrl"); |
| | | Log.e("detail", "authLink--" + authLink); |
| | | if (!StringUtils.isEmpty(authLink)) { |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | bindInfo(); |
| | | } else { |
| | | tbLogin(); |
| | | } |
| | | } |
| | | pd.dismiss(); |
| | | } else if (jsonObject.optInt("code") == 1) { |
| | | if (source.equalsIgnoreCase("share")) { |
| | | getTaobaoShareLink(); |
| | | pd.dismiss(); |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | } |
| | | } else { |
| | | pd.dismiss(); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | isFirst = false; |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int statusCode, Header[] headers, String responseString, Throwable throwable) { |
| | | super.onFailure(statusCode, headers, responseString, throwable); |
| | | // SingleToast.showToast(GoodsDetailActivity.this, "请求失败"); |
| | | pd.dismiss(); |
| | | Toast.makeText(GoodsDetailActivity.this, "请求失败", Toast.LENGTH_SHORT).show(); |
| | | } |
| | | |
| | | }); |
| | | } |
| | | |
| | | private void getTaoBaoH5AuthInfo2(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivity.this, uid, goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, final JSONObject jsonObject) throws Exception { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2:code:" + jsonObject.optInt("code")); |
| | | if (jsonObject.optInt("code") == 1) { |
| | | if (source.equalsIgnoreCase("share")) { |
| | | getTaobaoShareLink(); |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2():isLogin---" + AlibcLogin.getInstance().isLogin()); |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | } else { |
| | | tbBuyLogin(); |
| | | } |
| | | } |
| | | } else { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2:" + jsonObject.optString("msg")); |
| | | runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | String msg = jsonObject.optString("msg"); |
| | | if (!StringUtils.isEmpty(msg)) { |
| | | // SingleToast.showToast(GoodsDetailActivity.this, msg); |
| | | Toast.makeText(GoodsDetailActivity.this, msg, Toast.LENGTH_SHORT).show(); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | | if (source.equalsIgnoreCase("share")) { |
| | | isClick = 0; |
| | | } |
| | | isFirst = true; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void tbBuyLogin() { |
| | | isTBStartBind = true; |
| | | AlibcLogin.getInstance().showLogin(new AlibcLoginCallback() { |
| | | |
| | | @Override |
| | | public void onSuccess(int i, String s, String s1) { |
| | | bindInfo2(); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(int i, String s) { |
| | | isClick = 0; |
| | | runOnUiThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | Toast.makeText(GoodsDetailActivity.this, "登录失败,请稍候再试", |
| | | Toast.LENGTH_LONG).show(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | class ImageAdapter extends PagerAdapter { |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 百川详情页跳转网页 |
| | | */ |
| | | private void jumpWeb(String url) { |
| | | alibcShowParams.setNativeOpenFailedMode(AlibcFailModeType.AlibcNativeFailModeJumpBROWER); |
| | | AlibcTradeSDK.setTaokeParams(alibcTaokeParams); |
| | | AlibcTradeUtil.openByUrl(GoodsDetailActivity.this, |
| | | url, null, new WebViewClient(), new WebChromeClient(), |
| | | alibcShowParams, alibcTaokeParams, null); |
| | | } |
| | | |
| | | /** |
| | | * 百川详情页跳转原生 |
| | | */ |
| | | private void jumpNative(AlibcBasePage basePage) { |
| | | AlibcTrade.openByBizCode(GoodsDetailActivity.this, basePage, null, |
| | | new WebViewClient(), new WebChromeClient(), "", alibcShowParams, |
| | | alibcTaokeParams, exParams, new MiDuoTradeCallback("")); |
| | | } |
| | | |
| | | |
| | | private void goFanli() { |
| | | goodsDetailPreEventManager.startClick(0, new GoodsDetailPreEventManager.IPreEventListener() { |
| | | @Override |
| | | public void onPreSuccess() { |
| | | |
| | | //TODO 返利 |
| | | } |
| | | }); |
| | | //判断是否有多张券情况 |
| | |
| | | |
| | | @Override |
| | | public void onPreSuccess() { |
| | | showGoods(); |
| | | //TODO 购买 |
| | | } |
| | | }); |
| | | } |
| | |
| | | moneyString.setSpan(new RelativeSizeSpan(1.5f), 1, (money.indexOf(".") > -1 ? money.indexOf(".") : money.length()), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); |
| | | tv_money.setText(moneyString); |
| | | tv_desc.setText(desc); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityJD.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityJD.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoJD(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoJD(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(info.getLink()); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getJDLinkInfo(info.getLink()); |
| | | } |
| | |
| | | |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(null); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getJDLinkInfo(null); |
| | | } |
| | | break; |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | |
| | | break; |
| | | |
| | | case R.id.tv_big_btn://免单券 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getGoodsMianDanCouponList(); |
| | | break; |
| | |
| | | } |
| | | dialog.show(); |
| | | timer();//5秒超时关闭 弹窗 |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getJDLinkInfo(this, uid, goodsId, "goodsDetailJD", from, couponLink, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getJDLinkInfo(this, UserUtil.getUid(ShoppingApplication.application), goodsId, "goodsDetailJD", from, couponLink, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void createShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityPDD.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityPDD.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoPDD(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoPDD(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getPDDLinkInfo(); |
| | | } |
| | | |
| | | break; |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | |
| | | |
| | | |
| | | case R.id.tv_big_btn: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getGoodsMianDanCouponList(); |
| | | break; |
| | |
| | | } |
| | | dialog.show(); |
| | | timer();//5秒超时关闭 弹窗 |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getPDDLinkInfo(this, uid, goodsId, "goodsDetailPDD", from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getPDDLinkInfo(this, UserUtil.getUid(ShoppingApplication.application), goodsId, "goodsDetailPDD", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void createShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivitySuning.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivitySuning.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoSuning(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoSuning(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(info.getLink()); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getSuningLinkInfo(info.getLink()); |
| | | } |
| | |
| | | |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(null); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getSuningLinkInfo(null); |
| | | } |
| | | break; |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | |
| | | break; |
| | | |
| | | case R.id.tv_big_btn: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getGoodsMianDanCouponList(); |
| | | break; |
| | |
| | | } |
| | | dialog.show(); |
| | | timer();//5秒超时关闭 弹窗 |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getSuningLinkInfo(this, uid, goodsId, "goodsDetailJD", from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getSuningLinkInfo(this, UserUtil.getUid(ShoppingApplication.application), goodsId, "goodsDetailJD", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void createShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_TB, goodsId, new BasicTextHttpResponseHandler() { |
| | | |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_TB, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | @Override |
| | | public void buy() { |
| | | getTBLinkInfo(UserUtil.getUid(getApplicationContext())+""); |
| | | getTBLinkInfo(UserUtil.getUid(getApplicationContext())); |
| | | // buyOrGainCoupon(true); |
| | | } |
| | | }); |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | /** |
| | | * 获取PID 信息 |
| | | */ |
| | | private void getTBLinkInfo(String uid) { |
| | | private void getTBLinkInfo(Long uid) { |
| | | if (pd == null) |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | |
| | | if (!isLogin) { |
| | | receiveCouponHint(couponInfo.getLink()); |
| | | } else { |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (couponInfo.isShopCoupon()) { |
| | | receiveCoupon(couponInfo.getLink()); |
| | |
| | | } |
| | | |
| | | private void buyOrGainCoupon(boolean isLogin) { |
| | | getTBLinkInfo(UserUtil.getUid(getApplicationContext())+""); |
| | | getTBLinkInfo(UserUtil.getUid(getApplicationContext())); |
| | | } |
| | | |
| | | private void goBuy() { |
| | |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | Log.e("mResult", "getTaobaoShareLink()"); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | |
| | |
| | | } |
| | | |
| | | private void bindInfo2() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | getTBLinkInfo(uid); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | isTBStartBind = false; |
| | | } |
| | | |
| | |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Log.e("detail", "getTaoBaoH5AuthInfo--" + source); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivityTB.this, uid, goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivityTB.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | getTaobaoShareLink(); |
| | | pd.dismiss(); |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | } else { |
| | | pd.dismiss(); |
| | |
| | | } |
| | | |
| | | private void getTaoBaoH5AuthInfo2(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivityTB.this, uid, goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(GoodsDetailActivityTB.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, final JSONObject jsonObject) throws Exception { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2:code:" + jsonObject.optInt("code")); |
| | |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2():isLogin---" + AlibcLogin.getInstance().isLogin()); |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } else { |
| | | tbBuyLogin(); |
| | | } |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityTB.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityTB.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_JD, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityVIP.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(GoodsDetailActivityVIP.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoVIP(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoVIP(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void recieveCouponRightNow(CouponInfo info) { |
| | | if (info == null) |
| | | return; |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getVIPLinkInfo(); |
| | | |
| | |
| | | |
| | | //分享奖金 |
| | | case R.id.ll_share_gain: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | copyLink = false; |
| | | startShare(isLogin); |
| | |
| | | lastBuyTimeClick = cTime1; |
| | | GoodsCustomEvent.goodsDetailCouponClick(this); |
| | | |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getVIPLinkInfo(); |
| | | |
| | | break; |
| | | case R.id.fl_buy: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | if (mInfo == null || mInfo.getGoods() == null) |
| | | return; |
| | |
| | | break; |
| | | |
| | | case R.id.tv_big_btn: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getApplicationContext(), UserUtil.getUid(getApplicationContext()) , true)) |
| | | return; |
| | | getGoodsMianDanCouponList(); |
| | | break; |
| | |
| | | } |
| | | dialog.show(); |
| | | timer();//5秒超时关闭 弹窗 |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getVIPLinkInfo(this, uid, goodsId, "goodsDetailVIP", from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getVIPLinkInfo(this, UserUtil.getUid(ShoppingApplication.application), goodsId, "goodsDetailVIP", from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void createShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | break; |
| | | case R.id.ll_add_collect: |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) , true)) |
| | | return; |
| | | ll_add_collect.setEnabled(false); |
| | | if (goodsDetail == null) { |
| | |
| | | break; |
| | | |
| | | case R.id.ll_share://分享 |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) |
| | | return; |
| | | |
| | | if (!DuplicateEventFilterUtil.allowEvent("shareGoods", 3000)) |
| | |
| | | return; |
| | | if (isCollect == null) |
| | | isCollect = goodsDetail.getExtra().isCollected(); |
| | | String uid = UserUtil.getUid(getContext()) + ""; |
| | | Long uid = UserUtil.getUid(getContext()) ; |
| | | ShoppingApi.collectionGoods(getContext(), goodsDetail.getGoods().getGoodsId(), uid, isCollect ? "2" : "1", |
| | | goodsDetail.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLogin; |
| | | import com.alibaba.baichuan.trade.biz.login.AlibcLoginCallback; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | |
| | | private String id; |
| | | |
| | | private void getGoodsdetail() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getGoodsInfoTB(this, id, uid, isTrolley ? "购物车" : isWeex ? "weex" : "其它", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoTB(this, id, UserUtil.getUid(ShoppingApplication.application), isTrolley ? "购物车" : isWeex ? "weex" : "其它", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | Log.e("mResult", "getGoodsdetail()---onSuccessPerfect()---"); |
| | |
| | | |
| | | private void refresh(final ImageView iv) { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.getGoodsInfoTB(this, id, uid, isTrolley ? "购物车" : isWeex ? "weex" : "其它", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoTB(this, id, UserUtil.getUid(ShoppingApplication.application), isTrolley ? "购物车" : isWeex ? "weex" : "其它", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | private void getTaobaoShareLink() { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", "", null,null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", "", null,null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void collection() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.collectionGoods(GoodsDetailBrowerActivity.this, id, uid, isCollection ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.collectionGoods(GoodsDetailBrowerActivity.this, id, UserUtil.getUid(ShoppingApplication.application), isCollection ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import android.widget.TextView; |
| | | |
| | | import com.bumptech.glide.Glide; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.JumpActivityUtil; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | */ |
| | | private void readCommonMsg(String type) { |
| | | // final boolean isLogin = sp.getBoolean("isLogin", false); |
| | | String uid = mcontext.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getreadCommonMsg(mcontext, uid, type, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getreadCommonMsg(mcontext, UserUtil.getUid(ShoppingApplication.application), type, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | ShoppingApi.createShareLink(this, user.getId(), goods.getGoodsId(), goods.getGoodsType() + "", "multiGoodsShare", null, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, Long.parseLong(user.getId()), goods.getGoodsId(), goods.getGoodsType() + "", "multiGoodsShare", null, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | cropSingleGoods(entity, cropImageListener); |
| | | return; |
| | | } |
| | | ShoppingApi.createShareLink(this, user.getId(), goods.getGoodsId(), goods.getGoodsType() + "", "multiGoodsShare", null, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this,Long.parseLong(user.getId()), goods.getGoodsId(), goods.getGoodsType() + "", "multiGoodsShare", null, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.FirstCategory; |
| | | import com.tejia.lijin.app.entity.HomeBanner; |
| | | import com.tejia.lijin.app.entity.JumpDetail; |
| | |
| | | && mList.size() == 0) { |
| | | pd.show(); |
| | | } |
| | | String uid = getContext().getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getRecommendIndex(vp_banner.getContext(), uid, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getRecommendIndex(vp_banner.getContext(), UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onFinish() { |
| | | super.onFinish(); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | | import com.wpc.library.recyclerviewhelper.DividerItemDecoration; |
| | |
| | | |
| | | Gson gson = new GsonBuilder().serializeNulls().create(); |
| | | String filters = gson.toJson(filter); |
| | | String uid = tv_filter.getContext().getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.search(bottom.getContext(), isCopy ? getActivity().getIntent().getStringExtra("link") : kw.trim(), |
| | | page + "", filters, goodsType + "", order + "", uid, PREFIX_NOTIFY_TYPE + goodsType, |
| | | page + "", filters, goodsType + "", order + "", UserUtil.getUid(ShoppingApplication.application), PREFIX_NOTIFY_TYPE + goodsType, |
| | | new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.nostra13.universalimageloader.core.ImageLoader; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.nostra13.universalimageloader.core.display.FadeInBitmapDisplayer; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.umeng.analytics.MobclickAgent; |
| | | import com.wang.avi.AVLoadingIndicatorView; |
| | | import com.wpc.library.content.ConnectivityChangeHelper; |
| | |
| | | |
| | | private void getGoodsDetail() { |
| | | isQuestDetail = true; |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, uid, from, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsInfoTB(this, goodsId, UserUtil.getUid(ShoppingApplication.application), from, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | /** |
| | | * 获取PID 信息 |
| | | */ |
| | | private void getTBLinkInfo(String uid) { |
| | | private void getTBLinkInfo(Long uid) { |
| | | |
| | | if (shapeLoadingDialog == null) { |
| | | shapeLoadingDialog = new ShapeLoadingDialog.Builder(this).build(); |
| | |
| | | private void getTaobaoShareLink(String num) { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(this).build(); |
| | | pb.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(this, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, num, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(this, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, num, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * 添加到收藏 |
| | | */ |
| | | private void collection() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.collectionGoods(ShareExplosionsGoodsDetailActivity.this, goodsId, uid, isCollect ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.collectionGoods(ShareExplosionsGoodsDetailActivity.this, goodsId, UserUtil.getUid(ShoppingApplication.application), isCollect ? "2" : "1", mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * 添加到分享库 |
| | | */ |
| | | private void addSelectionStorehouse() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.addSelectionStoreHouse(ShareExplosionsGoodsDetailActivity.this, goodsId, uid, mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.addSelectionStoreHouse(ShareExplosionsGoodsDetailActivity.this, goodsId, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | private void bindInfo2() { |
| | | SharedPreferences sp = getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | getTBLinkInfo(uid); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | isTBStartBind = false; |
| | | } |
| | | |
| | |
| | | String orderUrl; |
| | | |
| | | private void getTaoBaoH5AuthInfo(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, uid, goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | }).create().show(); |
| | | // getTaobaoShareLink(); |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | private void getTaoBaoH5AuthInfo2(final String source) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", null); |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, uid, goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(ShareExplosionsGoodsDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), goodsId, source, false, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, final JSONObject jsonObject) throws Exception { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2:code:" + jsonObject.optInt("code")); |
| | |
| | | } else if (source.equalsIgnoreCase("zigou")) { |
| | | // Log.e("mResult", "getTaoBaoH5AuthInfo2():isLogin---" + AlibcLogin.getInstance().isLogin()); |
| | | if (AlibcLogin.getInstance().isLogin()) { |
| | | getTBLinkInfo(getSharedPreferences("user", MODE_PRIVATE).getString("uid", "")); |
| | | getTBLinkInfo(UserUtil.getUid(ShoppingApplication.application)); |
| | | } else { |
| | | tbBuyLogin(); |
| | | } |
| | |
| | | private void getGoodsCouponList() { |
| | | final ShapeLoadingDialog pd = new ShapeLoadingDialog.Builder(this).build(); |
| | | pd.show(); |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE) |
| | | .getString("uid", ""); |
| | | ShoppingApi.getGoodsCouponList(this, uid, Constant.GOODS_TYPE_TB, goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getGoodsCouponList(this, UserUtil.getUid(ShoppingApplication.application), Constant.GOODS_TYPE_TB, goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | * @param info |
| | | */ |
| | | private void useFreeSingleTicket(FreeSingleTicket info) { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.useFreeSingleTicket(ShareExplosionsGoodsDetailActivity.this, uid, info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.useFreeSingleTicket(ShareExplosionsGoodsDetailActivity.this, UserUtil.getUid(ShoppingApplication.application), info.getId(), goodsId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.entity.TaoBaoGoodsBrief; |
| | | import com.tejia.lijin.app.ui.BaseActivity; |
| | | import com.tejia.lijin.app.util.TopStatusSettings; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | |
| | | import org.apache.http.Header; |
| | | import org.json.JSONObject; |
| | |
| | | *获取爆款商品列表 |
| | | */ |
| | | private void getGoodsList() { |
| | | String uid = getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | ShoppingApi.getShareExplosions(this, uid, page, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getShareExplosions(this, UserUtil.getUid(ShoppingApplication.application), page, new BasicTextHttpResponseHandler() { |
| | | |
| | | @Override |
| | | public void onStart() { |
| | |
| | | import com.bumptech.glide.request.transition.Transition; |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.wpc.library.util.common.DimenUtils; |
| | | import com.wpc.library.util.common.StringUtils; |
| | |
| | | */ |
| | | private void resetShareTextTemplate() { |
| | | SharedPreferences sp = getContext().getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.resetShareTextTemplate(getContext(), uid, shareInfo.getGoodsInfo().isHasCoupon() + "", |
| | | ShoppingApi.resetShareTextTemplate(getContext(), UserUtil.getUid(ShoppingApplication.application), shareInfo.getGoodsInfo().isHasCoupon() + "", |
| | | shareInfo.getGoodsInfo().getGoodsId(), shareInfo.getTljId(), shareInfo.getGoodsInfo().getGoodsType(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | |
| | | Glide.with(this).load(shareInfo.getNotifyPictureNew()).into(iv_notify); |
| | | |
| | | tv_invite_code.setText("邀请码:" + UserUtil.getInviteCode(getContext(), UserUtil.getUid(getContext()) + "")); |
| | | tv_invite_code.setText("邀请码:" + UserUtil.getInviteCode(getContext())); |
| | | fl_notify.post(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | |
| | | import com.app.hubert.guide.util.ScreenUtils; |
| | | import com.nostra13.universalimageloader.core.DisplayImageOptions; |
| | | import com.nostra13.universalimageloader.core.assist.ImageScaleType; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.RetainViewFragment; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.R; |
| | |
| | | */ |
| | | private void resetShareTextTemplate() { |
| | | SharedPreferences sp = getContext().getSharedPreferences("user", Context.MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | ShoppingApi.resetShareTextTemplate(getContext(), uid, shareInfo.getGoodsInfo().isHasCoupon() + "", |
| | | ShoppingApi.resetShareTextTemplate(getContext(), UserUtil.getUid(ShoppingApplication.application), shareInfo.getGoodsInfo().isHasCoupon() + "", |
| | | shareInfo.getGoodsInfo().getGoodsId(), shareInfo.getTljId(), shareInfo.getGoodsInfo().getGoodsType(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | if (!pd.isShowing()) |
| | | pd.show(); |
| | | Long uid = UserUtil.getUid(getContext()); |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid + "", null, "share", true, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTaoBaoAuthInfo(getContext(), uid , null, "share", true, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | |
| | | @Override |
| | | public void onCopyClick(int position) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), "" + UserUtil.getUid(getContext()), true)) { |
| | | if (LoginAndInviteStatusUtil.acessNext(getContext(), UserUtil.getUid(getContext()), true)) { |
| | | //复制 |
| | | ShoppingApi.copySpecialComment(getContext(), UserUtil.getUid(getContext()), mList.get(position).getId(), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | |
| | | * @param dialog |
| | | * @param type |
| | | */ |
| | | public void showCopyGiftDialog(final GiftCoupon giftCoupon, final String uid, Dialog dialog, final String type) { |
| | | public void showCopyGiftDialog(final GiftCoupon giftCoupon, final Long uid, Dialog dialog, final String type) { |
| | | CopyGiftDialog.Builder builder = new CopyGiftDialog.Builder(mContext); |
| | | builder.setMessage(giftCoupon); |
| | | builder.setPositiveButton("", new DialogInterface.OnClickListener() { |
| | |
| | | * @param token |
| | | * @param uid |
| | | */ |
| | | private void gettokenReceive(String token, String uid, final String type) { |
| | | private void gettokenReceive(String token, Long uid, final String type) { |
| | | ShoppingApi.getTokenReceive(mContext, uid, token, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | |
| | | return; |
| | | } else { |
| | | //判断是否有登录未激活的情况 |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) { |
| | | return; |
| | | } |
| | | } |
| | |
| | | import com.alibaba.baichuan.android.trade.model.OpenType; |
| | | import com.alibaba.baichuan.trade.biz.AlibcConstants; |
| | | import com.alibaba.baichuan.trade.biz.core.taoke.AlibcTaokeParams; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.util.security.DEScrypt; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | @JavascriptInterface |
| | | public void showOrder(String ids) { |
| | | String mIds = DEScrypt.encode(ids, "WWVTaGlGQU5MSTg4OSor", "Kk0jMzRmPyw="); |
| | | String uid = mContext.getSharedPreferences("user", MODE_PRIVATE).getString("uid", ""); |
| | | Long uid = UserUtil.getUid(ShoppingApplication.application); |
| | | if (StringUtils.isEmpty(source)) { |
| | | ShoppingApi.uploadParsedOrder(mContext, uid, mIds, null); |
| | | } else { |
| | |
| | | editor.commit(); |
| | | //保存邀请码 |
| | | String inviteCode = "888888"; |
| | | UserUtil.setInviteCode(context, inviteCode, uid + ""); |
| | | UserUtil.setInviteCode(context, inviteCode); |
| | | } |
| | | |
| | | } |
| | |
| | | * 注册 OPPO RegId |
| | | */ |
| | | public static void registeredOPPOId(Context context) { |
| | | String uid = context.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", "") + ""; |
| | | // Log.e("eee", "registeredOPPOId-uid: " + uid); |
| | | String registerId = null; |
| | | if (PushManager.getInstance() != null) |
| | | registerId = PushManager.getInstance().getRegisterID(); |
| | | if (!StringUtils.isEmpty(registerId)) |
| | | ShoppingApi.bindOPPOPush(context, uid, registerId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.bindOPPOPush(context, UserUtil.getUid(ShoppingApplication.application), registerId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | * 注册 VIVO RegId |
| | | */ |
| | | public static void registeredVIVORegId(Context context) { |
| | | String uid = context.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", "") + ""; |
| | | // Log.e("eee", "registeredVIVORegId-uid: " + uid); |
| | | String registerId = null; |
| | | if (PushClient.getInstance(context) != null) |
| | | registerId = PushClient.getInstance(context).getRegId(); |
| | | if (!StringUtils.isEmpty(registerId)) |
| | | ShoppingApi.bindVIVOPush(context, uid, registerId, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.bindVIVOPush(context, UserUtil.getUid(ShoppingApplication.application), registerId, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | super.onSuccessPerfect(statusCode, headers, jsonObject); |
| | |
| | | public static void createShareLink(final Context mContext, final GoodsDetail mInfo, String from) { |
| | | final ShapeLoadingDialog pb = new ShapeLoadingDialog.Builder(mContext).build(); |
| | | pb.show(); |
| | | String uid = mContext.getSharedPreferences("user", mContext.MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.createShareLink(mContext, uid, mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.createShareLink(mContext, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsId(), mInfo.getGoods().getGoodsType() + "", from, null, null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.wpc.library.util.security.DEScrypt; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | |
| | | if (mContext == null) { |
| | | return; |
| | | } |
| | | String uid = mContext.getSharedPreferences("user", |
| | | MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.getTaoBaoCartConfig(mContext, uid, position, new BasicTextHttpResponseHandler() { |
| | | |
| | | |
| | | ShoppingApi.getTaoBaoCartConfig(mContext, UserUtil.getUid(ShoppingApplication.application), position, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optInt("code") == 0) { |
| | |
| | | SharedPreferences sp = mContext.getSharedPreferences("user", MODE_PRIVATE); |
| | | String uid = sp.getString("uid", ""); |
| | | Log.e("mResult", "uid---" + uid); |
| | | ShoppingApi.getTBLinkInfo(mContext, uid, goodsId, "convertLink", null, new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTBLinkInfo(mContext, UserUtil.getUid(ShoppingApplication.application), goodsId, "convertLink", null, new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | |
| | | /** |
| | | * 商品购买 |
| | | * |
| | | * @param activity |
| | | * @param context |
| | | * @param requestInfo |
| | |
| | | |
| | | |
| | | private static void buyTB(final Activity activity, final Context context, GoodsBuyRequestInfo requestInfo, final IBuyGoodsResultListener buyGoodsResultListener) { |
| | | ShoppingApi.getTBLinkInfo(context, requestInfo.getUid(), requestInfo.getGoodsId(), requestInfo.getFrom(), "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getTBLinkInfo(context,requestInfo.getUid(), requestInfo.getGoodsId(), requestInfo.getFrom(), "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | if (jsonObject.optString("code").equalsIgnoreCase("0")) { |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 商品购买请求参数 |
| | | */ |
| | |
| | | private int goodsType; |
| | | private String goodsId; |
| | | private String couponLink; |
| | | private String uid; |
| | | private Long uid; |
| | | private String from; |
| | | |
| | | |
| | |
| | | this.couponLink = couponLink; |
| | | } |
| | | |
| | | public String getUid() { |
| | | public Long getUid() { |
| | | return uid; |
| | | } |
| | | |
| | | public void setUid(String uid) { |
| | | public void setUid(Long uid) { |
| | | this.uid = uid; |
| | | } |
| | | |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.tejia.lijin.app.util.user.UserUtil; |
| | | import com.wpc.library.util.security.MD5Utils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | private static void isGiftCoupon(final GiftCoupon giftCoupon, String type, Activity context) { |
| | | CopyGiftDialogUtils utils = new CopyGiftDialogUtils(context); |
| | | dialog = new Dialog(context); |
| | | utils.showCopyGiftDialog(giftCoupon, context.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""), dialog, type); |
| | | utils.showCopyGiftDialog(giftCoupon, UserUtil.getUid(ShoppingApplication.application), dialog, type); |
| | | } |
| | | |
| | | |
| | |
| | | return; |
| | | if(dialog!=null&&dialog.isShowing()) |
| | | return; |
| | | ShoppingApi.getNewGoodsInfo(context, description, context.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", ""), new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.getNewGoodsInfo(context, description,UserUtil.getUid(ShoppingApplication.application), new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception { |
| | | //防止重复弹框 |
| | |
| | | import android.widget.TextView; |
| | | import android.widget.Toast; |
| | | |
| | | import com.tejia.lijin.app.ShoppingApplication; |
| | | import com.wpc.library.util.common.StringUtils; |
| | | import com.tejia.lijin.app.BasicTextHttpResponseHandler; |
| | | import com.tejia.lijin.app.ShoppingApi; |
| | |
| | | if (mInfo.getGoods() == null) |
| | | return; |
| | | |
| | | if (!LoginAndInviteStatusUtil.acessNext(activity, UserUtil.getUid(activity) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(activity, UserUtil.getUid(activity), true)) |
| | | return; |
| | | |
| | | if (!DuplicateEventFilterUtil.allowEvent("sendOrder", 3000)) { |
| | |
| | | } |
| | | |
| | | final ShapeLoadingDialog pd = new ShapeLoadingDialog.Builder(activity).build(); |
| | | String uid = activity.getSharedPreferences("user", Context.MODE_PRIVATE).getString("uid", "0"); |
| | | ShoppingApi.sendGoodsOrder(activity, goodsId, uid, mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | ShoppingApi.sendGoodsOrder(activity, goodsId, UserUtil.getUid(ShoppingApplication.application), mInfo.getGoods().getGoodsType() + "", new BasicTextHttpResponseHandler() { |
| | | @Override |
| | | public void onStart() { |
| | | super.onStart(); |
| | |
| | | |
| | | /** |
| | | * 设置券信息 |
| | | * |
| | | * @param tv_coupon_amount |
| | | * @param tv_coupon_condition |
| | | * @param tv_coupon_date |
| | | * @param info |
| | | */ |
| | | public static void setCouponInfo(TextView tv_coupon_amount, TextView tv_coupon_condition, TextView tv_coupon_date, CouponInfo info){ |
| | | tv_coupon_amount.setText( info.getAmount()); |
| | | public static void setCouponInfo(TextView tv_coupon_amount, TextView tv_coupon_condition, TextView tv_coupon_date, CouponInfo info) { |
| | | tv_coupon_amount.setText(info.getAmount()); |
| | | tv_coupon_condition.setText(String.format("满%s元可用", info.getStartFee())); |
| | | tv_coupon_condition.setVisibility(View.VISIBLE); |
| | | if (!StringUtils.isEmpty(info.getStartTime()) && !StringUtils.isEmpty(info.getEndTime())) { |
| | | tv_coupon_date.setVisibility(View.VISIBLE); |
| | | tv_coupon_date.setText("有效期: "+info.getStartTime() + "-" + info.getEndTime()); |
| | | tv_coupon_date.setText("有效期: " + info.getStartTime() + "-" + info.getEndTime()); |
| | | } else { |
| | | tv_coupon_date.setVisibility(View.GONE); |
| | | } |
| | |
| | | |
| | | //订单找回 |
| | | public void jumpFindOrder() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | if (!isLogin()) {//登录 |
| | | UserUtil.jumpLogin(context); |
| | |
| | | |
| | | //跳转订单 |
| | | public void jumpOrder() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | UserCustomEvent.userOrder(context); |
| | | if (!isLogin()) { |
| | |
| | | |
| | | //收藏 |
| | | public void jumpCollect() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | UserCustomEvent.userCollect(context); |
| | | if (isLogin()) { |
| | |
| | | |
| | | //转链 |
| | | public void jumpConvertLink() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | UserCustomEvent.userConvertLink(context); |
| | | if (isLogin()) { |
| | |
| | | |
| | | //跳转分享记录 |
| | | public void jumpShareHistory() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | UserCustomEvent.userShareHistory(context); |
| | | if (isLogin()) { |
| | |
| | | |
| | | //跳转云发单 |
| | | public void jumpCloud() { |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) + "", true)) |
| | | if (!LoginAndInviteStatusUtil.acessNext(context, UserUtil.getUid(context) , true)) |
| | | return; |
| | | if (isLogin()) { |
| | | context.startActivity(new Intent(context, ShareBrowserActivity.class).putExtra("url", cloudUrl).putExtra("clipboard", false + "")); |
| | |
| | | */ |
| | | public class LoginAndInviteStatusUtil { |
| | | |
| | | public static boolean acessNext(Context context, String uid, boolean mustLogin) { |
| | | public static boolean acessNext(Context context, Long uid, boolean mustLogin) { |
| | | |
| | | if (mustLogin && (StringUtils.isNullOrEmpty(uid) || "0".equalsIgnoreCase(uid))) { |
| | | if (mustLogin && uid == null) { |
| | | context.startActivity(new Intent(context, LoginSelectActivity.class).setFlags(FLAG_ACTIVITY_NEW_TASK)); |
| | | return false; |
| | | } |
| | | |
| | | if (StringUtils.isNullOrEmpty(uid)) |
| | | return true; |
| | | |
| | | if ("0".equalsIgnoreCase(uid)) |
| | | return true; |
| | | // if (!StringUtils.isNullOrEmpty(UserUtil.getInviteCode(context, uid))) { |
| | | // return true; |
| | | // } |
| | | // jumpInviteActive(context); |
| | | return true; |
| | | } |
| | | |
| | |
| | | return sp.getBoolean("isLogin", false); |
| | | } |
| | | |
| | | public static void setInviteCode(Context context, String uid, String inviteCode) { |
| | | public static void setInviteCode(Context context, String inviteCode) { |
| | | SharedPreferences sp = context.getSharedPreferences("user-info", Context.MODE_PRIVATE); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | editor.putString("inviteCode", inviteCode); |
| | | editor.commit(); |
| | | } |
| | | |
| | | public static String getInviteCode(Context context, String uid) { |
| | | public static String getInviteCode(Context context) { |
| | | SharedPreferences sp = context.getSharedPreferences("user-info", Context.MODE_PRIVATE); |
| | | return sp.getString("inviteCode", ""); |
| | | } |
| | |
| | | public static UserLoginStatus getLoginState(Context context) { |
| | | boolean isLogin = isLogin(context); |
| | | if (isLogin) { |
| | | String inviteCode = getInviteCode(context, getUid(context) + ""); |
| | | String inviteCode = getInviteCode(context); |
| | | if (StringUtils.isNullOrEmpty(inviteCode)) |
| | | return UserLoginStatus.LOINGED_NO_ACTIVE; |
| | | else |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| | | xmlns:app="http://schemas.android.com/apk/res-auto" |
| | | android:layout_width="match_parent" |
| | | android:layout_height="match_parent" |
| | | android:background="@color/page_bg_color" |
| | | android:orientation="vertical"> |
| | | |
| | | <include layout="@layout/item_status_bar" /> |
| | | |
| | | <LinearLayout |
| | | android:id="@+id/ll_content" |
| | |
| | | </FrameLayout> |
| | | |
| | | |
| | | </FrameLayout> |
| | | </RelativeLayout> |