bean.isRead = systemMsgObj.getBoolean("read");
|
66
|
+ bean.url = JSONParseUtils.getJSONString(systemMsgObj.getString("url"));
|
|
67
|
+ bean.msgId =JSONParseUtils.getJSONString(systemMsgObj.getString("pk"));
|
|
68
|
+ bean.title = JSONParseUtils.getJSONString(systemMsgObj.getString("title"));
|
|
69
|
+ systemMsgList.add(bean);
|
|
70
|
+ }
|
|
71
|
+ bean.systemMsgList = systemMsgList;
|
|
72
|
+ }
|
|
73
|
+ JSONArray msgArray = msgObj.getJSONArray("orders");
|
|
74
|
+ if(msgArray!=null && msgArray.length()>0){
|
|
75
|
+ ArrayList<MessageBean> msgList = new ArrayList<>();
|
|
76
|
+ for(int count = 0; count<msgArray.length();count++){
|
|
77
|
+ JSONObject childMsg = msgArray.getJSONObject(count);
|
|
78
|
+ MessageBean childBean = new MessageBean();
|
|
79
|
+ childBean.createTime = JSONParseUtils.getJSONString(childMsg.getString("created_at"));
|
|
80
|
+ childBean.isRead = childMsg.getBoolean("read");
|
|
81
|
+ childBean.msgId = childMsg.getString("pk");
|
|
82
|
+ childBean.senderName = JSONParseUtils.getJSONString(childMsg.getString("from_nickname"));
|
|
83
|
+ childBean.senderAvatarUrl = JSONParseUtils.getJSONString(childMsg.getString("from_avatar"));
|
|
84
|
+ childBean.content = JSONParseUtils.getJSONString(childMsg.getString("msg_content"));
|
|
85
|
+ JSONObject photoObj = childMsg.getJSONObject("group_photo_info");
|
|
86
|
+ childBean.photoItem = GroupPhotoItem.parseFromJSON(photoObj);
|
|
87
|
+ msgList.add(childBean);
|
|
88
|
+ }
|
|
89
|
+ bean.msgList = msgList;
|
|
90
|
+ }
|
46
|
91
|
return true;
|
47
|
92
|
}else{
|
48
|
93
|
message = json.getString("message");
|
|
|
@@ -65,7 +110,7 @@ public class BriefsInteractor implements BaseInteractor {
|
65
|
110
|
listener.onInteractSuccess(bean);
|
66
|
111
|
}
|
67
|
112
|
};
|
68
|
|
- fetchInfoTask.executeOnExecutor(ThreadExecutor.getInstance().getExecutor(), UrlContainer.SESSION_IDS_CREATE);
|
|
113
|
+ fetchInfoTask.executeOnExecutor(ThreadExecutor.getInstance().getExecutor(), UrlContainer.BRIEFS_URL);
|
69
|
114
|
}
|
70
|
115
|
|
71
|
116
|
@Override
|
|
|
@@ -35,6 +35,8 @@ public class UrlContainer {
|
35
|
35
|
*/
|
36
|
36
|
public static final String WX_LOGIN_URL = HOST_URL+"l/wx/authorize";
|
37
|
37
|
|
|
38
|
+ public static final String BRIEFS_URL = HOST_URL+"l/brief";
|
|
39
|
+
|
38
|
40
|
|
39
|
41
|
|
40
|
42
|
}
|
|
|
@@ -34,7 +34,6 @@
|
34
|
34
|
android:gravity="center"
|
35
|
35
|
android:paddingLeft="10dp"
|
36
|
36
|
android:paddingRight="10dp"
|
37
|
|
- android:singleLine="true"
|
38
|
37
|
android:text="@string/settings"
|
39
|
38
|
android:textColor="@color/text_white"
|
40
|
39
|
android:textSize="@dimen/action_bar_title_medium_text_size" />
|
|
|
@@ -59,5 +58,19 @@
|
59
|
58
|
|
60
|
59
|
</LinearLayout>
|
61
|
60
|
|
|
61
|
+ <ScrollView
|
|
62
|
+ android:layout_below="@id/title_bar_with_back_btn"
|
|
63
|
+ android:layout_width="match_parent"
|
|
64
|
+ android:layout_height="match_parent">
|
|
65
|
+
|
|
66
|
+ <LinearLayout
|
|
67
|
+ android:layout_width="match_parent"
|
|
68
|
+ android:layout_height="wrap_content"
|
|
69
|
+ android:orientation="vertical">
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+ </LinearLayout>
|
|
73
|
+ </ScrollView>
|
|
74
|
+
|
62
|
75
|
|
63
|
76
|
</RelativeLayout>
|