Explorar o código

修改报名、课程报名bug

316044749 %!s(int64=7) %!d(string=hai) anos
pai
achega
705f420368

+ 20 - 5
app/src/main/java/com/ynstkz/shitu/android/activity/CourseDetailActivity.java

@@ -20,6 +20,7 @@ import com.common.library.okhttp.callback.Callback;
 import com.google.gson.Gson;
 import com.ynstkz.shitu.android.R;
 import com.ynstkz.shitu.android.adapter.ViewPagerAdapter;
+import com.ynstkz.shitu.android.application.STSign;
 import com.ynstkz.shitu.android.base.BaseBean;
 import com.ynstkz.shitu.android.base.TitleBarActivity;
 import com.ynstkz.shitu.android.bean.CourseDetilBean;
@@ -120,11 +121,25 @@ public class CourseDetailActivity extends TitleBarActivity {
                     startActivity(new Intent(CourseDetailActivity.this, LoginActivity.class));
                     return;
                 }
-                Intent intent = new Intent(CourseDetailActivity.this, WebViewActivity.class);
-                intent.putExtra("title", "报名信息");
-                intent.putExtra("url", UrlCat.URL_APPLY_P43 + "?userId=" +
-                        SharedPreferencesUtils.getUserId() + "&token=" + SharedPreferencesUtils.getToken());
-                startActivity(intent);
+                if (!STSign.getInstance().isHavePhoneNumber()) {
+                    startActivity(new Intent(CourseDetailActivity.this, RegisterActivity.class));
+                    return;
+                }
+                if(courseDetilBean != null && courseDetilBean.getData() != null) {
+                    if(courseDetilBean.getData().isIsNormal()) { //isNormal:是否普通教育机构(true:是,false:否)
+                        Intent intent = new Intent(CourseDetailActivity.this, WebViewActivity.class);
+                        intent.putExtra("title", "报名信息");
+                        intent.putExtra("url", UrlCat.URL_APPLY_P43 + "?userId=" +
+                                SharedPreferencesUtils.getUserId() + "&token=" + SharedPreferencesUtils.getToken());
+                        startActivity(intent);
+                    } else {
+                        Intent intent = new Intent(CourseDetailActivity.this, WebViewActivity.class);
+                        intent.putExtra("title", "报名信息");
+                        intent.putExtra("url", UrlCat.URL_APPLY_P47 + "?userId=" +
+                                SharedPreferencesUtils.getUserId() + "&token=" + SharedPreferencesUtils.getToken());
+                        startActivity(intent);
+                    }
+                }
             }
         });
 

+ 3 - 2
app/src/main/java/com/ynstkz/shitu/android/activity/MineCollectActivity.java

@@ -94,6 +94,7 @@ public class MineCollectActivity extends TitleBarActivity implements PullToRefre
 
     @Override
     public void onPullDownToRefresh(PullToRefreshBase<ListView> refreshView) {
+        agencyTypeId = "";
         pageNumber = 1;
         getMyCollectList(agencyTypeId);
     }
@@ -158,10 +159,10 @@ public class MineCollectActivity extends TitleBarActivity implements PullToRefre
                     if(orgNavigationBean != null) {
                         if(i != 0) {
                             agencyTypeId = orgNavigationBean.getData().get(i - 1).getTypeId();
-                            getMyCollectList(agencyTypeId);
                         } else {
-                            getMyCollectList("");
+                            agencyTypeId = "";
                         }
+                        getMyCollectList(agencyTypeId);
                         llFilterContent.setVisibility(View.GONE);
                         tvAll.setText(orgNavigationBean.getData().get(i).getTitle());
                     }

+ 22 - 0
app/src/main/java/com/ynstkz/shitu/android/activity/MineSignUpActivity.java

@@ -4,6 +4,7 @@ import android.os.Bundle;
 import android.support.annotation.Nullable;
 import android.support.v4.app.Fragment;
 import android.support.v4.view.ViewPager;
