12345678910111213141516171819202122232425262728293031323334 |
- package com.cooleshow.base.utils;
- import android.text.TextUtils;
- import org.json.JSONArray;
- import org.json.JSONObject;
- /**
- * Author by pq, Date on 2022/11/4.
- */
- public class WebParamsUtils {
- public static boolean isCopyLink(JSONObject jsonObject) {
- try {
- JSONArray button = (JSONArray) jsonObject.opt("button");
- if (button != null && button.length() > 0) {
- String s = (String) button.get(0);
- return TextUtils.equals(s, "copy");
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- return false;
- }
- public static String getShareUrl(JSONObject jsonObject) {
- try {
- String url =jsonObject.optString("url");
- return url;
- } catch (Exception e) {
- e.printStackTrace();
- }
- return "";
- }
- }
|