分享替换key
This commit is contained in:
parent
6462b649f5
commit
4467e26be2
@ -1 +1 @@
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":4,"versionName":"1.0.3","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
|
||||
[{"outputType":{"type":"APK"},"apkData":{"type":"MAIN","splits":[],"versionCode":7,"versionName":"1.0.7","enabled":true,"outputFile":"app-release.apk","fullName":"release","baseName":"release","dirName":""},"path":"app-release.apk","properties":{}}]
|
@ -12,5 +12,6 @@ public class WXEntryActivity extends Activity {
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_w_x_entry);
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ ext {
|
||||
gCompileSdkVersion = 29
|
||||
gMinSdkVersion = 16
|
||||
gTargetSdkVersion = 29
|
||||
gVersionCode = 4
|
||||
gVersionName = '1.0.3'
|
||||
gVersionCode = 7
|
||||
gVersionName = '1.0.7'
|
||||
gBuildToolsVersion = "29.0.2"
|
||||
// gVersionCode=26
|
||||
// gVersionName='1.3.0'
|
||||
|
@ -46,7 +46,11 @@ public class PathConfig {
|
||||
|
||||
public static final String NEWS_ID = "f497904b-7727-4832-891c-604c36ae4167";//文化动态ID
|
||||
public static final String NEWS_SHOW_ID = "f1d5d313-f728-4dda-9843-1116d97e17b0";//展览展示ID
|
||||
public static final String NEWS_BANNER_ID = "eab0ca3c-d35d-4c02-9397-ace2bdd10fc1";
|
||||
public static final String NEWS_BANNER_ID = "eab0ca3c-d35d-4c02-9397-ace2bdd10fc1";//轮播图
|
||||
public static final String NEWS_CULTIVATE_ID = "d9d8c7ea-32e0-43ed-ad17-7c99a3c389b9";//在线培训
|
||||
public static final String NEWS_BOOKS_ID = "98c74389-2088-499b-a046-8611bdc57ea4";//数图资源
|
||||
public static final String NEWS_TOUR_ID = "51ae7beb-f277-47a4-937a-088e6d47656d";//文化旅游
|
||||
|
||||
|
||||
public static final String PLACE_TYPE_ID = "df8b758c-f6d8-465a-9aa8-c451fde47076";//场馆类型字典
|
||||
public static final String CITY_DEFAULT_CODE = "640675";
|
||||
@ -216,7 +220,7 @@ public class PathConfig {
|
||||
public static final String DID_SERVICE_AREA = "761d8633-3c2f-4e92-b32d-fb50d3dc07b7";//服务区域
|
||||
public static final String DID_SERVICE_TYPE = "a223b308-014a-4e89-93fa-035a564e7fda";//服务类别
|
||||
public static final String DID_SERVICE_DOMAIN = "7b213c37-8575-4db3-bda1-86c4e38589f7";//服务领域或行业
|
||||
|
||||
public static final String DID_VOCATION_ID = "3a2a6615-a4fe-465b-b56d-a2b7ae409b9d";//职业
|
||||
//====================Player=======================
|
||||
public static final String PATH_MODULE_PLAYER_SIMPLE_VIDEO = "/moduleplayer/activity/simpleplayer";//单纯播放器
|
||||
|
||||
|
@ -0,0 +1,179 @@
|
||||
package com.sucstepsoft.cm_utils.core.beans;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 作者: adam
|
||||
* 日期: 2020/8/28 - 5:12 PM
|
||||
* 邮箱: itgaojian@163.com
|
||||
* 描述:
|
||||
*/
|
||||
public class AreaBean {
|
||||
|
||||
/**
|
||||
* areaCityCode : string
|
||||
* areaCode : string
|
||||
* areaFirst : string
|
||||
* areaId : string
|
||||
* areaLat : string
|
||||
* areaLevel : string
|
||||
* areaLng : string
|
||||
* areaMergerName : string
|
||||
* areaName : string
|
||||
* areaParentId : string
|
||||
* areaParentName : string
|
||||
* areaPinyin : string
|
||||
* areaShortName : string
|
||||
* areaZipCode : string
|
||||
* parent : true
|
||||
* subArea : [{}]
|
||||
*/
|
||||
|
||||
private String areaCityCode;
|
||||
private String areaCode;
|
||||
private String areaFirst;
|
||||
private String areaId;
|
||||
private String areaLat;
|
||||
private String areaLevel;
|
||||
private String areaLng;
|
||||
private String areaMergerName;
|
||||
private String areaName;
|
||||
private String areaParentId;
|
||||
private String areaParentName;
|
||||
private String areaPinyin;
|
||||
private String areaShortName;
|
||||
private String areaZipCode;
|
||||
private boolean parent;
|
||||
private List<SubAreaBean> subArea;
|
||||
|
||||
public String getAreaCityCode() {
|
||||
return areaCityCode;
|
||||
}
|
||||
|
||||
public void setAreaCityCode(String areaCityCode) {
|
||||
this.areaCityCode = areaCityCode;
|
||||
}
|
||||
|
||||
public String getAreaCode() {
|
||||
return areaCode;
|
||||
}
|
||||
|
||||
public void setAreaCode(String areaCode) {
|
||||
this.areaCode = areaCode;
|
||||
}
|
||||
|
||||
public String getAreaFirst() {
|
||||
return areaFirst;
|
||||
}
|
||||
|
||||
public void setAreaFirst(String areaFirst) {
|
||||
this.areaFirst = areaFirst;
|
||||
}
|
||||
|
||||
public String getAreaId() {
|
||||
return areaId;
|
||||
}
|
||||
|
||||
public void setAreaId(String areaId) {
|
||||
this.areaId = areaId;
|
||||
}
|
||||
|
||||
public String getAreaLat() {
|
||||
return areaLat;
|
||||
}
|
||||
|
||||
public void setAreaLat(String areaLat) {
|
||||
this.areaLat = areaLat;
|
||||
}
|
||||
|
||||
public String getAreaLevel() {
|
||||
return areaLevel;
|
||||
}
|
||||
|
||||
public void setAreaLevel(String areaLevel) {
|
||||
this.areaLevel = areaLevel;
|
||||
}
|
||||
|
||||
public String getAreaLng() {
|
||||
return areaLng;
|
||||
}
|
||||
|
||||
public void setAreaLng(String areaLng) {
|
||||
this.areaLng = areaLng;
|
||||
}
|
||||
|
||||
public String getAreaMergerName() {
|
||||
return areaMergerName;
|
||||
}
|
||||
|
||||
public void setAreaMergerName(String areaMergerName) {
|
||||
this.areaMergerName = areaMergerName;
|
||||
}
|
||||
|
||||
public String getAreaName() {
|
||||
return areaName;
|
||||
}
|
||||
|
||||
public void setAreaName(String areaName) {
|
||||
this.areaName = areaName;
|
||||
}
|
||||
|
||||
public String getAreaParentId() {
|
||||
return areaParentId;
|
||||
}
|
||||
|
||||
public void setAreaParentId(String areaParentId) {
|
||||
this.areaParentId = areaParentId;
|
||||
}
|
||||
|
||||
public String getAreaParentName() {
|
||||
return areaParentName;
|
||||
}
|
||||
|
||||
public void setAreaParentName(String areaParentName) {
|
||||
this.areaParentName = areaParentName;
|
||||
}
|
||||
|
||||
public String getAreaPinyin() {
|
||||
return areaPinyin;
|
||||
}
|
||||
|
||||
public void setAreaPinyin(String areaPinyin) {
|
||||
this.areaPinyin = areaPinyin;
|
||||
}
|
||||
|
||||
public String getAreaShortName() {
|
||||
return areaShortName;
|
||||
}
|
||||
|
||||
public void setAreaShortName(String areaShortName) {
|
||||
this.areaShortName = areaShortName;
|
||||
}
|
||||
|
||||
public String getAreaZipCode() {
|
||||
return areaZipCode;
|
||||
}
|
||||
|
||||
public void setAreaZipCode(String areaZipCode) {
|
||||
this.areaZipCode = areaZipCode;
|
||||
}
|
||||
|
||||
public boolean isParent() {
|
||||
return parent;
|
||||
}
|
||||
|
||||
public void setParent(boolean parent) {
|
||||
this.parent = parent;
|
||||
}
|
||||
|
||||
public List<SubAreaBean> getSubArea() {
|
||||
return subArea;
|
||||
}
|
||||
|
||||
public void setSubArea(List<SubAreaBean> subArea) {
|
||||
this.subArea = subArea;
|
||||
}
|
||||
|
||||
public static class SubAreaBean {
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import retrofit2.http.GET;
|
||||
*/
|
||||
public class BaseUrlApi {
|
||||
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
public static final String IP = "https://www.wgink.ink/usercenter/";/* 正式IP */
|
||||
public static final String BASE_SYSTEM_IP = "https://www.wgink.ink/";
|
||||
// public static final String IP = "http://192.168.0.113:7001/usercenter/";/* 测试IP */
|
||||
@ -30,6 +30,7 @@ public class BaseUrlApi {
|
||||
public static final String TYPE_NAVIGATION = "456";//显示导航
|
||||
public static final String TYPE_DEFAULT = "333";//默认
|
||||
public static final String BASE_ACTIVIY_IP = BASE_SYSTEM_IP + "culturalactivity/";/* 活动URL */
|
||||
public static final String TEMP_IP = "http://192.168.0.111:8888/";
|
||||
public static final String BASE_VOLUNTEER_IP = BASE_SYSTEM_IP + "volunteer/";/* 志愿者 */
|
||||
public static final String BASE_LIVE_IP = BASE_SYSTEM_IP + "live/";
|
||||
public static final String BASE_LIVE_URL = BASE_SYSTEM_IP;//直播回放视频url
|
||||
|
@ -7,12 +7,15 @@ import android.content.Intent;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Environment;
|
||||
|
||||
import androidx.core.content.FileProvider;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.bean.VersionBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.ApiException;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.AreaInterceptor;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.BaseObserver;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.BaseUrlInterceptor;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.conver.CommInterceptor;
|
||||
@ -72,7 +75,8 @@ public class RetrofitManager {
|
||||
builder.readTimeout(TIMEOUT, TimeUnit.SECONDS);
|
||||
builder.writeTimeout(TIMEOUT, TimeUnit.SECONDS);
|
||||
//封装公共参数
|
||||
builder.addInterceptor(new CommInterceptor());
|
||||
builder.addInterceptor(new AreaInterceptor());
|
||||
// builder.addInterceptor(new CommInterceptor());
|
||||
//多BaseUrl连接器
|
||||
builder.addInterceptor(new BaseUrlInterceptor());
|
||||
OkHttpClient client = builder.build();
|
||||
|
@ -2,6 +2,7 @@ package com.sucstepsoft.cm_utils.core.retrofit_net.api;
|
||||
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.DictionaryBean;
|
||||
@ -250,6 +251,16 @@ public interface BaseApiService {
|
||||
@PUT("app/user/updateuserpassword")
|
||||
Observable<BaseSuccessBean> doChangePwd(@Body RequestBody body, @Header("token") String token);
|
||||
|
||||
/**
|
||||
* 统一用户-获取区域详情
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Headers({"Content-Type:application/json", "Accept:application/json"})
|
||||
@GET("app/dataarea/getareabyidrelease/{areaId}")
|
||||
Observable<AreaBean> getAreaListByPid(@Path("areaId") String id);
|
||||
|
||||
/**
|
||||
* 获取当前用户是否是志愿者
|
||||
* GET /app/volunteer/isvolunteer
|
||||
|
@ -0,0 +1,172 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
|
||||
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.FormBody;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.RequestBody;
|
||||
import okio.Buffer;
|
||||
|
||||
/**
|
||||
* 作者 : Adam on 2018/12/6.
|
||||
* 邮箱 : itgaojian@163.com
|
||||
* 描述 : 公共参数拦截器-添加公共参数
|
||||
*/
|
||||
public class AreaInterceptor implements Interceptor {
|
||||
|
||||
@Override
|
||||
public okhttp3.Response intercept(Chain chain) throws IOException {
|
||||
Request originalRequest = chain.request();
|
||||
Request request;
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
}
|
||||
String name = "area" + cityLevel;
|
||||
String areaId = UserLgUtils.getCurrentCityCode();
|
||||
if (TextUtils.isEmpty(areaId)) {
|
||||
areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
}
|
||||
HttpUrl modifiedUrl = originalRequest.url().newBuilder()
|
||||
.addQueryParameter(name, areaId)
|
||||
.build();
|
||||
request = originalRequest.newBuilder().url(modifiedUrl).build();
|
||||
return chain.proceed(request);
|
||||
// Request oldRequest = chain.request();
|
||||
// Request.Builder newRequestBuild = null;
|
||||
// String method = oldRequest.method();
|
||||
// String postBodyString = "";
|
||||
//
|
||||
// if ("POST".equals(method)) {
|
||||
// RequestBody oldBody = oldRequest.body();
|
||||
// if (oldBody instanceof FormBody) {
|
||||
// LogUtils.e("FormBody");
|
||||
// FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
|
||||
// formBodyBuilder.add(name, areaId);
|
||||
// newRequestBuild = oldRequest.newBuilder();
|
||||
// RequestBody formBody = formBodyBuilder.build();
|
||||
// postBodyString = bodyToString(oldRequest.body());
|
||||
// postBodyString += ((postBodyString.length() > 0) ? "&" : "") + bodyToString(formBody);
|
||||
// newRequestBuild.post(RequestBody.create(MediaType.parse("application/json;charset=UTF-8"), postBodyString));
|
||||
// } else if (oldBody instanceof MultipartBody) {
|
||||
// LogUtils.e("MultipartBody");
|
||||
// MultipartBody oldBodyMultipart = (MultipartBody) oldBody;
|
||||
// List<MultipartBody.Part> oldPartList = oldBodyMultipart.parts();
|
||||
// MultipartBody.Builder builder = new MultipartBody.Builder();
|
||||
// builder.setType(MultipartBody.FORM);
|
||||
// int cityLevel = UserLgUtils.getCityLevel();
|
||||
// if (cityLevel == -1) {
|
||||
// cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
// }
|
||||
// String name = "area" + cityLevel;
|
||||
// RequestBody requestBody1 = RequestBody.create(MediaType.parse("text/plain"), name);
|
||||
// String areaId = UserLgUtils.getCurrentCityCode();
|
||||
// if (TextUtils.isEmpty(areaId)) {
|
||||
// areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
// }
|
||||
// MultipartBody.Part partBody = MultipartBody.Part.createFormData(name, areaId, requestBody1);
|
||||
// for (MultipartBody.Part part : oldPartList) {
|
||||
// builder.addPart(part);
|
||||
// postBodyString += (bodyToString(part.body()) + "\n");
|
||||
// }
|
||||
// postBodyString += (bodyToString(requestBody1) + "\n");
|
||||
// builder.addPart(partBody);
|
||||
// newRequestBuild = oldRequest.newBuilder();
|
||||
// newRequestBuild.post(builder.build());
|
||||
// } else {
|
||||
// LogUtils.e("else");
|
||||
// newRequestBuild = oldRequest.newBuilder();
|
||||
// FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
// formBodyBuilder.addEncoded("Content-Type", "application/json;charset=UTF-8");
|
||||
// int cityLevel = UserLgUtils.getCityLevel();
|
||||
// if (cityLevel == -1) {
|
||||
// cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
// }
|
||||
// String name = "area" + cityLevel;
|
||||
// String areaId = UserLgUtils.getCurrentCityCode();
|
||||
// if (TextUtils.isEmpty(areaId)) {
|
||||
// areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
// }
|
||||
// FormBody token = formBodyBuilder.add(name, areaId).build();
|
||||
// newRequestBuild.post(token);
|
||||
// }
|
||||
// } else {
|
||||
// // 添加新的参数
|
||||
// int cityLevel = UserLgUtils.getCityLevel();
|
||||
// if (cityLevel == -1) {
|
||||
// cityLevel = PathConfig.CITY_DEFAULT_LEVEL;
|
||||
// }
|
||||
// String name = "area" + cityLevel;
|
||||
// String areaId = UserLgUtils.getCurrentCityCode();
|
||||
// if (TextUtils.isEmpty(areaId)) {
|
||||
// areaId = PathConfig.CITY_DEFAULT_CODE;
|
||||
// }
|
||||
//
|
||||
// HttpUrl.Builder commonParamsUrlBuilder = oldRequest.url()
|
||||
// .newBuilder()
|
||||
// .scheme(oldRequest.url().scheme())
|
||||
// .host(oldRequest.url().host())
|
||||
// .addQueryParameter(name, areaId);
|
||||
// newRequestBuild = oldRequest.newBuilder()
|
||||
// .method(oldRequest.method(), oldRequest.body())
|
||||
// .url(commonParamsUrlBuilder.build());
|
||||
// }
|
||||
// Request newRequest = newRequestBuild
|
||||
// .addHeader("Accept", "application/json")
|
||||
// .addHeader("Accept-Language", "zh")
|
||||
// .build();
|
||||
//
|
||||
// okhttp3.Response response = chain.proceed(newRequest);
|
||||
// MediaType mediaType = response.body().contentType();
|
||||
// String content = response.body().string();
|
||||
// return response.newBuilder()
|
||||
// .body(okhttp3.ResponseBody.create(mediaType, content))
|
||||
// .build();
|
||||
}
|
||||
|
||||
private static String bodyToString(final RequestBody request) {
|
||||
try {
|
||||
final RequestBody copy = request;
|
||||
final Buffer buffer = new Buffer();
|
||||
if (copy != null)
|
||||
copy.writeTo(buffer);
|
||||
else
|
||||
return "";
|
||||
return buffer.readUtf8();
|
||||
} catch (final IOException e) {
|
||||
return "did not work";
|
||||
}
|
||||
}
|
||||
|
||||
private HashMap<String, String> buildPublicParams() {
|
||||
HashMap<String, String> params = new HashMap<>();
|
||||
params.put("token", UserInfoSPUtils.getToken());
|
||||
// try {
|
||||
// params.put("strName", BluetoothAdapter.getDefaultAdapter().getName() == null ? "" : BluetoothAdapter.getDefaultAdapter().getName());//手机系统版名称
|
||||
// params.put("strSysName", "Android");//手机系统版名称
|
||||
// params.put("strSysVersion", android.os.Build.VERSION.RELEASE == null ? "" : android.os.Build.VERSION.RELEASE);//手机系统版本号
|
||||
// params.put("phoneModel", android.os.Build.MODEL == null ? "" : android.os.Build.MODEL);//手机型号
|
||||
// params.put("strAppName", AppUtils.getAppName());//应用名称
|
||||
// params.put("strAppVersion", AppUtils.getAppVersionName());//应用版本名称
|
||||
// params.put("strAppBuild", String.valueOf(AppUtils.getAppVersionCode()));//应用版本号
|
||||
// } catch (Exception e) {
|
||||
// LogUtils.e("Public parameter acquisition failed");
|
||||
// }
|
||||
return params;
|
||||
}
|
||||
|
||||
}
|
@ -3,6 +3,7 @@ package com.sucstepsoft.cm_utils.core.retrofit_net.conver;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserInfoSPUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
|
||||
@ -36,6 +37,7 @@ public class CommInterceptor implements Interceptor {
|
||||
if ("POST".equals(method)) {
|
||||
RequestBody oldBody = oldRequest.body();
|
||||
if (oldBody instanceof FormBody) {
|
||||
LogUtils.e("FormBody");
|
||||
FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
int cityLevel = UserLgUtils.getCityLevel();
|
||||
if (cityLevel == -1) {
|
||||
@ -53,6 +55,7 @@ public class CommInterceptor implements Interceptor {
|
||||
postBodyString += ((postBodyString.length() > 0) ? "&" : "") + bodyToString(formBody);
|
||||
newRequestBuild.post(RequestBody.create(MediaType.parse("application/json;charset=UTF-8"), postBodyString));
|
||||
} else if (oldBody instanceof MultipartBody) {
|
||||
LogUtils.e("MultipartBody");
|
||||
MultipartBody oldBodyMultipart = (MultipartBody) oldBody;
|
||||
List<MultipartBody.Part> oldPartList = oldBodyMultipart.parts();
|
||||
MultipartBody.Builder builder = new MultipartBody.Builder();
|
||||
@ -77,6 +80,7 @@ public class CommInterceptor implements Interceptor {
|
||||
newRequestBuild = oldRequest.newBuilder();
|
||||
newRequestBuild.post(builder.build());
|
||||
} else {
|
||||
LogUtils.e("else");
|
||||
newRequestBuild = oldRequest.newBuilder();
|
||||
FormBody.Builder formBodyBuilder = new FormBody.Builder();
|
||||
formBodyBuilder.addEncoded("Content-Type", "application/json;charset=UTF-8");
|
||||
|
@ -0,0 +1,24 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
import okhttp3.Interceptor;
|
||||
import okhttp3.Response;
|
||||
|
||||
public class DownloadInterceptor implements Interceptor {
|
||||
|
||||
private DownloadListener listener;
|
||||
|
||||
public DownloadInterceptor(DownloadListener listener) {
|
||||
this.listener = listener;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Response intercept(Chain chain) throws IOException {
|
||||
Response originalResponse = chain.proceed(chain.request());
|
||||
|
||||
return originalResponse.newBuilder()
|
||||
.body(new DownloadResponseBody(originalResponse.body(), listener))
|
||||
.build();
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public interface DownloadListener {
|
||||
void onFinish(File file);
|
||||
|
||||
void onProgress(int progress, long downloadedLengthKb, long totalLengthKb);
|
||||
|
||||
void onFailed(String errMsg);
|
||||
}
|
@ -0,0 +1,68 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import android.util.Log;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.ResponseBody;
|
||||
import okio.Buffer;
|
||||
import okio.BufferedSource;
|
||||
import okio.ForwardingSource;
|
||||
import okio.Okio;
|
||||
import okio.Source;
|
||||
|
||||
|
||||
public class DownloadResponseBody extends ResponseBody {
|
||||
|
||||
private ResponseBody responseBody;
|
||||
private DownloadListener downloadListener;
|
||||
private BufferedSource bufferedSource;
|
||||
private Executor uiExecutor;
|
||||
|
||||
public DownloadResponseBody(ResponseBody responseBody, DownloadListener downloadListener) {
|
||||
this.responseBody = responseBody;
|
||||
this.downloadListener = downloadListener;
|
||||
uiExecutor = new MainThreadExecutor();
|
||||
}
|
||||
|
||||
@Override
|
||||
public MediaType contentType() {
|
||||
return responseBody.contentType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long contentLength() {
|
||||
return responseBody.contentLength();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BufferedSource source() {
|
||||
if (bufferedSource == null) {
|
||||
bufferedSource = Okio.buffer(source(responseBody.source()));
|
||||
}
|
||||
return bufferedSource;
|
||||
}
|
||||
|
||||
private Source source(Source source) {
|
||||
return new ForwardingSource(source) {
|
||||
long totalBytesRead = 0L;
|
||||
@Override
|
||||
public long read(Buffer sink, long byteCount) throws IOException {
|
||||
final long bytesRead = super.read(sink, byteCount);
|
||||
// read() returns the number of bytes read, or -1 if this source is exhausted.
|
||||
if (null != downloadListener) {
|
||||
totalBytesRead += bytesRead != -1 ? bytesRead : 0;
|
||||
Log.d("DownloadUtil", "已经下载:" + totalBytesRead + " 总长:" + responseBody.contentLength());
|
||||
final int progress = (int) (totalBytesRead * 100 / responseBody.contentLength());
|
||||
if (uiExecutor == null) {
|
||||
uiExecutor = new MainThreadExecutor();
|
||||
}
|
||||
uiExecutor.execute(() -> downloadListener.onProgress(progress,totalBytesRead/1024,responseBody.contentLength()/1024));
|
||||
}
|
||||
return bytesRead;
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Streaming;
|
||||
import retrofit2.http.Url;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
||||
public interface DownloadService {
|
||||
@Streaming
|
||||
@GET
|
||||
Call<ResponseBody> downloadWithDynamicUrl(@Url String fileUrl);
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Response;
|
||||
import retrofit2.Retrofit;
|
||||
|
||||
|
||||
public class DownloadUtil {
|
||||
private static final String TAG = "DownloadUtil";
|
||||
private static final int DEFAULT_TIMEOUT = 15;
|
||||
private final ExecutorService mExecutorService = Executors.newSingleThreadExecutor();
|
||||
private final MainThreadExecutor uiExecutor = new MainThreadExecutor();
|
||||
private OkHttpClient.Builder mBuilder;
|
||||
|
||||
private DownloadUtil() {
|
||||
}
|
||||
|
||||
public static DownloadUtil getInstance() {
|
||||
return SingletonHolder.INSTANCE;
|
||||
}
|
||||
|
||||
public void initConfig(OkHttpClient.Builder builder) {
|
||||
this.mBuilder = builder;
|
||||
}
|
||||
|
||||
/**
|
||||
* download file and show the progress
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
public void downloadFile(InputParameter inputParam, final DownloadListener listener) {
|
||||
|
||||
DownloadInterceptor interceptor = new DownloadInterceptor(listener);
|
||||
if (mBuilder != null) {
|
||||
mBuilder.addInterceptor(interceptor);
|
||||
} else {
|
||||
mBuilder = new OkHttpClient.Builder()
|
||||
.addInterceptor(interceptor)
|
||||
.retryOnConnectionFailure(true)
|
||||
.connectTimeout(DEFAULT_TIMEOUT, TimeUnit.SECONDS);
|
||||
}
|
||||
final DownloadService api = new Retrofit.Builder()
|
||||
.baseUrl(inputParam.getBaseUrl())
|
||||
.client(mBuilder.build())
|
||||
.build()
|
||||
.create(DownloadService.class);
|
||||
mExecutorService.execute(() -> {
|
||||
try {
|
||||
Response<ResponseBody> result = api.downloadWithDynamicUrl(inputParam.getRelativeUrl()).execute();
|
||||
File file = FileUtil.writeFile(inputParam.getLoadedFilePath(), result.body().byteStream());
|
||||
if (listener != null) {
|
||||
if (inputParam.isCallbackOnUiThread()) {
|
||||
uiExecutor.execute(() -> listener.onFinish(file));
|
||||
} else {
|
||||
listener.onFinish(file);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (listener != null) {
|
||||
if (inputParam.isCallbackOnUiThread()) {
|
||||
uiExecutor.execute(() -> listener.onFailed(e.getMessage()));
|
||||
} else {
|
||||
listener.onFailed(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private static class SingletonHolder {
|
||||
private static final DownloadUtil INSTANCE = new DownloadUtil();
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,43 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* Created by shusheng007
|
||||
*
|
||||
* @author Ben.Wang
|
||||
* @modifier
|
||||
* @createDate 2019/5/31 13:54
|
||||
* @description
|
||||
*/
|
||||
public final class FileUtil {
|
||||
|
||||
private FileUtil() {
|
||||
}
|
||||
|
||||
public static File writeFile(String filePath, InputStream input) {
|
||||
if (input == null)
|
||||
return null;
|
||||
File file = new File(filePath);
|
||||
try (FileOutputStream fos = new FileOutputStream(file);
|
||||
InputStream ins = input) {
|
||||
byte[] b = new byte[1024];
|
||||
int len;
|
||||
while ((len = ins.read(b)) != -1) {
|
||||
fos.write(b, 0, len);
|
||||
}
|
||||
fos.flush();
|
||||
} catch (FileNotFoundException e) {
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
|
||||
}
|
||||
return file;
|
||||
}
|
||||
}
|
@ -0,0 +1,70 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
/**
|
||||
* Created by Ben.Wang
|
||||
*
|
||||
* @author Ben.Wang
|
||||
* @modifier
|
||||
* @createDate 2020/1/13 14:02
|
||||
* @description
|
||||
*/
|
||||
public class InputParameter {
|
||||
private final String baseUrl;
|
||||
private final String relativeUrl;
|
||||
private final String loadedFilePath;
|
||||
private final boolean isCallbackOnUiThread;
|
||||
|
||||
private InputParameter(Builder builder) {
|
||||
this.baseUrl = builder.baseUrl;
|
||||
this.relativeUrl = builder.relativeUrl;
|
||||
this.loadedFilePath = builder.loadedFilePath;
|
||||
this.isCallbackOnUiThread = builder.isCallbackOnUiThread;
|
||||
}
|
||||
|
||||
|
||||
public String getBaseUrl() {
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
public String getRelativeUrl() {
|
||||
return relativeUrl;
|
||||
}
|
||||
|
||||
public String getLoadedFilePath() {
|
||||
return loadedFilePath;
|
||||
}
|
||||
|
||||
public boolean isCallbackOnUiThread() {
|
||||
return isCallbackOnUiThread;
|
||||
}
|
||||
|
||||
public static class Builder {
|
||||
String baseUrl;
|
||||
String relativeUrl;
|
||||
String loadedFilePath;
|
||||
boolean isCallbackOnUiThread;
|
||||
|
||||
public Builder(String baseUrl, String relativeUrl, String loadedFilePath) {
|
||||
this.baseUrl = baseUrl;
|
||||
this.relativeUrl = relativeUrl;
|
||||
this.loadedFilePath = loadedFilePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置 onFinish 与onFailed 是否回调在UI线程
|
||||
* 注意:onProcess永远回调在UI线程,不受此配置的影响
|
||||
*
|
||||
* @param callbackOnUiThread
|
||||
* @return
|
||||
*/
|
||||
public Builder setCallbackOnUiThread(boolean callbackOnUiThread) {
|
||||
isCallbackOnUiThread = callbackOnUiThread;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public InputParameter build() {
|
||||
return new InputParameter(this);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
package com.sucstepsoft.cm_utils.core.retrofit_net.down;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Looper;
|
||||
|
||||
import java.util.concurrent.Executor;
|
||||
|
||||
/**
|
||||
* Created by Ben.Wang
|
||||
*
|
||||
* @author Ben.Wang
|
||||
* @modifier
|
||||
* @createDate 2020/1/13 14:26
|
||||
* @description
|
||||
*/
|
||||
public class MainThreadExecutor implements Executor {
|
||||
private final Handler handler = new Handler(Looper.getMainLooper());
|
||||
|
||||
@Override
|
||||
public void execute(Runnable r) {
|
||||
handler.post(r);
|
||||
}
|
||||
}
|
@ -43,12 +43,14 @@ public class BottomDialogShareView extends Dialog {
|
||||
LinearLayout mLlShareQQ = view.findViewById(R.id.ll_share_qq);
|
||||
LinearLayout mLlShareWeibo = view.findViewById(R.id.ll_share_weibo);
|
||||
LinearLayout mLlShareWeChart = view.findViewById(R.id.ll_share_wechart);
|
||||
LinearLayout mLlShareMonent = view.findViewById(R.id.ll_share_wechart_monent);
|
||||
view.findViewById(R.id.tv_cancel).setOnClickListener(v -> this.dismiss());
|
||||
setCancelable(true);
|
||||
setCanceledOnTouchOutside(true);
|
||||
mLlShareWeChart.setOnClickListener(v -> choseType(1));
|
||||
mLlShareWeibo.setOnClickListener(v -> choseType(2));
|
||||
mLlShareQQ.setOnClickListener(v -> choseType(3));
|
||||
mLlShareMonent.setOnClickListener(v -> choseType(4));
|
||||
Window window = this.getWindow();
|
||||
window.setGravity(Gravity.BOTTOM);
|
||||
window.setWindowAnimations(R.style.Dialog_ChoseFile);
|
||||
@ -94,6 +96,9 @@ public class BottomDialogShareView extends Dialog {
|
||||
case 3:
|
||||
mListener.shareQQ();
|
||||
break;
|
||||
case 4:
|
||||
mListener.shareMoment();
|
||||
break;
|
||||
}
|
||||
}
|
||||
this.dismiss();
|
||||
@ -105,6 +110,8 @@ public class BottomDialogShareView extends Dialog {
|
||||
void shareWeibo();
|
||||
|
||||
void shareQQ();
|
||||
|
||||
void shareMoment();
|
||||
}
|
||||
|
||||
public static class DialogBuilder {
|
||||
|
@ -36,6 +36,7 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
|
||||
int type = a.getInteger(R.styleable.TypeFaceTextView_text_type_cus, 0);
|
||||
if (type == 1) {
|
||||
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
|
||||
setTextSize(15);
|
||||
} else {
|
||||
mTypeface = Typeface.DEFAULT;
|
||||
}
|
||||
@ -45,6 +46,7 @@ public class TypeFaceTextView extends androidx.appcompat.widget.AppCompatTextVie
|
||||
public void setTypeFaceType(int type) {
|
||||
if (type == 1) {
|
||||
mTypeface = Typeface.createFromAsset(getContext().getAssets(), "fonts/zhangti.TTF");
|
||||
setTextSize(15);
|
||||
} else {
|
||||
mTypeface = Typeface.DEFAULT;
|
||||
}
|
||||
|
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_share_monent.png
Normal file
BIN
cm_utils/src/main/res/drawable-xhdpi/ic_share_monent.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.2 KiB |
@ -43,6 +43,29 @@
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_share_wechart_monent"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:src="@drawable/ic_share_monent" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:text="微信朋友圈"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_share_weibo"
|
||||
android:layout_width="0dp"
|
||||
|
@ -142,6 +142,7 @@ public class ActivityDetailActivity extends BaseActivity {
|
||||
.withString("lng", mMDetalBean.getActivityAddressX())
|
||||
.withString("address", mMDetalBean.getActivityAddress())
|
||||
.withString("type", BaseUrlApi.TYPE_NAVIGATION)
|
||||
.withString("userCount", mMDetalBean.getEnrollCount() + "/" + mMDetalBean.getActivityUserNum())
|
||||
.navigation();
|
||||
}
|
||||
});
|
||||
|
@ -97,10 +97,11 @@ public class ActivitySignUpActivity extends BaseActivity {
|
||||
String endTime = intent.getStringExtra("endTime");
|
||||
String address = intent.getStringExtra("address");
|
||||
String photo = intent.getStringExtra("photo");
|
||||
String userCount= intent.getStringExtra("userCount");
|
||||
LogUtils.e(photo);
|
||||
mTvSignEndTime.setText(startTime + "至\r\n" + endTime);
|
||||
mTvAddress.setText("" + address);
|
||||
mTvPepNum.setText("200人");
|
||||
mTvPepNum.setText(userCount);
|
||||
RoundedCornersTransform roundedCornersTransform = new RoundedCornersTransform(mActivity, ConvertUtils.dp2px(5));
|
||||
roundedCornersTransform.setNeedCorner(true, true, true, true);
|
||||
RequestOptions options = new RequestOptions()
|
||||
|
@ -437,7 +437,6 @@ public class CulturalSharePublishActivity extends BaseActivity {
|
||||
}
|
||||
mAddPhotoAdapter.notifyDataSetChanged();
|
||||
mCurrentBean = null;
|
||||
ToastUtils.showShort("上传成功");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -72,7 +72,7 @@ public class MineShareListActivity extends BaseActivity {
|
||||
super.initData();
|
||||
mBind = ButterKnife.bind(this);
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvBaseTitle.setText("文化分享");
|
||||
mTvBaseTitle.setText("我的分享");
|
||||
mAdapter = new CulturalShareAdapter(mActivity, mNewsDatas, true);
|
||||
mRlvShares.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
|
||||
mRlvShares.setAdapter(mAdapter);
|
||||
|
@ -1,13 +1,12 @@
|
||||
package com.tengshisoft.modulecultural.activitys;
|
||||
|
||||
import android.Manifest;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.Html;
|
||||
@ -15,19 +14,15 @@ import android.text.TextUtils;
|
||||
import android.view.Gravity;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.Switch;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.beloo.widget.chipslayoutmanager.ChipsLayoutManager;
|
||||
import com.beloo.widget.chipslayoutmanager.gravity.IChildGravityResolver;
|
||||
import com.beloo.widget.chipslayoutmanager.layouter.breaker.IRowBreaker;
|
||||
import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.builder.TimePickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
@ -35,7 +30,6 @@ import com.bigkoo.pickerview.view.TimePickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.constant.PermissionConstants;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AddPhotoBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
@ -43,25 +37,20 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.ButtomDialogView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.xtablayout.XTabLayout;
|
||||
import com.sucstepsoft.cm_utils.utils.AppUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.PermissionUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.RegexUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.StringUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
import com.tengshisoft.modulecultural.R;
|
||||
import com.tengshisoft.modulecultural.R2;
|
||||
import com.tengshisoft.modulecultural.adapter.ServiceTypeAdapter;
|
||||
import com.tengshisoft.modulecultural.adapter.TeamAdapter;
|
||||
import com.tengshisoft.modulecultural.bean.VolunteerPostBody;
|
||||
import com.tengshisoft.modulecultural.net.CulturalApi;
|
||||
import com.yanzhenjie.recyclerview.widget.DefaultItemDecoration;
|
||||
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
||||
import java.io.File;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -69,12 +58,7 @@ import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
||||
import androidx.annotation.IntRange;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.core.content.FileProvider;
|
||||
import androidx.recyclerview.widget.GridLayoutManager;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
@ -84,7 +68,6 @@ import io.reactivex.android.schedulers.AndroidSchedulers;
|
||||
import io.reactivex.disposables.Disposable;
|
||||
import io.reactivex.schedulers.Schedulers;
|
||||
import okhttp3.MediaType;
|
||||
import okhttp3.MultipartBody;
|
||||
import okhttp3.RequestBody;
|
||||
import top.zibin.luban.Luban;
|
||||
import top.zibin.luban.OnCompressListener;
|
||||
@ -175,6 +158,16 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
RadioButton mRbTrue;
|
||||
@BindView(R2.id.rb_false)
|
||||
RadioButton mRbFalse;
|
||||
@BindView(R2.id.tv_vocation_content)
|
||||
TextView mTvVocationContent;
|
||||
@BindView(R2.id.et_unit_content)
|
||||
EditText mEtUnitContent;
|
||||
@BindView(R2.id.et_like_content)
|
||||
EditText mEtLikeContent;
|
||||
@BindView(R2.id.et_resume_content)
|
||||
EditText mEtResumeContent;
|
||||
@BindView(R2.id.et_remark_content)
|
||||
EditText mEtRemarkContent;
|
||||
private Unbinder mBind;
|
||||
private TimePickerView mTimePicker;
|
||||
private OptionsPickerView<BaseDictionaryBean> mPiPicker;//政治面貌
|
||||
@ -185,6 +178,7 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
private OptionsPickerView<BaseDictionaryBean> mAddressPicker;//地址
|
||||
private OptionsPickerView<BaseDictionaryBean> mServiceAreaPicker;//服务区域
|
||||
|
||||
|
||||
private List<BaseDictionaryBean> mPiList;//政治面貌
|
||||
private List<BaseDictionaryBean> mNationList;//民族
|
||||
private List<BaseDictionaryBean> mNativeList;//籍贯
|
||||
@ -192,6 +186,8 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
private List<BaseDictionaryBean> mWorkList;//从业状况
|
||||
private List<BaseDictionaryBean> mAddressList;//地址
|
||||
private List<BaseDictionaryBean> mServiceAreaList;//服务区域
|
||||
private List<BaseDictionaryBean> mVocationList;//职业数据
|
||||
private OptionsPickerView<BaseDictionaryBean> mVocationPicker;//职业
|
||||
private List<BaseDictionaryBean> mServiceTypeList = new ArrayList<>();
|
||||
private List<BaseDictionaryBean> mServiceTypeAreaList = new ArrayList<>();
|
||||
private String mPiId;//选中的政治面貌
|
||||
@ -201,6 +197,7 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
private String mWorkId;//从业状况
|
||||
private String mAddressId;//地址
|
||||
private String mServiceAreaId;//服务区域
|
||||
private String mVocationId;//职业
|
||||
private static final int TYPE_PI = 123;
|
||||
private static final int TYPE_NATION = 223;
|
||||
private static final int TYPE_NATIVE = 333;
|
||||
@ -210,6 +207,7 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
private static final int TYPE_SERVICE_TYPE = 733;
|
||||
private static final int TYPE_SERVICE_DOMAIN = 833;
|
||||
private static final int TYPE_SERVICE_AREA = 933;
|
||||
private static final int TYPE_VOCATION = 101;
|
||||
private ServiceTypeAdapter mServiceTypeAdapter;
|
||||
private ServiceTypeAdapter mServiceTypeAreaAdapter;
|
||||
private boolean isSuffer = true;
|
||||
@ -243,6 +241,8 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<BaseSuccessBean>() {
|
||||
|
||||
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
@ -258,6 +258,7 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
} else {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvBirthdayContent.setOnClickListener(v -> showDatePicker());
|
||||
mTvVocationContent.setOnClickListener(v -> showVocationPicker());
|
||||
mIvUserIcon.setOnClickListener(v -> checkCameraPermission());
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_TYPE, TYPE_SERVICE_TYPE);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_DOMAIN, TYPE_SERVICE_DOMAIN);
|
||||
@ -308,9 +309,28 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
* @return
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
if (TextUtils.isEmpty(mVocationId)) {
|
||||
ToastUtils.showShort("请选择职业");
|
||||
return false;
|
||||
}
|
||||
String unitName = mEtUnitContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(unitName)) {
|
||||
ToastUtils.showShort("请输入工作单位及职务");
|
||||
return false;
|
||||
}
|
||||
String like = mEtLikeContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(like)) {
|
||||
ToastUtils.showShort("请输入特长爱好");
|
||||
return false;
|
||||
}
|
||||
String resume = mEtResumeContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(resume)) {
|
||||
ToastUtils.showShort("请输入个人简历");
|
||||
return false;
|
||||
}
|
||||
List<String> checkIds = mServiceTypeAdapter.getCheckIds();
|
||||
if (checkIds == null || checkIds.size() <= 0) {
|
||||
ToastUtils.showShort("请选择服务类型");
|
||||
ToastUtils.showShort("请选择服务意向");
|
||||
return false;
|
||||
}
|
||||
List<String> checkIds1 = mServiceTypeAreaAdapter.getCheckIds();
|
||||
@ -384,6 +404,11 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
mServiceAreaList = beans;
|
||||
showServicePicker();
|
||||
break;
|
||||
case TYPE_VOCATION:
|
||||
//职业
|
||||
mVocationList = beans;
|
||||
showVocationPicker();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -405,20 +430,47 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
*/
|
||||
private void showServicePicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
mServiceAreaPicker = new OptionsPickerBuilder(RegisterVolunteerSingleActivity.this, (options1, options2, options3, v) -> {
|
||||
mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
mTvServiceAreaContent.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
.withString("type", "134")
|
||||
.navigation(mActivity, 333);
|
||||
// if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
// mServiceAreaPicker = new OptionsPickerBuilder(RegisterVolunteerSingleActivity.this, (options1, options2, options3, v) -> {
|
||||
|
||||
// }).setTitleText("请选择")
|
||||
// .setCancelColor(Color.parseColor("#1189FF"))
|
||||
// .setSubmitColor(Color.parseColor("#1189FF"))
|
||||
// .setTitleColor(Color.parseColor("#1189FF"))
|
||||
// .build();
|
||||
// mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
// mServiceAreaPicker.show();
|
||||
// } else {
|
||||
// if (mServiceAreaList == null) {
|
||||
// getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
// } else {
|
||||
// ToastUtils.showShort("暂无数据");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示职业选择框
|
||||
*/
|
||||
private void showVocationPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mVocationList != null && mVocationList.size() > 0) {
|
||||
mVocationPicker = new OptionsPickerBuilder(RegisterVolunteerSingleActivity.this, (option1, p2, p3, v) -> {
|
||||
mVocationId = mVocationList.get(option1).getDictionaryId();
|
||||
mTvVocationContent.setText(mVocationList.get(option1).getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
mServiceAreaPicker.show();
|
||||
mVocationPicker.setPicker(mVocationList);
|
||||
mVocationPicker.show();
|
||||
} else {
|
||||
if (mServiceAreaList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
if (mVocationList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_VOCATION_ID, TYPE_VOCATION);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
@ -642,6 +694,11 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (resultCode == 333) {
|
||||
if (requestCode == 333) {
|
||||
mServiceAreaId = data.getStringExtra("chooseCityCode");
|
||||
mTvServiceAreaContent.setText(data.getStringExtra("chooseCity"));
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
@ -784,7 +841,7 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
VolunteerPostBody info = buildSubmitBean();
|
||||
Gson gson = new Gson();
|
||||
String obj = gson.toJson(info);
|
||||
RequestBody body = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), obj);
|
||||
RetrofitManager.getInstance()
|
||||
.create(CulturalApi.class)
|
||||
.doRegisterVolunteer(body, UserLgUtils.getToken())
|
||||
@ -823,6 +880,18 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
|
||||
private VolunteerPostBody buildSubmitBean() {
|
||||
VolunteerPostBody body = new VolunteerPostBody();
|
||||
String resume = mEtResumeContent.getText().toString().trim();
|
||||
String like = mEtLikeContent.getText().toString().trim();
|
||||
String work = mEtUnitContent.getText().toString().trim();
|
||||
|
||||
body.setCv(resume);
|
||||
body.setHobby(like);
|
||||
body.setWork(work);
|
||||
body.setOccupation(mVocationId);
|
||||
String remark = mEtRemarkContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(remark)) {
|
||||
body.setRemark(remark);
|
||||
}
|
||||
if (!TextUtils.isEmpty(mServiceAreaId)) {
|
||||
body.setServiceArea(mServiceAreaId);
|
||||
}
|
||||
@ -860,5 +929,4 @@ public class RegisterVolunteerSingleActivity extends BaseActivity {
|
||||
mBind.unbind();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -114,24 +114,28 @@ public class RegisterVolunteerTeamActivity extends BaseActivity {
|
||||
*/
|
||||
private void showServicePicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
mServiceAreaPicker = new OptionsPickerBuilder(RegisterVolunteerTeamActivity.this, (options1, options2, options3, v) -> {
|
||||
mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
mTvArea.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
mServiceAreaPicker.show();
|
||||
} else {
|
||||
if (mServiceAreaList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
.withString("type", "123")
|
||||
.navigation(mActivity, 333);
|
||||
// if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
// mServiceAreaPicker = new OptionsPickerBuilder(RegisterVolunteerTeamActivity.this, (options1, options2, options3, v) -> {
|
||||
// mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
// mTvArea.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
// }).setTitleText("请选择")
|
||||
// .setCancelColor(Color.parseColor("#1189FF"))
|
||||
// .setSubmitColor(Color.parseColor("#1189FF"))
|
||||
// .setTitleColor(Color.parseColor("#1189FF"))
|
||||
// .build();
|
||||
// mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
// mServiceAreaPicker.show();
|
||||
// } else {
|
||||
// if (mServiceAreaList == null) {
|
||||
// getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
// } else {
|
||||
// ToastUtils.showShort("暂无数据");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -145,6 +149,9 @@ public class RegisterVolunteerTeamActivity extends BaseActivity {
|
||||
names += mChooseData.get(i).getName() + ",";
|
||||
}
|
||||
mTvTeamMemberContent.setText(names);
|
||||
} else if (resultCode == 333) {
|
||||
mTvArea.setText(data.getStringExtra("chooseCity"));
|
||||
mServiceAreaId = data.getStringExtra("chooseCityCode");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -59,7 +59,7 @@ public class TeamEditActivity extends BaseActivity {
|
||||
@BindView(R2.id.tv_team_member_title)
|
||||
TextView mTvTeamMemberTitle;
|
||||
@BindView(R2.id.tv_team_member_content)
|
||||
TextView mTvTeamMemberContent;
|
||||
EditText mEtCount;
|
||||
@BindView(R2.id.tv_area_title)
|
||||
TextView mTvAreaTitle;
|
||||
@BindView(R2.id.tv_team_desc_title)
|
||||
@ -90,10 +90,10 @@ public class TeamEditActivity extends BaseActivity {
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
mId = getIntent().getStringExtra("id");
|
||||
getTeamDetail(mId);
|
||||
mTvTeamMemberContent.setOnClickListener(v -> ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_CULTURAL_CHOOSE_MEMBER)
|
||||
.withSerializable("beans", mChooseUserIds)
|
||||
.navigation(mActivity, 20));
|
||||
// mTvTeamMemberContent.setOnClickListener(v -> ARouter.getInstance()
|
||||
// .build(PathConfig.PATH_MODULE_CULTURAL_CHOOSE_MEMBER)
|
||||
// .withSerializable("beans", mChooseUserIds)
|
||||
// .navigation(mActivity, 20));
|
||||
mBtnRegisterTeam.setOnClickListener(v -> doUpdate());
|
||||
mTvArea.setOnClickListener(v -> showServicePicker());
|
||||
}
|
||||
@ -142,24 +142,27 @@ public class TeamEditActivity extends BaseActivity {
|
||||
*/
|
||||
private void showServicePicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
mServiceAreaPicker = new OptionsPickerBuilder(TeamEditActivity.this, (options1, options2, options3, v) -> {
|
||||
mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
mTvArea.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
mServiceAreaPicker.show();
|
||||
} else {
|
||||
if (mServiceAreaList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
.withString("type", "134")
|
||||
.navigation(mActivity, 333);
|
||||
// if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
// mServiceAreaPicker = new OptionsPickerBuilder(TeamEditActivity.this, (options1, options2, options3, v) -> {
|
||||
// mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
// mTvArea.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
// }).setTitleText("请选择")
|
||||
// .setCancelColor(Color.parseColor("#1189FF"))
|
||||
// .setSubmitColor(Color.parseColor("#1189FF"))
|
||||
// .setTitleColor(Color.parseColor("#1189FF"))
|
||||
// .build();
|
||||
// mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
// mServiceAreaPicker.show();
|
||||
// } else {
|
||||
// if (mServiceAreaList == null) {
|
||||
// getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
// } else {
|
||||
// ToastUtils.showShort("暂无数据");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
|
||||
@ -168,6 +171,11 @@ public class TeamEditActivity extends BaseActivity {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
if (resultCode == 10) {
|
||||
buildChooseData(data);
|
||||
} else if (resultCode == 333) {
|
||||
if (requestCode == 333) {
|
||||
mServiceAreaId = data.getStringExtra("chooseCityCode");
|
||||
mTvArea.setText(data.getStringExtra("chooseCity"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -202,11 +210,11 @@ public class TeamEditActivity extends BaseActivity {
|
||||
for (int i = 0; i < mChooseData.size(); i++) {
|
||||
mChooseUserNames.add(mChooseData.get(i).getName());
|
||||
}
|
||||
String names = "";
|
||||
for (int i = 0; i < mChooseUserNames.size(); i++) {
|
||||
names += mChooseUserNames.get(i) + ",";
|
||||
}
|
||||
mTvTeamMemberContent.setText(names);
|
||||
// String names = "";
|
||||
// for (int i = 0; i < mChooseUserNames.size(); i++) {
|
||||
// names += mChooseUserNames.get(i) + ",";
|
||||
// }
|
||||
// mTvTeamMemberContent.setText(names);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -300,19 +308,21 @@ public class TeamEditActivity extends BaseActivity {
|
||||
TeamBody body = new TeamBody();
|
||||
String name = mEtTeamName.getText().toString().trim();
|
||||
String desc = mEtTeamDescContent.getText().toString().trim();
|
||||
String count = mEtCount.getText().toString().trim();
|
||||
body.setTeamName(name);
|
||||
body.setTeamWatchword(desc);
|
||||
body.setTeamArea(mServiceAreaId);
|
||||
String ids = "";
|
||||
body.setCount(count);
|
||||
// String ids = "";
|
||||
String names = "";
|
||||
for (int i = 0; i < mChooseUserIds.size(); i++) {
|
||||
ids += mChooseUserIds.get(i) + "_";
|
||||
}
|
||||
for (int i = 0; i < mChooseUserNames.size(); i++) {
|
||||
names += mChooseUserNames.get(i) + ",";
|
||||
}
|
||||
body.setTeamMemberId(ids);
|
||||
body.setTeamMemberName(names);
|
||||
// for (int i = 0; i < mChooseUserIds.size(); i++) {
|
||||
// ids += mChooseUserIds.get(i) + "_";
|
||||
// }
|
||||
// for (int i = 0; i < mChooseUserNames.size(); i++) {
|
||||
// names += mChooseUserNames.get(i) + ",";
|
||||
// }
|
||||
// body.setTeamMemberId(ids);
|
||||
// body.setTeamMemberName(names);
|
||||
return body;
|
||||
}
|
||||
|
||||
@ -331,10 +341,15 @@ public class TeamEditActivity extends BaseActivity {
|
||||
ToastUtils.showShort("请选择所属区域");
|
||||
return false;
|
||||
}
|
||||
if (mChooseUserIds == null || mChooseUserIds.size() <= 0) {
|
||||
ToastUtils.showShort("请选择团队成员");
|
||||
String count = mEtCount.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(count)) {
|
||||
ToastUtils.showShort("请输入团队人数");
|
||||
return false;
|
||||
}
|
||||
// if (mChooseUserIds == null || mChooseUserIds.size() <= 0) {
|
||||
// ToastUtils.showShort("请选择团队成员");
|
||||
// return false;
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -347,7 +362,7 @@ public class TeamEditActivity extends BaseActivity {
|
||||
mTvArea.setText(TextUtils.isEmpty(teamDetailBean.getTeamAreaDictionaryName()) ? "" : teamDetailBean.getTeamAreaDictionaryName());
|
||||
mEtTeamName.setText(TextUtils.isEmpty(teamDetailBean.getTeamName()) ? "" : teamDetailBean.getTeamName());
|
||||
mEtTeamDescContent.setText(TextUtils.isEmpty(teamDetailBean.getTeamWatchword()) ? "" : teamDetailBean.getTeamWatchword());
|
||||
mTvTeamMemberContent.setText(TextUtils.isEmpty(teamDetailBean.getMemberName()) ? "" : teamDetailBean.getMemberName());
|
||||
mEtCount.setText(TextUtils.isEmpty(teamDetailBean.getCount()) ? "" : teamDetailBean.getCount());
|
||||
if (!TextUtils.isEmpty(teamDetailBean.getMemberName())) {
|
||||
String[] split = teamDetailBean.getMemberName().split(",");
|
||||
for (int i = 0; i < split.length; i++) {
|
||||
|
@ -324,6 +324,7 @@ public class VolunteerActivityDetailActivity extends BaseActivity {
|
||||
}
|
||||
if ("enroll".equals(detailBean.getStatus())) {
|
||||
//需要报名
|
||||
mBtnConfirm.setVisibility(View.VISIBLE);
|
||||
mTvState.setVisibility(View.VISIBLE);
|
||||
mTvActivityLog.setVisibility(View.VISIBLE);
|
||||
mTvState.setText("报名中");
|
||||
@ -334,19 +335,23 @@ public class VolunteerActivityDetailActivity extends BaseActivity {
|
||||
mTvActivityLog.setVisibility(View.VISIBLE);
|
||||
mTvState.setVisibility(View.VISIBLE);
|
||||
mTvState.setText("进行中");
|
||||
mBtnConfirm.setVisibility(View.GONE);
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
} else if ("over".equals(detailBean.getStatus())) {
|
||||
mTvActivityLog.setVisibility(View.VISIBLE);
|
||||
mTvState.setVisibility(View.VISIBLE);
|
||||
mTvState.setText("活动已结束");
|
||||
mBtnConfirm.setVisibility(View.GONE);
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
} else if ("stop".equals(detailBean.getStatus())) {
|
||||
mTvActivityLog.setVisibility(View.VISIBLE);
|
||||
mTvState.setVisibility(View.VISIBLE);
|
||||
mTvState.setText("人数已满");
|
||||
mBtnConfirm.setVisibility(View.GONE);
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
} else if ("isEnroll".equals(detailBean.getStatus())) {
|
||||
isSignUp = true;
|
||||
mBtnConfirm.setVisibility(View.VISIBLE);
|
||||
mBtnConfirm.setText("取消报名");
|
||||
mTvActivityLog.setVisibility(View.VISIBLE);
|
||||
mTvState.setVisibility(View.VISIBLE);
|
||||
@ -368,6 +373,7 @@ public class VolunteerActivityDetailActivity extends BaseActivity {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
mBtnConfirm.setVisibility(View.GONE);
|
||||
mTvPublish.setVisibility(View.GONE);
|
||||
}
|
||||
} else {
|
||||
|
@ -43,7 +43,7 @@ public class VolunteerManageActivity extends BaseActivity {
|
||||
public void initData() {
|
||||
super.initData();
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("自愿者团队");
|
||||
mTvBaseTitle.setText("志愿者团队");
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("创建");
|
||||
|
@ -10,6 +10,7 @@ import android.widget.TextView;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
@ -54,6 +55,16 @@ public class VolunteerUserInfoActivity extends BaseActivity {
|
||||
TextView mTvExpertAreaTitle;
|
||||
@BindView(R2.id.tv_expert_area_content)
|
||||
TextView mTvExpertAreaContent;
|
||||
@BindView(R2.id.tv_unit)
|
||||
TextView mTvUnit;
|
||||
@BindView(R2.id.tv_vocation)
|
||||
TextView mTvVocation;
|
||||
@BindView(R2.id.tv_resume)
|
||||
TextView mTvResume;
|
||||
@BindView(R2.id.tv_like)
|
||||
TextView mTvLike;
|
||||
@BindView(R2.id.tv_remark)
|
||||
TextView mTvRemark;
|
||||
private Unbinder mBind;
|
||||
private static final int TYPE_SERVICE_TYPE = 733;
|
||||
private static final int TYPE_SERVICE_DOMAIN = 833;
|
||||
@ -103,10 +114,15 @@ public class VolunteerUserInfoActivity extends BaseActivity {
|
||||
} else {
|
||||
mRbFalse.setChecked(true);
|
||||
}
|
||||
mTvUnit.setText(mDetalBean.getWork());
|
||||
mTvRemark.setText(mDetalBean.getRemark());
|
||||
mTvLike.setText(mDetalBean.getHobby());
|
||||
mTvResume.setText(mDetalBean.getCv());
|
||||
mTvVocation.setText(mDetalBean.getOccupationName());
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_TYPE, TYPE_SERVICE_TYPE);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_DOMAIN, TYPE_SERVICE_DOMAIN);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
getAreaDetail(volunteerInfo.getServiceArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -121,6 +137,35 @@ public class VolunteerUserInfoActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
private void getAreaDetail(String serviceArea) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getAreaListByPid(serviceArea)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<AreaBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(AreaBean areaBean) {
|
||||
mTvServiceAreaContent.setText(areaBean.getAreaName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Id获取字典List
|
||||
*
|
||||
|
@ -1,11 +1,16 @@
|
||||
package com.tengshisoft.modulecultural.activitys;
|
||||
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.database.Cursor;
|
||||
import android.graphics.Color;
|
||||
import android.net.Uri;
|
||||
import android.os.Bundle;
|
||||
import android.provider.MediaStore;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.Button;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.EditText;
|
||||
import android.widget.RadioButton;
|
||||
import android.widget.RadioGroup;
|
||||
import android.widget.TextView;
|
||||
@ -17,12 +22,15 @@ import com.bigkoo.pickerview.builder.OptionsPickerBuilder;
|
||||
import com.bigkoo.pickerview.view.OptionsPickerView;
|
||||
import com.google.gson.Gson;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.beans.AreaBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseDictionaryBean;
|
||||
import com.sucstepsoft.cm_utils.core.beans.BaseSuccessBean;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.api.BaseApiService;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.ExceptionHandler;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
@ -71,10 +79,24 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
RecyclerView mRlvExportAreaContent;
|
||||
@BindView(R2.id.btn_register)
|
||||
Button mBtnRegister;
|
||||
@BindView(R2.id.tv_vocation_content)
|
||||
TextView mTvVocationContent;
|
||||
@BindView(R2.id.et_unit_content)
|
||||
EditText mEtUnitContent;
|
||||
@BindView(R2.id.et_like_content)
|
||||
EditText mEtLikeContent;
|
||||
@BindView(R2.id.et_resume_content)
|
||||
EditText mEtResumeContent;
|
||||
@BindView(R2.id.et_remark_content)
|
||||
EditText mEtRemarkContent;
|
||||
private OptionsPickerView<BaseDictionaryBean> mServiceAreaPicker;//服务区域
|
||||
private List<BaseDictionaryBean> mServiceAreaList;//服务区域
|
||||
private List<BaseDictionaryBean> mServiceTypeList = new ArrayList<>();
|
||||
private List<BaseDictionaryBean> mServiceTypeAreaList = new ArrayList<>();
|
||||
private String mVocationId;//职业
|
||||
private List<BaseDictionaryBean> mVocationList;//职业数据
|
||||
private OptionsPickerView<BaseDictionaryBean> mVocationPicker;//职业
|
||||
private static final int TYPE_VOCATION = 101;
|
||||
private Unbinder mBind;
|
||||
private static final int TYPE_SERVICE_TYPE = 733;
|
||||
private static final int TYPE_SERVICE_DOMAIN = 833;
|
||||
@ -168,6 +190,25 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
* @return
|
||||
*/
|
||||
private boolean checkParams() {
|
||||
if (TextUtils.isEmpty(mVocationId)) {
|
||||
ToastUtils.showShort("请选择职业");
|
||||
return false;
|
||||
}
|
||||
String unitName = mEtUnitContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(unitName)) {
|
||||
ToastUtils.showShort("请输入工作单位及职务");
|
||||
return false;
|
||||
}
|
||||
String like = mEtLikeContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(like)) {
|
||||
ToastUtils.showShort("请输入特长爱好");
|
||||
return false;
|
||||
}
|
||||
String resume = mEtResumeContent.getText().toString().trim();
|
||||
if (TextUtils.isEmpty(resume)) {
|
||||
ToastUtils.showShort("请输入个人简历");
|
||||
return false;
|
||||
}
|
||||
List<String> checkIds = mServiceTypeAdapter.getCheckIds();
|
||||
if (checkIds == null || checkIds.size() <= 0) {
|
||||
ToastUtils.showShort("请选择服务类型");
|
||||
@ -183,6 +224,18 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
|
||||
private VolunteerPostBody buildSubmitBean() {
|
||||
VolunteerPostBody body = new VolunteerPostBody();
|
||||
String resume = mEtResumeContent.getText().toString().trim();
|
||||
String like = mEtLikeContent.getText().toString().trim();
|
||||
String work = mEtUnitContent.getText().toString().trim();
|
||||
|
||||
body.setCv(resume);
|
||||
body.setHobby(like);
|
||||
body.setWork(work);
|
||||
body.setOccupation(mVocationId);
|
||||
String remark = mEtRemarkContent.getText().toString().trim();
|
||||
if (!TextUtils.isEmpty(remark)) {
|
||||
body.setRemark(remark);
|
||||
}
|
||||
if (!TextUtils.isEmpty(mServiceAreaId)) {
|
||||
body.setServiceArea(mServiceAreaId);
|
||||
}
|
||||
@ -233,10 +286,17 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
} else {
|
||||
mRbFalse.setChecked(true);
|
||||
}
|
||||
mTvVocationContent.setOnClickListener(v -> showVocationPicker());
|
||||
mVocationId = volunteerInfo.getOccupation();
|
||||
mTvVocationContent.setText(volunteerInfo.getOccupationName());
|
||||
mEtUnitContent.setText(mDetalBean.getWork());
|
||||
mEtRemarkContent.setText(mDetalBean.getRemark());
|
||||
mEtLikeContent.setText(mDetalBean.getHobby());
|
||||
mEtResumeContent.setText(mDetalBean.getCv());
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_TYPE, TYPE_SERVICE_TYPE);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_DOMAIN, TYPE_SERVICE_DOMAIN);
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
getAreaDetail(volunteerInfo.getServiceArea());
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -251,6 +311,72 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 显示职业选择框
|
||||
*/
|
||||
private void showVocationPicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mVocationList != null && mVocationList.size() > 0) {
|
||||
mVocationPicker = new OptionsPickerBuilder(VolunteerUserInfoEditActivity.this, (option1, p2, p3, v) -> {
|
||||
mVocationId = mVocationList.get(option1).getDictionaryId();
|
||||
mTvVocationContent.setText(mVocationList.get(option1).getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mVocationPicker.setPicker(mVocationList);
|
||||
mVocationPicker.show();
|
||||
} else {
|
||||
if (mVocationList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_VOCATION_ID, TYPE_VOCATION);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void getAreaDetail(String serviceArea) {
|
||||
RetrofitManager.getInstance()
|
||||
.create(BaseApiService.class)
|
||||
.getAreaListByPid(serviceArea)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Observer<AreaBean>() {
|
||||
@Override
|
||||
public void onSubscribe(Disposable d) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNext(AreaBean areaBean) {
|
||||
mServiceAreaId = areaBean.getAreaId();
|
||||
mTvServiceAreaContent.setText(areaBean.getAreaName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onError(Throwable e) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
if (resultCode == 333) {
|
||||
if (requestCode == 333) {
|
||||
mServiceAreaId = data.getStringExtra("chooseCityCode");
|
||||
mTvServiceAreaContent.setText(data.getStringExtra("chooseCity"));
|
||||
}
|
||||
}
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据Id获取字典List
|
||||
*
|
||||
@ -302,6 +428,11 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
}
|
||||
}
|
||||
break;
|
||||
case TYPE_VOCATION:
|
||||
//职业
|
||||
mVocationList = beans;
|
||||
showVocationPicker();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -322,24 +453,27 @@ public class VolunteerUserInfoEditActivity extends BaseActivity {
|
||||
*/
|
||||
private void showServicePicker() {
|
||||
hideSoftKeyboard();
|
||||
if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
mServiceAreaPicker = new OptionsPickerBuilder(VolunteerUserInfoEditActivity.this, (options1, options2, options3, v) -> {
|
||||
mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
mTvServiceAreaContent.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
}).setTitleText("请选择")
|
||||
.setCancelColor(Color.parseColor("#1189FF"))
|
||||
.setSubmitColor(Color.parseColor("#1189FF"))
|
||||
.setTitleColor(Color.parseColor("#1189FF"))
|
||||
.build();
|
||||
mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
mServiceAreaPicker.show();
|
||||
} else {
|
||||
if (mServiceAreaList == null) {
|
||||
getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
} else {
|
||||
ToastUtils.showShort("暂无数据");
|
||||
}
|
||||
}
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_CHOOSE_CITY)
|
||||
.withString("type", "134")
|
||||
.navigation(mActivity, 333);
|
||||
// if (mServiceAreaList != null && mServiceAreaList.size() > 0) {
|
||||
// mServiceAreaPicker = new OptionsPickerBuilder(VolunteerUserInfoEditActivity.this, (options1, options2, options3, v) -> {
|
||||
// mServiceAreaId = mServiceAreaList.get(options1).getDictionaryId();
|
||||
// mTvServiceAreaContent.setText(mServiceAreaList.get(options1).getDictionaryName());
|
||||
// }).setTitleText("请选择")
|
||||
// .setCancelColor(Color.parseColor("#1189FF"))
|
||||
// .setSubmitColor(Color.parseColor("#1189FF"))
|
||||
// .setTitleColor(Color.parseColor("#1189FF"))
|
||||
// .build();
|
||||
// mServiceAreaPicker.setPicker(mServiceAreaList);
|
||||
// mServiceAreaPicker.show();
|
||||
// } else {
|
||||
// if (mServiceAreaList == null) {
|
||||
// getDictionaryBeanList(PathConfig.DID_SERVICE_AREA, TYPE_SERVICE_AREA);
|
||||
// } else {
|
||||
// ToastUtils.showShort("暂无数据");
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -55,9 +55,10 @@ public class TeamMemberAdapter extends BaseRecyclerAdapter<TeamMemberBean.RowsBe
|
||||
} else {
|
||||
teamMemberHolder.mBtnStatus.setVisibility(View.VISIBLE);
|
||||
if (mData.get(i).getStatus().equals("0")) {
|
||||
//审核通过
|
||||
//申请状态
|
||||
teamMemberHolder.mBtnStatus.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
//审核通过
|
||||
teamMemberHolder.mBtnStatus.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
teamMemberHolder.mBtnStatus.setOnClickListener(v -> mOnManageMember.manage(mData.get(i)));
|
||||
|
@ -9,153 +9,97 @@ package com.tengshisoft.modulecultural.bean;
|
||||
public class VolunteerInfo {
|
||||
|
||||
/**
|
||||
* addressAbout : string
|
||||
* addressDetail : string
|
||||
* age : 0
|
||||
* backSex : string
|
||||
* birthday : string
|
||||
* highestEducation : string
|
||||
* idCard : string
|
||||
* microBlog : string
|
||||
* name : string
|
||||
* nation : string
|
||||
* nativePlace : string
|
||||
* openExperience : 0
|
||||
* phone : string
|
||||
* photo : string
|
||||
* politicalOutlook : string
|
||||
* qq : string
|
||||
* serviceArea : string
|
||||
* serviceIndustry : string
|
||||
* serviceType : string
|
||||
* sex : 0
|
||||
* userId : string
|
||||
* volunteerId : string
|
||||
* weChat : string
|
||||
* work : string
|
||||
* zipCode : string
|
||||
* volunteerId : dd0cca82-05e3-491d-bd60-a902d8cb2cb3
|
||||
* serviceArea : 641512
|
||||
* serviceCity :
|
||||
* serviceCounty :
|
||||
* phone : 15661078692
|
||||
* nativePlace :
|
||||
* addressAbout :
|
||||
* birthday : 请选择
|
||||
* addressDetail :
|
||||
* highestEducation :
|
||||
* name :
|
||||
* politicalOutlook :
|
||||
* nation :
|
||||
* serviceIndustry : 842e2cc9-e6d2-405c-a90a-58d8637abe97
|
||||
* serviceType : 1d3e89a4-9216-4ee5-8e92-4468e0af2996
|
||||
* serviceTypeName : 社区服务
|
||||
* idCard :
|
||||
* openExperience : 1
|
||||
* sex : null
|
||||
* backSex : cd915562-e590-4c4a-953a-e8887ebb12e9
|
||||
* photo :
|
||||
* userId : aaf579a3-a0fe-43d1-88ec-7bb0c9376b39
|
||||
* occupation : 91d9a04a-b66a-4369-85f6-2a97f87c8716
|
||||
* occupationName : 学生
|
||||
* work : 测试单位
|
||||
* hobby : 测试爱好
|
||||
* cv : 测试测试
|
||||
* promise : <p> 我愿意成为一名光荣的志愿者。我承诺:尽己所能,不计报酬,帮助他人,服务社会,践行志愿者你和服务精神,传播先进文化,为建设团结互助、平等互爱、功能进步的美好社会贡献力量。<br></p><p><br></p><p><br></p><p>申请人签字: 年 月 日</p>
|
||||
* remark : 测试测试
|
||||
*/
|
||||
|
||||
private String addressAbout;
|
||||
private String addressDetail;
|
||||
private int age;
|
||||
private String backSex;
|
||||
private String birthday;
|
||||
private String highestEducation;
|
||||
private String idCard;
|
||||
private String microBlog;
|
||||
private String name;
|
||||
private String nation;
|
||||
private String nativePlace;
|
||||
private int openExperience;
|
||||
private String phone;
|
||||
private String photo;
|
||||
private String politicalOutlook;
|
||||
private String qq;
|
||||
private String volunteerId;
|
||||
private String serviceArea;
|
||||
private String serviceCity;
|
||||
private String serviceCounty;
|
||||
private String phone;
|
||||
private String nativePlace;
|
||||
private String addressAbout;
|
||||
private String birthday;
|
||||
private String addressDetail;
|
||||
private String highestEducation;
|
||||
private String name;
|
||||
private String politicalOutlook;
|
||||
private String nation;
|
||||
private String serviceIndustry;
|
||||
private String serviceType;
|
||||
private int sex;
|
||||
private String serviceTypeName;
|
||||
private String idCard;
|
||||
private int openExperience;
|
||||
private Object sex;
|
||||
private String backSex;
|
||||
private String photo;
|
||||
private String userId;
|
||||
private String volunteerId;
|
||||
private String weChat;
|
||||
private String occupation;
|
||||
private String occupationName;
|
||||
private String work;
|
||||
private String zipCode;
|
||||
private String hobby;
|
||||
private String cv;
|
||||
private String promise;
|
||||
private String remark;
|
||||
|
||||
public String getAddressAbout() {
|
||||
return addressAbout;
|
||||
public String getVolunteerId() {
|
||||
return volunteerId;
|
||||
}
|
||||
|
||||
public void setAddressAbout(String addressAbout) {
|
||||
this.addressAbout = addressAbout;
|
||||
public void setVolunteerId(String volunteerId) {
|
||||
this.volunteerId = volunteerId;
|
||||
}
|
||||
|
||||
public String getAddressDetail() {
|
||||
return addressDetail;
|
||||
public String getServiceArea() {
|
||||
return serviceArea;
|
||||
}
|
||||
|
||||
public void setAddressDetail(String addressDetail) {
|
||||
this.addressDetail = addressDetail;
|
||||
public void setServiceArea(String serviceArea) {
|
||||
this.serviceArea = serviceArea;
|
||||
}
|
||||
|
||||
public int getAge() {
|
||||
return age;
|
||||
public String getServiceCity() {
|
||||
return serviceCity;
|
||||
}
|
||||
|
||||
public void setAge(int age) {
|
||||
this.age = age;
|
||||
public void setServiceCity(String serviceCity) {
|
||||
this.serviceCity = serviceCity;
|
||||
}
|
||||
|
||||
public String getBackSex() {
|
||||
return backSex;
|
||||
public String getServiceCounty() {
|
||||
return serviceCounty;
|
||||
}
|
||||
|
||||
public void setBackSex(String backSex) {
|
||||
this.backSex = backSex;
|
||||
}
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getHighestEducation() {
|
||||
return highestEducation;
|
||||
}
|
||||
|
||||
public void setHighestEducation(String highestEducation) {
|
||||
this.highestEducation = highestEducation;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public String getMicroBlog() {
|
||||
return microBlog;
|
||||
}
|
||||
|
||||
public void setMicroBlog(String microBlog) {
|
||||
this.microBlog = microBlog;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getNation() {
|
||||
return nation;
|
||||
}
|
||||
|
||||
public void setNation(String nation) {
|
||||
this.nation = nation;
|
||||
}
|
||||
|
||||
public String getNativePlace() {
|
||||
return nativePlace;
|
||||
}
|
||||
|
||||
public void setNativePlace(String nativePlace) {
|
||||
this.nativePlace = nativePlace;
|
||||
}
|
||||
|
||||
public int getOpenExperience() {
|
||||
return openExperience;
|
||||
}
|
||||
|
||||
public void setOpenExperience(int openExperience) {
|
||||
this.openExperience = openExperience;
|
||||
public void setServiceCounty(String serviceCounty) {
|
||||
this.serviceCounty = serviceCounty;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
@ -166,12 +110,52 @@ public class VolunteerInfo {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhoto() {
|
||||
return photo;
|
||||
public String getNativePlace() {
|
||||
return nativePlace;
|
||||
}
|
||||
|
||||
public void setPhoto(String photo) {
|
||||
this.photo = photo;
|
||||
public void setNativePlace(String nativePlace) {
|
||||
this.nativePlace = nativePlace;
|
||||
}
|
||||
|
||||
public String getAddressAbout() {
|
||||
return addressAbout;
|
||||
}
|
||||
|
||||
public void setAddressAbout(String addressAbout) {
|
||||
this.addressAbout = addressAbout;
|
||||
}
|
||||
|
||||
public String getBirthday() {
|
||||
return birthday;
|
||||
}
|
||||
|
||||
public void setBirthday(String birthday) {
|
||||
this.birthday = birthday;
|
||||
}
|
||||
|
||||
public String getAddressDetail() {
|
||||
return addressDetail;
|
||||
}
|
||||
|
||||
public void setAddressDetail(String addressDetail) {
|
||||
this.addressDetail = addressDetail;
|
||||
}
|
||||
|
||||
public String getHighestEducation() {
|
||||
return highestEducation;
|
||||
}
|
||||
|
||||
public void setHighestEducation(String highestEducation) {
|
||||
this.highestEducation = highestEducation;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getPoliticalOutlook() {
|
||||
@ -182,20 +166,12 @@ public class VolunteerInfo {
|
||||
this.politicalOutlook = politicalOutlook;
|
||||
}
|
||||
|
||||
public String getQq() {
|
||||
return qq;
|
||||
public String getNation() {
|
||||
return nation;
|
||||
}
|
||||
|
||||
public void setQq(String qq) {
|
||||
this.qq = qq;
|
||||
}
|
||||
|
||||
public String getServiceArea() {
|
||||
return serviceArea;
|
||||
}
|
||||
|
||||
public void setServiceArea(String serviceArea) {
|
||||
this.serviceArea = serviceArea;
|
||||
public void setNation(String nation) {
|
||||
this.nation = nation;
|
||||
}
|
||||
|
||||
public String getServiceIndustry() {
|
||||
@ -214,14 +190,54 @@ public class VolunteerInfo {
|
||||
this.serviceType = serviceType;
|
||||
}
|
||||
|
||||
public int getSex() {
|
||||
public String getServiceTypeName() {
|
||||
return serviceTypeName;
|
||||
}
|
||||
|
||||
public void setServiceTypeName(String serviceTypeName) {
|
||||
this.serviceTypeName = serviceTypeName;
|
||||
}
|
||||
|
||||
public String getIdCard() {
|
||||
return idCard;
|
||||
}
|
||||
|
||||
public void setIdCard(String idCard) {
|
||||
this.idCard = idCard;
|
||||
}
|
||||
|
||||
public int getOpenExperience() {
|
||||
return openExperience;
|
||||
}
|
||||
|
||||
public void setOpenExperience(int openExperience) {
|
||||
this.openExperience = openExperience;
|
||||
}
|
||||
|
||||
public Object getSex() {
|
||||
return sex;
|
||||
}
|
||||
|
||||
public void setSex(int sex) {
|
||||
public void setSex(Object sex) {
|
||||
this.sex = sex;
|
||||
}
|
||||
|
||||
public String getBackSex() {
|
||||
return backSex;
|
||||
}
|
||||
|
||||
public void setBackSex(String backSex) {
|
||||
this.backSex = backSex;
|
||||
}
|
||||
|
||||
public String getPhoto() {
|
||||
return photo;
|
||||
}
|
||||
|
||||
public void setPhoto(String photo) {
|
||||
this.photo = photo;
|
||||
}
|
||||
|
||||
public String getUserId() {
|
||||
return userId;
|
||||
}
|
||||
@ -230,20 +246,20 @@ public class VolunteerInfo {
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public String getVolunteerId() {
|
||||
return volunteerId;
|
||||
public String getOccupation() {
|
||||
return occupation;
|
||||
}
|
||||
|
||||
public void setVolunteerId(String volunteerId) {
|
||||
this.volunteerId = volunteerId;
|
||||
public void setOccupation(String occupation) {
|
||||
this.occupation = occupation;
|
||||
}
|
||||
|
||||
public String getWeChat() {
|
||||
return weChat;
|
||||
public String getOccupationName() {
|
||||
return occupationName;
|
||||
}
|
||||
|
||||
public void setWeChat(String weChat) {
|
||||
this.weChat = weChat;
|
||||
public void setOccupationName(String occupationName) {
|
||||
this.occupationName = occupationName;
|
||||
}
|
||||
|
||||
public String getWork() {
|
||||
@ -254,11 +270,35 @@ public class VolunteerInfo {
|
||||
this.work = work;
|
||||
}
|
||||
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
public String getHobby() {
|
||||
return hobby;
|
||||
}
|
||||
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
public void setHobby(String hobby) {
|
||||
this.hobby = hobby;
|
||||
}
|
||||
|
||||
public String getCv() {
|
||||
return cv;
|
||||
}
|
||||
|
||||
public void setCv(String cv) {
|
||||
this.cv = cv;
|
||||
}
|
||||
|
||||
public String getPromise() {
|
||||
return promise;
|
||||
}
|
||||
|
||||
public void setPromise(String promise) {
|
||||
this.promise = promise;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,42 @@ public class VolunteerPostBody {
|
||||
private String work;
|
||||
private String zipCode;
|
||||
private String agree;
|
||||
private String cv;//简历
|
||||
private String hobby;//爱好
|
||||
private String occupation;//职业
|
||||
private String remark;//备注
|
||||
|
||||
public String getCv() {
|
||||
return cv;
|
||||
}
|
||||
|
||||
public void setCv(String cv) {
|
||||
this.cv = cv;
|
||||
}
|
||||
|
||||
public String getHobby() {
|
||||
return hobby;
|
||||
}
|
||||
|
||||
public void setHobby(String hobby) {
|
||||
this.hobby = hobby;
|
||||
}
|
||||
|
||||
public String getOccupation() {
|
||||
return occupation;
|
||||
}
|
||||
|
||||
public void setOccupation(String occupation) {
|
||||
this.occupation = occupation;
|
||||
}
|
||||
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark;
|
||||
}
|
||||
|
||||
public String getAgree() {
|
||||
return agree;
|
||||
|
@ -4,11 +4,13 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
@ -272,6 +274,65 @@
|
||||
android:hint="请选择服务区域" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vocation_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="职业:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vocation_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择职业" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unit_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="工作单位及职务:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_unit_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入工作单位及职务" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_like_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="特长爱好:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_like_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入特长爱好" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_resume_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="个人简历:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_resume_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入个人简历"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:gravity="center_vertical">
|
||||
@ -311,7 +372,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_expert_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="服务类别:" />
|
||||
android:text="服务意向:" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_export_content"
|
||||
@ -347,6 +408,22 @@
|
||||
android:layout_marginLeft="90dp"
|
||||
android:background="@color/gray_line" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="备注:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_remark_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入备注"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<CheckBox
|
||||
@ -387,6 +464,7 @@
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/sel_btn_activity_sign_up_no_ra"
|
||||
android:padding="5dp"
|
||||
android:text="立即注册"
|
||||
android:textColor="@color/col_verify_text" />
|
||||
</RelativeLayout>
|
||||
|
@ -4,7 +4,7 @@
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/yellow"
|
||||
android:background="@color/white"
|
||||
android:descendantFocusability="blocksDescendants"
|
||||
tools:ignore="HardcodedText">
|
||||
|
||||
@ -31,12 +31,13 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_team_member_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="团队成员:" />
|
||||
android:text="团队人数:" />
|
||||
|
||||
<TextView
|
||||
<EditText
|
||||
android:id="@+id/tv_team_member_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择团队成员" />
|
||||
style="@style/register_input"
|
||||
android:hint="请输入团队人数"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
@ -73,7 +74,9 @@
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<CheckBox
|
||||
android:layout_width="wrap_content"
|
||||
@ -99,7 +102,7 @@
|
||||
android:layout_marginTop="45dp"
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/sel_volunteer_register_btn"
|
||||
android:background="@drawable/sel_btn_activity_sign_up_no_ra"
|
||||
android:text="保存"
|
||||
android:textColor="@color/col_verify_text" />
|
||||
</LinearLayout>
|
||||
|
@ -31,6 +31,98 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
style="@style/register_text_title"
|
||||
android:text="工作单位及职务:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unit"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_bottom_line"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
style="@style/register_text_title"
|
||||
android:text="职业:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vocation"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_bottom_line"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
style="@style/register_text_title"
|
||||
android:text="个人简历:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_resume"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_bottom_line"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
style="@style/register_text_title"
|
||||
android:text="特长爱好:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_like"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_bottom_line"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:gravity="center_vertical">
|
||||
@ -73,7 +165,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_expert_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="服务类别:" />
|
||||
android:text="服务意向:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_expert_content"
|
||||
@ -119,4 +211,27 @@
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
style="@style/register_text_title"
|
||||
android:text="备注:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="10dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/shape_bottom_line"
|
||||
android:paddingLeft="5dp"
|
||||
android:paddingTop="5dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="5dp"
|
||||
android:textColor="@color/text_detail_24"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
@ -4,11 +4,13 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/white">
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginBottom="80dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<LinearLayout
|
||||
@ -17,6 +19,248 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
style="@style/register_text_title"
|
||||
android:text="头像:" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_user_icon"
|
||||
android:layout_width="80dp"
|
||||
android:layout_height="100dp"
|
||||
android:layout_marginRight="10dp"
|
||||
android:background="@drawable/ic_add_photo" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_name_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="姓名:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_name"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入姓名" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_age_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="年龄:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_age"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入年龄"
|
||||
android:inputType="number" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_id_card_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="身份证号:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_id_card"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入身份证号码" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_birthday_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="出生日期:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_birthday_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择出生日期" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_phone_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="手机号:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_phone_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入手机号码" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_wchat_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="微信:" />
|
||||
|
||||
<EditText
|
||||
style="@style/register_input"
|
||||
android:hint="请输入微信号" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_qq_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="QQ:" />
|
||||
|
||||
<EditText
|
||||
style="@style/register_input"
|
||||
android:hint="请输入QQ号码" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_email_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="邮箱:" />
|
||||
|
||||
<EditText
|
||||
style="@style/register_input"
|
||||
android:hint="请输入邮箱" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nation_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="民族:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nation_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择民族" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_native_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="籍贯:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_native_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择籍贯" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pi_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="政治面貌:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_pi_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择政治面貌" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="居住地址:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_address_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择居住地址" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_detail_address_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="详细地址:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_detail_address_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入详细地址" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_edu_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="最高学历:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_edu_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择最高学历" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_work_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="从业状况:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_work_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择从业状况" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
@ -30,6 +274,66 @@
|
||||
android:hint="请选择服务区域" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout style="@style/register_item_container">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vocation_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="职业:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_vocation_content"
|
||||
style="@style/register_text_sel"
|
||||
android:hint="请选择职业" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_unit_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="工作单位及职务:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_unit_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入工作单位及职务" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_like_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="特长爱好:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_like_content"
|
||||
style="@style/register_input"
|
||||
android:hint="请输入特长爱好" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_resume_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="个人简历:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_resume_content"
|
||||
style="@style/register_input"
|
||||
android:gravity="left"
|
||||
android:hint="请输入个人简历"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:gravity="center_vertical">
|
||||
@ -51,6 +355,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:button="@drawable/sel_radio_red"
|
||||
android:checked="true"
|
||||
android:text="是" />
|
||||
|
||||
<RadioButton
|
||||
@ -68,7 +373,7 @@
|
||||
<TextView
|
||||
android:id="@+id/tv_expert_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="服务类别:" />
|
||||
android:text="服务意向:" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rlv_export_content"
|
||||
@ -98,6 +403,29 @@
|
||||
android:layout_weight="1" />
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginLeft="90dp"
|
||||
android:background="@color/gray_line" />
|
||||
|
||||
<LinearLayout
|
||||
style="@style/register_item_container"
|
||||
android:visibility="visible">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_remark_title"
|
||||
style="@style/register_text_title"
|
||||
android:text="备注:" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_remark_content"
|
||||
style="@style/register_input"
|
||||
android:gravity="start"
|
||||
android:hint="请输入备注"
|
||||
android:minLines="3" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
@ -111,6 +439,7 @@
|
||||
android:layout_marginRight="30dp"
|
||||
android:layout_marginBottom="30dp"
|
||||
android:background="@drawable/sel_btn_activity_sign_up_no_ra"
|
||||
android:padding="5dp"
|
||||
android:text="立即修改"
|
||||
android:textColor="@color/col_verify_text" />
|
||||
</RelativeLayout>
|
||||
|
@ -180,7 +180,7 @@
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
style="@style/register_text_title"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:text="自愿者团队:" />
|
||||
android:text="志愿者团队:" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_choose_team"
|
||||
|
@ -4,6 +4,8 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:layout_margin="5dp"
|
||||
android:background="@drawable/shape_re_bottom"
|
||||
android:padding="8dp">
|
||||
|
||||
<LinearLayout
|
||||
|
@ -18,7 +18,7 @@
|
||||
<style name="register_text_title">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">0.3</item>
|
||||
<item name="android:layout_weight">0.4</item>
|
||||
<item name="android:textColor">#242424</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
</style>
|
||||
|
@ -88,7 +88,7 @@ dependencies {
|
||||
//banner
|
||||
implementation "com.youth.banner:banner:${rootProject.ext.bannerVersion}"
|
||||
//文件下载 1.7.7
|
||||
implementation "com.liulishuo.filedownloader:library:${rootProject.ext.downloadVersion}"
|
||||
// implementation "com.liulishuo.filedownloader:library:${rootProject.ext.downloadVersion}"
|
||||
// PDF阅读器1 2.8.2
|
||||
implementation "com.github.barteksc:android-pdf-viewer:${rootProject.ext.pdfVersion}"
|
||||
// debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.3'
|
||||
|
@ -14,7 +14,7 @@
|
||||
AppKey="b26e2280906bfd9fea8ed65f2f8606aa"/>
|
||||
|
||||
<Wechat
|
||||
AppId="wxc40e16f3ba6ebabc"
|
||||
AppId="wxd25dace04f38109d"
|
||||
AppSecret="dcad950cd0633a27e353477c4ec12e7a"/>
|
||||
|
||||
</DevInfor>
|
@ -6,6 +6,8 @@ import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.View;
|
||||
import android.widget.CheckBox;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
@ -28,6 +30,7 @@ import com.tengshisoft.mudulemain.cultural.beans.AreaListBean;
|
||||
import com.tengshisoft.mudulemain.cultural.beans.SearchBean;
|
||||
import com.tengshisoft.mudulemain.cultural.net.HomeApi;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -71,6 +74,8 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
EditText mEtSearch;
|
||||
@BindView(R2.id.ll_search)
|
||||
LinearLayout mLlSearch;
|
||||
@BindView(R2.id.cb_default_city)
|
||||
CheckBox mCbDefaultCity;
|
||||
private Unbinder mBind;
|
||||
private String mCurrentCityName = "";
|
||||
private String mCurrentCityCode = "";
|
||||
@ -83,6 +88,7 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
private List<AreaListBean> mArea3List;
|
||||
private List<AreaListBean> mArea4List;
|
||||
private String mCurrentArea1Name = "";
|
||||
private String mType;
|
||||
|
||||
|
||||
@Override
|
||||
@ -92,6 +98,7 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
mTvPublish.setVisibility(View.VISIBLE);
|
||||
mTvPublish.setText("确定");
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
mType = getIntent().getStringExtra("type");
|
||||
mTvPublish.setOnClickListener(v -> doChooseArea());
|
||||
if (!TextUtils.isEmpty(UserLgUtils.getCurrentCity())) {
|
||||
mCurrentCityName = UserLgUtils.getCurrentCity();
|
||||
@ -117,6 +124,7 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
.setOrientation(ChipsLayoutManager.HORIZONTAL)
|
||||
.setMaxViewsInRow(4)
|
||||
.build();
|
||||
mCbDefaultCity.setOnCheckedChangeListener((buttonView, isChecked) -> setDefaultCity(isChecked));
|
||||
mArea1List = new ArrayList<>();
|
||||
mArea2List = new ArrayList<>();
|
||||
mArea3List = new ArrayList<>();
|
||||
@ -165,6 +173,7 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
for (int i = 0; i < mArea4List.size(); i++) {
|
||||
mArea4List.get(i).setCheckEd(areaListBean.getAreaId().equals(mArea4List.get(i).getAreaId()) ? true : false);
|
||||
}
|
||||
|
||||
mArea4Adapter.setData(mArea4List);
|
||||
setCurrentCity(areaListBean, 4);
|
||||
});
|
||||
@ -208,6 +217,37 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置默认地区
|
||||
*/
|
||||
private void setDefaultCity(boolean isCheck) {
|
||||
if (isCheck) {
|
||||
if (mArea3List != null && mArea3List.size() > 0) {
|
||||
for (int i = 0; i < mArea3List.size(); i++) {
|
||||
mArea3List.get(i).setCheckEd(false);
|
||||
}
|
||||
mArea3Adapter.notifyDataSetChanged();
|
||||
}
|
||||
if (mArea4List != null && mArea4List.size() > 0) {
|
||||
for (int i = 0; i < mArea4List.size(); i++) {
|
||||
mArea4List.get(i).setCheckEd(false);
|
||||
}
|
||||
mArea4Adapter.notifyDataSetChanged();
|
||||
}
|
||||
mCurrentCityCode = PathConfig.CITY_DEFAULT_CODE;
|
||||
mCurrentCityName = PathConfig.CITY_DEFAULT_NAME;
|
||||
UserLgUtils.setCityLevel(2);
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(UserLgUtils.getCurrentCity())) {
|
||||
mCurrentCityName = UserLgUtils.getCurrentCity();
|
||||
} else {
|
||||
mCurrentCityName = PathConfig.CITY_DEFAULT_NAME;
|
||||
}
|
||||
mCurrentCityCode = UserLgUtils.getCurrentCityCode();
|
||||
}
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索
|
||||
*
|
||||
@ -263,18 +303,11 @@ public class ChooseCityActivity extends BaseActivity {
|
||||
}
|
||||
mArea3Adapter.setData(mArea3List);
|
||||
}
|
||||
// if (!TextUtils.isEmpty(mCurrentArea1Name)) {
|
||||
// if ("北京市".equals(mCurrentArea1Name) || "天津市".equals(mCurrentArea1Name) || "上海市".equals(mCurrentArea1Name) || "重庆市".equals(mCurrentArea1Name)) {
|
||||
// if ("1".equals(bean.getAreaLevel()) && "直辖区".equals(bean.getAreaName())) {
|
||||
// mCurrentCityName = mCurrentArea1Name + "-" + bean.getAreaName();
|
||||
// } else {
|
||||
// mCurrentCityName = bean.getAreaName();
|
||||
// }
|
||||
// } else {
|
||||
//
|
||||
// }
|
||||
// }
|
||||
UserLgUtils.setCityLevel(Integer.parseInt(bean.getAreaLevel()) + 1);
|
||||
mCbDefaultCity.setChecked(false);
|
||||
|
||||
if (TextUtils.isEmpty(mType)) {
|
||||
UserLgUtils.setCityLevel(Integer.parseInt(bean.getAreaLevel()) + 1);
|
||||
}
|
||||
mCurrentCityName = bean.getAreaName();
|
||||
mCurrentCityCode = bean.getAreaId();
|
||||
mTvCurrentArea.setText(mCurrentCityName);
|
||||
|
@ -218,7 +218,6 @@ public class MainActivity extends BaseActivity {
|
||||
String chooseCityCode = data.getStringExtra("chooseCityCode");
|
||||
UserLgUtils.setCurrentCity(chooseCity);
|
||||
UserLgUtils.setCurrentCityCode(chooseCityCode);
|
||||
LogUtils.e(chooseCityCode + "===" + chooseCity);
|
||||
mTvAppBack.setText(chooseCity);
|
||||
refreshData();
|
||||
}
|
||||
@ -292,6 +291,7 @@ public class MainActivity extends BaseActivity {
|
||||
@Override
|
||||
public void onNext(VersionBean successBean) {
|
||||
if (successBean != null && successBean.getData() > 0) {
|
||||
LogUtils.e(successBean.getData());
|
||||
if (CheckUpdateUtils.checkcode(MainActivity.this, successBean.getData() + "")) {
|
||||
showUpdateDialog("1.细节体验优化.\n2.提升性能及稳定性.\n3.修复相关Bug");
|
||||
}
|
||||
|
@ -91,6 +91,7 @@ import cn.jiguang.share.android.api.ShareParams;
|
||||
import cn.jiguang.share.qqmodel.QQ;
|
||||
import cn.jiguang.share.wechat.WeChatHandleActivity;
|
||||
import cn.jiguang.share.wechat.Wechat;
|
||||
import cn.jiguang.share.wechat.WechatMoments;
|
||||
import cn.jiguang.share.weibo.SinaWeibo;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.ObservableEmitter;
|
||||
@ -221,6 +222,8 @@ public class NewsDetailActivity extends BaseActivity {
|
||||
settings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
|
||||
}
|
||||
mType = getIntent().getIntExtra("type", 0);
|
||||
LogUtils.e(mType);
|
||||
LogUtils.e(mUrl);
|
||||
if (mType == 0) {
|
||||
mWvContent.loadUrl(BaseUrlApi.BASE_NEWS_DETAIL + mUrl);
|
||||
} else {
|
||||
@ -249,7 +252,16 @@ public class NewsDetailActivity extends BaseActivity {
|
||||
|
||||
@Override
|
||||
public boolean shouldOverrideUrlLoading(WebView view, String url) {
|
||||
view.loadUrl(url);
|
||||
if (url.contains("https://www.wgink.ink/news/route/file/downloadfile/true")) {
|
||||
//TODO 数图资源
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_MAIN_NEWS_PDF)
|
||||
.withString("title", mTitle)
|
||||
.withString("url", url)
|
||||
.navigation();
|
||||
} else {
|
||||
view.loadUrl(url);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
@ -347,6 +359,11 @@ public class NewsDetailActivity extends BaseActivity {
|
||||
public void shareQQ() {
|
||||
shareToPlatform(3);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void shareMoment() {
|
||||
shareToPlatform(4);
|
||||
}
|
||||
});
|
||||
shareView.show();
|
||||
}
|
||||
@ -356,8 +373,13 @@ public class NewsDetailActivity extends BaseActivity {
|
||||
ToastUtils.showShort("该资讯不支持分享");
|
||||
} else {
|
||||
ShareParams params = new ShareParams();
|
||||
params.setTitle("日喀则市数字文化云");
|
||||
params.setText(mTitle);
|
||||
if (type == 4) {
|
||||
params.setTitle(mTitle);
|
||||
params.setText("日喀则市数字文化云");
|
||||
} else {
|
||||
params.setTitle("日喀则市数字文化云");
|
||||
params.setText(mTitle);
|
||||
}
|
||||
params.setShareType(Platform.SHARE_WEBPAGE);
|
||||
params.setUrl(BaseUrlApi.BASE_NEWS_DETAIL + mUrl);
|
||||
if (mDestFile != null) {
|
||||
@ -375,13 +397,14 @@ public class NewsDetailActivity extends BaseActivity {
|
||||
|
||||
} else if (type == 3) {
|
||||
platFormName = QQ.Name;
|
||||
} else if (type == 4) {
|
||||
platFormName = WechatMoments.Name;
|
||||
} else {
|
||||
platFormName = Wechat.Name;
|
||||
}
|
||||
JShareInterface.share(platFormName, params, new PlatActionListener() {
|
||||
@Override
|
||||
public void onComplete(Platform platform, int i, HashMap<String, Object> hashMap) {
|
||||
LogUtils.e("complete");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,45 +1,24 @@
|
||||
package com.tengshisoft.mudulemain.cultural.activitys.news;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import androidx.core.content.FileProvider;
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
import retrofit2.http.Path;
|
||||
|
||||
import android.graphics.Canvas;
|
||||
import android.net.Uri;
|
||||
import android.net.http.SslError;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.os.Environment;
|
||||
import android.webkit.HttpAuthHandler;
|
||||
import android.webkit.JsResult;
|
||||
import android.webkit.SslErrorHandler;
|
||||
import android.webkit.WebChromeClient;
|
||||
import android.webkit.WebResourceError;
|
||||
import android.webkit.WebResourceRequest;
|
||||
import android.webkit.WebSettings;
|
||||
import android.webkit.WebView;
|
||||
import android.webkit.WebViewClient;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.github.barteksc.pdfviewer.PDFView;
|
||||
import com.github.barteksc.pdfviewer.listener.OnDrawListener;
|
||||
import com.github.barteksc.pdfviewer.listener.OnPageErrorListener;
|
||||
import com.liulishuo.filedownloader.BaseDownloadTask;
|
||||
import com.liulishuo.filedownloader.FileDownloadListener;
|
||||
import com.liulishuo.filedownloader.FileDownloader;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.BaseUrlApi;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.down.DownloadListener;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.down.DownloadUtil;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.down.InputParameter;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.utils.LogUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ProiderUtil;
|
||||
import com.tengshisoft.mudulemain.R;
|
||||
import com.tengshisoft.mudulemain.R2;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import butterknife.BindView;
|
||||
import butterknife.ButterKnife;
|
||||
import butterknife.Unbinder;
|
||||
|
||||
@Route(path = PathConfig.PATH_MODULE_MAIN_NEWS_PDF)
|
||||
public class NewsPdfActivity extends BaseActivity {
|
||||
@BindView(R2.id.pdf_content)
|
||||
@ -54,30 +33,20 @@ public class NewsPdfActivity extends BaseActivity {
|
||||
@Override
|
||||
public void initData() {
|
||||
super.initData();
|
||||
//
|
||||
mBind = ButterKnife.bind(this);
|
||||
mTvBaseTitle.setText("数图资源");
|
||||
String title = getIntent().getStringExtra("title");
|
||||
String url = getIntent().getStringExtra("url");
|
||||
mTvBaseTitle.setText(title);
|
||||
refreshView(STATE_LOAD_LOADING);
|
||||
String absolutePath = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath();
|
||||
FileDownloader.setup(mActivity);
|
||||
FileDownloader.getImpl()
|
||||
.create("https://haidian2.hanyastar.com.cn/book/20170308153955_1488958795786_390.pdf")
|
||||
.setPath(absolutePath, true)
|
||||
.setListener(new FileDownloadListener() {
|
||||
@Override
|
||||
protected void pending(BaseDownloadTask task, int soFarBytes, int totalBytes) {
|
||||
|
||||
}
|
||||
String absolutePath = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS).getAbsolutePath() + File.separator + System.currentTimeMillis() + ".pdf";
|
||||
|
||||
InputParameter parameter = new InputParameter.Builder(BaseUrlApi.IP, url, absolutePath).setCallbackOnUiThread(true).build();
|
||||
DownloadUtil.getInstance()
|
||||
.downloadFile(parameter, new DownloadListener() {
|
||||
@Override
|
||||
protected void progress(BaseDownloadTask task, int soFarBytes, int totalBytes) {
|
||||
LogUtils.e(soFarBytes + "==");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void completed(BaseDownloadTask task) {
|
||||
public void onFinish(File file) {
|
||||
refreshView(STATE_LOAD_SUCCESS);
|
||||
mPDFView.fromFile(new File(task.getPath() + File.separator + task.getFilename()))
|
||||
mPDFView.fromFile(file)
|
||||
.enableSwipe(true) // allows to block changing pages using swipe
|
||||
.swipeHorizontal(false)
|
||||
.enableDoubletap(true)
|
||||
@ -92,22 +61,15 @@ public class NewsPdfActivity extends BaseActivity {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paused(BaseDownloadTask task, int soFarBytes, int totalBytes) {
|
||||
public void onProgress(int progress, long downloadedLengthKb, long totalLengthKb) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void error(BaseDownloadTask task, Throwable e) {
|
||||
e.printStackTrace();
|
||||
public void onFailed(String errMsg) {
|
||||
refreshView(STATE_LOAD_ERROR);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void warn(BaseDownloadTask task) {
|
||||
|
||||
}
|
||||
})
|
||||
.start();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,10 @@ public class MainFuncAdapter extends BaseRecyclerAdapter<MainFuncBean, MainFuncH
|
||||
public MainFuncHolder createHolder(ViewGroup parent, int viewType) {
|
||||
View itemView = LayoutInflater.from(mContext).inflate(R.layout.item_main_func, parent, false);
|
||||
RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) itemView.getLayoutParams();
|
||||
if (mData.size() <= 9) {//处理居中
|
||||
// if (mData.size() <= 10) {//处理居中
|
||||
int width = (ScreenUtils.getScreenWidth()) / 4;
|
||||
layoutParams.width = width;
|
||||
}
|
||||
// }
|
||||
itemView.setLayoutParams(layoutParams);
|
||||
return new MainFuncHolder(itemView);
|
||||
}
|
||||
|
@ -638,9 +638,21 @@ public class HomeFragment extends BaseFragment {
|
||||
MainFuncBean culBean = new MainFuncBean();
|
||||
culBean.setIconRes(R.drawable.ic_cultural_trends_icon);
|
||||
culBean.setTitle("文化动态");
|
||||
MainFuncBean bookBean = new MainFuncBean();
|
||||
bookBean.setIconRes(R.drawable.ic_legacy_icon);
|
||||
bookBean.setTitle("数图资源");
|
||||
MainFuncBean cultivlateBean = new MainFuncBean();
|
||||
cultivlateBean.setIconRes(R.drawable.ic_live_icon);
|
||||
cultivlateBean.setTitle("在线培训");
|
||||
MainFuncBean tourBean = new MainFuncBean();
|
||||
tourBean.setIconRes(R.drawable.ic_place_icon);
|
||||
tourBean.setTitle("文化旅游");
|
||||
|
||||
mFuncBeans.add(showBean);
|
||||
mFuncBeans.add(culBean);
|
||||
mFuncBeans.add(cultivlateBean);
|
||||
mFuncBeans.add(tourBean);
|
||||
mFuncBeans.add(bookBean);
|
||||
mFuncBeans.add(volunBean);
|
||||
mFuncBeans.add(activityBean);
|
||||
mFuncBeans.add(placeBean);
|
||||
@ -707,6 +719,21 @@ public class HomeFragment extends BaseFragment {
|
||||
.withString("title", "展览展示")
|
||||
.withString("id", PathConfig.NEWS_SHOW_ID)
|
||||
.navigation();
|
||||
} else if ("数图资源".equals(mainFuncBean.getTitle())) {
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_MAIN)
|
||||
.withString("title", "数图资源")
|
||||
.withString("id", PathConfig.NEWS_BOOKS_ID)
|
||||
.navigation();
|
||||
} else if ("在线培训".equals(mainFuncBean.getTitle())) {
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_MAIN)
|
||||
.withString("title", "在线培训")
|
||||
.withString("id", PathConfig.NEWS_CULTIVATE_ID)
|
||||
.navigation();
|
||||
} else if ("文化旅游".equals(mainFuncBean.getTitle())) {
|
||||
ARouter.getInstance().build(PathConfig.PATH_MODULE_MAIN_NEWS_LIST)
|
||||
.withString("id", PathConfig.NEWS_TOUR_ID)
|
||||
.withString("title", "文化旅游")
|
||||
.navigation();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -240,20 +240,21 @@
|
||||
android:textSize="16sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_default_city"
|
||||
<CheckBox
|
||||
android:id="@+id/cb_default_city"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="15dp"
|
||||
android:layout_marginRight="15dp"
|
||||
android:background="@drawable/shape_search_input_box"
|
||||
android:button="@null"
|
||||
android:paddingLeft="10dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingRight="10dp"
|
||||
android:paddingBottom="3dp"
|
||||
android:textColor="@color/app_title"
|
||||
android:textSize="16sp"
|
||||
tools:text="日喀则" />
|
||||
android:text="日喀则市"
|
||||
android:textColor="@color/col_blace_red"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -76,7 +76,7 @@
|
||||
android:padding="8dp"
|
||||
android:text="精彩推荐"
|
||||
android:textColor="@color/app_title_9f_no"
|
||||
android:textSize="14sp"
|
||||
android:textSize="16sp"
|
||||
app:text_type_cus="1" />
|
||||
|
||||
<ImageView
|
||||
@ -138,7 +138,7 @@
|
||||
android:padding="8dp"
|
||||
android:text="文化动态"
|
||||
android:textColor="@color/app_title_9f_no"
|
||||
android:textSize="14sp"
|
||||
android:textSize="16sp"
|
||||
app:text_type_cus="1" />
|
||||
|
||||
<ImageView
|
||||
@ -200,7 +200,7 @@
|
||||
android:padding="8dp"
|
||||
android:text="直播专区"
|
||||
android:textColor="@color/app_title_9f_no"
|
||||
android:textSize="14sp"
|
||||
android:textSize="16sp"
|
||||
app:text_type_cus="1" />
|
||||
|
||||
<ImageView
|
||||
|
@ -14,7 +14,6 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="2"
|
||||
android:padding="5dp"
|
||||
android:lines="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/news_title_text_size"
|
||||
tools:text="新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题" />
|
||||
@ -60,8 +59,8 @@
|
||||
android:id="@+id/tv_multi_source"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/gray_text"
|
||||
android:maxLength="10"
|
||||
android:textColor="@color/gray_text"
|
||||
android:textSize="10sp"
|
||||
tools:text="新闻来源新闻来源新闻来源新闻来源新闻来源新闻来源新闻来源新闻来源新闻来源新闻来源" />
|
||||
|
||||
|
@ -13,12 +13,11 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:padding="5dp"
|
||||
android:maxLines="2"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="@dimen/news_title_text_size"
|
||||
tools:text="新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题" />
|
||||
tools:text="新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题新闻标题" />
|
||||
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
|
@ -12,7 +12,6 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:lines="2"
|
||||
android:maxLines="2"
|
||||
android:padding="5dp"
|
||||
android:textColor="@color/black"
|
||||
|
@ -4,6 +4,7 @@ import android.app.ProgressDialog;
|
||||
import android.content.Intent;
|
||||
import android.text.TextUtils;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
@ -18,6 +19,7 @@ import com.sucstepsoft.cm_utils.core.retrofit_net.bean.VersionBean;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.CenterDialogUpdateView;
|
||||
import com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView;
|
||||
import com.sucstepsoft.cm_utils.utils.AppUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.ToastUtils;
|
||||
import com.sucstepsoft.cm_utils.utils.UIUtil;
|
||||
import com.sucstepsoft.cm_utils.utils.UserLgUtils;
|
||||
@ -43,13 +45,15 @@ public class SettingActivity extends BaseActivity {
|
||||
@BindView(R2.id.ll_clear)
|
||||
LinearLayout mLlClear;
|
||||
@BindView(R2.id.ll_check_update)
|
||||
LinearLayout mLlCheckUpdate;
|
||||
RelativeLayout mLlCheckUpdate;
|
||||
@BindView(R2.id.tv_login_out)
|
||||
TypeFaceTextView mTvLoginOut;
|
||||
@BindView(R2.id.ll_reset_phone)
|
||||
LinearLayout mLlResetPhone;
|
||||
@BindView(R2.id.ll_change_pwd)
|
||||
LinearLayout mLlChangePwd;
|
||||
@BindView(R2.id.tv_version)
|
||||
TypeFaceTextView mTvVersion;
|
||||
private boolean isLogin = false;
|
||||
private Disposable mDisposable;
|
||||
private Unbinder mBind;
|
||||
@ -76,6 +80,7 @@ public class SettingActivity extends BaseActivity {
|
||||
.navigation(mActivity, 123);
|
||||
}
|
||||
});
|
||||
mTvVersion.setText("v" + AppUtils.getAppVersionName());
|
||||
mLlChangePhone.setOnClickListener(v -> {
|
||||
if (TextUtils.isEmpty(UserLgUtils.getToken())) {
|
||||
ARouter.getInstance()
|
||||
|
@ -147,7 +147,7 @@
|
||||
app:cardCornerRadius="5dp"
|
||||
app:cardElevation="3dp">
|
||||
|
||||
<LinearLayout
|
||||
<RelativeLayout
|
||||
android:id="@+id/ll_check_update"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@ -157,17 +157,31 @@
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_ic"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/ic_check_update" />
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:layout_toRightOf="@id/iv_ic"
|
||||
android:text="检查更新"
|
||||
android:textSize="15sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
android:id="@+id/tv_version"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:layout_marginLeft="5dp"
|
||||
android:text="v1.2.2"
|
||||
android:textSize="15sp" />
|
||||
</RelativeLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<com.sucstepsoft.cm_utils.core.widget.views.TypeFaceTextView
|
||||
|
@ -17,6 +17,7 @@ import android.os.Bundle;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
|
||||
import com.scwang.smartrefresh.layout.constant.RefreshState;
|
||||
import com.sucstepsoft.cm_utils.constant.PathConfig;
|
||||
import com.sucstepsoft.cm_utils.core.retrofit_net.RetrofitManager;
|
||||
import com.sucstepsoft.cm_utils.core.widget.base.BaseActivity;
|
||||
@ -86,14 +87,17 @@ public class PlaceOrderActivity extends BaseActivity {
|
||||
* @param rowsBean
|
||||
*/
|
||||
private void showOrderDetail(PlaceOrderBean.RowsBean rowsBean) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ORDER_DETAIL)
|
||||
.withString("id", rowsBean.getGroundBookingId())
|
||||
.withString("photo", rowsBean.getVenuePanorama())
|
||||
.withString("price", rowsBean.getPrice())
|
||||
.withString("time", rowsBean.getGmtCreate())
|
||||
.withString("state", rowsBean.getOrderType())
|
||||
.navigation();
|
||||
if (mSrlOrder.getState() != RefreshState.Refreshing) {
|
||||
ARouter.getInstance()
|
||||
.build(PathConfig.PATH_MODULE_PLACE_ORDER_DETAIL)
|
||||
.withString("id", rowsBean.getGroundBookingId())
|
||||
.withString("photo", rowsBean.getVenuePanorama())
|
||||
.withString("price", rowsBean.getPrice())
|
||||
.withString("time", rowsBean.getGmtCreate())
|
||||
.withString("state", rowsBean.getOrderType())
|
||||
.navigation();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -73,4 +73,4 @@
|
||||
<!-- tools:listitem="@layout/item_subject_destine"-->
|
||||
<!-- tools:orientation="horizontal" />-->
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView >
|
Loading…
Reference in New Issue
Block a user