充值逻辑

This commit is contained in:
18401019693 2022-11-12 18:00:00 +08:00
parent 7d63869d44
commit cceb697739
2 changed files with 31 additions and 16 deletions

View File

@ -6,7 +6,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import com.yunbao.common.CommonAppConfig;
@ -50,6 +49,15 @@ public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder {
} else {
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
StringBuffer htmlUrl = new StringBuffer();
if (TextUtils.equals(model.getSrc(), "recharge")) {
htmlUrl.append("recharge");
} else if (model.getSrc().contains("?")) {
htmlUrl.append(model.getSrc())
.append("&uid=")
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken());
} else {
htmlUrl.append(CommonAppConfig.HOST)
.append("/")
.append(model.getSrc())
@ -57,6 +65,8 @@ public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder {
.append(userInfo.getId())
.append("&token=")
.append(userInfo.getToken());
}
Bus.get().post(new CustomDrawerPopupEvent()
.setDisMiss(true)
.setHtmlUrl(htmlUrl.toString())

View File

@ -754,6 +754,9 @@ public class LiveAudienceActivity extends LiveActivity {
@Override
public void showerHtml(String htmlUrl, boolean screen) {
if (TextUtils.equals(htmlUrl, "recharge")) {
RouteUtil.forwardMyCoin(mContext);
}else {
if (!screen) {
ZhuangBanActivity.forward(mContext, htmlUrl, false);
} else {
@ -765,6 +768,8 @@ public class LiveAudienceActivity extends LiveActivity {
}
}
}
@Override
public void evenTheWheat() {
Bus.get().post(new LiveAudienceEvent()