From 1b4b3fed2569ac21ad6feb0a3a2c051175e7c36e Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期五, 14 五月 2021 19:47:25 +0800 Subject: [PATCH] 用户IDString改为Long,详情页初步修改 --- app/src/main/java/com/tejia/lijin/app/util/ToolUtil.java | 10 +++------- 1 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/tejia/lijin/app/util/ToolUtil.java b/app/src/main/java/com/tejia/lijin/app/util/ToolUtil.java index 49e8d07..34e33de 100644 --- a/app/src/main/java/com/tejia/lijin/app/util/ToolUtil.java +++ b/app/src/main/java/com/tejia/lijin/app/util/ToolUtil.java @@ -387,13 +387,11 @@ * 娉ㄥ唽 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); @@ -405,13 +403,12 @@ * 娉ㄥ唽 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); @@ -811,8 +808,7 @@ 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")) { -- Gitblit v1.8.0