Commit 38b93710dcfeb1024d970dcda1a99fc2556d16da
1 parent
ab99c955
Exists in
yxb_dev
and in
2 other branches
no message
Showing
12 changed files
with
79 additions
and
40 deletions
Show diff stats
app/src/main/java/com/shunzhi/parent/AppConfig.java
@@ -24,10 +24,11 @@ public class AppConfig { | @@ -24,10 +24,11 @@ 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"; | ||
27 | 28 | ||
28 | 29 | ||
29 | public static boolean ISLOGIN = false; | 30 | public static boolean ISLOGIN = false; |
30 | - public static boolean ISBINDING = false; | 31 | +// public static boolean ISBINDING = false; |
31 | 32 | ||
32 | public static int BINDING_SUCCESS_HEZUO = 1; | 33 | public static int BINDING_SUCCESS_HEZUO = 1; |
33 | public static int BINDING_SUCCESS_NOT = 2; | 34 | public static int BINDING_SUCCESS_NOT = 2; |
app/src/main/java/com/shunzhi/parent/AppContext.java
@@ -15,6 +15,7 @@ import com.netease.nimlib.sdk.StatusBarNotificationConfig; | @@ -15,6 +15,7 @@ import com.netease.nimlib.sdk.StatusBarNotificationConfig; | ||
15 | import com.netease.nimlib.sdk.auth.LoginInfo; | 15 | import com.netease.nimlib.sdk.auth.LoginInfo; |
16 | import com.share.mvpsdk.global.GlobalApplication; | 16 | import com.share.mvpsdk.global.GlobalApplication; |
17 | import com.amap.api.location.AMapLocationClientOption.AMapLocationMode; | 17 | import com.amap.api.location.AMapLocationClientOption.AMapLocationMode; |
18 | +import com.share.mvpsdk.helper.RetrofitCreateHelper; | ||
18 | import com.shunzhi.parent.bean.message.DaoMaster; | 19 | import com.shunzhi.parent.bean.message.DaoMaster; |
19 | import com.shunzhi.parent.bean.message.DaoMaster.DevOpenHelper; | 20 | import com.shunzhi.parent.bean.message.DaoMaster.DevOpenHelper; |
20 | import com.shunzhi.parent.bean.message.DaoSession; | 21 | import com.shunzhi.parent.bean.message.DaoSession; |
@@ -57,6 +58,7 @@ public class AppContext extends GlobalApplication { | @@ -57,6 +58,7 @@ public class AppContext extends GlobalApplication { | ||
57 | initMapLocal(); | 58 | initMapLocal(); |
58 | NIMClient.init(this, loginInfo(), options()); | 59 | NIMClient.init(this, loginInfo(), options()); |
59 | initDB(); | 60 | initDB(); |
61 | + RetrofitCreateHelper.getInstance().setAuthorization(AppConfig.getAppConfig(this).get(AppConfig.ACCESS_TOKEN)); | ||
60 | } | 62 | } |
61 | 63 | ||
62 | private void initDB() { | 64 | private void initDB() { |
app/src/main/java/com/shunzhi/parent/manager/MessageManager.java
@@ -79,9 +79,11 @@ public class MessageManager { | @@ -79,9 +79,11 @@ public class MessageManager { | ||
79 | public void onEvent(StatusCode statusCode) { | 79 | public void onEvent(StatusCode statusCode) { |
80 | if (statusCode == StatusCode.KICKOUT) { | 80 | if (statusCode == StatusCode.KICKOUT) { |
81 | Context context = AppContext.getInstance(); | 81 | Context context = AppContext.getInstance(); |
82 | -// Intent i = new Intent(context, LoginAndRegistActivity.class); | ||
83 | -// i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | ||
84 | -// context.startActivity(i); | 82 | + Intent i = new Intent(context, LoginAndRegistActivity.class); |
83 | + i.putExtra("type", "登录"); | ||
84 | + i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK); | ||
85 | + ToastUtils.showToast("请重新登录"); | ||
86 | + context.startActivity(i); | ||
85 | } | 87 | } |
86 | } | 88 | } |
87 | }, true); | 89 | }, true); |
app/src/main/java/com/shunzhi/parent/model/orderdetail/OrderDetailModel.java
@@ -30,7 +30,7 @@ public class OrderDetailModel extends BaseModel implements OrderDetailContract.I | @@ -30,7 +30,7 @@ public class OrderDetailModel extends BaseModel implements OrderDetailContract.I | ||
30 | @Override | 30 | @Override |
31 | public Observable<JsonObject> getOrderDetails() { | 31 | public Observable<JsonObject> getOrderDetails() { |
32 | String user_id=AppConfig.getAppConfig(AppContext.getContext()).get(AppConfig.USER_ID); | 32 | String user_id=AppConfig.getAppConfig(AppContext.getContext()).get(AppConfig.USER_ID); |
33 | - Log.d("6666","user_id="+user_id); | 33 | +// Log.d("6666","user_id="+user_id); |
34 | return RetrofitCreateHelper.getInstance().createApi(OrderDetailApi.class, AppConfig.BASE_URL).getOrderDetail(user_id) | 34 | return RetrofitCreateHelper.getInstance().createApi(OrderDetailApi.class, AppConfig.BASE_URL).getOrderDetail(user_id) |
35 | .compose(RxHelper.<JsonObject>rxSchedulerHelper()); | 35 | .compose(RxHelper.<JsonObject>rxSchedulerHelper()); |
36 | 36 |
app/src/main/java/com/shunzhi/parent/presenter/loginandregister/LoginAndRegisterPresenter.java
@@ -55,7 +55,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -55,7 +55,7 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
55 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); | 55 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.ACCESS_TOKEN, jsonObject.get("access_token").getAsString()); |
56 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); | 56 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_NAME, loginName); |
57 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_PWD, loginPwd); | 57 | AppConfig.getAppConfig(AppContext.getInstance()).set(AppConfig.LOGIN_PWD, loginPwd); |
58 | - RetrofitCreateHelper.getInstance().setAuthorization("Bearer " + jsonObject.get("access_token").getAsString()); | 58 | + RetrofitCreateHelper.getInstance().setAuthorization(jsonObject.get("access_token").getAsString()); |
59 | getUserInfo(loginName, 0, ""); | 59 | getUserInfo(loginName, 0, ""); |
60 | } else { | 60 | } else { |
61 | ToastUtils.showToast(jsonObject.get("error").getAsString()); | 61 | ToastUtils.showToast(jsonObject.get("error").getAsString()); |
@@ -167,8 +167,8 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | @@ -167,8 +167,8 @@ public class LoginAndRegisterPresenter extends LoginAndRegisterContract.LoginPre | ||
167 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); | 167 | AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.USER_ID, currentBean.getUserid()); |
168 | 168 | ||
169 | if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { | 169 | if (currentBean.getStudentClass() != null && currentBean.getStudentClass().size() > 0) { |
170 | - Log.e("qqqq--==","qqqqq"); | ||
171 | - AppConfig.ISBINDING = true; | 170 | +// Log.e("qqqq--==","qqqqq"); |
171 | + AppConfig.getAppConfig(mIView.getBindActivity()).set(AppConfig.ISBINDING,"1"); | ||
172 | } | 172 | } |
173 | 173 | ||
174 | String account = currentBean.getUserid(); | 174 | String account = currentBean.getUserid(); |
app/src/main/java/com/shunzhi/parent/presenter/mine/MyChildPresenter.java
@@ -4,6 +4,7 @@ import com.google.gson.JsonObject; | @@ -4,6 +4,7 @@ import com.google.gson.JsonObject; | ||
4 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; | 4 | import com.share.mvpsdk.utils.OkHttpExceptionUtil; |
5 | import com.share.mvpsdk.utils.ToastUtils; | 5 | import com.share.mvpsdk.utils.ToastUtils; |
6 | import com.shunzhi.parent.AppConfig; | 6 | import com.shunzhi.parent.AppConfig; |
7 | +import com.shunzhi.parent.AppContext; | ||
7 | import com.shunzhi.parent.bean.ChildClass; | 8 | import com.shunzhi.parent.bean.ChildClass; |
8 | import com.shunzhi.parent.bean.CurrentBean; | 9 | import com.shunzhi.parent.bean.CurrentBean; |
9 | import com.shunzhi.parent.bean.GradeBean; | 10 | import com.shunzhi.parent.bean.GradeBean; |
@@ -70,7 +71,7 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { | @@ -70,7 +71,7 @@ public class MyChildPresenter extends MyChildContract.MyChildPresenter { | ||
70 | @Override | 71 | @Override |
71 | public void accept(JsonObject jsonObject) throws Exception { | 72 | public void accept(JsonObject jsonObject) throws Exception { |
72 | ToastUtils.showToast("绑定孩子成功"); | 73 | ToastUtils.showToast("绑定孩子成功"); |
73 | - AppConfig.ISBINDING=true; | 74 | + AppConfig.getAppConfig(AppContext.getContext()).set(AppConfig.ISBINDING,"1"); |
74 | if (jsonObject.get("data").toString().equals("null")) { | 75 | if (jsonObject.get("data").toString().equals("null")) { |
75 | mIView.addChildSuccess("", ""); | 76 | mIView.addChildSuccess("", ""); |
76 | } else { | 77 | } else { |
app/src/main/java/com/shunzhi/parent/presenter/orederdetail/OrderDetailPresenter.java
@@ -44,7 +44,7 @@ public class OrderDetailPresenter extends OrderDetailContract.OrderDetailPreente | @@ -44,7 +44,7 @@ public class OrderDetailPresenter extends OrderDetailContract.OrderDetailPreente | ||
44 | OrderDetailBean orderDetailBean=new Gson().fromJson(orderDetailObj,OrderDetailBean.class); | 44 | OrderDetailBean orderDetailBean=new Gson().fromJson(orderDetailObj,OrderDetailBean.class); |
45 | orderDetailBeanList.add(orderDetailBean); | 45 | orderDetailBeanList.add(orderDetailBean); |
46 | } | 46 | } |
47 | - Log.d("6666","orderDetailBeanList="+orderDetailBeanList); | 47 | +// Log.d("6666","orderDetailBeanList="+orderDetailBeanList); |
48 | mIView.showOrderDetais(orderDetailBeanList); | 48 | mIView.showOrderDetais(orderDetailBeanList); |
49 | }else { | 49 | }else { |
50 | ToastUtils.showToast(jsonObject.get("message").getAsString()); | 50 | ToastUtils.showToast(jsonObject.get("message").getAsString()); |
@@ -53,7 +53,7 @@ public class OrderDetailPresenter extends OrderDetailContract.OrderDetailPreente | @@ -53,7 +53,7 @@ public class OrderDetailPresenter extends OrderDetailContract.OrderDetailPreente | ||
53 | }, new Consumer<Throwable>() { | 53 | }, new Consumer<Throwable>() { |
54 | @Override | 54 | @Override |
55 | public void accept(Throwable throwable) throws Exception { | 55 | public void accept(Throwable throwable) throws Exception { |
56 | - Log.d("6666","throwable="+throwable.toString()); | 56 | +// Log.d("6666","throwable="+throwable.toString()); |
57 | } | 57 | } |
58 | })); | 58 | })); |
59 | 59 |
app/src/main/java/com/shunzhi/parent/ui/activity/orderdetail/OrderDetailActivity.java
@@ -20,6 +20,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | @@ -20,6 +20,7 @@ import com.share.mvpsdk.base.adapter.BaseRecyclerViewHolder; | ||
20 | import com.share.mvpsdk.base.adapter.OnItemClickListener; | 20 | import com.share.mvpsdk.base.adapter.OnItemClickListener; |
21 | import com.share.mvpsdk.utils.DateUtils; | 21 | import com.share.mvpsdk.utils.DateUtils; |
22 | import com.share.mvpsdk.utils.DisplayUtils; | 22 | import com.share.mvpsdk.utils.DisplayUtils; |
23 | +import com.share.mvpsdk.utils.ToastUtils; | ||
23 | import com.shunzhi.parent.AppConfig; | 24 | import com.shunzhi.parent.AppConfig; |
24 | import com.shunzhi.parent.R; | 25 | import com.shunzhi.parent.R; |
25 | import com.shunzhi.parent.bean.orderdetail.OrderDetailBean; | 26 | import com.shunzhi.parent.bean.orderdetail.OrderDetailBean; |
app/src/main/java/com/shunzhi/parent/ui/fragment/ConsultFragment.java
@@ -146,6 +146,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | @@ -146,6 +146,7 @@ public class ConsultFragment extends BaseMVPCompatFragment<ConsultContract.Consu | ||
146 | xBanner.setmAdapter(new XBanner.XBannerAdapter() { | 146 | xBanner.setmAdapter(new XBanner.XBannerAdapter() { |
147 | @Override | 147 | @Override |
148 | public void loadBanner(XBanner banner, Object model, View view, int position) { | 148 | public void loadBanner(XBanner banner, Object model, View view, int position) { |
149 | + if(position<=imgesUrl.size()-1) | ||
149 | GlideUtils.showImg(getActivity(),(ImageView) view,imgesUrl.get(position)); | 150 | GlideUtils.showImg(getActivity(),(ImageView) view,imgesUrl.get(position)); |
150 | } | 151 | } |
151 | }); | 152 | }); |
app/src/main/java/com/shunzhi/parent/ui/fragment/MineFragment.java
@@ -78,7 +78,12 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | @@ -78,7 +78,12 @@ public class MineFragment extends BaseMVPCompatFragment<LoginAndRegisterContract | ||
78 | } | 78 | } |
79 | 79 | ||
80 | private void setPersonInfo() { | 80 | private void setPersonInfo() { |
81 | - if (AppConfig.ISBINDING) { | 81 | + |
82 | + String useName=AppConfig.getAppConfig(getContext()).get(AppConfig.USER_NAME); | ||
83 | + if (!TextUtils.isEmpty(useName))AppConfig.ISLOGIN=true; | ||
84 | + else AppConfig.ISLOGIN=false; | ||
85 | + | ||
86 | + if (TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.ISBINDING))) { | ||
82 | binding_state.setText(""); | 87 | binding_state.setText(""); |
83 | } | 88 | } |
84 | if (AppConfig.ISLOGIN) { | 89 | if (AppConfig.ISLOGIN) { |
app/src/main/java/com/shunzhi/parent/ui/fragment/StartFragment.java
@@ -5,6 +5,7 @@ import android.os.CountDownTimer; | @@ -5,6 +5,7 @@ import android.os.CountDownTimer; | ||
5 | import android.support.annotation.NonNull; | 5 | import android.support.annotation.NonNull; |
6 | import android.support.annotation.Nullable; | 6 | import android.support.annotation.Nullable; |
7 | import android.text.TextUtils; | 7 | import android.text.TextUtils; |
8 | +import android.util.Log; | ||
8 | import android.view.View; | 9 | import android.view.View; |
9 | import android.widget.ImageView; | 10 | import android.widget.ImageView; |
10 | import android.widget.TextView; | 11 | import android.widget.TextView; |
@@ -71,18 +72,10 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | @@ -71,18 +72,10 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
71 | jiecaoVideo.loadingProgressBar.setVisibility(View.GONE); | 72 | jiecaoVideo.loadingProgressBar.setVisibility(View.GONE); |
72 | countDownTimer.start(); | 73 | countDownTimer.start(); |
73 | isQidong = TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START)); | 74 | isQidong = TextUtils.isEmpty(AppConfig.getAppConfig(getContext()).get(AppConfig.APP_IS_START)); |
74 | - if (isQidong) { | ||
75 | - jiecaoVideo.setVisibility(View.VISIBLE); | ||
76 | - xBanner.setVisibility(View.GONE); | ||
77 | - AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); | ||
78 | -// mPresenter.getBanners("0", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); | ||
79 | - mPresenter.getBanners("0", ""); | ||
80 | - } else { | ||
81 | - jiecaoVideo.setVisibility(View.GONE); | ||
82 | - xBanner.setVisibility(View.VISIBLE); | ||
83 | - mPresenter.getBanners("1", ""); | ||
84 | -// mPresenter.getBanners("1", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); | ||
85 | - } | 75 | + |
76 | + if (isQidong)mPresenter.getBanners("0", ""); | ||
77 | + else mPresenter.getBanners("1", ""); | ||
78 | +// showVideos(); | ||
86 | 79 | ||
87 | tvJump=view.findViewById(R.id.tvJump); | 80 | tvJump=view.findViewById(R.id.tvJump); |
88 | 81 | ||
@@ -96,6 +89,20 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | @@ -96,6 +89,20 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
96 | 89 | ||
97 | } | 90 | } |
98 | 91 | ||
92 | + private void showVideos(){ | ||
93 | + if (isQidong) { | ||
94 | + jiecaoVideo.setVisibility(View.VISIBLE); | ||
95 | + xBanner.setVisibility(View.GONE); | ||
96 | +// mPresenter.getBanners("0", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); | ||
97 | + mPresenter.getBanners("0", ""); | ||
98 | + } else { | ||
99 | + jiecaoVideo.setVisibility(View.GONE); | ||
100 | + xBanner.setVisibility(View.VISIBLE); | ||
101 | + mPresenter.getBanners("1", ""); | ||
102 | +// mPresenter.getBanners("1", AppContext.getInstance().district==""?"余杭区":AppContext.getInstance().district); | ||
103 | + } | ||
104 | + } | ||
105 | + | ||
99 | @NonNull | 106 | @NonNull |
100 | @Override | 107 | @Override |
101 | public BasePresenter initPresenter() { | 108 | public BasePresenter initPresenter() { |
@@ -121,36 +128,42 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | @@ -121,36 +128,42 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
121 | public void showContext(List<ChannelContextBean> list) { | 128 | public void showContext(List<ChannelContextBean> list) { |
122 | 129 | ||
123 | } | 130 | } |
124 | - | 131 | + List<String> imgUrl = new ArrayList<>(); |
132 | + List<String> describeList = new ArrayList<>(); | ||
125 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { | 133 | private void initBannes(List<GuangGaoBean> guangGaoBeanList) { |
126 | try { | 134 | try { |
135 | + imgUrl = new ArrayList<>(); | ||
136 | + describeList = new ArrayList<>(); | ||
127 | if (isQidong) { | 137 | if (isQidong) { |
138 | + AppConfig.getAppConfig(getContext()).set(AppConfig.APP_IS_START, "1"); | ||
128 | String fileUrl = "", describe = ""; | 139 | String fileUrl = "", describe = ""; |
129 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | 140 | for (int i = 0; i < guangGaoBeanList.size(); i++) { |
130 | if (guangGaoBeanList.get(i).fileSrc.contains(".mp4")) { | 141 | if (guangGaoBeanList.get(i).fileSrc.contains(".mp4")) { |
131 | fileUrl = AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc; | 142 | fileUrl = AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc; |
132 | describe = guangGaoBeanList.get(i).describe; | 143 | describe = guangGaoBeanList.get(i).describe; |
144 | + imgUrl.add(fileUrl); | ||
145 | + describeList.add(describe); | ||
146 | + }else { | ||
147 | + imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); | ||
148 | + describeList.add(guangGaoBeanList.get(i).describe); | ||
133 | } | 149 | } |
134 | } | 150 | } |
135 | - jiecaoVideo.setUp(fileUrl, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, describe); | ||
136 | - jiecaoVideo.startVideo(); | 151 | +// Log.d("66666","fileUrl="+guangGaoBeanList); |
152 | + if (!TextUtils.isEmpty(fileUrl)){ | ||
153 | + jiecaoVideo.setUp(fileUrl, JZVideoPlayerStandard.SCREEN_WINDOW_NORMAL, describe); | ||
154 | + jiecaoVideo.startVideo(); | ||
155 | + }else { | ||
156 | + isQidong=false; | ||
157 | + showVideos(); | ||
158 | + showBanners(); | ||
159 | + } | ||
160 | + | ||
137 | } else { | 161 | } else { |
138 | - final List<String> imgUrl = new ArrayList<>(); | ||
139 | - List<String> describeList = new ArrayList<>(); | ||
140 | for (int i = 0; i < guangGaoBeanList.size(); i++) { | 162 | for (int i = 0; i < guangGaoBeanList.size(); i++) { |
141 | imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); | 163 | imgUrl.add(AppConfig.BASE_URL_FILE + guangGaoBeanList.get(i).fileSrc); |
142 | describeList.add(guangGaoBeanList.get(i).describe); | 164 | describeList.add(guangGaoBeanList.get(i).describe); |
143 | } | 165 | } |
144 | - xBanner.setData(imgUrl, describeList); | ||
145 | - xBanner.stopAutoPlay(); | ||
146 | - xBanner.setmAutoPalyTime(10000); | ||
147 | - xBanner.setPointsIsVisible(false); | ||
148 | - xBanner.setmAdapter(new XBanner.XBannerAdapter() { | ||
149 | - @Override | ||
150 | - public void loadBanner(XBanner banner, Object model, View view, int position) { | ||
151 | - GlideUtils.showImg(getActivity(), (ImageView) view, imgUrl.get(position)); | ||
152 | - } | ||
153 | - }); | 166 | + showBanners(); |
154 | } | 167 | } |
155 | 168 | ||
156 | } catch (Exception e) { | 169 | } catch (Exception e) { |
@@ -158,6 +171,19 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | @@ -158,6 +171,19 @@ public class StartFragment extends BaseMVPCompatFragment<ConsultContract.Consult | ||
158 | } | 171 | } |
159 | } | 172 | } |
160 | 173 | ||
174 | + private void showBanners(){ | ||
175 | + xBanner.setData(imgUrl, describeList); | ||
176 | + xBanner.stopAutoPlay(); | ||
177 | + xBanner.setmAutoPalyTime(10000); | ||
178 | + xBanner.setPointsIsVisible(false); | ||
179 | + xBanner.setmAdapter(new XBanner.XBannerAdapter() { | ||
180 | + @Override | ||
181 | + public void loadBanner(XBanner banner, Object model, View view, int position) { | ||
182 | + GlideUtils.showImg(getActivity(), (ImageView) view, imgUrl.get(position)); | ||
183 | + } | ||
184 | + }); | ||
185 | + } | ||
186 | + | ||
161 | @Override | 187 | @Override |
162 | public void onDestroy() { | 188 | public void onDestroy() { |
163 | super.onDestroy(); | 189 | super.onDestroy(); |
mvpsdk/src/main/java/com/share/mvpsdk/helper/RetrofitCreateHelper.java
@@ -111,7 +111,7 @@ public class RetrofitCreateHelper { | @@ -111,7 +111,7 @@ public class RetrofitCreateHelper { | ||
111 | // return retrofit.create(clazz); | 111 | // return retrofit.create(clazz); |
112 | // } | 112 | // } |
113 | public void setAuthorization(String Authorization) { | 113 | public void setAuthorization(String Authorization) { |
114 | - this.token = Authorization; | 114 | + this.token ="Bearer " + Authorization; |
115 | } | 115 | } |
116 | 116 | ||
117 | public <T> T login(Class<T> clazz, String url) { | 117 | public <T> T login(Class<T> clazz, String url) { |