+import android.view.View;
 import android.widget.ImageView;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
@@ -105,6 +106,27 @@ public class MineSignUpActivity extends TitleBarActivity {
 
             }
         });
+
+        tvCheckPass.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                vpContent.setCurrentItem(0);
+            }
+        });
+
+        tvCheckWait.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                vpContent.setCurrentItem(1);
+            }
+        });
+
+        tvCheckBack.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                vpContent.setCurrentItem(2);
+            }
+        });
     }
 
     private void changeTab(int index){

+ 95 - 24
app/src/main/java/com/ynstkz/shitu/android/activity/StudentInfoActivity.java

@@ -20,10 +20,12 @@ import android.widget.TextView;
 import com.common.library.okhttp.callback.Callback;
 import com.google.gson.Gson;
 import com.ynstkz.shitu.android.R;
+import com.ynstkz.shitu.android.application.STSign;
 import com.ynstkz.shitu.android.base.TitleBarActivity;
 import com.ynstkz.shitu.android.bean.LocalCityBean;
 import com.ynstkz.shitu.android.bean.StudentFamilyInfoBean;
 import com.ynstkz.shitu.android.bean.StudentInfoAddBean;
+import com.ynstkz.shitu.android.bean.StudentInfoBean;
 import com.ynstkz.shitu.android.data.RequestGroup;
 import com.ynstkz.shitu.android.data.SharedPreferencesUtils;
 import com.ynstkz.shitu.android.view.ScrollViewWithGridView;
@@ -67,11 +69,13 @@ public class StudentInfoActivity extends TitleBarActivity {
     ScrollViewWithGridView gvImages;
     @Bind(R.id.btn_save)
     Button btnSave;
+    @Bind(R.id.tv_ProvinceId)
+    TextView tvProvinceId;
 
     //学生信息
     private String birthday;
     private int sex;
-    private String residenceProvinceId = "30";
+    private String residenceProvinceId;
     private String residenceCityId;
     private String residenceRegionId;
 
@@ -98,6 +102,7 @@ public class StudentInfoActivity extends TitleBarActivity {
 
     private void initData() {
         listStudentFamilyInfo = new ArrayList<>();
+        getStudentInfo();
     }
 
     private void setListener() {
@@ -142,6 +147,16 @@ public class StudentInfoActivity extends TitleBarActivity {
         });
 
         /**
+         * 省
+         */
+        tvProvinceId.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View view) {
+                getLocalCityList("01", "");
+            }
+        });
+
+        /**
          * 选择市
          */
         tvResidenceCityId.setOnClickListener(new View.OnClickListener() {
@@ -186,12 +201,65 @@ public class StudentInfoActivity extends TitleBarActivity {
                     showToast("民族不能为空");
                     return;
                 }
-                saveApplyStudentInfo(studentName, birthday, sex+"", ethnic, residenceProvinceId, residenceCityId, residenceRegionId);
+                saveApplyStudentInfo(studentName, birthday, sex + "", ethnic, residenceProvinceId, residenceCityId, residenceRegionId);
+            }
+        });
+    }
+
+    /**
+     * 获取学生信息
+     */
+    private void getStudentInfo() {
+
+        RequestGroup.getStudentInfo(new Callback() {
+            @Override
+            public Object parseNetworkResponse(Response response, int id) throws Exception {
+                return new Gson().fromJson(response.body().string(), StudentInfoBean.class);
+            }
+
+            @Override
+            public void onError(Call call, Exception e, int id) {
+                STSign.getInstance().tonkenError(StudentInfoActivity.this, e);
+            }
+
+            @Override
+            public void onResponse(Object response, int id) {
+                StudentInfoBean studentInfoBean = (StudentInfoBean) response;
+                if (studentInfoBean != null) {
+                    if ("200".equals(studentInfoBean.getCode())) {
+                        if (studentInfoBean.getData() != null) {
+                            initStudnetInfo(studentInfoBean.getData());
+                        }
+                    } else {
+                        showToast(studentInfoBean.getMsg());
+                    }
+                }
             }
         });
     }
 
     /**
+     * 初始化学生
+     *
+     * @param dataBean
+     */
+    private void initStudnetInfo(StudentInfoBean.DataBean dataBean) {
+        if (dataBean == null) {
+            return;
+        }
+        StudentInfoBean.DataBean.InfoBean infoBean = dataBean.getStudentInfo();
+        if (infoBean != null) {
+            editUsername.setText(infoBean.getStudentName());
+            tvBirthday.setText(infoBean.getBirthday());
+            sex = infoBean.getSex();
+            tvSex.setText(getResources().getStringArray(R.array.choose_sex)[sex]);
+            editNation.setText(infoBean.getEthnic());
+            residenceCityId = infoBean.getResidenceCityId() + "";
+
+        }
+    }
+
+    /**
      * type 户口 01 02 03
      * 居住地 11 12 13
      * <p>
@@ -228,7 +296,10 @@ public class StudentInfoActivity extends TitleBarActivity {
                                 listDialog.setItems(cityNames, new DialogInterface.OnClickListener() {
                                     @Override
                                     public void onClick(DialogInterface dialogInterface, int i) {
-                                        if ("02".equals(type)) {
+                                        if("01".equals(type)){
+                                            residenceProvinceId = dataBean.get(i).getRegionId() + "";
+                                            tvProvinceId.setText(dataBean.get(i).getRegionName());
+                                        } else if ("02".equals(type)) {
                                             residenceCityId = dataBean.get(i).getRegionId() + "";
                                             tvResidenceCityId.setText(dataBean.get(i).getRegionName());
                                         } else if ("03".equals(type)) {
@@ -255,28 +326,28 @@ public class StudentInfoActivity extends TitleBarActivity {
                                       String residenceCityId, String residenceRegionId) {
 
         RequestGroup.saveApplyStudentInfo(studentName, birthday, sex, ethnic, residenceProvinceId, residenceCityId, residenceRegionId, new Callback() {
-                    @Override
-                    public Object parseNetworkResponse(Response response, int id) throws Exception {
-                        return new Gson().fromJson(response.body().string(), StudentInfoAddBean.class);
-                    }
+            @Override
+            public Object parseNetworkResponse(Response response, int id) throws Exception {
+                return new Gson().fromJson(response.body().string(), StudentInfoAddBean.class);
+            }
 
-                    @Override
-                    public void onError(Call call, Exception e, int id) {
-                        showToast(getString(R.string.error_msg));
-                    }
+            @Override
+            public void onError(Call call, Exception e, int id) {
+                showToast(getString(R.string.error_msg));
+            }
 
-                    @Override
-                    public void onResponse(Object response, int id) {
-                        StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean) response;
-                        if (studentInfoAddBean != null) {
-                            if ("200".equals(studentInfoAddBean.getCode())) {
-                                saveApplyFamilyInfo(studentInfoAddBean.getData()+"");
-                            } else {
-                                showToast(studentInfoAddBean.getMsg());
-                            }
-                        }
+            @Override
+            public void onResponse(Object response, int id) {
+                StudentInfoAddBean studentInfoAddBean = (StudentInfoAddBean) response;
+                if (studentInfoAddBean != null) {
+                    if ("200".equals(studentInfoAddBean.getCode())) {
+                        saveApplyFamilyInfo(studentInfoAddBean.getData() + "");
+                    } else {
+                        showToast(studentInfoAddBean.getMsg());
                     }
-                });
+                }
+            }
+        });
 
     }
 
@@ -362,12 +433,12 @@ public class StudentInfoActivity extends TitleBarActivity {
         llMemberFamily.addView(familyView);
     }
 
-    private void refreshFamilyLab(){
+    private void refreshFamilyLab() {
         if (llMemberFamily.getChildCount() > 0) {
             for (int i = 0; i < llMemberFamily.getChildCount(); i++) {
                 LinearLayout viewMemberFamilyItem = (LinearLayout) llMemberFamily.getChildAt(i);
                 TextView tvFamilyLab = viewMemberFamilyItem.findViewById(R.id.tv_family_lab);
-                tvFamilyLab.setText("家庭成员" + (i+1));
+                tvFamilyLab.setText("家庭成员" + (i + 1));
             }
         }
     }

+ 1 - 1
app/src/main/java/com/ynstkz/shitu/android/adapter/MineCollectItemAdapter.java

@@ -77,8 +77,8 @@ public class MineCollectItemAdapter extends CCListAdapter<OrgItemBean>{
                 }
                 tvMemberName.setText(content.getMemberName());
                 tvRegaddress.setText(content.getAddress());
-                materialRatingBar.setProgress((int)content.getScore());
                 tvViewCount.setText("浏览人数" + content.getViewCount() + "人");
+                materialRatingBar.setProgress((int)content.getScore());
             }
         };
     }

+ 21 - 7
app/src/main/java/com/ynstkz/shitu/android/adapter/MineCommentItemAdapter.java

@@ -58,6 +58,9 @@ public class MineCommentItemAdapter extends CCListAdapter{
             ImageView ivOrgIcon;
             TextView tvAddress;
             LinearLayout llOrgMain;
+            LinearLayout llYaerLab;
+            TextView tvYearLab;
+            TextView tvSendLab;
 
             @Override
             public int getResource() {
@@ -74,24 +77,35 @@ public class MineCommentItemAdapter extends CCListAdapter{
                 ivOrgIcon = convertView.findViewById(R.id.iv_org_icon);
                 tvAddress = convertView.findViewById(R.id.tv_address);
                 llOrgMain = convertView.findViewById(R.id.ll_org_main);
+                llYaerLab = convertView.findViewById(R.id.ll_yaer_lab);
+                tvYearLab = convertView.findViewById(R.id.tv_year_lab);
+                tvSendLab = convertView.findViewById(R.id.lv_send_lab);
             }
 
             @SuppressLint("SetTextI18n")
             @Override
             public void updateView(Object content, int position) {
                 final OrgCommentItemBean orgCommentItemBean = adapterContent.get(position);
+                String year = DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "yyyy");
                 if(position == 0){
-                    timeMarker.setMarker(VectorDrawableUtils.getDrawable(context, R.drawable.ic_marker_inactive, R.color.commont_timeline));
-                    tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "yyyy") + "\n" +
-                            DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "MM-dd"));
-                } else if (position == 1){
-                    timeMarker.setMarker(VectorDrawableUtils.getDrawable(context, R.drawable.ic_marker_active, R.color.commont_timeline));
+                    llYaerLab.setVisibility(View.VISIBLE);
+                    tvYearLab.setText(year);
                     tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "MM-dd"));
+                    timeMarker.setMarker(VectorDrawableUtils.getDrawable(context, R.drawable.ic_marker_active, R.color.main_color));
+                    tvSendLab.setTextColor(context.getResources().getColor(R.color.main_color));
                 } else {
+                    if(year.equals(DateUtil.format(new Date(adapterContent.get(position-1).getCreateTime()), "yyyy"))) {
+                        llYaerLab.setVisibility(View.GONE);
+                        tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "MM-dd"));
+                    } else {
+                        llYaerLab.setVisibility(View.VISIBLE);
+                        tvYearLab.setText(year);
+                        tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "MM-dd"));
+                    }
                     timeMarker.setMarker(ContextCompat.getDrawable(context, R.drawable.ic_marker), ContextCompat.getColor(context, R.color.commont_timeline));
-                    tvDate.setText(DateUtil.format(new Date(orgCommentItemBean.getCreateTime()), "MM-dd"));
+                    tvSendLab.setTextColor(context.getResources().getColor(R.color.color_666));
                 }
-                rbScore.setProgress(orgCommentItemBean.getScore() * 2);
+                rbScore.setProgress(orgCommentItemBean.getScore());
                 tvContent.setText(orgCommentItemBean.getContent());
                 tvOrgName.setText(orgCommentItemBean.getMemberName());
                 if(!TextUtils.isEmpty(orgCommentItemBean.getHeadPic())){

+ 13 - 3
app/src/main/java/com/ynstkz/shitu/android/adapter/OrgCourseListAdapter.java

@@ -65,9 +65,19 @@ public class OrgCourseListAdapter extends CCListAdapter<CourseItemBean>{
                 }
                 tvTitle.setText(content.getTitle());
                 tvDetail.setText(content.getDetail());
-                tvPrice.setText("¥" + content.getPrice());
-                tvMarketPrice.setText(content.getMarketPrice());
-                tvMarketPrice.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG);
+                if(!TextUtils.isEmpty(content.getPrice())) {
+                    tvPrice.setVisibility(View.VISIBLE);
+                    tvPrice.setText("¥" + content.getPrice());
+                } else {
+                    tvPrice.setVisibility(View.GONE);
+                }
+                if(!TextUtils.isEmpty(content.getMarketPrice())) {
+                    tvMarketPrice.setVisibility(View.VISIBLE);
+                    tvMarketPrice.setText(content.getMarketPrice());
+                    tvMarketPrice.getPaint().setFlags(Paint. STRIKE_THRU_TEXT_FLAG);
+                } else {
+                    tvMarketPrice.setVisibility(View.GONE);
+                }
             }
         };
     }

+ 17 - 0
app/src/main/java/com/ynstkz/shitu/android/application/STSign.java

@@ -5,6 +5,7 @@ import android.app.Dialog;
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
+import android.text.TextUtils;
 import android.view.LayoutInflater;
 import android.view.View;
 import android.view.ViewGroup;
@@ -15,6 +16,7 @@ import com.common.library.cache.Cache;
 import com.common.library.okhttp.callback.Callback;
 import com.common.library.utils.PixelUtil;
 import com.google.gson.Gson;
+import com.tencent.connect.UserInfo;
 import com.ynstkz.shitu.android.R;
 import com.ynstkz.shitu.android.activity.LoginActivity;
 import com.ynstkz.shitu.android.base.BaseBean;
@@ -199,4 +201,19 @@ public class STSign {
             context.startActivity(new Intent(context, LoginActivity.class));
         }
     }
+
+    /**
+     * 是否含有手机号
+     * @return
+     */
+    public boolean isHavePhoneNumber(){
+        UserInfoBean userInfo = getUserInfo();
+        if(userInfo != null && userInfo.getData() != null){
+            String mobile = userInfo.getData().getMobile();
+            if(!TextUtils.isEmpty(mobile)){
+                return true;
+            }
+        }
+        return false;
+    }
 }

