11111
This commit is contained in:
parent
202c265e71
commit
021429a60d
@ -8,6 +8,39 @@ import com.google.gson.annotations.SerializedName;
|
|||||||
public class NoviceInstructorModel extends BaseModel {
|
public class NoviceInstructorModel extends BaseModel {
|
||||||
@SerializedName("sendFirstMessage")
|
@SerializedName("sendFirstMessage")
|
||||||
private String sendFirstMessage = "";
|
private String sendFirstMessage = "";
|
||||||
|
@SerializedName("msg_zdy_send")
|
||||||
|
private String msgZdySend = "";
|
||||||
|
@SerializedName("msg_zdy_send_text")
|
||||||
|
private String msgZdySendText = "";
|
||||||
|
@SerializedName("home_zdy_pop")
|
||||||
|
private String homeZdyPop = "";
|
||||||
|
|
||||||
|
public String getMsgZdySend() {
|
||||||
|
return msgZdySend;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NoviceInstructorModel setMsgZdySend(String msgZdySend) {
|
||||||
|
this.msgZdySend = msgZdySend;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getMsgZdySendText() {
|
||||||
|
return msgZdySendText;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NoviceInstructorModel setMsgZdySendText(String msgZdySendText) {
|
||||||
|
this.msgZdySendText = msgZdySendText;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getHomeZdyPop() {
|
||||||
|
return homeZdyPop;
|
||||||
|
}
|
||||||
|
|
||||||
|
public NoviceInstructorModel setHomeZdyPop(String homeZdyPop) {
|
||||||
|
this.homeZdyPop = homeZdyPop;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public String getSendFirstMessage() {
|
public String getSendFirstMessage() {
|
||||||
return sendFirstMessage;
|
return sendFirstMessage;
|
||||||
|
@ -6,8 +6,11 @@ import android.os.Handler;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
import com.yunbao.common.bean.NoviceInstructorModel;
|
import com.yunbao.common.bean.NoviceInstructorModel;
|
||||||
import com.yunbao.common.event.NoviceInstructorEvent;
|
import com.yunbao.common.event.NoviceInstructorEvent;
|
||||||
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.http.HttpClient;
|
||||||
import com.yunbao.common.manager.base.BaseCacheManager;
|
import com.yunbao.common.manager.base.BaseCacheManager;
|
||||||
|
|
||||||
import org.greenrobot.eventbus.EventBus;
|
import org.greenrobot.eventbus.EventBus;
|
||||||
@ -48,8 +51,8 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
|||||||
*/
|
*/
|
||||||
public NoviceInstructorModel getNoviceInstructor() {
|
public NoviceInstructorModel getNoviceInstructor() {
|
||||||
if (null == model) {
|
if (null == model) {
|
||||||
model = new Gson().fromJson(
|
model = new Gson().fromJson(getString(KEY_NOVICE_INSTRUCTOR), NoviceInstructorModel.class);
|
||||||
getString(KEY_NOVICE_INSTRUCTOR), NoviceInstructorModel.class);
|
netHandler.post(instructorOperationRunnable);
|
||||||
}
|
}
|
||||||
return model;
|
return model;
|
||||||
}
|
}
|
||||||
@ -68,16 +71,27 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
|||||||
* 清除相关信息
|
* 清除相关信息
|
||||||
*/
|
*/
|
||||||
public void removeNoviceInstructor() {
|
public void removeNoviceInstructor() {
|
||||||
|
IMLoginModel userInfo = IMLoginManager.get(context).getUserInfo();
|
||||||
|
HttpClient.getInstance().get("Message.setZdyMsg", "setZdyMsg")
|
||||||
|
.params("uid", userInfo.getId())
|
||||||
|
.execute(new HttpCallback() {
|
||||||
|
@Override
|
||||||
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
model = null;
|
model = null;
|
||||||
deleteByKey(KEY_NOVICE_INSTRUCTOR);
|
deleteByKey(KEY_NOVICE_INSTRUCTOR);
|
||||||
|
EventBus.getDefault().post(new NoviceInstructorEvent().setShowHomeIcon(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 请求接口获取是否展示
|
* 请求接口获取是否展示
|
||||||
*/
|
*/
|
||||||
public void getNetNoviceInstructor() {
|
public void getNetNoviceInstructor(String info) {
|
||||||
if (model != null)
|
model = new Gson().fromJson(info, NoviceInstructorModel.class);
|
||||||
netHandler.post(instructorOperationRunnable);
|
setNoviceInstructor(model);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -87,7 +101,6 @@ public class NoviceInstructorManager extends BaseCacheManager {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
|
||||||
//展示指引弹窗
|
//展示指引弹窗
|
||||||
EventBus.getDefault().post(new NoviceInstructorEvent().setShowHomeIcon(true));
|
EventBus.getDefault().post(new NoviceInstructorEvent().setShowHomeIcon(true));
|
||||||
}
|
}
|
||||||
|
@ -9,9 +9,9 @@ ext {
|
|||||||
]
|
]
|
||||||
manifestPlaceholders = [
|
manifestPlaceholders = [
|
||||||
//正式
|
//正式
|
||||||
// serverHost : "https://napi.yaoulive.com",
|
serverHost : "https://napi.yaoulive.com",
|
||||||
//測試
|
//測試
|
||||||
serverHost : "https://ceshi.yaoulive.com",
|
// serverHost : "https://ceshi.yaoulive.com",
|
||||||
|
|
||||||
//腾讯地图
|
//腾讯地图
|
||||||
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
|
@ -19,7 +19,6 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
import android.widget.ImageView;
|
import android.widget.ImageView;
|
||||||
import android.widget.LinearLayout;
|
|
||||||
import android.widget.RelativeLayout;
|
import android.widget.RelativeLayout;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
@ -543,9 +542,11 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
MainHttpUtil.requestNewBonus(new HttpCallback() {
|
MainHttpUtil.requestNewBonus(new HttpCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(int code, String msg, String[] info) {
|
public void onSuccess(int code, String msg, String[] info) {
|
||||||
if (code == 0 && info.length > 0) {
|
|
||||||
if (code == 0) {
|
if (info.length > 0) {
|
||||||
|
Log.e("MainActivity", info[0]);
|
||||||
JSONObject obj = JSON.parseObject(info[0]);
|
JSONObject obj = JSON.parseObject(info[0]);
|
||||||
|
if (code == 0) {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putString("send_gold", obj.getString("send_gold"));
|
bundle.putString("send_gold", obj.getString("send_gold"));
|
||||||
bundle.putString("send_exp", obj.getString("send_exp"));
|
bundle.putString("send_exp", obj.getString("send_exp"));
|
||||||
@ -553,6 +554,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
fragment.setArguments(bundle);
|
fragment.setArguments(bundle);
|
||||||
fragment.show(getSupportFragmentManager(), "SigninDialog");
|
fragment.show(getSupportFragmentManager(), "SigninDialog");
|
||||||
}
|
}
|
||||||
|
if (obj.containsKey("msg_zdy_send") && obj.containsKey("msg_zdy_send_text")) {
|
||||||
|
NoviceInstructorManager.get(mContext).getNetNoviceInstructor(info[0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -564,6 +568,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
private void loginIM() {
|
private void loginIM() {
|
||||||
String uid = CommonAppConfig.getInstance().getUid();
|
String uid = CommonAppConfig.getInstance().getUid();
|
||||||
// ImMessageUtil.getInstance().loginImClient(uid);
|
// ImMessageUtil.getInstance().loginImClient(uid);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -581,8 +586,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
mTabButtonGroup.setCurPosition(Constants.isShowPage);
|
mTabButtonGroup.setCurPosition(Constants.isShowPage);
|
||||||
}
|
}
|
||||||
Constants.isShowPage = -1;
|
Constants.isShowPage = -1;
|
||||||
//获取用户面向指导员的操作
|
NoviceInstructorManager.get(mContext).getNoviceInstructor();
|
||||||
NoviceInstructorManager.get(this).getNetNoviceInstructor();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1038,7 +1042,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
|
|||||||
ConversationIMListManager.get(mContext).jumpConversationList(bundle);
|
ConversationIMListManager.get(mContext).jumpConversationList(bundle);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
waitingTip.setVisibility(View.GONE);
|
waitingTip.setVisibility(View.GONE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user