Merge remote-tracking branch 'origin/新改版_poyo' into 新改版_poyo
This commit is contained in:
commit
4e42a4b04c
@ -33,7 +33,7 @@ public class HtmlConfig {
|
||||
public static final String LUCK_GIFT_TIP = CommonAppConfig.HOST + "/index.php?g=portal&m=page&a=index&id=26";
|
||||
|
||||
//直播间玩家看到的心愿单
|
||||
public static final String WISHLIST_URL = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Wish&a=index";
|
||||
public static final String WISHLIST_URL = CommonAppConfig.HOST + "/h5/wish/index.html?1=1";
|
||||
|
||||
//直播间玩家看到的转盘
|
||||
public static final String TURNTABLE_URL = CommonAppConfig.HOST + "/Appapi/Turntable/index";
|
||||
|
@ -36,6 +36,7 @@ public abstract class HttpCallback extends AbsCallback<JsonBean> {
|
||||
public void onSuccess(Response<JsonBean> response) {
|
||||
JsonBean bean = response.body();
|
||||
String gson = new Gson().toJson(bean);
|
||||
L.e("gson:" + gson);
|
||||
if (bean != null) {
|
||||
if (200 == bean.getRet()) {
|
||||
Data data = bean.getData();
|
||||
|
@ -43,8 +43,7 @@ public final class JavaConverterFactory extends Converter.Factory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations,
|
||||
Retrofit retrofit) {
|
||||
public Converter<ResponseBody, ?> responseBodyConverter(Type type, Annotation[] annotations, Retrofit retrofit) {
|
||||
TypeAdapter<?> adapter = gson.getAdapter(TypeToken.get(type));
|
||||
return new JsonResponseBodyConverter<>(gson, adapter);
|
||||
}
|
||||
@ -55,9 +54,10 @@ public final class JavaConverterFactory extends Converter.Factory {
|
||||
return super.requestBodyConverter(type, parameterAnnotations, methodAnnotations, retrofit);
|
||||
}
|
||||
|
||||
final class JsonResponseBodyConverter <T> implements Converter<ResponseBody, T> {
|
||||
final class JsonResponseBodyConverter<T> implements Converter<ResponseBody, T> {
|
||||
private final Gson gson;
|
||||
private final TypeAdapter<T> adapter;
|
||||
|
||||
JsonResponseBodyConverter(Gson gson, TypeAdapter<T> adapter) {
|
||||
this.gson = gson;
|
||||
this.adapter = adapter;
|
||||
@ -67,31 +67,31 @@ public final class JavaConverterFactory extends Converter.Factory {
|
||||
public T convert(ResponseBody value) throws IOException {
|
||||
String response = value.string();
|
||||
String allResponseData;
|
||||
L.e("解密前::"+response);
|
||||
L.e("解密前::" + response);
|
||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||
if(jsonObject!=null){
|
||||
allResponseData = jsonObject.getString("data");
|
||||
if(allResponseData!=null){
|
||||
byte[] decodedData = null;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
decodedData = Base64.getDecoder().decode(allResponseData);
|
||||
}
|
||||
response = AesUtils.decryptToString(decodedData);
|
||||
allResponseData = jsonObject.getString("data");
|
||||
if (allResponseData.indexOf(":") <= 0) {
|
||||
byte[] decodedData = null;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
decodedData = Base64.getDecoder().decode(allResponseData);
|
||||
}
|
||||
}
|
||||
jsonObject.put("data",JSONObject.parseObject(response));
|
||||
response = AesUtils.decryptToString(decodedData);
|
||||
jsonObject.put("data", JSONObject.parseObject(response));
|
||||
|
||||
response = JSON.toJSONString(jsonObject);
|
||||
L.e("解密后::"+ response);
|
||||
//获取加密数据,解密,之后再让adapter去处理json串,解析具体的数据就可以了
|
||||
try{
|
||||
response = JSON.toJSONString(jsonObject);
|
||||
L.e("解密后::" + response);
|
||||
//获取加密数据,解密,之后再让adapter去处理json串,解析具体的数据就可以了
|
||||
try {
|
||||
return adapter.fromJson(response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
value.close();
|
||||
}
|
||||
} else {
|
||||
return adapter.fromJson(response);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
value.close();
|
||||
}
|
||||
return null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
@ -39,32 +39,35 @@ public class JsonBean {
|
||||
}
|
||||
|
||||
public Data getData() {
|
||||
if(data.indexOf(":")>0){
|
||||
return GsonUtils.fromJson(data,Data.class);
|
||||
}else{
|
||||
L.e("data:" + data);
|
||||
if (data.indexOf(":") > 0) {
|
||||
L.e("未加密::" + data);
|
||||
return JSON.parseObject(data, Data.class);
|
||||
//return GsonUtils.fromJson(data, Data.class);
|
||||
} else {
|
||||
Data resultData = new Data();
|
||||
byte[] decodedData = null;
|
||||
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
|
||||
decodedData = Base64.getDecoder().decode(data);
|
||||
}
|
||||
String decryptedText = AesUtils.decryptToString(decodedData);
|
||||
L.e("解码前:"+data);
|
||||
L.e("解码前-转成base64:"+decodedData);
|
||||
L.e("解码前-解密後:"+decryptedText);
|
||||
L.e("解码前:" + data);
|
||||
L.e("解码前-转成base64:" + decodedData);
|
||||
L.e("解码前-解密後:" + decryptedText);
|
||||
JSONObject object = JSON.parseObject(decryptedText);
|
||||
try {
|
||||
JSONArray jsonArray = object.getJSONArray("info");
|
||||
String [] array = new String[jsonArray.size()];
|
||||
for (int i = 0; i <array.length; i++) {
|
||||
String[] array = new String[jsonArray.size()];
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
array[i] = jsonArray.getString(i);
|
||||
}
|
||||
resultData.setInfo(array);
|
||||
resultData.setCode(object.getInteger("code"));
|
||||
resultData.setMsg(object.getString("msg"));
|
||||
}catch (Exception e) {
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
String [] array = new String[1];
|
||||
array[0]= object.getString("info");
|
||||
String[] array = new String[1];
|
||||
array[0] = object.getString("info");
|
||||
resultData.setInfo(array);
|
||||
resultData.setCode(object.getInteger("code"));
|
||||
resultData.setMsg(object.getString("msg"));
|
||||
|
@ -620,7 +620,7 @@ public class JavascriptInterfaceUtils {
|
||||
@JavascriptInterface
|
||||
public void androidClickToTaskPage() {
|
||||
ARouter.getInstance().build(PATH_REWARD).withString("url",
|
||||
CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index" + "&uid=" + CommonAppConfig.getInstance().getUid()
|
||||
CommonAppConfig.HOST + "/h5/task/index.html?" + "uid=" + CommonAppConfig.getInstance().getUid()
|
||||
+ "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1" + "&isZh=" + (WordUtil.isNewZh() ? "1" : "0")).navigation();
|
||||
}
|
||||
|
||||
|
@ -1183,7 +1183,7 @@
|
||||
<string name="have_already_win">%s has been sent to your personalized dress up</string>
|
||||
<string name="mini_blind_box">Mini blind box</string>
|
||||
<string name="collection_blind_box">Collection blind box</string>
|
||||
<string name="pd_blind_box">PD blind box</string>
|
||||
<string name="pd_blind_box">POYO blind box</string>
|
||||
<string name="individual_dressing">Individual dressing</string>
|
||||
<string name="random_availability">Can be obtained randomly, %s</string>
|
||||
<string name="random_availability2">I got %s %s</string>
|
||||
|
@ -972,7 +972,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
|
||||
dialog.findViewById(R.id.tv_into).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1";
|
||||
String url = CommonAppConfig.HOST + "/h5/task/index.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1";
|
||||
WebViewActivity.forward(mContext, url, true);
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
@ -457,7 +457,7 @@ public class SocketRyClient {
|
||||
} else if (TextUtils.equals(boxType, "2")) {
|
||||
boxTypeName = WordUtil.isNewZh() ? "典藏盲盒" : "Collection blind box";
|
||||
} else {
|
||||
boxTypeName = WordUtil.isNewZh() ? "PD盲盒" : "PD blind box";
|
||||
boxTypeName = WordUtil.isNewZh() ? "POYO盲盒" : "POYO blind box";
|
||||
}
|
||||
AllServerNotifyEvent allServerNotifyEvent
|
||||
= new AllServerNotifyEvent()
|
||||
|
@ -461,7 +461,7 @@ public class SocketSwClient {
|
||||
} else if (TextUtils.equals(boxType, "2")) {
|
||||
boxTypeName = WordUtil.isNewZh() ? "典藏盲盒" : "Collection blind box";
|
||||
} else {
|
||||
boxTypeName = WordUtil.isNewZh() ? "PD盲盒" : "PD blind box";
|
||||
boxTypeName = WordUtil.isNewZh() ? "POYO盲盒" : "POYO blind box";
|
||||
}
|
||||
AllServerNotifyEvent allServerNotifyEvent = new AllServerNotifyEvent().setBlindBoxId(map.getString("blind_box_id")).setBoxType(boxType).setBoxTypeName(boxTypeName).setDressName(WordUtil.isNewZh() ? map.getString("dress_name") : TextUtils.isEmpty(map.getString("dress_nameen")) ? map.getString("dress_name") : map.getString("dress_nameen")).setGiftNotification(map.getString("gift_notification")).setGiftName(WordUtil.isNewZh() ? mCt.getString("giftname") : mCt.getString("giftnameen")).setUserNiceName(map.getString("uname")).setGiftIcon(map.getString("gifticon")).setAnchorName(map.getString("ancherName")).setDisplaySrc(map.getString("display_src"));
|
||||
Log.e("AllServerNotifyEvent", allServerNotifyEvent.toString());
|
||||
|
@ -5523,7 +5523,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
@Override
|
||||
public void run() {
|
||||
BannerBean bannerBean = new BannerBean();
|
||||
bannerBean.setWishlistIcon(model.getWishlistIcon()).setWishlistName(model.getWishlistName()).setWishlistNum(model.getWishlistNum()).setWishlistProgress(model.getWishlistProgress()).setmLink(CommonAppConfig.HOST + "/index.php").setType(1);
|
||||
bannerBean.setWishlistIcon(model.getWishlistIcon()).setWishlistName(model.getWishlistName()).setWishlistNum(model.getWishlistNum()).setWishlistProgress(model.getWishlistProgress()).setmLink(CommonAppConfig.HOST + "/h5/wish/index.html").setType(1);
|
||||
bannerBean.setShow_type("2");
|
||||
mTopBannerList.add(bannerBean);
|
||||
LiveChatBean bean = new LiveChatBean();
|
||||
@ -6243,7 +6243,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
}
|
||||
|
||||
BannerBean bannerBean = new BannerBean();
|
||||
bannerBean.setWishlistIcon(wishListProgress.getWishlistIcon()).setWishlistName(wishListProgress.getWishlistName()).setWishlistNum(wishListProgress.getWishlistNum()).setWishlistProgress(wishListProgress.getWishlistProgress()).setmLink(CommonAppConfig.HOST + "/index.php").setType(1);
|
||||
bannerBean.setWishlistIcon(wishListProgress.getWishlistIcon()).setWishlistName(wishListProgress.getWishlistName()).setWishlistNum(wishListProgress.getWishlistNum()).setWishlistProgress(wishListProgress.getWishlistProgress()).setmLink(CommonAppConfig.HOST + "/h5/wish/index.html").setType(1);
|
||||
bannerBean.setShow_type("2");
|
||||
if (mTopBannerList.size() == 1 || mTopBannerList.size() == 0) {
|
||||
mTopBannerList.add(bannerBean);
|
||||
@ -6302,7 +6302,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
String type = "";
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
htmlUrl.append(bean.getLink()).append(bean.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&g=Appapi&m=Wish&a=index").append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
htmlUrl.append(bean.getLink()).append(bean.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
|
||||
} else {
|
||||
@ -6357,7 +6357,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
|
||||
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
|
||||
String type = "";
|
||||
StringBuffer htmlUrl = new StringBuffer();
|
||||
htmlUrl.append(bean.getLink()).append(bean.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&g=Appapi&m=Wish&a=index").append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
htmlUrl.append(bean.getLink()).append(bean.getLink().contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0"));
|
||||
if (TextUtils.equals(type, "1")) {
|
||||
ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1);
|
||||
} else {
|
||||
|
@ -2337,7 +2337,8 @@
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="50dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:visibility="invisible">
|
||||
android:visibility="invisible"
|
||||
tools:visibility="visible">
|
||||
|
||||
<View
|
||||
android:layout_width="41dp"
|
||||
|
@ -417,7 +417,7 @@ public class EditProfileActivity extends AbsActivity {
|
||||
dialog.findViewById(R.id.tv_into).setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1";
|
||||
String url = CommonAppConfig.HOST + "/h5/task/index.html?uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&tabIndex=1";
|
||||
WebViewActivity.forward(mContext, url,false);
|
||||
dialog.dismiss();
|
||||
}
|
||||
|
@ -540,7 +540,7 @@ public class MainMeViewHolder_PD extends AbsMainViewHolder implements OnItemClic
|
||||
} else if (i == R.id.btn_gold) {
|
||||
MobclickAgent.onEvent(mContext, "my_receive", "充值旁边领取金豆的按钮");
|
||||
// mContext.startActivity(new Intent(mContext, MyWalletActivity.class).putExtra("p", 2));
|
||||
String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=task&a=index";
|
||||
String url = CommonAppConfig.HOST + "/h5/task/index.html?1=1";
|
||||
RewardActivity.forward(mContext, url);
|
||||
} else if (i == R.id.rt_kefu) {
|
||||
WebViewActivity.forward(mContext, beanKefu.getHref(), false);
|
||||
|
@ -2,7 +2,7 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<corners android:radius="25dp" />
|
||||
<corners android:radius="30dp" />
|
||||
<solid android:color="@color/blue_227bef" />
|
||||
</shape>
|
||||
</item>
|
||||
|
@ -51,7 +51,7 @@
|
||||
android:src="@mipmap/icon_facebook" />
|
||||
|
||||
<TextView
|
||||
android:layout_marginStart="25dp"
|
||||
android:layout_marginStart="35dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/user_login_facebook"
|
||||
@ -86,7 +86,7 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:text="@string/user_login_google"
|
||||
android:textColor="@color/black1"
|
||||
android:textSize="14sp" />
|
||||
@ -120,7 +120,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/login_use_phone"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginLeft="35dp"
|
||||
android:textColor="@color/black1"
|
||||
android:textSize="14sp" />
|
||||
</LinearLayout>
|
||||
@ -172,6 +172,7 @@
|
||||
android:id="@+id/lt_login_other"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="100dp"
|
||||
android:layout_marginLeft="25dp"
|
||||
android:layout_marginRight="25dp"
|
||||
android:orientation="vertical">
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 7.7 KiB |
Loading…
Reference in New Issue
Block a user