+ 3 - 3
app/src/main/java/com/ynstkz/shitu/android/bean/OrgItemBean.java

@@ -10,7 +10,7 @@ import java.util.List;
 
 public class OrgItemBean extends BaseBean{
 
-    private double score;
+    private float score;
     private String address;
     private String memberName;
     private String location;
@@ -20,11 +20,11 @@ public class OrgItemBean extends BaseBean{
     private List<CourseItemBean> courseList;
     private String scoreCount;
 
-    public double getScore() {
+    public float getScore() {
         return score;
     }
 
-    public void setScore(double score) {
+    public void setScore(float score) {
         this.score = score;
     }
 

+ 3 - 3
app/src/main/java/com/ynstkz/shitu/android/bean/SignUpRecorsBean.java

@@ -17,7 +17,7 @@ public class SignUpRecorsBean extends BaseBean{
     private int userId;
     private int studentInfoId;
     private int applyId;
-    private int score;
+    private float score;
     private String coursePic;
     private long createTime;
     private int price;
@@ -90,11 +90,11 @@ public class SignUpRecorsBean extends BaseBean{
         this.applyId = applyId;
     }
 
-    public int getScore() {
+    public float getScore() {
         return score;
     }
 
-    public void setScore(int score) {
+    public void setScore(float score) {
         this.score = score;
     }
 

A diferenza do arquivo foi suprimida porque é demasiado grande
+ 279 - 0
app/src/main/java/com/ynstkz/shitu/android/bean/StudentInfoBean.java


+ 9 - 0
app/src/main/java/com/ynstkz/shitu/android/data/RequestGroup.java

@@ -495,4 +495,13 @@ public class RequestGroup {
         OkHttpUtils.postString().url(UrlCat.URL_APPLY_FAMILY).addHeader(KEY_TOKEN,
                 SharedPreferencesUtils.getToken()).content(new Gson().toJson(listStudentFamily)).build().execute(callback);
     }
+
+    /**
+     * 获取学生信息
+     */
+    public static void getStudentInfo(Callback callback){
+        Map<String, String> params = getSystemParams();
+        OkHttpUtils.get().url(UrlCat.URL_GET_STUDENT_INGO).addHeader(KEY_TOKEN,
+                SharedPreferencesUtils.getToken()).params(params).build().execute(callback);
+    }
 }

+ 10 - 0
app/src/main/java/com/ynstkz/shitu/android/data/UrlCat.java

@@ -192,6 +192,11 @@ public class UrlCat {
     public static final String URL_APPLY_P43 = HOST + "p43.html";
 
     /**
+     * 非普通教育机构报名
+     */
+    public static final String URL_APPLY_P47 = HOST + "p43.html";
+
+    /**
      * 报名-学生信息
      */
     public static final String URL_APPLY_STUDENT_INFO = HOST + "api/apply/student/info";
@@ -205,6 +210,11 @@ public class UrlCat {
      * 家庭成员信息
      */
     public static final String URL_APPLY_FAMILY = HOST + "api/apply/family/info";
+
+    /**
+     * 学生信息
+     */
+    public static final String URL_GET_STUDENT_INGO = HOST + "api/user/student/info";
 }
 
 

+ 1 - 1
app/src/main/res/layout/activity_minecomment.xml

@@ -10,7 +10,7 @@
         android:id="@+id/pullToRefresh"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:padding="@dimen/default_content_margin"
+        android:padding="@dimen/company_5dp"
         android:scrollbars="none"
         android:divider="@null"/>
 

+ 1 - 5
app/src/main/res/layout/activity_org_detail.xml

@@ -150,14 +150,10 @@
                         android:layout_alignParentRight="true"
                         android:drawableLeft="@drawable/org_location_icon"
                         android:drawablePadding="@dimen/company_5dp"
-                        android:maxLength="100"
-                        android:ellipsize="end"
-                        android:gravity="right"
-                        android:maxLines="1"/>
+                        android:maxWidth="@dimen/company_200dp"/>
 
                 </RelativeLayout>
 
-
             </LinearLayout>
 
             <LinearLayout

+ 2 - 1
app/src/main/res/layout/activity_studentinfo.xml

@@ -156,11 +156,12 @@
                     android:layout_marginLeft="@dimen/student_info_leftpadding">
 
                     <TextView
+                        android:id="@+id/tv_ProvinceId"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
                         android:layout_centerVertical="true"
                         android:drawableRight="@drawable/student_location_select"
-                        android:text="云南省"
+                        android:text="选择省"
                         android:textColor="@color/color_999"
                         android:textSize="@dimen/company_16sp" />
 

+ 4 - 3
app/src/main/res/layout/item_mine_signup.xml

@@ -50,12 +50,13 @@
                     android:id="@+id/tv_regaddress"
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
+                    android:layout_alignParentTop="true"
+                    android:layout_toEndOf="@+id/tv_course_name"
                     android:layout_toRightOf="@+id/tv_course_name"
-                    android:layout_alignParentRight="true"
-                    android:maxLines="1"
                     android:ellipsize="end"
                     android:gravity="right"
-                    android:text="未名湖"/>
+                    android:maxLines="1"
+                    android:text="未名湖" />
 
             </RelativeLayout>
 

+ 105 - 75
app/src/main/res/layout/item_minecomment_list.xml

@@ -3,115 +3,145 @@
     xmlns:app="http://schemas.android.com/apk/res-auto"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
-    android:orientation="horizontal">
-
-    <TextView
-        android:id="@+id/tv_date"
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:text="日期"/>
-
-    <com.github.vipulasri.timelineview.TimelineView
-        android:id="@+id/time_marker"
-        android:layout_width="wrap_content"
-        android:layout_height="match_parent"
-        app:markerInCenter = "false"
-        app:markerSize="20dp"
-        app:lineSize="3dp"
-        app:line="@color/commont_timeline"/>
+    android:orientation="vertical">
 
     <LinearLayout
+        android:id="@+id/ll_yaer_lab"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:layout_marginLeft="@dimen/company_10dp"
-        android:orientation="vertical">
+        android:orientation="vertical"
+        android:layout_marginBottom="@dimen/company_5dp">
 
         <TextView
+            android:id="@+id/tv_year_lab"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:textSize="@dimen/company_15sp"
+            android:text="2018"
             android:textColor="@color/main_color"
-            android:text="发布了评论"/>
-
-        <me.zhanghai.android.materialratingbar.MaterialRatingBar
-            android:id="@+id/rb_score"
-            android:layout_width="@dimen/company_90dp"
-            android:layout_height="@dimen/company_20dp"
-            android:layout_marginTop="@dimen/company_5dp"
-            android:isIndicator="true"
-            app:mrb_progressTint="@color/rb_color"
-            app:mrb_secondaryProgressTint="@color/color_999"
-            android:stepSize="0.5"
-            style="@style/Widget.MaterialRatingBar.RatingBar" />
+            android:textSize="@dimen/company_16sp" />
 
         <TextView
-            android:id="@+id/tv_content"
+            android:layout_width="@dimen/company_20dp"
+            android:layout_height="@dimen/company_2dp"
+            android:background="@color/main_color" />
+
+    </LinearLayout>
+
+    <LinearLayout
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal">
+
+        <TextView
+            android:id="@+id/tv_date"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:textSize="@dimen/company_16sp"
-            android:textColor="@color/color_666"/>
+            android:text="日期" />
+
+        <com.github.vipulasri.timelineview.TimelineView
+            android:id="@+id/time_marker"
+            android:layout_width="wrap_content"
+            android:layout_height="match_parent"
+            app:line="@color/commont_timeline"
+            app:lineSize="3dp"
+            app:markerInCenter="false"
+            app:markerSize="20dp" />
 
         <LinearLayout
-            android:id="@+id/ll_org_main"
             android:layout_width="match_parent"
-            android:layout_height="@dimen/company_90dp"
-            android:orientation="horizontal"
-            android:padding="@dimen/company_5dp"
-            android:background="#F0F0F0">
-
-            <ImageView
-                android:id="@+id/iv_org_icon"
-                android:layout_width="@dimen/company_80dp"
-                android:layout_height="@dimen/company_80dp"
-                android:layout_gravity="center_vertical"
-                android:scaleType="centerCrop"/>
-
-            <RelativeLayout
-                android:layout_width="match_parent"
+            android:layout_height="wrap_content"
+            android:layout_marginLeft="@dimen/company_10dp"
+            android:orientation="vertical">
+
+            <TextView
+                android:id="@+id/lv_send_lab"
+                android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:orientation="vertical"
-                android:layout_marginLeft="@dimen/company_10dp">
+                android:text="发布了评论"
+                android:textColor="@color/main_color"
+                android:textSize="@dimen/company_15sp" />
+
+            <me.zhanghai.android.materialratingbar.MaterialRatingBar
+                android:id="@+id/rb_score"
+                style="@style/Widget.MaterialRatingBar.RatingBar"
+                android:layout_width="@dimen/company_90dp"
+                android:layout_height="@dimen/company_20dp"
+                android:layout_marginTop="@dimen/company_5dp"
+                android:isIndicator="true"
+                android:stepSize="1"
+                app:mrb_progressTint="@color/rb_color"
+                app:mrb_secondaryProgressTint="@color/color_999" />
+
+            <TextView
+                android:id="@+id/tv_content"
+                android:layout_width="wrap_content"
+                android:layout_height="wrap_content"
+                android:textColor="@color/color_666"
+                android:textSize="@dimen/company_16sp" />
 
-                <TextView
-                    android:id="@+id/tv_org_name"
-                    android:layout_width="wrap_content"
-                    android:layout_height="wrap_content"
-                    android:textSize="@dimen/company_15sp"
-                    android:textColor="@color/color_999"
-                    android:text="新东方英语学校"/>
+            <LinearLayout
+                android:id="@+id/ll_org_main"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/company_90dp"
+                android:background="#F0F0F0"
+                android:orientation="horizontal"
+                android:padding="@dimen/company_5dp">
+
+                <ImageView
+                    android:id="@+id/iv_org_icon"
+                    android:layout_width="@dimen/company_80dp"
+                    android:layout_height="@dimen/company_80dp"
+                    android:layout_gravity="center_vertical"
+                    android:scaleType="centerCrop" />
 
                 <RelativeLayout
-                    android:layout_width="wrap_content"
+                    android:layout_width="match_parent"
                     android:layout_height="wrap_content"
-                    android:layout_alignParentBottom="true">
+                    android:layout_marginLeft="@dimen/company_10dp"
+                    android:orientation="vertical">
 
                     <TextView
-                        android:id="@+id/tv_course_name"
+                        android:id="@+id/tv_org_name"
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:textSize="@dimen/company_14sp"
+                        android:text="新东方英语学校"
                         android:textColor="@color/color_999"
-                        android:text="初中英语"
-                        android:visibility="gone"/>
+                        android:textSize="@dimen/company_15sp" />
 
-                    <TextView
-                        android:id="@+id/tv_address"
+                    <RelativeLayout
                         android:layout_width="wrap_content"
                         android:layout_height="wrap_content"
-                        android:layout_alignParentRight="true"
-                        android:textColor="@color/color_999"
-                        android:textSize="11sp"
-                        android:text="未名湖"/>
+                        android:layout_alignParentBottom="true">
+
+                        <TextView
+                            android:id="@+id/tv_course_name"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:text="初中英语"
+                            android:textColor="@color/color_999"
+                            android:textSize="@dimen/company_14sp"
+                            android:visibility="gone" />
+
+                        <TextView
+                            android:id="@+id/tv_address"
+                            android:layout_width="wrap_content"
+                            android:layout_height="wrap_content"
+                            android:layout_alignParentRight="true"
+                            android:text="未名湖"
+                            android:textColor="@color/color_999"
+                            android:textSize="11sp" />
+
+                    </RelativeLayout>
 
                 </RelativeLayout>
 
-            </RelativeLayout>
+            </LinearLayout>
 
-        </LinearLayout>
+            <TextView
+                android:layout_width="wrap_content"
+                android:layout_height="@dimen/company_40dp" />
 
-        <TextView
-            android:layout_width="wrap_content"
-            android:layout_height="@dimen/company_40dp" />
+        </LinearLayout>
 
     </LinearLayout>