Commit 9310f3ebdaab885fcfd6a012ae812c77026f1bae
1 parent
ce2026d3
Exists in
yxb_dev
and in
1 other branch
no message
Showing
9 changed files
with
86 additions
and
43 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -24,8 +24,8 @@ public class AppConfig { | @@ -24,8 +24,8 @@ public class AppConfig { | ||
24 | public static String PARENT_ID = "parent_id"; | 24 | public static String PARENT_ID = "parent_id"; |
25 | public static String NIM_CONFIG_VIBRATE = "nim_config_vibrate";//收到通知震动 | 25 | public static String NIM_CONFIG_VIBRATE = "nim_config_vibrate";//收到通知震动 |
26 | public static String NIM_CONFIG_SOUND = "nim_config_sound";//收到通知响铃 | 26 | public static String NIM_CONFIG_SOUND = "nim_config_sound";//收到通知响铃 |
27 | - public static String ISBINDING="isbinding"; | ||
28 | - public static String CURRCHILDJSONSTR=""; | 27 | + public static String ISBINDING = "isbinding"; |
28 | + public static String CURRCHILDJSONSTR = ""; | ||
29 | 29 | ||
30 | 30 | ||
31 | public static boolean ISLOGIN = false; | 31 | public static boolean ISLOGIN = false; |
@@ -39,16 +39,18 @@ public class AppConfig { | @@ -39,16 +39,18 @@ public class AppConfig { | ||
39 | public static String APP_IS_START = "app_is_start"; | 39 | public static String APP_IS_START = "app_is_start"; |
40 | 40 | ||
41 | //测试 | 41 | //测试 |
42 | -// public static String BASE_URL="http://60.190.202.57:1000/"; | ||
43 | -// public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | ||
44 | -// public static String BASE_URL_FILE="http://60.190.202.57:8196"; | 42 | + public static String BASE_URL="http://60.190.202.57:1000/"; |
43 | + public static String BASE_URL_ORDER="http://60.190.202.57:8101/"; | ||
44 | + public static String BASE_URL_FILE="http://60.190.202.57:8196"; | ||
45 | + public static String BASE_URL_VOTE = "http://60.190.202.57:8812/"; | ||
45 | 46 | ||
46 | 47 | ||
47 | //正式 | 48 | //正式 |
48 | - public static String BASE_URL="http://campus.myjxt.com/"; | ||
49 | - public static String BASE_URL_ORDER="http://parent.myjxt.com/"; | ||
50 | - public static String BASE_URL_FILE="http://manage.myjxt.com"; | ||
51 | - public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | 49 | +// public static String BASE_URL = "http://campus.myjxt.com/"; |
50 | +// public static String BASE_URL_ORDER = "http://parent.myjxt.com/"; | ||
51 | +// public static String BASE_URL_FILE = "http://manage.myjxt.com"; | ||
52 | +// public static String BASE_URL_VOTE = "www.sxspy.net/"; | ||
53 | +// public static final String url_version = BASE_URL + "api/Common/AppVersion?appType=3"; | ||
52 | 54 | ||
53 | 55 | ||
54 | //默认日志保存的路径 | 56 | //默认日志保存的路径 |
@@ -63,7 +65,7 @@ public class AppConfig { | @@ -63,7 +65,7 @@ public class AppConfig { | ||
63 | 65 | ||
64 | private static AppConfig appConfig = null; | 66 | private static AppConfig appConfig = null; |
65 | private static Context mContext = null; | 67 | private static Context mContext = null; |
66 | - public static String url_apk="http://update.myjxt.com/zh_parent.apk"; | 68 | + public static String url_apk = "http://update.myjxt.com/zh_parent.apk"; |
67 | 69 | ||
68 | public static AppConfig getAppConfig(Context context) { | 70 | public static AppConfig getAppConfig(Context context) { |
69 | if (appConfig == null) { | 71 | if (appConfig == null) { |
app/src/main/java/com/shunzhi/parent/AppContext.java
@@ -63,6 +63,7 @@ public class AppContext extends GlobalApplication { | @@ -63,6 +63,7 @@ public class AppContext extends GlobalApplication { | ||
63 | super.onCreate(); | 63 | super.onCreate(); |
64 | 64 | ||
65 | NIMClient.init(this, loginInfo(), options()); | 65 | NIMClient.init(this, loginInfo(), options()); |
66 | + | ||
66 | if (inMainProcess(this)) { | 67 | if (inMainProcess(this)) { |
67 | //开启地图地位 | 68 | //开启地图地位 |
68 | initMapLocal(); | 69 | initMapLocal(); |
app/src/main/java/com/shunzhi/parent/api/Consult.java
@@ -32,4 +32,9 @@ public interface Consult { | @@ -32,4 +32,9 @@ public interface Consult { | ||
32 | Observable<JsonObject> getInformationTopic(@Field("keyword") String keyword,@Field("areaName") String areaName, @Field("channel") String channel | 32 | Observable<JsonObject> getInformationTopic(@Field("keyword") String keyword,@Field("areaName") String areaName, @Field("channel") String channel |
33 | , @Field("toFirstPage") String toFirstPage, @Field("pageIndex") int pageIndex); | 33 | , @Field("toFirstPage") String toFirstPage, @Field("pageIndex") int pageIndex); |
34 | 34 | ||
35 | + | ||
36 | + @FormUrlEncoded | ||
37 | + @POST("RoleLogin/GetToken") | ||
38 | + Observable<JsonObject> loginVote(@Field("username") String username, @Field("password") String password); | ||
39 | + | ||
35 | } | 40 | } |
app/src/main/java/com/shunzhi/parent/contract/consult/ConsultContract.java
@@ -28,6 +28,8 @@ public interface ConsultContract { | @@ -28,6 +28,8 @@ public interface ConsultContract { | ||
28 | public abstract void getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); | 28 | public abstract void getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); |
29 | 29 | ||
30 | public abstract void getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex); | 30 | public abstract void getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex); |
31 | + | ||
32 | + public abstract void loginVote(String phoneNum,String password,int position); | ||
31 | } | 33 | } |
32 | 34 | ||
33 | 35 | ||
@@ -39,10 +41,12 @@ public interface ConsultContract { | @@ -39,10 +41,12 @@ public interface ConsultContract { | ||
39 | Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); | 41 | Observable<JsonObject> getContextChannel(String areaName, int channel, int toFirstPage, int pageIndex); |
40 | 42 | ||
41 | Observable<JsonObject> getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex); | 43 | Observable<JsonObject> getInformationTopic(String keyword,String areaName,String channel,String toFirstPage,int pageIndex); |
44 | + | ||
45 | + Observable<JsonObject> loginVote(String phoneNum,String password); | ||
42 | } | 46 | } |
43 | 47 | ||
44 | interface IConsultView extends IBaseFragment { | 48 | interface IConsultView extends IBaseFragment { |
45 | - void showTools(); | 49 | + void showVote(int position); |
46 | 50 | ||
47 | void showBanners(List<GuangGaoBean> guangGaoBeanList); | 51 | void showBanners(List<GuangGaoBean> guangGaoBeanList); |
48 | 52 |
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
@@ -61,12 +61,14 @@ public class MessageManager { | @@ -61,12 +61,14 @@ public class MessageManager { | ||
61 | private Observer<List<IMMessage>> messageObserver = new Observer<List<IMMessage>>() { | 61 | private Observer<List<IMMessage>> messageObserver = new Observer<List<IMMessage>>() { |
62 | @Override | 62 | @Override |
63 | public void onEvent(List<IMMessage> imMessages) { | 63 | public void onEvent(List<IMMessage> imMessages) { |
64 | + Log.e("aaaaa", "999999"); | ||
64 | onMessageReceive(imMessages); | 65 | onMessageReceive(imMessages); |
65 | } | 66 | } |
66 | }; | 67 | }; |
67 | private Observer<CustomNotification> customNotificationObserver = new Observer<CustomNotification>() { | 68 | private Observer<CustomNotification> customNotificationObserver = new Observer<CustomNotification>() { |
68 | @Override | 69 | @Override |
69 | public void onEvent(CustomNotification customNotification) { | 70 | public void onEvent(CustomNotification customNotification) { |
71 | + Log.e("aaaaa", "888888"); | ||
70 | onCustomNotificationReceive(customNotification); | 72 | onCustomNotificationReceive(customNotification); |
71 | } | 73 | } |
72 | }; | 74 | }; |
@@ -97,11 +99,13 @@ public class MessageManager { | @@ -97,11 +99,13 @@ public class MessageManager { | ||
97 | } | 99 | } |
98 | 100 | ||
99 | private void onCustomNotificationReceive(CustomNotification customNotification) { | 101 | private void onCustomNotificationReceive(CustomNotification customNotification) { |
102 | + Timber.d("sss-==" + customNotification.getSessionId()); | ||
100 | try { | 103 | try { |
101 | JSONObject json = new JSONObject(customNotification.getContent()); | 104 | JSONObject json = new JSONObject(customNotification.getContent()); |
105 | + Timber.d("sss-==" + json.toString()); | ||
102 | String type = json.optString("type"); | 106 | String type = json.optString("type"); |
103 | String uuid = json.optString("msgId"); | 107 | String uuid = json.optString("msgId"); |
104 | - Timber.d("onCustomNotificationReceive%s","json="+json.toString()); | 108 | + Timber.d("onCustomNotificationReceive%s", "json=" + json.toString()); |
105 | if ("homework".equals(type)) { | 109 | if ("homework".equals(type)) { |
106 | PHMessageSession session = PHMessageSession.findAndCreateSession(PHMessageSession.sessionType_homework, true); | 110 | PHMessageSession session = PHMessageSession.findAndCreateSession(PHMessageSession.sessionType_homework, true); |
107 | session.setSessionName("作业通知"); | 111 | session.setSessionName("作业通知"); |
@@ -118,6 +122,23 @@ public class MessageManager { | @@ -118,6 +122,23 @@ public class MessageManager { | ||
118 | message.setSessionType(session.getSessionType()); | 122 | message.setSessionType(session.getSessionType()); |
119 | Long id = messageDao.insert(message); | 123 | Long id = messageDao.insert(message); |
120 | notifyNotification(uuid, id, "收到一条作业通知"); | 124 | notifyNotification(uuid, id, "收到一条作业通知"); |
125 | + } else if ("attend".equals(type)) { | ||
126 | + //考勤 | ||
127 | + PHMessageSession session = PHMessageSession.findAndCreateSession(PHMessageSession.sessionType_homework, true); | ||
128 | + session.setSessionName("考勤通知"); | ||
129 | + session.setDate(new Date(customNotification.getTime())); | ||
130 | + session.setSessionText(json.optString("title")); | ||
131 | +// ToastUtils.showToast(json.optString("title")+"uuid="+uuid); | ||
132 | + | ||
133 | + PHMessage message = new PHMessage(); | ||
134 | + PHMessageDao messageDao = AppContext.getInstance().getDaoSession().getPHMessageDao(); | ||
135 | + message.setDate(new Date(customNotification.getTime())); | ||
136 | + message.setMessageId(uuid); | ||
137 | + message.setSessionId(session.getSessionId()); | ||
138 | + message.setExValue(customNotification.getContent()); | ||
139 | + message.setSessionType(session.getSessionType()); | ||
140 | + Long id = messageDao.insert(message); | ||
141 | + notifyNotification(uuid, id, "收到一条考勤通知"); | ||
121 | } | 142 | } |
122 | } catch (JSONException e) { | 143 | } catch (JSONException e) { |
123 | e.printStackTrace(); | 144 | e.printStackTrace(); |
@@ -184,12 +205,12 @@ public class MessageManager { | @@ -184,12 +205,12 @@ public class MessageManager { | ||
184 | NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null); | 205 | NIMLoginResultBean bean = new NIMLoginResultBean(true, 200, null); |
185 | subject.onNext(bean); | 206 | subject.onNext(bean); |
186 | // Timber.i("----===onSuccess : %s", o); | 207 | // Timber.i("----===onSuccess : %s", o); |
187 | - Log.d("66666","云信服务器登录失败:" + o.toString()); | 208 | + Log.d("66666", "云信服务器登录失败:" + o.toString()); |
188 | } | 209 | } |
189 | 210 | ||
190 | @Override | 211 | @Override |
191 | public void onFailed(int i) { | 212 | public void onFailed(int i) { |
192 | - Log.d("66666","云信服务器登录失败:" + i); | 213 | + Log.d("66666", "云信服务器登录失败:" + i); |
193 | // Timber.i("----===nim login failed : %s", i); | 214 | // Timber.i("----===nim login failed : %s", i); |
194 | NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null); | 215 | NIMLoginResultBean bean = new NIMLoginResultBean(false, i, null); |
195 | subject.onNext(bean); | 216 | subject.onNext(bean); |
@@ -197,7 +218,7 @@ public class MessageManager { | @@ -197,7 +218,7 @@ public class MessageManager { | ||
197 | 218 | ||
198 | @Override | 219 | @Override |
199 | public void onException(Throwable throwable) { | 220 | public void onException(Throwable throwable) { |
200 | - Log.d("66666","onException:" + throwable.toString()); | 221 | + Log.d("66666", "onException:" + throwable.toString()); |
201 | // Timber.i("----===onException"); | 222 | // Timber.i("----===onException"); |
202 | if (throwable != null) throwable.printStackTrace(); | 223 | if (throwable != null) throwable.printStackTrace(); |
203 | NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable); | 224 | NIMLoginResultBean bean = new NIMLoginResultBean(false, 0, throwable); |
app/src/main/java/com/shunzhi/parent/model/consult/ConsultModel.java
@@ -47,6 +47,13 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM | @@ -47,6 +47,13 @@ public class ConsultModel extends BaseModel implements ConsultContract.IConsultM | ||
47 | .getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | 47 | .getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).compose(RxHelper.<JsonObject>rxSchedulerHelper()); |
48 | } | 48 | } |
49 | 49 | ||
50 | + @Override | ||
51 | + public Observable<JsonObject> loginVote(String phoneNum, String password) { | ||
52 | + return RetrofitCreateHelper.getInstance().createApi(Consult.class, AppConfig.BASE_URL_VOTE) | ||
53 | + .loginVote(phoneNum,password).compose(RxHelper.<JsonObject>rxSchedulerHelper()); | ||
54 | +// return null; | ||
55 | + } | ||
56 | + | ||
50 | public static ConsultContract.IConsultModel newInstance() { | 57 | public static ConsultContract.IConsultModel newInstance() { |
51 | return new ConsultModel(); | 58 | return new ConsultModel(); |
52 | } | 59 | } |
app/src/main/java/com/shunzhi/parent/presenter/consult/ConsultPresenter.java
1 | package com.shunzhi.parent.presenter.consult; | 1 | package com.shunzhi.parent.presenter.consult; |
2 | 2 | ||
3 | -import android.util.Log; | ||
4 | import android.view.View; | 3 | import android.view.View; |
5 | import android.widget.LinearLayout; | 4 | import android.widget.LinearLayout; |
6 | 5 | ||
@@ -8,6 +7,7 @@ import com.google.gson.Gson; | @@ -8,6 +7,7 @@ import com.google.gson.Gson; | ||
8 | import com.google.gson.JsonArray; | 7 | import com.google.gson.JsonArray; |
9 | import com.google.gson.JsonObject; | 8 | import com.google.gson.JsonObject; |
10 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; | 9 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; |
10 | +import com.share.mvpsdk.utils.ToastUtils; | ||
11 | import com.shunzhi.parent.R; | 11 | import com.shunzhi.parent.R; |
12 | import com.shunzhi.parent.bean.GuangGaoBean; | 12 | import com.shunzhi.parent.bean.GuangGaoBean; |
13 | import com.shunzhi.parent.bean.ToolBean; | 13 | import com.shunzhi.parent.bean.ToolBean; |
@@ -53,7 +53,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | @@ -53,7 +53,7 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | ||
53 | }); | 53 | }); |
54 | layout_control.addView(textAndImgShowView); | 54 | layout_control.addView(textAndImgShowView); |
55 | } | 55 | } |
56 | - mIView.showTools(); | 56 | +// mIView.showVote(); |
57 | } | 57 | } |
58 | 58 | ||
59 | @Override | 59 | @Override |
@@ -88,9 +88,9 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | @@ -88,9 +88,9 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | ||
88 | @Override | 88 | @Override |
89 | public void accept(JsonObject jsonObject) throws Exception { | 89 | public void accept(JsonObject jsonObject) throws Exception { |
90 | // ToastUtils.showToast(jsonObject.toString()); | 90 | // ToastUtils.showToast(jsonObject.toString()); |
91 | - JsonObject json=jsonObject.getAsJsonObject("data"); | ||
92 | - Gson g=new Gson(); | ||
93 | - ChannelInfo channelInfo = g.fromJson(json.toString(),ChannelInfo.class); | 91 | + JsonObject json = jsonObject.getAsJsonObject("data"); |
92 | + Gson g = new Gson(); | ||
93 | + ChannelInfo channelInfo = g.fromJson(json.toString(), ChannelInfo.class); | ||
94 | List<ChannelContextBean> contextList = channelInfo.getChannelContent(); | 94 | List<ChannelContextBean> contextList = channelInfo.getChannelContent(); |
95 | List<ChannelBean> channelList = channelInfo.getSubchannel(); | 95 | List<ChannelBean> channelList = channelInfo.getSubchannel(); |
96 | mIView.showChannel(channelList); | 96 | mIView.showChannel(channelList); |
@@ -105,20 +105,19 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | @@ -105,20 +105,19 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | ||
105 | })); | 105 | })); |
106 | 106 | ||
107 | 107 | ||
108 | - | ||
109 | } | 108 | } |
110 | 109 | ||
111 | @Override | 110 | @Override |
112 | public void getInformationTopic(String keyword, String areaName, String channel, String toFirstPage, int pageIndex) { | 111 | public void getInformationTopic(String keyword, String areaName, String channel, String toFirstPage, int pageIndex) { |
113 | - mRxManager.register(mIModel.getInformationTopic(keyword,areaName,channel,toFirstPage,pageIndex).subscribe(new Consumer<JsonObject>() { | 112 | + mRxManager.register(mIModel.getInformationTopic(keyword, areaName, channel, toFirstPage, pageIndex).subscribe(new Consumer<JsonObject>() { |
114 | @Override | 113 | @Override |
115 | public void accept(JsonObject jsonObject) throws Exception { | 114 | public void accept(JsonObject jsonObject) throws Exception { |
116 | - JsonObject json=jsonObject.getAsJsonObject("data"); | ||
117 | - Gson g=new Gson(); | 115 | + JsonObject json = jsonObject.getAsJsonObject("data"); |
116 | + Gson g = new Gson(); | ||
118 | List<ChannelContextBean> channelList = new ArrayList<>(); | 117 | List<ChannelContextBean> channelList = new ArrayList<>(); |
119 | - JsonArray jsonArray=json.getAsJsonArray("channelList"); | 118 | + JsonArray jsonArray = json.getAsJsonArray("channelList"); |
120 | for (int i = 0; i < jsonArray.size(); i++) { | 119 | for (int i = 0; i < jsonArray.size(); i++) { |
121 | - ChannelContextBean channelBean=g.fromJson(jsonArray.get(i),ChannelContextBean.class); | 120 | + ChannelContextBean channelBean = g.fromJson(jsonArray.get(i), ChannelContextBean.class); |
122 | channelList.add(channelBean); | 121 | channelList.add(channelBean); |
123 | } | 122 | } |
124 | mIView.showContext(channelList); | 123 | mIView.showContext(channelList); |
@@ -133,6 +132,22 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | @@ -133,6 +132,22 @@ public class ConsultPresenter extends ConsultContract.ConsultPresenter { | ||
133 | } | 132 | } |
134 | 133 | ||
135 | @Override | 134 | @Override |
135 | + public void loginVote(String phoneNum, String password, final int position) { | ||
136 | + mRxManager.register(mIModel.loginVote(phoneNum, password).subscribe(new Consumer<JsonObject>() { | ||
137 | + @Override | ||
138 | + public void accept(JsonObject jsonObject) throws Exception { | ||
139 | + ToastUtils.showToast(jsonObject.toString()); | ||
140 | + mIView.showVote(position); | ||
141 | + } | ||
142 | + }, new Consumer<Throwable>() { | ||
143 | + @Override | ||
144 | + public void accept(Throwable throwable) throws Exception { | ||
145 | + mIView.showVote(position); | ||
146 | + } | ||
147 | + })); | ||
148 | + } | ||
149 | + | ||
150 | + @Override | ||
136 | public ConsultContract.IConsultModel getModel() { | 151 | public ConsultContract.IConsultModel getModel() { |
137 | return ConsultModel.newInstance(); | 152 | return ConsultModel.newInstance(); |
138 | } | 153 | } |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
1 | package com.shunzhi.parent.ui.fragment; | 1 | package com.shunzhi.parent.ui.fragment; |
2 | 2 | ||
3 | -import android.annotation.TargetApi; | ||
4 | -import android.app.DatePickerDialog; | ||
5 | import android.content.BroadcastReceiver; | 3 | import android.content.BroadcastReceiver; |
6 | import android.content.Context; | 4 | import android.content.Context; |
7 | import android.content.Intent; | 5 | import android.content.Intent; |
@@ -13,18 +11,12 @@ import android.support.annotation.Nullable; | @@ -13,18 +11,12 @@ import android.support.annotation.Nullable; | ||
13 | import android.support.annotation.RequiresApi; | 11 | import android.support.annotation.RequiresApi; |
14 | import android.support.v4.widget.NestedScrollView; | 12 | import android.support.v4.widget.NestedScrollView; |
15 | import android.text.TextUtils; | 13 | import android.text.TextUtils; |
16 | -import android.util.Log; | ||
17 | import android.view.View; | 14 | import android.view.View; |
18 | import android.widget.EditText; | 15 | import android.widget.EditText; |
19 | import android.widget.ImageView; | 16 | import android.widget.ImageView; |
20 | import android.widget.LinearLayout; | 17 | import android.widget.LinearLayout; |
21 | import android.widget.TextView; | 18 | import android.widget.TextView; |
22 | -import android.widget.Toast; | ||
23 | 19 | ||
24 | -import com.bigkoo.pickerview.builder.TimePickerBuilder; | ||
25 | -import com.bigkoo.pickerview.listener.CustomListener; | ||
26 | -import com.bigkoo.pickerview.listener.OnTimeSelectListener; | ||
27 | -import com.bigkoo.pickerview.view.TimePickerView; | ||
28 | import com.bumptech.glide.Glide; | 20 | import com.bumptech.glide.Glide; |
29 | import com.jcodecraeer.xrecyclerview.XRecyclerView; | 21 | import com.jcodecraeer.xrecyclerview.XRecyclerView; |
30 | import com.share.mvpsdk.base.BasePresenter; | 22 | import com.share.mvpsdk.base.BasePresenter; |
@@ -41,20 +33,15 @@ import com.shunzhi.parent.presenter.consult.ConsultPresenter; | @@ -41,20 +33,15 @@ import com.shunzhi.parent.presenter.consult.ConsultPresenter; | ||
41 | import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity; | 33 | import com.shunzhi.parent.ui.activity.consult.ConsultOneLevelActivity; |
42 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; | 34 | import com.shunzhi.parent.ui.activity.mywebview.WebViewActivity; |
43 | import com.shunzhi.parent.util.AttrsUtils; | 35 | import com.shunzhi.parent.util.AttrsUtils; |
44 | -import com.shunzhi.parent.util.GlideUtils; | ||
45 | import com.shunzhi.parent.views.TextAndImgShowView; | 36 | import com.shunzhi.parent.views.TextAndImgShowView; |
46 | import com.stx.xhb.xbanner.XBanner; | 37 | import com.stx.xhb.xbanner.XBanner; |
47 | 38 | ||
48 | -import java.text.SimpleDateFormat; | ||
49 | import java.util.ArrayList; | 39 | import java.util.ArrayList; |
50 | -import java.util.Calendar; | ||
51 | -import java.util.Date; | ||
52 | import java.util.List; | 40 | import java.util.List; |
53 | 41 | ||
54 | import cn.jzvd.JZVideoPlayerStandard; | 42 | import cn.jzvd.JZVideoPlayerStandard; |
55 | import me.leefeng.citypicker.CityPicker; | 43 | import me.leefeng.citypicker.CityPicker; |
56 | import me.leefeng.citypicker.CityPickerListener; | 44 | import me.leefeng.citypicker.CityPickerListener; |
57 | -import timber.log.Timber; | ||
58 | 45 | ||
59 | public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> implements View.OnClickListener | 46 | public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.ConsultPresenter, ConsultContract.IConsultModel> implements View.OnClickListener |
60 | , ConsultContract.IConsultView, CityPickerListener { | 47 | , ConsultContract.IConsultView, CityPickerListener { |
@@ -164,7 +151,9 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -164,7 +151,9 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
164 | xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { | 151 | xBanner.setOnItemClickListener(new XBanner.OnItemClickListener() { |
165 | @Override | 152 | @Override |
166 | public void onItemClick(XBanner banner, int position) { | 153 | public void onItemClick(XBanner banner, int position) { |
167 | - WebViewActivity.getInstance(getContext(), imgWebUrl.get(position), -1); | 154 | + mPresenter.loginVote(AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_NAME) |
155 | + , AppConfig.getAppConfig(AppContext.getInstance()).get(AppConfig.LOGIN_PWD),position); | ||
156 | +// WebViewActivity.getInstance(getContext(), imgWebUrl.get(position), -1); | ||
168 | } | 157 | } |
169 | }); | 158 | }); |
170 | } | 159 | } |
@@ -240,8 +229,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -240,8 +229,8 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
240 | } | 229 | } |
241 | 230 | ||
242 | @Override | 231 | @Override |
243 | - public void showTools() { | ||
244 | - | 232 | + public void showVote(int position) { |
233 | + WebViewActivity.getInstance(getContext(), imgWebUrl.get(position), -1); | ||
245 | } | 234 | } |
246 | 235 | ||
247 | @Override | 236 | @Override |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -21,7 +21,6 @@ import com.shunzhi.parent.AppContext; | @@ -21,7 +21,6 @@ import com.shunzhi.parent.AppContext; | ||
21 | import com.shunzhi.parent.BuildConfig; | 21 | import com.shunzhi.parent.BuildConfig; |
22 | import com.shunzhi.parent.R; | 22 | import com.shunzhi.parent.R; |
23 | import com.shunzhi.parent.bean.message.PHMessage; | 23 | import com.shunzhi.parent.bean.message.PHMessage; |
24 | -import com.shunzhi.parent.bean.message.PHMessageSession; | ||
25 | import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract; | 24 | import com.shunzhi.parent.contract.loginandregister.LoginAndRegisterContract; |
26 | import com.shunzhi.parent.contract.mine.MineContract; | 25 | import com.shunzhi.parent.contract.mine.MineContract; |
27 | import com.shunzhi.parent.manager.MessageManager; | 26 | import com.shunzhi.parent.manager.MessageManager; |