Commit a0389dc142c4ed5aad74444469bf9169317ef026
1 parent
b7c677cc
二维码扫描内部跳转修改
Showing
4 changed files
with
29 additions
and
4 deletions
config.gradle
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/activity/ShareRecordActivity.java
| @@ -21,6 +21,7 @@ import com.bumptech.glide.Glide; | @@ -21,6 +21,7 @@ import com.bumptech.glide.Glide; | ||
| 21 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; | 21 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; |
| 22 | import com.bumptech.glide.request.RequestOptions; | 22 | import com.bumptech.glide.request.RequestOptions; |
| 23 | import com.cnlive.libs.base.arouter.QrService; | 23 | import com.cnlive.libs.base.arouter.QrService; |
| 24 | +import com.cnlive.libs.base.util.SimpleDES; | ||
| 24 | import com.cnlive.libs.base.util.StatusBarUtil; | 25 | import com.cnlive.libs.base.util.StatusBarUtil; |
| 25 | import com.cnlive.libs.base.util.StatusBarUtil2; | 26 | import com.cnlive.libs.base.util.StatusBarUtil2; |
| 26 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; | 27 | import com.cnlive.moudle.pedometer.commonInfo.CommonInfo; |
| @@ -30,6 +31,8 @@ import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; | @@ -30,6 +31,8 @@ import com.cnlive.moudle.pedometer.utils.lib_permisshelper.PermissionsUtils; | ||
| 30 | import com.example.moudle_pedometer.R; | 31 | import com.example.moudle_pedometer.R; |
| 31 | import com.qmuiteam.qmui.util.QMUIDrawableHelper; | 32 | import com.qmuiteam.qmui.util.QMUIDrawableHelper; |
| 32 | 33 | ||
| 34 | +import org.json.JSONObject; | ||
| 35 | + | ||
| 33 | import java.io.ByteArrayOutputStream; | 36 | import java.io.ByteArrayOutputStream; |
| 34 | import java.io.IOException; | 37 | import java.io.IOException; |
| 35 | import java.io.ObjectOutputStream; | 38 | import java.io.ObjectOutputStream; |
| @@ -122,10 +125,20 @@ public class ShareRecordActivity extends AppCompatActivity { | @@ -122,10 +125,20 @@ public class ShareRecordActivity extends AppCompatActivity { | ||
| 122 | } | 125 | } |
| 123 | } | 126 | } |
| 124 | }); | 127 | }); |
| 125 | - | ||
| 126 | QrService service = (QrService) ARouter.getInstance().navigation(QrService.class); | 128 | QrService service = (QrService) ARouter.getInstance().navigation(QrService.class); |
| 127 | - Bitmap bitmap = service.createQRNoIconBitmap("http://apiwjj.cnlive.com/download/index.html", 350); | ||
| 128 | - ((ImageView) findViewById(R.id.down_img)).setImageBitmap(bitmap); | 129 | + JSONObject jsonObject = new JSONObject(); |
| 130 | + try { | ||
| 131 | + jsonObject.put("eventId", CommonInfo.getStreetId(ShareRecordActivity.this)); | ||
| 132 | + jsonObject.put("type", "dazhongQrType"); | ||
| 133 | + String qrContent = jsonObject.toString(); | ||
| 134 | + String encryptionContent = SimpleDES.ebotongEncrypto(qrContent, "cnliveIm"); | ||
| 135 | + encryptionContent = encryptionContent.replaceAll("\\\n", ""); | ||
| 136 | + String url = "http://apiwjj.cnlive.com/download/index.html" + "&isDZTVQr=" + encryptionContent; | ||
| 137 | + Bitmap bitmap = service.createQRNoIconBitmap(url, 350); | ||
| 138 | + ((ImageView) findViewById(R.id.down_img)).setImageBitmap(bitmap); | ||
| 139 | + }catch (Exception e){ | ||
| 140 | + | ||
| 141 | + } | ||
| 129 | } | 142 | } |
| 130 | 143 | ||
| 131 | private void share() { | 144 | private void share() { |
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/ui/adapter/TakePartAdapter.java
| @@ -8,8 +8,10 @@ import android.view.LayoutInflater; | @@ -8,8 +8,10 @@ import android.view.LayoutInflater; | ||
| 8 | import android.view.View; | 8 | import android.view.View; |
| 9 | import android.view.ViewGroup; | 9 | import android.view.ViewGroup; |
| 10 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
| 11 | +import android.widget.RelativeLayout; | ||
| 11 | import android.widget.TextView; | 12 | import android.widget.TextView; |
| 12 | 13 | ||
| 14 | +import com.alibaba.android.arouter.launcher.ARouter; | ||
| 13 | import com.bumptech.glide.Glide; | 15 | import com.bumptech.glide.Glide; |
| 14 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; | 16 | import com.bumptech.glide.load.resource.bitmap.CircleCrop; |
| 15 | import com.bumptech.glide.request.RequestOptions; | 17 | import com.bumptech.glide.request.RequestOptions; |
| @@ -48,6 +50,13 @@ public class TakePartAdapter extends RecyclerView.Adapter<TakePartAdapter.MyHold | @@ -48,6 +50,13 @@ public class TakePartAdapter extends RecyclerView.Adapter<TakePartAdapter.MyHold | ||
| 48 | .apply(RequestOptions.bitmapTransform(new CircleCrop()).placeholder(R.drawable.ic_icon)).into(myViewHolder.icon_img); | 50 | .apply(RequestOptions.bitmapTransform(new CircleCrop()).placeholder(R.drawable.ic_icon)).into(myViewHolder.icon_img); |
| 49 | } | 51 | } |
| 50 | myViewHolder.nickname.setText(list.get(i).getNickName()); | 52 | myViewHolder.nickname.setText(list.get(i).getNickName()); |
| 53 | + myViewHolder.ry_part.setOnClickListener(v -> { | ||
| 54 | + ARouter.getInstance().build("/chat/UserInfoActivity") | ||
| 55 | + .withString("rNickName", list.get(i).getNickName()) | ||
| 56 | + .withString("rImage", list.get(i).getImage()) | ||
| 57 | + .withString("rUserId", list.get(i).getUserId()) | ||
| 58 | + .navigation(context); | ||
| 59 | + }); | ||
| 51 | } | 60 | } |
| 52 | 61 | ||
| 53 | @Override | 62 | @Override |
| @@ -59,11 +68,13 @@ public class TakePartAdapter extends RecyclerView.Adapter<TakePartAdapter.MyHold | @@ -59,11 +68,13 @@ public class TakePartAdapter extends RecyclerView.Adapter<TakePartAdapter.MyHold | ||
| 59 | 68 | ||
| 60 | ImageView icon_img; | 69 | ImageView icon_img; |
| 61 | TextView nickname; | 70 | TextView nickname; |
| 71 | + RelativeLayout ry_part; | ||
| 62 | 72 | ||
| 63 | public MyHolder(@NonNull View itemView) { | 73 | public MyHolder(@NonNull View itemView) { |
| 64 | super(itemView); | 74 | super(itemView); |
| 65 | icon_img = itemView.findViewById(R.id.icon_img); | 75 | icon_img = itemView.findViewById(R.id.icon_img); |
| 66 | nickname = itemView.findViewById(R.id.nickname); | 76 | nickname = itemView.findViewById(R.id.nickname); |
| 77 | + ry_part = itemView.findViewById(R.id.ry_part); | ||
| 67 | } | 78 | } |
| 68 | } | 79 | } |
| 69 | } | 80 | } |
moudle_pedometer/src/main/res/layout/item_tabke_part.xml
| 1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <RelativeLayout | 2 | <RelativeLayout |
| 3 | + android:id="@+id/ry_part" | ||
| 3 | xmlns:android="http://schemas.android.com/apk/res/android" | 4 | xmlns:android="http://schemas.android.com/apk/res/android" |
| 4 | android:layout_width="match_parent" | 5 | android:layout_width="match_parent" |
| 5 | android:layout_height="wrap_content" | 6 | android:layout_height="wrap_content" |