替换SDK key,UI调整
This commit is contained in:
@@ -66,8 +66,8 @@
|
||||
<Wechat
|
||||
Id="4"
|
||||
SortId="4"
|
||||
AppId="wx71ff7661b637a4ed"
|
||||
AppSecret="a6227bac88021915ed392abed24bf5e0"
|
||||
AppId="wx0592154beefb4358"
|
||||
AppSecret="75fb2703151a37d154e3be361f36dc7c"
|
||||
UserName="gh_afb25ac019c9"
|
||||
Path="pages/index/index.html?id=1"
|
||||
BypassApproval="false"
|
||||
@@ -76,24 +76,24 @@
|
||||
<WechatMoments
|
||||
Id="5"
|
||||
SortId="5"
|
||||
AppId="wx71ff7661b637a4ed"
|
||||
AppSecret="a6227bac88021915ed392abed24bf5e0"
|
||||
AppId="wx0592154beefb4358"
|
||||
AppSecret="75fb2703151a37d154e3be361f36dc7c"
|
||||
BypassApproval="false"
|
||||
Enable="true" />
|
||||
|
||||
<WechatFavorite
|
||||
Id="6"
|
||||
SortId="6"
|
||||
AppId="wx71ff7661b637a4ed"
|
||||
AppSecret="a6227bac88021915ed392abed24bf5e0"
|
||||
AppId="wx0592154beefb4358"
|
||||
AppSecret="75fb2703151a37d154e3be361f36dc7c"
|
||||
BypassApproval="false"
|
||||
Enable="true" />
|
||||
|
||||
<QQ
|
||||
Id="7"
|
||||
SortId="7"
|
||||
AppId="1109606637"
|
||||
AppKey="MyP7NCRfb3mLnzjx"
|
||||
AppId="101868633"
|
||||
AppKey="ad075f945c4cd98b108890096c671eeb"
|
||||
BypassApproval="false"
|
||||
ShareByAppClient="true"
|
||||
Enable="true" />
|
||||
|
@@ -198,9 +198,12 @@ public abstract class BaseLoginAct extends BaseActivity {
|
||||
|
||||
protected void qqLogin() {
|
||||
// 易盾保护 token
|
||||
String yiDunToken = watchman.getToken(XChatConstants.YI_DUN_BUSINESS_ID);
|
||||
// String yiDunToken = watchman.getToken(XChatConstants.YI_DUN_BUSINESS_ID);
|
||||
// 数美天网 deviceId
|
||||
String shuMeiDeviceId = SmAntiFraud.getDeviceId();
|
||||
// String shuMeiDeviceId = SmAntiFraud.getDeviceId();
|
||||
String yiDunToken = "";
|
||||
String shuMeiDeviceId = "";
|
||||
|
||||
getDialogManager().showProgressDialog(this, "请稍后");
|
||||
AuthModel.get()
|
||||
.qqLogin(yiDunToken, shuMeiDeviceId)
|
||||
|
@@ -52,14 +52,17 @@ public class AccountValidator {
|
||||
public boolean isValid(@NonNull CharSequence text) {
|
||||
if (!TextUtils.isEmpty(text)) {
|
||||
char c = text.charAt(0);
|
||||
if (!(c == '1')) {
|
||||
errorMessage = "手机号码错误";
|
||||
return false;
|
||||
}
|
||||
if(!MobileNumberUtils.isChinaInternalNumber(text) && !MobileNumberUtils.isChinaMobileNumber(text) && !MobileNumberUtils.isChinaTelecomNumber(text) && !MobileNumberUtils.isChinaUnicomNumber(text)){
|
||||
errorMessage = "请填写正确的手机号码";
|
||||
return false;
|
||||
}
|
||||
// if (!(c == '1')) {
|
||||
// errorMessage = "手机号码错误";
|
||||
// return false;
|
||||
// }
|
||||
// if(!MobileNumberUtils.isChinaInternalNumber(text) && !MobileNumberUtils.isChinaMobileNumber(text) && !MobileNumberUtils.isChinaTelecomNumber(text) && !MobileNumberUtils.isChinaUnicomNumber(text)){
|
||||
// errorMessage = "请填写正确的手机号码";
|
||||
// return false;
|
||||
// }
|
||||
// if (text.length() == 7) {
|
||||
// return true;
|
||||
// }
|
||||
} else {
|
||||
errorMessage = "手机号不能为空!";
|
||||
return false;
|
||||
|
@@ -3,7 +3,6 @@ package com.yizhuan.erban.ui.user;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.text.TextUtils;
|
||||
@@ -21,6 +20,7 @@ import com.jude.rollviewpager.hintview.TextHintView;
|
||||
import com.netease.nim.uikit.impl.cache.NimUserInfoCache;
|
||||
import com.netease.nimlib.sdk.RequestCallbackWrapper;
|
||||
import com.netease.nimlib.sdk.uinfo.model.NimUserInfo;
|
||||
import com.trello.rxlifecycle2.android.ActivityEvent;
|
||||
import com.yizhuan.erban.R;
|
||||
import com.yizhuan.erban.UIHelper;
|
||||
import com.yizhuan.erban.avroom.ButtonItemFactory;
|
||||
@@ -28,6 +28,7 @@ import com.yizhuan.erban.avroom.activity.AVRoomActivity;
|
||||
import com.yizhuan.erban.base.BaseBindingActivity;
|
||||
import com.yizhuan.erban.common.widget.dialog.CommonPopupDialog;
|
||||
import com.yizhuan.erban.common.widget.dialog.DialogManager;
|
||||
import com.yizhuan.erban.community.helper.ShareDynamicHelper;
|
||||
import com.yizhuan.erban.databinding.ActivityUserInfoBinding;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyHomeActivity;
|
||||
import com.yizhuan.erban.family.view.activity.FamilyMemberListActivity;
|
||||
@@ -44,14 +45,13 @@ import com.yizhuan.erban.utils.RegexUtil;
|
||||
import com.yizhuan.xchat_android_constants.XChatConstants;
|
||||
import com.yizhuan.xchat_android_core.auth.AuthModel;
|
||||
import com.yizhuan.xchat_android_core.community.bean.WorldDynamicBean;
|
||||
import com.yizhuan.xchat_android_core.community.dynamic.DynamicModel;
|
||||
import com.yizhuan.xchat_android_core.im.friend.IMFriendModel;
|
||||
import com.yizhuan.xchat_android_core.level.UserLevelVo;
|
||||
import com.yizhuan.xchat_android_core.manager.AvRoomDataManager;
|
||||
import com.yizhuan.xchat_android_core.praise.PraiseModel;
|
||||
import com.yizhuan.xchat_android_core.praise.event.IsLikedEvent;
|
||||
import com.yizhuan.xchat_android_core.praise.event.PraiseEvent;
|
||||
import com.yizhuan.xchat_android_core.room.bean.RoomInfo;
|
||||
import com.yizhuan.xchat_android_core.room.model.AvRoomModel;
|
||||
import com.yizhuan.xchat_android_core.statistic.StatisticManager;
|
||||
import com.yizhuan.xchat_android_core.statistic.protocol.StatisticsProtocol;
|
||||
import com.yizhuan.xchat_android_core.user.UserInfoUiMgr;
|
||||
@@ -62,6 +62,7 @@ import com.yizhuan.xchat_android_core.user.bean.UserPhoto;
|
||||
import com.yizhuan.xchat_android_core.user.event.LoginUserInfoUpdateEvent;
|
||||
import com.yizhuan.xchat_android_core.utils.StarUtils;
|
||||
import com.yizhuan.xchat_android_core.utils.net.BeanObserver;
|
||||
import com.yizhuan.xchat_android_core.utils.net.DontWarnObserver;
|
||||
import com.yizhuan.xchat_android_library.annatation.ActLayoutRes;
|
||||
import com.yizhuan.xchat_android_library.utils.ListUtils;
|
||||
import com.yizhuan.xchat_android_library.utils.SizeUtils;
|
||||
@@ -73,6 +74,7 @@ import org.greenrobot.eventbus.ThreadMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* create by lvzebiao on 2018/8/31
|
||||
@@ -124,21 +126,20 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
onFindViews();
|
||||
onSetListener();
|
||||
EventBus.getDefault().register(this);
|
||||
|
||||
|
||||
getUserInfoDetail();
|
||||
getUserInfo();
|
||||
|
||||
initAttentionView();
|
||||
initNestScrollView();
|
||||
|
||||
setEditButton(identityState, true);
|
||||
setBackBottom(true);
|
||||
setTitleVisible(false);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
getUserInfoDetail();
|
||||
}
|
||||
|
||||
private void initAttentionView() {
|
||||
mAttenDrawable = ContextCompat.getDrawable(this, R.drawable.icon_new_attention);
|
||||
@@ -345,9 +346,37 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
*/
|
||||
private void initDynamicList(List<WorldDynamicBean> list) {
|
||||
mBinding.rvDynamic.setLayoutManager(new LinearLayoutManager(this));
|
||||
UserInfoDynamicAdapter dynamicAdapter= new UserInfoDynamicAdapter(this,identityState);
|
||||
UserInfoDynamicAdapter dynamicAdapter = new UserInfoDynamicAdapter(this,identityState);
|
||||
dynamicAdapter.setNewData(list);
|
||||
dynamicAdapter.setEnableLoadMore(false);
|
||||
dynamicAdapter.setOnItemChildClickListener((baseQuickAdapter, view, pos) -> {
|
||||
WorldDynamicBean bean = dynamicAdapter.getItem(pos);
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
if (view.getId() == R.id.iv_more) {
|
||||
List<ButtonItem> list_adapter = new ArrayList<>();
|
||||
if (!UserModel.get().isMyseft(bean.getUid())) {
|
||||
ButtonItem item = new ButtonItem("举报", () -> {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_REPORT_MOMENTS,
|
||||
"举报动态-区分-动态广场");
|
||||
UIHelper.showReportPage(this, bean.getUid(),
|
||||
XChatConstants.REPORT_TYPE_DYNAMIC_SQUARE);
|
||||
});
|
||||
list_adapter.add(item);
|
||||
}
|
||||
if (UserModel.get().isMyseft(bean.getUid()) ||
|
||||
isThisWorldOwner(bean)) {
|
||||
ButtonItem item = new ButtonItem("删除", () -> deleteDynamic(pos,dynamicAdapter));
|
||||
list_adapter.add(item);
|
||||
}
|
||||
getDialogManager().showCommonPopupDialog(list_adapter, "取消");
|
||||
} else if (view.getId() == R.id.ll_share) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_SHARE_MOMENTS,
|
||||
"分享动态-区分-动态广场");
|
||||
new ShareDynamicHelper(this).share(bean);
|
||||
}
|
||||
});
|
||||
mBinding.rvDynamic.setAdapter(dynamicAdapter);
|
||||
}
|
||||
|
||||
@@ -600,7 +629,6 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
tvOfficialMask.setText(name);
|
||||
ImageLoadUtils.loadImage(this,icon,ivOfficialMask);
|
||||
}
|
||||
|
||||
} else {
|
||||
mBinding.inOfficialMask.setVisibility(View.GONE);
|
||||
}
|
||||
@@ -632,26 +660,45 @@ public class UserInfoActivity extends BaseBindingActivity<ActivityUserInfoBindin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void onGetUserRoom(RoomInfo roomInfo) {
|
||||
getDialogManager().dismissDialog();
|
||||
RoomInfo current = AvRoomDataManager.get().mCurrentRoomInfo;
|
||||
if (roomInfo != null && roomInfo.getUid() > 0) {
|
||||
if (current != null) {
|
||||
if (current.getUid() == roomInfo.getUid()) {
|
||||
toast("已经和对方在同一个房间");
|
||||
return;
|
||||
}
|
||||
}
|
||||
AVRoomActivity.start(this, roomInfo.getUid(), roomInfo.getType());
|
||||
} else {
|
||||
toast("对方不在房间内");
|
||||
}
|
||||
/**
|
||||
* 判断自己是不是该世界的创始人
|
||||
*/
|
||||
private boolean isThisWorldOwner(WorldDynamicBean bean) {
|
||||
return bean != null && bean.getWorldUid() == AuthModel.get().getCurrentUid();
|
||||
}
|
||||
|
||||
public void onGetUserRoomFail(String msg) {
|
||||
getDialogManager().dismissDialog();
|
||||
toast(msg);
|
||||
private void deleteDynamic(int pos,UserInfoDynamicAdapter adapter) {
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_DELETE_MOMENTS,
|
||||
"删除动态-区分-动态广场");
|
||||
getDialogManager().showOkCancelWithTitleDialog("删除后不可恢复,确定删除该动态吗?",
|
||||
new DialogManager.OkCancelDialogListener() {
|
||||
@Override
|
||||
public void onOk() {
|
||||
WorldDynamicBean bean = adapter.getItem(pos);
|
||||
if (bean == null) {
|
||||
return;
|
||||
}
|
||||
DynamicModel.get().delete(bean.getWorldId(), bean.getDynamicId())
|
||||
.compose(bindUntilEvent(ActivityEvent.DESTROY))
|
||||
.subscribe(new DontWarnObserver<String>() {
|
||||
@Override
|
||||
public void accept(String s, String error) {
|
||||
super.accept(s, error);
|
||||
if (error != null) {
|
||||
toast(error);
|
||||
} else {
|
||||
toast("删除成功");
|
||||
if (pos < adapter.getData().size()) {
|
||||
if (Objects.equals(bean, adapter.getItem(pos))) {
|
||||
adapter.remove(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -122,8 +122,6 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
etvContent.setText(formatText, mCollapsedStatus, helper.getAdapterPosition(), mCollapsedHeightStatus);
|
||||
}
|
||||
|
||||
|
||||
|
||||
helper.setGone(R.id.ll_miniworld, item.getTag() != null);
|
||||
helper.setText(R.id.tv_mini_world_name,"#" + item.getTag());
|
||||
|
||||
@@ -137,6 +135,9 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
llLike.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
if (item.getDynamicId() == 0){
|
||||
return;
|
||||
}
|
||||
llLike.setEnabled(false);
|
||||
int status = item.isLike() ? 0 : 1;
|
||||
DynamicModel.get().like(worldId, item.getDynamicId(), item.getUid(), status, 1)
|
||||
@@ -164,6 +165,9 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
});
|
||||
//评论
|
||||
helper.getView(R.id.ll_comment).setOnClickListener(v -> {
|
||||
if (item.getDynamicId() == 0){
|
||||
return;
|
||||
}
|
||||
StatisticManager.Instance().onEvent(StatisticsProtocol.Event.EVENT_WORLD_COMMENT_MOMENTS,
|
||||
"点击列表评论按钮-区分-小世界客态页");
|
||||
//1.3.1新埋点
|
||||
@@ -174,19 +178,24 @@ public class UserInfoDynamicAdapter extends BaseQuickAdapter<WorldDynamicBean, B
|
||||
}
|
||||
);
|
||||
|
||||
View.OnClickListener toDetailListener = v ->
|
||||
DynamicDetailActivity.start(context, item.getDynamicId(), worldId,
|
||||
helper.getAdapterPosition(), false, 1);
|
||||
if (item.getDynamicId() != 0){
|
||||
helper.addOnClickListener(R.id.iv_more).addOnClickListener(R.id.ll_share);
|
||||
}
|
||||
|
||||
View.OnClickListener toDetailListener = v -> {
|
||||
if (item.getDynamicId() == 0){
|
||||
return;
|
||||
}
|
||||
DynamicDetailActivity.start(context, item.getDynamicId(), worldId,
|
||||
helper.getAdapterPosition(), false, 1);
|
||||
};
|
||||
|
||||
if (etvContent.mTv != null) {
|
||||
etvContent.mTv.setOnClickListener(toDetailListener);
|
||||
}
|
||||
|
||||
//跳转去详情
|
||||
helper.itemView.setOnClickListener(toDetailListener);
|
||||
|
||||
helper.addOnClickListener(R.id.iv_more)
|
||||
.addOnClickListener(R.id.ll_share);
|
||||
|
||||
}
|
||||
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.9 KiB |
@@ -4,7 +4,7 @@
|
||||
android:drawable="@color/white"
|
||||
android:gravity="fill" />
|
||||
|
||||
<item android:top="180dp">
|
||||
<item android:top="70dp">
|
||||
<bitmap
|
||||
android:gravity="center_horizontal|top"
|
||||
android:src="@drawable/splash_logo" />
|
||||
|
@@ -72,31 +72,45 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@+id/tv_protocol">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_wx_login"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:src="@drawable/ic_login_wx"
|
||||
<TextView
|
||||
android:id="@+id/img_qq_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_login_qq"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
android:textColor="@color/white"
|
||||
android:text="QQ"
|
||||
android:textSize="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
tools:visibility="visible"/>
|
||||
|
||||
<ImageView
|
||||
<TextView
|
||||
android:id="@+id/img_phone_login"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dp_45"
|
||||
android:layout_marginEnd="@dimen/dp_45"
|
||||
android:src="@drawable/ic_login_phone"
|
||||
|
||||
android:drawableTop="@drawable/ic_login_phone"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
android:text="手机"
|
||||
/>
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_qq_login"
|
||||
android:layout_width="33dp"
|
||||
android:layout_height="33dp"
|
||||
android:src="@drawable/ic_login_qq"
|
||||
<TextView
|
||||
android:id="@+id/img_wx_login"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_login_wx"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"/>
|
||||
android:textColor="@color/white"
|
||||
android:text="微信"
|
||||
android:textSize="@dimen/dp_11"
|
||||
android:gravity="center"
|
||||
android:drawablePadding="@dimen/dp_15"
|
||||
tools:visibility="visible" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
@@ -25,7 +25,7 @@ public class AppUpgradeHelper {
|
||||
@SuppressLint("CheckResult")
|
||||
public static void checkAppUpgrade(RxAppCompatActivity activity, boolean isUserAuto,
|
||||
boolean isPush) {
|
||||
|
||||
|
||||
if (isPush) {
|
||||
//如果是后台推送,统一拦截
|
||||
} else {
|
||||
|
@@ -51,19 +51,17 @@ public class XChatConstants {
|
||||
/**
|
||||
* 云信 key (DEBUG)
|
||||
*/
|
||||
// public static final String NIM_KEY_DEBUG = "2c375581f900a7b4ea3922fa7643f307";
|
||||
public static final String NIM_KEY_DEBUG = "86bdf1285efb4419fe4a58b0046d2095";//6bdf1285efb4419fe4a58b0046d2095 09bde8b3d86b98a6612bc3fc92709799 86bdf1285efb4419fe4a58b0046d2095
|
||||
public static final String NIM_KEY_DEBUG = "86bdf1285efb4419fe4a58b0046d2095";//已更换
|
||||
|
||||
/**
|
||||
* 云信 key (RELEASE)
|
||||
*/
|
||||
// public static final String NIM_KEY_RELEASE = "ca46478c438dda51d25306f52fe7506b";
|
||||
public static final String NIM_KEY_RELEASE = "86bdf1285efb4419fe4a58b0046d2095";
|
||||
public static final String NIM_KEY_RELEASE = "d79bd64673cf9e8e29208f3205e3563f";//已更换
|
||||
|
||||
/**
|
||||
* 网易易盾 productNumber
|
||||
*/
|
||||
public static final String YI_DUN_PRODUCT_NUMBER = "YD00313347064620";
|
||||
public static final String YI_DUN_PRODUCT_NUMBER = "YD00313347064620";//已更换
|
||||
|
||||
/**
|
||||
* 网易易盾 业务 ID 注册
|
||||
@@ -82,7 +80,7 @@ public class XChatConstants {
|
||||
/**
|
||||
* 声网 key
|
||||
*/
|
||||
public static final String AGORA_KEY = "c5f1fa4878d141f99f3e86ec59f619d9";
|
||||
public static final String AGORA_KEY = "04d48cdbfd4547b3933a59e7acb0ae55"; //已更换
|
||||
|
||||
/**
|
||||
* 七牛 access_url
|
||||
@@ -97,12 +95,12 @@ public class XChatConstants {
|
||||
/**
|
||||
* 七牛 access_key
|
||||
*/
|
||||
public static final String QINIU_ACCESS_KEY = "_yrUANU6t3YGhNXZzdMNt03EhqDKUvFZ3oSbAAKJ";
|
||||
public static final String QINIU_ACCESS_KEY = "7c9eC45DhG3qVtyRXuQe17SZfEmELLtGK2umzTc1";//已更换
|
||||
|
||||
/**
|
||||
* 七牛 secret_key
|
||||
*/
|
||||
public static final String QINIU_SECRET_KEY = "PJ-NZ_qc0cabSebH2A9eYsodgRMFqV3tOFbP2Grr";
|
||||
public static final String QINIU_SECRET_KEY = "t3sAMF3u6kFXJ9PCs3YxRzsu";//已更换
|
||||
|
||||
/**
|
||||
* 阿里云日志空间名字
|
||||
|
Reference in New Issue
Block a user