1:修改交友房出现嘉宾会闭麦的情况
This commit is contained in:
@@ -165,6 +165,11 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
adjustFontScale(getResources().getConfiguration());
|
||||
CrashHandler.init(this);
|
||||
|
||||
if (currentEnvironment.getShelf()==1){
|
||||
if (SpUtil.getShelf()!=1) {
|
||||
SpUtil.setShelf(1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -438,7 +443,7 @@ public class CommonAppContext extends MultiDexApplication implements Applicatio
|
||||
initARouter();
|
||||
if (SpUtil.isAgreePolicy()) {
|
||||
checkInEmulator();
|
||||
UtilConfig.checkInEmulator();
|
||||
// UtilConfig.checkInEmulator();
|
||||
AgoraManager.getInstance(this);
|
||||
AgoraManager.init(currentEnvironment.getSwSdkAppId());
|
||||
MessageListenerSingleton.getInstance();
|
||||
|
||||
@@ -49,12 +49,24 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
|
||||
|
||||
@Override
|
||||
public void initData() {
|
||||
// setYear();
|
||||
// mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
|
||||
// setMonth(TimeUtils.getYear());
|
||||
// mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
|
||||
// setDay(TimeUtils.getYear(), TimeUtils.getMonth());
|
||||
// mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
|
||||
|
||||
setYear();
|
||||
mBinding.pickerViewYear.setSelectedItemPosition(yearList.size());
|
||||
setMonth(TimeUtils.getYear());
|
||||
mBinding.pickerViewMonth.setSelectedItemPosition(monthList.size());
|
||||
setDay(TimeUtils.getYear(), TimeUtils.getMonth());
|
||||
mBinding.pickerViewDay.setSelectedItemPosition(dayList.size());
|
||||
int defaultYearPos = yearList.size() - 1; // 默认选中最新的年份(16年前)
|
||||
mBinding.pickerViewYear.setSelectedItemPosition(defaultYearPos);
|
||||
|
||||
// 获取默认年份
|
||||
int defaultYear = yearList.get(defaultYearPos).getDate();
|
||||
setMonth(defaultYear);
|
||||
mBinding.pickerViewMonth.setSelectedItemPosition(0);
|
||||
|
||||
setDay(defaultYear, 1);
|
||||
mBinding.pickerViewDay.setSelectedItemPosition(0);
|
||||
}
|
||||
|
||||
public void setData(String y, String m, String d) {
|
||||
@@ -124,41 +136,88 @@ public class DateSelectDialog extends BaseBottomSheetDialog<MeDialogDateSelectBi
|
||||
|
||||
|
||||
private List<DateBean> getDay(int year, int month) {
|
||||
int day = TimeUtils.getDaysByYearMonth(year, month);
|
||||
if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
|
||||
day = TimeUtils.getDay();
|
||||
// int day = TimeUtils.getDaysByYearMonth(year, month);
|
||||
// if (year == TimeUtils.getYear() && month == TimeUtils.getMonth()) {
|
||||
// day = TimeUtils.getDay();
|
||||
// }
|
||||
// List<DateBean> dayList = new ArrayList<>();
|
||||
// for (int i = 1; i <= day; i++) {
|
||||
// if (i <= 9) {
|
||||
// dayList.add(new DateBean("0" + i, i));
|
||||
// } else {
|
||||
// dayList.add(new DateBean(String.valueOf(i), i));
|
||||
// }
|
||||
// }
|
||||
|
||||
int dayLimit = TimeUtils.getDaysByYearMonth(year, month);
|
||||
int currentYear = TimeUtils.getYear();
|
||||
int currentMonth = TimeUtils.getMonth();
|
||||
int currentDay = TimeUtils.getDay();
|
||||
|
||||
// 如果是最大年份且是最大月份,则日期不能超过当前日期
|
||||
if (year == currentYear - 16 && month == currentMonth) {
|
||||
dayLimit = currentDay;
|
||||
}
|
||||
|
||||
List<DateBean> dayList = new ArrayList<>();
|
||||
for (int i = 1; i <= day; i++) {
|
||||
for (int i = 1; i <= dayLimit; i++) {
|
||||
if (i <= 9) {
|
||||
dayList.add(new DateBean("0" + i, i));
|
||||
} else {
|
||||
dayList.add(new DateBean(String.valueOf(i), i));
|
||||
}
|
||||
}
|
||||
|
||||
return dayList;
|
||||
}
|
||||
|
||||
private List<DateBean> getMonth(int year) {
|
||||
List<DateBean> mothList = new ArrayList<>();
|
||||
int month = 12;
|
||||
if (year == TimeUtils.getYear()) {
|
||||
month = TimeUtils.getMonth();
|
||||
// List<DateBean> mothList = new ArrayList<>();
|
||||
// int month = 12;
|
||||
// if (year == TimeUtils.getYear()) {
|
||||
// month = TimeUtils.getMonth();
|
||||
// }
|
||||
// for (int i = 1; i <= month; i++) {
|
||||
// if (i <= 9) {
|
||||
// mothList.add(new DateBean("0" + i, i));
|
||||
// } else {
|
||||
// mothList.add(new DateBean(String.valueOf(i), i));
|
||||
// }
|
||||
// }
|
||||
List<DateBean> monthList = new ArrayList<>();
|
||||
int currentYear = TimeUtils.getYear();
|
||||
int currentMonth = TimeUtils.getMonth();
|
||||
|
||||
int monthLimit = 12;
|
||||
// 如果是最大年份(16年前),则月份不能超过当前月份
|
||||
if (year == currentYear - 16) {
|
||||
monthLimit = currentMonth;
|
||||
}
|
||||
for (int i = 1; i <= month; i++) {
|
||||
|
||||
for (int i = 1; i <= monthLimit; i++) {
|
||||
if (i <= 9) {
|
||||
mothList.add(new DateBean("0" + i, i));
|
||||
monthList.add(new DateBean("0" + i, i));
|
||||
} else {
|
||||
mothList.add(new DateBean(String.valueOf(i), i));
|
||||
monthList.add(new DateBean(String.valueOf(i), i));
|
||||
}
|
||||
}
|
||||
return mothList;
|
||||
return monthList;
|
||||
}
|
||||
|
||||
private List<DateBean> getYear() {
|
||||
int year = TimeUtils.getYear();
|
||||
// int year = TimeUtils.getYear();
|
||||
// List<DateBean> yearList = new ArrayList<>();
|
||||
// for (int i = 1900; i <= year; i++) {
|
||||
// yearList.add(new DateBean(String.valueOf(i), i));
|
||||
// }
|
||||
// return yearList;
|
||||
|
||||
int currentYear = TimeUtils.getYear();
|
||||
int minYear = currentYear - 100; // 最小年份设为100年前
|
||||
int maxYear = currentYear - 16; // 最大年份设为16年前
|
||||
|
||||
List<DateBean> yearList = new ArrayList<>();
|
||||
for (int i = 1900; i <= year; i++) {
|
||||
for (int i = minYear; i <= maxYear; i++) {
|
||||
yearList.add(new DateBean(String.valueOf(i), i));
|
||||
}
|
||||
return yearList;
|
||||
|
||||
@@ -32,4 +32,6 @@ public class SPConstants {
|
||||
public static final String USER_INFO = "userInfo";
|
||||
|
||||
public static final String FLOATING_SCREEN = "floatingScreen";
|
||||
|
||||
public static final String SHELF="shelf";
|
||||
}
|
||||
|
||||
@@ -323,6 +323,14 @@ public class SpUtil {
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.EMQTT_CLIENT_ID, clientId);
|
||||
}
|
||||
|
||||
public static void setShelf(int shelf){
|
||||
SPUtils.getInstance(SPConstants.PREFERENCE_NAME).put(SPConstants.SHELF, shelf);
|
||||
}
|
||||
public static int getShelf(){
|
||||
int shelf=SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getInt(SPConstants.SHELF);
|
||||
return shelf;
|
||||
}
|
||||
|
||||
public static String getEmqttId() {
|
||||
String s = SPUtils.getInstance(SPConstants.PREFERENCE_NAME).getString(SPConstants.EMQTT_CLIENT_ID);
|
||||
return s;
|
||||
|
||||
@@ -14,7 +14,8 @@ public enum EnvironmentEnum {
|
||||
1600096860,
|
||||
"3e8f3add448d4692bc1d04c75ffe801b",
|
||||
"tcp://81.70.45.221",
|
||||
"https://vespa.qxyushen.top/h5"),
|
||||
"https://vespa.qxyushen.top/h5",
|
||||
1),
|
||||
TEST(//测试环境
|
||||
"https://test.vespa.qxyushen.top/",
|
||||
"6rdWuz058oq5OahdbFiGEybUcdahd12J83L34Uc7MrPIrxtFG+rXiwDvRcqNvjwbClbbmvMrmxKVkIysFByBsl0Qe9kqd2w8T/nhK5G6eXXlk2V9AjYCieIU+jRnjZBB+Cfechr6rCGJ2aeBARIsXcRPW7wm9WFK9euh5T+v6Pyte68yNaNdcYCll3+U4/uCEog7HygCnMIbAU+kqoPdmn2H+51YOHW+VsnsHd4w1+I3f8Tt0xLIXGM4GWnQueZ5GR46GTWiSYMy8dCIh9SPIMRyC91GosVcfGPMJSdcXqc=",
|
||||
@@ -27,7 +28,8 @@ public enum EnvironmentEnum {
|
||||
1600096890,
|
||||
"02f7339ec98947deaeab173599891932",
|
||||
"tcp://1.13.181.248",
|
||||
"https://tmd.xscmmidi.site/h5");
|
||||
"https://test.vespa.qxyushen.top/h5",
|
||||
1);
|
||||
|
||||
private final String serverUrl;//服务器地址
|
||||
private final String ALI_AUTH_KEY;//阿里云授权key
|
||||
@@ -47,10 +49,11 @@ public enum EnvironmentEnum {
|
||||
private final String mqttUrl;//MQTT服务器地址
|
||||
|
||||
private final String H5Url;//h5地址
|
||||
private final int shelf;//是否上架,0:平台更新,1:上架,发布到对应的应用商城
|
||||
|
||||
EnvironmentEnum(String serverUrl, String ALI_AUTH_KEY, String ossEndPoint, String ossaAcessKeyId,
|
||||
String ossAccessKeySecret, String ossBucketName, String ossBaseUrl, String wxAppId,
|
||||
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url) {
|
||||
int sdkAppId, String swSdkAppId,String mqttUrl,String H5Url,int shelf) {
|
||||
this.serverUrl = serverUrl;
|
||||
this.ALI_AUTH_KEY = ALI_AUTH_KEY;
|
||||
this.ossEndPoint = ossEndPoint;
|
||||
@@ -63,6 +66,11 @@ public enum EnvironmentEnum {
|
||||
this.swSdkAppId = swSdkAppId;
|
||||
this.mqttUrl = mqttUrl;
|
||||
this.H5Url = H5Url;
|
||||
this.shelf = shelf;
|
||||
}
|
||||
|
||||
public int getShelf() {
|
||||
return shelf;
|
||||
}
|
||||
|
||||
public String getH5Url() {
|
||||
|
||||
@@ -40,6 +40,7 @@ import com.xscm.moduleutil.presenter.RewardGiftContacts;
|
||||
import com.xscm.moduleutil.presenter.RewardGiftPresenter;
|
||||
import com.xscm.moduleutil.utils.ColorManager;
|
||||
import com.xscm.moduleutil.utils.ImageUtils;
|
||||
import com.xscm.moduleutil.utils.SpUtil;
|
||||
import com.xscm.moduleutil.widget.GifAvatarOvalView;
|
||||
import com.xscm.moduleutil.widget.floatingView.IFloatingView;
|
||||
|
||||
@@ -201,12 +202,16 @@ public class RewardGiftDialogFragment extends BaseMvpDialogFragment<RewardGiftPr
|
||||
|
||||
@Override
|
||||
public void getGiftLabel(List<GiftLabelBean> giftLabelBeans) {
|
||||
// giftLabelBeanList = new ArrayList<>();
|
||||
// giftLabelBeanList.addAll(giftLabelBeans);
|
||||
// GiftLabelBean giftLabelBean = new GiftLabelBean();
|
||||
// giftLabelBean.setId("0");
|
||||
// giftLabelBean.setName("背包");
|
||||
// giftLabelBeans.add(0, giftLabelBean);
|
||||
if (giftLabelBeans == null) return;
|
||||
if (SpUtil.getShelf()==1){
|
||||
for (GiftLabelBean giftLabelBean1 : giftLabelBeans){
|
||||
if (giftLabelBean1.getId().equals("2")){
|
||||
giftLabelBeans.remove(giftLabelBean1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
mBinding.viewPager.setAdapter(new MyFragmentPagerAdapter(getChildFragmentManager(), giftLabelBeans,fragmentList,""));
|
||||
mBinding.slidingTabLayout.setViewPager(mBinding.viewPager);
|
||||
mBinding.slidingTabLayout.setCurrentTab(0);
|
||||
|
||||
Reference in New Issue
Block a user